Merge branch 'DontBreakDev' into FunctionCalls

This commit is contained in:
Scarlett
2025-05-04 17:00:38 -04:00
174 changed files with 996 additions and 663 deletions

View File

@ -1 +0,0 @@
type A : 1 -> integer

View File

@ -1,3 +1,4 @@
(* TEST: [-asc -tc] *)
(* type string : 1 -> character *)
type M : string -> integer

View File

@ -1,3 +1,4 @@
(* TEST: [-asc -tc] *)
type M : string -> integer
function entry : M

View File

@ -1,3 +1,4 @@
(* TEST: [-asc -tc] *)
type M : string -> integer
function entry : M

View File

@ -1,3 +1,4 @@
(* TEST: [-asc -tc] *)
type M : string -> integer
function entry : M

View File

@ -1,3 +1,4 @@
(* TEST: [-asc -tc] *)
type M : string -> integer
function foo : M

View File

@ -1,3 +1,4 @@
(* TEST: [-asc -tc] *)
type M : string -> integer
function entry : M

View File

@ -1,3 +1,4 @@
(* TEST: [-asc -tc] *)
type string2int: string -> integer
function entry : string2int

View File

@ -1,3 +1,4 @@
(* TEST: [-asc -tc] *)
type string2int: string -> integer
function entry : string2int

View File

@ -1,3 +1,4 @@
(* TEST: [-asc -tc] *)
type M : integer -> integer
function f : M

View File

@ -1,3 +1,4 @@
(* TEST: [-asc -tc] *)
type M : integer -> integer
function f : M

View File

@ -1,3 +1,4 @@
(* TEST: [-asc -tc] *)
(* Type definitions *)
(* mapping type *)
@ -57,11 +58,11 @@ c(x) := {
entry is the first function called
*)
entry(arg) := {
[integer: result; string2int: f; integer: temp; character: char]
[integer: result; string2int: f; integer: temp]
temp := a("Hello");
f := b(temp);
result := c(f);
if (d(1,2,'a'))
if (d(1,2,'c'))
then {
result := 0;
}

View File

@ -1,3 +1,4 @@
(* TEST: [-asc -tc] *)
(* Type definitions *)
type int2int: integer -> integer

View File

@ -1,3 +1,4 @@
(* TEST: [-asc -tc] *)
(* Type definitions *)
type string2int: string -> integer
@ -45,9 +46,9 @@ selectionSort(data) := {
data(i) := temp;
i := i + 1;
}
return true;
return true;
}
(* Function definition
entry is the first function called

View File

@ -0,0 +1,2 @@
(* TEST: [-asc -tc] *)
type A : 1 -> integer

View File

@ -1,2 +1,3 @@
(* TEST: [-asc -tc] *)
type M : integer -> character

View File

@ -1 +1,2 @@
(* TEST: [-asc -tc] *)
type R : [ integer : i ; character : c ]

View File

@ -1,3 +1,4 @@
(* TEST: [-asc -tc] *)
(*
At compiler start-up your program should

View File

@ -0,0 +1,20 @@
1 1 405 "type"
1 6 101 "main"
1 10 508 ":"
1 12 101 "string"
1 19 510 "->"
1 22 201 "integer"
2 1 406 "function"
2 10 101 "entry"
2 15 508 ":"
2 17 101 "main"
4 1 101 "entry"
4 6 501 "("
4 7 101 "arg"
4 10 502 ")"
4 12 608 ":="
4 15 505 "{"
5 5 407 "return"
5 12 301 "0"
5 13 507 ";"
6 1 506 "}"

View File

@ -1 +1,2 @@
(* TEST: [-tok] *)
(***)

View File

@ -1 +1,2 @@
(* TEST: [-tok] *)
(*(**)*)

View File

@ -1,3 +1,4 @@
(* TEST: [-tok] *)
(*(**)*)
(***)
(******)(*\kpp*********)

View File

@ -1,3 +1,4 @@
(* TEST: [-tok] *)
(* hello *)
(* hello *)
(* I'd think this is a legal "string" that contains several \n \t

View File

@ -1,3 +1,4 @@
(* TEST: [-tok] *)
This is a test
9combined 7okens
12345

View File

@ -1,3 +1,4 @@
(* TEST: [-tok] *)
while
While
whiLe

View File

@ -1,3 +1,4 @@
(* TEST: [-tok] *)
+
-
*

View File

@ -1,3 +1,4 @@
(* TEST: [-tok] *)
;
:
,

View File

@ -1,3 +1,4 @@
(* TEST: [-tok] *)
)
a)
)a

View File

@ -1,3 +1,4 @@
(* TEST: [-tok] *)
type rec: [integer: x; integer: y]
type T1: integer -> integer
type T2: rec -> integer

View File

@ -1,3 +1,4 @@
(* TEST: [-tok] *)
(* Type definitions *)
type string: 1 -> character
type int2int: integer -> integer

View File

@ -1,3 +1,4 @@
(* TEST: [-tok] *)
type main: string -> integer
function entry: main

View File

@ -1,3 +1,4 @@
(* TEST: [-tok] *)
45
123
8392

View File

@ -1,3 +1,4 @@
(* TEST: [-tok] *)
"this is a string" 721398 'g' '/n' (* should print 3 tokens before this *)
'
'

View File

@ -1,3 +1,4 @@
(* TEST: [-tok] *)
valid1
Valid2
_valid3

View File

@ -1,27 +1,27 @@
NAME : SCOPE : PARENT : TYPE : EXTRA ANNOTATION :
------------------------------:--------:--------:-----------------------------------:-----------------------------------:
bar2 : 001001 : : undefined : Function Definition
bar1 : 001001 : : undefined : Function Definition
foo : 001001 : : undefined : Function Definition
entry : 001001 : : undefined : Function Definition
main : 001001 : : string -> integer : Type of Function
arr : 001001 : : 1 -> integer : Type of Array
T2 : 001001 : : rec -> integer : Type of Function
T1 : 001001 : : integer -> integer : Type of Function
rec : 001001 : : Record Type : elements-2 size-8 bytes
integer : 001001 : : Primitive Type : size-4 bytes
address : 001001 : : Primitive Type : size-8 bytes
character : 001001 : : Primitive Type : size-1 bytes
string : 001001 : : 1 -> character : Type of Array
Boolean : 001001 : : Primitive Type : size-4 bytes
Boolean : 001001 : : Primitive Type : size-1 bytes
reserve type : 001001 : : integer -> address : Type of Function
reserve : 001001 : : undefined : Function Definition
reserve : 001001 : : reserve type : Function not defined before runtime
release type : 001001 : : address -> integer : Type of Function
release : 001001 : : undefined : Function Definition
release : 001001 : : release type : Function not defined before runtime
rec : 001001 : : Record Type : elements-2 size-8 bytes
T1 : 001001 : : integer -> integer : Type of Function
T2 : 001001 : : rec -> integer : Type of Function
arr : 001001 : : 1 -> integer : Type of Array
main : 001001 : : string -> integer : Type of Function
entry : 001001 : : main : Function Definition that starts at line 25
foo : 001001 : : T1 : Function Definition that starts at line 13
bar1 : 001001 : : T2 : Function Definition that starts at line 17
bar2 : 001001 : : T2 : Function Definition that starts at line 21
------------------------------:--------:--------:-----------------------------------:-----------------------------------:
w : 025000 : 001001 : rec : Record Instance
result : 025000 : 001001 : integer : Primitive Instance
arg : 025000 : 001001 : string : Array Instance
result : 025000 : 001001 : integer : Primitive Instance
w : 025000 : 001001 : rec : Record Instance
------------------------------:--------:--------:-----------------------------------:-----------------------------------:
r : 021000 : 001001 : integer : Primitive Instance
s : 021000 : 001001 : integer : Primitive Instance
@ -31,5 +31,5 @@ y : 017000 : 001001 : integer
------------------------------:--------:--------:-----------------------------------:-----------------------------------:
x : 013000 : 001001 : integer : Primitive Instance
------------------------------:--------:--------:-----------------------------------:-----------------------------------:
y : 001000 : 001001 : integer : Primitive Instance
x : 001000 : 001001 : integer : Primitive Instance
y : 001000 : 001001 : integer : Primitive Instance

View File

@ -1,29 +1,29 @@
NAME : SCOPE : PARENT : TYPE : EXTRA ANNOTATION :
------------------------------:--------:--------:-----------------------------------:-----------------------------------:
entry : 001001 : : undefined : Function Definition
integer2integer2integerFunc : 001001 : : undefined : Function Definition
released : 001001 : : undefined : Function Definition
reserved : 001001 : : undefined : Function Definition
printBoolean : 001001 : : undefined : Function Definition
printCharacter : 001001 : : undefined : Function Definition
printInteger : 001001 : : undefined : Function Definition
integer2integer2integer : 001001 : : integer2integer -> integer : Type of Function
address2integer : 001001 : : address -> integer : Type of Function
integer2address : 001001 : : integer -> address : Type of Function
Boolean2Boolean2Boolean : 001001 : : Boolean2Boolean -> Boolean : Type of Function
character2character2Boolean : 001001 : : undefined -> undefined : Type of Function
integer2integer2Boolean : 001001 : : integer2integer -> Boolean : Type of Function
string2integer : 001001 : : string -> integer : Type of Function
Boolean2integer : 001001 : : Boolean -> integer : Type of Function
character2integer : 001001 : : character -> integer : Type of Function
integer2integer : 001001 : : integer -> integer : Type of Function
Boolean2Boolean : 001001 : : Boolean -> Boolean : Type of Function
integer : 001001 : : Primitive Type : size-4 bytes
address : 001001 : : Primitive Type : size-8 bytes
character : 001001 : : Primitive Type : size-1 bytes
string : 001001 : : 1 -> character : Type of Array
Boolean : 001001 : : Primitive Type : size-4 bytes
Boolean : 001001 : : Primitive Type : size-1 bytes
reserve type : 001001 : : integer -> address : Type of Function
reserve : 001001 : : undefined : Function Definition
reserve : 001001 : : reserve type : Function not defined before runtime
release type : 001001 : : address -> integer : Type of Function
release : 001001 : : undefined : Function Definition
release : 001001 : : release type : Function not defined before runtime
Boolean2Boolean : 001001 : : Boolean -> Boolean : Type of Function
integer2integer : 001001 : : integer -> integer : Type of Function
character2integer : 001001 : : character -> integer : Type of Function
Boolean2integer : 001001 : : Boolean -> integer : Type of Function
string2integer : 001001 : : string -> integer : Type of Function
integer2integer2Boolean : 001001 : : integer2integer -> Boolean : Type of Function
character2character2Boolean : 001001 : : undefined -> undefined : Type of Function
Boolean2Boolean2Boolean : 001001 : : Boolean2Boolean -> Boolean : Type of Function
integer2address : 001001 : : integer -> address : Type of Function
address2integer : 001001 : : address -> integer : Type of Function
integer2integer2integer : 001001 : : integer2integer -> integer : Type of Function
printInteger : 001001 : : integer2integer : Function not defined before runtime
printCharacter : 001001 : : character2integer : Function not defined before runtime
printBoolean : 001001 : : Boolean2integer : Function not defined before runtime
reserved : 001001 : : integer2address : Function not defined before runtime
released : 001001 : : address2integer : Function not defined before runtime
integer2integer2integerFunc : 001001 : : integer2integer2integer : Function not defined before runtime
entry : 001001 : : string2integer : Function not defined before runtime

View File

@ -1,21 +1,21 @@
NAME : SCOPE : PARENT : TYPE : EXTRA ANNOTATION :
------------------------------:--------:--------:-----------------------------------:-----------------------------------:
testarr : 001001 : : 1 -> integer : Type of Array
entry : 001001 : : undefined : Function Definition
main : 001001 : : string -> integer : Type of Function
integer : 001001 : : Primitive Type : size-4 bytes
address : 001001 : : Primitive Type : size-8 bytes
character : 001001 : : Primitive Type : size-1 bytes
string : 001001 : : 1 -> character : Type of Array
Boolean : 001001 : : Primitive Type : size-4 bytes
Boolean : 001001 : : Primitive Type : size-1 bytes
reserve type : 001001 : : integer -> address : Type of Function
reserve : 001001 : : undefined : Function Definition
reserve : 001001 : : reserve type : Function not defined before runtime
release type : 001001 : : address -> integer : Type of Function
release : 001001 : : undefined : Function Definition
release : 001001 : : release type : Function not defined before runtime
main : 001001 : : string -> integer : Type of Function
entry : 001001 : : main : Function Definition that starts at line 5
testarr : 001001 : : 1 -> integer : Type of Array
------------------------------:--------:--------:-----------------------------------:-----------------------------------:
b1 : 005000 : 001001 : Boolean : Primitive Instance
b2 : 005000 : 001001 : Boolean : Primitive Instance
arr2 : 005000 : 001001 : testarr : Array Instance
arr : 005000 : 001001 : testarr : Array Instance
x : 005000 : 001001 : integer : Primitive Instance
arg : 005000 : 001001 : string : Array Instance
x : 005000 : 001001 : integer : Primitive Instance
arr : 005000 : 001001 : testarr : Array Instance
arr2 : 005000 : 001001 : testarr : Array Instance
b2 : 005000 : 001001 : Boolean : Primitive Instance
b1 : 005000 : 001001 : Boolean : Primitive Instance

View File

@ -1,20 +1,20 @@
NAME : SCOPE : PARENT : TYPE : EXTRA ANNOTATION :
------------------------------:--------:--------:-----------------------------------:-----------------------------------:
test : 001001 : : undefined : Function Definition
main : 001001 : : rec -> integer : Type of Function
rec : 001001 : : Record Type : elements-2 size-8 bytes
integer : 001001 : : Primitive Type : size-4 bytes
address : 001001 : : Primitive Type : size-8 bytes
character : 001001 : : Primitive Type : size-1 bytes
string : 001001 : : 1 -> character : Type of Array
Boolean : 001001 : : Primitive Type : size-4 bytes
Boolean : 001001 : : Primitive Type : size-1 bytes
reserve type : 001001 : : integer -> address : Type of Function
reserve : 001001 : : undefined : Function Definition
reserve : 001001 : : reserve type : Function not defined before runtime
release type : 001001 : : address -> integer : Type of Function
release : 001001 : : undefined : Function Definition
release : 001001 : : release type : Function not defined before runtime
rec : 001001 : : Record Type : elements-2 size-8 bytes
main : 001001 : : rec -> integer : Type of Function
test : 001001 : : main : Function Definition that starts at line 5
------------------------------:--------:--------:-----------------------------------:-----------------------------------:
arg : 005000 : 001001 : integer : Primitive Instance
arg2 : 005000 : 001001 : integer : Primitive Instance
------------------------------:--------:--------:-----------------------------------:-----------------------------------:
y : 001000 : 001001 : integer : Primitive Instance
x : 001000 : 001001 : integer : Primitive Instance
y : 001000 : 001001 : integer : Primitive Instance

View File

@ -1,20 +1,20 @@
NAME : SCOPE : PARENT : TYPE : EXTRA ANNOTATION :
------------------------------:--------:--------:-----------------------------------:-----------------------------------:
rec : 001001 : : Record Type : elements-2 size-8 bytes
entry : 001001 : : undefined : Function Definition
main : 001001 : : string -> integer : Type of Function
integer : 001001 : : Primitive Type : size-4 bytes
address : 001001 : : Primitive Type : size-8 bytes
character : 001001 : : Primitive Type : size-1 bytes
string : 001001 : : 1 -> character : Type of Array
Boolean : 001001 : : Primitive Type : size-4 bytes
Boolean : 001001 : : Primitive Type : size-1 bytes
reserve type : 001001 : : integer -> address : Type of Function
reserve : 001001 : : undefined : Function Definition
reserve : 001001 : : reserve type : Function not defined before runtime
release type : 001001 : : address -> integer : Type of Function
release : 001001 : : undefined : Function Definition
release : 001001 : : release type : Function not defined before runtime
main : 001001 : : string -> integer : Type of Function
entry : 001001 : : main : Function Definition that starts at line 6
rec : 001001 : : Record Type : elements-2 size-8 bytes
------------------------------:--------:--------:-----------------------------------:-----------------------------------:
w : 006000 : 001001 : rec : Record Instance
arg : 006000 : 001001 : string : Array Instance
w : 006000 : 001001 : rec : Record Instance
------------------------------:--------:--------:-----------------------------------:-----------------------------------:
y : 004000 : 001001 : integer : Primitive Instance
x : 004000 : 001001 : integer : Primitive Instance
y : 004000 : 001001 : integer : Primitive Instance

View File

@ -1,17 +1,17 @@
NAME : SCOPE : PARENT : TYPE : EXTRA ANNOTATION :
------------------------------:--------:--------:-----------------------------------:-----------------------------------:
rec : 001001 : : Record Type : elements-2 size-8 bytes
integer : 001001 : : Primitive Type : size-4 bytes
address : 001001 : : Primitive Type : size-8 bytes
character : 001001 : : Primitive Type : size-1 bytes
string : 001001 : : 1 -> character : Type of Array
Boolean : 001001 : : Primitive Type : size-4 bytes
Boolean : 001001 : : Primitive Type : size-1 bytes
reserve type : 001001 : : integer -> address : Type of Function
reserve : 001001 : : undefined : Function Definition
reserve : 001001 : : reserve type : Function not defined before runtime
release type : 001001 : : address -> integer : Type of Function
release : 001001 : : undefined : Function Definition
release : 001001 : : release type : Function not defined before runtime
rec : 001001 : : Record Type : elements-2 size-8 bytes
------------------------------:--------:--------:-----------------------------------:-----------------------------------:
w : 003000 : 001001 : rec : Record Instance
------------------------------:--------:--------:-----------------------------------:-----------------------------------:
y : 001000 : 001001 : integer : Primitive Instance
x : 001000 : 001001 : integer : Primitive Instance
y : 001000 : 001001 : integer : Primitive Instance

View File

@ -1,39 +1,38 @@
NAME : SCOPE : PARENT : TYPE : EXTRA ANNOTATION :
------------------------------:--------:--------:-----------------------------------:-----------------------------------:
entry : 001001 : : undefined : Function Definition
printBoolean : 001001 : : undefined : Function Definition
printCharacter : 001001 : : undefined : Function Definition
printInteger : 001001 : : undefined : Function Definition
address2integer : 001001 : : address -> integer : Type of Function
integer2address : 001001 : : integer -> address : Type of Function
BooleanXBoolean2Boolean : 001001 : : BooleanXBoolean -> Boolean : Type of Function
characterXcharacter2Boolean : 001001 : : characterXcharacter -> Boolean : Type of Function
integerXinteger2Boolean : 001001 : : integerXinteger -> Boolean : Type of Function
integerXinteger2integer : 001001 : : integerXinteger -> integer : Type of Function
string2integer : 001001 : : string -> integer : Type of Function
Boolean2integer : 001001 : : Boolean -> integer : Type of Function
character2integer : 001001 : : character -> integer : Type of Function
integer2integer : 001001 : : integer -> integer : Type of Function
Boolean2Boolean : 001001 : : Boolean -> Boolean : Type of Function
integerXinteger : 001001 : : Record Type : elements-2 size-8 bytes
characterXcharacter : 001001 : : Record Type : elements-2 size-2 bytes
BooleanXBoolean : 001001 : : Record Type : elements-2 size-8 bytes
string : 001001 : : 1 -> character : Type of Array
integer : 001001 : : Primitive Type : size-4 bytes
address : 001001 : : Primitive Type : size-8 bytes
character : 001001 : : Primitive Type : size-1 bytes
string : 001001 : : 1 -> character : Type of Array
Boolean : 001001 : : Primitive Type : size-4 bytes
Boolean : 001001 : : Primitive Type : size-1 bytes
reserve type : 001001 : : integer -> address : Type of Function
reserve : 001001 : : undefined : Function Definition
reserve : 001001 : : reserve type : Function not defined before runtime
release type : 001001 : : address -> integer : Type of Function
release : 001001 : : undefined : Function Definition
release : 001001 : : release type : Function not defined before runtime
BooleanXBoolean : 001001 : : Record Type : elements-2 size-2 bytes
characterXcharacter : 001001 : : Record Type : elements-2 size-2 bytes
integerXinteger : 001001 : : Record Type : elements-2 size-8 bytes
Boolean2Boolean : 001001 : : Boolean -> Boolean : Type of Function
integer2integer : 001001 : : integer -> integer : Type of Function
character2integer : 001001 : : character -> integer : Type of Function
Boolean2integer : 001001 : : Boolean -> integer : Type of Function
string2integer : 001001 : : string -> integer : Type of Function
integerXinteger2integer : 001001 : : integerXinteger -> integer : Type of Function
integerXinteger2Boolean : 001001 : : integerXinteger -> Boolean : Type of Function
characterXcharacter2Boolean : 001001 : : characterXcharacter -> Boolean : Type of Function
BooleanXBoolean2Boolean : 001001 : : BooleanXBoolean -> Boolean : Type of Function
integer2address : 001001 : : integer -> address : Type of Function
address2integer : 001001 : : address -> integer : Type of Function
printInteger : 001001 : : integer2integer : Function not defined before runtime
printCharacter : 001001 : : character2integer : Function not defined before runtime
printBoolean : 001001 : : Boolean2integer : Function not defined before runtime
entry : 001001 : : string2integer : Function not defined before runtime
------------------------------:--------:--------:-----------------------------------:-----------------------------------:
y : 015000 : 001001 : integer : Primitive Instance
x : 015000 : 001001 : integer : Primitive Instance
y : 015000 : 001001 : integer : Primitive Instance
------------------------------:--------:--------:-----------------------------------:-----------------------------------:
y : 014000 : 001001 : character : Primitive Instance
x : 014000 : 001001 : character : Primitive Instance
y : 014000 : 001001 : character : Primitive Instance
------------------------------:--------:--------:-----------------------------------:-----------------------------------:
y : 013000 : 001001 : Boolean : Primitive Instance
x : 013000 : 001001 : Boolean : Primitive Instance
y : 013000 : 001001 : Boolean : Primitive Instance

View File

@ -0,0 +1,58 @@
NAME : SCOPE : PARENT : TYPE : EXTRA ANNOTATION :
------------------------------:--------:--------:-----------------------------------:-----------------------------------:
integer : 001001 : : Primitive Type : size-4 bytes
address : 001001 : : Primitive Type : size-8 bytes
character : 001001 : : Primitive Type : size-1 bytes
string : 001001 : : 1 -> character : Type of Array
Boolean : 001001 : : Primitive Type : size-1 bytes
reserve type : 001001 : : integer -> address : Type of Function
reserve : 001001 : : reserve type : Function not defined before runtime
release type : 001001 : : address -> integer : Type of Function
release : 001001 : : release type : Function not defined before runtime
main : 001001 : : string -> integer : Type of Function
entry : 001001 : : main : Function Definition that starts at line 68
rec : 001001 : : Record Type : elements-2 size-8 bytes
T1 : 001001 : : integer -> integer : Type of Function
T2 : 001001 : : rec -> integer : Type of Function
llnode : 001001 : : Record Type : elements-3 size-24 bytes
list : 001001 : : integer -> llnode : Type of Function
foo : 001001 : : T1 : Function Definition that starts at line 45
bar1 : 001001 : : T2 : Function Definition that starts at line 49
bar2 : 001001 : : T2 : Function Definition that starts at line 53
make_list : 001001 : : list : Function Definition that starts at line 16
------------------------------:--------:--------:-----------------------------------:-----------------------------------:
arg : 068000 : 001001 : string : Array Instance
result : 068000 : 001001 : integer : Primitive Instance
w : 068000 : 001001 : rec : Record Instance
li : 068000 : 001001 : llnode : Record Instance
------------------------------:--------:--------:-----------------------------------:-----------------------------------:
r : 053000 : 001001 : integer : Primitive Instance
s : 053000 : 001001 : integer : Primitive Instance
------------------------------:--------:--------:-----------------------------------:-----------------------------------:
x : 058012 : 053000 : integer : Primitive Instance
------------------------------:--------:--------:-----------------------------------:-----------------------------------:
------------------------------:--------:--------:-----------------------------------:-----------------------------------:
------------------------------:--------:--------:-----------------------------------:-----------------------------------:
------------------------------:--------:--------:-----------------------------------:-----------------------------------:
a : 049000 : 001001 : integer : Primitive Instance
b : 049000 : 001001 : integer : Primitive Instance
------------------------------:--------:--------:-----------------------------------:-----------------------------------:
x : 045000 : 001001 : integer : Primitive Instance
------------------------------:--------:--------:-----------------------------------:-----------------------------------:
a : 016000 : 001001 : integer : Primitive Instance
orig_a : 016000 : 001001 : integer : Primitive Instance
ret : 016000 : 001001 : llnode : Record Instance
curr : 016000 : 001001 : llnode : Record Instance
temp : 016000 : 001001 : llnode : Record Instance
------------------------------:--------:--------:-----------------------------------:-----------------------------------:
------------------------------:--------:--------:-----------------------------------:-----------------------------------:
------------------------------:--------:--------:-----------------------------------:-----------------------------------:
------------------------------:--------:--------:-----------------------------------:-----------------------------------:
------------------------------:--------:--------:-----------------------------------:-----------------------------------:
------------------------------:--------:--------:-----------------------------------:-----------------------------------:
prev : 008000 : 001001 : llnode : Record Instance
val : 008000 : 001001 : integer : Primitive Instance
next : 008000 : 001001 : llnode : Record Instance
------------------------------:--------:--------:-----------------------------------:-----------------------------------:
x : 004000 : 001001 : integer : Primitive Instance
y : 004000 : 001001 : integer : Primitive Instance

View File

@ -1,66 +1,58 @@
NAME : SCOPE : PARENT : TYPE : EXTRA ANNOTATION :
------------------------------:--------:--------:-----------------------------------:-----------------------------------:
make_list : 001001 : : undefined : Function Definition
bar2 : 001001 : : undefined : Function Definition
bar1 : 001001 : : undefined : Function Definition
foo : 001001 : : undefined : Function Definition
list : 001001 : : integer -> llnode : Type of Function
llnode : 001001 : : Record Type : elements-3 size-24 bytes
T2 : 001001 : : rec -> integer : Type of Function
T1 : 001001 : : integer -> integer : Type of Function
rec : 001001 : : Record Type : elements-2 size-8 bytes
entry : 001001 : : undefined : Function Definition
main : 001001 : : string -> integer : Type of Function
integer : 001001 : : Primitive Type : size-4 bytes
address : 001001 : : Primitive Type : size-8 bytes
character : 001001 : : Primitive Type : size-1 bytes
string : 001001 : : 1 -> character : Type of Array
Boolean : 001001 : : Primitive Type : size-4 bytes
Boolean : 001001 : : Primitive Type : size-1 bytes
reserve type : 001001 : : integer -> address : Type of Function
reserve : 001001 : : undefined : Function Definition
reserve : 001001 : : reserve type : Function not defined before runtime
release type : 001001 : : address -> integer : Type of Function
release : 001001 : : undefined : Function Definition
release : 001001 : : release type : Function not defined before runtime
main : 001001 : : string -> integer : Type of Function
entry : 001001 : : main : Function Definition that starts at line 69
rec : 001001 : : Record Type : elements-2 size-8 bytes
T1 : 001001 : : integer -> integer : Type of Function
T2 : 001001 : : rec -> integer : Type of Function
llnode : 001001 : : Record Type : elements-3 size-24 bytes
list : 001001 : : integer -> llnode : Type of Function
foo : 001001 : : T1 : Function Definition that starts at line 46
bar1 : 001001 : : T2 : Function Definition that starts at line 50
bar2 : 001001 : : T2 : Function Definition that starts at line 54
make_list : 001001 : : list : Function Definition that starts at line 16
------------------------------:--------:--------:-----------------------------------:-----------------------------------:
li : 069000 : 001001 : llnode : Record Instance
w : 069000 : 001001 : rec : Record Instance
result : 069000 : 001001 : integer : Primitive Instance
arg : 069000 : 001001 : string : Array Instance
result : 069000 : 001001 : integer : Primitive Instance
w : 069000 : 001001 : rec : Record Instance
li : 069000 : 001001 : llnode : Record Instance
------------------------------:--------:--------:-----------------------------------:-----------------------------------:
r : 054000 : 001001 : integer : Primitive Instance
s : 054000 : 001001 : integer : Primitive Instance
------------------------------:--------:--------:-----------------------------------:-----------------------------------:
x : 059012 : 054000 : integer : Primitive Instance
------------------------------:--------:--------:-----------------------------------:-----------------------------------:
: 062028 : 059012 : : Empty Scope
------------------------------:--------:--------:-----------------------------------:-----------------------------------:
: 055021 : 054000 : : Empty Scope
------------------------------:--------:--------:-----------------------------------:-----------------------------------:
: 056026 : 055021 : : Empty Scope
------------------------------:--------:--------:-----------------------------------:-----------------------------------:
a : 050000 : 001001 : integer : Primitive Instance
b : 050000 : 001001 : integer : Primitive Instance
------------------------------:--------:--------:-----------------------------------:-----------------------------------:
x : 046000 : 001001 : integer : Primitive Instance
------------------------------:--------:--------:-----------------------------------:-----------------------------------:
temp : 016000 : 001001 : address : Primitive Instance
curr : 016000 : 001001 : address : Primitive Instance
ret : 016000 : 001001 : address : Primitive Instance
orig_a : 016000 : 001001 : integer : Primitive Instance
a : 016000 : 001001 : integer : Primitive Instance
orig_a : 016000 : 001001 : integer : Primitive Instance
ret : 016000 : 001001 : llnode : Record Instance
curr : 016000 : 001001 : llnode : Record Instance
temp : 016000 : 001001 : llnode : Record Instance
------------------------------:--------:--------:-----------------------------------:-----------------------------------:
: 021012 : 016000 : : Empty Scope
------------------------------:--------:--------:-----------------------------------:-----------------------------------:
: 026023 : 021012 : : Empty Scope
------------------------------:--------:--------:-----------------------------------:-----------------------------------:
: 035020 : 026023 : : Empty Scope
------------------------------:--------:--------:-----------------------------------:-----------------------------------:
: 031034 : 026023 : : Empty Scope
------------------------------:--------:--------:-----------------------------------:-----------------------------------:
: 019029 : 016000 : : Empty Scope
------------------------------:--------:--------:-----------------------------------:-----------------------------------:
next : 008000 : 001001 : llnode : Record Instance
val : 008000 : 001001 : integer : Primitive Instance
prev : 008000 : 001001 : llnode : Record Instance
val : 008000 : 001001 : integer : Primitive Instance
next : 008000 : 001001 : llnode : Record Instance
------------------------------:--------:--------:-----------------------------------:-----------------------------------:
y : 004000 : 001001 : integer : Primitive Instance
x : 004000 : 001001 : integer : Primitive Instance
y : 004000 : 001001 : integer : Primitive Instance

View File

@ -1,22 +1,22 @@
NAME : SCOPE : PARENT : TYPE : EXTRA ANNOTATION :
------------------------------:--------:--------:-----------------------------------:-----------------------------------:
bar2 : 001001 : : undefined : Function Definition
bar1 : 001001 : : undefined : Function Definition
foo : 001001 : : undefined : Function Definition
T2 : 001001 : : rec -> integer : Type of Function
T1 : 001001 : : integer -> integer : Type of Function
rec : 001001 : : Record Type : elements-2 size-8 bytes
entry : 001001 : : undefined : Function Definition
main : 001001 : : string -> integer : Type of Function
integer : 001001 : : Primitive Type : size-4 bytes
address : 001001 : : Primitive Type : size-8 bytes
character : 001001 : : Primitive Type : size-1 bytes
string : 001001 : : 1 -> character : Type of Array
Boolean : 001001 : : Primitive Type : size-4 bytes
Boolean : 001001 : : Primitive Type : size-1 bytes
reserve type : 001001 : : integer -> address : Type of Function
reserve : 001001 : : undefined : Function Definition
reserve : 001001 : : reserve type : Function not defined before runtime
release type : 001001 : : address -> integer : Type of Function
release : 001001 : : undefined : Function Definition
release : 001001 : : release type : Function not defined before runtime
main : 001001 : : string -> integer : Type of Function
entry : 001001 : : main : Function not defined before runtime
rec : 001001 : : Record Type : elements-2 size-8 bytes
T1 : 001001 : : integer -> integer : Type of Function
T2 : 001001 : : rec -> integer : Type of Function
foo : 001001 : : T1 : Function Definition that starts at line 1
bar1 : 001001 : : T2 : Function Definition that starts at line 1
bar2 : 001001 : : T2 : Function not defined before runtime
------------------------------:--------:--------:-----------------------------------:-----------------------------------:
: 000000 : 001001 : : Empty Scope
------------------------------:--------:--------:-----------------------------------:-----------------------------------:
@ -25,5 +25,5 @@ undefined : 001000 : 001001 : integer
------------------------------:--------:--------:-----------------------------------:-----------------------------------:
x : 001000 : 001001 : integer : Primitive Instance
------------------------------:--------:--------:-----------------------------------:-----------------------------------:
y : 001000 : 001001 : integer : Primitive Instance
x : 001000 : 001001 : integer : Primitive Instance
y : 001000 : 001001 : integer : Primitive Instance

View File

@ -1,23 +1,23 @@
NAME : SCOPE : PARENT : TYPE : EXTRA ANNOTATION :
------------------------------:--------:--------:-----------------------------------:-----------------------------------:
entry : 001001 : : undefined : Function Definition
rec : 001001 : : Record Type : elements-2 size-8 bytes
main : 001001 : : string -> integer : Type of Function
integer : 001001 : : Primitive Type : size-4 bytes
address : 001001 : : Primitive Type : size-8 bytes
character : 001001 : : Primitive Type : size-1 bytes
string : 001001 : : 1 -> character : Type of Array
Boolean : 001001 : : Primitive Type : size-4 bytes
Boolean : 001001 : : Primitive Type : size-1 bytes
reserve type : 001001 : : integer -> address : Type of Function
reserve : 001001 : : undefined : Function Definition
reserve : 001001 : : reserve type : Function not defined before runtime
release type : 001001 : : address -> integer : Type of Function
release : 001001 : : undefined : Function Definition
release : 001001 : : release type : Function not defined before runtime
main : 001001 : : string -> integer : Type of Function
rec : 001001 : : Record Type : elements-2 size-8 bytes
entry : 001001 : : main : Function Definition that starts at line 6
------------------------------:--------:--------:-----------------------------------:-----------------------------------:
arg_bool : 006000 : 001001 : Boolean : Primitive Instance
arg_record : 006000 : 001001 : rec : Record Instance
arg_y : 006000 : 001001 : integer : Primitive Instance
arg_x : 006000 : 001001 : integer : Primitive Instance
arg : 006000 : 001001 : string : Array Instance
arg_x : 006000 : 001001 : integer : Primitive Instance
arg_y : 006000 : 001001 : integer : Primitive Instance
arg_record : 006000 : 001001 : rec : Record Instance
arg_bool : 006000 : 001001 : Boolean : Primitive Instance
------------------------------:--------:--------:-----------------------------------:-----------------------------------:
rec_y : 002000 : 001001 : integer : Primitive Instance
rec_x : 002000 : 001001 : integer : Primitive Instance
rec_y : 002000 : 001001 : integer : Primitive Instance

View File

@ -1,16 +1,16 @@
NAME : SCOPE : PARENT : TYPE : EXTRA ANNOTATION :
------------------------------:--------:--------:-----------------------------------:-----------------------------------:
entry : 001001 : : undefined : Function Definition
main : 001001 : : string -> integer : Type of Function
integer : 001001 : : Primitive Type : size-4 bytes
address : 001001 : : Primitive Type : size-8 bytes
character : 001001 : : Primitive Type : size-1 bytes
string : 001001 : : 1 -> character : Type of Array
Boolean : 001001 : : Primitive Type : size-4 bytes
Boolean : 001001 : : Primitive Type : size-1 bytes
reserve type : 001001 : : integer -> address : Type of Function
reserve : 001001 : : undefined : Function Definition
reserve : 001001 : : reserve type : Function not defined before runtime
release type : 001001 : : address -> integer : Type of Function
release : 001001 : : undefined : Function Definition
release : 001001 : : release type : Function not defined before runtime
main : 001001 : : string -> integer : Type of Function
entry : 001001 : : main : Function Definition that starts at line 4
------------------------------:--------:--------:-----------------------------------:-----------------------------------:
x : 004000 : 001001 : integer : Primitive Instance
arg : 004000 : 001001 : string : Array Instance
x : 004000 : 001001 : integer : Primitive Instance

View File

@ -1,17 +1,16 @@
NAME : SCOPE : PARENT : TYPE : EXTRA ANNOTATION :
------------------------------:--------:--------:-----------------------------------:-----------------------------------:
a_of_s : 001001 : : 1 -> string : Type of Array
string : 001001 : : 1 -> character : Type of Array
integer : 001001 : : Primitive Type : size-4 bytes
address : 001001 : : Primitive Type : size-8 bytes
character : 001001 : : Primitive Type : size-1 bytes
string : 001001 : : 1 -> character : Type of Array
Boolean : 001001 : : Primitive Type : size-4 bytes
Boolean : 001001 : : Primitive Type : size-1 bytes
reserve type : 001001 : : integer -> address : Type of Function
reserve : 001001 : : undefined : Function Definition
reserve : 001001 : : reserve type : Function not defined before runtime
release type : 001001 : : address -> integer : Type of Function
release : 001001 : : undefined : Function Definition
release : 001001 : : release type : Function not defined before runtime
a_of_s : 001001 : : 1 -> string : Type of Array
------------------------------:--------:--------:-----------------------------------:-----------------------------------:
many_names : 006000 : 001001 : a_of_s : Array Instance
another_name : 006000 : 001001 : string : Array Instance
one_name : 006000 : 001001 : string : Array Instance
another_name : 006000 : 001001 : string : Array Instance
many_names : 006000 : 001001 : a_of_s : Array Instance

View File

@ -1,21 +0,0 @@
NAME : SCOPE : PARENT : TYPE : EXTRA ANNOTATION :
------------------------------:--------:--------:-----------------------------------:-----------------------------------:
T2 : 001001 : : rec -> integer : Type of Function
rec : 001001 : : Record Type : elements-2 size-8 bytes
entry : 001001 : : undefined : Function Definition
main : 001001 : : string -> integer : Type of Function
integer : 001001 : : Primitive Type : size-4 bytes
address : 001001 : : Primitive Type : size-8 bytes
character : 001001 : : Primitive Type : size-1 bytes
string : 001001 : : 1 -> character : Type of Array
Boolean : 001001 : : Primitive Type : size-4 bytes
reserve type : 001001 : : integer -> address : Type of Function
reserve : 001001 : : undefined : Function Definition
release type : 001001 : : address -> integer : Type of Function
release : 001001 : : undefined : Function Definition
------------------------------:--------:--------:-----------------------------------:-----------------------------------:
w : 007000 : 001001 : rec : Record Instance
arg : 007000 : 001001 : string : Array Instance
------------------------------:--------:--------:-----------------------------------:-----------------------------------:
y : 004000 : 001001 : integer : Primitive Instance
x : 004000 : 001001 : integer : Primitive Instance

View File

@ -1,19 +1,13 @@
NAME : SCOPE : PARENT : TYPE : EXTRA ANNOTATION :
------------------------------:--------:--------:-----------------------------------:-----------------------------------:
entry : 001001 : : undefined : Function Definition
main : 001001 : : string -> integer : Type of Function
integer : 001001 : : Primitive Type : size-4 bytes
address : 001001 : : Primitive Type : size-8 bytes
character : 001001 : : Primitive Type : size-1 bytes
string : 001001 : : 1 -> character : Type of Array
Boolean : 001001 : : Primitive Type : size-4 bytes
Boolean : 001001 : : Primitive Type : size-1 bytes
reserve type : 001001 : : integer -> address : Type of Function
reserve : 001001 : : undefined : Function Definition
reserve : 001001 : : reserve type : Function not defined before runtime
release type : 001001 : : address -> integer : Type of Function
release : 001001 : : undefined : Function Definition
release : 001001 : : release type : Function not defined before runtime
------------------------------:--------:--------:-----------------------------------:-----------------------------------:
bool : 015000 : 001001 : Boolean : Primitive Instance
char : 015000 : 001001 : character : Primitive Instance
add : 015000 : 001001 : address : Primitive Instance
i : 015000 : 001001 : integer : Primitive Instance
arg : 015000 : 001001 : string : Array Instance
: 000000 : 001001 : : Empty Scope

View File

@ -1,3 +1,4 @@
(* TEST: [-st] *)
type rec: [integer: x; integer: y]
type T1: integer -> integer

View File

@ -1,3 +1,4 @@
(* TEST: [-st] *)
type Boolean2Boolean: Boolean -> Boolean
type integer2integer: integer -> integer
type character2integer: character -> integer

View File

@ -1,3 +1,4 @@
(* TEST: [-st] *)
type main: string -> integer
function entry: main
type testarr : 1 -> integer

View File

@ -1,3 +1,4 @@
(* TEST: [-st] *)
type rec: [integer: x; integer: y]
type main: rec -> integer
function test: main

View File

@ -1,3 +1,4 @@
(* TEST: [-st] *)
type main: string -> integer
function entry: main

View File

@ -1,3 +1,4 @@
(* TEST: [-st] *)
type rec: [integer: x; integer: y]
entry (arg) := {

View File

@ -1,3 +1,4 @@
(* TEST: [-st] *)
(*
At compiler start-up your program should create symbol table entries for the four primitive types:
Boolean (1 byte)

View File

@ -1,3 +1,4 @@
(* TEST: [-st] *)
type main: string -> integer
function entry: main

View File

@ -1,3 +1,4 @@
(* TEST: [-st] *)
type main: string -> integer
function entry: main

View File

@ -1 +1,2 @@
(* TEST: [-st] *)
type main: string -> integer function entry: main type rec: [integer: x; integer: y] type T1: integer -> integer type T2: rec -> integer function foo : T1 function bar1 : T2 function bar2 : T2 foo(x) := { return x * x; } bar1(a) := { return a.x * a.y; } bar2 as (r,s) := { return r * s; } entry(arg) := { [ integer: result ; rec: w] result := foo(5); w := reserve w; w.x := 5; w.y := 7; result := bar1(w); result := bar2(5,7); return 0; }

View File

@ -1,3 +1,4 @@
(* TEST: [-st] *)
type main: string -> integer
type rec: [integer: rec_x; integer: rec_y]

View File

@ -1,3 +1,4 @@
(* TEST: [-st] *)
type main: string -> integer
function entry: main

View File

@ -1,3 +1,4 @@
(* TEST: [-st] *)
type string: 1 -> character
type a_of_s: 1 -> string

View File

@ -1,16 +0,0 @@
type string: 1 -> character
type a_of_s: 1 -> string
(* maybe some other type definitions *)
entry(arg) := {
[ string: one_name; string: another_name; a_of_s: many_names ]
another_name := reserve another_name(4); (* reserve space for an an array of character, with 4 members *)
many_names := reserve a_of_s(3);
many_names(0) := one_name;
many_names(1) := another_name;
many_names(2) := reserve a_of_s(2)(6); (* reserve space for an item of the same type as a_of_s(2), an array of character, with 6 members *)
many_names(2)(0) := "P";
return 0;
}

View File

@ -1,4 +1,5 @@
type main: string -> integer
(* TEST: [-st] *)
ype main: string -> integer
function entry: main
type rec: [integer: x; integer: y]

View File

@ -0,0 +1,92 @@
001: type rec: [integer: x; integer: y]
002: type main: rec -> integer
003: function test: main
004:
005: test (arg) := {
006: [integer:x; Boolean: b]
007: while (true) {
008: x := 0;
LINE (8:9) ** TYPE ERROR: Assignable Assign Expression - Object undefined of type undefined != Object $t1 of type integer
LINE (8:9) ** TYPE ERROR: Invalid type passed to assignable.
LINE (8:3) ** TYPE ERROR: Undefined variable x
009: }
010:
011: while (7) {
012: x := 1;
LINE (12:9) ** TYPE ERROR: Assignable Assign Expression - Object undefined of type undefined != Object $t3 of type integer
LINE (12:9) ** TYPE ERROR: Invalid type passed to assignable.
LINE (12:3) ** TYPE ERROR: Undefined variable x
013: }
014:
015: if (true) then {
016: x := 1;
LINE (16:9) ** TYPE ERROR: Assignable Assign Expression - Object undefined of type undefined != Object $t5 of type integer
LINE (16:9) ** TYPE ERROR: Invalid type passed to assignable.
LINE (16:3) ** TYPE ERROR: Undefined variable x
017: } else {
018: x := 0;
LINE (18:9) ** TYPE ERROR: Assignable Assign Expression - Object undefined of type undefined != Object $t6 of type integer
LINE (18:9) ** TYPE ERROR: Invalid type passed to assignable.
LINE (18:3) ** TYPE ERROR: Undefined variable x
019: }
020:
021: if (x) then {
LINE (21:6) ** TYPE ERROR: Undefined variable x
022: x := 0;
LINE (22:9) ** TYPE ERROR: Assignable Assign Expression - Object undefined of type undefined != Object $t7 of type integer
LINE (22:9) ** TYPE ERROR: Invalid type passed to assignable.
LINE (22:3) ** TYPE ERROR: Undefined variable x
023: } else {
024: x := 1;
LINE (24:9) ** TYPE ERROR: Assignable Assign Expression - Object undefined of type undefined != Object $t8 of type integer
LINE (24:9) ** TYPE ERROR: Invalid type passed to assignable.
LINE (24:3) ** TYPE ERROR: Undefined variable x
025: }
026:
027: b := b | b;
LINE (27:12) ** TYPE ERROR: Invalid type passed to assignable.
LINE (27:12) ** TYPE ERROR: Object undefined of type undefined and Object undefined of type undefined must both be Boolean
LINE (27:11) ** TYPE ERROR: Undefined variable b
LINE (27:7) ** TYPE ERROR: Undefined variable b
LINE (27:2) ** TYPE ERROR: Undefined variable b
028: b := b & b;
LINE (28:12) ** TYPE ERROR: Invalid type passed to assignable.
LINE (28:12) ** TYPE ERROR: Object undefined of type undefined and Object undefined of type undefined must both be Boolean
LINE (28:11) ** TYPE ERROR: Undefined variable b
LINE (28:7) ** TYPE ERROR: Undefined variable b
LINE (28:2) ** TYPE ERROR: Undefined variable b
029: b := 1 | b;
LINE (29:12) ** TYPE ERROR: Invalid type passed to assignable.
LINE (29:12) ** TYPE ERROR: Object $t9 of type integer and Object undefined of type undefined must both be Boolean
LINE (29:11) ** TYPE ERROR: Undefined variable b
LINE (29:2) ** TYPE ERROR: Undefined variable b
030: b := b | 1;
LINE (30:12) ** TYPE ERROR: Invalid type passed to assignable.
LINE (30:12) ** TYPE ERROR: Object undefined of type undefined and Object $t10 of type integer must both be Boolean
LINE (30:7) ** TYPE ERROR: Undefined variable b
LINE (30:2) ** TYPE ERROR: Undefined variable b
031: b := b & 1;
LINE (31:12) ** TYPE ERROR: Invalid type passed to assignable.
LINE (31:12) ** TYPE ERROR: Object undefined of type undefined and Object $t11 of type integer must both be Boolean
LINE (31:7) ** TYPE ERROR: Undefined variable b
LINE (31:2) ** TYPE ERROR: Undefined variable b
032: b := 1 & b;
LINE (32:12) ** TYPE ERROR: Invalid type passed to assignable.
LINE (32:12) ** TYPE ERROR: Object $t12 of type integer and Object undefined of type undefined must both be Boolean
LINE (32:11) ** TYPE ERROR: Undefined variable b
LINE (32:2) ** TYPE ERROR: Undefined variable b
033: b := 1 = 1;
LINE (33:12) ** TYPE ERROR: Assignable Assign Expression - Object undefined of type undefined != Object $t15 of type Boolean
LINE (33:12) ** TYPE ERROR: Invalid type passed to assignable.
LINE (33:2) ** TYPE ERROR: Undefined variable b
034:
035:
036:
037: b := 1 = b;
LINE (37:12) ** TYPE ERROR: Invalid type passed to assignable.
LINE (37:12) ** TYPE ERROR: Object $t16 of type integer and Object undefined of type undefined must both be the same type
LINE (37:11) ** TYPE ERROR: Undefined variable b
LINE (37:2) ** TYPE ERROR: Undefined variable b
038:
039: return 0;
040: }

View File

@ -1,50 +0,0 @@
001: type rec: [integer: x; integer: y]
002: type main: rec -> integer
003: function test: main
004:
005: test (arg) := {
006: [integer:x; Boolean: b]
007: while (true) {
008: x := 0;
009: }
010:
011: while (7) {
012: x := 1;
013: }
014:
015: if (true) then {
016: x := 1;
017: } else {
018: x := 0;
019: }
020:
021: if (x) then {
022: x := 0;
023: } else {
024: x := 1;
025: }
026:
027: b := b | b;
028: b := b & b;
029: b := 1 | b;
LINE (29:12) ** TYPE ERROR: b != undefined
030: b := b | 1;
LINE (30:12) ** TYPE ERROR: b != undefined
031: b := b & 1;
LINE (31:12) ** TYPE ERROR: b != undefined
032: b := 1 & b;
LINE (32:12) ** TYPE ERROR: b != undefined
033: b := 1 = 1;
034:
035:
036:
037: b := 1 = b;
LINE (37:12) ** TYPE ERROR: b != undefined
038:
039: return 0;
040: }

View File

@ -0,0 +1,17 @@
001: type main: string -> integer
002: function entry: main
003:
004: entry (arg) := {
005: [integer:x; address: arr; address: arr2; Boolean : b2; Boolean : b1]
006:
007: b2 := 3 < x;
008: b1 := arr = 2;
LINE (8:18) ** TYPE ERROR: Assignable Assign Expression - Object b1 of type Boolean != Object undefined of type undefined
LINE (8:18) ** TYPE ERROR: Object arr of type address and Object $t2 of type integer must both be the same type
009: b1 := 6<7 & arr2=7;
LINE (9:23) ** TYPE ERROR: Assignable Assign Expression - Object b1 of type Boolean != Object undefined of type undefined
LINE (9:23) ** TYPE ERROR: Object $t5 of type Boolean and Object undefined of type undefined must both be Boolean
LINE (9:23) ** TYPE ERROR: Object arr2 of type address and Object $t6 of type integer must both be the same type
010:
011: return 0;
012: }

View File

@ -1,16 +0,0 @@
001: type main: string -> integer
002: function entry: main
003:
004: entry (arg) := {
005: [integer:x; address: arr; address: arr2; Boolean : b2; Boolean : b1]
006:
007: b2 := 3 < x;
008: b1 := arr = 2;
LINE (8:18) ** TYPE ERROR: b1 != undefined
009: b1 := 6<7 & arr2=7;
LINE (9:23) ** TYPE ERROR: b1 != undefined
010:
011: return 0;
012: }

View File

@ -6,8 +6,8 @@
006:
007: b2 := !(3 < 2);
008: b1 := !5;
LINE (8:13) ** TYPE ERROR: b1 != undefined
LINE (8:13) ** TYPE ERROR: Assignable Assign Expression - Object b1 of type Boolean != Object undefined of type undefined
LINE (8:12) ** TYPE ERROR: Object $t4 of type integer is not of type Boolean and can't be negated
009:
010: return 0;
011: }

Some files were not shown because too many files have changed in this diff Show More