1267 - 'routine-state' can use the provided routine id

This commit is contained in:
Kartik K. Agaram 2015-05-05 17:54:46 -07:00
parent 6d17ef493b
commit 82ceda30ad
63 changed files with 396 additions and 322 deletions

View File

@ -24,7 +24,7 @@ after-brace/0: memory-should-contain ...
new/0: routine allocated memory from 1000 to 101000
schedule/0: array-from-args
run/0: instruction array-from-args/0
run/0: run/43 {name: "
run/0: run/44 {name: "
1:address:array:location <- init-array 0:literal, 1:literal, 2:literal
2:array:location <- copy 1:address:array:location/deref
", value: 0, type: 0, properties: ["
@ -45,7 +45,7 @@ after-brace/0: copy ...
run/0: instruction run1001/0
run/0: {name: "1", value: 1, type: 2-5-1, properties: ["1": "address":"array":"location"]} <- init-array/114 {name: "0", value: 0, type: 0, properties: ["0": "literal"]}, {name: "1", value: 1, type: 0, properties: ["1": "literal"]}, {name: "2", value: 2, type: 0, properties: ["2": "literal"]}
run/0: instruction init-array/0
run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new/42 {name: "location", value: 1, type: 0, properties: ["location": "type"]}, {name: "30", value: 30, type: 0, properties: ["30": "literal"]}
run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new/43 {name: "location", value: 1, type: 0, properties: ["location": "type"]}, {name: "30", value: 30, type: 0, properties: ["30": "literal"]}
mem/0: array size is 30
mem/0: new alloc: 1000
run/0: instruction init-array/1
@ -125,7 +125,7 @@ run/0: ingredient 0 is 0
run/0: ingredient 1 is
run/0: jumping to instruction 7
run/0: instruction init-array/8
run/0: {name: "result", value: 4, type: 2-5-1, properties: ["result": "address":"array":"location"]} <- new/42 {name: "location", value: 1, type: 0, properties: ["location": "type"]}, {name: "capacity", value: 1, type: 1, properties: ["capacity": "integer"]}
run/0: {name: "result", value: 4, type: 2-5-1, properties: ["result": "address":"array":"location"]} <- new/43 {name: "location", value: 1, type: 0, properties: ["location": "type"]}, {name: "capacity", value: 1, type: 1, properties: ["capacity": "integer"]}
mem/0: location 1002 is 3
mem/0: array size is 3
mem/0: new alloc: 1031
@ -312,7 +312,7 @@ mem/0: storing 0 in location 3
mem/0: storing 1 in location 4
mem/0: storing 2 in location 5
run/0: instruction array-from-args/1
run/0: memory-should-contain/44 {name: "
run/0: memory-should-contain/45 {name: "
2 <- 3 # array length
3 <- 0
4 <- 1

View File

@ -116,7 +116,7 @@ after-brace/0: memory-should-contain ...
new/0: routine allocated memory from 1000 to 101000
schedule/0: buffer-append-works
run/0: instruction buffer-append-works/0
run/0: run/43 {name: "
run/0: run/44 {name: "
default-space:address:array:location <- new location:type, 30:literal
x:address:buffer <- init-buffer 3:literal
s1:address:array:character <- get x:address:buffer/deref, data:offset
@ -270,17 +270,17 @@ after-brace/0: equal ...
after-brace/0: get ...
after-brace/0: copy ...
run/0: instruction run1001/0
run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new/42 {name: "location", value: 1, type: 0, properties: ["location": "type"]}, {name: "30", value: 30, type: 0, properties: ["30": "literal"]}
run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new/43 {name: "location", value: 1, type: 0, properties: ["location": "type"]}, {name: "30", value: 30, type: 0, properties: ["30": "literal"]}
mem/0: array size is 30
mem/0: new alloc: 1000
run/0: instruction run1001/1
run/0: {name: "x", value: 1, type: 2-9, properties: ["x": "address":"buffer"]} <- init-buffer/101 {name: "3", value: 3, type: 0, properties: ["3": "literal"]}
run/0: instruction init-buffer/0
run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new/42 {name: "location", value: 1, type: 0, properties: ["location": "type"]}, {name: "30", value: 30, type: 0, properties: ["30": "literal"]}
run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new/43 {name: "location", value: 1, type: 0, properties: ["location": "type"]}, {name: "30", value: 30, type: 0, properties: ["30": "literal"]}
mem/0: array size is 30
mem/0: new alloc: 1031
run/0: instruction init-buffer/1
run/0: {name: "result", value: 1, type: 2-9, properties: ["result": "address":"buffer"]} <- new/42 {name: "buffer", value: 9, type: 0, properties: ["buffer": "type"]}
run/0: {name: "result", value: 1, type: 2-9, properties: ["result": "address":"buffer"]} <- new/43 {name: "buffer", value: 9, type: 0, properties: ["buffer": "type"]}
mem/0: new alloc: 1062
mem/0: storing 1062 in location 1033
run/0: instruction init-buffer/2
@ -309,7 +309,7 @@ run/0: {name: "capacity", value: 4, type: 1, properties: ["capacity": "integer"]
run/0: product 0 is 3
mem/0: storing 3 in location 1036
run/0: instruction init-buffer/6
run/0: {name: "s", value: 3, type: 2-2-5-4, properties: ["s": "address":"address":"array":"character", "deref": ]} <- new/42 {name: "character", value: 4, type: 0, properties: ["character": "type"]}, {name: "capacity", value: 4, type: 1, properties: ["capacity": "integer"]}
run/0: {name: "s", value: 3, type: 2-2-5-4, properties: ["s": "address":"address":"array":"character", "deref": ]} <- new/43 {name: "character", value: 4, type: 0, properties: ["character": "type"]}, {name: "capacity", value: 4, type: 1, properties: ["capacity": "integer"]}
mem/0: location 1036 is 3
mem/0: array size is 3
mem/0: new alloc: 1064
@ -334,7 +334,7 @@ run/0: instruction run1001/3
run/0: {name: "x", value: 1, type: 2-9, properties: ["x": "address":"buffer"]} <- buffer-append/104 {name: "x", value: 1, type: 2-9, properties: ["x": "address":"buffer"]}, {name: "97", value: 97, type: 0, properties: ["97": "literal"]}
mem/0: location 1002 is 1062
run/0: instruction buffer-append/0
run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new/42 {name: "location", value: 1, type: 0, properties: ["location": "type"]}, {name: "30", value: 30, type: 0, properties: ["30": "literal"]}
run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new/43 {name: "location", value: 1, type: 0, properties: ["location": "type"]}, {name: "30", value: 30, type: 0, properties: ["30": "literal"]}
mem/0: array size is 30
mem/0: new alloc: 1068
run/0: instruction buffer-append/1
@ -349,7 +349,7 @@ run/0: instruction buffer-append/4
run/0: {name: "full?", value: 3, type: 3, properties: ["full?": "boolean"]} <- buffer-full?/103 {name: "in", value: 1, type: 2-9, properties: ["in": "address":"buffer"]}
mem/0: location 1070 is 1062
run/0: instruction buffer-full?/0
run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new/42 {name: "location", value: 1, type: 0, properties: ["location": "type"]}, {name: "30", value: 30, type: 0, properties: ["30": "literal"]}
run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new/43 {name: "location", value: 1, type: 0, properties: ["location": "type"]}, {name: "30", value: 30, type: 0, properties: ["30": "literal"]}
mem/0: array size is 30
mem/0: new alloc: 1099
run/0: instruction buffer-full?/1
@ -451,7 +451,7 @@ run/0: instruction run1001/4
run/0: {name: "x", value: 1, type: 2-9, properties: ["x": "address":"buffer"]} <- buffer-append/104 {name: "x", value: 1, type: 2-9, properties: ["x": "address":"buffer"]}, {name: "98", value: 98, type: 0, properties: ["98": "literal"]}
mem/0: location 1002 is 1062
run/0: instruction buffer-append/0
run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new/42 {name: "location", value: 1, type: 0, properties: ["location": "type"]}, {name: "30", value: 30, type: 0, properties: ["30": "literal"]}
run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new/43 {name: "location", value: 1, type: 0, properties: ["location": "type"]}, {name: "30", value: 30, type: 0, properties: ["30": "literal"]}
mem/0: array size is 30
mem/0: new alloc: 1130
run/0: instruction buffer-append/1
@ -466,7 +466,7 @@ run/0: instruction buffer-append/4
run/0: {name: "full?", value: 3, type: 3, properties: ["full?": "boolean"]} <- buffer-full?/103 {name: "in", value: 1, type: 2-9, properties: ["in": "address":"buffer"]}
mem/0: location 1132 is 1062
run/0: instruction buffer-full?/0
run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new/42 {name: "location", value: 1, type: 0, properties: ["location": "type"]}, {name: "30", value: 30, type: 0, properties: ["30": "literal"]}
run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new/43 {name: "location", value: 1, type: 0, properties: ["location": "type"]}, {name: "30", value: 30, type: 0, properties: ["30": "literal"]}
mem/0: array size is 30
mem/0: new alloc: 1161
run/0: instruction buffer-full?/1
@ -568,7 +568,7 @@ run/0: instruction run1001/5
run/0: {name: "x", value: 1, type: 2-9, properties: ["x": "address":"buffer"]} <- buffer-append/104 {name: "x", value: 1, type: 2-9, properties: ["x": "address":"buffer"]}, {name: "99", value: 99, type: 0, properties: ["99": "literal"]}
mem/0: location 1002 is 1062
run/0: instruction buffer-append/0
run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new/42 {name: "location", value: 1, type: 0, properties: ["location": "type"]}, {name: "30", value: 30, type: 0, properties: ["30": "literal"]}
run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new/43 {name: "location", value: 1, type: 0, properties: ["location": "type"]}, {name: "30", value: 30, type: 0, properties: ["30": "literal"]}
mem/0: array size is 30
mem/0: new alloc: 1192
run/0: instruction buffer-append/1
@ -583,7 +583,7 @@ run/0: instruction buffer-append/4
run/0: {name: "full?", value: 3, type: 3, properties: ["full?": "boolean"]} <- buffer-full?/103 {name: "in", value: 1, type: 2-9, properties: ["in": "address":"buffer"]}
mem/0: location 1194 is 1062
run/0: instruction buffer-full?/0
run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new/42 {name: "location", value: 1, type: 0, properties: ["location": "type"]}, {name: "30", value: 30, type: 0, properties: ["30": "literal"]}
run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new/43 {name: "location", value: 1, type: 0, properties: ["location": "type"]}, {name: "30", value: 30, type: 0, properties: ["30": "literal"]}
mem/0: array size is 30
mem/0: new alloc: 1223
run/0: instruction buffer-full?/1
@ -715,7 +715,7 @@ run/0: instruction run1001/10
run/0: {name: "x", value: 1, type: 2-9, properties: ["x": "address":"buffer"]} <- buffer-append/104 {name: "x", value: 1, type: 2-9, properties: ["x": "address":"buffer"]}, {name: "100", value: 100, type: 0, properties: ["100": "literal"]}
mem/0: location 1002 is 1062
run/0: instruction buffer-append/0
run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new/42 {name: "location", value: 1, type: 0, properties: ["location": "type"]}, {name: "30", value: 30, type: 0, properties: ["30": "literal"]}
run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new/43 {name: "location", value: 1, type: 0, properties: ["location": "type"]}, {name: "30", value: 30, type: 0, properties: ["30": "literal"]}
mem/0: array size is 30
mem/0: new alloc: 1254
run/0: instruction buffer-append/1
@ -730,7 +730,7 @@ run/0: instruction buffer-append/4
run/0: {name: "full?", value: 3, type: 3, properties: ["full?": "boolean"]} <- buffer-full?/103 {name: "in", value: 1, type: 2-9, properties: ["in": "address":"buffer"]}
mem/0: location 1256 is 1062
run/0: instruction buffer-full?/0
run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new/42 {name: "location", value: 1, type: 0, properties: ["location": "type"]}, {name: "30", value: 30, type: 0, properties: ["30": "literal"]}
run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new/43 {name: "location", value: 1, type: 0, properties: ["location": "type"]}, {name: "30", value: 30, type: 0, properties: ["30": "literal"]}
mem/0: array size is 30
mem/0: new alloc: 1285
run/0: instruction buffer-full?/1
@ -783,7 +783,7 @@ run/0: instruction buffer-append/6
run/0: {name: "in", value: 1, type: 2-9, properties: ["in": "address":"buffer"]} <- grow-buffer/102 {name: "in", value: 1, type: 2-9, properties: ["in": "address":"buffer"]}
mem/0: location 1256 is 1062
run/0: instruction grow-buffer/0
run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new/42 {name: "location", value: 1, type: 0, properties: ["location": "type"]}, {name: "30", value: 30, type: 0, properties: ["30": "literal"]}
run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new/43 {name: "location", value: 1, type: 0, properties: ["location": "type"]}, {name: "30", value: 30, type: 0, properties: ["30": "literal"]}
mem/0: array size is 30
mem/0: new alloc: 1316
run/0: instruction grow-buffer/1
@ -818,7 +818,7 @@ mem/0: location 1319 is 1063
mem/0: location 1063 is 1064
mem/0: storing 1064 in location 1322
run/0: instruction grow-buffer/6
run/0: {name: "x", value: 2, type: 2-2-5-4, properties: ["x": "address":"address":"array":"character", "deref": ]} <- new/42 {name: "character", value: 4, type: 0, properties: ["character": "type"]}, {name: "newlen", value: 4, type: 1, properties: ["newlen": "integer"]}
run/0: {name: "x", value: 2, type: 2-2-5-4, properties: ["x": "address":"address":"array":"character", "deref": ]} <- new/43 {name: "character", value: 4, type: 0, properties: ["character": "type"]}, {name: "newlen", value: 4, type: 1, properties: ["newlen": "integer"]}
mem/0: location 1321 is 6
mem/0: array size is 6
mem/0: new alloc: 1347
@ -1095,7 +1095,7 @@ mem/0: storing 100 in location 16
mem/0: storing 0 in location 17
mem/0: storing 0 in location 18
run/0: instruction buffer-append-works/1
run/0: memory-should-contain/44 {name: "
run/0: memory-should-contain/45 {name: "
# before +buffer-filled
1 <- 1 # no change in data pointer
2 <- 3 # size of data

View File

@ -20,7 +20,7 @@ after-brace/0: memory-should-contain ...
new/0: routine allocated memory from 1000 to 101000
schedule/0: channel
run/0: instruction channel/0
run/0: run/43 {name: "
run/0: run/44 {name: "
1:address:channel <- init-channel 3:literal/capacity
1:address:channel <- write 1:address:channel, 34:literal
2:integer, 1:address:channel <- read 1:address:channel
@ -47,11 +47,11 @@ after-brace/0: read ...
run/0: instruction run1001/0
run/0: {name: "1", value: 1, type: 2-10, properties: ["1": "address":"channel"]} <- init-channel/108 {name: "3", value: 3, type: 0, properties: ["3": "literal", "capacity": ]}
run/0: instruction init-channel/0
run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new/42 {name: "location", value: 1, type: 0, properties: ["location": "type"]}, {name: "30", value: 30, type: 0, properties: ["30": "literal"]}
run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new/43 {name: "location", value: 1, type: 0, properties: ["location": "type"]}, {name: "30", value: 30, type: 0, properties: ["30": "literal"]}
mem/0: array size is 30
mem/0: new alloc: 1000
run/0: instruction init-channel/1
run/0: {name: "result", value: 1, type: 2-10, properties: ["result": "address":"channel"]} <- new/42 {name: "channel", value: 10, type: 0, properties: ["channel": "type"]}
run/0: {name: "result", value: 1, type: 2-10, properties: ["result": "address":"channel"]} <- new/43 {name: "channel", value: 10, type: 0, properties: ["channel": "type"]}
mem/0: new alloc: 1031
mem/0: storing 1031 in location 1002
run/0: instruction init-channel/2
@ -100,7 +100,7 @@ run/0: address to copy is 1033
run/0: product 0 is 1033
mem/0: storing 1033 in location 1006
run/0: instruction init-channel/9
run/0: {name: "dest", value: 5, type: 2-2-5-1, properties: ["dest": "address":"address":"array":"location", "deref": ]} <- new/42 {name: "location", value: 1, type: 0, properties: ["location": "type"]}, {name: "capacity", value: 4, type: 1, properties: ["capacity": "integer"]}
run/0: {name: "dest", value: 5, type: 2-2-5-1, properties: ["dest": "address":"address":"array":"location", "deref": ]} <- new/43 {name: "location", value: 1, type: 0, properties: ["location": "type"]}, {name: "capacity", value: 4, type: 1, properties: ["capacity": "integer"]}
mem/0: location 1005 is 4
mem/0: array size is 4
mem/0: new alloc: 1034
@ -115,7 +115,7 @@ run/0: instruction run1001/1
run/0: {name: "1", value: 1, type: 2-10, properties: ["1": "address":"channel"]} <- write/109 {name: "1", value: 1, type: 2-10, properties: ["1": "address":"channel"]}, {name: "34", value: 34, type: 0, properties: ["34": "literal"]}
mem/0: location 1 is 1031
run/0: instruction write/0
run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new/42 {name: "location", value: 1, type: 0, properties: ["location": "type"]}, {name: "30", value: 30, type: 0, properties: ["30": "literal"]}
run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new/43 {name: "location", value: 1, type: 0, properties: ["location": "type"]}, {name: "30", value: 30, type: 0, properties: ["30": "literal"]}
mem/0: array size is 30
mem/0: new alloc: 1039
run/0: instruction write/1
@ -130,7 +130,7 @@ run/0: instruction write/4
run/0: {name: "full", value: 3, type: 3, properties: ["full": "boolean"]} <- channel-full?/110 {name: "chan", value: 1, type: 2-10, properties: ["chan": "address":"channel"]}
mem/0: location 1041 is 1031
run/0: instruction channel-full?/0
run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new/42 {name: "location", value: 1, type: 0, properties: ["location": "type"]}, {name: "30", value: 30, type: 0, properties: ["30": "literal"]}
run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new/43 {name: "location", value: 1, type: 0, properties: ["location": "type"]}, {name: "30", value: 30, type: 0, properties: ["30": "literal"]}
mem/0: array size is 30
mem/0: new alloc: 1070
run/0: instruction channel-full?/1
@ -158,7 +158,7 @@ run/0: instruction channel-full?/5
run/0: {name: "len", value: 3, type: 1, properties: ["len": "integer"]} <- channel-capacity/113 {name: "chan", value: 1, type: 2-10, properties: ["chan": "address":"channel"]}
mem/0: location 1072 is 1031
run/0: instruction channel-capacity/0
run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new/42 {name: "location", value: 1, type: 0, properties: ["location": "type"]}, {name: "30", value: 30, type: 0, properties: ["30": "literal"]}
run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new/43 {name: "location", value: 1, type: 0, properties: ["location": "type"]}, {name: "30", value: 30, type: 0, properties: ["30": "literal"]}
mem/0: array size is 30
mem/0: new alloc: 1101
run/0: instruction channel-capacity/1
@ -298,7 +298,7 @@ run/0: instruction run1001/2
run/0: {name: "2", value: 2, type: 1, properties: ["2": "integer"]}, {name: "1", value: 1, type: 2-10, properties: ["1": "address":"channel"]} <- read/111 {name: "1", value: 1, type: 2-10, properties: ["1": "address":"channel"]}
mem/0: location 1 is 1031
run/0: instruction read/0
run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new/42 {name: "location", value: 1, type: 0, properties: ["location": "type"]}, {name: "30", value: 30, type: 0, properties: ["30": "literal"]}
run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new/43 {name: "location", value: 1, type: 0, properties: ["location": "type"]}, {name: "30", value: 30, type: 0, properties: ["30": "literal"]}
mem/0: array size is 30
mem/0: new alloc: 1132
run/0: instruction read/1
@ -309,7 +309,7 @@ run/0: instruction read/3
run/0: {name: "empty", value: 2, type: 3, properties: ["empty": "boolean"]} <- channel-empty?/112 {name: "chan", value: 1, type: 2-10, properties: ["chan": "address":"channel"]}
mem/0: location 1134 is 1031
run/0: instruction channel-empty?/0
run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new/42 {name: "location", value: 1, type: 0, properties: ["location": "type"]}, {name: "30", value: 30, type: 0, properties: ["30": "literal"]}
run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new/43 {name: "location", value: 1, type: 0, properties: ["location": "type"]}, {name: "30", value: 30, type: 0, properties: ["30": "literal"]}
mem/0: array size is 30
mem/0: new alloc: 1163
run/0: instruction channel-empty?/1
@ -422,7 +422,7 @@ mem/0: storing 34 in location 2
run/0: result 1 is 1031
mem/0: storing 1031 in location 1
run/0: instruction channel/1
run/0: memory-should-contain/44 {name: "
run/0: memory-should-contain/45 {name: "
2 <- 34
", value: 0, type: 0, properties: ["
2 <- 34

View File

@ -22,7 +22,7 @@ after-brace/0: memory-should-contain ...
new/0: routine allocated memory from 1000 to 101000
schedule/0: channel-initialization
run/0: instruction channel-initialization/0
run/0: run/43 {name: "
run/0: run/44 {name: "
1:address:channel <- init-channel 3:literal/capacity
2:integer <- get 1:address:channel/deref, first-full:offset
3:integer <- get 1:address:channel/deref, first-free:offset
@ -51,11 +51,11 @@ after-brace/0: get ...
run/0: instruction run1001/0
run/0: {name: "1", value: 1, type: 2-10, properties: ["1": "address":"channel"]} <- init-channel/108 {name: "3", value: 3, type: 0, properties: ["3": "literal", "capacity": ]}
run/0: instruction init-channel/0
run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new/42 {name: "location", value: 1, type: 0, properties: ["location": "type"]}, {name: "30", value: 30, type: 0, properties: ["30": "literal"]}
run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new/43 {name: "location", value: 1, type: 0, properties: ["location": "type"]}, {name: "30", value: 30, type: 0, properties: ["30": "literal"]}
mem/0: array size is 30
mem/0: new alloc: 1000
run/0: instruction init-channel/1
run/0: {name: "result", value: 1, type: 2-10, properties: ["result": "address":"channel"]} <- new/42 {name: "channel", value: 10, type: 0, properties: ["channel": "type"]}
run/0: {name: "result", value: 1, type: 2-10, properties: ["result": "address":"channel"]} <- new/43 {name: "channel", value: 10, type: 0, properties: ["channel": "type"]}
mem/0: new alloc: 1031
mem/0: storing 1031 in location 1002
run/0: instruction init-channel/2
@ -104,7 +104,7 @@ run/0: address to copy is 1033
run/0: product 0 is 1033
mem/0: storing 1033 in location 1006
run/0: instruction init-channel/9
run/0: {name: "dest", value: 5, type: 2-2-5-1, properties: ["dest": "address":"address":"array":"location", "deref": ]} <- new/42 {name: "location", value: 1, type: 0, properties: ["location": "type"]}, {name: "capacity", value: 4, type: 1, properties: ["capacity": "integer"]}
run/0: {name: "dest", value: 5, type: 2-2-5-1, properties: ["dest": "address":"address":"array":"location", "deref": ]} <- new/43 {name: "location", value: 1, type: 0, properties: ["location": "type"]}, {name: "capacity", value: 4, type: 1, properties: ["capacity": "integer"]}
mem/0: location 1005 is 4
mem/0: array size is 4
mem/0: new alloc: 1034
@ -136,7 +136,7 @@ mem/0: location 1032 is 0
run/0: product 0 is 0
mem/0: storing 0 in location 3
run/0: instruction channel-initialization/1
run/0: memory-should-contain/44 {name: "
run/0: memory-should-contain/45 {name: "
2 <- 0 # first-full
3 <- 0 # first-free
", value: 0, type: 0, properties: ["

View File

@ -22,7 +22,7 @@ after-brace/0: memory-should-contain ...
new/0: routine allocated memory from 1000 to 101000
schedule/0: channel-new-empty-not-full
run/0: instruction channel-new-empty-not-full/0
run/0: run/43 {name: "
run/0: run/44 {name: "
1:address:channel <- init-channel 3:literal/capacity
2:integer <- channel-empty? 1:address:channel
3:integer <- channel-full? 1:address:channel
@ -47,11 +47,11 @@ after-brace/0: channel-full? ...
run/0: instruction run1001/0
run/0: {name: "1", value: 1, type: 2-10, properties: ["1": "address":"channel"]} <- init-channel/108 {name: "3", value: 3, type: 0, properties: ["3": "literal", "capacity": ]}
run/0: instruction init-channel/0
run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new/42 {name: "location", value: 1, type: 0, properties: ["location": "type"]}, {name: "30", value: 30, type: 0, properties: ["30": "literal"]}
run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new/43 {name: "location", value: 1, type: 0, properties: ["location": "type"]}, {name: "30", value: 30, type: 0, properties: ["30": "literal"]}
mem/0: array size is 30
mem/0: new alloc: 1000
run/0: instruction init-channel/1
run/0: {name: "result", value: 1, type: 2-10, properties: ["result": "address":"channel"]} <- new/42 {name: "channel", value: 10, type: 0, properties: ["channel": "type"]}
run/0: {name: "result", value: 1, type: 2-10, properties: ["result": "address":"channel"]} <- new/43 {name: "channel", value: 10, type: 0, properties: ["channel": "type"]}
mem/0: new alloc: 1031
mem/0: storing 1031 in location 1002
run/0: instruction init-channel/2
@ -100,7 +100,7 @@ run/0: address to copy is 1033
run/0: product 0 is 1033
mem/0: storing 1033 in location 1006
run/0: instruction init-channel/9
run/0: {name: "dest", value: 5, type: 2-2-5-1, properties: ["dest": "address":"address":"array":"location", "deref": ]} <- new/42 {name: "location", value: 1, type: 0, properties: ["location": "type"]}, {name: "capacity", value: 4, type: 1, properties: ["capacity": "integer"]}
run/0: {name: "dest", value: 5, type: 2-2-5-1, properties: ["dest": "address":"address":"array":"location", "deref": ]} <- new/43 {name: "location", value: 1, type: 0, properties: ["location": "type"]}, {name: "capacity", value: 4, type: 1, properties: ["capacity": "integer"]}
mem/0: location 1005 is 4
mem/0: array size is 4
mem/0: new alloc: 1034
@ -115,7 +115,7 @@ run/0: instruction run1001/1
run/0: {name: "2", value: 2, type: 1, properties: ["2": "integer"]} <- channel-empty?/112 {name: "1", value: 1, type: 2-10, properties: ["1": "address":"channel"]}
mem/0: location 1 is 1031
run/0: instruction channel-empty?/0
run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new/42 {name: "location", value: 1, type: 0, properties: ["location": "type"]}, {name: "30", value: 30, type: 0, properties: ["30": "literal"]}
run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new/43 {name: "location", value: 1, type: 0, properties: ["location": "type"]}, {name: "30", value: 30, type: 0, properties: ["30": "literal"]}
mem/0: array size is 30
mem/0: new alloc: 1039
run/0: instruction channel-empty?/1
@ -159,7 +159,7 @@ run/0: instruction run1001/2
run/0: {name: "3", value: 3, type: 1, properties: ["3": "integer"]} <- channel-full?/110 {name: "1", value: 1, type: 2-10, properties: ["1": "address":"channel"]}
mem/0: location 1 is 1031
run/0: instruction channel-full?/0
run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new/42 {name: "location", value: 1, type: 0, properties: ["location": "type"]}, {name: "30", value: 30, type: 0, properties: ["30": "literal"]}
run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new/43 {name: "location", value: 1, type: 0, properties: ["location": "type"]}, {name: "30", value: 30, type: 0, properties: ["30": "literal"]}
mem/0: array size is 30
mem/0: new alloc: 1070
run/0: instruction channel-full?/1
@ -187,7 +187,7 @@ run/0: instruction channel-full?/5
run/0: {name: "len", value: 3, type: 1, properties: ["len": "integer"]} <- channel-capacity/113 {name: "chan", value: 1, type: 2-10, properties: ["chan": "address":"channel"]}
mem/0: location 1072 is 1031
run/0: instruction channel-capacity/0
run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new/42 {name: "location", value: 1, type: 0, properties: ["location": "type"]}, {name: "30", value: 30, type: 0, properties: ["30": "literal"]}
run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new/43 {name: "location", value: 1, type: 0, properties: ["location": "type"]}, {name: "30", value: 30, type: 0, properties: ["30": "literal"]}
mem/0: array size is 30
mem/0: new alloc: 1101
run/0: instruction channel-capacity/1
@ -251,7 +251,7 @@ mem/0: location 1077 is 0
run/0: result 0 is 0
mem/0: storing 0 in location 3
run/0: instruction channel-new-empty-not-full/1
run/0: memory-should-contain/44 {name: "
run/0: memory-should-contain/45 {name: "
2 <- 1 # empty?
3 <- 0 # full?
", value: 0, type: 0, properties: ["

View File

@ -26,7 +26,7 @@ after-brace/0: memory-should-contain ...
new/0: routine allocated memory from 1000 to 101000
schedule/0: channel-read-increments-full
run/0: instruction channel-read-increments-full/0
run/0: run/43 {name: "
run/0: run/44 {name: "
1:address:channel <- init-channel 3:literal/capacity
1:address:channel <- write 1:address:channel, 34:literal
_, 1:address:channel <- read 1:address:channel
@ -69,11 +69,11 @@ after-brace/0: get ...
run/0: instruction run1001/0
run/0: {name: "1", value: 1, type: 2-10, properties: ["1": "address":"channel"]} <- init-channel/108 {name: "3", value: 3, type: 0, properties: ["3": "literal", "capacity": ]}
run/0: instruction init-channel/0
run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new/42 {name: "location", value: 1, type: 0, properties: ["location": "type"]}, {name: "30", value: 30, type: 0, properties: ["30": "literal"]}
run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new/43 {name: "location", value: 1, type: 0, properties: ["location": "type"]}, {name: "30", value: 30, type: 0, properties: ["30": "literal"]}
mem/0: array size is 30
mem/0: new alloc: 1000
run/0: instruction init-channel/1
run/0: {name: "result", value: 1, type: 2-10, properties: ["result": "address":"channel"]} <- new/42 {name: "channel", value: 10, type: 0, properties: ["channel": "type"]}
run/0: {name: "result", value: 1, type: 2-10, properties: ["result": "address":"channel"]} <- new/43 {name: "channel", value: 10, type: 0, properties: ["channel": "type"]}
mem/0: new alloc: 1031
mem/0: storing 1031 in location 1002
run/0: instruction init-channel/2
@ -122,7 +122,7 @@ run/0: address to copy is 1033
run/0: product 0 is 1033
mem/0: storing 1033 in location 1006
run/0: instruction init-channel/9
run/0: {name: "dest", value: 5, type: 2-2-5-1, properties: ["dest": "address":"address":"array":"location", "deref": ]} <- new/42 {name: "location", value: 1, type: 0, properties: ["location": "type"]}, {name: "capacity", value: 4, type: 1, properties: ["capacity": "integer"]}
run/0: {name: "dest", value: 5, type: 2-2-5-1, properties: ["dest": "address":"address":"array":"location", "deref": ]} <- new/43 {name: "location", value: 1, type: 0, properties: ["location": "type"]}, {name: "capacity", value: 4, type: 1, properties: ["capacity": "integer"]}
mem/0: location 1005 is 4
mem/0: array size is 4
mem/0: new alloc: 1034
@ -137,7 +137,7 @@ run/0: instruction run1001/1
run/0: {name: "1", value: 1, type: 2-10, properties: ["1": "address":"channel"]} <- write/109 {name: "1", value: 1, type: 2-10, properties: ["1": "address":"channel"]}, {name: "34", value: 34, type: 0, properties: ["34": "literal"]}
mem/0: location 1 is 1031
run/0: instruction write/0
run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new/42 {name: "location", value: 1, type: 0, properties: ["location": "type"]}, {name: "30", value: 30, type: 0, properties: ["30": "literal"]}
run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new/43 {name: "location", value: 1, type: 0, properties: ["location": "type"]}, {name: "30", value: 30, type: 0, properties: ["30": "literal"]}
mem/0: array size is 30
mem/0: new alloc: 1039
run/0: instruction write/1
@ -152,7 +152,7 @@ run/0: instruction write/4
run/0: {name: "full", value: 3, type: 3, properties: ["full": "boolean"]} <- channel-full?/110 {name: "chan", value: 1, type: 2-10, properties: ["chan": "address":"channel"]}
mem/0: location 1041 is 1031
run/0: instruction channel-full?/0
run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new/42 {name: "location", value: 1, type: 0, properties: ["location": "type"]}, {name: "30", value: 30, type: 0, properties: ["30": "literal"]}
run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new/43 {name: "location", value: 1, type: 0, properties: ["location": "type"]}, {name: "30", value: 30, type: 0, properties: ["30": "literal"]}
mem/0: array size is 30
mem/0: new alloc: 1070
run/0: instruction channel-full?/1
@ -180,7 +180,7 @@ run/0: instruction channel-full?/5
run/0: {name: "len", value: 3, type: 1, properties: ["len": "integer"]} <- channel-capacity/113 {name: "chan", value: 1, type: 2-10, properties: ["chan": "address":"channel"]}
mem/0: location 1072 is 1031
run/0: instruction channel-capacity/0
run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new/42 {name: "location", value: 1, type: 0, properties: ["location": "type"]}, {name: "30", value: 30, type: 0, properties: ["30": "literal"]}
run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new/43 {name: "location", value: 1, type: 0, properties: ["location": "type"]}, {name: "30", value: 30, type: 0, properties: ["30": "literal"]}
mem/0: array size is 30
mem/0: new alloc: 1101
run/0: instruction channel-capacity/1
@ -320,7 +320,7 @@ run/0: instruction run1001/2
run/0: {name: "_", value: 0, type: 0, properties: ["_": "dummy"]}, {name: "1", value: 1, type: 2-10, properties: ["1": "address":"channel"]} <- read/111 {name: "1", value: 1, type: 2-10, properties: ["1": "address":"channel"]}
mem/0: location 1 is 1031
run/0: instruction read/0
run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new/42 {name: "location", value: 1, type: 0, properties: ["location": "type"]}, {name: "30", value: 30, type: 0, properties: ["30": "literal"]}
run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new/43 {name: "location", value: 1, type: 0, properties: ["location": "type"]}, {name: "30", value: 30, type: 0, properties: ["30": "literal"]}
mem/0: array size is 30
mem/0: new alloc: 1132
run/0: instruction read/1
@ -331,7 +331,7 @@ run/0: instruction read/3
run/0: {name: "empty", value: 2, type: 3, properties: ["empty": "boolean"]} <- channel-empty?/112 {name: "chan", value: 1, type: 2-10, properties: ["chan": "address":"channel"]}
mem/0: location 1134 is 1031
run/0: instruction channel-empty?/0
run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new/42 {name: "location", value: 1, type: 0, properties: ["location": "type"]}, {name: "30", value: 30, type: 0, properties: ["30": "literal"]}
run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new/43 {name: "location", value: 1, type: 0, properties: ["location": "type"]}, {name: "30", value: 30, type: 0, properties: ["30": "literal"]}
mem/0: array size is 30
mem/0: new alloc: 1163
run/0: instruction channel-empty?/1
@ -463,7 +463,7 @@ mem/0: location 1032 is 1
run/0: product 0 is 1
mem/0: storing 1 in location 3
run/0: instruction channel-read-increments-full/1
run/0: memory-should-contain/44 {name: "
run/0: memory-should-contain/45 {name: "
2 <- 1 # first-full
3 <- 1 # first-free
", value: 0, type: 0, properties: ["

View File

@ -26,7 +26,7 @@ after-brace/0: memory-should-contain ...
new/0: routine allocated memory from 1000 to 101000
schedule/0: channel-read-not-full
run/0: instruction channel-read-not-full/0
run/0: run/43 {name: "
run/0: run/44 {name: "
1:address:channel <- init-channel 1:literal/capacity
1:address:channel <- write 1:address:channel, 34:literal
_, 1:address:channel <- read 1:address:channel
@ -65,11 +65,11 @@ after-brace/0: channel-full? ...
run/0: instruction run1001/0
run/0: {name: "1", value: 1, type: 2-10, properties: ["1": "address":"channel"]} <- init-channel/108 {name: "1", value: 1, type: 0, properties: ["1": "literal", "capacity": ]}
run/0: instruction init-channel/0
run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new/42 {name: "location", value: 1, type: 0, properties: ["location": "type"]}, {name: "30", value: 30, type: 0, properties: ["30": "literal"]}
run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new/43 {name: "location", value: 1, type: 0, properties: ["location": "type"]}, {name: "30", value: 30, type: 0, properties: ["30": "literal"]}
mem/0: array size is 30
mem/0: new alloc: 1000
run/0: instruction init-channel/1
run/0: {name: "result", value: 1, type: 2-10, properties: ["result": "address":"channel"]} <- new/42 {name: "channel", value: 10, type: 0, properties: ["channel": "type"]}
run/0: {name: "result", value: 1, type: 2-10, properties: ["result": "address":"channel"]} <- new/43 {name: "channel", value: 10, type: 0, properties: ["channel": "type"]}
mem/0: new alloc: 1031
mem/0: storing 1031 in location 1002
run/0: instruction init-channel/2
@ -118,7 +118,7 @@ run/0: address to copy is 1033
run/0: product 0 is 1033
mem/0: storing 1033 in location 1006
run/0: instruction init-channel/9
run/0: {name: "dest", value: 5, type: 2-2-5-1, properties: ["dest": "address":"address":"array":"location", "deref": ]} <- new/42 {name: "location", value: 1, type: 0, properties: ["location": "type"]}, {name: "capacity", value: 4, type: 1, properties: ["capacity": "integer"]}
run/0: {name: "dest", value: 5, type: 2-2-5-1, properties: ["dest": "address":"address":"array":"location", "deref": ]} <- new/43 {name: "location", value: 1, type: 0, properties: ["location": "type"]}, {name: "capacity", value: 4, type: 1, properties: ["capacity": "integer"]}
mem/0: location 1005 is 2
mem/0: array size is 2
mem/0: new alloc: 1034
@ -133,7 +133,7 @@ run/0: instruction run1001/1
run/0: {name: "1", value: 1, type: 2-10, properties: ["1": "address":"channel"]} <- write/109 {name: "1", value: 1, type: 2-10, properties: ["1": "address":"channel"]}, {name: "34", value: 34, type: 0, properties: ["34": "literal"]}
mem/0: location 1 is 1031
run/0: instruction write/0
run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new/42 {name: "location", value: 1, type: 0, properties: ["location": "type"]}, {name: "30", value: 30, type: 0, properties: ["30": "literal"]}
run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new/43 {name: "location", value: 1, type: 0, properties: ["location": "type"]}, {name: "30", value: 30, type: 0, properties: ["30": "literal"]}
mem/0: array size is 30
mem/0: new alloc: 1037
run/0: instruction write/1
@ -148,7 +148,7 @@ run/0: instruction write/4
run/0: {name: "full", value: 3, type: 3, properties: ["full": "boolean"]} <- channel-full?/110 {name: "chan", value: 1, type: 2-10, properties: ["chan": "address":"channel"]}
mem/0: location 1039 is 1031
run/0: instruction channel-full?/0
run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new/42 {name: "location", value: 1, type: 0, properties: ["location": "type"]}, {name: "30", value: 30, type: 0, properties: ["30": "literal"]}
run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new/43 {name: "location", value: 1, type: 0, properties: ["location": "type"]}, {name: "30", value: 30, type: 0, properties: ["30": "literal"]}
mem/0: array size is 30
mem/0: new alloc: 1068
run/0: instruction channel-full?/1
@ -176,7 +176,7 @@ run/0: instruction channel-full?/5
run/0: {name: "len", value: 3, type: 1, properties: ["len": "integer"]} <- channel-capacity/113 {name: "chan", value: 1, type: 2-10, properties: ["chan": "address":"channel"]}
mem/0: location 1070 is 1031
run/0: instruction channel-capacity/0
run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new/42 {name: "location", value: 1, type: 0, properties: ["location": "type"]}, {name: "30", value: 30, type: 0, properties: ["30": "literal"]}
run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new/43 {name: "location", value: 1, type: 0, properties: ["location": "type"]}, {name: "30", value: 30, type: 0, properties: ["30": "literal"]}
mem/0: array size is 30
mem/0: new alloc: 1099
run/0: instruction channel-capacity/1
@ -316,7 +316,7 @@ run/0: instruction run1001/2
run/0: {name: "_", value: 0, type: 0, properties: ["_": "dummy"]}, {name: "1", value: 1, type: 2-10, properties: ["1": "address":"channel"]} <- read/111 {name: "1", value: 1, type: 2-10, properties: ["1": "address":"channel"]}
mem/0: location 1 is 1031
run/0: instruction read/0
run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new/42 {name: "location", value: 1, type: 0, properties: ["location": "type"]}, {name: "30", value: 30, type: 0, properties: ["30": "literal"]}
run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new/43 {name: "location", value: 1, type: 0, properties: ["location": "type"]}, {name: "30", value: 30, type: 0, properties: ["30": "literal"]}
mem/0: array size is 30
mem/0: new alloc: 1130
run/0: instruction read/1
@ -327,7 +327,7 @@ run/0: instruction read/3
run/0: {name: "empty", value: 2, type: 3, properties: ["empty": "boolean"]} <- channel-empty?/112 {name: "chan", value: 1, type: 2-10, properties: ["chan": "address":"channel"]}
mem/0: location 1132 is 1031
run/0: instruction channel-empty?/0
run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new/42 {name: "location", value: 1, type: 0, properties: ["location": "type"]}, {name: "30", value: 30, type: 0, properties: ["30": "literal"]}
run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new/43 {name: "location", value: 1, type: 0, properties: ["location": "type"]}, {name: "30", value: 30, type: 0, properties: ["30": "literal"]}
mem/0: array size is 30
mem/0: new alloc: 1161
run/0: instruction channel-empty?/1
@ -442,7 +442,7 @@ run/0: instruction run1001/3
run/0: {name: "2", value: 2, type: 1, properties: ["2": "integer"]} <- channel-empty?/112 {name: "1", value: 1, type: 2-10, properties: ["1": "address":"channel"]}
mem/0: location 1 is 1031
run/0: instruction channel-empty?/0
run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new/42 {name: "location", value: 1, type: 0, properties: ["location": "type"]}, {name: "30", value: 30, type: 0, properties: ["30": "literal"]}
run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new/43 {name: "location", value: 1, type: 0, properties: ["location": "type"]}, {name: "30", value: 30, type: 0, properties: ["30": "literal"]}
mem/0: array size is 30
mem/0: new alloc: 1192
run/0: instruction channel-empty?/1
@ -486,7 +486,7 @@ run/0: instruction run1001/4
run/0: {name: "3", value: 3, type: 1, properties: ["3": "integer"]} <- channel-full?/110 {name: "1", value: 1, type: 2-10, properties: ["1": "address":"channel"]}
mem/0: location 1 is 1031
run/0: instruction channel-full?/0
run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new/42 {name: "location", value: 1, type: 0, properties: ["location": "type"]}, {name: "30", value: 30, type: 0, properties: ["30": "literal"]}
run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new/43 {name: "location", value: 1, type: 0, properties: ["location": "type"]}, {name: "30", value: 30, type: 0, properties: ["30": "literal"]}
mem/0: array size is 30
mem/0: new alloc: 1223
run/0: instruction channel-full?/1
@ -514,7 +514,7 @@ run/0: instruction channel-full?/5
run/0: {name: "len", value: 3, type: 1, properties: ["len": "integer"]} <- channel-capacity/113 {name: "chan", value: 1, type: 2-10, properties: ["chan": "address":"channel"]}
mem/0: location 1225 is 1031
run/0: instruction channel-capacity/0
run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new/42 {name: "location", value: 1, type: 0, properties: ["location": "type"]}, {name: "30", value: 30, type: 0, properties: ["30": "literal"]}
run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new/43 {name: "location", value: 1, type: 0, properties: ["location": "type"]}, {name: "30", value: 30, type: 0, properties: ["30": "literal"]}
mem/0: array size is 30
mem/0: new alloc: 1254
run/0: instruction channel-capacity/1
@ -581,7 +581,7 @@ mem/0: location 1230 is 0
run/0: result 0 is 0
mem/0: storing 0 in location 3
run/0: instruction channel-read-not-full/1
run/0: memory-should-contain/44 {name: "
run/0: memory-should-contain/45 {name: "
2 <- 1 # empty?
3 <- 0 # full?
", value: 0, type: 0, properties: ["

View File

@ -48,7 +48,7 @@ after-brace/0: memory-should-contain ...
new/0: routine allocated memory from 1000 to 101000
schedule/0: channel-wrap
run/0: instruction channel-wrap/0
run/0: run/43 {name: "
run/0: run/44 {name: "
# channel with just 1 slot
1:address:channel <- init-channel 1:literal/capacity
# write and read a value
@ -131,11 +131,11 @@ after-brace/0: get ...
run/0: instruction run1001/0
run/0: {name: "1", value: 1, type: 2-10, properties: ["1": "address":"channel"]} <- init-channel/108 {name: "1", value: 1, type: 0, properties: ["1": "literal", "capacity": ]}
run/0: instruction init-channel/0
run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new/42 {name: "location", value: 1, type: 0, properties: ["location": "type"]}, {name: "30", value: 30, type: 0, properties: ["30": "literal"]}
run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new/43 {name: "location", value: 1, type: 0, properties: ["location": "type"]}, {name: "30", value: 30, type: 0, properties: ["30": "literal"]}
mem/0: array size is 30
mem/0: new alloc: 1000
run/0: instruction init-channel/1
run/0: {name: "result", value: 1, type: 2-10, properties: ["result": "address":"channel"]} <- new/42 {name: "channel", value: 10, type: 0, properties: ["channel": "type"]}
run/0: {name: "result", value: 1, type: 2-10, properties: ["result": "address":"channel"]} <- new/43 {name: "channel", value: 10, type: 0, properties: ["channel": "type"]}
mem/0: new alloc: 1031
mem/0: storing 1031 in location 1002
run/0: instruction init-channel/2
@ -184,7 +184,7 @@ run/0: address to copy is 1033
run/0: product 0 is 1033
mem/0: storing 1033 in location 1006
run/0: instruction init-channel/9
run/0: {name: "dest", value: 5, type: 2-2-5-1, properties: ["dest": "address":"address":"array":"location", "deref": ]} <- new/42 {name: "location", value: 1, type: 0, properties: ["location": "type"]}, {name: "capacity", value: 4, type: 1, properties: ["capacity": "integer"]}
run/0: {name: "dest", value: 5, type: 2-2-5-1, properties: ["dest": "address":"address":"array":"location", "deref": ]} <- new/43 {name: "location", value: 1, type: 0, properties: ["location": "type"]}, {name: "capacity", value: 4, type: 1, properties: ["capacity": "integer"]}
mem/0: location 1005 is 2
mem/0: array size is 2
mem/0: new alloc: 1034
@ -199,7 +199,7 @@ run/0: instruction run1001/1
run/0: {name: "1", value: 1, type: 2-10, properties: ["1": "address":"channel"]} <- write/109 {name: "1", value: 1, type: 2-10, properties: ["1": "address":"channel"]}, {name: "34", value: 34, type: 0, properties: ["34": "literal"]}
mem/0: location 1 is 1031
run/0: instruction write/0
run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new/42 {name: "location", value: 1, type: 0, properties: ["location": "type"]}, {name: "30", value: 30, type: 0, properties: ["30": "literal"]}
run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new/43 {name: "location", value: 1, type: 0, properties: ["location": "type"]}, {name: "30", value: 30, type: 0, properties: ["30": "literal"]}
mem/0: array size is 30
mem/0: new alloc: 1037
run/0: instruction write/1
@ -214,7 +214,7 @@ run/0: instruction write/4
run/0: {name: "full", value: 3, type: 3, properties: ["full": "boolean"]} <- channel-full?/110 {name: "chan", value: 1, type: 2-10, properties: ["chan": "address":"channel"]}
mem/0: location 1039 is 1031
run/0: instruction channel-full?/0
run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new/42 {name: "location", value: 1, type: 0, properties: ["location": "type"]}, {name: "30", value: 30, type: 0, properties: ["30": "literal"]}
run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new/43 {name: "location", value: 1, type: 0, properties: ["location": "type"]}, {name: "30", value: 30, type: 0, properties: ["30": "literal"]}
mem/0: array size is 30
mem/0: new alloc: 1068
run/0: instruction channel-full?/1
@ -242,7 +242,7 @@ run/0: instruction channel-full?/5
run/0: {name: "len", value: 3, type: 1, properties: ["len": "integer"]} <- channel-capacity/113 {name: "chan", value: 1, type: 2-10, properties: ["chan": "address":"channel"]}
mem/0: location 1070 is 1031
run/0: instruction channel-capacity/0
run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new/42 {name: "location", value: 1, type: 0, properties: ["location": "type"]}, {name: "30", value: 30, type: 0, properties: ["30": "literal"]}
run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new/43 {name: "location", value: 1, type: 0, properties: ["location": "type"]}, {name: "30", value: 30, type: 0, properties: ["30": "literal"]}
mem/0: array size is 30
mem/0: new alloc: 1099
run/0: instruction channel-capacity/1
@ -382,7 +382,7 @@ run/0: instruction run1001/2
run/0: {name: "_", value: 0, type: 0, properties: ["_": "dummy"]}, {name: "1", value: 1, type: 2-10, properties: ["1": "address":"channel"]} <- read/111 {name: "1", value: 1, type: 2-10, properties: ["1": "address":"channel"]}
mem/0: location 1 is 1031
run/0: instruction read/0
run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new/42 {name: "location", value: 1, type: 0, properties: ["location": "type"]}, {name: "30", value: 30, type: 0, properties: ["30": "literal"]}
run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new/43 {name: "location", value: 1, type: 0, properties: ["location": "type"]}, {name: "30", value: 30, type: 0, properties: ["30": "literal"]}
mem/0: array size is 30
mem/0: new alloc: 1130
run/0: instruction read/1
@ -393,7 +393,7 @@ run/0: instruction read/3
run/0: {name: "empty", value: 2, type: 3, properties: ["empty": "boolean"]} <- channel-empty?/112 {name: "chan", value: 1, type: 2-10, properties: ["chan": "address":"channel"]}
mem/0: location 1132 is 1031
run/0: instruction channel-empty?/0
run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new/42 {name: "location", value: 1, type: 0, properties: ["location": "type"]}, {name: "30", value: 30, type: 0, properties: ["30": "literal"]}
run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new/43 {name: "location", value: 1, type: 0, properties: ["location": "type"]}, {name: "30", value: 30, type: 0, properties: ["30": "literal"]}
mem/0: array size is 30
mem/0: new alloc: 1161
run/0: instruction channel-empty?/1
@ -528,7 +528,7 @@ run/0: instruction run1001/5
run/0: {name: "1", value: 1, type: 2-10, properties: ["1": "address":"channel"]} <- write/109 {name: "1", value: 1, type: 2-10, properties: ["1": "address":"channel"]}, {name: "34", value: 34, type: 0, properties: ["34": "literal"]}
mem/0: location 1 is 1031
run/0: instruction write/0
run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new/42 {name: "location", value: 1, type: 0, properties: ["location": "type"]}, {name: "30", value: 30, type: 0, properties: ["30": "literal"]}
run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new/43 {name: "location", value: 1, type: 0, properties: ["location": "type"]}, {name: "30", value: 30, type: 0, properties: ["30": "literal"]}
mem/0: array size is 30
mem/0: new alloc: 1192
run/0: instruction write/1
@ -543,7 +543,7 @@ run/0: instruction write/4
run/0: {name: "full", value: 3, type: 3, properties: ["full": "boolean"]} <- channel-full?/110 {name: "chan", value: 1, type: 2-10, properties: ["chan": "address":"channel"]}
mem/0: location 1194 is 1031
run/0: instruction channel-full?/0
run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new/42 {name: "location", value: 1, type: 0, properties: ["location": "type"]}, {name: "30", value: 30, type: 0, properties: ["30": "literal"]}
run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new/43 {name: "location", value: 1, type: 0, properties: ["location": "type"]}, {name: "30", value: 30, type: 0, properties: ["30": "literal"]}
mem/0: array size is 30
mem/0: new alloc: 1223
run/0: instruction channel-full?/1
@ -571,7 +571,7 @@ run/0: instruction channel-full?/5
run/0: {name: "len", value: 3, type: 1, properties: ["len": "integer"]} <- channel-capacity/113 {name: "chan", value: 1, type: 2-10, properties: ["chan": "address":"channel"]}
mem/0: location 1225 is 1031
run/0: instruction channel-capacity/0
run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new/42 {name: "location", value: 1, type: 0, properties: ["location": "type"]}, {name: "30", value: 30, type: 0, properties: ["30": "literal"]}
run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new/43 {name: "location", value: 1, type: 0, properties: ["location": "type"]}, {name: "30", value: 30, type: 0, properties: ["30": "literal"]}
mem/0: array size is 30
mem/0: new alloc: 1254
run/0: instruction channel-capacity/1
@ -728,7 +728,7 @@ run/0: instruction run1001/7
run/0: {name: "_", value: 0, type: 0, properties: ["_": "dummy"]}, {name: "1", value: 1, type: 2-10, properties: ["1": "address":"channel"]} <- read/111 {name: "1", value: 1, type: 2-10, properties: ["1": "address":"channel"]}
mem/0: location 1 is 1031
run/0: instruction read/0
run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new/42 {name: "location", value: 1, type: 0, properties: ["location": "type"]}, {name: "30", value: 30, type: 0, properties: ["30": "literal"]}
run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new/43 {name: "location", value: 1, type: 0, properties: ["location": "type"]}, {name: "30", value: 30, type: 0, properties: ["30": "literal"]}
mem/0: array size is 30
mem/0: new alloc: 1285
run/0: instruction read/1
@ -739,7 +739,7 @@ run/0: instruction read/3
run/0: {name: "empty", value: 2, type: 3, properties: ["empty": "boolean"]} <- channel-empty?/112 {name: "chan", value: 1, type: 2-10, properties: ["chan": "address":"channel"]}
mem/0: location 1287 is 1031
run/0: instruction channel-empty?/0
run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new/42 {name: "location", value: 1, type: 0, properties: ["location": "type"]}, {name: "30", value: 30, type: 0, properties: ["30": "literal"]}
run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new/43 {name: "location", value: 1, type: 0, properties: ["location": "type"]}, {name: "30", value: 30, type: 0, properties: ["30": "literal"]}
mem/0: array size is 30
mem/0: new alloc: 1316
run/0: instruction channel-empty?/1
@ -865,7 +865,7 @@ mem/0: location 1031 is 0
run/0: product 0 is 0
mem/0: storing 0 in location 5
run/0: instruction channel-wrap/1
run/0: memory-should-contain/44 {name: "
run/0: memory-should-contain/45 {name: "
2 <- 1 # first-free after first write
3 <- 1 # first-full after first read
4 <- 0 # first-free after second write, wrapped

View File

@ -24,7 +24,7 @@ after-brace/0: memory-should-contain ...
new/0: routine allocated memory from 1000 to 101000
schedule/0: channel-write-full
run/0: instruction channel-write-full/0
run/0: run/43 {name: "
run/0: run/44 {name: "
1:address:channel <- init-channel 1:literal/capacity
1:address:channel <- write 1:address:channel, 34:literal
2:integer <- channel-empty? 1:address:channel
@ -56,11 +56,11 @@ after-brace/0: channel-full? ...
run/0: instruction run1001/0
run/0: {name: "1", value: 1, type: 2-10, properties: ["1": "address":"channel"]} <- init-channel/108 {name: "1", value: 1, type: 0, properties: ["1": "literal", "capacity": ]}
run/0: instruction init-channel/0
run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new/42 {name: "location", value: 1, type: 0, properties: ["location": "type"]}, {name: "30", value: 30, type: 0, properties: ["30": "literal"]}
run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new/43 {name: "location", value: 1, type: 0, properties: ["location": "type"]}, {name: "30", value: 30, type: 0, properties: ["30": "literal"]}
mem/0: array size is 30
mem/0: new alloc: 1000
run/0: instruction init-channel/1
run/0: {name: "result", value: 1, type: 2-10, properties: ["result": "address":"channel"]} <- new/42 {name: "channel", value: 10, type: 0, properties: ["channel": "type"]}
run/0: {name: "result", value: 1, type: 2-10, properties: ["result": "address":"channel"]} <- new/43 {name: "channel", value: 10, type: 0, properties: ["channel": "type"]}
mem/0: new alloc: 1031
mem/0: storing 1031 in location 1002
run/0: instruction init-channel/2
@ -109,7 +109,7 @@ run/0: address to copy is 1033
run/0: product 0 is 1033
mem/0: storing 1033 in location 1006
run/0: instruction init-channel/9
run/0: {name: "dest", value: 5, type: 2-2-5-1, properties: ["dest": "address":"address":"array":"location", "deref": ]} <- new/42 {name: "location", value: 1, type: 0, properties: ["location": "type"]}, {name: "capacity", value: 4, type: 1, properties: ["capacity": "integer"]}
run/0: {name: "dest", value: 5, type: 2-2-5-1, properties: ["dest": "address":"address":"array":"location", "deref": ]} <- new/43 {name: "location", value: 1, type: 0, properties: ["location": "type"]}, {name: "capacity", value: 4, type: 1, properties: ["capacity": "integer"]}
mem/0: location 1005 is 2
mem/0: array size is 2
mem/0: new alloc: 1034
@ -124,7 +124,7 @@ run/0: instruction run1001/1
run/0: {name: "1", value: 1, type: 2-10, properties: ["1": "address":"channel"]} <- write/109 {name: "1", value: 1, type: 2-10, properties: ["1": "address":"channel"]}, {name: "34", value: 34, type: 0, properties: ["34": "literal"]}
mem/0: location 1 is 1031
run/0: instruction write/0
run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new/42 {name: "location", value: 1, type: 0, properties: ["location": "type"]}, {name: "30", value: 30, type: 0, properties: ["30": "literal"]}
run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new/43 {name: "location", value: 1, type: 0, properties: ["location": "type"]}, {name: "30", value: 30, type: 0, properties: ["30": "literal"]}
mem/0: array size is 30
mem/0: new alloc: 1037
run/0: instruction write/1
@ -139,7 +139,7 @@ run/0: instruction write/4
run/0: {name: "full", value: 3, type: 3, properties: ["full": "boolean"]} <- channel-full?/110 {name: "chan", value: 1, type: 2-10, properties: ["chan": "address":"channel"]}
mem/0: location 1039 is 1031
run/0: instruction channel-full?/0
run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new/42 {name: "location", value: 1, type: 0, properties: ["location": "type"]}, {name: "30", value: 30, type: 0, properties: ["30": "literal"]}
run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new/43 {name: "location", value: 1, type: 0, properties: ["location": "type"]}, {name: "30", value: 30, type: 0, properties: ["30": "literal"]}
mem/0: array size is 30
mem/0: new alloc: 1068
run/0: instruction channel-full?/1
@ -167,7 +167,7 @@ run/0: instruction channel-full?/5
run/0: {name: "len", value: 3, type: 1, properties: ["len": "integer"]} <- channel-capacity/113 {name: "chan", value: 1, type: 2-10, properties: ["chan": "address":"channel"]}
mem/0: location 1070 is 1031
run/0: instruction channel-capacity/0
run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new/42 {name: "location", value: 1, type: 0, properties: ["location": "type"]}, {name: "30", value: 30, type: 0, properties: ["30": "literal"]}
run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new/43 {name: "location", value: 1, type: 0, properties: ["location": "type"]}, {name: "30", value: 30, type: 0, properties: ["30": "literal"]}
mem/0: array size is 30
mem/0: new alloc: 1099
run/0: instruction channel-capacity/1
@ -307,7 +307,7 @@ run/0: instruction run1001/2
run/0: {name: "2", value: 2, type: 1, properties: ["2": "integer"]} <- channel-empty?/112 {name: "1", value: 1, type: 2-10, properties: ["1": "address":"channel"]}
mem/0: location 1 is 1031
run/0: instruction channel-empty?/0
run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new/42 {name: "location", value: 1, type: 0, properties: ["location": "type"]}, {name: "30", value: 30, type: 0, properties: ["30": "literal"]}
run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new/43 {name: "location", value: 1, type: 0, properties: ["location": "type"]}, {name: "30", value: 30, type: 0, properties: ["30": "literal"]}
mem/0: array size is 30
mem/0: new alloc: 1130
run/0: instruction channel-empty?/1
@ -351,7 +351,7 @@ run/0: instruction run1001/3
run/0: {name: "3", value: 3, type: 1, properties: ["3": "integer"]} <- channel-full?/110 {name: "1", value: 1, type: 2-10, properties: ["1": "address":"channel"]}
mem/0: location 1 is 1031
run/0: instruction channel-full?/0
run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new/42 {name: "location", value: 1, type: 0, properties: ["location": "type"]}, {name: "30", value: 30, type: 0, properties: ["30": "literal"]}
run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new/43 {name: "location", value: 1, type: 0, properties: ["location": "type"]}, {name: "30", value: 30, type: 0, properties: ["30": "literal"]}
mem/0: array size is 30
mem/0: new alloc: 1161
run/0: instruction channel-full?/1
@ -379,7 +379,7 @@ run/0: instruction channel-full?/5
run/0: {name: "len", value: 3, type: 1, properties: ["len": "integer"]} <- channel-capacity/113 {name: "chan", value: 1, type: 2-10, properties: ["chan": "address":"channel"]}
mem/0: location 1163 is 1031
run/0: instruction channel-capacity/0
run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new/42 {name: "location", value: 1, type: 0, properties: ["location": "type"]}, {name: "30", value: 30, type: 0, properties: ["30": "literal"]}
run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new/43 {name: "location", value: 1, type: 0, properties: ["location": "type"]}, {name: "30", value: 30, type: 0, properties: ["30": "literal"]}
mem/0: array size is 30
mem/0: new alloc: 1192
run/0: instruction channel-capacity/1
@ -446,7 +446,7 @@ mem/0: location 1168 is 1
run/0: result 0 is 1
mem/0: storing 1 in location 3
run/0: instruction channel-write-full/1
run/0: memory-should-contain/44 {name: "
run/0: memory-should-contain/45 {name: "
2 <- 0 # empty?
3 <- 1 # full?
", value: 0, type: 0, properties: ["

View File

@ -24,7 +24,7 @@ after-brace/0: memory-should-contain ...
new/0: routine allocated memory from 1000 to 101000
schedule/0: channel-write-increments-free
run/0: instruction channel-write-increments-free/0
run/0: run/43 {name: "
run/0: run/44 {name: "
1:address:channel <- init-channel 3:literal/capacity
1:address:channel <- write 1:address:channel, 34:literal
2:integer <- get 1:address:channel/deref, first-full:offset
@ -60,11 +60,11 @@ after-brace/0: get ...
run/0: instruction run1001/0
run/0: {name: "1", value: 1, type: 2-10, properties: ["1": "address":"channel"]} <- init-channel/108 {name: "3", value: 3, type: 0, properties: ["3": "literal", "capacity": ]}
run/0: instruction init-channel/0
run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new/42 {name: "location", value: 1, type: 0, properties: ["location": "type"]}, {name: "30", value: 30, type: 0, properties: ["30": "literal"]}
run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new/43 {name: "location", value: 1, type: 0, properties: ["location": "type"]}, {name: "30", value: 30, type: 0, properties: ["30": "literal"]}
mem/0: array size is 30
mem/0: new alloc: 1000
run/0: instruction init-channel/1
run/0: {name: "result", value: 1, type: 2-10, properties: ["result": "address":"channel"]} <- new/42 {name: "channel", value: 10, type: 0, properties: ["channel": "type"]}
run/0: {name: "result", value: 1, type: 2-10, properties: ["result": "address":"channel"]} <- new/43 {name: "channel", value: 10, type: 0, properties: ["channel": "type"]}
mem/0: new alloc: 1031
mem/0: storing 1031 in location 1002
run/0: instruction init-channel/2
@ -113,7 +113,7 @@ run/0: address to copy is 1033
run/0: product 0 is 1033
mem/0: storing 1033 in location 1006
run/0: instruction init-channel/9
run/0: {name: "dest", value: 5, type: 2-2-5-1, properties: ["dest": "address":"address":"array":"location", "deref": ]} <- new/42 {name: "location", value: 1, type: 0, properties: ["location": "type"]}, {name: "capacity", value: 4, type: 1, properties: ["capacity": "integer"]}
run/0: {name: "dest", value: 5, type: 2-2-5-1, properties: ["dest": "address":"address":"array":"location", "deref": ]} <- new/43 {name: "location", value: 1, type: 0, properties: ["location": "type"]}, {name: "capacity", value: 4, type: 1, properties: ["capacity": "integer"]}
mem/0: location 1005 is 4
mem/0: array size is 4
mem/0: new alloc: 1034
@ -128,7 +128,7 @@ run/0: instruction run1001/1
run/0: {name: "1", value: 1, type: 2-10, properties: ["1": "address":"channel"]} <- write/109 {name: "1", value: 1, type: 2-10, properties: ["1": "address":"channel"]}, {name: "34", value: 34, type: 0, properties: ["34": "literal"]}
mem/0: location 1 is 1031
run/0: instruction write/0
run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new/42 {name: "location", value: 1, type: 0, properties: ["location": "type"]}, {name: "30", value: 30, type: 0, properties: ["30": "literal"]}
run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new/43 {name: "location", value: 1, type: 0, properties: ["location": "type"]}, {name: "30", value: 30, type: 0, properties: ["30": "literal"]}
mem/0: array size is 30
mem/0: new alloc: 1039
run/0: instruction write/1
@ -143,7 +143,7 @@ run/0: instruction write/4
run/0: {name: "full", value: 3, type: 3, properties: ["full": "boolean"]} <- channel-full?/110 {name: "chan", value: 1, type: 2-10, properties: ["chan": "address":"channel"]}
mem/0: location 1041 is 1031
run/0: instruction channel-full?/0
run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new/42 {name: "location", value: 1, type: 0, properties: ["location": "type"]}, {name: "30", value: 30, type: 0, properties: ["30": "literal"]}
run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new/43 {name: "location", value: 1, type: 0, properties: ["location": "type"]}, {name: "30", value: 30, type: 0, properties: ["30": "literal"]}
mem/0: array size is 30
mem/0: new alloc: 1070
run/0: instruction channel-full?/1
@ -171,7 +171,7 @@ run/0: instruction channel-full?/5
run/0: {name: "len", value: 3, type: 1, properties: ["len": "integer"]} <- channel-capacity/113 {name: "chan", value: 1, type: 2-10, properties: ["chan": "address":"channel"]}
mem/0: location 1072 is 1031
run/0: instruction channel-capacity/0
run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new/42 {name: "location", value: 1, type: 0, properties: ["location": "type"]}, {name: "30", value: 30, type: 0, properties: ["30": "literal"]}
run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new/43 {name: "location", value: 1, type: 0, properties: ["location": "type"]}, {name: "30", value: 30, type: 0, properties: ["30": "literal"]}
mem/0: array size is 30
mem/0: new alloc: 1101
run/0: instruction channel-capacity/1
@ -328,7 +328,7 @@ mem/0: location 1032 is 1
run/0: product 0 is 1
mem/0: storing 1 in location 3
run/0: instruction channel-write-increments-free/1
run/0: memory-should-contain/44 {name: "
run/0: memory-should-contain/45 {name: "
2 <- 0 # first-full
3 <- 1 # first-free
", value: 0, type: 0, properties: ["

View File

@ -24,7 +24,7 @@ after-brace/0: memory-should-contain ...
new/0: routine allocated memory from 1000 to 101000
schedule/0: channel-write-not-empty
run/0: instruction channel-write-not-empty/0
run/0: run/43 {name: "
run/0: run/44 {name: "
1:address:channel <- init-channel 3:literal/capacity
1:address:channel <- write 1:address:channel, 34:literal
2:integer <- channel-empty? 1:address:channel
@ -56,11 +56,11 @@ after-brace/0: channel-full? ...
run/0: instruction run1001/0
run/0: {name: "1", value: 1, type: 2-10, properties: ["1": "address":"channel"]} <- init-channel/108 {name: "3", value: 3, type: 0, properties: ["3": "literal", "capacity": ]}
run/0: instruction init-channel/0
run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new/42 {name: "location", value: 1, type: 0, properties: ["location": "type"]}, {name: "30", value: 30, type: 0, properties: ["30": "literal"]}
run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new/43 {name: "location", value: 1, type: 0, properties: ["location": "type"]}, {name: "30", value: 30, type: 0, properties: ["30": "literal"]}
mem/0: array size is 30
mem/0: new alloc: 1000
run/0: instruction init-channel/1
run/0: {name: "result", value: 1, type: 2-10, properties: ["result": "address":"channel"]} <- new/42 {name: "channel", value: 10, type: 0, properties: ["channel": "type"]}
run/0: {name: "result", value: 1, type: 2-10, properties: ["result": "address":"channel"]} <- new/43 {name: "channel", value: 10, type: 0, properties: ["channel": "type"]}
mem/0: new alloc: 1031
mem/0: storing 1031 in location 1002
run/0: instruction init-channel/2
@ -109,7 +109,7 @@ run/0: address to copy is 1033
run/0: product 0 is 1033
mem/0: storing 1033 in location 1006
run/0: instruction init-channel/9
run/0: {name: "dest", value: 5, type: 2-2-5-1, properties: ["dest": "address":"address":"array":"location", "deref": ]} <- new/42 {name: "location", value: 1, type: 0, properties: ["location": "type"]}, {name: "capacity", value: 4, type: 1, properties: ["capacity": "integer"]}
run/0: {name: "dest", value: 5, type: 2-2-5-1, properties: ["dest": "address":"address":"array":"location", "deref": ]} <- new/43 {name: "location", value: 1, type: 0, properties: ["location": "type"]}, {name: "capacity", value: 4, type: 1, properties: ["capacity": "integer"]}
mem/0: location 1005 is 4
mem/0: array size is 4
mem/0: new alloc: 1034
@ -124,7 +124,7 @@ run/0: instruction run1001/1
run/0: {name: "1", value: 1, type: 2-10, properties: ["1": "address":"channel"]} <- write/109 {name: "1", value: 1, type: 2-10, properties: ["1": "address":"channel"]}, {name: "34", value: 34, type: 0, properties: ["34": "literal"]}
mem/0: location 1 is 1031
run/0: instruction write/0
run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new/42 {name: "location", value: 1, type: 0, properties: ["location": "type"]}, {name: "30", value: 30, type: 0, properties: ["30": "literal"]}
run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new/43 {name: "location", value: 1, type: 0, properties: ["location": "type"]}, {name: "30", value: 30, type: 0, properties: ["30": "literal"]}
mem/0: array size is 30
mem/0: new alloc: 1039
run/0: instruction write/1
@ -139,7 +139,7 @@ run/0: instruction write/4
run/0: {name: "full", value: 3, type: 3, properties: ["full": "boolean"]} <- channel-full?/110 {name: "chan", value: 1, type: 2-10, properties: ["chan": "address":"channel"]}
mem/0: location 1041 is 1031
run/0: instruction channel-full?/0
run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new/42 {name: "location", value: 1, type: 0, properties: ["location": "type"]}, {name: "30", value: 30, type: 0, properties: ["30": "literal"]}
run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new/43 {name: "location", value: 1, type: 0, properties: ["location": "type"]}, {name: "30", value: 30, type: 0, properties: ["30": "literal"]}
mem/0: array size is 30
mem/0: new alloc: 1070
run/0: instruction channel-full?/1
@ -167,7 +167,7 @@ run/0: instruction channel-full?/5
run/0: {name: "len", value: 3, type: 1, properties: ["len": "integer"]} <- channel-capacity/113 {name: "chan", value: 1, type: 2-10, properties: ["chan": "address":"channel"]}
mem/0: location 1072 is 1031
run/0: instruction channel-capacity/0
run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new/42 {name: "location", value: 1, type: 0, properties: ["location": "type"]}, {name: "30", value: 30, type: 0, properties: ["30": "literal"]}
run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new/43 {name: "location", value: 1, type: 0, properties: ["location": "type"]}, {name: "30", value: 30, type: 0, properties: ["30": "literal"]}
mem/0: array size is 30
mem/0: new alloc: 1101
run/0: instruction channel-capacity/1
@ -307,7 +307,7 @@ run/0: instruction run1001/2
run/0: {name: "2", value: 2, type: 1, properties: ["2": "integer"]} <- channel-empty?/112 {name: "1", value: 1, type: 2-10, properties: ["1": "address":"channel"]}
mem/0: location 1 is 1031
run/0: instruction channel-empty?/0
run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new/42 {name: "location", value: 1, type: 0, properties: ["location": "type"]}, {name: "30", value: 30, type: 0, properties: ["30": "literal"]}
run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new/43 {name: "location", value: 1, type: 0, properties: ["location": "type"]}, {name: "30", value: 30, type: 0, properties: ["30": "literal"]}
mem/0: array size is 30
mem/0: new alloc: 1132
run/0: instruction channel-empty?/1
@ -351,7 +351,7 @@ run/0: instruction run1001/3
run/0: {name: "3", value: 3, type: 1, properties: ["3": "integer"]} <- channel-full?/110 {name: "1", value: 1, type: 2-10, properties: ["1": "address":"channel"]}
mem/0: location 1 is 1031
run/0: instruction channel-full?/0
run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new/42 {name: "location", value: 1, type: 0, properties: ["location": "type"]}, {name: "30", value: 30, type: 0, properties: ["30": "literal"]}
run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new/43 {name: "location", value: 1, type: 0, properties: ["location": "type"]}, {name: "30", value: 30, type: 0, properties: ["30": "literal"]}
mem/0: array size is 30
mem/0: new alloc: 1163
run/0: instruction channel-full?/1
@ -379,7 +379,7 @@ run/0: instruction channel-full?/5
run/0: {name: "len", value: 3, type: 1, properties: ["len": "integer"]} <- channel-capacity/113 {name: "chan", value: 1, type: 2-10, properties: ["chan": "address":"channel"]}
mem/0: location 1165 is 1031
run/0: instruction channel-capacity/0
run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new/42 {name: "location", value: 1, type: 0, properties: ["location": "type"]}, {name: "30", value: 30, type: 0, properties: ["30": "literal"]}
run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new/43 {name: "location", value: 1, type: 0, properties: ["location": "type"]}, {name: "30", value: 30, type: 0, properties: ["30": "literal"]}
mem/0: array size is 30
mem/0: new alloc: 1194
run/0: instruction channel-capacity/1
@ -443,7 +443,7 @@ mem/0: location 1170 is 0
run/0: result 0 is 0
mem/0: storing 0 in location 3
run/0: instruction channel-write-not-empty/1
run/0: memory-should-contain/44 {name: "
run/0: memory-should-contain/45 {name: "
2 <- 0 # empty?
3 <- 0 # full?
", value: 0, type: 0, properties: ["

View File

@ -22,7 +22,7 @@ after-brace/0: memory-should-contain ...
new/0: routine allocated memory from 1000 to 101000
schedule/0: check_string_in_memory
run/0: instruction check_string_in_memory/0
run/0: run/43 {name: "
run/0: run/44 {name: "
1:integer <- copy 3:literal
2:character <- copy 97:literal # 'a'
3:character <- copy 98:literal # 'b'
@ -67,7 +67,7 @@ run/0: {name: "4", value: 4, type: 4, properties: ["4": "character"]} <- copy/1
run/0: ingredient 0 is 99
mem/0: storing 99 in location 4
run/0: instruction check_string_in_memory/1
run/0: memory-should-contain/44 {name: "
run/0: memory-should-contain/45 {name: "
1:string <- [abc]
", value: 0, type: 0, properties: ["
1:string <- [abc]

View File

@ -16,7 +16,7 @@ after-brace/0: trace-should-contain ...
new/0: routine allocated memory from 1000 to 101000
schedule/0: check_trace
run/0: instruction check_trace/0
run/0: run/43 {name: "
run/0: run/44 {name: "
1:integer <- add 2:literal, 2:literal
", value: 0, type: 0, properties: ["
1:integer <- add 2:literal, 2:literal
@ -34,7 +34,7 @@ run/0: ingredient 1 is 2
run/0: product 0 is 4
mem/0: storing 4 in location 1
run/0: instruction check_trace/1
run/0: trace-should-contain/45 {name: "
run/0: trace-should-contain/46 {name: "
mem: storing 4 in location 1
", value: 0, type: 0, properties: ["
mem: storing 4 in location 1

View File

@ -16,7 +16,7 @@ after-brace/0: trace-should-contain ...
new/0: routine allocated memory from 1000 to 101000
schedule/0: check_trace_instruction
run/0: instruction check_trace_instruction/0
run/0: run/43 {name: "
run/0: run/44 {name: "
trace [foo], [aaa]
", value: 0, type: 0, properties: ["
trace [foo], [aaa]
@ -30,7 +30,7 @@ run/0: instruction run1001/0
run/0: trace/18 {name: "foo", value: 0, type: 0, properties: ["foo": "literal-string"]}, {name: "aaa", value: 0, type: 0, properties: ["aaa": "literal-string"]}
foo/0: aaa
run/0: instruction check_trace_instruction/1
run/0: trace-should-contain/45 {name: "
run/0: trace-should-contain/46 {name: "
foo: aaa
", value: 0, type: 0, properties: ["
foo: aaa

View File

@ -16,7 +16,7 @@ after-brace/0: trace-should-not-contain ...
new/0: routine allocated memory from 1000 to 101000
schedule/0: check_trace_negative
run/0: instruction check_trace_negative/0
run/0: run/43 {name: "
run/0: run/44 {name: "
1:integer <- add 2:literal, 2:literal
", value: 0, type: 0, properties: ["
1:integer <- add 2:literal, 2:literal
@ -34,7 +34,7 @@ run/0: ingredient 1 is 2
run/0: product 0 is 4
mem/0: storing 4 in location 1
run/0: instruction check_trace_negative/1
run/0: trace-should-not-contain/46 {name: "
run/0: trace-should-not-contain/47 {name: "
mem: storing 5 in location 1
", value: 0, type: 0, properties: ["
mem: storing 5 in location 1

View File

@ -46,7 +46,7 @@ after-brace/0: memory-should-contain ...
new/0: routine allocated memory from 1000 to 101000
schedule/0: clear-line-erases-printed-characters
run/0: instruction clear-line-erases-printed-characters/0
run/0: run/43 {name: "
run/0: run/44 {name: "
#? $start-tracing #? 3
1:address:screen <- init-fake-screen 3:literal/width, 2:literal/height
# print a character
@ -103,11 +103,11 @@ after-brace/0: copy ...
run/0: instruction run1001/0
run/0: {name: "1", value: 1, type: 2-11, properties: ["1": "address":"screen"]} <- init-fake-screen/115 {name: "3", value: 3, type: 0, properties: ["3": "literal", "width": ]}, {name: "2", value: 2, type: 0, properties: ["2": "literal", "height": ]}
run/0: instruction init-fake-screen/0
run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new/42 {name: "location", value: 1, type: 0, properties: ["location": "type"]}, {name: "30", value: 30, type: 0, properties: ["30": "literal", "capacity": ]}
run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new/43 {name: "location", value: 1, type: 0, properties: ["location": "type"]}, {name: "30", value: 30, type: 0, properties: ["30": "literal", "capacity": ]}
mem/0: array size is 30
mem/0: new alloc: 1000
run/0: instruction init-fake-screen/1
run/0: {name: "result", value: 1, type: 2-11, properties: ["result": "address":"screen"]} <- new/42 {name: "screen", value: 11, type: 0, properties: ["screen": "type"]}
run/0: {name: "result", value: 1, type: 2-11, properties: ["result": "address":"screen"]} <- new/43 {name: "screen", value: 11, type: 0, properties: ["screen": "type"]}
mem/0: new alloc: 1031
mem/0: storing 1031 in location 1002
run/0: instruction init-fake-screen/2
@ -182,7 +182,7 @@ run/0: address to copy is 1035
run/0: product 0 is 1035
mem/0: storing 1035 in location 1008
run/0: instruction init-fake-screen/12
run/0: {name: "buf", value: 7, type: 2-2-5-4, properties: ["buf": "address":"address":"array":"character", "deref": ]} <- new/42 {name: "character", value: 0, type: 0, properties: ["character": "literal"]}, {name: "bufsize", value: 6, type: 1, properties: ["bufsize": "integer"]}
run/0: {name: "buf", value: 7, type: 2-2-5-4, properties: ["buf": "address":"address":"array":"character", "deref": ]} <- new/43 {name: "character", value: 0, type: 0, properties: ["character": "literal"]}, {name: "bufsize", value: 6, type: 1, properties: ["bufsize": "integer"]}
mem/0: location 1007 is 6
mem/0: array size is 6
mem/0: new alloc: 1036
@ -192,7 +192,7 @@ run/0: instruction init-fake-screen/13
run/0: clear-screen/116 {name: "result", value: 1, type: 2-11, properties: ["result": "address":"screen"]}
mem/0: location 1002 is 1031
run/0: instruction clear-screen/0
run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new/42 {name: "location", value: 1, type: 0, properties: ["location": "type"]}, {name: "30", value: 30, type: 0, properties: ["30": "literal"]}
run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new/43 {name: "location", value: 1, type: 0, properties: ["location": "type"]}, {name: "30", value: 30, type: 0, properties: ["30": "literal"]}
mem/0: array size is 30
mem/0: new alloc: 1043
run/0: instruction clear-screen/1
@ -476,7 +476,7 @@ run/0: instruction run1001/1
run/0: {name: "1", value: 1, type: 2-11, properties: ["1": "address":"screen"]} <- print-character/117 {name: "1", value: 1, type: 2-11, properties: ["1": "address":"screen"]}, {name: "97", value: 97, type: 0, properties: ["97": "literal"]}
mem/0: location 1 is 1031
run/0: instruction print-character/0
run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new/42 {name: "location", value: 1, type: 0, properties: ["location": "type"]}, {name: "30", value: 30, type: 0, properties: ["30": "literal"]}
run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new/43 {name: "location", value: 1, type: 0, properties: ["location": "type"]}, {name: "30", value: 30, type: 0, properties: ["30": "literal"]}
mem/0: array size is 30
mem/0: new alloc: 1074
run/0: instruction print-character/1
@ -594,7 +594,7 @@ run/0: instruction run1001/2
run/0: {name: "1", value: 1, type: 2-11, properties: ["1": "address":"screen"]} <- move-cursor/120 {name: "1", value: 1, type: 2-11, properties: ["1": "address":"screen"]}, {name: "0", value: 0, type: 0, properties: ["0": "literal", "row": ]}, {name: "0", value: 0, type: 0, properties: ["0": "literal", "column": ]}
mem/0: location 1 is 1031
run/0: instruction move-cursor/0
run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new/42 {name: "location", value: 1, type: 0, properties: ["location": "type"]}, {name: "30", value: 30, type: 0, properties: ["30": "literal"]}
run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new/43 {name: "location", value: 1, type: 0, properties: ["location": "type"]}, {name: "30", value: 30, type: 0, properties: ["30": "literal"]}
mem/0: array size is 30
mem/0: new alloc: 1105
run/0: instruction move-cursor/1
@ -651,7 +651,7 @@ run/0: instruction run1001/3
run/0: {name: "1", value: 1, type: 2-11, properties: ["1": "address":"screen"]} <- clear-line/118 {name: "1", value: 1, type: 2-11, properties: ["1": "address":"screen"]}
mem/0: location 1 is 1031
run/0: instruction clear-line/0
run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new/42 {name: "location", value: 1, type: 0, properties: ["location": "type"]}, {name: "30", value: 30, type: 0, properties: ["30": "literal"]}
run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new/43 {name: "location", value: 1, type: 0, properties: ["location": "type"]}, {name: "30", value: 30, type: 0, properties: ["30": "literal"]}
mem/0: array size is 30
mem/0: new alloc: 1136
run/0: instruction clear-line/1
@ -705,7 +705,7 @@ run/0: instruction clear-line/10
run/0: print-character/117 {name: "x", value: 1, type: 2-11, properties: ["x": "address":"screen"]}, {name: " ", value: 0, type: 0, properties: [" ": "literal-string"]}
mem/0: location 1138 is 1031
run/0: instruction print-character/0
run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new/42 {name: "location", value: 1, type: 0, properties: ["location": "type"]}, {name: "30", value: 30, type: 0, properties: ["30": "literal"]}
run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new/43 {name: "location", value: 1, type: 0, properties: ["location": "type"]}, {name: "30", value: 30, type: 0, properties: ["30": "literal"]}
mem/0: array size is 30
mem/0: new alloc: 1167
run/0: instruction print-character/1
@ -839,7 +839,7 @@ run/0: instruction clear-line/10
run/0: print-character/117 {name: "x", value: 1, type: 2-11, properties: ["x": "address":"screen"]}, {name: " ", value: 0, type: 0, properties: [" ": "literal-string"]}
mem/0: location 1138 is 1031
run/0: instruction print-character/0
run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new/42 {name: "location", value: 1, type: 0, properties: ["location": "type"]}, {name: "30", value: 30, type: 0, properties: ["30": "literal"]}
run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new/43 {name: "location", value: 1, type: 0, properties: ["location": "type"]}, {name: "30", value: 30, type: 0, properties: ["30": "literal"]}
mem/0: array size is 30
mem/0: new alloc: 1198
run/0: instruction print-character/1
@ -973,7 +973,7 @@ run/0: instruction clear-line/10
run/0: print-character/117 {name: "x", value: 1, type: 2-11, properties: ["x": "address":"screen"]}, {name: " ", value: 0, type: 0, properties: [" ": "literal-string"]}
mem/0: location 1138 is 1031
run/0: instruction print-character/0
run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new/42 {name: "location", value: 1, type: 0, properties: ["location": "type"]}, {name: "30", value: 30, type: 0, properties: ["30": "literal"]}
run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new/43 {name: "location", value: 1, type: 0, properties: ["location": "type"]}, {name: "30", value: 30, type: 0, properties: ["30": "literal"]}
mem/0: array size is 30
mem/0: new alloc: 1229
run/0: instruction print-character/1
@ -1144,7 +1144,7 @@ mem/0: storing 0 in location 7
mem/0: storing 0 in location 8
mem/0: storing 0 in location 9
run/0: instruction clear-line-erases-printed-characters/1
run/0: memory-should-contain/44 {name: "
run/0: memory-should-contain/45 {name: "
3 <- 6 # width*height
4 <- 0
5 <- 0

View File

@ -36,11 +36,11 @@ schedule/0: clear-line-erases-printed-characters2
run/0: instruction clear-line-erases-printed-characters2/0
run/0: {name: "screen", value: 900, type: 2, properties: ["screen": "address"]} <- assume-screen/115 {name: "5", value: 5, type: 0, properties: ["5": "literal", "width": ]}, {name: "3", value: 3, type: 0, properties: ["3": "literal", "height": ]}
run/0: instruction init-fake-screen/0
run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new/42 {name: "location", value: 1, type: 0, properties: ["location": "type"]}, {name: "30", value: 30, type: 0, properties: ["30": "literal", "capacity": ]}
run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new/43 {name: "location", value: 1, type: 0, properties: ["location": "type"]}, {name: "30", value: 30, type: 0, properties: ["30": "literal", "capacity": ]}
mem/0: array size is 30
mem/0: new alloc: 1000
run/0: instruction init-fake-screen/1
run/0: {name: "result", value: 1, type: 2-11, properties: ["result": "address":"screen"]} <- new/42 {name: "screen", value: 11, type: 0, properties: ["screen": "type"]}
run/0: {name: "result", value: 1, type: 2-11, properties: ["result": "address":"screen"]} <- new/43 {name: "screen", value: 11, type: 0, properties: ["screen": "type"]}
mem/0: new alloc: 1031
mem/0: storing 1031 in location 1002
run/0: instruction init-fake-screen/2
@ -115,7 +115,7 @@ run/0: address to copy is 1035
run/0: product 0 is 1035
mem/0: storing 1035 in location 1008
run/0: instruction init-fake-screen/12
run/0: {name: "buf", value: 7, type: 2-2-5-4, properties: ["buf": "address":"address":"array":"character", "deref": ]} <- new/42 {name: "character", value: 0, type: 0, properties: ["character": "literal"]}, {name: "bufsize", value: 6, type: 1, properties: ["bufsize": "integer"]}
run/0: {name: "buf", value: 7, type: 2-2-5-4, properties: ["buf": "address":"address":"array":"character", "deref": ]} <- new/43 {name: "character", value: 0, type: 0, properties: ["character": "literal"]}, {name: "bufsize", value: 6, type: 1, properties: ["bufsize": "integer"]}
mem/0: location 1007 is 15
mem/0: array size is 15
mem/0: new alloc: 1036
@ -125,7 +125,7 @@ run/0: instruction init-fake-screen/13
run/0: clear-screen/116 {name: "result", value: 1, type: 2-11, properties: ["result": "address":"screen"]}
mem/0: location 1002 is 1031
run/0: instruction clear-screen/0
run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new/42 {name: "location", value: 1, type: 0, properties: ["location": "type"]}, {name: "30", value: 30, type: 0, properties: ["30": "literal"]}
run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new/43 {name: "location", value: 1, type: 0, properties: ["location": "type"]}, {name: "30", value: 30, type: 0, properties: ["30": "literal"]}
mem/0: array size is 30
mem/0: new alloc: 1052
run/0: instruction clear-screen/1
@ -748,7 +748,7 @@ mem/0: location 1002 is 1031
run/0: result 0 is 1031
mem/0: storing 1031 in location 900
run/0: instruction clear-line-erases-printed-characters2/1
run/0: run/43 {name: "
run/0: run/44 {name: "
# print a character
screen:address <- print-character screen:address, 97:literal # 'a'
# move cursor to start of line
@ -783,7 +783,7 @@ run/0: instruction run1001/0
run/0: {name: "screen", value: 900, type: 2, properties: ["screen": "address"]} <- print-character/117 {name: "screen", value: 900, type: 2, properties: ["screen": "address"]}, {name: "97", value: 97, type: 0, properties: ["97": "literal"]}
mem/0: location 900 is 1031
run/0: instruction print-character/0
run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new/42 {name: "location", value: 1, type: 0, properties: ["location": "type"]}, {name: "30", value: 30, type: 0, properties: ["30": "literal"]}
run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new/43 {name: "location", value: 1, type: 0, properties: ["location": "type"]}, {name: "30", value: 30, type: 0, properties: ["30": "literal"]}
mem/0: array size is 30
mem/0: new alloc: 1083
run/0: instruction print-character/1
@ -901,7 +901,7 @@ run/0: instruction run1001/1
run/0: {name: "screen", value: 900, type: 2, properties: ["screen": "address"]} <- move-cursor/120 {name: "screen", value: 900, type: 2, properties: ["screen": "address"]}, {name: "0", value: 0, type: 0, properties: ["0": "literal", "row": ]}, {name: "0", value: 0, type: 0, properties: ["0": "literal", "column": ]}
mem/0: location 900 is 1031
run/0: instruction move-cursor/0
run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new/42 {name: "location", value: 1, type: 0, properties: ["location": "type"]}, {name: "30", value: 30, type: 0, properties: ["30": "literal"]}
run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new/43 {name: "location", value: 1, type: 0, properties: ["location": "type"]}, {name: "30", value: 30, type: 0, properties: ["30": "literal"]}
mem/0: array size is 30
mem/0: new alloc: 1114
run/0: instruction move-cursor/1
@ -958,7 +958,7 @@ run/0: instruction run1001/2
run/0: {name: "screen", value: 900, type: 2, properties: ["screen": "address"]} <- clear-line/118 {name: "screen", value: 900, type: 2, properties: ["screen": "address"]}
mem/0: location 900 is 1031
run/0: instruction clear-line/0
run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new/42 {name: "location", value: 1, type: 0, properties: ["location": "type"]}, {name: "30", value: 30, type: 0, properties: ["30": "literal"]}
run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new/43 {name: "location", value: 1, type: 0, properties: ["location": "type"]}, {name: "30", value: 30, type: 0, properties: ["30": "literal"]}
mem/0: array size is 30
mem/0: new alloc: 1145
run/0: instruction clear-line/1
@ -1012,7 +1012,7 @@ run/0: instruction clear-line/10
run/0: print-character/117 {name: "x", value: 1, type: 2-11, properties: ["x": "address":"screen"]}, {name: " ", value: 0, type: 0, properties: [" ": "literal-string"]}
mem/0: location 1147 is 1031
run/0: instruction print-character/0
run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new/42 {name: "location", value: 1, type: 0, properties: ["location": "type"]}, {name: "30", value: 30, type: 0, properties: ["30": "literal"]}
run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new/43 {name: "location", value: 1, type: 0, properties: ["location": "type"]}, {name: "30", value: 30, type: 0, properties: ["30": "literal"]}
mem/0: array size is 30
mem/0: new alloc: 1176
run/0: instruction print-character/1
@ -1146,7 +1146,7 @@ run/0: instruction clear-line/10
run/0: print-character/117 {name: "x", value: 1, type: 2-11, properties: ["x": "address":"screen"]}, {name: " ", value: 0, type: 0, properties: [" ": "literal-string"]}
mem/0: location 1147 is 1031
run/0: instruction print-character/0
run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new/42 {name: "location", value: 1, type: 0, properties: ["location": "type"]}, {name: "30", value: 30, type: 0, properties: ["30": "literal"]}
run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new/43 {name: "location", value: 1, type: 0, properties: ["location": "type"]}, {name: "30", value: 30, type: 0, properties: ["30": "literal"]}
mem/0: array size is 30
mem/0: new alloc: 1207
run/0: instruction print-character/1
@ -1280,7 +1280,7 @@ run/0: instruction clear-line/10
run/0: print-character/117 {name: "x", value: 1, type: 2-11, properties: ["x": "address":"screen"]}, {name: " ", value: 0, type: 0, properties: [" ": "literal-string"]}
mem/0: location 1147 is 1031
run/0: instruction print-character/0
run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new/42 {name: "location", value: 1, type: 0, properties: ["location": "type"]}, {name: "30", value: 30, type: 0, properties: ["30": "literal"]}
run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new/43 {name: "location", value: 1, type: 0, properties: ["location": "type"]}, {name: "30", value: 30, type: 0, properties: ["30": "literal"]}
mem/0: array size is 30
mem/0: new alloc: 1238
run/0: instruction print-character/1
@ -1414,7 +1414,7 @@ run/0: instruction clear-line/10
run/0: print-character/117 {name: "x", value: 1, type: 2-11, properties: ["x": "address":"screen"]}, {name: " ", value: 0, type: 0, properties: [" ": "literal-string"]}
mem/0: location 1147 is 1031
run/0: instruction print-character/0
run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new/42 {name: "location", value: 1, type: 0, properties: ["location": "type"]}, {name: "30", value: 30, type: 0, properties: ["30": "literal"]}
run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new/43 {name: "location", value: 1, type: 0, properties: ["location": "type"]}, {name: "30", value: 30, type: 0, properties: ["30": "literal"]}
mem/0: array size is 30
mem/0: new alloc: 1269
run/0: instruction print-character/1
@ -1548,7 +1548,7 @@ run/0: instruction clear-line/10
run/0: print-character/117 {name: "x", value: 1, type: 2-11, properties: ["x": "address":"screen"]}, {name: " ", value: 0, type: 0, properties: [" ": "literal-string"]}
mem/0: location 1147 is 1031
run/0: instruction print-character/0
run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new/42 {name: "location", value: 1, type: 0, properties: ["location": "type"]}, {name: "30", value: 30, type: 0, properties: ["30": "literal"]}
run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new/43 {name: "location", value: 1, type: 0, properties: ["location": "type"]}, {name: "30", value: 30, type: 0, properties: ["30": "literal"]}
mem/0: array size is 30
mem/0: new alloc: 1300
run/0: instruction print-character/1
@ -1691,7 +1691,7 @@ mem/0: location 1147 is 1031
run/0: result 0 is 1031
mem/0: storing 1031 in location 900
run/0: instruction clear-line-erases-printed-characters2/2
run/0: screen-should-contain/60 {name: "
run/0: screen-should-contain/61 {name: "
. .
. .
. .

View File

@ -63,13 +63,13 @@ after-brace/0: reply ...
new/0: routine allocated memory from 1000 to 101000
schedule/0: main
run/0: instruction main/0
run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new/42 {name: "location", value: 1, type: 0, properties: ["location": "type"]}, {name: "30", value: 30, type: 0, properties: ["30": "literal"]}
run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new/43 {name: "location", value: 1, type: 0, properties: ["location": "type"]}, {name: "30", value: 30, type: 0, properties: ["30": "literal"]}
mem/0: array size is 30
mem/0: new alloc: 1000
run/0: instruction main/1
run/0: {name: "1", value: 1, type: 2-5-1, properties: ["1": "address":"array":"location", "names": "init-counter"]} <- init-counter/1001
run/0: instruction init-counter/0
run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new/42 {name: "location", value: 1, type: 0, properties: ["location": "type"]}, {name: "30", value: 30, type: 0, properties: ["30": "literal"]}
run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new/43 {name: "location", value: 1, type: 0, properties: ["location": "type"]}, {name: "30", value: 30, type: 0, properties: ["30": "literal"]}
mem/0: array size is 30
mem/0: new alloc: 1031
run/0: instruction init-counter/1
@ -88,7 +88,7 @@ run/0: instruction main/2
run/0: {name: "2", value: 2, type: 1, properties: ["2": "integer", "raw": ]} <- increment-counter/1002 {name: "1", value: 1, type: 2-5-1, properties: ["1": "address":"array":"location", "names": "init-counter"]}
mem/0: location 1002 is 1031
run/0: instruction increment-counter/0
run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new/42 {name: "space", value: 0, type: 0, properties: ["space": "literal"]}, {name: "30", value: 30, type: 0, properties: ["30": "literal"]}
run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new/43 {name: "space", value: 0, type: 0, properties: ["space": "literal"]}, {name: "30", value: 30, type: 0, properties: ["30": "literal"]}
mem/0: array size is 30
mem/0: new alloc: 1062
run/0: instruction increment-counter/1
@ -115,7 +115,7 @@ run/0: instruction main/3
run/0: {name: "3", value: 3, type: 1, properties: ["3": "integer", "raw": ]} <- increment-counter/1002 {name: "1", value: 1, type: 2-5-1, properties: ["1": "address":"array":"location", "names": "init-counter"]}
mem/0: location 1002 is 1031
run/0: instruction increment-counter/0
run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new/42 {name: "space", value: 0, type: 0, properties: ["space": "literal"]}, {name: "30", value: 30, type: 0, properties: ["30": "literal"]}
run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new/43 {name: "space", value: 0, type: 0, properties: ["space": "literal"]}, {name: "30", value: 30, type: 0, properties: ["30": "literal"]}
mem/0: array size is 30
mem/0: new alloc: 1093
run/0: instruction increment-counter/1

View File

@ -16,7 +16,7 @@ after-brace/0: memory-should-contain ...
new/0: routine allocated memory from 1000 to 101000
schedule/0: first_scenario_in_mu
run/0: instruction first_scenario_in_mu/0
run/0: run/43 {name: "
run/0: run/44 {name: "
1:integer <- add 2:literal, 2:literal
", value: 0, type: 0, properties: ["
1:integer <- add 2:literal, 2:literal
@ -34,7 +34,7 @@ run/0: ingredient 1 is 2
run/0: product 0 is 4
mem/0: storing 4 in location 1
run/0: instruction first_scenario_in_mu/1
run/0: memory-should-contain/44 {name: "
run/0: memory-should-contain/45 {name: "
1 <- 4
", value: 0, type: 0, properties: ["
1 <- 4

View File

@ -22,7 +22,7 @@ after-brace/0: memory-should-contain ...
new/0: routine allocated memory from 1000 to 101000
schedule/0: integer-to-decimal-digit-negative
run/0: instruction integer-to-decimal-digit-negative/0
run/0: run/43 {name: "
run/0: run/44 {name: "
1:address:array:character/raw <- integer-to-decimal-string -1:literal
2:array:character/raw <- copy 1:address:array:character/deref/raw
", value: 0, type: 0, properties: ["
@ -41,7 +41,7 @@ after-brace/0: copy ...
run/0: instruction run1001/0
run/0: {name: "1", value: 1, type: 2-5-4, properties: ["1": "address":"array":"character", "raw": ]} <- integer-to-decimal-string/105 {name: "-1", value: -1, type: 0, properties: ["-1": "literal"]}
run/0: instruction integer-to-decimal-string/0
run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new/42 {name: "location", value: 1, type: 0, properties: ["location": "type"]}, {name: "30", value: 30, type: 0, properties: ["30": "literal"]}
run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new/43 {name: "location", value: 1, type: 0, properties: ["location": "type"]}, {name: "30", value: 30, type: 0, properties: ["30": "literal"]}
mem/0: array size is 30
mem/0: new alloc: 1000
run/0: instruction integer-to-decimal-string/1
@ -85,11 +85,11 @@ mem/0: storing 1 in location 1002
run/0: instruction integer-to-decimal-string/14
run/0: {name: "tmp", value: 5, type: 2-9, properties: ["tmp": "address":"buffer"]} <- init-buffer/101 {name: "30", value: 30, type: 0, properties: ["30": "literal"]}
run/0: instruction init-buffer/0
run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new/42 {name: "location", value: 1, type: 0, properties: ["location": "type"]}, {name: "30", value: 30, type: 0, properties: ["30": "literal"]}
run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new/43 {name: "location", value: 1, type: 0, properties: ["location": "type"]}, {name: "30", value: 30, type: 0, properties: ["30": "literal"]}
mem/0: array size is 30
mem/0: new alloc: 1031
run/0: instruction init-buffer/1
run/0: {name: "result", value: 1, type: 2-9, properties: ["result": "address":"buffer"]} <- new/42 {name: "buffer", value: 9, type: 0, properties: ["buffer": "type"]}
run/0: {name: "result", value: 1, type: 2-9, properties: ["result": "address":"buffer"]} <- new/43 {name: "buffer", value: 9, type: 0, properties: ["buffer": "type"]}
mem/0: new alloc: 1062
mem/0: storing 1062 in location 1033
run/0: instruction init-buffer/2
@ -118,7 +118,7 @@ run/0: {name: "capacity", value: 4, type: 1, properties: ["capacity": "integer"]
run/0: product 0 is 30
mem/0: storing 30 in location 1036
run/0: instruction init-buffer/6
run/0: {name: "s", value: 3, type: 2-2-5-4, properties: ["s": "address":"address":"array":"character", "deref": ]} <- new/42 {name: "character", value: 4, type: 0, properties: ["character": "type"]}, {name: "capacity", value: 4, type: 1, properties: ["capacity": "integer"]}
run/0: {name: "s", value: 3, type: 2-2-5-4, properties: ["s": "address":"address":"array":"character", "deref": ]} <- new/43 {name: "character", value: 4, type: 0, properties: ["character": "type"]}, {name: "capacity", value: 4, type: 1, properties: ["capacity": "integer"]}
mem/0: location 1036 is 30
mem/0: array size is 30
mem/0: new alloc: 1064
@ -167,7 +167,7 @@ run/0: {name: "tmp", value: 5, type: 2-9, properties: ["tmp": "address":"buffer"
mem/0: location 1006 is 1062
mem/0: location 1010 is 49
run/0: instruction buffer-append/0
run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new/42 {name: "location", value: 1, type: 0, properties: ["location": "type"]}, {name: "30", value: 30, type: 0, properties: ["30": "literal"]}
run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new/43 {name: "location", value: 1, type: 0, properties: ["location": "type"]}, {name: "30", value: 30, type: 0, properties: ["30": "literal"]}
mem/0: array size is 30
mem/0: new alloc: 1095
run/0: instruction buffer-append/1
@ -182,7 +182,7 @@ run/0: instruction buffer-append/4
run/0: {name: "full?", value: 3, type: 3, properties: ["full?": "boolean"]} <- buffer-full?/103 {name: "in", value: 1, type: 2-9, properties: ["in": "address":"buffer"]}
mem/0: location 1097 is 1062
run/0: instruction buffer-full?/0
run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new/42 {name: "location", value: 1, type: 0, properties: ["location": "type"]}, {name: "30", value: 30, type: 0, properties: ["30": "literal"]}
run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new/43 {name: "location", value: 1, type: 0, properties: ["location": "type"]}, {name: "30", value: 30, type: 0, properties: ["30": "literal"]}
mem/0: array size is 30
mem/0: new alloc: 1126
run/0: instruction buffer-full?/1
@ -306,7 +306,7 @@ run/0: instruction integer-to-decimal-string/26
run/0: {name: "tmp", value: 5, type: 2-9, properties: ["tmp": "address":"buffer"]} <- buffer-append/104 {name: "tmp", value: 5, type: 2-9, properties: ["tmp": "address":"buffer"]}, {name: "45", value: 45, type: 0, properties: ["45": "literal"]}
mem/0: location 1006 is 1062
run/0: instruction buffer-append/0
run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new/42 {name: "location", value: 1, type: 0, properties: ["location": "type"]}, {name: "30", value: 30, type: 0, properties: ["30": "literal"]}
run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new/43 {name: "location", value: 1, type: 0, properties: ["location": "type"]}, {name: "30", value: 30, type: 0, properties: ["30": "literal"]}
mem/0: array size is 30
mem/0: new alloc: 1157
run/0: instruction buffer-append/1
@ -321,7 +321,7 @@ run/0: instruction buffer-append/4
run/0: {name: "full?", value: 3, type: 3, properties: ["full?": "boolean"]} <- buffer-full?/103 {name: "in", value: 1, type: 2-9, properties: ["in": "address":"buffer"]}
mem/0: location 1159 is 1062
run/0: instruction buffer-full?/0
run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new/42 {name: "location", value: 1, type: 0, properties: ["location": "type"]}, {name: "30", value: 30, type: 0, properties: ["30": "literal"]}
run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new/43 {name: "location", value: 1, type: 0, properties: ["location": "type"]}, {name: "30", value: 30, type: 0, properties: ["30": "literal"]}
mem/0: array size is 30
mem/0: new alloc: 1188
run/0: instruction buffer-full?/1
@ -440,7 +440,7 @@ mem/0: location 1063 is 1064
run/0: product 0 is 1064
mem/0: storing 1064 in location 1012
run/0: instruction integer-to-decimal-string/30
run/0: {name: "result", value: 2, type: 2-5-4, properties: ["result": "address":"array":"character"]} <- new/42 {name: "character", value: 4, type: 0, properties: ["character": "type"]}, {name: "len", value: 10, type: 1, properties: ["len": "integer"]}
run/0: {name: "result", value: 2, type: 2-5-4, properties: ["result": "address":"array":"character"]} <- new/43 {name: "character", value: 4, type: 0, properties: ["character": "type"]}, {name: "len", value: 10, type: 1, properties: ["len": "integer"]}
mem/0: location 1011 is 2
mem/0: array size is 2
mem/0: new alloc: 1219
@ -597,7 +597,7 @@ mem/0: storing 2 in location 2
mem/0: storing 45 in location 3
mem/0: storing 49 in location 4
run/0: instruction integer-to-decimal-digit-negative/1
run/0: memory-should-contain/44 {name: "
run/0: memory-should-contain/45 {name: "
2 <- 2
3 <- 45 # '-'
4 <- 49 # '1'

View File

@ -18,7 +18,7 @@ after-brace/0: memory-should-contain ...
new/0: routine allocated memory from 1000 to 101000
schedule/0: integer-to-decimal-digit-positive
run/0: instruction integer-to-decimal-digit-positive/0
run/0: run/43 {name: "
run/0: run/44 {name: "
1:address:array:character/raw <- integer-to-decimal-string 234:literal
2:array:character/raw <- copy 1:address:array:character/deref/raw
", value: 0, type: 0, properties: ["
@ -37,7 +37,7 @@ after-brace/0: copy ...
run/0: instruction run1001/0
run/0: {name: "1", value: 1, type: 2-5-4, properties: ["1": "address":"array":"character", "raw": ]} <- integer-to-decimal-string/105 {name: "234", value: 234, type: 0, properties: ["234": "literal"]}
run/0: instruction integer-to-decimal-string/0
run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new/42 {name: "location", value: 1, type: 0, properties: ["location": "type"]}, {name: "30", value: 30, type: 0, properties: ["30": "literal"]}
run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new/43 {name: "location", value: 1, type: 0, properties: ["location": "type"]}, {name: "30", value: 30, type: 0, properties: ["30": "literal"]}
mem/0: array size is 30
mem/0: new alloc: 1000
run/0: instruction integer-to-decimal-string/1
@ -70,11 +70,11 @@ run/0: jumping to instruction 13
run/0: instruction integer-to-decimal-string/14
run/0: {name: "tmp", value: 5, type: 2-9, properties: ["tmp": "address":"buffer"]} <- init-buffer/101 {name: "30", value: 30, type: 0, properties: ["30": "literal"]}
run/0: instruction init-buffer/0
run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new/42 {name: "location", value: 1, type: 0, properties: ["location": "type"]}, {name: "30", value: 30, type: 0, properties: ["30": "literal"]}
run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new/43 {name: "location", value: 1, type: 0, properties: ["location": "type"]}, {name: "30", value: 30, type: 0, properties: ["30": "literal"]}
mem/0: array size is 30
mem/0: new alloc: 1031
run/0: instruction init-buffer/1
run/0: {name: "result", value: 1, type: 2-9, properties: ["result": "address":"buffer"]} <- new/42 {name: "buffer", value: 9, type: 0, properties: ["buffer": "type"]}
run/0: {name: "result", value: 1, type: 2-9, properties: ["result": "address":"buffer"]} <- new/43 {name: "buffer", value: 9, type: 0, properties: ["buffer": "type"]}
mem/0: new alloc: 1062
mem/0: storing 1062 in location 1033
run/0: instruction init-buffer/2
@ -103,7 +103,7 @@ run/0: {name: "capacity", value: 4, type: 1, properties: ["capacity": "integer"]
run/0: product 0 is 30
mem/0: storing 30 in location 1036
run/0: instruction init-buffer/6
run/0: {name: "s", value: 3, type: 2-2-5-4, properties: ["s": "address":"address":"array":"character", "deref": ]} <- new/42 {name: "character", value: 4, type: 0, properties: ["character": "type"]}, {name: "capacity", value: 4, type: 1, properties: ["capacity": "integer"]}
run/0: {name: "s", value: 3, type: 2-2-5-4, properties: ["s": "address":"address":"array":"character", "deref": ]} <- new/43 {name: "character", value: 4, type: 0, properties: ["character": "type"]}, {name: "capacity", value: 4, type: 1, properties: ["capacity": "integer"]}
mem/0: location 1036 is 30
mem/0: array size is 30
mem/0: new alloc: 1064
@ -152,7 +152,7 @@ run/0: {name: "tmp", value: 5, type: 2-9, properties: ["tmp": "address":"buffer"
mem/0: location 1006 is 1062
mem/0: location 1010 is 52
run/0: instruction buffer-append/0
run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new/42 {name: "location", value: 1, type: 0, properties: ["location": "type"]}, {name: "30", value: 30, type: 0, properties: ["30": "literal"]}
run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new/43 {name: "location", value: 1, type: 0, properties: ["location": "type"]}, {name: "30", value: 30, type: 0, properties: ["30": "literal"]}
mem/0: array size is 30
mem/0: new alloc: 1095
run/0: instruction buffer-append/1
@ -167,7 +167,7 @@ run/0: instruction buffer-append/4
run/0: {name: "full?", value: 3, type: 3, properties: ["full?": "boolean"]} <- buffer-full?/103 {name: "in", value: 1, type: 2-9, properties: ["in": "address":"buffer"]}
mem/0: location 1097 is 1062
run/0: instruction buffer-full?/0
run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new/42 {name: "location", value: 1, type: 0, properties: ["location": "type"]}, {name: "30", value: 30, type: 0, properties: ["30": "literal"]}
run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new/43 {name: "location", value: 1, type: 0, properties: ["location": "type"]}, {name: "30", value: 30, type: 0, properties: ["30": "literal"]}
mem/0: array size is 30
mem/0: new alloc: 1126
run/0: instruction buffer-full?/1
@ -303,7 +303,7 @@ run/0: {name: "tmp", value: 5, type: 2-9, properties: ["tmp": "address":"buffer"
mem/0: location 1006 is 1062
mem/0: location 1010 is 51
run/0: instruction buffer-append/0
run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new/42 {name: "location", value: 1, type: 0, properties: ["location": "type"]}, {name: "30", value: 30, type: 0, properties: ["30": "literal"]}
run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new/43 {name: "location", value: 1, type: 0, properties: ["location": "type"]}, {name: "30", value: 30, type: 0, properties: ["30": "literal"]}
mem/0: array size is 30
mem/0: new alloc: 1157
run/0: instruction buffer-append/1
@ -318,7 +318,7 @@ run/0: instruction buffer-append/4
run/0: {name: "full?", value: 3, type: 3, properties: ["full?": "boolean"]} <- buffer-full?/103 {name: "in", value: 1, type: 2-9, properties: ["in": "address":"buffer"]}
mem/0: location 1159 is 1062
run/0: instruction buffer-full?/0
run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new/42 {name: "location", value: 1, type: 0, properties: ["location": "type"]}, {name: "30", value: 30, type: 0, properties: ["30": "literal"]}
run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new/43 {name: "location", value: 1, type: 0, properties: ["location": "type"]}, {name: "30", value: 30, type: 0, properties: ["30": "literal"]}
mem/0: array size is 30
mem/0: new alloc: 1188
run/0: instruction buffer-full?/1
@ -454,7 +454,7 @@ run/0: {name: "tmp", value: 5, type: 2-9, properties: ["tmp": "address":"buffer"
mem/0: location 1006 is 1062
mem/0: location 1010 is 50
run/0: instruction buffer-append/0
run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new/42 {name: "location", value: 1, type: 0, properties: ["location": "type"]}, {name: "30", value: 30, type: 0, properties: ["30": "literal"]}
run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new/43 {name: "location", value: 1, type: 0, properties: ["location": "type"]}, {name: "30", value: 30, type: 0, properties: ["30": "literal"]}
mem/0: array size is 30
mem/0: new alloc: 1219
run/0: instruction buffer-append/1
@ -469,7 +469,7 @@ run/0: instruction buffer-append/4
run/0: {name: "full?", value: 3, type: 3, properties: ["full?": "boolean"]} <- buffer-full?/103 {name: "in", value: 1, type: 2-9, properties: ["in": "address":"buffer"]}
mem/0: location 1221 is 1062
run/0: instruction buffer-full?/0
run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new/42 {name: "location", value: 1, type: 0, properties: ["location": "type"]}, {name: "30", value: 30, type: 0, properties: ["30": "literal"]}
run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new/43 {name: "location", value: 1, type: 0, properties: ["location": "type"]}, {name: "30", value: 30, type: 0, properties: ["30": "literal"]}
mem/0: array size is 30
mem/0: new alloc: 1250
run/0: instruction buffer-full?/1
@ -611,7 +611,7 @@ mem/0: location 1063 is 1064
run/0: product 0 is 1064
mem/0: storing 1064 in location 1012
run/0: instruction integer-to-decimal-string/30
run/0: {name: "result", value: 2, type: 2-5-4, properties: ["result": "address":"array":"character"]} <- new/42 {name: "character", value: 4, type: 0, properties: ["character": "type"]}, {name: "len", value: 10, type: 1, properties: ["len": "integer"]}
run/0: {name: "result", value: 2, type: 2-5-4, properties: ["result": "address":"array":"character"]} <- new/43 {name: "character", value: 4, type: 0, properties: ["character": "type"]}, {name: "len", value: 10, type: 1, properties: ["len": "integer"]}
mem/0: location 1011 is 3
mem/0: array size is 3
mem/0: new alloc: 1281
@ -826,7 +826,7 @@ mem/0: storing 50 in location 3
mem/0: storing 51 in location 4
mem/0: storing 52 in location 5
run/0: instruction integer-to-decimal-digit-positive/1
run/0: memory-should-contain/44 {name: "
run/0: memory-should-contain/45 {name: "
2:string <- [234]
", value: 0, type: 0, properties: ["
2:string <- [234]

View File

@ -18,7 +18,7 @@ after-brace/0: memory-should-contain ...
new/0: routine allocated memory from 1000 to 101000
schedule/0: integer-to-decimal-digit-zero
run/0: instruction integer-to-decimal-digit-zero/0
run/0: run/43 {name: "
run/0: run/44 {name: "
1:address:array:character/raw <- integer-to-decimal-string 0:literal
2:array:character/raw <- copy 1:address:array:character/deref/raw
", value: 0, type: 0, properties: ["
@ -37,7 +37,7 @@ after-brace/0: copy ...
run/0: instruction run1001/0
run/0: {name: "1", value: 1, type: 2-5-4, properties: ["1": "address":"array":"character", "raw": ]} <- integer-to-decimal-string/105 {name: "0", value: 0, type: 0, properties: ["0": "literal"]}
run/0: instruction integer-to-decimal-string/0
run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new/42 {name: "location", value: 1, type: 0, properties: ["location": "type"]}, {name: "30", value: 30, type: 0, properties: ["30": "literal"]}
run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new/43 {name: "location", value: 1, type: 0, properties: ["location": "type"]}, {name: "30", value: 30, type: 0, properties: ["30": "literal"]}
mem/0: array size is 30
mem/0: new alloc: 1000
run/0: instruction integer-to-decimal-string/1
@ -50,7 +50,7 @@ mem/0: location 1002 is 0
run/0: ingredient 0 is 0
run/0: jump-if fell through
run/0: instruction integer-to-decimal-string/4
run/0: {name: "result", value: 2, type: 2-5-4, properties: ["result": "address":"array":"character"]} <- new/42 {name: "0", value: 0, type: 0, properties: ["0": "literal-string"]}
run/0: {name: "result", value: 2, type: 2-5-4, properties: ["result": "address":"array":"character"]} <- new/43 {name: "0", value: 0, type: 0, properties: ["0": "literal-string"]}
mem/0: storing 1031 in location 1003
run/0: instruction integer-to-decimal-string/5
run/0: reply/33 {name: "result", value: 2, type: 2-5-4, properties: ["result": "address":"array":"character"]}
@ -66,7 +66,7 @@ mem/0: location 1032 is 48
mem/0: storing 1 in location 2
mem/0: storing 48 in location 3
run/0: instruction integer-to-decimal-digit-zero/1
run/0: memory-should-contain/44 {name: "
run/0: memory-should-contain/45 {name: "
2:string <- [0]
", value: 0, type: 0, properties: ["
2:string <- [0]

View File

@ -22,7 +22,7 @@ after-brace/0: memory-should-contain ...
new/0: routine allocated memory from 1000 to 101000
schedule/0: interpolate-at-end
run/0: instruction interpolate-at-end/0
run/0: run/43 {name: "
run/0: run/44 {name: "
1:address:array:character/raw <- new [hello, _]
2:address:array:character/raw <- new [abc]
3:address:array:character/raw <- interpolate 1:address:array:character/raw, 2:address:array:character/raw
@ -54,17 +54,17 @@ after-brace/0: new ...
after-brace/0: interpolate ...
after-brace/0: copy ...
run/0: instruction run1001/0
run/0: {name: "1", value: 1, type: 2-5-4, properties: ["1": "address":"array":"character", "raw": ]} <- new/42 {name: "hello, _", value: 0, type: 0, properties: ["hello, _": "literal-string"]}
run/0: {name: "1", value: 1, type: 2-5-4, properties: ["1": "address":"array":"character", "raw": ]} <- new/43 {name: "hello, _", value: 0, type: 0, properties: ["hello, _": "literal-string"]}
mem/0: storing 1000 in location 1
run/0: instruction run1001/1
run/0: {name: "2", value: 2, type: 2-5-4, properties: ["2": "address":"array":"character", "raw": ]} <- new/42 {name: "abc", value: 0, type: 0, properties: ["abc": "literal-string"]}
run/0: {name: "2", value: 2, type: 2-5-4, properties: ["2": "address":"array":"character", "raw": ]} <- new/43 {name: "abc", value: 0, type: 0, properties: ["abc": "literal-string"]}
mem/0: storing 1009 in location 2
run/0: instruction run1001/2
run/0: {name: "3", value: 3, type: 2-5-4, properties: ["3": "address":"array":"character", "raw": ]} <- interpolate/107 {name: "1", value: 1, type: 2-5-4, properties: ["1": "address":"array":"character", "raw": ]}, {name: "2", value: 2, type: 2-5-4, properties: ["2": "address":"array":"character", "raw": ]}
mem/0: location 1 is 1000
mem/0: location 2 is 1009
run/0: instruction interpolate/0
run/0: {name: "default-space", value: 0, type: 5-2-1, properties: ["default-space": "array":"address":"location"]} <- new/42 {name: "location", value: 1, type: 0, properties: ["location": "type"]}, {name: "60", value: 60, type: 0, properties: ["60": "literal"]}
run/0: {name: "default-space", value: 0, type: 5-2-1, properties: ["default-space": "array":"address":"location"]} <- new/43 {name: "location", value: 1, type: 0, properties: ["location": "type"]}, {name: "60", value: 60, type: 0, properties: ["60": "literal"]}
mem/0: array size is 60
mem/0: new alloc: 1013
run/0: instruction interpolate/1
@ -128,7 +128,7 @@ run/0: instruction interpolate/13
run/0: {name: "_", value: 0, type: 0, properties: ["_": "dummy"]} <- next-ingredient/30
run/0: product 0 is 1000
run/0: instruction interpolate/14
run/0: {name: "result", value: 7, type: 2-5-4, properties: ["result": "address":"array":"character"]} <- new/42 {name: "character", value: 4, type: 0, properties: ["character": "type"]}, {name: "result-len", value: 3, type: 1, properties: ["result-len": "integer"]}
run/0: {name: "result", value: 7, type: 2-5-4, properties: ["result": "address":"array":"character"]} <- new/43 {name: "character", value: 4, type: 0, properties: ["character": "type"]}, {name: "result-len", value: 3, type: 1, properties: ["result-len": "integer"]}
mem/0: location 1017 is 10
mem/0: array size is 10
mem/0: new alloc: 1074
@ -926,7 +926,7 @@ mem/0: storing 97 in location 12
mem/0: storing 98 in location 13
mem/0: storing 99 in location 14
run/0: instruction interpolate-at-end/1
run/0: memory-should-contain/44 {name: "
run/0: memory-should-contain/45 {name: "
4:string <- [hello, abc]
", value: 0, type: 0, properties: ["
4:string <- [hello, abc]

View File

@ -24,7 +24,7 @@ after-brace/0: memory-should-contain ...
new/0: routine allocated memory from 1000 to 101000
schedule/0: interpolate-at-start
run/0: instruction interpolate-at-start/0
run/0: run/43 {name: "
run/0: run/44 {name: "
1:address:array:character/raw <- new [_, hello!]
2:address:array:character/raw <- new [abc]
3:address:array:character/raw <- interpolate 1:address:array:character/raw, 2:address:array:character/raw
@ -56,17 +56,17 @@ after-brace/0: new ...
after-brace/0: interpolate ...
after-brace/0: copy ...
run/0: instruction run1001/0
run/0: {name: "1", value: 1, type: 2-5-4, properties: ["1": "address":"array":"character", "raw": ]} <- new/42 {name: "_, hello!", value: 0, type: 0, properties: ["_, hello!": "literal-string"]}
run/0: {name: "1", value: 1, type: 2-5-4, properties: ["1": "address":"array":"character", "raw": ]} <- new/43 {name: "_, hello!", value: 0, type: 0, properties: ["_, hello!": "literal-string"]}
mem/0: storing 1000 in location 1
run/0: instruction run1001/1
run/0: {name: "2", value: 2, type: 2-5-4, properties: ["2": "address":"array":"character", "raw": ]} <- new/42 {name: "abc", value: 0, type: 0, properties: ["abc": "literal-string"]}
run/0: {name: "2", value: 2, type: 2-5-4, properties: ["2": "address":"array":"character", "raw": ]} <- new/43 {name: "abc", value: 0, type: 0, properties: ["abc": "literal-string"]}
mem/0: storing 1010 in location 2
run/0: instruction run1001/2
run/0: {name: "3", value: 3, type: 2-5-4, properties: ["3": "address":"array":"character", "raw": ]} <- interpolate/107 {name: "1", value: 1, type: 2-5-4, properties: ["1": "address":"array":"character", "raw": ]}, {name: "2", value: 2, type: 2-5-4, properties: ["2": "address":"array":"character", "raw": ]}
mem/0: location 1 is 1000
mem/0: location 2 is 1010
run/0: instruction interpolate/0
run/0: {name: "default-space", value: 0, type: 5-2-1, properties: ["default-space": "array":"address":"location"]} <- new/42 {name: "location", value: 1, type: 0, properties: ["location": "type"]}, {name: "60", value: 60, type: 0, properties: ["60": "literal"]}
run/0: {name: "default-space", value: 0, type: 5-2-1, properties: ["default-space": "array":"address":"location"]} <- new/43 {name: "location", value: 1, type: 0, properties: ["location": "type"]}, {name: "60", value: 60, type: 0, properties: ["60": "literal"]}
mem/0: array size is 60
mem/0: new alloc: 1014
run/0: instruction interpolate/1
@ -130,7 +130,7 @@ run/0: instruction interpolate/13
run/0: {name: "_", value: 0, type: 0, properties: ["_": "dummy"]} <- next-ingredient/30
run/0: product 0 is 1000
run/0: instruction interpolate/14
run/0: {name: "result", value: 7, type: 2-5-4, properties: ["result": "address":"array":"character"]} <- new/42 {name: "character", value: 4, type: 0, properties: ["character": "type"]}, {name: "result-len", value: 3, type: 1, properties: ["result-len": "integer"]}
run/0: {name: "result", value: 7, type: 2-5-4, properties: ["result": "address":"array":"character"]} <- new/43 {name: "character", value: 4, type: 0, properties: ["character": "type"]}, {name: "result-len", value: 3, type: 1, properties: ["result-len": "integer"]}
mem/0: location 1018 is 11
mem/0: array size is 11
mem/0: new alloc: 1075
@ -903,7 +903,7 @@ mem/0: storing 108 in location 13
mem/0: storing 111 in location 14
mem/0: storing 33 in location 15
run/0: instruction interpolate-at-start/1
run/0: memory-should-contain/44 {name: "
run/0: memory-should-contain/45 {name: "
4:string <- [abc, hello!]
16 <- 0 # out of bounds
", value: 0, type: 0, properties: ["

View File

@ -22,7 +22,7 @@ after-brace/0: memory-should-contain ...
new/0: routine allocated memory from 1000 to 101000
schedule/0: interpolate-works
run/0: instruction interpolate-works/0
run/0: run/43 {name: "
run/0: run/44 {name: "
1:address:array:character/raw <- new [abc _]
2:address:array:character/raw <- new [def]
3:address:array:character/raw <- interpolate 1:address:array:character/raw, 2:address:array:character/raw
@ -54,17 +54,17 @@ after-brace/0: new ...
after-brace/0: interpolate ...
after-brace/0: copy ...
run/0: instruction run1001/0
run/0: {name: "1", value: 1, type: 2-5-4, properties: ["1": "address":"array":"character", "raw": ]} <- new/42 {name: "abc _", value: 0, type: 0, properties: ["abc _": "literal-string"]}
run/0: {name: "1", value: 1, type: 2-5-4, properties: ["1": "address":"array":"character", "raw": ]} <- new/43 {name: "abc _", value: 0, type: 0, properties: ["abc _": "literal-string"]}
mem/0: storing 1000 in location 1
run/0: instruction run1001/1
run/0: {name: "2", value: 2, type: 2-5-4, properties: ["2": "address":"array":"character", "raw": ]} <- new/42 {name: "def", value: 0, type: 0, properties: ["def": "literal-string"]}
run/0: {name: "2", value: 2, type: 2-5-4, properties: ["2": "address":"array":"character", "raw": ]} <- new/43 {name: "def", value: 0, type: 0, properties: ["def": "literal-string"]}
mem/0: storing 1006 in location 2
run/0: instruction run1001/2
run/0: {name: "3", value: 3, type: 2-5-4, properties: ["3": "address":"array":"character", "raw": ]} <- interpolate/107 {name: "1", value: 1, type: 2-5-4, properties: ["1": "address":"array":"character", "raw": ]}, {name: "2", value: 2, type: 2-5-4, properties: ["2": "address":"array":"character", "raw": ]}
mem/0: location 1 is 1000
mem/0: location 2 is 1006
run/0: instruction interpolate/0
run/0: {name: "default-space", value: 0, type: 5-2-1, properties: ["default-space": "array":"address":"location"]} <- new/42 {name: "location", value: 1, type: 0, properties: ["location": "type"]}, {name: "60", value: 60, type: 0, properties: ["60": "literal"]}
run/0: {name: "default-space", value: 0, type: 5-2-1, properties: ["default-space": "array":"address":"location"]} <- new/43 {name: "location", value: 1, type: 0, properties: ["location": "type"]}, {name: "60", value: 60, type: 0, properties: ["60": "literal"]}
mem/0: array size is 60
mem/0: new alloc: 1010
run/0: instruction interpolate/1
@ -128,7 +128,7 @@ run/0: instruction interpolate/13
run/0: {name: "_", value: 0, type: 0, properties: ["_": "dummy"]} <- next-ingredient/30
run/0: product 0 is 1000
run/0: instruction interpolate/14
run/0: {name: "result", value: 7, type: 2-5-4, properties: ["result": "address":"array":"character"]} <- new/42 {name: "character", value: 4, type: 0, properties: ["character": "type"]}, {name: "result-len", value: 3, type: 1, properties: ["result-len": "integer"]}
run/0: {name: "result", value: 7, type: 2-5-4, properties: ["result": "address":"array":"character"]} <- new/43 {name: "character", value: 4, type: 0, properties: ["character": "type"]}, {name: "result-len", value: 3, type: 1, properties: ["result-len": "integer"]}
mem/0: location 1014 is 7
mem/0: array size is 7
mem/0: new alloc: 1071
@ -713,7 +713,7 @@ mem/0: storing 100 in location 9
mem/0: storing 101 in location 10
mem/0: storing 102 in location 11
run/0: instruction interpolate-works/1
run/0: memory-should-contain/44 {name: "
run/0: memory-should-contain/45 {name: "
4:string <- [abc def]
", value: 0, type: 0, properties: ["
4:string <- [abc def]

View File

@ -41,17 +41,17 @@ after-brace/0: memory-should-contain ...
new/0: routine allocated memory from 1000 to 101000
schedule/0: keyboard-in-scenario
run/0: instruction keyboard-in-scenario/0
run/0: {name: "keyboard", value: 901, type: 2, properties: ["keyboard": "address"]} <- assume-keyboard/42 {name: "abc", value: 0, type: 0, properties: ["abc": "literal-string"]}
run/0: {name: "keyboard", value: 901, type: 2, properties: ["keyboard": "address"]} <- assume-keyboard/43 {name: "abc", value: 0, type: 0, properties: ["abc": "literal-string"]}
mem/0: storing 1000 in location 901
run/0: instruction keyboard-in-scenario/1
run/0: {name: "keyboard", value: 901, type: 2, properties: ["keyboard": "address"]} <- assume-keyboard/125 {name: "keyboard", value: 901, type: 2, properties: ["keyboard": "address"]}
mem/0: location 901 is 1000
run/0: instruction init-fake-keyboard/0
run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new/42 {name: "location", value: 1, type: 0, properties: ["location": "type"]}, {name: "30", value: 30, type: 0, properties: ["30": "literal"]}
run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new/43 {name: "location", value: 1, type: 0, properties: ["location": "type"]}, {name: "30", value: 30, type: 0, properties: ["30": "literal"]}
mem/0: array size is 30
mem/0: new alloc: 1004
run/0: instruction init-fake-keyboard/1
run/0: {name: "result", value: 1, type: 2-12, properties: ["result": "address":"keyboard"]} <- new/42 {name: "keyboard", value: 12, type: 0, properties: ["keyboard": "type"]}
run/0: {name: "result", value: 1, type: 2-12, properties: ["result": "address":"keyboard"]} <- new/43 {name: "keyboard", value: 12, type: 0, properties: ["keyboard": "type"]}
mem/0: new alloc: 1035
mem/0: storing 1035 in location 1006
run/0: instruction init-fake-keyboard/2
@ -86,7 +86,7 @@ mem/0: location 1006 is 1035
run/0: result 0 is 1035
mem/0: storing 1035 in location 901
run/0: instruction keyboard-in-scenario/2
run/0: run/43 {name: "
run/0: run/44 {name: "
1:character, 2:boolean, keyboard:address <- read-key keyboard:address
3:character, 4:boolean, keyboard:address <- read-key keyboard:address
5:character, 6:boolean, keyboard:address <- read-key keyboard:address
@ -126,7 +126,7 @@ run/0: instruction run1002/0
run/0: {name: "1", value: 1, type: 4, properties: ["1": "character"]}, {name: "2", value: 2, type: 3, properties: ["2": "boolean"]}, {name: "keyboard", value: 901, type: 2, properties: ["keyboard": "address"]} <- read-key/126 {name: "keyboard", value: 901, type: 2, properties: ["keyboard": "address"]}
mem/0: location 901 is 1035
run/0: instruction read-key/0
run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new/42 {name: "location", value: 1, type: 0, properties: ["location": "type"]}, {name: "30", value: 30, type: 0, properties: ["30": "literal"]}
run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new/43 {name: "location", value: 1, type: 0, properties: ["location": "type"]}, {name: "30", value: 30, type: 0, properties: ["30": "literal"]}
mem/0: array size is 30
mem/0: new alloc: 1037
run/0: instruction read-key/1
@ -210,7 +210,7 @@ run/0: instruction run1002/1
run/0: {name: "3", value: 3, type: 4, properties: ["3": "character"]}, {name: "4", value: 4, type: 3, properties: ["4": "boolean"]}, {name: "keyboard", value: 901, type: 2, properties: ["keyboard": "address"]} <- read-key/126 {name: "keyboard", value: 901, type: 2, properties: ["keyboard": "address"]}
mem/0: location 901 is 1035
run/0: instruction read-key/0
run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new/42 {name: "location", value: 1, type: 0, properties: ["location": "type"]}, {name: "30", value: 30, type: 0, properties: ["30": "literal"]}
run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new/43 {name: "location", value: 1, type: 0, properties: ["location": "type"]}, {name: "30", value: 30, type: 0, properties: ["30": "literal"]}
mem/0: array size is 30
mem/0: new alloc: 1068
run/0: instruction read-key/1
@ -294,7 +294,7 @@ run/0: instruction run1002/2
run/0: {name: "5", value: 5, type: 4, properties: ["5": "character"]}, {name: "6", value: 6, type: 3, properties: ["6": "boolean"]}, {name: "keyboard", value: 901, type: 2, properties: ["keyboard": "address"]} <- read-key/126 {name: "keyboard", value: 901, type: 2, properties: ["keyboard": "address"]}
mem/0: location 901 is 1035
run/0: instruction read-key/0
run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new/42 {name: "location", value: 1, type: 0, properties: ["location": "type"]}, {name: "30", value: 30, type: 0, properties: ["30": "literal"]}
run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new/43 {name: "location", value: 1, type: 0, properties: ["location": "type"]}, {name: "30", value: 30, type: 0, properties: ["30": "literal"]}
mem/0: array size is 30
mem/0: new alloc: 1099
run/0: instruction read-key/1
@ -378,7 +378,7 @@ run/0: instruction run1002/3
run/0: {name: "7", value: 7, type: 4, properties: ["7": "character"]}, {name: "8", value: 8, type: 3, properties: ["8": "boolean"]}, {name: "keyboard", value: 901, type: 2, properties: ["keyboard": "address"]} <- read-key/126 {name: "keyboard", value: 901, type: 2, properties: ["keyboard": "address"]}
mem/0: location 901 is 1035
run/0: instruction read-key/0
run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new/42 {name: "location", value: 1, type: 0, properties: ["location": "type"]}, {name: "30", value: 30, type: 0, properties: ["30": "literal"]}
run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new/43 {name: "location", value: 1, type: 0, properties: ["location": "type"]}, {name: "30", value: 30, type: 0, properties: ["30": "literal"]}
mem/0: array size is 30
mem/0: new alloc: 1130
run/0: instruction read-key/1
@ -436,7 +436,7 @@ mem/0: storing 0 in location 8
run/0: result 2 is 1035
mem/0: storing 1035 in location 901
run/0: instruction keyboard-in-scenario/3
run/0: memory-should-contain/44 {name: "
run/0: memory-should-contain/45 {name: "
1 <- 97 # 'a'
2 <- 1 # first read-key call found a character
3 <- 98 # 'b'

View File

@ -9,7 +9,7 @@ after-brace/0: memory-should-contain ...
new/0: routine allocated memory from 1000 to 101000
schedule/0: main
run/0: instruction main/0
run/0: memory-should-contain/44 {name: "
run/0: memory-should-contain/45 {name: "
1 <- 13
", value: 0, type: 0, properties: ["
1 <- 13

View File

@ -11,7 +11,7 @@ after-brace/0: memory-should-contain ...
new/0: routine allocated memory from 1000 to 101000
schedule/0: main
run/0: instruction main/0
run/0: memory-should-contain/44 {name: "
run/0: memory-should-contain/45 {name: "
1 <- 0
1 <- 0
", value: 0, type: 0, properties: ["

View File

@ -41,7 +41,7 @@ run/0: {name: "4", value: 4, type: 1, properties: ["4": "integer"]} <- copy/1 {n
run/0: ingredient 0 is 99
mem/0: storing 99 in location 4
run/0: instruction main/4
run/0: memory-should-contain/44 {name: "
run/0: memory-should-contain/45 {name: "
1:string <- [abc]
", value: 0, type: 0, properties: ["
1:string <- [abc]

View File

@ -41,7 +41,7 @@ run/0: {name: "4", value: 4, type: 1, properties: ["4": "integer"]} <- copy/1 {n
run/0: ingredient 0 is 99
mem/0: storing 99 in location 4
run/0: instruction main/4
run/0: memory-should-contain/44 {name: "
run/0: memory-should-contain/45 {name: "
1:string <- [ab]
", value: 0, type: 0, properties: ["
1:string <- [ab]

View File

@ -17,11 +17,11 @@ after-brace/0: equal ...
new/0: routine allocated memory from 1000 to 101000
schedule/0: main
run/0: instruction main/0
run/0: {name: "1", value: 1, type: 2-1, properties: ["1": "address":"integer", "raw": ]} <- new/42 {name: "integer", value: 1, type: 0, properties: ["integer": "type"]}
run/0: {name: "1", value: 1, type: 2-1, properties: ["1": "address":"integer", "raw": ]} <- new/43 {name: "integer", value: 1, type: 0, properties: ["integer": "type"]}
mem/0: new alloc: 1000
mem/0: storing 1000 in location 1
run/0: instruction main/1
run/0: {name: "2", value: 2, type: 2-1, properties: ["2": "address":"integer", "raw": ]} <- new/42 {name: "integer", value: 1, type: 0, properties: ["integer": "type"]}
run/0: {name: "2", value: 2, type: 2-1, properties: ["2": "address":"integer", "raw": ]} <- new/43 {name: "integer", value: 1, type: 0, properties: ["integer": "type"]}
mem/0: new alloc: 1001
mem/0: storing 1001 in location 2
run/0: instruction main/2

View File

@ -18,12 +18,12 @@ after-brace/0: subtract ...
new/0: routine allocated memory from 1000 to 101000
schedule/0: main
run/0: instruction main/0
run/0: {name: "1", value: 1, type: 2-5-1, properties: ["1": "address":"array":"integer", "raw": ]} <- new/42 {name: "integer", value: 1, type: 0, properties: ["integer": "type"]}, {name: "5", value: 5, type: 0, properties: ["5": "literal"]}
run/0: {name: "1", value: 1, type: 2-5-1, properties: ["1": "address":"array":"integer", "raw": ]} <- new/43 {name: "integer", value: 1, type: 0, properties: ["integer": "type"]}, {name: "5", value: 5, type: 0, properties: ["5": "literal"]}
mem/0: array size is 5
mem/0: new alloc: 1000
mem/0: storing 1000 in location 1
run/0: instruction main/1
run/0: {name: "2", value: 2, type: 2-1, properties: ["2": "address":"integer", "raw": ]} <- new/42 {name: "integer", value: 1, type: 0, properties: ["integer": "type"]}
run/0: {name: "2", value: 2, type: 2-1, properties: ["2": "address":"integer", "raw": ]} <- new/43 {name: "integer", value: 1, type: 0, properties: ["integer": "type"]}
mem/0: new alloc: 1006
mem/0: storing 1006 in location 2
run/0: instruction main/2

View File

@ -25,12 +25,12 @@ run/0: start-running/34 {name: "f2", value: 0, type: 0, properties: ["f2": "reci
run/0: ingredient 0 is f2
new/0: routine allocated memory from 101000 to 201000
run/0: instruction f1/1
run/0: {name: "1", value: 1, type: 2-1, properties: ["1": "address":"integer", "raw": ]} <- new/42 {name: "integer", value: 1, type: 0, properties: ["integer": "type"]}
run/0: {name: "1", value: 1, type: 2-1, properties: ["1": "address":"integer", "raw": ]} <- new/43 {name: "integer", value: 1, type: 0, properties: ["integer": "type"]}
mem/0: new alloc: 1000
mem/0: storing 1000 in location 1
schedule/0: f2
run/0: instruction f2/0
run/0: {name: "2", value: 2, type: 2-1, properties: ["2": "address":"integer", "raw": ]} <- new/42 {name: "integer", value: 1, type: 0, properties: ["integer": "type"]}
run/0: {name: "2", value: 2, type: 2-1, properties: ["2": "address":"integer", "raw": ]} <- new/43 {name: "integer", value: 1, type: 0, properties: ["integer": "type"]}
mem/0: new alloc: 101000
mem/0: storing 101000 in location 2
run/0: instruction f2/1

View File

@ -12,11 +12,11 @@ after-brace/0: new ...
new/0: routine allocated memory from 1000 to 1002
schedule/0: main
run/0: instruction main/0
run/0: {name: "1", value: 1, type: 2-1, properties: ["1": "address":"integer", "raw": ]} <- new/42 {name: "integer", value: 1, type: 0, properties: ["integer": "type"]}
run/0: {name: "1", value: 1, type: 2-1, properties: ["1": "address":"integer", "raw": ]} <- new/43 {name: "integer", value: 1, type: 0, properties: ["integer": "type"]}
mem/0: new alloc: 1000
mem/0: storing 1000 in location 1
run/0: instruction main/1
run/0: {name: "2", value: 2, type: 2-6, properties: ["2": "address":"point", "raw": ]} <- new/42 {name: "point", value: 6, type: 0, properties: ["point": "type"]}
run/0: {name: "2", value: 2, type: 2-6, properties: ["2": "address":"point", "raw": ]} <- new/43 {name: "point", value: 6, type: 0, properties: ["point": "type"]}
new/0: routine allocated memory from 1002 to 1004
mem/0: new alloc: 1002
mem/0: storing 1002 in location 2

View File

@ -12,7 +12,7 @@ after-brace/0: index ...
new/0: routine allocated memory from 1000 to 101000
schedule/0: main
run/0: instruction main/0
run/0: {name: "1", value: 1, type: 2-5-4, properties: ["1": "address":"array":"character"]} <- new/42 {name: "abc def", value: 0, type: 0, properties: ["abc def": "literal-string"]}
run/0: {name: "1", value: 1, type: 2-5-4, properties: ["1": "address":"array":"character"]} <- new/43 {name: "abc def", value: 0, type: 0, properties: ["abc def": "literal-string"]}
mem/0: storing 1000 in location 1
run/0: instruction main/1
run/0: {name: "2", value: 2, type: 4, properties: ["2": "character"]} <- index/26 {name: "1", value: 1, type: 2-5-4, properties: ["1": "address":"array":"character", "deref": ]}, {name: "5", value: 5, type: 0, properties: ["5": "literal"]}

View File

@ -28,7 +28,7 @@ after-brace/0: memory-should-contain ...
new/0: routine allocated memory from 1000 to 101000
schedule/0: print-character-at-top-left
run/0: instruction print-character-at-top-left/0
run/0: run/43 {name: "
run/0: run/44 {name: "
#? $start-tracing #? 3
1:address:screen <- init-fake-screen 3:literal/width, 2:literal/height
1:address:screen <- print-character 1:address:screen, 97:literal # 'a'
@ -65,11 +65,11 @@ after-brace/0: copy ...
run/0: instruction run1001/0
run/0: {name: "1", value: 1, type: 2-11, properties: ["1": "address":"screen"]} <- init-fake-screen/115 {name: "3", value: 3, type: 0, properties: ["3": "literal", "width": ]}, {name: "2", value: 2, type: 0, properties: ["2": "literal", "height": ]}
run/0: instruction init-fake-screen/0
run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new/42 {name: "location", value: 1, type: 0, properties: ["location": "type"]}, {name: "30", value: 30, type: 0, properties: ["30": "literal", "capacity": ]}
run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new/43 {name: "location", value: 1, type: 0, properties: ["location": "type"]}, {name: "30", value: 30, type: 0, properties: ["30": "literal", "capacity": ]}
mem/0: array size is 30
mem/0: new alloc: 1000
run/0: instruction init-fake-screen/1
run/0: {name: "result", value: 1, type: 2-11, properties: ["result": "address":"screen"]} <- new/42 {name: "screen", value: 11, type: 0, properties: ["screen": "type"]}
run/0: {name: "result", value: 1, type: 2-11, properties: ["result": "address":"screen"]} <- new/43 {name: "screen", value: 11, type: 0, properties: ["screen": "type"]}
mem/0: new alloc: 1031
mem/0: storing 1031 in location 1002
run/0: instruction init-fake-screen/2
@ -144,7 +144,7 @@ run/0: address to copy is 1035
run/0: product 0 is 1035
mem/0: storing 1035 in location 1008
run/0: instruction init-fake-screen/12
run/0: {name: "buf", value: 7, type: 2-2-5-4, properties: ["buf": "address":"address":"array":"character", "deref": ]} <- new/42 {name: "character", value: 0, type: 0, properties: ["character": "literal"]}, {name: "bufsize", value: 6, type: 1, properties: ["bufsize": "integer"]}
run/0: {name: "buf", value: 7, type: 2-2-5-4, properties: ["buf": "address":"address":"array":"character", "deref": ]} <- new/43 {name: "character", value: 0, type: 0, properties: ["character": "literal"]}, {name: "bufsize", value: 6, type: 1, properties: ["bufsize": "integer"]}
mem/0: location 1007 is 6
mem/0: array size is 6
mem/0: new alloc: 1036
@ -154,7 +154,7 @@ run/0: instruction init-fake-screen/13
run/0: clear-screen/116 {name: "result", value: 1, type: 2-11, properties: ["result": "address":"screen"]}
mem/0: location 1002 is 1031
run/0: instruction clear-screen/0
run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new/42 {name: "location", value: 1, type: 0, properties: ["location": "type"]}, {name: "30", value: 30, type: 0, properties: ["30": "literal"]}
run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new/43 {name: "location", value: 1, type: 0, properties: ["location": "type"]}, {name: "30", value: 30, type: 0, properties: ["30": "literal"]}
mem/0: array size is 30
mem/0: new alloc: 1043
run/0: instruction clear-screen/1
@ -438,7 +438,7 @@ run/0: instruction run1001/1
run/0: {name: "1", value: 1, type: 2-11, properties: ["1": "address":"screen"]} <- print-character/117 {name: "1", value: 1, type: 2-11, properties: ["1": "address":"screen"]}, {name: "97", value: 97, type: 0, properties: ["97": "literal"]}
mem/0: location 1 is 1031
run/0: instruction print-character/0
run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new/42 {name: "location", value: 1, type: 0, properties: ["location": "type"]}, {name: "30", value: 30, type: 0, properties: ["30": "literal"]}
run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new/43 {name: "location", value: 1, type: 0, properties: ["location": "type"]}, {name: "30", value: 30, type: 0, properties: ["30": "literal"]}
mem/0: array size is 30
mem/0: new alloc: 1074
run/0: instruction print-character/1
@ -581,7 +581,7 @@ mem/0: storing 0 in location 7
mem/0: storing 0 in location 8
mem/0: storing 0 in location 9
run/0: instruction print-character-at-top-left/1
run/0: memory-should-contain/44 {name: "
run/0: memory-should-contain/45 {name: "
3 <- 6 # width*height
4 <- 97 # 'a'
5 <- 0

View File

@ -24,11 +24,11 @@ schedule/0: print-character-at-top-left2
run/0: instruction print-character-at-top-left2/0
run/0: {name: "screen", value: 900, type: 2, properties: ["screen": "address"]} <- assume-screen/115 {name: "3", value: 3, type: 0, properties: ["3": "literal", "width": ]}, {name: "2", value: 2, type: 0, properties: ["2": "literal", "height": ]}
run/0: instruction init-fake-screen/0
run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new/42 {name: "location", value: 1, type: 0, properties: ["location": "type"]}, {name: "30", value: 30, type: 0, properties: ["30": "literal", "capacity": ]}
run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new/43 {name: "location", value: 1, type: 0, properties: ["location": "type"]}, {name: "30", value: 30, type: 0, properties: ["30": "literal", "capacity": ]}
mem/0: array size is 30
mem/0: new alloc: 1000
run/0: instruction init-fake-screen/1
run/0: {name: "result", value: 1, type: 2-11, properties: ["result": "address":"screen"]} <- new/42 {name: "screen", value: 11, type: 0, properties: ["screen": "type"]}
run/0: {name: "result", value: 1, type: 2-11, properties: ["result": "address":"screen"]} <- new/43 {name: "screen", value: 11, type: 0, properties: ["screen": "type"]}
mem/0: new alloc: 1031
mem/0: storing 1031 in location 1002
run/0: instruction init-fake-screen/2
@ -103,7 +103,7 @@ run/0: address to copy is 1035
run/0: product 0 is 1035
mem/0: storing 1035 in location 1008
run/0: instruction init-fake-screen/12
run/0: {name: "buf", value: 7, type: 2-2-5-4, properties: ["buf": "address":"address":"array":"character", "deref": ]} <- new/42 {name: "character", value: 0, type: 0, properties: ["character": "literal"]}, {name: "bufsize", value: 6, type: 1, properties: ["bufsize": "integer"]}
run/0: {name: "buf", value: 7, type: 2-2-5-4, properties: ["buf": "address":"address":"array":"character", "deref": ]} <- new/43 {name: "character", value: 0, type: 0, properties: ["character": "literal"]}, {name: "bufsize", value: 6, type: 1, properties: ["bufsize": "integer"]}
mem/0: location 1007 is 6
mem/0: array size is 6
mem/0: new alloc: 1036
@ -113,7 +113,7 @@ run/0: instruction init-fake-screen/13
run/0: clear-screen/116 {name: "result", value: 1, type: 2-11, properties: ["result": "address":"screen"]}
mem/0: location 1002 is 1031
run/0: instruction clear-screen/0
run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new/42 {name: "location", value: 1, type: 0, properties: ["location": "type"]}, {name: "30", value: 30, type: 0, properties: ["30": "literal"]}
run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new/43 {name: "location", value: 1, type: 0, properties: ["location": "type"]}, {name: "30", value: 30, type: 0, properties: ["30": "literal"]}
mem/0: array size is 30
mem/0: new alloc: 1043
run/0: instruction clear-screen/1
@ -394,7 +394,7 @@ mem/0: location 1002 is 1031
run/0: result 0 is 1031
mem/0: storing 1031 in location 900
run/0: instruction print-character-at-top-left2/1
run/0: run/43 {name: "
run/0: run/44 {name: "
screen:address <- print-character screen:address, 97:literal # 'a'
", value: 0, type: 0, properties: ["
screen:address <- print-character screen:address, 97:literal # 'a'
@ -409,7 +409,7 @@ run/0: instruction run1001/0
run/0: {name: "screen", value: 900, type: 2, properties: ["screen": "address"]} <- print-character/117 {name: "screen", value: 900, type: 2, properties: ["screen": "address"]}, {name: "97", value: 97, type: 0, properties: ["97": "literal"]}
mem/0: location 900 is 1031
run/0: instruction print-character/0
run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new/42 {name: "location", value: 1, type: 0, properties: ["location": "type"]}, {name: "30", value: 30, type: 0, properties: ["30": "literal"]}
run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new/43 {name: "location", value: 1, type: 0, properties: ["location": "type"]}, {name: "30", value: 30, type: 0, properties: ["30": "literal"]}
mem/0: array size is 30
mem/0: new alloc: 1074
run/0: instruction print-character/1
@ -524,7 +524,7 @@ mem/0: location 1076 is 1031
run/0: result 0 is 1031
mem/0: storing 1031 in location 900
run/0: instruction print-character-at-top-left2/2
run/0: screen-should-contain/60 {name: "
run/0: screen-should-contain/61 {name: "
.a .
. .
", value: 0, type: 0, properties: ["

View File

@ -41,17 +41,17 @@ after-brace/0: memory-should-contain ...
new/0: routine allocated memory from 1000 to 101000
schedule/0: read-key-in-mu
run/0: instruction read-key-in-mu/0
run/0: {name: "keyboard", value: 901, type: 2, properties: ["keyboard": "address"]} <- assume-keyboard/42 {name: "abc", value: 0, type: 0, properties: ["abc": "literal-string"]}
run/0: {name: "keyboard", value: 901, type: 2, properties: ["keyboard": "address"]} <- assume-keyboard/43 {name: "abc", value: 0, type: 0, properties: ["abc": "literal-string"]}
mem/0: storing 1000 in location 901
run/0: instruction read-key-in-mu/1
run/0: {name: "keyboard", value: 901, type: 2, properties: ["keyboard": "address"]} <- assume-keyboard/125 {name: "keyboard", value: 901, type: 2, properties: ["keyboard": "address"]}
mem/0: location 901 is 1000
run/0: instruction init-fake-keyboard/0
run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new/42 {name: "location", value: 1, type: 0, properties: ["location": "type"]}, {name: "30", value: 30, type: 0, properties: ["30": "literal"]}
run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new/43 {name: "location", value: 1, type: 0, properties: ["location": "type"]}, {name: "30", value: 30, type: 0, properties: ["30": "literal"]}
mem/0: array size is 30
mem/0: new alloc: 1004
run/0: instruction init-fake-keyboard/1
run/0: {name: "result", value: 1, type: 2-12, properties: ["result": "address":"keyboard"]} <- new/42 {name: "keyboard", value: 12, type: 0, properties: ["keyboard": "type"]}
run/0: {name: "result", value: 1, type: 2-12, properties: ["result": "address":"keyboard"]} <- new/43 {name: "keyboard", value: 12, type: 0, properties: ["keyboard": "type"]}
mem/0: new alloc: 1035
mem/0: storing 1035 in location 1006
run/0: instruction init-fake-keyboard/2
@ -86,7 +86,7 @@ mem/0: location 1006 is 1035
run/0: result 0 is 1035
mem/0: storing 1035 in location 901
run/0: instruction read-key-in-mu/2
run/0: run/43 {name: "
run/0: run/44 {name: "
1:character, 2:boolean, keyboard:address <- read-key keyboard:address
3:character, 4:boolean, keyboard:address <- read-key keyboard:address
5:character, 6:boolean, keyboard:address <- read-key keyboard:address
@ -126,7 +126,7 @@ run/0: instruction run1001/0
run/0: {name: "1", value: 1, type: 4, properties: ["1": "character"]}, {name: "2", value: 2, type: 3, properties: ["2": "boolean"]}, {name: "keyboard", value: 901, type: 2, properties: ["keyboard": "address"]} <- read-key/126 {name: "keyboard", value: 901, type: 2, properties: ["keyboard": "address"]}
mem/0: location 901 is 1035
run/0: instruction read-key/0
run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new/42 {name: "location", value: 1, type: 0, properties: ["location": "type"]}, {name: "30", value: 30, type: 0, properties: ["30": "literal"]}
run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new/43 {name: "location", value: 1, type: 0, properties: ["location": "type"]}, {name: "30", value: 30, type: 0, properties: ["30": "literal"]}
mem/0: array size is 30
mem/0: new alloc: 1037
run/0: instruction read-key/1
@ -210,7 +210,7 @@ run/0: instruction run1001/1
run/0: {name: "3", value: 3, type: 4, properties: ["3": "character"]}, {name: "4", value: 4, type: 3, properties: ["4": "boolean"]}, {name: "keyboard", value: 901, type: 2, properties: ["keyboard": "address"]} <- read-key/126 {name: "keyboard", value: 901, type: 2, properties: ["keyboard": "address"]}
mem/0: location 901 is 1035
run/0: instruction read-key/0
run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new/42 {name: "location", value: 1, type: 0, properties: ["location": "type"]}, {name: "30", value: 30, type: 0, properties: ["30": "literal"]}
run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new/43 {name: "location", value: 1, type: 0, properties: ["location": "type"]}, {name: "30", value: 30, type: 0, properties: ["30": "literal"]}
mem/0: array size is 30
mem/0: new alloc: 1068
run/0: instruction read-key/1
@ -294,7 +294,7 @@ run/0: instruction run1001/2
run/0: {name: "5", value: 5, type: 4, properties: ["5": "character"]}, {name: "6", value: 6, type: 3, properties: ["6": "boolean"]}, {name: "keyboard", value: 901, type: 2, properties: ["keyboard": "address"]} <- read-key/126 {name: "keyboard", value: 901, type: 2, properties: ["keyboard": "address"]}
mem/0: location 901 is 1035
run/0: instruction read-key/0
run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new/42 {name: "location", value: 1, type: 0, properties: ["location": "type"]}, {name: "30", value: 30, type: 0, properties: ["30": "literal"]}
run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new/43 {name: "location", value: 1, type: 0, properties: ["location": "type"]}, {name: "30", value: 30, type: 0, properties: ["30": "literal"]}
mem/0: array size is 30
mem/0: new alloc: 1099
run/0: instruction read-key/1
@ -378,7 +378,7 @@ run/0: instruction run1001/3
run/0: {name: "7", value: 7, type: 4, properties: ["7": "character"]}, {name: "8", value: 8, type: 3, properties: ["8": "boolean"]}, {name: "keyboard", value: 901, type: 2, properties: ["keyboard": "address"]} <- read-key/126 {name: "keyboard", value: 901, type: 2, properties: ["keyboard": "address"]}
mem/0: location 901 is 1035
run/0: instruction read-key/0
run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new/42 {name: "location", value: 1, type: 0, properties: ["location": "type"]}, {name: "30", value: 30, type: 0, properties: ["30": "literal"]}
run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new/43 {name: "location", value: 1, type: 0, properties: ["location": "type"]}, {name: "30", value: 30, type: 0, properties: ["30": "literal"]}
mem/0: array size is 30
mem/0: new alloc: 1130
run/0: instruction read-key/1
@ -436,7 +436,7 @@ mem/0: storing 0 in location 8
run/0: result 2 is 1035
mem/0: storing 1035 in location 901
run/0: instruction read-key-in-mu/3
run/0: memory-should-contain/44 {name: "
run/0: memory-should-contain/45 {name: "
1 <- 97 # 'a'
2 <- 1 # first read-key call found a character
3 <- 98 # 'b'

View File

@ -18,7 +18,7 @@ after-brace/0: reply ...
new/0: routine allocated memory from 1000 to 101000
schedule/0: main
run/0: instruction main/0
run/0: {name: "1", value: 1, type: 2-1, properties: ["1": "address":"integer"]} <- new/42 {name: "integer", value: 1, type: 0, properties: ["integer": "type"]}
run/0: {name: "1", value: 1, type: 2-1, properties: ["1": "address":"integer"]} <- new/43 {name: "integer", value: 1, type: 0, properties: ["integer": "type"]}
mem/0: new alloc: 1000
mem/0: storing 1000 in location 1
run/0: instruction main/1

View File

@ -0,0 +1,39 @@
parse/0: instruction: start-running
parse/0: ingredient: {name: "f2", value: 0, type: 0, properties: ["f2": "recipe"]}
parse/0: product: {name: "1", value: 0, type: 1, properties: ["1": "integer", "child-id": ]}
parse/0: instruction: copy
parse/0: ingredient: {name: "0", value: 0, type: 0, properties: ["0": "literal"]}
parse/0: product: {name: "12", value: 0, type: 1, properties: ["12": "integer"]}
parse/0: instruction: routine-state
parse/0: ingredient: {name: "1", value: 0, type: 1, properties: ["1": "integer", "child-id": ]}
parse/0: product: {name: "2", value: 0, type: 1, properties: ["2": "integer", "state": ]}
parse/0: instruction: copy
parse/0: ingredient: {name: "0", value: 0, type: 0, properties: ["0": "literal"]}
parse/0: product: {name: "12", value: 0, type: 1, properties: ["12": "integer"]}
after-brace/0: recipe f1
after-brace/0: start-running ...
after-brace/0: copy ...
after-brace/0: routine-state ...
after-brace/0: recipe f2
after-brace/0: copy ...
new/0: routine allocated memory from 1000 to 101000
schedule/0: f1
run/0: instruction f1/0
run/0: {name: "1", value: 1, type: 1, properties: ["1": "integer", "child-id": ]} <- start-running/34 {name: "f2", value: 0, type: 0, properties: ["f2": "recipe"]}
run/0: ingredient 0 is f2
new/0: routine allocated memory from 101000 to 201000
mem/0: storing 2 in location 1
run/0: instruction f1/1
run/0: {name: "12", value: 12, type: 1, properties: ["12": "integer"]} <- copy/1 {name: "0", value: 0, type: 0, properties: ["0": "literal"]}
run/0: ingredient 0 is 0
mem/0: storing 0 in location 12
schedule/0: f2
run/0: instruction f2/0
run/0: {name: "12", value: 12, type: 1, properties: ["12": "integer"]} <- copy/1 {name: "0", value: 0, type: 0, properties: ["0": "literal"]}
run/0: ingredient 0 is 0
mem/0: storing 0 in location 12
schedule/0: f1
run/0: instruction f1/2
run/0: {name: "2", value: 2, type: 1, properties: ["2": "integer", "state": ]} <- routine-state/35 {name: "1", value: 1, type: 1, properties: ["1": "integer", "child-id": ]}
mem/0: location 1 is 2
mem/0: storing 1 in location 2

View File

@ -9,7 +9,7 @@ after-brace/0: run ...
new/0: routine allocated memory from 1000 to 101000
schedule/0: main
run/0: instruction main/0
run/0: run/43 {name: "
run/0: run/44 {name: "
1:integer <- copy 13:literal
", value: 0, type: 0, properties: ["
1:integer <- copy 13:literal

View File

@ -16,7 +16,7 @@ after-brace/0: run ...
new/0: routine allocated memory from 1000 to 101000
schedule/0: main
run/0: instruction main/0
run/0: run/43 {name: "
run/0: run/44 {name: "
1:integer <- copy 13:literal
", value: 0, type: 0, properties: ["
1:integer <- copy 13:literal
@ -31,7 +31,7 @@ run/0: {name: "1", value: 1, type: 1, properties: ["1": "integer"]} <- copy/1 {n
run/0: ingredient 0 is 13
mem/0: storing 13 in location 1
run/0: instruction main/1
run/0: run/43 {name: "
run/0: run/44 {name: "
2:integer <- copy 13:literal
", value: 0, type: 0, properties: ["
2:integer <- copy 13:literal

View File

@ -16,7 +16,7 @@ after-brace/0: memory-should-contain ...
new/0: routine allocated memory from 1000 to 101000
schedule/0: foo
run/0: instruction foo/0
run/0: run/43 {name: "
run/0: run/44 {name: "
1:integer <- copy 13:literal
", value: 0, type: 0, properties: ["
1:integer <- copy 13:literal
@ -31,7 +31,7 @@ run/0: {name: "1", value: 1, type: 1, properties: ["1": "integer"]} <- copy/1 {n
run/0: ingredient 0 is 13
mem/0: storing 13 in location 1
run/0: instruction foo/1
run/0: memory-should-contain/44 {name: "
run/0: memory-should-contain/45 {name: "
1 <- 13
", value: 0, type: 0, properties: ["
1 <- 13

View File

@ -32,7 +32,7 @@ after-brace/0: trace-should-not-contain ...
new/0: routine allocated memory from 1000 to 101000
schedule/0: foo
run/0: instruction foo/0
run/0: run/43 {name: "
run/0: run/44 {name: "
1:integer <- copy 13:literal
trace [a], [a b c]
", value: 0, type: 0, properties: ["
@ -56,20 +56,20 @@ run/0: instruction run1001/1
run/0: trace/18 {name: "a", value: 0, type: 0, properties: ["a": "literal-string"]}, {name: "a b c", value: 0, type: 0, properties: ["a b c": "literal-string"]}
a/0: a b c
run/0: instruction foo/1
run/0: memory-should-contain/44 {name: "
run/0: memory-should-contain/45 {name: "
1 <- 13
", value: 0, type: 0, properties: ["
1 <- 13
": "literal-string"]}
run/0: checking location 1
run/0: instruction foo/2
run/0: trace-should-contain/45 {name: "
run/0: trace-should-contain/46 {name: "
a: a b c
", value: 0, type: 0, properties: ["
a: a b c
": "literal-string"]}
run/0: instruction foo/3
run/0: trace-should-not-contain/46 {name: "
run/0: trace-should-not-contain/47 {name: "
a: x y z
", value: 0, type: 0, properties: ["
a: x y z

View File

@ -32,7 +32,7 @@ after-brace/0: memory-should-contain ...
new/0: routine allocated memory from 1000 to 101000
schedule/0: foo
run/0: instruction foo/0
run/0: run/43 {name: "
run/0: run/44 {name: "
1:integer <- copy 13:literal
", value: 0, type: 0, properties: ["
1:integer <- copy 13:literal
@ -47,14 +47,14 @@ run/0: {name: "1", value: 1, type: 1, properties: ["1": "integer"]} <- copy/1 {n
run/0: ingredient 0 is 13
mem/0: storing 13 in location 1
run/0: instruction foo/1
run/0: memory-should-contain/44 {name: "
run/0: memory-should-contain/45 {name: "
1 <- 13
", value: 0, type: 0, properties: ["
1 <- 13
": "literal-string"]}
run/0: checking location 1
run/0: instruction foo/2
run/0: run/43 {name: "
run/0: run/44 {name: "
2:integer <- copy 13:literal
", value: 0, type: 0, properties: ["
2:integer <- copy 13:literal
@ -69,7 +69,7 @@ run/0: {name: "2", value: 2, type: 1, properties: ["2": "integer"]} <- copy/1 {n
run/0: ingredient 0 is 13
mem/0: storing 13 in location 2
run/0: instruction foo/3
run/0: memory-should-contain/44 {name: "
run/0: memory-should-contain/45 {name: "
1 <- 13
2 <- 13
", value: 0, type: 0, properties: ["

View File

@ -18,7 +18,7 @@ after-brace/0: memory-should-contain ...
new/0: routine allocated memory from 1000 to 101000
schedule/0: scenario_with_comment_in_mu
run/0: instruction scenario_with_comment_in_mu/0
run/0: run/43 {name: "
run/0: run/44 {name: "
# comment
1:integer <- add 2:literal, 2:literal
", value: 0, type: 0, properties: ["
@ -38,7 +38,7 @@ run/0: ingredient 1 is 2
run/0: product 0 is 4
mem/0: storing 4 in location 1
run/0: instruction scenario_with_comment_in_mu/1
run/0: memory-should-contain/44 {name: "
run/0: memory-should-contain/45 {name: "
1 <- 4
", value: 0, type: 0, properties: ["
1 <- 4

View File

@ -20,7 +20,7 @@ after-brace/0: memory-should-contain ...
new/0: routine allocated memory from 1000 to 101000
schedule/0: scenario_with_multiple_comments_in_mu
run/0: instruction scenario_with_multiple_comments_in_mu/0
run/0: run/43 {name: "
run/0: run/44 {name: "
# comment1
# comment2
1:integer <- add 2:literal, 2:literal
@ -42,7 +42,7 @@ run/0: ingredient 1 is 2
run/0: product 0 is 4
mem/0: storing 4 in location 1
run/0: instruction scenario_with_multiple_comments_in_mu/1
run/0: memory-should-contain/44 {name: "
run/0: memory-should-contain/45 {name: "
1 <- 4
", value: 0, type: 0, properties: ["
1 <- 4

View File

@ -28,11 +28,11 @@ schedule/0: screen-in-scenario
run/0: instruction screen-in-scenario/0
run/0: {name: "screen", value: 900, type: 2, properties: ["screen": "address"]} <- assume-screen/115 {name: "5", value: 5, type: 0, properties: ["5": "literal", "width": ]}, {name: "3", value: 3, type: 0, properties: ["3": "literal", "height": ]}
run/0: instruction init-fake-screen/0
run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new/42 {name: "location", value: 1, type: 0, properties: ["location": "type"]}, {name: "30", value: 30, type: 0, properties: ["30": "literal", "capacity": ]}
run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new/43 {name: "location", value: 1, type: 0, properties: ["location": "type"]}, {name: "30", value: 30, type: 0, properties: ["30": "literal", "capacity": ]}
mem/0: array size is 30
mem/0: new alloc: 1000
run/0: instruction init-fake-screen/1
run/0: {name: "result", value: 1, type: 2-11, properties: ["result": "address":"screen"]} <- new/42 {name: "screen", value: 11, type: 0, properties: ["screen": "type"]}
run/0: {name: "result", value: 1, type: 2-11, properties: ["result": "address":"screen"]} <- new/43 {name: "screen", value: 11, type: 0, properties: ["screen": "type"]}
mem/0: new alloc: 1031
mem/0: storing 1031 in location 1002
run/0: instruction init-fake-screen/2
@ -107,7 +107,7 @@ run/0: address to copy is 1035
run/0: product 0 is 1035
mem/0: storing 1035 in location 1008
run/0: instruction init-fake-screen/12
run/0: {name: "buf", value: 7, type: 2-2-5-4, properties: ["buf": "address":"address":"array":"character", "deref": ]} <- new/42 {name: "character", value: 0, type: 0, properties: ["character": "literal"]}, {name: "bufsize", value: 6, type: 1, properties: ["bufsize": "integer"]}
run/0: {name: "buf", value: 7, type: 2-2-5-4, properties: ["buf": "address":"address":"array":"character", "deref": ]} <- new/43 {name: "character", value: 0, type: 0, properties: ["character": "literal"]}, {name: "bufsize", value: 6, type: 1, properties: ["bufsize": "integer"]}
mem/0: location 1007 is 15
mem/0: array size is 15
mem/0: new alloc: 1036
@ -117,7 +117,7 @@ run/0: instruction init-fake-screen/13
run/0: clear-screen/116 {name: "result", value: 1, type: 2-11, properties: ["result": "address":"screen"]}
mem/0: location 1002 is 1031
run/0: instruction clear-screen/0
run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new/42 {name: "location", value: 1, type: 0, properties: ["location": "type"]}, {name: "30", value: 30, type: 0, properties: ["30": "literal"]}
run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new/43 {name: "location", value: 1, type: 0, properties: ["location": "type"]}, {name: "30", value: 30, type: 0, properties: ["30": "literal"]}
mem/0: array size is 30
mem/0: new alloc: 1052
run/0: instruction clear-screen/1
@ -740,7 +740,7 @@ mem/0: location 1002 is 1031
run/0: result 0 is 1031
mem/0: storing 1031 in location 900
run/0: instruction screen-in-scenario/1
run/0: run/43 {name: "
run/0: run/44 {name: "
screen:address <- print-character screen:address, 97:literal # 'a'
", value: 0, type: 0, properties: ["
screen:address <- print-character screen:address, 97:literal # 'a'
@ -755,7 +755,7 @@ run/0: instruction run1002/0
run/0: {name: "screen", value: 900, type: 2, properties: ["screen": "address"]} <- print-character/117 {name: "screen", value: 900, type: 2, properties: ["screen": "address"]}, {name: "97", value: 97, type: 0, properties: ["97": "literal"]}
mem/0: location 900 is 1031
run/0: instruction print-character/0
run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new/42 {name: "location", value: 1, type: 0, properties: ["location": "type"]}, {name: "30", value: 30, type: 0, properties: ["30": "literal"]}
run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new/43 {name: "location", value: 1, type: 0, properties: ["location": "type"]}, {name: "30", value: 30, type: 0, properties: ["30": "literal"]}
mem/0: array size is 30
mem/0: new alloc: 1083
run/0: instruction print-character/1
@ -870,7 +870,7 @@ mem/0: location 1085 is 1031
run/0: result 0 is 1031
mem/0: storing 1031 in location 900
run/0: instruction screen-in-scenario/2
run/0: screen-should-contain/60 {name: "
run/0: screen-should-contain/61 {name: "
# 01234
.a .
. .

View File

@ -28,11 +28,11 @@ schedule/0: screen-in-scenario-error
run/0: instruction screen-in-scenario-error/0
run/0: {name: "screen", value: 900, type: 2, properties: ["screen": "address"]} <- assume-screen/115 {name: "5", value: 5, type: 0, properties: ["5": "literal", "width": ]}, {name: "3", value: 3, type: 0, properties: ["3": "literal", "height": ]}
run/0: instruction init-fake-screen/0
run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new/42 {name: "location", value: 1, type: 0, properties: ["location": "type"]}, {name: "30", value: 30, type: 0, properties: ["30": "literal", "capacity": ]}
run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new/43 {name: "location", value: 1, type: 0, properties: ["location": "type"]}, {name: "30", value: 30, type: 0, properties: ["30": "literal", "capacity": ]}
mem/0: array size is 30
mem/0: new alloc: 1000
run/0: instruction init-fake-screen/1
run/0: {name: "result", value: 1, type: 2-11, properties: ["result": "address":"screen"]} <- new/42 {name: "screen", value: 11, type: 0, properties: ["screen": "type"]}
run/0: {name: "result", value: 1, type: 2-11, properties: ["result": "address":"screen"]} <- new/43 {name: "screen", value: 11, type: 0, properties: ["screen": "type"]}
mem/0: new alloc: 1031
mem/0: storing 1031 in location 1002
run/0: instruction init-fake-screen/2
@ -107,7 +107,7 @@ run/0: address to copy is 1035
run/0: product 0 is 1035
mem/0: storing 1035 in location 1008
run/0: instruction init-fake-screen/12
run/0: {name: "buf", value: 7, type: 2-2-5-4, properties: ["buf": "address":"address":"array":"character", "deref": ]} <- new/42 {name: "character", value: 0, type: 0, properties: ["character": "literal"]}, {name: "bufsize", value: 6, type: 1, properties: ["bufsize": "integer"]}
run/0: {name: "buf", value: 7, type: 2-2-5-4, properties: ["buf": "address":"address":"array":"character", "deref": ]} <- new/43 {name: "character", value: 0, type: 0, properties: ["character": "literal"]}, {name: "bufsize", value: 6, type: 1, properties: ["bufsize": "integer"]}
mem/0: location 1007 is 15
mem/0: array size is 15
mem/0: new alloc: 1036
@ -117,7 +117,7 @@ run/0: instruction init-fake-screen/13
run/0: clear-screen/116 {name: "result", value: 1, type: 2-11, properties: ["result": "address":"screen"]}
mem/0: location 1002 is 1031
run/0: instruction clear-screen/0
run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new/42 {name: "location", value: 1, type: 0, properties: ["location": "type"]}, {name: "30", value: 30, type: 0, properties: ["30": "literal"]}
run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new/43 {name: "location", value: 1, type: 0, properties: ["location": "type"]}, {name: "30", value: 30, type: 0, properties: ["30": "literal"]}
mem/0: array size is 30
mem/0: new alloc: 1052
run/0: instruction clear-screen/1
@ -740,7 +740,7 @@ mem/0: location 1002 is 1031
run/0: result 0 is 1031
mem/0: storing 1031 in location 900
run/0: instruction screen-in-scenario-error/1
run/0: run/43 {name: "
run/0: run/44 {name: "
screen:address <- print-character screen:address, 97:literal # 'a'
", value: 0, type: 0, properties: ["
screen:address <- print-character screen:address, 97:literal # 'a'
@ -755,7 +755,7 @@ run/0: instruction run1001/0
run/0: {name: "screen", value: 900, type: 2, properties: ["screen": "address"]} <- print-character/117 {name: "screen", value: 900, type: 2, properties: ["screen": "address"]}, {name: "97", value: 97, type: 0, properties: ["97": "literal"]}
mem/0: location 900 is 1031
run/0: instruction print-character/0
run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new/42 {name: "location", value: 1, type: 0, properties: ["location": "type"]}, {name: "30", value: 30, type: 0, properties: ["30": "literal"]}
run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new/43 {name: "location", value: 1, type: 0, properties: ["location": "type"]}, {name: "30", value: 30, type: 0, properties: ["30": "literal"]}
mem/0: array size is 30
mem/0: new alloc: 1083
run/0: instruction print-character/1
@ -870,7 +870,7 @@ mem/0: location 1085 is 1031
run/0: result 0 is 1031
mem/0: storing 1031 in location 900
run/0: instruction screen-in-scenario-error/2
run/0: screen-should-contain/60 {name: "
run/0: screen-should-contain/61 {name: "
# 01234
.b .
. .

View File

@ -22,7 +22,7 @@ after-brace/0: memory-should-contain ...
new/0: routine allocated memory from 1000 to 101000
schedule/0: string-append-1
run/0: instruction string-append-1/0
run/0: run/43 {name: "
run/0: run/44 {name: "
1:address:array:character/raw <- new [hello,]
2:address:array:character/raw <- new [ world!]
3:address:array:character/raw <- string-append 1:address:array:character/raw, 2:address:array:character/raw
@ -54,17 +54,17 @@ after-brace/0: new ...
after-brace/0: string-append ...
after-brace/0: copy ...
run/0: instruction run1001/0
run/0: {name: "1", value: 1, type: 2-5-4, properties: ["1": "address":"array":"character", "raw": ]} <- new/42 {name: "hello,", value: 0, type: 0, properties: ["hello,": "literal-string"]}
run/0: {name: "1", value: 1, type: 2-5-4, properties: ["1": "address":"array":"character", "raw": ]} <- new/43 {name: "hello,", value: 0, type: 0, properties: ["hello,": "literal-string"]}
mem/0: storing 1000 in location 1
run/0: instruction run1001/1
run/0: {name: "2", value: 2, type: 2-5-4, properties: ["2": "address":"array":"character", "raw": ]} <- new/42 {name: " world!", value: 0, type: 0, properties: [" world!": "literal-string"]}
run/0: {name: "2", value: 2, type: 2-5-4, properties: ["2": "address":"array":"character", "raw": ]} <- new/43 {name: " world!", value: 0, type: 0, properties: [" world!": "literal-string"]}
mem/0: storing 1007 in location 2
run/0: instruction run1001/2
run/0: {name: "3", value: 3, type: 2-5-4, properties: ["3": "address":"array":"character", "raw": ]} <- string-append/106 {name: "1", value: 1, type: 2-5-4, properties: ["1": "address":"array":"character", "raw": ]}, {name: "2", value: 2, type: 2-5-4, properties: ["2": "address":"array":"character", "raw": ]}
mem/0: location 1 is 1000
mem/0: location 2 is 1007
run/0: instruction string-append/0
run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new/42 {name: "location", value: 1, type: 0, properties: ["location": "type"]}, {name: "30", value: 30, type: 0, properties: ["30": "literal"]}
run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new/43 {name: "location", value: 1, type: 0, properties: ["location": "type"]}, {name: "30", value: 30, type: 0, properties: ["30": "literal"]}
mem/0: array size is 30
mem/0: new alloc: 1015
run/0: instruction string-append/1
@ -92,7 +92,7 @@ mem/0: location 1020 is 7
run/0: product 0 is 13
mem/0: storing 13 in location 1021
run/0: instruction string-append/6
run/0: {name: "result", value: 6, type: 2-5-4, properties: ["result": "address":"array":"character"]} <- new/42 {name: "character", value: 4, type: 0, properties: ["character": "type"]}, {name: "result-len", value: 5, type: 1, properties: ["result-len": "integer"]}
run/0: {name: "result", value: 6, type: 2-5-4, properties: ["result": "address":"array":"character"]} <- new/43 {name: "character", value: 4, type: 0, properties: ["character": "type"]}, {name: "result-len", value: 5, type: 1, properties: ["result-len": "integer"]}
mem/0: location 1021 is 13
mem/0: array size is 13
mem/0: new alloc: 1046
@ -916,7 +916,7 @@ mem/0: storing 108 in location 15
mem/0: storing 100 in location 16
mem/0: storing 33 in location 17
run/0: instruction string-append-1/1
run/0: memory-should-contain/44 {name: "
run/0: memory-should-contain/45 {name: "
4:string <- [hello, world!]
", value: 0, type: 0, properties: ["
4:string <- [hello, world!]

View File

@ -22,7 +22,7 @@ after-brace/0: memory-should-contain ...
new/0: routine allocated memory from 1000 to 101000
schedule/0: string-equal-common-lengths-but-distinct
run/0: instruction string-equal-common-lengths-but-distinct/0
run/0: run/43 {name: "
run/0: run/44 {name: "
default-space:address:array:location <- new location:type, 30:literal
x:address:array:character <- new [abc]
y:address:array:character <- new [abd]
@ -58,21 +58,21 @@ after-brace/0: new ...
after-brace/0: new ...
after-brace/0: string-equal ...
run/0: instruction run1001/0
run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new/42 {name: "location", value: 1, type: 0, properties: ["location": "type"]}, {name: "30", value: 30, type: 0, properties: ["30": "literal"]}
run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new/43 {name: "location", value: 1, type: 0, properties: ["location": "type"]}, {name: "30", value: 30, type: 0, properties: ["30": "literal"]}
mem/0: array size is 30
mem/0: new alloc: 1000
run/0: instruction run1001/1
run/0: {name: "x", value: 1, type: 2-5-4, properties: ["x": "address":"array":"character"]} <- new/42 {name: "abc", value: 0, type: 0, properties: ["abc": "literal-string"]}
run/0: {name: "x", value: 1, type: 2-5-4, properties: ["x": "address":"array":"character"]} <- new/43 {name: "abc", value: 0, type: 0, properties: ["abc": "literal-string"]}
mem/0: storing 1031 in location 1002
run/0: instruction run1001/2
run/0: {name: "y", value: 2, type: 2-5-4, properties: ["y": "address":"array":"character"]} <- new/42 {name: "abd", value: 0, type: 0, properties: ["abd": "literal-string"]}
run/0: {name: "y", value: 2, type: 2-5-4, properties: ["y": "address":"array":"character"]} <- new/43 {name: "abd", value: 0, type: 0, properties: ["abd": "literal-string"]}
mem/0: storing 1035 in location 1003
run/0: instruction run1001/3
run/0: {name: "3", value: 3, type: 3, properties: ["3": "boolean", "raw": ]} <- string-equal/100 {name: "x", value: 1, type: 2-5-4, properties: ["x": "address":"array":"character"]}, {name: "y", value: 2, type: 2-5-4, properties: ["y": "address":"array":"character"]}
mem/0: location 1002 is 1031
mem/0: location 1003 is 1035
run/0: instruction string-equal/0
run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new/42 {name: "location", value: 1, type: 0, properties: ["location": "type"]}, {name: "30", value: 30, type: 0, properties: ["30": "literal"]}
run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new/43 {name: "location", value: 1, type: 0, properties: ["location": "type"]}, {name: "30", value: 30, type: 0, properties: ["30": "literal"]}
mem/0: array size is 30
mem/0: new alloc: 1039
run/0: instruction string-equal/1
@ -288,7 +288,7 @@ run/0: reply/33 {name: "0", value: 0, type: 0, properties: ["0": "literal"]}
run/0: result 0 is 0
mem/0: storing 0 in location 3
run/0: instruction string-equal-common-lengths-but-distinct/1
run/0: memory-should-contain/44 {name: "
run/0: memory-should-contain/45 {name: "
3 <- 0 # abc != abd
", value: 0, type: 0, properties: ["
3 <- 0 # abc != abd

View File

@ -36,7 +36,7 @@ after-brace/0: trace-should-not-contain ...
new/0: routine allocated memory from 1000 to 101000
schedule/0: string-equal-distinct-lengths
run/0: instruction string-equal-distinct-lengths/0
run/0: run/43 {name: "
run/0: run/44 {name: "
default-space:address:array:location <- new location:type, 30:literal
x:address:array:character <- new [abc]
y:address:array:character <- new [abcd]
@ -72,21 +72,21 @@ after-brace/0: new ...
after-brace/0: new ...
after-brace/0: string-equal ...
run/0: instruction run1001/0
run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new/42 {name: "location", value: 1, type: 0, properties: ["location": "type"]}, {name: "30", value: 30, type: 0, properties: ["30": "literal"]}
run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new/43 {name: "location", value: 1, type: 0, properties: ["location": "type"]}, {name: "30", value: 30, type: 0, properties: ["30": "literal"]}
mem/0: array size is 30
mem/0: new alloc: 1000
run/0: instruction run1001/1
run/0: {name: "x", value: 1, type: 2-5-4, properties: ["x": "address":"array":"character"]} <- new/42 {name: "abc", value: 0, type: 0, properties: ["abc": "literal-string"]}
run/0: {name: "x", value: 1, type: 2-5-4, properties: ["x": "address":"array":"character"]} <- new/43 {name: "abc", value: 0, type: 0, properties: ["abc": "literal-string"]}
mem/0: storing 1031 in location 1002
run/0: instruction run1001/2
run/0: {name: "y", value: 2, type: 2-5-4, properties: ["y": "address":"array":"character"]} <- new/42 {name: "abcd", value: 0, type: 0, properties: ["abcd": "literal-string"]}
run/0: {name: "y", value: 2, type: 2-5-4, properties: ["y": "address":"array":"character"]} <- new/43 {name: "abcd", value: 0, type: 0, properties: ["abcd": "literal-string"]}
mem/0: storing 1035 in location 1003
run/0: instruction run1001/3
run/0: {name: "3", value: 3, type: 3, properties: ["3": "boolean", "raw": ]} <- string-equal/100 {name: "x", value: 1, type: 2-5-4, properties: ["x": "address":"array":"character"]}, {name: "y", value: 2, type: 2-5-4, properties: ["y": "address":"array":"character"]}
mem/0: location 1002 is 1031
mem/0: location 1003 is 1035
run/0: instruction string-equal/0
run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new/42 {name: "location", value: 1, type: 0, properties: ["location": "type"]}, {name: "30", value: 30, type: 0, properties: ["30": "literal"]}
run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new/43 {name: "location", value: 1, type: 0, properties: ["location": "type"]}, {name: "30", value: 30, type: 0, properties: ["30": "literal"]}
mem/0: array size is 30
mem/0: new alloc: 1040
run/0: instruction string-equal/1
@ -126,20 +126,20 @@ run/0: reply/33 {name: "0", value: 0, type: 0, properties: ["0": "literal"]}
run/0: result 0 is 0
mem/0: storing 0 in location 3
run/0: instruction string-equal-distinct-lengths/1
run/0: memory-should-contain/44 {name: "
run/0: memory-should-contain/45 {name: "
3 <- 0 # abc != abcd
", value: 0, type: 0, properties: ["
3 <- 0 # abc != abcd
": "literal-string"]}
run/0: checking location 3
run/0: instruction string-equal-distinct-lengths/2
run/0: trace-should-contain/45 {name: "
run/0: trace-should-contain/46 {name: "
string-equal: comparing lengths
", value: 0, type: 0, properties: ["
string-equal: comparing lengths
": "literal-string"]}
run/0: instruction string-equal-distinct-lengths/3
run/0: trace-should-not-contain/46 {name: "
run/0: trace-should-not-contain/47 {name: "
string-equal: comparing characters
", value: 0, type: 0, properties: ["
string-equal: comparing characters

View File

@ -22,7 +22,7 @@ after-brace/0: memory-should-contain ...
new/0: routine allocated memory from 1000 to 101000
schedule/0: string-equal-identical
run/0: instruction string-equal-identical/0
run/0: run/43 {name: "
run/0: run/44 {name: "
default-space:address:array:location <- new location:type, 30:literal
x:address:array:character <- new [abc]
y:address:array:character <- new [abc]
@ -58,21 +58,21 @@ after-brace/0: new ...
after-brace/0: new ...
after-brace/0: string-equal ...
run/0: instruction run1001/0
run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new/42 {name: "location", value: 1, type: 0, properties: ["location": "type"]}, {name: "30", value: 30, type: 0, properties: ["30": "literal"]}
run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new/43 {name: "location", value: 1, type: 0, properties: ["location": "type"]}, {name: "30", value: 30, type: 0, properties: ["30": "literal"]}
mem/0: array size is 30
mem/0: new alloc: 1000
run/0: instruction run1001/1
run/0: {name: "x", value: 1, type: 2-5-4, properties: ["x": "address":"array":"character"]} <- new/42 {name: "abc", value: 0, type: 0, properties: ["abc": "literal-string"]}
run/0: {name: "x", value: 1, type: 2-5-4, properties: ["x": "address":"array":"character"]} <- new/43 {name: "abc", value: 0, type: 0, properties: ["abc": "literal-string"]}
mem/0: storing 1031 in location 1002
run/0: instruction run1001/2
run/0: {name: "y", value: 2, type: 2-5-4, properties: ["y": "address":"array":"character"]} <- new/42 {name: "abc", value: 0, type: 0, properties: ["abc": "literal-string"]}
run/0: {name: "y", value: 2, type: 2-5-4, properties: ["y": "address":"array":"character"]} <- new/43 {name: "abc", value: 0, type: 0, properties: ["abc": "literal-string"]}
mem/0: storing 1035 in location 1003
run/0: instruction run1001/3
run/0: {name: "3", value: 3, type: 3, properties: ["3": "boolean", "raw": ]} <- string-equal/100 {name: "x", value: 1, type: 2-5-4, properties: ["x": "address":"array":"character"]}, {name: "y", value: 2, type: 2-5-4, properties: ["y": "address":"array":"character"]}
mem/0: location 1002 is 1031
mem/0: location 1003 is 1035
run/0: instruction string-equal/0
run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new/42 {name: "location", value: 1, type: 0, properties: ["location": "type"]}, {name: "30", value: 30, type: 0, properties: ["30": "literal"]}
run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new/43 {name: "location", value: 1, type: 0, properties: ["location": "type"]}, {name: "30", value: 30, type: 0, properties: ["30": "literal"]}
mem/0: array size is 30
mem/0: new alloc: 1039
run/0: instruction string-equal/1
@ -314,7 +314,7 @@ run/0: reply/33 {name: "1", value: 1, type: 0, properties: ["1": "literal"]}
run/0: result 0 is 1
mem/0: storing 1 in location 3
run/0: instruction string-equal-identical/1
run/0: memory-should-contain/44 {name: "
run/0: memory-should-contain/45 {name: "
3 <- 1 # abc == abc
", value: 0, type: 0, properties: ["
3 <- 1 # abc == abc

View File

@ -20,7 +20,7 @@ after-brace/0: memory-should-contain ...
new/0: routine allocated memory from 1000 to 101000
schedule/0: string-equal-reflexive
run/0: instruction string-equal-reflexive/0
run/0: run/43 {name: "
run/0: run/44 {name: "
default-space:address:array:location <- new location:type, 30:literal
x:address:array:character <- new [abc]
3:boolean/raw <- string-equal x:address:array:character, x:address:array:character
@ -48,18 +48,18 @@ after-brace/0: new ...
after-brace/0: new ...
after-brace/0: string-equal ...
run/0: instruction run1001/0
run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new/42 {name: "location", value: 1, type: 0, properties: ["location": "type"]}, {name: "30", value: 30, type: 0, properties: ["30": "literal"]}
run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new/43 {name: "location", value: 1, type: 0, properties: ["location": "type"]}, {name: "30", value: 30, type: 0, properties: ["30": "literal"]}
mem/0: array size is 30
mem/0: new alloc: 1000
run/0: instruction run1001/1
run/0: {name: "x", value: 1, type: 2-5-4, properties: ["x": "address":"array":"character"]} <- new/42 {name: "abc", value: 0, type: 0, properties: ["abc": "literal-string"]}
run/0: {name: "x", value: 1, type: 2-5-4, properties: ["x": "address":"array":"character"]} <- new/43 {name: "abc", value: 0, type: 0, properties: ["abc": "literal-string"]}
mem/0: storing 1031 in location 1002
run/0: instruction run1001/2
run/0: {name: "3", value: 3, type: 3, properties: ["3": "boolean", "raw": ]} <- string-equal/100 {name: "x", value: 1, type: 2-5-4, properties: ["x": "address":"array":"character"]}, {name: "x", value: 1, type: 2-5-4, properties: ["x": "address":"array":"character"]}
mem/0: location 1002 is 1031
mem/0: location 1002 is 1031
run/0: instruction string-equal/0
run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new/42 {name: "location", value: 1, type: 0, properties: ["location": "type"]}, {name: "30", value: 30, type: 0, properties: ["30": "literal"]}
run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new/43 {name: "location", value: 1, type: 0, properties: ["location": "type"]}, {name: "30", value: 30, type: 0, properties: ["30": "literal"]}
mem/0: array size is 30
mem/0: new alloc: 1035
run/0: instruction string-equal/1
@ -301,7 +301,7 @@ run/0: reply/33 {name: "1", value: 1, type: 0, properties: ["1": "literal"]}
run/0: result 0 is 1
mem/0: storing 1 in location 3
run/0: instruction string-equal-reflexive/1
run/0: memory-should-contain/44 {name: "
run/0: memory-should-contain/45 {name: "
3 <- 1 # x == x for all x
", value: 0, type: 0, properties: ["
3 <- 1 # x == x for all x

View File

@ -22,7 +22,7 @@ after-brace/0: memory-should-contain ...
new/0: routine allocated memory from 1000 to 101000
schedule/0: string-equal-with-empty
run/0: instruction string-equal-with-empty/0
run/0: run/43 {name: "
run/0: run/44 {name: "
default-space:address:array:location <- new location:type, 30:literal
x:address:array:character <- new []
y:address:array:character <- new [abcd]
@ -58,21 +58,21 @@ after-brace/0: new ...
after-brace/0: new ...
after-brace/0: string-equal ...
run/0: instruction run1001/0
run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new/42 {name: "location", value: 1, type: 0, properties: ["location": "type"]}, {name: "30", value: 30, type: 0, properties: ["30": "literal"]}
run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new/43 {name: "location", value: 1, type: 0, properties: ["location": "type"]}, {name: "30", value: 30, type: 0, properties: ["30": "literal"]}
mem/0: array size is 30
mem/0: new alloc: 1000
run/0: instruction run1001/1
run/0: {name: "x", value: 1, type: 2-5-4, properties: ["x": "address":"array":"character"]} <- new/42 {name: "", value: 0, type: 0, properties: ["": "literal-string"]}
run/0: {name: "x", value: 1, type: 2-5-4, properties: ["x": "address":"array":"character"]} <- new/43 {name: "", value: 0, type: 0, properties: ["": "literal-string"]}
mem/0: storing 1031 in location 1002
run/0: instruction run1001/2
run/0: {name: "y", value: 2, type: 2-5-4, properties: ["y": "address":"array":"character"]} <- new/42 {name: "abcd", value: 0, type: 0, properties: ["abcd": "literal-string"]}
run/0: {name: "y", value: 2, type: 2-5-4, properties: ["y": "address":"array":"character"]} <- new/43 {name: "abcd", value: 0, type: 0, properties: ["abcd": "literal-string"]}
mem/0: storing 1032 in location 1003
run/0: instruction run1001/3
run/0: {name: "3", value: 3, type: 3, properties: ["3": "boolean", "raw": ]} <- string-equal/100 {name: "x", value: 1, type: 2-5-4, properties: ["x": "address":"array":"character"]}, {name: "y", value: 2, type: 2-5-4, properties: ["y": "address":"array":"character"]}
mem/0: location 1002 is 1031
mem/0: location 1003 is 1032
run/0: instruction string-equal/0
run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new/42 {name: "location", value: 1, type: 0, properties: ["location": "type"]}, {name: "30", value: 30, type: 0, properties: ["30": "literal"]}
run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new/43 {name: "location", value: 1, type: 0, properties: ["location": "type"]}, {name: "30", value: 30, type: 0, properties: ["30": "literal"]}
mem/0: array size is 30
mem/0: new alloc: 1037
run/0: instruction string-equal/1
@ -112,7 +112,7 @@ run/0: reply/33 {name: "0", value: 0, type: 0, properties: ["0": "literal"]}
run/0: result 0 is 0
mem/0: storing 0 in location 3
run/0: instruction string-equal-with-empty/1
run/0: memory-should-contain/44 {name: "
run/0: memory-should-contain/45 {name: "
3 <- 0 # "" != abcd
", value: 0, type: 0, properties: ["
3 <- 0 # "" != abcd

View File

@ -16,7 +16,7 @@ after-brace/0: trace-should-contain ...
new/0: routine allocated memory from 1000 to 101000
schedule/0: main
run/0: instruction main/0
run/0: run/43 {name: "
run/0: run/44 {name: "
trace [a], [b]
", value: 0, type: 0, properties: ["
trace [a], [b]
@ -30,7 +30,7 @@ run/0: instruction run1001/0
run/0: trace/18 {name: "a", value: 0, type: 0, properties: ["a": "literal-string"]}, {name: "b", value: 0, type: 0, properties: ["b": "literal-string"]}
a/0: b
run/0: instruction main/1
run/0: trace-should-contain/45 {name: "
run/0: trace-should-contain/46 {name: "
a: b
", value: 0, type: 0, properties: ["
a: b

View File

@ -11,7 +11,7 @@ after-brace/0: trace-should-contain ...
new/0: routine allocated memory from 1000 to 101000
schedule/0: main
run/0: instruction main/0
run/0: trace-should-contain/45 {name: "
run/0: trace-should-contain/46 {name: "
a: b
a: d
", value: 0, type: 0, properties: ["

View File

@ -18,7 +18,7 @@ after-brace/0: trace-should-contain ...
new/0: routine allocated memory from 1000 to 101000
schedule/0: main
run/0: instruction main/0
run/0: run/43 {name: "
run/0: run/44 {name: "
trace [a], [b]
", value: 0, type: 0, properties: ["
trace [a], [b]
@ -32,7 +32,7 @@ run/0: instruction run1001/0
run/0: trace/18 {name: "a", value: 0, type: 0, properties: ["a": "literal-string"]}, {name: "b", value: 0, type: 0, properties: ["b": "literal-string"]}
a/0: b
run/0: instruction main/1
run/0: trace-should-contain/45 {name: "
run/0: trace-should-contain/46 {name: "
a: b
a: d
", value: 0, type: 0, properties: ["

View File

@ -9,7 +9,7 @@ after-brace/0: trace-should-not-contain ...
new/0: routine allocated memory from 1000 to 101000
schedule/0: main
run/0: instruction main/0
run/0: trace-should-not-contain/46 {name: "
run/0: trace-should-not-contain/47 {name: "
a: b
", value: 0, type: 0, properties: ["
a: b

View File

@ -18,7 +18,7 @@ after-brace/0: trace-should-not-contain ...
new/0: routine allocated memory from 1000 to 101000
schedule/0: main
run/0: instruction main/0
run/0: run/43 {name: "
run/0: run/44 {name: "
trace [a], [d]
", value: 0, type: 0, properties: ["
trace [a], [d]
@ -32,7 +32,7 @@ run/0: instruction run1001/0
run/0: trace/18 {name: "a", value: 0, type: 0, properties: ["a": "literal-string"]}, {name: "d", value: 0, type: 0, properties: ["d": "literal-string"]}
a/0: d
run/0: instruction main/1
run/0: trace-should-not-contain/46 {name: "
run/0: trace-should-not-contain/47 {name: "
a: b
a: d
", value: 0, type: 0, properties: ["

View File

@ -16,7 +16,7 @@ after-brace/0: trace-should-not-contain ...
new/0: routine allocated memory from 1000 to 101000
schedule/0: main
run/0: instruction main/0
run/0: run/43 {name: "
run/0: run/44 {name: "
trace [a], [b]
", value: 0, type: 0, properties: ["
trace [a], [b]
@ -30,7 +30,7 @@ run/0: instruction run1001/0
run/0: trace/18 {name: "a", value: 0, type: 0, properties: ["a": "literal-string"]}, {name: "b", value: 0, type: 0, properties: ["b": "literal-string"]}
a/0: b
run/0: instruction main/1
run/0: trace-should-not-contain/46 {name: "
run/0: trace-should-not-contain/47 {name: "
a: b
", value: 0, type: 0, properties: ["
a: b

View File

@ -29,7 +29,7 @@ run/0: start-running/34 {name: "f2", value: 0, type: 0, properties: ["f2": "reci
run/0: ingredient 0 is f2
new/0: routine allocated memory from 101000 to 201000
run/0: instruction f1/2
run/0: wait-for-location/35 {name: "1", value: 1, type: 1, properties: ["1": "integer"]}
run/0: wait-for-location/36 {name: "1", value: 1, type: 1, properties: ["1": "integer"]}
run/0: waiting for 1 to change from 0
schedule/0: f2
run/0: instruction f2/0

View File

@ -195,3 +195,38 @@ recipe f1 [
]
+schedule: f1
-run: idle
//:: 'routine-state' can tell if a given routine id is running
:(scenario routine_state_test)
% Scheduling_interval = 2;
recipe f1 [
1:integer/child-id <- start-running f2:recipe
12:integer <- copy 0:literal # race condition since we don't care about location 12
# thanks to Scheduling_interval, f2's one instruction runs in between here and completes
2:integer/state <- routine-state 1:integer/child-id
]
recipe f2 [
12:integer <- copy 0:literal
# trying to run a second instruction marks routine as completed
]
# recipe f2 should be in state COMPLETED
+mem: storing 1 in location 2
:(before "End Primitive Recipe Declarations")
ROUTINE_STATE,
:(before "End Primitive Recipe Numbers")
Recipe_number["routine-state"] = ROUTINE_STATE;
:(before "End Primitive Recipe Implementations")
case ROUTINE_STATE: {
vector<long long int> result;
index_t id = read_memory(current_instruction().ingredients[0])[0];
for (index_t i = 0; i < Routines.size(); ++i) {
if (Routines[i]->id == id) {
result.push_back(Routines[i]->state);
write_memory(current_instruction().products[0], result);
break;
}
}
break;
}