Download Paper
Transcript
}
action test_loops() {
for 0 <= i < 258 do {
$i := $i + 3;
}
}
action test_unequations() {
$a := true;
$b := true;
$c := false;
while($a = $b) or ($b −> $c) do {
... ;
}
if $c = false then {
skip;
}
else {
if ... then {
skip;
}
}
$x := 1;
$y := 2;
$z := 3;
if not ($x = $y) or ($z = $y) and $x −> $z then {
$a\_ := $a < $z;
}
else {
if $x then {
$x;
}
$w := 56;
$h1 := 52;
}
if $b then {
skip;
}
}
action is_true() returns res: Boolean {
"true" −> post_to_wall;
$res := true;
... ;
... ;
meta private;
}
action is_false() returns res: Boolean {
"false" −> post_to_wall;
$res := false;
meta private;
}
action test_boolean_shortcuts() {
97