diff --git a/.gitignore b/.gitignore index de3a0f640d6ead3b12c196be935782cba6c62b34..cade3bf40154058b6dd66c4d51dbe5be8337a235 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,6 @@ *.prob *.DS_Store +*.aux +*.fuzz +*.log +*_tla.txt diff --git a/Button/TLA/button.json b/Button/TLA/button.json new file mode 100644 index 0000000000000000000000000000000000000000..30b88867da067380a44d1511af4342f9fb36f2c2 --- /dev/null +++ b/Button/TLA/button.json @@ -0,0 +1,30 @@ +{ + "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"}] + } + ] +} diff --git a/Button/TLA/button.tla b/Button/TLA/button.tla new file mode 100644 index 0000000000000000000000000000000000000000..922c1bcbd333a3a2aaf470230f45d1cc8015fa30 --- /dev/null +++ b/Button/TLA/button.tla @@ -0,0 +1,16 @@ +------------------------------- 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