added some tests to help demonstrate Still need to verify the results but looks good for now

This commit is contained in:
Meyer Simon
2025-05-01 20:56:25 -04:00
parent 33347f3051
commit 558c09e60f
2 changed files with 53 additions and 0 deletions

View File

@ -0,0 +1,26 @@
type rec: [character: x; integer: y]
type T2: rec -> integer
type main: string -> integer
function entry: main
function bar: T2
bar (r,s) := {
return 0;
}
entry (arg) := {
[ integer: result ; rec: w]
if ( result = result ) then {
result := result + 8;
if ( result < w.y ) then {
result := 8;
} else {
result := 9;
}
} else {
result := bar('c', 7);
}
return 0;
}

View File

@ -0,0 +1,27 @@
type rec: [character: x; integer: y]
type T2: rec -> integer
type main: string -> integer
function entry: main
function bar: T2
bar (r,s) := {
return 0;
}
entry (arg) := {
[ integer: result ; rec: w]
while ( result = result ) {
result := result + 8;
if ( result < w.y ) then {
while (true) {
result := 8;
}
} else {
result := 9;
}
result := bar('c', 7);
}
return 0;
}