I think it was broken so I fixed it

This commit is contained in:
Meyer Simon
2025-05-04 14:30:04 -04:00
parent 18b5daea0e
commit 4ae76d0341
4 changed files with 57 additions and 66 deletions

View File

@ -6,19 +6,24 @@ type main: string -> integer
function entry: main
function bar: T2
(*
bar (r,s) := {
return 0;
}
*)
entry (arg) := {
[ Boolean:x ; Boolean:y ; Boolean:z ; Boolean:t]
if ( !( x < y ) & ( z & t ) ) then {
(* if ( result < w.y ) then {
result := 8;
if ( ( x < y ) (* < ( z & t )*)) then {
(*
if ( x<y & !(x=y) ) then {
t := 8;
} else {
result := 9;
} *)
z := t;
}
*)
z := 9;
} else {
y := true; (* bar('c', 7); *)
}

View File

@ -12,18 +12,23 @@ bar (r,s) := {
entry (arg) := {
[ Boolean:x ; Boolean:y ; Boolean:z ; Boolean:t]
if ( y & z | t ) then {
(* if ( ( x < y ) & ( z = t ) ) then {
y := z < t;
t:= 0;
} else {
t := z = t;
z := 1;
} *)
(* if ( y & (z | t) ) then { *)
if ( ( x = y ) & ( z < t ) ) then {
(* y := z < t; *)
t:= 0;
} else {
(* t := z = t; *)
z := 1;
}
(*
if ( x & y ) then {
t := true;
} else {
y := true; (* bar('c', 7); *)
y := true;
}
*)
(* } else { *)
(* } *)
(* x := x & y; *)
return 0;
}

View File

@ -11,19 +11,19 @@ bar (r,s) := {
}
entry (arg) := {
[ integer: x ; integer: y; integer: z;integer: t]
while ( (!(x = y)) < ( z = t ) ) {
x := x;
while ( (x < y) = ( z < t ) ) {
[ Boolean: x ; Boolean: y; Boolean: z;Boolean: t]
while ( ((x = y)) < ( z | t ) ) {
while ( (x & y) = ( z < t ) ) {
y := y;
}
(*
x := x;
*)
if ( (x = y) = ( z < t ) ) then {
x := 1;
} else {
x := 1;
}
*)
}
return 0;
}