Skip to content
Snippets Groups Projects
Commit 65ccb737 authored by Michael Leuschel's avatar Michael Leuschel
Browse files

add TLA button example

parent 4c5d2900
Branches
No related tags found
No related merge requests found
*.prob
*.DS_Store
*.aux
*.fuzz
*.log
*_tla.txt
{
"svg": "../button.svg",
"items": [
{
"id": "button",
"attr": "fill",
"value": "IF button=TRUE THEN \"green\" ELSE \"red\" END"
},
{
"id": "button",
"attr": "stroke-width",
"value": "IF ENABLED(\"press_button\") THEN 6 ELSE 1 END",
"ignore": "is now used in hover below"
},
{
"id": "button_%0",
"attr": "visibility",
"value": "\"hidden\"",
"repeat": [ "TRUE", "FALSE" ]
}
],
"events": [
{
"id": "button",
"event": "toggle_button",
"hovers": [{ "attr":"stroke-width", "enter":"6", "leave":"1"},
{ "attr":"opacity", "enter":"0.8", "leave":"1.0"}]
}
]
}
------------------------------- MODULE button -------------------------------
VARIABLES button
Init == button = FALSE
Press_Button == button' = TRUE
toggle_button == button' = \lnot button
Next == \/ Press_Button
\/ toggle_button
Spec == Init /\ [][Next]_button
=============================================================================
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment