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

adapt sieve example

parent 6c0229b1
Branches
No related tags found
No related merge requests found
...@@ -5,20 +5,33 @@ DEFINITIONS ...@@ -5,20 +5,33 @@ DEFINITIONS
SET_PREF_MININT == -1; SET_PREF_MININT == -1;
MINLIM == MAXINT-1; MINLIM == MAXINT-1;
GOAL == (cur=1 & numbers /= {}); GOAL == (cur=1 & numbers /= {});
VISB_SVG_FILE == ""; VISB_JSON_FILE == "";
VISB_SVG_BOX == rec(height:220, width:220, viewBox:"0 0 220 220"); VISB_SVG_BOX == rec(height:220, width:220, viewBox:"0 0 220 220");
vsz == 20; vsz == 20;
"LibrarySVG.def"; "CHOOSE.def";
VISB_SVG_CONTENTS == '''
<style>
.tl-dps {
stroke : red;
stroke-linecap: butt;
opacity : 0.8
}
</style>
''';
VISB_SVG_OBJECTS3 == rec(`id`:"line", svg_class:"line", class:MU({"tl-dps"}),
title : ```Track Line ```, visibility:MU({"visible"}),
`stroke-dasharray`:svg_set_dasharray({1,3,4,5,6,7,8,9,10,50,51}), //```0 0 3 10000```,
x1:0,y1:210, x2:220,y2:210);
VISB_SVG_OBJECTS2 == {x,y•x:0..9 & y:0..9 | rec(`id`:("nr",x,y), svg_class:"text", VISB_SVG_OBJECTS2 == {x,y•x:0..9 & y:0..9 | rec(`id`:("nr",x,y), svg_class:"text",
x:vsz+x*vsz, y:vsz+y*vsz, `font-size`:10, x:vsz+x*vsz, y:vsz+y*vsz, `font-size`:10,
text:x+y*10)}; text:x+y*10)};
VISB_SVG_OBJECTS1 == {x,y•x:0..9 & y:0..9 | rec(`id`:("rec",x,y), svg_class:"rect", VISB_SVG_OBJECTS1 == {x,y•x:0..9 & y:0..9 | rec(`id`:("rec",x,y), svg_class:"rect",
x:15+x*vsz, y:5+y*vsz, x:15+x*vsz, y:5+y*vsz,
stroke:"green", `stroke-width`:1.5,fill:"white", `stroke-width`:1.5,
width:vsz-1, height:vsz-1)}; width:vsz-1, height:vsz-1,
VISB_SVG_UPDATES2 == {x,y•x:0..9 & y:0..9 | rec(`id`:("rec",x,y),
stroke:IF x+y*10=cur THEN "red" stroke:IF x+y*10=cur THEN "red"
ELSIF x+y*10:numbers THEN "green" ELSE "gray" END, ELSIF x+y*10:numbers THEN "green" ELSE "gray" END,
fill: IF x+y*10:numbers THEN "white" ELSE "gray" END)}; fill: IF x+y*10:numbers THEN "white" ELSE "lightgray" END)};
VARIABLES numbers,cur, limit VARIABLES numbers,cur, limit
INVARIANT INVARIANT
numbers <: INTEGER & cur:NATURAL1 & limit:NATURAL1 numbers <: INTEGER & cur:NATURAL1 & limit:NATURAL1
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment