Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
V
visb-visualisation-examples
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
general
stups
visb-visualisation-examples
Commits
ba0913a7
Commit
ba0913a7
authored
2 years ago
by
Michael Leuschel
Browse files
Options
Downloads
Patches
Plain Diff
Simplify example
Signed-off-by:
Michael Leuschel
<
leuschel@uni-duesseldorf.de
>
parent
44d925bb
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
Button/button_def.mch
+12
-23
12 additions, 23 deletions
Button/button_def.mch
with
12 additions
and
23 deletions
Button/button_def.mch
+
12
−
23
View file @
ba0913a7
MACHINE button_def
MACHINE button_def
// An example that uses
the new feature to use VisB DEFINITIONS
// An example that uses
VisB DEFINITIONS instead of a JSON and SVG file
DEFINITIONS
DEFINITIONS
"LibraryStrings.def";
VISB_JSON_FILE == "";
VISB_JSON_FILE == "";
VISB_SVG_BOX == rec(height:200, width:240);
VISB_SVG_BOX == rec(height:200, width:240);
VISB_SVG_OBJECTS == rec(svg_class:"circle", `id`:"button",
VISB_SVG_OBJECTS == rec(`id`:"button", svg_class:"circle",
cx:"100",cy:"100", r:"80",
cx:"100",cy:"100", r:"80", stroke:"black", `stroke-width`:"3");
stroke:"black", `stroke-width`:"3");
VISB_SVG_UPDATES == rec(`id`:"button",
VISB_SVG_UPDATES == rec(`id`:"button",
fill: IF button=TRUE THEN "green" ELSE "red" END);
fill: IF button=TRUE THEN "green" ELSE "red" END);
VISB_SVG_HOVERS == rec(`id`:"button", stroke:"gray",
VISB_SVG_HOVERS == rec(`id`:"button",
`stroke-width`:"5")
stroke:"gray", `stroke-width`:"5")
VARIABLES
VARIABLES button
button
INVARIANT button:BOOL
INVARIANT
INITIALISATION button := FALSE
button:BOOL
INITIALISATION
button := FALSE
OPERATIONS
OPERATIONS
press_button = PRE button=FALSE THEN
button:=TRUE
END;
toggle_button = BEGIN
toggle_button = BEGIN
button:= bool(button=FALSE)
button:= bool(button=FALSE)
END;
set_button(newVal) = PRE newVal:BOOL THEN
button := bool(newVal=TRUE)
END
END
END
END
\ No newline at end of file
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment