updated expected
This commit is contained in:
@ -1,34 +1,50 @@
|
|||||||
NAME : SCOPE : PARENT : TYPE : EXTRA ANNOTATION :
|
001: type rec: [integer: x; integer: y]
|
||||||
------------------------------:--------:--------:-----------------------------------:-----------------------------------:
|
002: type main: rec -> integer
|
||||||
test : 001001 : : undefined : Function Definition
|
003: function test: main
|
||||||
main : 001001 : : rec -> integer : Type of Function
|
004:
|
||||||
rec : 001001 : : Record Type : elements-2 size-8 bytes
|
005: test (arg) := {
|
||||||
integer : 001001 : : Primitive Type : size-4 bytes
|
006: [integer:x; Boolean: b]
|
||||||
address : 001001 : : Primitive Type : size-8 bytes
|
007: while (true) {
|
||||||
character : 001001 : : Primitive Type : size-1 bytes
|
008: x := 0;
|
||||||
string : 001001 : : 1 -> character : Type of Array
|
009: }
|
||||||
Boolean : 001001 : : Primitive Type : size-4 bytes
|
010:
|
||||||
reserve type : 001001 : : integer -> address : Type of Function
|
011: while (7) {
|
||||||
reserve : 001001 : : undefined : Function Definition
|
012: x := 1;
|
||||||
release type : 001001 : : address -> integer : Type of Function
|
013: }
|
||||||
release : 001001 : : undefined : Function Definition
|
014:
|
||||||
------------------------------:--------:--------:-----------------------------------:-----------------------------------:
|
015: if (true) then {
|
||||||
b : 005000 : 001001 : Boolean : Primitive Instance
|
016: x := 1;
|
||||||
x : 005000 : 001001 : integer : Primitive Instance
|
017: } else {
|
||||||
arg : 005000 : 001001 : integer : Primitive Instance
|
018: x := 0;
|
||||||
undefined : 005000 : 001001 : integer : Primitive Instance
|
019: }
|
||||||
------------------------------:--------:--------:-----------------------------------:-----------------------------------:
|
020:
|
||||||
: 023009 : 005000 : : Empty Scope
|
021: if (x) then {
|
||||||
------------------------------:--------:--------:-----------------------------------:-----------------------------------:
|
022: x := 0;
|
||||||
: 021014 : 005000 : : Empty Scope
|
023: } else {
|
||||||
------------------------------:--------:--------:-----------------------------------:-----------------------------------:
|
024: x := 1;
|
||||||
: 017009 : 005000 : : Empty Scope
|
025: }
|
||||||
------------------------------:--------:--------:-----------------------------------:-----------------------------------:
|
026:
|
||||||
: 015017 : 005000 : : Empty Scope
|
027: b := b | b;
|
||||||
------------------------------:--------:--------:-----------------------------------:-----------------------------------:
|
028: b := b & b;
|
||||||
: 011012 : 005000 : : Empty Scope
|
029: b := 1 | b;
|
||||||
------------------------------:--------:--------:-----------------------------------:-----------------------------------:
|
LINE (29:12) ** TYPE ERROR: b != undefined
|
||||||
: 007015 : 005000 : : Empty Scope
|
|
||||||
------------------------------:--------:--------:-----------------------------------:-----------------------------------:
|
030: b := b | 1;
|
||||||
y : 001000 : 001001 : integer : Primitive Instance
|
LINE (30:12) ** TYPE ERROR: b != undefined
|
||||||
x : 001000 : 001001 : integer : Primitive Instance
|
|
||||||
|
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: }
|
||||||
|
@ -1,20 +1,16 @@
|
|||||||
NAME : SCOPE : PARENT : TYPE : EXTRA ANNOTATION :
|
001: type main: string -> integer
|
||||||
------------------------------:--------:--------:-----------------------------------:-----------------------------------:
|
002: function entry: main
|
||||||
entry : 001001 : : undefined : Function Definition
|
003:
|
||||||
main : 001001 : : string -> integer : Type of Function
|
004: entry (arg) := {
|
||||||
integer : 001001 : : Primitive Type : size-4 bytes
|
005: [integer:x; address: arr; address: arr2; Boolean : b2; Boolean : b1]
|
||||||
address : 001001 : : Primitive Type : size-8 bytes
|
006:
|
||||||
character : 001001 : : Primitive Type : size-1 bytes
|
007: b2 := 3 < x;
|
||||||
string : 001001 : : 1 -> character : Type of Array
|
008: b1 := arr = 2;
|
||||||
Boolean : 001001 : : Primitive Type : size-4 bytes
|
LINE (8:18) ** TYPE ERROR: b1 != undefined
|
||||||
reserve type : 001001 : : integer -> address : Type of Function
|
|
||||||
reserve : 001001 : : undefined : Function Definition
|
009: b1 := 6<7 & arr2=7;
|
||||||
release type : 001001 : : address -> integer : Type of Function
|
LINE (9:23) ** TYPE ERROR: b1 != undefined
|
||||||
release : 001001 : : undefined : Function Definition
|
|
||||||
------------------------------:--------:--------:-----------------------------------:-----------------------------------:
|
010:
|
||||||
b1 : 004000 : 001001 : Boolean : Primitive Instance
|
011: return 0;
|
||||||
b2 : 004000 : 001001 : Boolean : Primitive Instance
|
012: }
|
||||||
arr2 : 004000 : 001001 : address : Primitive Instance
|
|
||||||
arr : 004000 : 001001 : address : Primitive Instance
|
|
||||||
x : 004000 : 001001 : integer : Primitive Instance
|
|
||||||
arg : 004000 : 001001 : string : Array Instance
|
|
||||||
|
@ -1,20 +1,13 @@
|
|||||||
NAME : SCOPE : PARENT : TYPE : EXTRA ANNOTATION :
|
001: type main: string -> integer
|
||||||
------------------------------:--------:--------:-----------------------------------:-----------------------------------:
|
002: function entry: main
|
||||||
entry : 001001 : : undefined : Function Definition
|
003:
|
||||||
main : 001001 : : string -> integer : Type of Function
|
004: entry (arg) := {
|
||||||
integer : 001001 : : Primitive Type : size-4 bytes
|
005: [integer:x; address: arr; address: arr2; Boolean : b2; Boolean : b1]
|
||||||
address : 001001 : : Primitive Type : size-8 bytes
|
006:
|
||||||
character : 001001 : : Primitive Type : size-1 bytes
|
007: b2 := !(3 < 2);
|
||||||
string : 001001 : : 1 -> character : Type of Array
|
008: b1 := !5;
|
||||||
Boolean : 001001 : : Primitive Type : size-4 bytes
|
LINE (8:13) ** TYPE ERROR: b1 != undefined
|
||||||
reserve type : 001001 : : integer -> address : Type of Function
|
|
||||||
reserve : 001001 : : undefined : Function Definition
|
009:
|
||||||
release type : 001001 : : address -> integer : Type of Function
|
010: return 0;
|
||||||
release : 001001 : : undefined : Function Definition
|
011: }
|
||||||
------------------------------:--------:--------:-----------------------------------:-----------------------------------:
|
|
||||||
b1 : 004000 : 001001 : Boolean : Primitive Instance
|
|
||||||
b2 : 004000 : 001001 : Boolean : Primitive Instance
|
|
||||||
arr2 : 004000 : 001001 : address : Primitive Instance
|
|
||||||
arr : 004000 : 001001 : address : Primitive Instance
|
|
||||||
x : 004000 : 001001 : integer : Primitive Instance
|
|
||||||
arg : 004000 : 001001 : string : Array Instance
|
|
||||||
|
@ -1,26 +1,25 @@
|
|||||||
NAME : SCOPE : PARENT : TYPE : EXTRA ANNOTATION :
|
001: type main: string -> integer
|
||||||
------------------------------:--------:--------:-----------------------------------:-----------------------------------:
|
002:
|
||||||
entry : 001001 : : undefined : Function Definition
|
003: type rec: [integer: x; integer: y]
|
||||||
rec : 001001 : : Record Type : elements-2 size-8 bytes
|
004: function entry: main
|
||||||
main : 001001 : : string -> integer : Type of Function
|
005:
|
||||||
integer : 001001 : : Primitive Type : size-4 bytes
|
006: entry (arg) := {
|
||||||
address : 001001 : : Primitive Type : size-8 bytes
|
007: [integer:x; address: arr; address: arr2; Boolean : b2; Boolean : b1; character : a; rec : r]
|
||||||
character : 001001 : : Primitive Type : size-1 bytes
|
008:
|
||||||
string : 001001 : : 1 -> character : Type of Array
|
009: x := 3 + 2 * 8;
|
||||||
Boolean : 001001 : : Primitive Type : size-4 bytes
|
010: x := 3 - 2 / 8;
|
||||||
reserve type : 001001 : : integer -> address : Type of Function
|
011: x := a * 2 % 8;
|
||||||
reserve : 001001 : : undefined : Function Definition
|
LINE (11:20) ** TYPE ERROR: x != undefined
|
||||||
release type : 001001 : : address -> integer : Type of Function
|
|
||||||
release : 001001 : : undefined : Function Definition
|
012: b2 := 3 * 2 % 8;
|
||||||
------------------------------:--------:--------:-----------------------------------:-----------------------------------:
|
013: x := 3 % 2 * 8;
|
||||||
r : 006000 : 001001 : rec : Record Instance
|
014: x := 3 + arr - 8;
|
||||||
a : 006000 : 001001 : character : Primitive Instance
|
LINE (14:22) ** TYPE ERROR: x != undefined
|
||||||
b1 : 006000 : 001001 : Boolean : Primitive Instance
|
|
||||||
b2 : 006000 : 001001 : Boolean : Primitive Instance
|
015: x := r.x;
|
||||||
arr2 : 006000 : 001001 : address : Primitive Instance
|
LINE (15:10) ** TYPE ERROR: x != r
|
||||||
arr : 006000 : 001001 : address : Primitive Instance
|
|
||||||
x : 006000 : 001001 : integer : Primitive Instance
|
016: x := a.x;
|
||||||
arg : 006000 : 001001 : string : Array Instance
|
017:
|
||||||
------------------------------:--------:--------:-----------------------------------:-----------------------------------:
|
018: return 0;
|
||||||
y : 003000 : 001001 : integer : Primitive Instance
|
019: }
|
||||||
x : 003000 : 001001 : integer : Primitive Instance
|
|
||||||
|
@ -1,20 +1,14 @@
|
|||||||
NAME : SCOPE : PARENT : TYPE : EXTRA ANNOTATION :
|
001: type main: string -> integer
|
||||||
------------------------------:--------:--------:-----------------------------------:-----------------------------------:
|
002: function entry: main
|
||||||
entry : 001001 : : undefined : Function Definition
|
003:
|
||||||
main : 001001 : : string -> integer : Type of Function
|
004: entry (arg) := {
|
||||||
integer : 001001 : : Primitive Type : size-4 bytes
|
005: [integer:x; address: arr; address: arr2; Boolean : b2; Boolean : b1]
|
||||||
address : 001001 : : Primitive Type : size-8 bytes
|
006:
|
||||||
character : 001001 : : Primitive Type : size-1 bytes
|
007: x := -8;
|
||||||
string : 001001 : : 1 -> character : Type of Array
|
008: x := -b1;
|
||||||
Boolean : 001001 : : Primitive Type : size-4 bytes
|
LINE (8:10) ** TYPE ERROR: x != undefined
|
||||||
reserve type : 001001 : : integer -> address : Type of Function
|
|
||||||
reserve : 001001 : : undefined : Function Definition
|
009: b2 := -x;
|
||||||
release type : 001001 : : address -> integer : Type of Function
|
010:
|
||||||
release : 001001 : : undefined : Function Definition
|
011: return 0;
|
||||||
------------------------------:--------:--------:-----------------------------------:-----------------------------------:
|
012: }
|
||||||
b1 : 004000 : 001001 : Boolean : Primitive Instance
|
|
||||||
b2 : 004000 : 001001 : Boolean : Primitive Instance
|
|
||||||
arr2 : 004000 : 001001 : address : Primitive Instance
|
|
||||||
arr : 004000 : 001001 : address : Primitive Instance
|
|
||||||
x : 004000 : 001001 : integer : Primitive Instance
|
|
||||||
arg : 004000 : 001001 : string : Array Instance
|
|
||||||
|
@ -6,12 +6,13 @@ type main: string -> integer
|
|||||||
function entry: main
|
function entry: main
|
||||||
function bar: T2
|
function bar: T2
|
||||||
|
|
||||||
bar2 (r,s) := {
|
bar (r,s) := {
|
||||||
return r;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
entry (arg) := {
|
entry (arg) := {
|
||||||
[ integer: result ; rec: w]
|
[ integer: result ; rec: w]
|
||||||
|
result := bar(1,2);
|
||||||
result := bar('c', 7);
|
result := bar('c', 7);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
@ -1,17 +0,0 @@
|
|||||||
type rec: [character: x; integer: y]
|
|
||||||
|
|
||||||
type T2: rec -> integer
|
|
||||||
|
|
||||||
type main: string -> integer
|
|
||||||
function entry: main
|
|
||||||
function bar: T2
|
|
||||||
|
|
||||||
bar2 (r,s) := {
|
|
||||||
return s;
|
|
||||||
}
|
|
||||||
|
|
||||||
entry (arg) := {
|
|
||||||
[ integer: result ; rec: w]
|
|
||||||
result := bar('c', 7);
|
|
||||||
return 0;
|
|
||||||
}
|
|
Reference in New Issue
Block a user