diff options
author | Kartik K. Agaram <vc@akkartik.com> | 2015-04-29 23:55:51 -0700 |
---|---|---|
committer | Kartik K. Agaram <vc@akkartik.com> | 2015-04-29 23:55:51 -0700 |
commit | 72cccd08c7a3462072b8ae5aea1576f010bf12c0 (patch) | |
tree | bffdef85020f1393c74bf8b21d605f87e9f6a889 | |
parent | 288728767877f95e644d02c0f15d5d319832187f (diff) | |
download | mu-72cccd08c7a3462072b8ae5aea1576f010bf12c0.tar.gz |
1225
Finally start tracing the actual instructions as they run.
119 files changed, 1909 insertions, 0 deletions
diff --git a/cpp/.traces/add b/cpp/.traces/add index 7af4bafe..8892c399 100644 --- a/cpp/.traces/add +++ b/cpp/.traces/add @@ -15,12 +15,15 @@ after-brace/0: add ... new/0: routine allocated memory from 1000 to 101000 schedule/0: main run/0: instruction main/0 +run/0: {name: "1", value: 1, type: 1, properties: ["1": "integer"]} <- copy {name: "23", value: 23, type: 0, properties: ["23": "literal"]} run/0: ingredient 0 is 23 mem/0: storing 23 in location 1 run/0: instruction main/1 +run/0: {name: "2", value: 2, type: 1, properties: ["2": "integer"]} <- copy {name: "34", value: 34, type: 0, properties: ["34": "literal"]} run/0: ingredient 0 is 34 mem/0: storing 34 in location 2 run/0: instruction main/2 +run/0: {name: "3", value: 3, type: 1, properties: ["3": "integer"]} <- add {name: "1", value: 1, type: 1, properties: ["1": "integer"]}, {name: "2", value: 2, type: 1, properties: ["2": "integer"]} run/0: ingredient 0 is 1 mem/0: location 1 is 23 run/0: ingredient 1 is 2 diff --git a/cpp/.traces/add_literal b/cpp/.traces/add_literal index 3b55e4c0..6f232792 100644 --- a/cpp/.traces/add_literal +++ b/cpp/.traces/add_literal @@ -7,6 +7,7 @@ after-brace/0: add ... new/0: routine allocated memory from 1000 to 101000 schedule/0: main run/0: instruction main/0 +run/0: {name: "1", value: 1, type: 1, properties: ["1": "integer"]} <- add {name: "23", value: 23, type: 0, properties: ["23": "literal"]}, {name: "34", value: 34, type: 0, properties: ["34": "literal"]} run/0: ingredient 0 is 23 run/0: ingredient 1 is 34 run/0: product 0 is 57 diff --git a/cpp/.traces/and b/cpp/.traces/and index 37454d4a..39380cec 100644 --- a/cpp/.traces/and +++ b/cpp/.traces/and @@ -15,12 +15,15 @@ after-brace/0: and ... new/0: routine allocated memory from 1000 to 101000 schedule/0: main run/0: instruction main/0 +run/0: {name: "1", value: 1, type: 1, properties: ["1": "integer"]} <- copy {name: "1", value: 1, type: 0, properties: ["1": "literal"]} run/0: ingredient 0 is 1 mem/0: storing 1 in location 1 run/0: instruction main/1 +run/0: {name: "2", value: 2, type: 1, properties: ["2": "integer"]} <- copy {name: "0", value: 0, type: 0, properties: ["0": "literal"]} run/0: ingredient 0 is 0 mem/0: storing 0 in location 2 run/0: instruction main/2 +run/0: {name: "3", value: 3, type: 1, properties: ["3": "integer"]} <- and {name: "1", value: 1, type: 1, properties: ["1": "integer"]}, {name: "2", value: 2, type: 1, properties: ["2": "integer"]} run/0: ingredient 0 is 1 mem/0: location 1 is 1 run/0: ingredient 1 is 2 diff --git a/cpp/.traces/array-from-args b/cpp/.traces/array-from-args index 9dd11874..173e1fb3 100644 --- a/cpp/.traces/array-from-args +++ b/cpp/.traces/array-from-args @@ -12,80 +12,101 @@ after-brace/0: copy ... new/0: routine allocated memory from 1000 to 101000 schedule/0: test-array-from-args run/0: instruction test-array-from-args/0 +run/0: {name: "1", value: 1, type: 2-5-1, properties: ["1": "address":"array":"location"]} <- init-array {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 {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 +run/0: {name: "capacity", value: 1, type: 1, properties: ["capacity": "integer"]} <- copy {name: "0", value: 0, type: 0, properties: ["0": "literal"]} run/0: ingredient 0 is 0 mem/0: storing 0 in location 1002 run/0: instruction init-array/3 +run/0: {name: "curr-value", value: 2, type: 1, properties: ["curr-value": "location"]}, {name: "exists?", value: 3, type: 3, properties: ["exists?": "boolean"]} <- next-ingredient run/0: product 0 is 0 mem/0: storing 0 in location 1003 mem/0: storing 1 in location 1004 run/0: instruction init-array/4 +run/0: break-unless {name: "exists?", value: 3, type: 3, properties: ["exists?": "boolean"]}, {name: "", value: 2, type: , properties: ["": ]} mem/0: location 1004 is 1 run/0: ingredient 0 is 1 run/0: jump-unless fell through run/0: instruction init-array/5 +run/0: {name: "capacity", value: 1, type: 1, properties: ["capacity": "integer"]} <- add {name: "capacity", value: 1, type: 1, properties: ["capacity": "integer"]}, {name: "1", value: 1, type: 0, properties: ["1": "literal"]} run/0: ingredient 0 is capacity mem/0: location 1002 is 0 run/0: ingredient 1 is 1 run/0: product 0 is 1 mem/0: storing 1 in location 1002 run/0: instruction init-array/6 +run/0: loop {name: "", value: -4, type: , properties: ["": ]} run/0: ingredient 0 is -4 run/0: jumping to instruction 3 run/0: instruction init-array/3 +run/0: {name: "curr-value", value: 2, type: 1, properties: ["curr-value": "location"]}, {name: "exists?", value: 3, type: 3, properties: ["exists?": "boolean"]} <- next-ingredient run/0: product 0 is 1 mem/0: storing 1 in location 1003 mem/0: storing 1 in location 1004 run/0: instruction init-array/4 +run/0: break-unless {name: "exists?", value: 3, type: 3, properties: ["exists?": "boolean"]}, {name: "", value: 2, type: , properties: ["": ]} mem/0: location 1004 is 1 run/0: ingredient 0 is 1 run/0: jump-unless fell through run/0: instruction init-array/5 +run/0: {name: "capacity", value: 1, type: 1, properties: ["capacity": "integer"]} <- add {name: "capacity", value: 1, type: 1, properties: ["capacity": "integer"]}, {name: "1", value: 1, type: 0, properties: ["1": "literal"]} run/0: ingredient 0 is capacity mem/0: location 1002 is 1 run/0: ingredient 1 is 1 run/0: product 0 is 2 mem/0: storing 2 in location 1002 run/0: instruction init-array/6 +run/0: loop {name: "", value: -4, type: , properties: ["": ]} run/0: ingredient 0 is -4 run/0: jumping to instruction 3 run/0: instruction init-array/3 +run/0: {name: "curr-value", value: 2, type: 1, properties: ["curr-value": "location"]}, {name: "exists?", value: 3, type: 3, properties: ["exists?": "boolean"]} <- next-ingredient run/0: product 0 is 2 mem/0: storing 2 in location 1003 mem/0: storing 1 in location 1004 run/0: instruction init-array/4 +run/0: break-unless {name: "exists?", value: 3, type: 3, properties: ["exists?": "boolean"]}, {name: "", value: 2, type: , properties: ["": ]} mem/0: location 1004 is 1 run/0: ingredient 0 is 1 run/0: jump-unless fell through run/0: instruction init-array/5 +run/0: {name: "capacity", value: 1, type: 1, properties: ["capacity": "integer"]} <- add {name: "capacity", value: 1, type: 1, properties: ["capacity": "integer"]}, {name: "1", value: 1, type: 0, properties: ["1": "literal"]} run/0: ingredient 0 is capacity mem/0: location 1002 is 2 run/0: ingredient 1 is 1 run/0: product 0 is 3 mem/0: storing 3 in location 1002 run/0: instruction init-array/6 +run/0: loop {name: "", value: -4, type: , properties: ["": ]} run/0: ingredient 0 is -4 run/0: jumping to instruction 3 run/0: instruction init-array/3 +run/0: {name: "curr-value", value: 2, type: 1, properties: ["curr-value": "location"]}, {name: "exists?", value: 3, type: 3, properties: ["exists?": "boolean"]} <- next-ingredient mem/0: storing 0 in location 1004 run/0: instruction init-array/4 +run/0: break-unless {name: "exists?", value: 3, type: 3, properties: ["exists?": "boolean"]}, {name: "", value: 2, type: , properties: ["": ]} mem/0: location 1004 is 0 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 {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: 1030 mem/0: storing 1030 in location 1005 run/0: instruction init-array/9 +run/0: rewind-ingredients run/0: instruction init-array/10 +run/0: {name: "i", value: 5, type: 1, properties: ["i": "integer"]} <- copy {name: "0", value: 0, type: 0, properties: ["0": "literal"]} run/0: ingredient 0 is 0 mem/0: storing 0 in location 1006 run/0: instruction init-array/12 +run/0: {name: "done?", value: 6, type: 3, properties: ["done?": "boolean"]} <- greater-or-equal {name: "i", value: 5, type: 1, properties: ["i": "integer"]}, {name: "capacity", value: 1, type: 1, properties: ["capacity": "integer"]} run/0: ingredient 0 is i mem/0: location 1006 is 0 run/0: ingredient 1 is capacity @@ -93,17 +114,21 @@ mem/0: location 1002 is 3 run/0: product 0 is 0 mem/0: storing 0 in location 1007 run/0: instruction init-array/13 +run/0: break-if {name: "done?", value: 6, type: 3, properties: ["done?": "boolean"]}, {name: "", value: 6, type: , properties: ["": ]} mem/0: location 1007 is 0 run/0: ingredient 0 is 0 run/0: jump-if fell through run/0: instruction init-array/14 +run/0: {name: "curr-value", value: 2, type: 1, properties: ["curr-value": "location"]}, {name: "exists?", value: 3, type: 3, properties: ["exists?": "boolean"]} <- next-ingredient run/0: product 0 is 0 mem/0: storing 0 in location 1003 mem/0: storing 1 in location 1004 run/0: instruction init-array/15 +run/0: assert {name: "exists?", value: 3, type: 3, properties: ["exists?": "boolean"]}, {name: "error in rewinding ingredients to init-array", value: 0, type: 0, properties: ["error in rewinding ingredients to init-array": "literal-string"]} run/0: ingredient 0 is exists? mem/0: location 1004 is 1 run/0: instruction init-array/16 +run/0: {name: "tmp", value: 7, type: 2-1, properties: ["tmp": "address":"location"]} <- index-address {name: "result", value: 4, type: 2-5-1, properties: ["result": "address":"array":"location", "deref": ]}, {name: "i", value: 5, type: 1, properties: ["i": "integer"]} run/0: ingredient 0 is result mem/0: location 1005 is 1030 run/0: ingredient 1 is {name: "i", value: 5, type: 1, properties: ["i": "integer"]} @@ -112,20 +137,24 @@ run/0: address to copy is 1031 run/0: product 0 is 1031 mem/0: storing 1031 in location 1008 run/0: instruction init-array/17 +run/0: {name: "tmp", value: 7, type: 2-1, properties: ["tmp": "address":"location", "deref": ]} <- copy {name: "curr-value", value: 2, type: 1, properties: ["curr-value": "location"]} run/0: ingredient 0 is curr-value mem/0: location 1003 is 0 mem/0: location 1008 is 1031 mem/0: storing 0 in location 1031 run/0: instruction init-array/18 +run/0: {name: "i", value: 5, type: 1, properties: ["i": "integer"]} <- add {name: "i", value: 5, type: 1, properties: ["i": "integer"]}, {name: "1", value: 1, type: 0, properties: ["1": "literal"]} run/0: ingredient 0 is i mem/0: location 1006 is 0 run/0: ingredient 1 is 1 run/0: product 0 is 1 mem/0: storing 1 in location 1006 run/0: instruction init-array/19 +run/0: loop {name: "", value: -8, type: , properties: ["": ]} run/0: ingredient 0 is -8 run/0: jumping to instruction 12 run/0: instruction init-array/12 +run/0: {name: "done?", value: 6, type: 3, properties: ["done?": "boolean"]} <- greater-or-equal {name: "i", value: 5, type: 1, properties: ["i": "integer"]}, {name: "capacity", value: 1, type: 1, properties: ["capacity": "integer"]} run/0: ingredient 0 is i mem/0: location 1006 is 1 run/0: ingredient 1 is capacity @@ -133,17 +162,21 @@ mem/0: location 1002 is 3 run/0: product 0 is 0 mem/0: storing 0 in location 1007 run/0: instruction init-array/13 +run/0: break-if {name: "done?", value: 6, type: 3, properties: ["done?": "boolean"]}, {name: "", value: 6, type: , properties: ["": ]} mem/0: location 1007 is 0 run/0: ingredient 0 is 0 run/0: jump-if fell through run/0: instruction init-array/14 +run/0: {name: "curr-value", value: 2, type: 1, properties: ["curr-value": "location"]}, {name: "exists?", value: 3, type: 3, properties: ["exists?": "boolean"]} <- next-ingredient run/0: product 0 is 1 mem/0: storing 1 in location 1003 mem/0: storing 1 in location 1004 run/0: instruction init-array/15 +run/0: assert {name: "exists?", value: 3, type: 3, properties: ["exists?": "boolean"]}, {name: "error in rewinding ingredients to init-array", value: 0, type: 0, properties: ["error in rewinding ingredients to init-array": "literal-string"]} run/0: ingredient 0 is exists? mem/0: location 1004 is 1 run/0: instruction init-array/16 +run/0: {name: "tmp", value: 7, type: 2-1, properties: ["tmp": "address":"location"]} <- index-address {name: "result", value: 4, type: 2-5-1, properties: ["result": "address":"array":"location", "deref": ]}, {name: "i", value: 5, type: 1, properties: ["i": "integer"]} run/0: ingredient 0 is result mem/0: location 1005 is 1030 run/0: ingredient 1 is {name: "i", value: 5, type: 1, properties: ["i": "integer"]} @@ -152,20 +185,24 @@ run/0: address to copy is 1032 run/0: product 0 is 1032 mem/0: storing 1032 in location 1008 run/0: instruction init-array/17 +run/0: {name: "tmp", value: 7, type: 2-1, properties: ["tmp": "address":"location", "deref": ]} <- copy {name: "curr-value", value: 2, type: 1, properties: ["curr-value": "location"]} run/0: ingredient 0 is curr-value mem/0: location 1003 is 1 mem/0: location 1008 is 1032 mem/0: storing 1 in location 1032 run/0: instruction init-array/18 +run/0: {name: "i", value: 5, type: 1, properties: ["i": "integer"]} <- add {name: "i", value: 5, type: 1, properties: ["i": "integer"]}, {name: "1", value: 1, type: 0, properties: ["1": "literal"]} run/0: ingredient 0 is i mem/0: location 1006 is 1 run/0: ingredient 1 is 1 run/0: product 0 is 2 mem/0: storing 2 in location 1006 run/0: instruction init-array/19 +run/0: loop {name: "", value: -8, type: , properties: ["": ]} run/0: ingredient 0 is -8 run/0: jumping to instruction 12 run/0: instruction init-array/12 +run/0: {name: "done?", value: 6, type: 3, properties: ["done?": "boolean"]} <- greater-or-equal {name: "i", value: 5, type: 1, properties: ["i": "integer"]}, {name: "capacity", value: 1, type: 1, properties: ["capacity": "integer"]} run/0: ingredient 0 is i mem/0: location 1006 is 2 run/0: ingredient 1 is capacity @@ -173,17 +210,21 @@ mem/0: location 1002 is 3 run/0: product 0 is 0 mem/0: storing 0 in location 1007 run/0: instruction init-array/13 +run/0: break-if {name: "done?", value: 6, type: 3, properties: ["done?": "boolean"]}, {name: "", value: 6, type: , properties: ["": ]} mem/0: location 1007 is 0 run/0: ingredient 0 is 0 run/0: jump-if fell through run/0: instruction init-array/14 +run/0: {name: "curr-value", value: 2, type: 1, properties: ["curr-value": "location"]}, {name: "exists?", value: 3, type: 3, properties: ["exists?": "boolean"]} <- next-ingredient run/0: product 0 is 2 mem/0: storing 2 in location 1003 mem/0: storing 1 in location 1004 run/0: instruction init-array/15 +run/0: assert {name: "exists?", value: 3, type: 3, properties: ["exists?": "boolean"]}, {name: "error in rewinding ingredients to init-array", value: 0, type: 0, properties: ["error in rewinding ingredients to init-array": "literal-string"]} run/0: ingredient 0 is exists? mem/0: location 1004 is 1 run/0: instruction init-array/16 +run/0: {name: "tmp", value: 7, type: 2-1, properties: ["tmp": "address":"location"]} <- index-address {name: "result", value: 4, type: 2-5-1, properties: ["result": "address":"array":"location", "deref": ]}, {name: "i", value: 5, type: 1, properties: ["i": "integer"]} run/0: ingredient 0 is result mem/0: location 1005 is 1030 run/0: ingredient 1 is {name: "i", value: 5, type: 1, properties: ["i": "integer"]} @@ -192,20 +233,24 @@ run/0: address to copy is 1033 run/0: product 0 is 1033 mem/0: storing 1033 in location 1008 run/0: instruction init-array/17 +run/0: {name: "tmp", value: 7, type: 2-1, properties: ["tmp": "address":"location", "deref": ]} <- copy {name: "curr-value", value: 2, type: 1, properties: ["curr-value": "location"]} run/0: ingredient 0 is curr-value mem/0: location 1003 is 2 mem/0: location 1008 is 1033 mem/0: storing 2 in location 1033 run/0: instruction init-array/18 +run/0: {name: "i", value: 5, type: 1, properties: ["i": "integer"]} <- add {name: "i", value: 5, type: 1, properties: ["i": "integer"]}, {name: "1", value: 1, type: 0, properties: ["1": "literal"]} run/0: ingredient 0 is i mem/0: location 1006 is 2 run/0: ingredient 1 is 1 run/0: product 0 is 3 mem/0: storing 3 in location 1006 run/0: instruction init-array/19 +run/0: loop {name: "", value: -8, type: , properties: ["": ]} run/0: ingredient 0 is -8 run/0: jumping to instruction 12 run/0: instruction init-array/12 +run/0: {name: "done?", value: 6, type: 3, properties: ["done?": "boolean"]} <- greater-or-equal {name: "i", value: 5, type: 1, properties: ["i": "integer"]}, {name: "capacity", value: 1, type: 1, properties: ["capacity": "integer"]} run/0: ingredient 0 is i mem/0: location 1006 is 3 run/0: ingredient 1 is capacity @@ -213,15 +258,18 @@ mem/0: location 1002 is 3 run/0: product 0 is 1 mem/0: storing 1 in location 1007 run/0: instruction init-array/13 +run/0: break-if {name: "done?", value: 6, type: 3, properties: ["done?": "boolean"]}, {name: "", value: 6, type: , properties: ["": ]} mem/0: location 1007 is 1 run/0: ingredient 0 is 1 run/0: ingredient 1 is run/0: jumping to instruction 20 run/0: instruction init-array/21 +run/0: reply {name: "result", value: 4, type: 2-5-1, properties: ["result": "address":"array":"location"]} mem/0: location 1005 is 1030 run/0: result 0 is 1030 mem/0: storing 1030 in location 1 run/0: instruction test-array-from-args/1 +run/0: {name: "2", value: 2, type: 5-1, properties: ["2": "array":"location"]} <- copy {name: "1", value: 1, type: 2-5-1, properties: ["1": "address":"array":"location", "deref": ]} run/0: ingredient 0 is 1 mem/0: location 1 is 1030 mem/0: location 1030 is 3 diff --git a/cpp/.traces/array_length b/cpp/.traces/array_length index 937d5d5c..bd5f2a56 100644 --- a/cpp/.traces/array_length +++ b/cpp/.traces/array_length @@ -22,16 +22,21 @@ after-brace/0: length ... new/0: routine allocated memory from 1000 to 101000 schedule/0: main run/0: instruction main/0 +run/0: {name: "1", value: 1, type: 1, properties: ["1": "integer"]} <- copy {name: "3", value: 3, type: 0, properties: ["3": "literal"]} run/0: ingredient 0 is 3 mem/0: storing 3 in location 1 run/0: instruction main/1 +run/0: {name: "2", value: 2, type: 1, properties: ["2": "integer"]} <- copy {name: "14", value: 14, type: 0, properties: ["14": "literal"]} run/0: ingredient 0 is 14 mem/0: storing 14 in location 2 run/0: instruction main/2 +run/0: {name: "3", value: 3, type: 1, properties: ["3": "integer"]} <- copy {name: "15", value: 15, type: 0, properties: ["15": "literal"]} run/0: ingredient 0 is 15 mem/0: storing 15 in location 3 run/0: instruction main/3 +run/0: {name: "4", value: 4, type: 1, properties: ["4": "integer"]} <- copy {name: "16", value: 16, type: 0, properties: ["16": "literal"]} run/0: ingredient 0 is 16 mem/0: storing 16 in location 4 run/0: instruction main/4 +run/0: {name: "5", value: 5, type: 1, properties: ["5": "integer"]} <- length {name: "1", value: 1, type: 5-1, properties: ["1": "array":"integer"]} mem/0: storing 3 in location 5 diff --git a/cpp/.traces/assert b/cpp/.traces/assert index ae903831..a9688419 100644 --- a/cpp/.traces/assert +++ b/cpp/.traces/assert @@ -6,5 +6,6 @@ after-brace/0: assert ... new/0: routine allocated memory from 1000 to 101000 schedule/0: main run/0: instruction main/0 +run/0: assert {name: "0", value: 0, type: 0, properties: ["0": "literal"]}, {name: "this is an assert in mu", value: 0, type: 0, properties: ["this is an assert in mu": "literal-string"]} run/0: ingredient 0 is 0 warn/0: this is an assert in mu diff --git a/cpp/.traces/brace_conversion_and_run b/cpp/.traces/brace_conversion_and_run index 72792c3e..9aafc716 100644 --- a/cpp/.traces/brace_conversion_and_run +++ b/cpp/.traces/brace_conversion_and_run @@ -40,22 +40,27 @@ after-brace/0: copy ... new/0: routine allocated memory from 1000 to 101000 schedule/0: test-factorial run/0: instruction test-factorial/0 +run/0: {name: "1", value: 1, type: 1, properties: ["1": "integer"]} <- copy {name: "5", value: 5, type: 0, properties: ["5": "literal"]} run/0: ingredient 0 is 5 mem/0: storing 5 in location 1 run/0: instruction test-factorial/1 +run/0: {name: "2", value: 2, type: 1, properties: ["2": "integer"]} <- copy {name: "1", value: 1, type: 0, properties: ["1": "literal"]} run/0: ingredient 0 is 1 mem/0: storing 1 in location 2 run/0: instruction test-factorial/3 +run/0: {name: "3", value: 3, type: 3, properties: ["3": "boolean"]} <- equal {name: "1", value: 1, type: 1, properties: ["1": "integer"]}, {name: "1", value: 1, type: 0, properties: ["1": "literal"]} run/0: ingredient 0 is 1 mem/0: location 1 is 5 run/0: ingredient 1 is 1 run/0: product 0 is 0 mem/0: storing 0 in location 3 run/0: instruction test-factorial/4 +run/0: break-if {name: "3", value: 3, type: 3, properties: ["3": "boolean"]}, {name: "", value: 3, type: , properties: ["": ]} mem/0: location 3 is 0 run/0: ingredient 0 is 0 run/0: jump-if fell through run/0: instruction test-factorial/5 +run/0: {name: "2", value: 2, type: 1, properties: ["2": "integer"]} <- multiply {name: "2", value: 2, type: 1, properties: ["2": "integer"]}, {name: "1", value: 1, type: 1, properties: ["1": "integer"]} run/0: ingredient 0 is 2 mem/0: location 2 is 1 run/0: ingredient 1 is 1 @@ -64,25 +69,30 @@ run/0: ingredient 1 is 5 run/0: product 0 is 5 mem/0: storing 5 in location 2 run/0: instruction test-factorial/6 +run/0: {name: "1", value: 1, type: 1, properties: ["1": "integer"]} <- subtract {name: "1", value: 1, type: 1, properties: ["1": "integer"]}, {name: "1", value: 1, type: 0, properties: ["1": "literal"]} run/0: ingredient 0 is 1 mem/0: location 1 is 5 run/0: ingredient 1 is 1 run/0: product 0 is 4 mem/0: storing 4 in location 1 run/0: instruction test-factorial/7 +run/0: loop {name: "", value: -5, type: , properties: ["": ]} run/0: ingredient 0 is -5 run/0: jumping to instruction 3 run/0: instruction test-factorial/3 +run/0: {name: "3", value: 3, type: 3, properties: ["3": "boolean"]} <- equal {name: "1", value: 1, type: 1, properties: ["1": "integer"]}, {name: "1", value: 1, type: 0, properties: ["1": "literal"]} run/0: ingredient 0 is 1 mem/0: location 1 is 4 run/0: ingredient 1 is 1 run/0: product 0 is 0 mem/0: storing 0 in location 3 run/0: instruction test-factorial/4 +run/0: break-if {name: "3", value: 3, type: 3, properties: ["3": "boolean"]}, {name: "", value: 3, type: , properties: ["": ]} mem/0: location 3 is 0 run/0: ingredient 0 is 0 run/0: jump-if fell through run/0: instruction test-factorial/5 +run/0: {name: "2", value: 2, type: 1, properties: ["2": "integer"]} <- multiply {name: "2", value: 2, type: 1, properties: ["2": "integer"]}, {name: "1", value: 1, type: 1, properties: ["1": "integer"]} run/0: ingredient 0 is 2 mem/0: location 2 is 5 run/0: ingredient 1 is 1 @@ -91,25 +101,30 @@ run/0: ingredient 1 is 4 run/0: product 0 is 20 mem/0: storing 20 in location 2 run/0: instruction test-factorial/6 +run/0: {name: "1", value: 1, type: 1, properties: ["1": "integer"]} <- subtract {name: "1", value: 1, type: 1, properties: ["1": "integer"]}, {name: "1", value: 1, type: 0, properties: ["1": "literal"]} run/0: ingredient 0 is 1 mem/0: location 1 is 4 run/0: ingredient 1 is 1 run/0: product 0 is 3 mem/0: storing 3 in location 1 run/0: instruction test-factorial/7 +run/0: loop {name: "", value: -5, type: , properties: ["": ]} run/0: ingredient 0 is -5 run/0: jumping to instruction 3 run/0: instruction test-factorial/3 +run/0: {name: "3", value: 3, type: 3, properties: ["3": "boolean"]} <- equal {name: "1", value: 1, type: 1, properties: ["1": "integer"]}, {name: "1", value: 1, type: 0, properties: ["1": "literal"]} run/0: ingredient 0 is 1 mem/0: location 1 is 3 run/0: ingredient 1 is 1 run/0: product 0 is 0 mem/0: storing 0 in location 3 run/0: instruction test-factorial/4 +run/0: break-if {name: "3", value: 3, type: 3, properties: ["3": "boolean"]}, {name: "", value: 3, type: , properties: ["": ]} mem/0: location 3 is 0 run/0: ingredient 0 is 0 run/0: jump-if fell through run/0: instruction test-factorial/5 +run/0: {name: "2", value: 2, type: 1, properties: ["2": "integer"]} <- multiply {name: "2", value: 2, type: 1, properties: ["2": "integer"]}, {name: "1", value: 1, type: 1, properties: ["1": "integer"]} run/0: ingredient 0 is 2 mem/0: location 2 is 20 run/0: ingredient 1 is 1 @@ -118,25 +133,30 @@ run/0: ingredient 1 is 3 run/0: product 0 is 60 mem/0: storing 60 in location 2 run/0: instruction test-factorial/6 +run/0: {name: "1", value: 1, type: 1, properties: ["1": "integer"]} <- subtract {name: "1", value: 1, type: 1, properties: ["1": "integer"]}, {name: "1", value: 1, type: 0, properties: ["1": "literal"]} run/0: ingredient 0 is 1 mem/0: location 1 is 3 run/0: ingredient 1 is 1 run/0: product 0 is 2 mem/0: storing 2 in location 1 run/0: instruction test-factorial/7 +run/0: loop {name: "", value: -5, type: , properties: ["": ]} run/0: ingredient 0 is -5 run/0: jumping to instruction 3 run/0: instruction test-factorial/3 +run/0: {name: "3", value: 3, type: 3, properties: ["3": "boolean"]} <- equal {name: "1", value: 1, type: 1, properties: ["1": "integer"]}, {name: "1", value: 1, type: 0, properties: ["1": "literal"]} run/0: ingredient 0 is 1 mem/0: location 1 is 2 run/0: ingredient 1 is 1 run/0: product 0 is 0 mem/0: storing 0 in location 3 run/0: instruction test-factorial/4 +run/0: break-if {name: "3", value: 3, type: 3, properties: ["3": "boolean"]}, {name: "", value: 3, type: , properties: ["": ]} mem/0: location 3 is 0 run/0: ingredient 0 is 0 run/0: jump-if fell through run/0: instruction test-factorial/5 +run/0: {name: "2", value: 2, type: 1, properties: ["2": "integer"]} <- multiply {name: "2", value: 2, type: 1, properties: ["2": "integer"]}, {name: "1", value: 1, type: 1, properties: ["1": "integer"]} run/0: ingredient 0 is 2 mem/0: location 2 is 60 run/0: ingredient 1 is 1 @@ -145,26 +165,31 @@ run/0: ingredient 1 is 2 run/0: product 0 is 120 mem/0: storing 120 in location 2 run/0: instruction test-factorial/6 +run/0: {name: "1", value: 1, type: 1, properties: ["1": "integer"]} <- subtract {name: "1", value: 1, type: 1, properties: ["1": "integer"]}, {name: "1", value: 1, type: 0, properties: ["1": "literal"]} run/0: ingredient 0 is 1 mem/0: location 1 is 2 run/0: ingredient 1 is 1 run/0: product 0 is 1 mem/0: storing 1 in location 1 run/0: instruction test-factorial/7 +run/0: loop {name: "", value: -5, type: , properties: ["": ]} run/0: ingredient 0 is -5 run/0: jumping to instruction 3 run/0: instruction test-factorial/3 +run/0: {name: "3", value: 3, type: 3, properties: ["3": "boolean"]} <- equal {name: "1", value: 1, type: 1, properties: ["1": "integer"]}, {name: "1", value: 1, type: 0, properties: ["1": "literal"]} run/0: ingredient 0 is 1 mem/0: location 1 is 1 run/0: ingredient 1 is 1 run/0: product 0 is 1 mem/0: storing 1 in location 3 run/0: instruction test-factorial/4 +run/0: break-if {name: "3", value: 3, type: 3, properties: ["3": "boolean"]}, {name: "", value: 3, type: , properties: ["": ]} mem/0: location 3 is 1 run/0: ingredient 0 is 1 run/0: ingredient 1 is run/0: jumping to instruction 8 run/0: instruction test-factorial/9 +run/0: {name: "4", value: 4, type: 1, properties: ["4": "integer"]} <- copy {name: "2", value: 2, type: 1, properties: ["2": "integer"]} run/0: ingredient 0 is 2 mem/0: location 2 is 120 mem/0: storing 120 in location 4 diff --git a/cpp/.traces/buffer-append-works b/cpp/.traces/buffer-append-works index c4b4b221..03175513 100644 --- a/cpp/.traces/buffer-append-works +++ b/cpp/.traces/buffer-append-works @@ -79,16 +79,21 @@ after-brace/0: copy ... new/0: routine allocated memory from 1000 to 101000 schedule/0: test-buffer-append-works run/0: instruction test-buffer-append-works/0 +run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new {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 test-buffer-append-works/1 +run/0: {name: "x", value: 1, type: 2-9, properties: ["x": "address":"buffer"]} <- init-buffer {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 {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: 1030 run/0: instruction init-buffer/1 +run/0: {name: "result", value: 1, type: 2-9, properties: ["result": "address":"buffer"]} <- new {name: "buffer", value: 9, type: 0, properties: ["buffer": "type"]} mem/0: new alloc: 1060 mem/0: storing 1060 in location 1032 run/0: instruction init-buffer/2 +run/0: {name: "len", value: 2, type: 2-1, properties: ["len": "address":"integer"]} <- get-address {name: "result", value: 1, type: 2-9, properties: ["result": "address":"buffer", "deref": ]}, {name: "length", value: 0, type: 0, properties: ["length": "offset"]} run/0: ingredient 0 is result mem/0: location 1032 is 1060 run/0: ingredient 1 is length @@ -96,10 +101,12 @@ run/0: address to copy is 1060 run/0: product 0 is 1060 mem/0: storing 1060 in location 1033 run/0: instruction init-buffer/3 +run/0: {name: "len", value: 2, type: 2-1, properties: ["len": "address":"integer", "deref": ]} <- copy {name: "0", value: 0, type: 0, properties: ["0": "literal"]} run/0: ingredient 0 is 0 mem/0: location 1033 is 1060 mem/0: storing 0 in location 1060 run/0: instruction init-buffer/4 +run/0: {name: "s", value: 3, type: 2-2-5-4, properties: ["s": "address":"address":"array":"character"]} <- get-address {name: "result", value: 1, type: 2-9, properties: ["result": "address":"buffer", "deref": ]}, {name: "data", value: 1, type: 0, properties: ["data": "offset"]} run/0: ingredient 0 is result mem/0: location 1032 is 1060 run/0: ingredient 1 is data @@ -107,19 +114,23 @@ run/0: address to copy is 1061 run/0: product 0 is 1061 mem/0: storing 1061 in location 1034 run/0: instruction init-buffer/5 +run/0: {name: "capacity", value: 4, type: 1, properties: ["capacity": "integer"]} <- next-ingredient run/0: product 0 is 3 mem/0: storing 3 in location 1035 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 {name: "character", value: 4, type: 0, properties: ["character": "type"]}, {name: "capacity", value: 4, type: 1, properties: ["capacity": "integer"]} mem/0: location 1035 is 3 mem/0: array size is 3 mem/0: new alloc: 1062 mem/0: location 1034 is 1061 mem/0: storing 1062 in location 1061 run/0: instruction init-buffer/7 +run/0: reply {name: "result", value: 1, type: 2-9, properties: ["result": "address":"buffer"]} mem/0: location 1032 is 1060 run/0: result 0 is 1060 mem/0: storing 1060 in location 1002 run/0: instruction test-buffer-append-works/2 +run/0: {name: "s1", value: 2, type: 2-5-4, properties: ["s1": "address":"array":"character"]} <- get {name: "x", value: 1, type: 2-9, properties: ["x": "address":"buffer", "deref": ]}, {name: "data", value: 1, type: 0, properties: ["data": "offset"]} run/0: ingredient 0 is x mem/0: location 1002 is 1060 run/0: ingredient 1 is data @@ -129,25 +140,33 @@ mem/0: location 1061 is 1062 run/0: product 0 is 1062 mem/0: storing 1062 in location 1003 run/0: instruction test-buffer-append-works/3 +run/0: {name: "x", value: 1, type: 2-9, properties: ["x": "address":"buffer"]} <- buffer-append {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 1060 run/0: instruction buffer-append/0 +run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new {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: 1065 run/0: instruction buffer-append/1 +run/0: {name: "in", value: 1, type: 2-9, properties: ["in": "address":"buffer"]} <- next-ingredient run/0: product 0 is 1060 mem/0: storing 1060 in location 1067 run/0: instruction buffer-append/2 +run/0: {name: "c", value: 2, type: 4, properties: ["c": "character"]} <- next-ingredient run/0: product 0 is 97 mem/0: storing 97 in location 1068 run/0: instruction buffer-append/4 +run/0: {name: "full?", value: 3, type: 3, properties: ["full?": "boolean"]} <- buffer-full? {name: "in", value: 1, type: 2-9, properties: ["in": "address":"buffer"]} mem/0: location 1067 is 1060 run/0: instruction buffer-full?/0 +run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new {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-full?/1 +run/0: {name: "in", value: 1, type: 2-9, properties: ["in": "address":"buffer"]} <- next-ingredient run/0: product 0 is 1060 mem/0: storing 1060 in location 1097 run/0: instruction buffer-full?/2 +run/0: {name: "len", value: 2, type: 1, properties: ["len": "integer"]} <- get {name: "in", value: 1, type: 2-9, properties: ["in": "address":"buffer", "deref": ]}, {name: "length", value: 0, type: 0, properties: ["length": "offset"]} run/0: ingredient 0 is in mem/0: location 1097 is 1060 run/0: ingredient 1 is length @@ -157,6 +176,7 @@ mem/0: location 1060 is 0 run/0: product 0 is 0 mem/0: storing 0 in location 1098 run/0: instruction buffer-full?/3 +run/0: {name: "s", value: 3, type: 2-5-4, properties: ["s": "address":"array":"character"]} <- get {name: "in", value: 1, type: 2-9, properties: ["in": "address":"buffer", "deref": ]}, {name: "data", value: 1, type: 0, properties: ["data": "offset"]} run/0: ingredient 0 is in mem/0: location 1097 is 1060 run/0: ingredient 1 is data @@ -166,9 +186,11 @@ mem/0: location 1061 is 1062 run/0: product 0 is 1062 mem/0: storing 1062 in location 1099 run/0: instruction buffer-full?/4 +run/0: {name: "capacity", value: 4, type: 1, properties: ["capacity": "integer"]} <- length {name: "s", value: 3, type: 2-5-4, properties: ["s": "address":"array":"character", "deref": ]} mem/0: location 1099 is 1062 mem/0: storing 3 in location 1100 run/0: instruction buffer-full?/5 +run/0: {name: "result", value: 5, type: 3, properties: ["result": "boolean"]} <- greater-or-equal {name: "len", value: 2, type: 1, properties: ["len": "integer"]}, {name: "capacity", value: 4, type: 1, properties: ["capacity": "integer"]} run/0: ingredient 0 is len mem/0: location 1098 is 0 run/0: ingredient 1 is capacity @@ -176,15 +198,18 @@ mem/0: location 1100 is 3 run/0: product 0 is 0 mem/0: storing 0 in location 1101 run/0: instruction buffer-full?/6 +run/0: reply {name: "result", value: 5, type: 3, properties: ["result": "boolean"]} mem/0: location 1101 is 0 run/0: result 0 is 0 mem/0: storing 0 in location 1069 run/0: instruction buffer-append/5 +run/0: break-unless {name: "full?", value: 3, type: 3, properties: ["full?": "boolean"]}, {name: "", value: 1, type: , properties: ["": ]} mem/0: location 1069 is 0 run/0: ingredient 0 is 0 run/0: ingredient 1 is run/0: jumping to instruction 7 run/0: instruction buffer-append/8 +run/0: {name: "len", value: 4, type: 2-1, properties: ["len": "address":"integer"]} <- get-address {name: "in", value: 1, type: 2-9, properties: ["in": "address":"buffer", "deref": ]}, {name: "length", value: 0, type: 0, properties: ["length": "offset"]} run/0: ingredient 0 is in mem/0: location 1067 is 1060 run/0: ingredient 1 is length @@ -192,6 +217,7 @@ run/0: address to copy is 1060 run/0: product 0 is 1060 mem/0: storing 1060 in location 1070 run/0: instruction buffer-append/9 +run/0: {name: "s", value: 5, type: 2-5-4, properties: ["s": "address":"array":"character"]} <- get {name: "in", value: 1, type: 2-9, properties: ["in": "address":"buffer", "deref": ]}, {name: "data", value: 1, type: 0, properties: ["data": "offset"]} run/0: ingredient 0 is in mem/0: location 1067 is 1060 run/0: ingredient 1 is data @@ -201,6 +227,7 @@ mem/0: location 1061 is 1062 run/0: product 0 is 1062 mem/0: storing 1062 in location 1071 run/0: instruction buffer-append/10 +run/0: {name: "dest", value: 6, type: 2-4, properties: ["dest": "address":"character"]} <- index-address {name: "s", value: 5, type: 2-5-4, properties: ["s": "address":"array":"character", "deref": ]}, {name: "len", value: 4, type: 2-1, properties: ["len": "address":"integer", "deref": ]} run/0: ingredient 0 is s mem/0: location 1071 is 1062 run/0: ingredient 1 is {name: "len", value: 4, type: 2-1, properties: ["len": "address":"integer", "deref": ]} @@ -210,11 +237,13 @@ run/0: address to copy is 1063 run/0: product 0 is 1063 mem/0: storing 1063 in location 1072 run/0: instruction buffer-append/11 +run/0: {name: "dest", value: 6, type: 2-4, properties: ["dest": "address":"character", "deref": ]} <- copy {name: "c", value: 2, type: 4, properties: ["c": "character"]} run/0: ingredient 0 is c mem/0: location 1068 is 97 mem/0: location 1072 is 1063 mem/0: storing 97 in location 1063 run/0: instruction buffer-append/12 +run/0: {name: "len", value: 4, type: 2-1, properties: ["len": "address":"integer", "deref": ]} <- add {name: "len", value: 4, type: 2-1, properties: ["len": "address":"integer", "deref": ]}, {name: "1", value: 1, type: 0, properties: ["1": "literal"]} run/0: ingredient 0 is len mem/0: location 1070 is 1060 mem/0: location 1060 is 0 @@ -223,29 +252,38 @@ run/0: product 0 is 1 mem/0: location 1070 is 1060 mem/0: storing 1 in location 1060 run/0: instruction buffer-append/13 +run/0: reply {name: "in", value: 1, type: 2-9, properties: ["in": "address":"buffer", "same-as-ingredient": "0"]} mem/0: location 1067 is 1060 run/0: result 0 is 1060 mem/0: storing 1060 in location 1002 run/0: instruction test-buffer-append-works/4 +run/0: {name: "x", value: 1, type: 2-9, properties: ["x": "address":"buffer"]} <- buffer-append {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 1060 run/0: instruction buffer-append/0 +run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new {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: 1125 run/0: instruction buffer-append/1 +run/0: {name: "in", value: 1, type: 2-9, properties: ["in": "address":"buffer"]} <- next-ingredient run/0: product 0 is 1060 mem/0: storing 1060 in location 1127 run/0: instruction buffer-append/2 +run/0: {name: "c", value: 2, type: 4, properties: ["c": "character"]} <- next-ingredient run/0: product 0 is 98 mem/0: storing 98 in location 1128 run/0: instruction buffer-append/4 +run/0: {name: "full?", value: 3, type: 3, properties: ["full?": "boolean"]} <- buffer-full? {name: "in", value: 1, type: 2-9, properties: ["in": "address":"buffer"]} mem/0: location 1127 is 1060 run/0: instruction buffer-full?/0 +run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new {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: 1155 run/0: instruction buffer-full?/1 +run/0: {name: "in", value: 1, type: 2-9, properties: ["in": "address":"buffer"]} <- next-ingredient run/0: product 0 is 1060 mem/0: storing 1060 in location 1157 run/0: instruction buffer-full?/2 +run/0: {name: "len", value: 2, type: 1, properties: ["len": "integer"]} <- get {name: "in", value: 1, type: 2-9, properties: ["in": "address":"buffer", "deref": ]}, {name: "length", value: 0, type: 0, properties: ["length": "offset"]} run/0: ingredient 0 is in mem/0: location 1157 is 1060 run/0: ingredient 1 is length @@ -255,6 +293,7 @@ mem/0: location 1060 is 1 run/0: product 0 is 1 mem/0: storing 1 in location 1158 run/0: instruction buffer-full?/3 +run/0: {name: "s", value: 3, type: 2-5-4, properties: ["s": "address":"array":"character"]} <- get {name: "in", value: 1, type: 2-9, properties: ["in": "address":"buffer", "deref": ]}, {name: "data", value: 1, type: 0, properties: ["data": "offset"]} run/0: ingredient 0 is in mem/0: location 1157 is 1060 run/0: ingredient 1 is data @@ -264,9 +303,11 @@ mem/0: location 1061 is 1062 run/0: product 0 is 1062 mem/0: storing 1062 in location 1159 run/0: instruction buffer-full?/4 +run/0: {name: "capacity", value: 4, type: 1, properties: ["capacity": "integer"]} <- length {name: "s", value: 3, type: 2-5-4, properties: ["s": "address":"array":"character", "deref": ]} mem/0: location 1159 is 1062 mem/0: storing 3 in location 1160 run/0: instruction buffer-full?/5 +run/0: {name: "result", value: 5, type: 3, properties: ["result": "boolean"]} <- greater-or-equal {name: "len", value: 2, type: 1, properties: ["len": "integer"]}, {name: "capacity", value: 4, type: 1, properties: ["capacity": "integer"]} run/0: ingredient 0 is len mem/0: location 1158 is 1 run/0: ingredient 1 is capacity @@ -274,15 +315,18 @@ mem/0: location 1160 is 3 run/0: product 0 is 0 mem/0: storing 0 in location 1161 run/0: instruction buffer-full?/6 +run/0: reply {name: "result", value: 5, type: 3, properties: ["result": "boolean"]} mem/0: location 1161 is 0 run/0: result 0 is 0 mem/0: storing 0 in location 1129 run/0: instruction buffer-append/5 +run/0: break-unless {name: "full?", value: 3, type: 3, properties: ["full?": "boolean"]}, {name: "", value: 1, type: , properties: ["": ]} mem/0: location 1129 is 0 run/0: ingredient 0 is 0 run/0: ingredient 1 is run/0: jumping to instruction 7 run/0: instruction buffer-append/8 +run/0: {name: "len", value: 4, type: 2-1, properties: ["len": "address":"integer"]} <- get-address {name: "in", value: 1, type: 2-9, properties: ["in": "address":"buffer", "deref": ]}, {name: "length", value: 0, type: 0, properties: ["length": "offset"]} run/0: ingredient 0 is in mem/0: location 1127 is 1060 run/0: ingredient 1 is length @@ -290,6 +334,7 @@ run/0: address to copy is 1060 run/0: product 0 is 1060 mem/0: storing 1060 in location 1130 run/0: instruction buffer-append/9 +run/0: {name: "s", value: 5, type: 2-5-4, properties: ["s": "address":"array":"character"]} <- get {name: "in", value: 1, type: 2-9, properties: ["in": "address":"buffer", "deref": ]}, {name: "data", value: 1, type: 0, properties: ["data": "offset"]} run/0: ingredient 0 is in mem/0: location 1127 is 1060 run/0: ingredient 1 is data @@ -299,6 +344,7 @@ mem/0: location 1061 is 1062 run/0: product 0 is 1062 mem/0: storing 1062 in location 1131 run/0: instruction buffer-append/10 +run/0: {name: "dest", value: 6, type: 2-4, properties: ["dest": "address":"character"]} <- index-address {name: "s", value: 5, type: 2-5-4, properties: ["s": "address":"array":"character", "deref": ]}, {name: "len", value: 4, type: 2-1, properties: ["len": "address":"integer", "deref": ]} run/0: ingredient 0 is s mem/0: location 1131 is 1062 run/0: ingredient 1 is {name: "len", value: 4, type: 2-1, properties: ["len": "address":"integer", "deref": ]} @@ -308,11 +354,13 @@ run/0: address to copy is 1064 run/0: product 0 is 1064 mem/0: storing 1064 in location 1132 run/0: instruction buffer-append/11 +run/0: {name: "dest", value: 6, type: 2-4, properties: ["dest": "address":"character", "deref": ]} <- copy {name: "c", value: 2, type: 4, properties: ["c": "character"]} run/0: ingredient 0 is c mem/0: location 1128 is 98 mem/0: location 1132 is 1064 mem/0: storing 98 in location 1064 run/0: instruction buffer-append/12 +run/0: {name: "len", value: 4, type: 2-1, properties: ["len": "address":"integer", "deref": ]} <- add {name: "len", value: 4, type: 2-1, properties: ["len": "address":"integer", "deref": ]}, {name: "1", value: 1, type: 0, properties: ["1": "literal"]} run/0: ingredient 0 is len mem/0: location 1130 is 1060 mem/0: location 1060 is 1 @@ -321,29 +369,38 @@ run/0: product 0 is 2 mem/0: location 1130 is 1060 mem/0: storing 2 in location 1060 run/0: instruction buffer-append/13 +run/0: reply {name: "in", value: 1, type: 2-9, properties: ["in": "address":"buffer", "same-as-ingredient": "0"]} mem/0: location 1127 is 1060 run/0: result 0 is 1060 mem/0: storing 1060 in location 1002 run/0: instruction test-buffer-append-works/5 +run/0: {name: "x", value: 1, type: 2-9, properties: ["x": "address":"buffer"]} <- buffer-append {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 1060 run/0: instruction buffer-append/0 +run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new {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: 1185 run/0: instruction buffer-append/1 +run/0: {name: "in", value: 1, type: 2-9, properties: ["in": "address":"buffer"]} <- next-ingredient run/0: product 0 is 1060 mem/0: storing 1060 in location 1187 run/0: instruction buffer-append/2 +run/0: {name: "c", value: 2, type: 4, properties: ["c": "character"]} <- next-ingredient run/0: product 0 is 99 mem/0: storing 99 in location 1188 run/0: instruction buffer-append/4 +run/0: {name: "full?", value: 3, type: 3, properties: ["full?": "boolean"]} <- buffer-full? {name: "in", value: 1, type: 2-9, properties: ["in": "address":"buffer"]} mem/0: location 1187 is 1060 run/0: instruction buffer-full?/0 +run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new {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: 1215 run/0: instruction buffer-full?/1 +run/0: {name: "in", value: 1, type: 2-9, properties: ["in": "address":"buffer"]} <- next-ingredient run/0: product 0 is 1060 mem/0: storing 1060 in location 1217 run/0: instruction buffer-full?/2 +run/0: {name: "len", value: 2, type: 1, properties: ["len": "integer"]} <- get {name: "in", value: 1, type: 2-9, properties: ["in": "address":"buffer", "deref": ]}, {name: "length", value: 0, type: 0, properties: ["length": "offset"]} run/0: ingredient 0 is in mem/0: location 1217 is 1060 run/0: ingredient 1 is length @@ -353,6 +410,7 @@ mem/0: location 1060 is 2 run/0: product 0 is 2 mem/0: storing 2 in location 1218 run/0: instruction buffer-full?/3 +run/0: {name: "s", value: 3, type: 2-5-4, properties: ["s": "address":"array":"character"]} <- get {name: "in", value: 1, type: 2-9, properties: ["in": "address":"buffer", "deref": ]}, {name: "data", value: 1, type: 0, properties: ["data": "offset"]} run/0: ingredient 0 is in mem/0: location 1217 is 1060 run/0: ingredient 1 is data @@ -362,9 +420,11 @@ mem/0: location 1061 is 1062 run/0: product 0 is 1062 mem/0: storing 1062 in location 1219 run/0: instruction buffer-full?/4 +run/0: {name: "capacity", value: 4, type: 1, properties: ["capacity": "integer"]} <- length {name: "s", value: 3, type: 2-5-4, properties: ["s": "address":"array":"character", "deref": ]} mem/0: location 1219 is 1062 mem/0: storing 3 in location 1220 run/0: instruction buffer-full?/5 +run/0: {name: "result", value: 5, type: 3, properties: ["result": "boolean"]} <- greater-or-equal {name: "len", value: 2, type: 1, properties: ["len": "integer"]}, {name: "capacity", value: 4, type: 1, properties: ["capacity": "integer"]} run/0: ingredient 0 is len mem/0: location 1218 is 2 run/0: ingredient 1 is capacity @@ -372,15 +432,18 @@ mem/0: location 1220 is 3 run/0: product 0 is 0 mem/0: storing 0 in location 1221 run/0: instruction buffer-full?/6 +run/0: reply {name: "result", value: 5, type: 3, properties: ["result": "boolean"]} mem/0: location 1221 is 0 run/0: result 0 is 0 mem/0: storing 0 in location 1189 run/0: instruction buffer-append/5 +run/0: break-unless {name: "full?", value: 3, type: 3, properties: ["full?": "boolean"]}, {name: "", value: 1, type: , properties: ["": ]} mem/0: location 1189 is 0 run/0: ingredient 0 is 0 run/0: ingredient 1 is run/0: jumping to instruction 7 run/0: instruction buffer-append/8 +run/0: {name: "len", value: 4, type: 2-1, properties: ["len": "address":"integer"]} <- get-address {name: "in", value: 1, type: 2-9, properties: ["in": "address":"buffer", "deref": ]}, {name: "length", value: 0, type: 0, properties: ["length": "offset"]} run/0: ingredient 0 is in mem/0: location 1187 is 1060 run/0: ingredient 1 is length @@ -388,6 +451,7 @@ run/0: address to copy is 1060 run/0: product 0 is 1060 mem/0: storing 1060 in location 1190 run/0: instruction buffer-append/9 +run/0: {name: "s", value: 5, type: 2-5-4, properties: ["s": "address":"array":"character"]} <- get {name: "in", value: 1, type: 2-9, properties: ["in": "address":"buffer", "deref": ]}, {name: "data", value: 1, type: 0, properties: ["data": "offset"]} run/0: ingredient 0 is in mem/0: location 1187 is 1060 run/0: ingredient 1 is data @@ -397,6 +461,7 @@ mem/0: location 1061 is 1062 run/0: product 0 is 1062 mem/0: storing 1062 in location 1191 run/0: instruction buffer-append/10 +run/0: {name: "dest", value: 6, type: 2-4, properties: ["dest": "address":"character"]} <- index-address {name: "s", value: 5, type: 2-5-4, properties: ["s": "address":"array":"character", "deref": ]}, {name: "len", value: 4, type: 2-1, properties: ["len": "address":"integer", "deref": ]} run/0: ingredient 0 is s mem/0: location 1191 is 1062 run/0: ingredient 1 is {name: "len", value: 4, type: 2-1, properties: ["len": "address":"integer", "deref": ]} @@ -406,11 +471,13 @@ run/0: address to copy is 1065 run/0: product 0 is 1065 mem/0: storing 1065 in location 1192 run/0: instruction buffer-append/11 +run/0: {name: "dest", value: 6, type: 2-4, properties: ["dest": "address":"character", "deref": ]} <- copy {name: "c", value: 2, type: 4, properties: ["c": "character"]} run/0: ingredient 0 is c mem/0: location 1188 is 99 mem/0: location 1192 is 1065 mem/0: storing 99 in location 1065 run/0: instruction buffer-append/12 +run/0: {name: "len", value: 4, type: 2-1, properties: ["len": "address":"integer", "deref": ]} <- add {name: "len", value: 4, type: 2-1, properties: ["len": "address":"integer", "deref": ]}, {name: "1", value: 1, type: 0, properties: ["1": "literal"]} run/0: ingredient 0 is len mem/0: location 1190 is 1060 mem/0: location 1060 is 2 @@ -419,10 +486,12 @@ run/0: product 0 is 3 mem/0: location 1190 is 1060 mem/0: storing 3 in location 1060 run/0: instruction buffer-append/13 +run/0: reply {name: "in", value: 1, type: 2-9, properties: ["in": "address":"buffer", "same-as-ingredient": "0"]} mem/0: location 1187 is 1060 run/0: result 0 is 1060 mem/0: storing 1060 in location 1002 run/0: instruction test-buffer-append-works/6 +run/0: {name: "s2", value: 3, type: 2-5-4, properties: ["s2": "address":"array":"character"]} <- get {name: "x", value: 1, type: 2-9, properties: ["x": "address":"buffer", "deref": ]}, {name: "data", value: 1, type: 0, properties: ["data": "offset"]} run/0: ingredient 0 is x mem/0: location 1002 is 1060 run/0: ingredient 1 is data @@ -432,6 +501,7 @@ mem/0: location 1061 is 1062 run/0: product 0 is 1062 mem/0: storing 1062 in location 1004 run/0: instruction test-buffer-append-works/7 +run/0: {name: "1", value: 1, type: 3, properties: ["1": "boolean", "raw": ]} <- equal {name: "s1", value: 2, type: 2-5-4, properties: ["s1": "address":"array":"character"]}, {name: "s2", value: 3, type: 2-5-4, properties: ["s2": "address":"array":"character"]} run/0: ingredient 0 is s1 mem/0: location 1003 is 1062 run/0: ingredient 1 is s2 @@ -439,6 +509,7 @@ mem/0: location 1004 is 1062 run/0: product 0 is 1 mem/0: storing 1 in location 1 run/0: instruction test-buffer-append-works/8 +run/0: {name: "2", value: 2, type: 5-4, properties: ["2": "array":"character", "raw": ]} <- copy {name: "s2", value: 3, type: 2-5-4, properties: ["s2": "address":"array":"character", "deref": ]} run/0: ingredient 0 is s2 mem/0: location 1004 is 1062 mem/0: location 1062 is 3 @@ -450,25 +521,33 @@ mem/0: storing 97 in location 3 mem/0: storing 98 in location 4 mem/0: storing 99 in location 5 run/0: instruction test-buffer-append-works/10 +run/0: {name: "x", value: 1, type: 2-9, properties: ["x": "address":"buffer"]} <- buffer-append {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 1060 run/0: instruction buffer-append/0 +run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new {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: 1245 run/0: instruction buffer-append/1 +run/0: {name: "in", value: 1, type: 2-9, properties: ["in": "address":"buffer"]} <- next-ingredient run/0: product 0 is 1060 mem/0: storing 1060 in location 1247 run/0: instruction buffer-append/2 +run/0: {name: "c", value: 2, type: 4, properties: ["c": "character"]} <- next-ingredient run/0: product 0 is 100 mem/0: storing 100 in location 1248 run/0: instruction buffer-append/4 +run/0: {name: "full?", value: 3, type: 3, properties: ["full?": "boolean"]} <- buffer-full? {name: "in", value: 1, type: 2-9, properties: ["in": "address":"buffer"]} mem/0: location 1247 is 1060 run/0: instruction buffer-full?/0 +run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new {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: 1275 run/0: instruction buffer-full?/1 +run/0: {name: "in", value: 1, type: 2-9, properties: ["in": "address":"buffer"]} <- next-ingredient run/0: product 0 is 1060 mem/0: storing 1060 in location 1277 run/0: instruction buffer-full?/2 +run/0: {name: "len", value: 2, type: 1, properties: ["len": "integer"]} <- get {name: "in", value: 1, type: 2-9, properties: ["in": "address":"buffer", "deref": ]}, {name: "length", value: 0, type: 0, properties: ["length": "offset"]} run/0: ingredient 0 is in mem/0: location 1277 is 1060 run/0: ingredient 1 is length @@ -478,6 +557,7 @@ mem/0: location 1060 is 3 run/0: product 0 is 3 mem/0: storing 3 in location 1278 run/0: instruction buffer-full?/3 +run/0: {name: "s", value: 3, type: 2-5-4, properties: ["s": "address":"array":"character"]} <- get {name: "in", value: 1, type: 2-9, properties: ["in": "address":"buffer", "deref": ]}, {name: "data", value: 1, type: 0, properties: ["data": "offset"]} run/0: ingredient 0 is in mem/0: location 1277 is 1060 run/0: ingredient 1 is data @@ -487,9 +567,11 @@ mem/0: location 1061 is 1062 run/0: product 0 is 1062 mem/0: storing 1062 in location 1279 run/0: instruction buffer-full?/4 +run/0: {name: "capacity", value: 4, type: 1, properties: ["capacity": "integer"]} <- length {name: "s", value: 3, type: 2-5-4, properties: ["s": "address":"array":"character", "deref": ]} mem/0: location 1279 is 1062 mem/0: storing 3 in location 1280 run/0: instruction buffer-full?/5 +run/0: {name: "result", value: 5, type: 3, properties: ["result": "boolean"]} <- greater-or-equal {name: "len", value: 2, type: 1, properties: ["len": "integer"]}, {name: "capacity", value: 4, type: 1, properties: ["capacity": "integer"]} run/0: ingredient 0 is len mem/0: location 1278 is 3 run/0: ingredient 1 is capacity @@ -497,22 +579,28 @@ mem/0: location 1280 is 3 run/0: product 0 is 1 mem/0: storing 1 in location 1281 run/0: instruction buffer-full?/6 +run/0: reply {name: "result", value: 5, type: 3, properties: ["result": "boolean"]} mem/0: location 1281 is 1 run/0: result 0 is 1 mem/0: storing 1 in location 1249 run/0: instruction buffer-append/5 +run/0: break-unless {name: "full?", value: 3, type: 3, properties: ["full?": "boolean"]}, {name: "", value: 1, type: , properties: ["": ]} mem/0: location 1249 is 1 run/0: ingredient 0 is 1 run/0: jump-unless fell through run/0: instruction buffer-append/6 +run/0: {name: "in", value: 1, type: 2-9, properties: ["in": "address":"buffer"]} <- grow-buffer {name: "in", value: 1, type: 2-9, properties: ["in": "address":"buffer"]} mem/0: location 1247 is 1060 run/0: instruction grow-buffer/0 +run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new {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: 1305 run/0: instruction grow-buffer/1 +run/0: {name: "in", value: 1, type: 2-9, properties: ["in": "address":"buffer"]} <- next-ingredient run/0: product 0 is 1060 mem/0: storing 1060 in location 1307 run/0: instruction grow-buffer/2 +run/0: {name: "x", value: 2, type: 2-2-5-4, properties: ["x": "address":"address":"array":"character"]} <- get-address {name: "in", value: 1, type: 2-9, properties: ["in": "address":"buffer", "deref": ]}, {name: "data", value: 1, type: 0, properties: ["data": "offset"]} run/0: ingredient 0 is in mem/0: location 1307 is 1060 run/0: ingredient 1 is data @@ -520,10 +608,12 @@ run/0: address to copy is 1061 run/0: product 0 is 1061 mem/0: storing 1061 in location 1308 run/0: instruction grow-buffer/3 +run/0: {name: "oldlen", value: 3, type: 1, properties: ["oldlen": "integer"]} <- length {name: "x", value: 2, type: 2-2-5-4, properties: ["x": "address":"address":"array":"character", "deref": , "deref": ]} mem/0: location 1308 is 1061 mem/0: location 1061 is 1062 mem/0: storing 3 in location 1309 run/0: instruction grow-buffer/4 +run/0: {name: "newlen", value: 4, type: 1, properties: ["newlen": "integer"]} <- multiply {name: "oldlen", value: 3, type: 1, properties: ["oldlen": "integer"]}, {name: "2", value: 2, type: 0, properties: ["2": "literal"]} run/0: ingredient 0 is oldlen mem/0: location 1309 is 3 run/0: ingredient 1 is 2 @@ -531,20 +621,24 @@ run/0: ingredient 1 is 2 run/0: product 0 is 6 mem/0: storing 6 in location 1310 run/0: instruction grow-buffer/5 +run/0: {name: "olddata", value: 5, type: 2-5-4, properties: ["olddata": "address":"array":"character"]} <- copy {name: "x", value: 2, type: 2-2-5-4, properties: ["x": "address":"address":"array":"character", "deref": ]} run/0: ingredient 0 is x mem/0: location 1308 is 1061 mem/0: location 1061 is 1062 mem/0: storing 1062 in location 1311 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 {name: "character", value: 4, type: 0, properties: ["character": "type"]}, {name: "newlen", value: 4, type: 1, properties: ["newlen": "integer"]} mem/0: location 1310 is 6 mem/0: array size is 6 mem/0: new alloc: 1335 mem/0: location 1308 is 1061 mem/0: storing 1335 in location 1061 run/0: instruction grow-buffer/7 +run/0: {name: "i", value: 6, type: 1, properties: ["i": "integer"]} <- copy {name: "0", value: 0, type: 0, properties: ["0": "literal"]} run/0: ingredient 0 is 0 mem/0: storing 0 in location 1312 run/0: instruction grow-buffer/9 +run/0: {name: "done?", value: 7, type: 3, properties: ["done?": "boolean"]} <- greater-or-equal {name: "i", value: 6, type: 1, properties: ["i": "integer"]}, {name: "oldlen", value: 3, type: 1, properties: ["oldlen": "integer"]} run/0: ingredient 0 is i mem/0: location 1312 is 0 run/0: ingredient 1 is oldlen @@ -552,10 +646,12 @@ mem/0: location 1309 is 3 run/0: product 0 is 0 mem/0: storing 0 in location 1313 run/0: instruction grow-buffer/10 +run/0: break-if {name: "done?", value: 7, type: 3, properties: ["done?": "boolean"]}, {name: "", value: 5, type: , properties: ["": ]} mem/0: location 1313 is 0 run/0: ingredient 0 is 0 run/0: jump-if fell through run/0: instruction grow-buffer/11 +run/0: {name: "src", value: 8, type: 4, properties: ["src": "character"]} <- index {name: "olddata", value: 5, type: 2-5-4, properties: ["olddata": "address":"array":"character", "deref": ]}, {name: "i", value: 6, type: 1, properties: ["i": "integer"]} run/0: ingredient 0 is {name: "olddata", value: 5, type: 2-5-4, properties: ["olddata": "address":"array":"character", "deref": ]} mem/0: location 1311 is 1062 run/0: ingredient 1 is {name: "i", value: 6, type: 1, properties: ["i": "integer"]} @@ -566,6 +662,7 @@ mem/0: location 1063 is 97 run/0: product 0 is 97 mem/0: storing 97 in location 1314 run/0: instruction grow-buffer/12 +run/0: {name: "dest", value: 9, type: 2-4, properties: ["dest": "address":"character"]} <- index-address {name: "x", value: 2, type: 2-2-5-4, properties: ["x": "address":"address":"array":"character", "deref": , "deref": ]}, {name: "i", value: 6, type: 1, properties: ["i": "integer"]} run/0: ingredient 0 is x mem/0: location 1308 is 1061 mem/0: location 1061 is 1335 @@ -575,20 +672,24 @@ run/0: address to copy is 1336 run/0: product 0 is 1336 mem/0: storing 1336 in location 1315 run/0: instruction grow-buffer/13 +run/0: {name: "dest", value: 9, type: 2-4, properties: ["dest": "address":"character", "deref": ]} <- copy {name: "src", value: 8, type: 4, properties: ["src": "character"]} run/0: ingredient 0 is src mem/0: location 1314 is 97 mem/0: location 1315 is 1336 mem/0: storing 97 in location 1336 run/0: instruction grow-buffer/14 +run/0: {name: "i", value: 6, type: 1, properties: ["i": "integer"]} <- add {name: "i", value: 6, type: 1, properties: ["i": "integer"]}, {name: "1", value: 1, type: 0, properties: ["1": "literal"]} run/0: ingredient 0 is i mem/0: location 1312 is 0 run/0: ingredient 1 is 1 run/0: product 0 is 1 mem/0: storing 1 in location 1312 run/0: instruction grow-buffer/15 +run/0: loop {name: "", value: -7, type: , properties: ["": ]} run/0: ingredient 0 is -7 run/0: jumping to instruction 9 run/0: instruction grow-buffer/9 +run/0: {name: "done?", value: 7, type: 3, properties: ["done?": "boolean"]} <- greater-or-equal {name: "i", value: 6, type: 1, properties: ["i": "integer"]}, {name: "oldlen", value: 3, type: 1, properties: ["oldlen": "integer"]} run/0: ingredient 0 is i mem/0: location 1312 is 1 run/0: ingredient 1 is oldlen @@ -596,10 +697,12 @@ mem/0: location 1309 is 3 run/0: product 0 is 0 mem/0: storing 0 in location 1313 run/0: instruction grow-buffer/10 +run/0: break-if {name: "done?", value: 7, type: 3, properties: ["done?": "boolean"]}, {name: "", value: 5, type: , properties: ["": ]} mem/0: location 1313 is 0 run/0: ingredient 0 is 0 run/0: jump-if fell through run/0: instruction grow-buffer/11 +run/0: {name: "src", value: 8, type: 4, properties: ["src": "character"]} <- index {name: "olddata", value: 5, type: 2-5-4, properties: ["olddata": "address":"array":"character", "deref": ]}, {name: "i", value: 6, type: 1, properties: ["i": "integer"]} run/0: ingredient 0 is {name: "olddata", value: 5, type: 2-5-4, properties: ["olddata": "address":"array":"character", "deref": ]} mem/0: location 1311 is 1062 run/0: ingredient 1 is {name: "i", value: 6, type: 1, properties: ["i": "integer"]} @@ -610,6 +713,7 @@ mem/0: location 1064 is 98 run/0: product 0 is 98 mem/0: storing 98 in location 1314 run/0: instruction grow-buffer/12 +run/0: {name: "dest", value: 9, type: 2-4, properties: ["dest": "address":"character"]} <- index-address {name: "x", value: 2, type: 2-2-5-4, properties: ["x": "address":"address":"array":"character", "deref": , "deref": ]}, {name: "i", value: 6, type: 1, properties: ["i": "integer"]} run/0: ingredient 0 is x mem/0: location 1308 is 1061 mem/0: location 1061 is 1335 @@ -619,20 +723,24 @@ run/0: address to copy is 1337 run/0: product 0 is 1337 mem/0: storing 1337 in location 1315 run/0: instruction grow-buffer/13 +run/0: {name: "dest", value: 9, type: 2-4, properties: ["dest": "address":"character", "deref": ]} <- copy {name: "src", value: 8, type: 4, properties: ["src": "character"]} run/0: ingredient 0 is src mem/0: location 1314 is 98 mem/0: location 1315 is 1337 mem/0: storing 98 in location 1337 run/0: instruction grow-buffer/14 +run/0: {name: "i", value: 6, type: 1, properties: ["i": "integer"]} <- add {name: "i", value: 6, type: 1, properties: ["i": "integer"]}, {name: "1", value: 1, type: 0, properties: ["1": "literal"]} run/0: ingredient 0 is i mem/0: location 1312 is 1 run/0: ingredient 1 is 1 run/0: product 0 is 2 mem/0: storing 2 in location 1312 run/0: instruction grow-buffer/15 +run/0: loop {name: "", value: -7, type: , properties: ["": ]} run/0: ingredient 0 is -7 run/0: jumping to instruction 9 run/0: instruction grow-buffer/9 +run/0: {name: "done?", value: 7, type: 3, properties: ["done?": "boolean"]} <- greater-or-equal {name: "i", value: 6, type: 1, properties: ["i": "integer"]}, {name: "oldlen", value: 3, type: 1, properties: ["oldlen": "integer"]} run/0: ingredient 0 is i mem/0: location 1312 is 2 run/0: ingredient 1 is oldlen @@ -640,10 +748,12 @@ mem/0: location 1309 is 3 run/0: product 0 is 0 mem/0: storing 0 in location 1313 run/0: instruction grow-buffer/10 +run/0: break-if {name: "done?", value: 7, type: 3, properties: ["done?": "boolean"]}, {name: "", value: 5, type: , properties: ["": ]} mem/0: location 1313 is 0 run/0: ingredient 0 is 0 run/0: jump-if fell through run/0: instruction grow-buffer/11 +run/0: {name: "src", value: 8, type: 4, properties: ["src": "character"]} <- index {name: "olddata", value: 5, type: 2-5-4, properties: ["olddata": "address":"array":"character", "deref": ]}, {name: "i", value: 6, type: 1, properties: ["i": "integer"]} run/0: ingredient 0 is {name: "olddata", value: 5, type: 2-5-4, properties: ["olddata": "address":"array":"character", "deref": ]} mem/0: location 1311 is 1062 run/0: ingredient 1 is {name: "i", value: 6, type: 1, properties: ["i": "integer"]} @@ -654,6 +764,7 @@ mem/0: location 1065 is 99 run/0: product 0 is 99 mem/0: storing 99 in location 1314 run/0: instruction grow-buffer/12 +run/0: {name: "dest", value: 9, type: 2-4, properties: ["dest": "address":"character"]} <- index-address {name: "x", value: 2, type: 2-2-5-4, properties: ["x": "address":"address":"array":"character", "deref": , "deref": ]}, {name: "i", value: 6, type: 1, properties: ["i": "integer"]} run/0: ingredient 0 is x mem/0: location 1308 is 1061 mem/0: location 1061 is 1335 @@ -663,20 +774,24 @@ run/0: address to copy is 1338 run/0: product 0 is 1338 mem/0: storing 1338 in location 1315 run/0: instruction grow-buffer/13 +run/0: {name: "dest", value: 9, type: 2-4, properties: ["dest": "address":"character", "deref": ]} <- copy {name: "src", value: 8, type: 4, properties: ["src": "character"]} run/0: ingredient 0 is src mem/0: location 1314 is 99 mem/0: location 1315 is 1338 mem/0: storing 99 in location 1338 run/0: instruction grow-buffer/14 +run/0: {name: "i", value: 6, type: 1, properties: ["i": "integer"]} <- add {name: "i", value: 6, type: 1, properties: ["i": "integer"]}, {name: "1", value: 1, type: 0, properties: ["1": "literal"]} run/0: ingredient 0 is i mem/0: location 1312 is 2 run/0: ingredient 1 is 1 run/0: product 0 is 3 mem/0: storing 3 in location 1312 run/0: instruction grow-buffer/15 +run/0: loop {name: "", value: -7, type: , properties: ["": ]} run/0: ingredient 0 is -7 run/0: jumping to instruction 9 run/0: instruction grow-buffer/9 +run/0: {name: "done?", value: 7, type: 3, properties: ["done?": "boolean"]} <- greater-or-equal {name: "i", value: 6, type: 1, properties: ["i": "integer"]}, {name: "oldlen", value: 3, type: 1, properties: ["oldlen": "integer"]} run/0: ingredient 0 is i mem/0: location 1312 is 3 run/0: ingredient 1 is oldlen @@ -684,15 +799,18 @@ mem/0: location 1309 is 3 run/0: product 0 is 1 mem/0: storing 1 in location 1313 run/0: instruction grow-buffer/10 +run/0: break-if {name: "done?", value: 7, type: 3, properties: ["done?": "boolean"]}, {name: "", value: 5, type: , properties: ["": ]} mem/0: location 1313 is 1 run/0: ingredient 0 is 1 run/0: ingredient 1 is run/0: jumping to instruction 16 run/0: instruction grow-buffer/17 +run/0: reply {name: "in", value: 1, type: 2-9, properties: ["in": "address":"buffer"]} mem/0: location 1307 is 1060 run/0: result 0 is 1060 mem/0: storing 1060 in location 1247 run/0: instruction buffer-append/8 +run/0: {name: "len", value: 4, type: 2-1, properties: ["len": "address":"integer"]} <- get-address {name: "in", value: 1, type: 2-9, properties: ["in": "address":"buffer", "deref": ]}, {name: "length", value: 0, type: 0, properties: ["length": "offset"]} run/0: ingredient 0 is in mem/0: location 1247 is 1060 run/0: ingredient 1 is length @@ -700,6 +818,7 @@ run/0: address to copy is 1060 run/0: product 0 is 1060 mem/0: storing 1060 in location 1250 run/0: instruction buffer-append/9 +run/0: {name: "s", value: 5, type: 2-5-4, properties: ["s": "address":"array":"character"]} <- get {name: "in", value: 1, type: 2-9, properties: ["in": "address":"buffer", "deref": ]}, {name: "data", value: 1, type: 0, properties: ["data": "offset"]} run/0: ingredient 0 is in mem/0: location 1247 is 1060 run/0: ingredient 1 is data @@ -709,6 +828,7 @@ mem/0: location 1061 is 1335 run/0: product 0 is 1335 mem/0: storing 1335 in location 1251 run/0: instruction buffer-append/10 +run/0: {name: "dest", value: 6, type: 2-4, properties: ["dest": "address":"character"]} <- index-address {name: "s", value: 5, type: 2-5-4, properties: ["s": "address":"array":"character", "deref": ]}, {name: "len", value: 4, type: 2-1, properties: ["len": "address":"integer", "deref": ]} run/0: ingredient 0 is s mem/0: location 1251 is 1335 run/0: ingredient 1 is {name: "len", value: 4, type: 2-1, properties: ["len": "address":"integer", "deref": ]} @@ -718,11 +838,13 @@ run/0: address to copy is 1339 run/0: product 0 is 1339 mem/0: storing 1339 in location 1252 run/0: instruction buffer-append/11 +run/0: {name: "dest", value: 6, type: 2-4, properties: ["dest": "address":"character", "deref": ]} <- copy {name: "c", value: 2, type: 4, properties: ["c": "character"]} run/0: ingredient 0 is c mem/0: location 1248 is 100 mem/0: location 1252 is 1339 mem/0: storing 100 in location 1339 run/0: instruction buffer-append/12 +run/0: {name: "len", value: 4, type: 2-1, properties: ["len": "address":"integer", "deref": ]} <- add {name: "len", value: 4, type: 2-1, properties: ["len": "address":"integer", "deref": ]}, {name: "1", value: 1, type: 0, properties: ["1": "literal"]} run/0: ingredient 0 is len mem/0: location 1250 is 1060 mem/0: location 1060 is 3 @@ -731,10 +853,12 @@ run/0: product 0 is 4 mem/0: location 1250 is 1060 mem/0: storing 4 in location 1060 run/0: instruction buffer-append/13 +run/0: reply {name: "in", value: 1, type: 2-9, properties: ["in": "address":"buffer", "same-as-ingredient": "0"]} mem/0: location 1247 is 1060 run/0: result 0 is 1060 mem/0: storing 1060 in location 1002 run/0: instruction test-buffer-append-works/11 +run/0: {name: "s3", value: 4, type: 2-5-4, properties: ["s3": "address":"array":"character"]} <- get {name: "x", value: 1, type: 2-9, properties: ["x": "address":"buffer", "deref": ]}, {name: "data", value: 1, type: 0, properties: ["data": "offset"]} run/0: ingredient 0 is x mem/0: location 1002 is 1060 run/0: ingredient 1 is data @@ -744,6 +868,7 @@ mem/0: location 1061 is 1335 run/0: product 0 is 1335 mem/0: storing 1335 in location 1005 run/0: instruction test-buffer-append-works/12 +run/0: {name: "10", value: 10, type: 3, properties: ["10": "boolean", "raw": ]} <- equal {name: "s1", value: 2, type: 2-5-4, properties: ["s1": "address":"array":"character"]}, {name: "s3", value: 4, type: 2-5-4, properties: ["s3": "address":"array":"character"]} run/0: ingredient 0 is s1 mem/0: location 1003 is 1062 run/0: ingredient 1 is s3 @@ -751,6 +876,7 @@ mem/0: location 1005 is 1335 run/0: product 0 is 0 mem/0: storing 0 in location 10 run/0: instruction test-buffer-append-works/13 +run/0: {name: "11", value: 11, type: 1, properties: ["11": "integer", "raw": ]} <- get {name: "x", value: 1, type: 2-9, properties: ["x": "address":"buffer", "deref": ]}, {name: "length", value: 0, type: 0, properties: ["length": "offset"]} run/0: ingredient 0 is x mem/0: location 1002 is 1060 run/0: ingredient 1 is length @@ -760,6 +886,7 @@ mem/0: location 1060 is 4 run/0: product 0 is 4 mem/0: storing 4 in location 11 run/0: instruction test-buffer-append-works/14 +run/0: {name: "12", value: 12, type: 5-4, properties: ["12": "array":"character", "raw": ]} <- copy {name: "s3", value: 4, type: 2-5-4, properties: ["s3": "address":"array":"character", "deref": ]} run/0: ingredient 0 is s3 mem/0: location 1005 is 1335 mem/0: location 1335 is 6 diff --git a/cpp/.traces/calling_recipe b/cpp/.traces/calling_recipe index c2d96247..9b265ca1 100644 --- a/cpp/.traces/calling_recipe +++ b/cpp/.traces/calling_recipe @@ -10,7 +10,9 @@ after-brace/0: add ... new/0: routine allocated memory from 1000 to 101000 schedule/0: main run/0: instruction main/0 +run/0: f run/0: instruction f/0 +run/0: {name: "3", value: 3, type: 1, properties: ["3": "integer"]} <- add {name: "2", value: 2, type: 0, properties: ["2": "literal"]}, {name: "2", value: 2, type: 0, properties: ["2": "literal"]} run/0: ingredient 0 is 2 run/0: ingredient 1 is 2 run/0: product 0 is 4 diff --git a/cpp/.traces/channel b/cpp/.traces/channel index 39e30c03..00679385 100644 --- a/cpp/.traces/channel +++ b/cpp/.traces/channel @@ -16,13 +16,17 @@ after-brace/0: read ... new/0: routine allocated memory from 1000 to 101000 schedule/0: test-channel run/0: instruction test-channel/0 +run/0: {name: "1", value: 1, type: 2-10, properties: ["1": "address":"channel"]} <- init-channel {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 {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 {name: "channel", value: 10, type: 0, properties: ["channel": "type"]} mem/0: new alloc: 1030 mem/0: storing 1030 in location 1002 run/0: instruction init-channel/2 +run/0: {name: "full", value: 2, type: 2-1, properties: ["full": "address":"integer"]} <- get-address {name: "result", value: 1, type: 2-10, properties: ["result": "address":"channel", "deref": ]}, {name: "first-full", value: 0, type: 0, properties: ["first-full": "offset"]} run/0: ingredient 0 is result mem/0: location 1002 is 1030 run/0: ingredient 1 is first-full @@ -30,10 +34,12 @@ run/0: address to copy is 1030 run/0: product 0 is 1030 mem/0: storing 1030 in location 1003 run/0: instruction init-channel/3 +run/0: {name: "full", value: 2, type: 2-1, properties: ["full": "address":"integer", "deref": ]} <- copy {name: "0", value: 0, type: 0, properties: ["0": "literal"]} run/0: ingredient 0 is 0 mem/0: location 1003 is 1030 mem/0: storing 0 in location 1030 run/0: instruction init-channel/4 +run/0: {name: "free", value: 3, type: 2-1, properties: ["free": "address":"integer"]} <- get-address {name: "result", value: 1, type: 2-10, properties: ["result": "address":"channel", "deref": ]}, {name: "first-free", value: 1, type: 0, properties: ["first-free": "offset"]} run/0: ingredient 0 is result mem/0: location 1002 is 1030 run/0: ingredient 1 is first-free @@ -41,19 +47,23 @@ run/0: address to copy is 1031 run/0: product 0 is 1031 mem/0: storing 1031 in location 1004 run/0: instruction init-channel/5 +run/0: {name: "free", value: 3, type: 2-1, properties: ["free": "address":"integer", "deref": ]} <- copy {name: "0", value: 0, type: 0, properties: ["0": "literal"]} run/0: ingredient 0 is 0 mem/0: location 1004 is 1031 mem/0: storing 0 in location 1031 run/0: instruction init-channel/6 +run/0: {name: "capacity", value: 4, type: 1, properties: ["capacity": "integer"]} <- next-ingredient run/0: product 0 is 3 mem/0: storing 3 in location 1005 run/0: instruction init-channel/7 +run/0: {name: "capacity", value: 4, type: 1, properties: ["capacity": "integer"]} <- add {name: "capacity", value: 4, type: 1, properties: ["capacity": "integer"]}, {name: "1", value: 1, type: 0, properties: ["1": "literal"]} run/0: ingredient 0 is capacity mem/0: location 1005 is 3 run/0: ingredient 1 is 1 run/0: product 0 is 4 mem/0: storing 4 in location 1005 run/0: instruction init-channel/8 +run/0: {name: "dest", value: 5, type: 2-2-5-1, properties: ["dest": "address":"address":"array":"location"]} <- get-address {name: "result", value: 1, type: 2-10, properties: ["result": "address":"channel", "deref": ]}, {name: "data", value: 2, type: 0, properties: ["data": "offset"]} run/0: ingredient 0 is result mem/0: location 1002 is 1030 run/0: ingredient 1 is data @@ -61,35 +71,45 @@ run/0: address to copy is 1032 run/0: product 0 is 1032 mem/0: storing 1032 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 {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: 1033 mem/0: location 1006 is 1032 mem/0: storing 1033 in location 1032 run/0: instruction init-channel/10 +run/0: reply {name: "result", value: 1, type: 2-10, properties: ["result": "address":"channel"]} mem/0: location 1002 is 1030 run/0: result 0 is 1030 mem/0: storing 1030 in location 1 run/0: instruction test-channel/1 +run/0: {name: "1", value: 1, type: 2-10, properties: ["1": "address":"channel"]} <- write {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 1030 run/0: instruction write/0 +run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new {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 +run/0: {name: "chan", value: 1, type: 2-10, properties: ["chan": "address":"channel"]} <- next-ingredient run/0: product 0 is 1030 mem/0: storing 1030 in location 1039 run/0: instruction write/2 +run/0: {name: "val", value: 2, type: 1, properties: ["val": "location"]} <- next-ingredient run/0: product 0 is 34 mem/0: storing 34 in location 1040 run/0: instruction write/4 +run/0: {name: "full", value: 3, type: 3, properties: ["full": "boolean"]} <- channel-full? {name: "chan", value: 1, type: 2-10, properties: ["chan": "address":"channel"]} mem/0: location 1039 is 1030 run/0: instruction channel-full?/0 +run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new {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: 1067 run/0: instruction channel-full?/1 +run/0: {name: "chan", value: 1, type: 2-10, properties: ["chan": "address":"channel"]} <- next-ingredient run/0: product 0 is 1030 mem/0: storing 1030 in location 1069 run/0: instruction channel-full?/2 +run/0: {name: "tmp", value: 2, type: 1, properties: ["tmp": "integer"]} <- get {name: "chan", value: 1, type: 2-10, properties: ["chan": "address":"channel", "deref": ]}, {name: "first-free", value: 1, type: 0, properties: ["first-free": "offset"]} run/0: ingredient 0 is chan mem/0: location 1069 is 1030 run/0: ingredient 1 is first-free @@ -99,20 +119,25 @@ mem/0: location 1031 is 0 run/0: product 0 is 0 mem/0: storing 0 in location 1070 run/0: instruction channel-full?/3 +run/0: {name: "tmp", value: 2, type: 1, properties: ["tmp": "integer"]} <- add {name: "tmp", value: 2, type: 1, properties: ["tmp": "integer"]}, {name: "1", value: 1, type: 0, properties: ["1": "literal"]} run/0: ingredient 0 is tmp mem/0: location 1070 is 0 run/0: ingredient 1 is 1 run/0: product 0 is 1 mem/0: storing 1 in location 1070 run/0: instruction channel-full?/5 +run/0: {name: "len", value: 3, type: 1, properties: ["len": "integer"]} <- channel-capacity {name: "chan", value: 1, type: 2-10, properties: ["chan": "address":"channel"]} mem/0: location 1069 is 1030 run/0: instruction channel-capacity/0 +run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new {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: 1097 run/0: instruction channel-capacity/1 +run/0: {name: "chan", value: 1, type: 2-10, properties: ["chan": "address":"channel"]} <- next-ingredient run/0: product 0 is 1030 mem/0: storing 1030 in location 1099 run/0: instruction channel-capacity/2 +run/0: {name: "q", value: 2, type: 2-5-1, properties: ["q": "address":"array":"location"]} <- get {name: "chan", value: 1, type: 2-10, properties: ["chan": "address":"channel", "deref": ]}, {name: "data", value: 2, type: 0, properties: ["data": "offset"]} run/0: ingredient 0 is chan mem/0: location 1099 is 1030 run/0: ingredient 1 is data @@ -122,13 +147,16 @@ mem/0: location 1032 is 1033 run/0: product 0 is 1033 mem/0: storing 1033 in location 1100 run/0: instruction channel-capacity/3 +run/0: {name: "result", value: 3, type: 1, properties: ["result": "integer"]} <- length {name: "q", value: 2, type: 2-5-1, properties: ["q": "address":"array":"location", "deref": ]} mem/0: location 1100 is 1033 mem/0: storing 4 in location 1101 run/0: instruction channel-capacity/4 +run/0: reply {name: "result", value: 3, type: 1, properties: ["result": "integer"]} mem/0: location 1101 is 4 run/0: result 0 is 4 mem/0: storing 4 in location 1071 run/0: instruction channel-full?/6 +run/0: {name: "at-end?", value: 4, type: 3, properties: ["at-end?": "boolean"]} <- greater-or-equal {name: "tmp", value: 2, type: 1, properties: ["tmp": "integer"]}, {name: "len", value: 3, type: 1, properties: ["len": "integer"]} run/0: ingredient 0 is tmp mem/0: location 1070 is 1 run/0: ingredient 1 is len @@ -136,11 +164,13 @@ mem/0: location 1071 is 4 run/0: product 0 is 0 mem/0: storing 0 in location 1072 run/0: instruction channel-full?/7 +run/0: break-unless {name: "at-end?", value: 4, type: 3, properties: ["at-end?": "boolean"]}, {name: "", value: 1, type: , properties: ["": ]} mem/0: location 1072 is 0 run/0: ingredient 0 is 0 run/0: ingredient 1 is run/0: jumping to instruction 9 run/0: instruction channel-full?/10 +run/0: {name: "full", value: 5, type: 1, properties: ["full": "integer"]} <- get {name: "chan", value: 1, type: 2-10, properties: ["chan": "address":"channel", "deref": ]}, {name: "first-full", value: 0, type: 0, properties: ["first-full": "offset"]} run/0: ingredient 0 is chan mem/0: location 1069 is 1030 run/0: ingredient 1 is first-full @@ -150,6 +180,7 @@ mem/0: location 1030 is 0 run/0: product 0 is 0 mem/0: storing 0 in location 1073 run/0: instruction channel-full?/11 +run/0: {name: "result", value: 6, type: 3, properties: ["result": "boolean"]} <- equal {name: "full", value: 5, type: 1, properties: ["full": "integer"]}, {name: "tmp", value: 2, type: 1, properties: ["tmp": "integer"]} run/0: ingredient 0 is full mem/0: location 1073 is 0 run/0: ingredient 1 is tmp @@ -157,15 +188,18 @@ mem/0: location 1070 is 1 run/0: product 0 is 0 mem/0: storing 0 in location 1074 run/0: instruction channel-full?/12 +run/0: reply {name: "result", value: 6, type: 3, properties: ["result": "boolean"]} mem/0: location 1074 is 0 run/0: result 0 is 0 mem/0: storing 0 in location 1041 run/0: instruction write/5 +run/0: break-unless {name: "full", value: 3, type: 3, properties: ["full": "boolean"]}, {name: "", value: 2, type: , properties: ["": ]} mem/0: location 1041 is 0 run/0: ingredient 0 is 0 run/0: ingredient 1 is run/0: jumping to instruction 8 run/0: instruction write/9 +run/0: {name: "circular-buffer", value: 5, type: 2-5-1, properties: ["circular-buffer": "address":"array":"location"]} <- get {name: "chan", value: 1, type: 2-10, properties: ["chan": "address":"channel", "deref": ]}, {name: "data", value: 2, type: 0, properties: ["data": "offset"]} run/0: ingredient 0 is chan mem/0: location 1039 is 1030 run/0: ingredient 1 is data @@ -175,6 +209,7 @@ mem/0: location 1032 is 1033 run/0: product 0 is 1033 mem/0: storing 1033 in location 1043 run/0: instruction write/10 +run/0: {name: "free", value: 6, type: 2-1, properties: ["free": "address":"integer"]} <- get-address {name: "chan", value: 1, type: 2-10, properties: ["chan": "address":"channel", "deref": ]}, {name: "first-free", value: 1, type: 0, properties: ["first-free": "offset"]} run/0: ingredient 0 is chan mem/0: location 1039 is 1030 run/0: ingredient 1 is first-free @@ -182,6 +217,7 @@ run/0: address to copy is 1031 run/0: product 0 is 1031 mem/0: storing 1031 in location 1044 run/0: instruction write/11 +run/0: {name: "dest", value: 7, type: 2-1, properties: ["dest": "address":"location"]} <- index-address {name: "circular-buffer", value: 5, type: 2-5-1, properties: ["circular-buffer": "address":"array":"location", "deref": ]}, {name: "free", value: 6, type: 2-1, properties: ["free": "address":"integer", "deref": ]} run/0: ingredient 0 is circular-buffer mem/0: location 1043 is 1033 run/0: ingredient 1 is {name: "free", value: 6, type: 2-1, properties: ["free": "address":"integer", "deref": ]} @@ -191,11 +227,13 @@ run/0: address to copy is 1034 run/0: product 0 is 1034 mem/0: storing 1034 in location 1045 run/0: instruction write/12 +run/0: {name: "dest", value: 7, type: 2-1, properties: ["dest": "address":"location", "deref": ]} <- copy {name: "val", value: 2, type: 1, properties: ["val": "location"]} run/0: ingredient 0 is val mem/0: location 1040 is 34 mem/0: location 1045 is 1034 mem/0: storing 34 in location 1034 run/0: instruction write/13 +run/0: {name: "free", value: 6, type: 2-1, properties: ["free": "address":"integer", "deref": ]} <- add {name: "free", value: 6, type: 2-1, properties: ["free": "address":"integer", "deref": ]}, {name: "1", value: 1, type: 0, properties: ["1": "literal"]} run/0: ingredient 0 is free mem/0: location 1044 is 1031 mem/0: location 1031 is 0 @@ -204,9 +242,11 @@ run/0: product 0 is 1 mem/0: location 1044 is 1031 mem/0: storing 1 in location 1031 run/0: instruction write/15 +run/0: {name: "len", value: 8, type: 1, properties: ["len": "integer"]} <- length {name: "circular-buffer", value: 5, type: 2-5-1, properties: ["circular-buffer": "address":"array":"location", "deref": ]} mem/0: location 1043 is 1033 mem/0: storing 4 in location 1046 run/0: instruction write/16 +run/0: {name: "at-end?", value: 9, type: 3, properties: ["at-end?": "boolean"]} <- greater-or-equal {name: "free", value: 6, type: 2-1, properties: ["free": "address":"integer", "deref": ]}, {name: "len", value: 8, type: 1, properties: ["len": "integer"]} run/0: ingredient 0 is free mem/0: location 1044 is 1031 mem/0: location 1031 is 1 @@ -215,31 +255,40 @@ mem/0: location 1046 is 4 run/0: product 0 is 0 mem/0: storing 0 in location 1047 run/0: instruction write/17 +run/0: break-unless {name: "at-end?", value: 9, type: 3, properties: ["at-end?": "boolean"]}, {name: "", value: 1, type: , properties: ["": ]} mem/0: location 1047 is 0 run/0: ingredient 0 is 0 run/0: ingredient 1 is run/0: jumping to instruction 19 run/0: instruction write/20 +run/0: reply {name: "chan", value: 1, type: 2-10, properties: ["chan": "address":"channel", "same-as-ingredient": "0"]} mem/0: location 1039 is 1030 run/0: result 0 is 1030 mem/0: storing 1030 in location 1 run/0: instruction test-channel/2 +run/0: {name: "2", value: 2, type: 1, properties: ["2": "integer"]}, {name: "1", value: 1, type: 2-10, properties: ["1": "address":"channel"]} <- read {name: "1", value: 1, type: 2-10, properties: ["1": "address":"channel"]} mem/0: location 1 is 1030 run/0: instruction read/0 +run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new {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: 1127 run/0: instruction read/1 +run/0: {name: "chan", value: 1, type: 2-10, properties: ["chan": "address":"channel"]} <- next-ingredient run/0: product 0 is 1030 mem/0: storing 1030 in location 1129 run/0: instruction read/3 +run/0: {name: "empty", value: 2, type: 3, properties: ["empty": "boolean"]} <- channel-empty? {name: "chan", value: 1, type: 2-10, properties: ["chan": "address":"channel"]} mem/0: location 1129 is 1030 run/0: instruction channel-empty?/0 +run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new {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 channel-empty?/1 +run/0: {name: "chan", value: 1, type: 2-10, properties: ["chan": "address":"channel"]} <- next-ingredient run/0: product 0 is 1030 mem/0: storing 1030 in location 1159 run/0: instruction channel-empty?/2 +run/0: {name: "full", value: 2, type: 1, properties: ["full": "integer"]} <- get {name: "chan", value: 1, type: 2-10, properties: ["chan": "address":"channel", "deref": ]}, {name: "first-full", value: 0, type: 0, properties: ["first-full": "offset"]} run/0: ingredient 0 is chan mem/0: location 1159 is 1030 run/0: ingredient 1 is first-full @@ -249,6 +298,7 @@ mem/0: location 1030 is 0 run/0: product 0 is 0 mem/0: storing 0 in location 1160 run/0: instruction channel-empty?/3 +run/0: {name: "free", value: 3, type: 1, properties: ["free": "integer"]} <- get {name: "chan", value: 1, type: 2-10, properties: ["chan": "address":"channel", "deref": ]}, {name: "first-free", value: 1, type: 0, properties: ["first-free": "offset"]} run/0: ingredient 0 is chan mem/0: location 1159 is 1030 run/0: ingredient 1 is first-free @@ -258,6 +308,7 @@ mem/0: location 1031 is 1 run/0: product 0 is 1 mem/0: storing 1 in location 1161 run/0: instruction channel-empty?/4 +run/0: {name: "result", value: 4, type: 3, properties: ["result": "boolean"]} <- equal {name: "full", value: 2, type: 1, properties: ["full": "integer"]}, {name: "free", value: 3, type: 1, properties: ["free": "integer"]} run/0: ingredient 0 is full mem/0: location 1160 is 0 run/0: ingredient 1 is free @@ -265,15 +316,18 @@ mem/0: location 1161 is 1 run/0: product 0 is 0 mem/0: storing 0 in location 1162 run/0: instruction channel-empty?/5 +run/0: reply {name: "result", value: 4, type: 3, properties: ["result": "boolean"]} mem/0: location 1162 is 0 run/0: result 0 is 0 mem/0: storing 0 in location 1130 run/0: instruction read/4 +run/0: break-unless {name: "empty", value: 2, type: 3, properties: ["empty": "boolean"]}, {name: "", value: 2, type: , properties: ["": ]} mem/0: location 1130 is 0 run/0: ingredient 0 is 0 run/0: ingredient 1 is run/0: jumping to instruction 7 run/0: instruction read/8 +run/0: {name: "full", value: 4, type: 2-1, properties: ["full": "address":"integer"]} <- get-address {name: "chan", value: 1, type: 2-10, properties: ["chan": "address":"channel", "deref": ]}, {name: "first-full", value: 0, type: 0, properties: ["first-full": "offset"]} run/0: ingredient 0 is chan mem/0: location 1129 is 1030 run/0: ingredient 1 is first-full @@ -281,6 +335,7 @@ run/0: address to copy is 1030 run/0: product 0 is 1030 mem/0: storing 1030 in location 1132 run/0: instruction read/9 +run/0: {name: "circular-buffer", value: 5, type: 2-5-1, properties: ["circular-buffer": "address":"array":"location"]} <- get {name: "chan", value: 1, type: 2-10, properties: ["chan": "address":"channel", "deref": ]}, {name: "data", value: 2, type: 0, properties: ["data": "offset"]} run/0: ingredient 0 is chan mem/0: location 1129 is 1030 run/0: ingredient 1 is data @@ -290,6 +345,7 @@ mem/0: location 1032 is 1033 run/0: product 0 is 1033 mem/0: storing 1033 in location 1133 run/0: instruction read/10 +run/0: {name: "result", value: 6, type: 1, properties: ["result": "location"]} <- index {name: "circular-buffer", value: 5, type: 2-5-1, properties: ["circular-buffer": "address":"array":"location", "deref": ]}, {name: "full", value: 4, type: 2-1, properties: ["full": "address":"integer", "deref": ]} run/0: ingredient 0 is {name: "circular-buffer", value: 5, type: 2-5-1, properties: ["circular-buffer": "address":"array":"location", "deref": ]} mem/0: location 1133 is 1033 run/0: ingredient 1 is {name: "full", value: 4, type: 2-1, properties: ["full": "address":"integer", "deref": ]} @@ -301,6 +357,7 @@ mem/0: location 1034 is 34 run/0: product 0 is 34 mem/0: storing 34 in location 1134 run/0: instruction read/11 +run/0: {name: "full", value: 4, type: 2-1, properties: ["full": "address":"integer", "deref": ]} <- add {name: "full", value: 4, type: 2-1, properties: ["full": "address":"integer", "deref": ]}, {name: "1", value: 1, type: 0, properties: ["1": "literal"]} run/0: ingredient 0 is full mem/0: location 1132 is 1030 mem/0: location 1030 is 0 @@ -309,9 +366,11 @@ run/0: product 0 is 1 mem/0: location 1132 is 1030 mem/0: storing 1 in location 1030 run/0: instruction read/13 +run/0: {name: "len", value: 7, type: 1, properties: ["len": "integer"]} <- length {name: "circular-buffer", value: 5, type: 2-5-1, properties: ["circular-buffer": "address":"array":"location", "deref": ]} mem/0: location 1133 is 1033 mem/0: storing 4 in location 1135 run/0: instruction read/14 +run/0: {name: "at-end?", value: 8, type: 3, properties: ["at-end?": "boolean"]} <- greater-or-equal {name: "full", value: 4, type: 2-1, properties: ["full": "address":"integer", "deref": ]}, {name: "len", value: 7, type: 1, properties: ["len": "integer"]} run/0: ingredient 0 is full mem/0: location 1132 is 1030 mem/0: location 1030 is 1 @@ -320,11 +379,13 @@ mem/0: location 1135 is 4 run/0: product 0 is 0 mem/0: storing 0 in location 1136 run/0: instruction read/15 +run/0: break-unless {name: "at-end?", value: 8, type: 3, properties: ["at-end?": "boolean"]}, {name: "", value: 1, type: , properties: ["": ]} mem/0: location 1136 is 0 run/0: ingredient 0 is 0 run/0: ingredient 1 is run/0: jumping to instruction 17 run/0: instruction read/18 +run/0: reply {name: "result", value: 6, type: 1, properties: ["result": "location"]}, {name: "chan", value: 1, type: 2-10, properties: ["chan": "address":"channel", "same-as-ingredient": "0"]} mem/0: location 1134 is 34 mem/0: location 1129 is 1030 run/0: result 0 is 34 diff --git a/cpp/.traces/channel-initialization b/cpp/.traces/channel-initialization index 6ae08803..1fca38e2 100644 --- a/cpp/.traces/channel-initialization +++ b/cpp/.traces/channel-initialization @@ -18,13 +18,17 @@ after-brace/0: get ... new/0: routine allocated memory from 1000 to 101000 schedule/0: test-channel-initialization run/0: instruction test-channel-initialization/0 +run/0: {name: "1", value: 1, type: 2-10, properties: ["1": "address":"channel"]} <- init-channel {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 {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 {name: "channel", value: 10, type: 0, properties: ["channel": "type"]} mem/0: new alloc: 1030 mem/0: storing 1030 in location 1002 run/0: instruction init-channel/2 +run/0: {name: "full", value: 2, type: 2-1, properties: ["full": "address":"integer"]} <- get-address {name: "result", value: 1, type: 2-10, properties: ["result": "address":"channel", "deref": ]}, {name: "first-full", value: 0, type: 0, properties: ["first-full": "offset"]} run/0: ingredient 0 is result mem/0: location 1002 is 1030 run/0: ingredient 1 is first-full @@ -32,10 +36,12 @@ run/0: address to copy is 1030 run/0: product 0 is 1030 mem/0: storing 1030 in location 1003 run/0: instruction init-channel/3 +run/0: {name: "full", value: 2, type: 2-1, properties: ["full": "address":"integer", "deref": ]} <- copy {name: "0", value: 0, type: 0, properties: ["0": "literal"]} run/0: ingredient 0 is 0 mem/0: location 1003 is 1030 mem/0: storing 0 in location 1030 run/0: instruction init-channel/4 +run/0: {name: "free", value: 3, type: 2-1, properties: ["free": "address":"integer"]} <- get-address {name: "result", value: 1, type: 2-10, properties: ["result": "address":"channel", "deref": ]}, {name: "first-free", value: 1, type: 0, properties: ["first-free": "offset"]} run/0: ingredient 0 is result mem/0: location 1002 is 1030 run/0: ingredient 1 is first-free @@ -43,19 +49,23 @@ run/0: address to copy is 1031 run/0: product 0 is 1031 mem/0: storing 1031 in location 1004 run/0: instruction init-channel/5 +run/0: {name: "free", value: 3, type: 2-1, properties: ["free": "address":"integer", "deref": ]} <- copy {name: "0", value: 0, type: 0, properties: ["0": "literal"]} run/0: ingredient 0 is 0 mem/0: location 1004 is 1031 mem/0: storing 0 in location 1031 run/0: instruction init-channel/6 +run/0: {name: "capacity", value: 4, type: 1, properties: ["capacity": "integer"]} <- next-ingredient run/0: product 0 is 3 mem/0: storing 3 in location 1005 run/0: instruction init-channel/7 +run/0: {name: "capacity", value: 4, type: 1, properties: ["capacity": "integer"]} <- add {name: "capacity", value: 4, type: 1, properties: ["capacity": "integer"]}, {name: "1", value: 1, type: 0, properties: ["1": "literal"]} run/0: ingredient 0 is capacity mem/0: location 1005 is 3 run/0: ingredient 1 is 1 run/0: product 0 is 4 mem/0: storing 4 in location 1005 run/0: instruction init-channel/8 +run/0: {name: "dest", value: 5, type: 2-2-5-1, properties: ["dest": "address":"address":"array":"location"]} <- get-address {name: "result", value: 1, type: 2-10, properties: ["result": "address":"channel", "deref": ]}, {name: "data", value: 2, type: 0, properties: ["data": "offset"]} run/0: ingredient 0 is result mem/0: location 1002 is 1030 run/0: ingredient 1 is data @@ -63,16 +73,19 @@ run/0: address to copy is 1032 run/0: product 0 is 1032 mem/0: storing 1032 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 {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: 1033 mem/0: location 1006 is 1032 mem/0: storing 1033 in location 1032 run/0: instruction init-channel/10 +run/0: reply {name: "result", value: 1, type: 2-10, properties: ["result": "address":"channel"]} mem/0: location 1002 is 1030 run/0: result 0 is 1030 mem/0: storing 1030 in location 1 run/0: instruction test-channel-initialization/1 +run/0: {name: "2", value: 2, type: 1, properties: ["2": "integer"]} <- get {name: "1", value: 1, type: 2-10, properties: ["1": "address":"channel", "deref": ]}, {name: "first-full", value: 0, type: 0, properties: ["first-full": "offset"]} run/0: ingredient 0 is 1 mem/0: location 1 is 1030 run/0: ingredient 1 is first-full @@ -82,6 +95,7 @@ mem/0: location 1030 is 0 run/0: product 0 is 0 mem/0: storing 0 in location 2 run/0: instruction test-channel-initialization/2 +run/0: {name: "3", value: 3, type: 1, properties: ["3": "integer"]} <- get {name: "1", value: 1, type: 2-10, properties: ["1": "address":"channel", "deref": ]}, {name: "first-free", value: 1, type: 0, properties: ["first-free": "offset"]} run/0: ingredient 0 is 1 mem/0: location 1 is 1030 run/0: ingredient 1 is first-free diff --git a/cpp/.traces/channel-new-empty-not-full b/cpp/.traces/channel-new-empty-not-full index d28c1a7a..46b69534 100644 --- a/cpp/.traces/channel-new-empty-not-full +++ b/cpp/.traces/channel-new-empty-not-full @@ -14,13 +14,17 @@ after-brace/0: channel-full? ... new/0: routine allocated memory from 1000 to 101000 schedule/0: test-channel-new-empty-not-full run/0: instruction test-channel-new-empty-not-full/0 +run/0: {name: "1", value: 1, type: 2-10, properties: ["1": "address":"channel"]} <- init-channel {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 {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 {name: "channel", value: 10, type: 0, properties: ["channel": "type"]} mem/0: new alloc: 1030 mem/0: storing 1030 in location 1002 run/0: instruction init-channel/2 +run/0: {name: "full", value: 2, type: 2-1, properties: ["full": "address":"integer"]} <- get-address {name: "result", value: 1, type: 2-10, properties: ["result": "address":"channel", "deref": ]}, {name: "first-full", value: 0, type: 0, properties: ["first-full": "offset"]} run/0: ingredient 0 is result mem/0: location 1002 is 1030 run/0: ingredient 1 is first-full @@ -28,10 +32,12 @@ run/0: address to copy is 1030 run/0: product 0 is 1030 mem/0: storing 1030 in location 1003 run/0: instruction init-channel/3 +run/0: {name: "full", value: 2, type: 2-1, properties: ["full": "address":"integer", "deref": ]} <- copy {name: "0", value: 0, type: 0, properties: ["0": "literal"]} run/0: ingredient 0 is 0 mem/0: location 1003 is 1030 mem/0: storing 0 in location 1030 run/0: instruction init-channel/4 +run/0: {name: "free", value: 3, type: 2-1, properties: ["free": "address":"integer"]} <- get-address {name: "result", value: 1, type: 2-10, properties: ["result": "address":"channel", "deref": ]}, {name: "first-free", value: 1, type: 0, properties: ["first-free": "offset"]} run/0: ingredient 0 is result mem/0: location 1002 is 1030 run/0: ingredient 1 is first-free @@ -39,19 +45,23 @@ run/0: address to copy is 1031 run/0: product 0 is 1031 mem/0: storing 1031 in location 1004 run/0: instruction init-channel/5 +run/0: {name: "free", value: 3, type: 2-1, properties: ["free": "address":"integer", "deref": ]} <- copy {name: "0", value: 0, type: 0, properties: ["0": "literal"]} run/0: ingredient 0 is 0 mem/0: location 1004 is 1031 mem/0: storing 0 in location 1031 run/0: instruction init-channel/6 +run/0: {name: "capacity", value: 4, type: 1, properties: ["capacity": "integer"]} <- next-ingredient run/0: product 0 is 3 mem/0: storing 3 in location 1005 run/0: instruction init-channel/7 +run/0: {name: "capacity", value: 4, type: 1, properties: ["capacity": "integer"]} <- add {name: "capacity", value: 4, type: 1, properties: ["capacity": "integer"]}, {name: "1", value: 1, type: 0, properties: ["1": "literal"]} run/0: ingredient 0 is capacity mem/0: location 1005 is 3 run/0: ingredient 1 is 1 run/0: product 0 is 4 mem/0: storing 4 in location 1005 run/0: instruction init-channel/8 +run/0: {name: "dest", value: 5, type: 2-2-5-1, properties: ["dest": "address":"address":"array":"location"]} <- get-address {name: "result", value: 1, type: 2-10, properties: ["result": "address":"channel", "deref": ]}, {name: "data", value: 2, type: 0, properties: ["data": "offset"]} run/0: ingredient 0 is result mem/0: location 1002 is 1030 run/0: ingredient 1 is data @@ -59,24 +69,30 @@ run/0: address to copy is 1032 run/0: product 0 is 1032 mem/0: storing 1032 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 {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: 1033 mem/0: location 1006 is 1032 mem/0: storing 1033 in location 1032 run/0: instruction init-channel/10 +run/0: reply {name: "result", value: 1, type: 2-10, properties: ["result": "address":"channel"]} mem/0: location 1002 is 1030 run/0: result 0 is 1030 mem/0: storing 1030 in location 1 run/0: instruction test-channel-new-empty-not-full/1 +run/0: {name: "2", value: 2, type: 1, properties: ["2": "integer"]} <- channel-empty? {name: "1", value: 1, type: 2-10, properties: ["1": "address":"channel"]} mem/0: location 1 is 1030 run/0: instruction channel-empty?/0 +run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new {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 channel-empty?/1 +run/0: {name: "chan", value: 1, type: 2-10, properties: ["chan": "address":"channel"]} <- next-ingredient run/0: product 0 is 1030 mem/0: storing 1030 in location 1039 run/0: instruction channel-empty?/2 +run/0: {name: "full", value: 2, type: 1, properties: ["full": "integer"]} <- get {name: "chan", value: 1, type: 2-10, properties: ["chan": "address":"channel", "deref": ]}, {name: "first-full", value: 0, type: 0, properties: ["first-full": "offset"]} run/0: ingredient 0 is chan mem/0: location 1039 is 1030 run/0: ingredient 1 is first-full @@ -86,6 +102,7 @@ mem/0: location 1030 is 0 run/0: product 0 is 0 mem/0: storing 0 in location 1040 run/0: instruction channel-empty?/3 +run/0: {name: "free", value: 3, type: 1, properties: ["free": "integer"]} <- get {name: "chan", value: 1, type: 2-10, properties: ["chan": "address":"channel", "deref": ]}, {name: "first-free", value: 1, type: 0, properties: ["first-free": "offset"]} run/0: ingredient 0 is chan mem/0: location 1039 is 1030 run/0: ingredient 1 is first-free @@ -95,6 +112,7 @@ mem/0: location 1031 is 0 run/0: product 0 is 0 mem/0: storing 0 in location 1041 run/0: instruction channel-empty?/4 +run/0: {name: "result", value: 4, type: 3, properties: ["result": "boolean"]} <- equal {name: "full", value: 2, type: 1, properties: ["full": "integer"]}, {name: "free", value: 3, type: 1, properties: ["free": "integer"]} run/0: ingredient 0 is full mem/0: location 1040 is 0 run/0: ingredient 1 is free @@ -102,18 +120,23 @@ mem/0: location 1041 is 0 run/0: product 0 is 1 mem/0: storing 1 in location 1042 run/0: instruction channel-empty?/5 +run/0: reply {name: "result", value: 4, type: 3, properties: ["result": "boolean"]} mem/0: location 1042 is 1 run/0: result 0 is 1 mem/0: storing 1 in location 2 run/0: instruction test-channel-new-empty-not-full/2 +run/0: {name: "3", value: 3, type: 1, properties: ["3": "integer"]} <- channel-full? {name: "1", value: 1, type: 2-10, properties: ["1": "address":"channel"]} mem/0: location 1 is 1030 run/0: instruction channel-full?/0 +run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new {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: 1067 run/0: instruction channel-full?/1 +run/0: {name: "chan", value: 1, type: 2-10, properties: ["chan": "address":"channel"]} <- next-ingredient run/0: product 0 is 1030 mem/0: storing 1030 in location 1069 run/0: instruction channel-full?/2 +run/0: {name: "tmp", value: 2, type: 1, properties: ["tmp": "integer"]} <- get {name: "chan", value: 1, type: 2-10, properties: ["chan": "address":"channel", "deref": ]}, {name: "first-free", value: 1, type: 0, properties: ["first-free": "offset"]} run/0: ingredient 0 is chan mem/0: location 1069 is 1030 run/0: ingredient 1 is first-free @@ -123,20 +146,25 @@ mem/0: location 1031 is 0 run/0: product 0 is 0 mem/0: storing 0 in location 1070 run/0: instruction channel-full?/3 +run/0: {name: "tmp", value: 2, type: 1, properties: ["tmp": "integer"]} <- add {name: "tmp", value: 2, type: 1, properties: ["tmp": "integer"]}, {name: "1", value: 1, type: 0, properties: ["1": "literal"]} run/0: ingredient 0 is tmp mem/0: location 1070 is 0 run/0: ingredient 1 is 1 run/0: product 0 is 1 mem/0: storing 1 in location 1070 run/0: instruction channel-full?/5 +run/0: {name: "len", value: 3, type: 1, properties: ["len": "integer"]} <- channel-capacity {name: "chan", value: 1, type: 2-10, properties: ["chan": "address":"channel"]} mem/0: location 1069 is 1030 run/0: instruction channel-capacity/0 +run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new {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: 1097 run/0: instruction channel-capacity/1 +run/0: {name: "chan", value: 1, type: 2-10, properties: ["chan": "address":"channel"]} <- next-ingredient run/0: product 0 is 1030 mem/0: storing 1030 in location 1099 run/0: instruction channel-capacity/2 +run/0: {name: "q", value: 2, type: 2-5-1, properties: ["q": "address":"array":"location"]} <- get {name: "chan", value: 1, type: 2-10, properties: ["chan": "address":"channel", "deref": ]}, {name: "data", value: 2, type: 0, properties: ["data": "offset"]} run/0: ingredient 0 is chan mem/0: location 1099 is 1030 run/0: ingredient 1 is data @@ -146,13 +174,16 @@ mem/0: location 1032 is 1033 run/0: product 0 is 1033 mem/0: storing 1033 in location 1100 run/0: instruction channel-capacity/3 +run/0: {name: "result", value: 3, type: 1, properties: ["result": "integer"]} <- length {name: "q", value: 2, type: 2-5-1, properties: ["q": "address":"array":"location", "deref": ]} mem/0: location 1100 is 1033 mem/0: storing 4 in location 1101 run/0: instruction channel-capacity/4 +run/0: reply {name: "result", value: 3, type: 1, properties: ["result": "integer"]} mem/0: location 1101 is 4 run/0: result 0 is 4 mem/0: storing 4 in location 1071 run/0: instruction channel-full?/6 +run/0: {name: "at-end?", value: 4, type: 3, properties: ["at-end?": "boolean"]} <- greater-or-equal {name: "tmp", value: 2, type: 1, properties: ["tmp": "integer"]}, {name: "len", value: 3, type: 1, properties: ["len": "integer"]} run/0: ingredient 0 is tmp mem/0: location 1070 is 1 run/0: ingredient 1 is len @@ -160,11 +191,13 @@ mem/0: location 1071 is 4 run/0: product 0 is 0 mem/0: storing 0 in location 1072 run/0: instruction channel-full?/7 +run/0: break-unless {name: "at-end?", value: 4, type: 3, properties: ["at-end?": "boolean"]}, {name: "", value: 1, type: , properties: ["": ]} mem/0: location 1072 is 0 run/0: ingredient 0 is 0 run/0: ingredient 1 is run/0: jumping to instruction 9 run/0: instruction channel-full?/10 +run/0: {name: "full", value: 5, type: 1, properties: ["full": "integer"]} <- get {name: "chan", value: 1, type: 2-10, properties: ["chan": "address":"channel", "deref": ]}, {name: "first-full", value: 0, type: 0, properties: ["first-full": "offset"]} run/0: ingredient 0 is chan mem/0: location 1069 is 1030 run/0: ingredient 1 is first-full @@ -174,6 +207,7 @@ mem/0: location 1030 is 0 run/0: product 0 is 0 mem/0: storing 0 in location 1073 run/0: instruction channel-full?/11 +run/0: {name: "result", value: 6, type: 3, properties: ["result": "boolean"]} <- equal {name: "full", value: 5, type: 1, properties: ["full": "integer"]}, {name: "tmp", value: 2, type: 1, properties: ["tmp": "integer"]} run/0: ingredient 0 is full mem/0: location 1073 is 0 run/0: ingredient 1 is tmp @@ -181,6 +215,7 @@ mem/0: location 1070 is 1 run/0: product 0 is 0 mem/0: storing 0 in location 1074 run/0: instruction channel-full?/12 +run/0: reply {name: "result", value: 6, type: 3, properties: ["result": "boolean"]} mem/0: location 1074 is 0 run/0: result 0 is 0 mem/0: storing 0 in location 3 diff --git a/cpp/.traces/channel-read-increments-full b/cpp/.traces/channel-read-increments-full index 6346dc7f..a3e68559 100644 --- a/cpp/.traces/channel-read-increments-full +++ b/cpp/.traces/channel-read-increments-full @@ -28,13 +28,17 @@ after-brace/0: get ... new/0: routine allocated memory from 1000 to 101000 schedule/0: test-channel-read-increments-full run/0: instruction test-channel-read-increments-full/0 +run/0: {name: "1", value: 1, type: 2-10, properties: ["1": "address":"channel"]} <- init-channel {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 {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 {name: "channel", value: 10, type: 0, properties: ["channel": "type"]} mem/0: new alloc: 1030 mem/0: storing 1030 in location 1002 run/0: instruction init-channel/2 +run/0: {name: "full", value: 2, type: 2-1, properties: ["full": "address":"integer"]} <- get-address {name: "result", value: 1, type: 2-10, properties: ["result": "address":"channel", "deref": ]}, {name: "first-full", value: 0, type: 0, properties: ["first-full": "offset"]} run/0: ingredient 0 is result mem/0: location 1002 is 1030 run/0: ingredient 1 is first-full @@ -42,10 +46,12 @@ run/0: address to copy is 1030 run/0: product 0 is 1030 mem/0: storing 1030 in location 1003 run/0: instruction init-channel/3 +run/0: {name: "full", value: 2, type: 2-1, properties: ["full": "address":"integer", "deref": ]} <- copy {name: "0", value: 0, type: 0, properties: ["0": "literal"]} run/0: ingredient 0 is 0 mem/0: location 1003 is 1030 mem/0: storing 0 in location 1030 run/0: instruction init-channel/4 +run/0: {name: "free", value: 3, type: 2-1, properties: ["free": "address":"integer"]} <- get-address {name: "result", value: 1, type: 2-10, properties: ["result": "address":"channel", "deref": ]}, {name: "first-free", value: 1, type: 0, properties: ["first-free": "offset"]} run/0: ingredient 0 is result mem/0: location 1002 is 1030 run/0: ingredient 1 is first-free @@ -53,19 +59,23 @@ run/0: address to copy is 1031 run/0: product 0 is 1031 mem/0: storing 1031 in location 1004 run/0: instruction init-channel/5 +run/0: {name: "free", value: 3, type: 2-1, properties: ["free": "address":"integer", "deref": ]} <- copy {name: "0", value: 0, type: 0, properties: ["0": "literal"]} run/0: ingredient 0 is 0 mem/0: location 1004 is 1031 mem/0: storing 0 in location 1031 run/0: instruction init-channel/6 +run/0: {name: "capacity", value: 4, type: 1, properties: ["capacity": "integer"]} <- next-ingredient run/0: product 0 is 3 mem/0: storing 3 in location 1005 run/0: instruction init-channel/7 +run/0: {name: "capacity", value: 4, type: 1, properties: ["capacity": "integer"]} <- add {name: "capacity", value: 4, type: 1, properties: ["capacity": "integer"]}, {name: "1", value: 1, type: 0, properties: ["1": "literal"]} run/0: ingredient 0 is capacity mem/0: location 1005 is 3 run/0: ingredient 1 is 1 run/0: product 0 is 4 mem/0: storing 4 in location 1005 run/0: instruction init-channel/8 +run/0: {name: "dest", value: 5, type: 2-2-5-1, properties: ["dest": "address":"address":"array":"location"]} <- get-address {name: "result", value: 1, type: 2-10, properties: ["result": "address":"channel", "deref": ]}, {name: "data", value: 2, type: 0, properties: ["data": "offset"]} run/0: ingredient 0 is result mem/0: location 1002 is 1030 run/0: ingredient 1 is data @@ -73,35 +83,45 @@ run/0: address to copy is 1032 run/0: product 0 is 1032 mem/0: storing 1032 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 {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: 1033 mem/0: location 1006 is 1032 mem/0: storing 1033 in location 1032 run/0: instruction init-channel/10 +run/0: reply {name: "result", value: 1, type: 2-10, properties: ["result": "address":"channel"]} mem/0: location 1002 is 1030 run/0: result 0 is 1030 mem/0: storing 1030 in location 1 run/0: instruction test-channel-read-increments-full/1 +run/0: {name: "1", value: 1, type: 2-10, properties: ["1": "address":"channel"]} <- write {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 1030 run/0: instruction write/0 +run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new {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 +run/0: {name: "chan", value: 1, type: 2-10, properties: ["chan": "address":"channel"]} <- next-ingredient run/0: product 0 is 1030 mem/0: storing 1030 in location 1039 run/0: instruction write/2 +run/0: {name: "val", value: 2, type: 1, properties: ["val": "location"]} <- next-ingredient run/0: product 0 is 34 mem/0: storing 34 in location 1040 run/0: instruction write/4 +run/0: {name: "full", value: 3, type: 3, properties: ["full": "boolean"]} <- channel-full? {name: "chan", value: 1, type: 2-10, properties: ["chan": "address":"channel"]} mem/0: location 1039 is 1030 run/0: instruction channel-full?/0 +run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new {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: 1067 run/0: instruction channel-full?/1 +run/0: {name: "chan", value: 1, type: 2-10, properties: ["chan": "address":"channel"]} <- next-ingredient run/0: product 0 is 1030 mem/0: storing 1030 in location 1069 run/0: instruction channel-full?/2 +run/0: {name: "tmp", value: 2, type: 1, properties: ["tmp": "integer"]} <- get {name: "chan", value: 1, type: 2-10, properties: ["chan": "address":"channel", "deref": ]}, {name: "first-free", value: 1, type: 0, properties: ["first-free": "offset"]} run/0: ingredient 0 is chan mem/0: location 1069 is 1030 run/0: ingredient 1 is first-free @@ -111,20 +131,25 @@ mem/0: location 1031 is 0 run/0: product 0 is 0 mem/0: storing 0 in location 1070 run/0: instruction channel-full?/3 +run/0: {name: "tmp", value: 2, type: 1, properties: ["tmp": "integer"]} <- add {name: "tmp", value: 2, type: 1, properties: ["tmp": "integer"]}, {name: "1", value: 1, type: 0, properties: ["1": "literal"]} run/0: ingredient 0 is tmp mem/0: location 1070 is 0 run/0: ingredient 1 is 1 run/0: product 0 is 1 mem/0: storing 1 in location 1070 run/0: instruction channel-full?/5 +run/0: {name: "len", value: 3, type: 1, properties: ["len": "integer"]} <- channel-capacity {name: "chan", value: 1, type: 2-10, properties: ["chan": "address":"channel"]} mem/0: location 1069 is 1030 run/0: instruction channel-capacity/0 +run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new {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: 1097 run/0: instruction channel-capacity/1 +run/0: {name: "chan", value: 1, type: 2-10, properties: ["chan": "address":"channel"]} <- next-ingredient run/0: product 0 is 1030 mem/0: storing 1030 in location 1099 run/0: instruction channel-capacity/2 +run/0: {name: "q", value: 2, type: 2-5-1, properties: ["q": "address":"array":"location"]} <- get {name: "chan", value: 1, type: 2-10, properties: ["chan": "address":"channel", "deref": ]}, {name: "data", value: 2, type: 0, properties: ["data": "offset"]} run/0: ingredient 0 is chan mem/0: location 1099 is 1030 run/0: ingredient 1 is data @@ -134,13 +159,16 @@ mem/0: location 1032 is 1033 run/0: product 0 is 1033 mem/0: storing 1033 in location 1100 run/0: instruction channel-capacity/3 +run/0: {name: "result", value: 3, type: 1, properties: ["result": "integer"]} <- length {name: "q", value: 2, type: 2-5-1, properties: ["q": "address":"array":"location", "deref": ]} mem/0: location 1100 is 1033 mem/0: storing 4 in location 1101 run/0: instruction channel-capacity/4 +run/0: reply {name: "result", value: 3, type: 1, properties: ["result": "integer"]} mem/0: location 1101 is 4 run/0: result 0 is 4 mem/0: storing 4 in location 1071 run/0: instruction channel-full?/6 +run/0: {name: "at-end?", value: 4, type: 3, properties: ["at-end?": "boolean"]} <- greater-or-equal {name: "tmp", value: 2, type: 1, properties: ["tmp": "integer"]}, {name: "len", value: 3, type: 1, properties: ["len": "integer"]} run/0: ingredient 0 is tmp mem/0: location 1070 is 1 run/0: ingredient 1 is len @@ -148,11 +176,13 @@ mem/0: location 1071 is 4 run/0: product 0 is 0 mem/0: storing 0 in location 1072 run/0: instruction channel-full?/7 +run/0: break-unless {name: "at-end?", value: 4, type: 3, properties: ["at-end?": "boolean"]}, {name: "", value: 1, type: , properties: ["": ]} mem/0: location 1072 is 0 run/0: ingredient 0 is 0 run/0: ingredient 1 is run/0: jumping to instruction 9 run/0: instruction channel-full?/10 +run/0: {name: "full", value: 5, type: 1, properties: ["full": "integer"]} <- get {name: "chan", value: 1, type: 2-10, properties: ["chan": "address":"channel", "deref": ]}, {name: "first-full", value: 0, type: 0, properties: ["first-full": "offset"]} run/0: ingredient 0 is chan mem/0: location 1069 is 1030 run/0: ingredient 1 is first-full @@ -162,6 +192,7 @@ mem/0: location 1030 is 0 run/0: product 0 is 0 mem/0: storing 0 in location 1073 run/0: instruction channel-full?/11 +run/0: {name: "result", value: 6, type: 3, properties: ["result": "boolean"]} <- equal {name: "full", value: 5, type: 1, properties: ["full": "integer"]}, {name: "tmp", value: 2, type: 1, properties: ["tmp": "integer"]} run/0: ingredient 0 is full mem/0: location 1073 is 0 run/0: ingredient 1 is tmp @@ -169,15 +200,18 @@ mem/0: location 1070 is 1 run/0: product 0 is 0 mem/0: storing 0 in location 1074 run/0: instruction channel-full?/12 +run/0: reply {name: "result", value: 6, type: 3, properties: ["result": "boolean"]} mem/0: location 1074 is 0 run/0: result 0 is 0 mem/0: storing 0 in location 1041 run/0: instruction write/5 +run/0: break-unless {name: "full", value: 3, type: 3, properties: ["full": "boolean"]}, {name: "", value: 2, type: , properties: ["": ]} mem/0: location 1041 is 0 run/0: ingredient 0 is 0 run/0: ingredient 1 is run/0: jumping to instruction 8 run/0: instruction write/9 +run/0: {name: "circular-buffer", value: 5, type: 2-5-1, properties: ["circular-buffer": "address":"array":"location"]} <- get {name: "chan", value: 1, type: 2-10, properties: ["chan": "address":"channel", "deref": ]}, {name: "data", value: 2, type: 0, properties: ["data": "offset"]} run/0: ingredient 0 is chan mem/0: location 1039 is 1030 run/0: ingredient 1 is data @@ -187,6 +221,7 @@ mem/0: location 1032 is 1033 run/0: product 0 is 1033 mem/0: storing 1033 in location 1043 run/0: instruction write/10 +run/0: {name: "free", value: 6, type: 2-1, properties: ["free": "address":"integer"]} <- get-address {name: "chan", value: 1, type: 2-10, properties: ["chan": "address":"channel", "deref": ]}, {name: "first-free", value: 1, type: 0, properties: ["first-free": "offset"]} run/0: ingredient 0 is chan mem/0: location 1039 is 1030 run/0: ingredient 1 is first-free @@ -194,6 +229,7 @@ run/0: address to copy is 1031 run/0: product 0 is 1031 mem/0: storing 1031 in location 1044 run/0: instruction write/11 +run/0: {name: "dest", value: 7, type: 2-1, properties: ["dest": "address":"location"]} <- index-address {name: "circular-buffer", value: 5, type: 2-5-1, properties: ["circular-buffer": "address":"array":"location", "deref": ]}, {name: "free", value: 6, type: 2-1, properties: ["free": "address":"integer", "deref": ]} run/0: ingredient 0 is circular-buffer mem/0: location 1043 is 1033 run/0: ingredient 1 is {name: "free", value: 6, type: 2-1, properties: ["free": "address":"integer", "deref": ]} @@ -203,11 +239,13 @@ run/0: address to copy is 1034 run/0: product 0 is 1034 mem/0: storing 1034 in location 1045 run/0: instruction write/12 +run/0: {name: "dest", value: 7, type: 2-1, properties: ["dest": "address":"location", "deref": ]} <- copy {name: "val", value: 2, type: 1, properties: ["val": "location"]} run/0: ingredient 0 is val mem/0: location 1040 is 34 mem/0: location 1045 is 1034 mem/0: storing 34 in location 1034 run/0: instruction write/13 +run/0: {name: "free", value: 6, type: 2-1, properties: ["free": "address":"integer", "deref": ]} <- add {name: "free", value: 6, type: 2-1, properties: ["free": "address":"integer", "deref": ]}, {name: "1", value: 1, type: 0, properties: ["1": "literal"]} run/0: ingredient 0 is free mem/0: location 1044 is 1031 mem/0: location 1031 is 0 @@ -216,9 +254,11 @@ run/0: product 0 is 1 mem/0: location 1044 is 1031 mem/0: storing 1 in location 1031 run/0: instruction write/15 +run/0: {name: "len", value: 8, type: 1, properties: ["len": "integer"]} <- length {name: "circular-buffer", value: 5, type: 2-5-1, properties: ["circular-buffer": "address":"array":"location", "deref": ]} mem/0: location 1043 is 1033 mem/0: storing 4 in location 1046 run/0: instruction write/16 +run/0: {name: "at-end?", value: 9, type: 3, properties: ["at-end?": "boolean"]} <- greater-or-equal {name: "free", value: 6, type: 2-1, properties: ["free": "address":"integer", "deref": ]}, {name: "len", value: 8, type: 1, properties: ["len": "integer"]} run/0: ingredient 0 is free mem/0: location 1044 is 1031 mem/0: location 1031 is 1 @@ -227,31 +267,40 @@ mem/0: location 1046 is 4 run/0: product 0 is 0 mem/0: storing 0 in location 1047 run/0: instruction write/17 +run/0: break-unless {name: "at-end?", value: 9, type: 3, properties: ["at-end?": "boolean"]}, {name: "", value: 1, type: , properties: ["": ]} mem/0: location 1047 is 0 run/0: ingredient 0 is 0 run/0: ingredient 1 is run/0: jumping to instruction 19 run/0: instruction write/20 +run/0: reply {name: "chan", value: 1, type: 2-10, properties: ["chan": "address":"channel", "same-as-ingredient": "0"]} mem/0: location 1039 is 1030 run/0: result 0 is 1030 mem/0: storing 1030 in location 1 run/0: instruction test-channel-read-increments-full/2 +run/0: {name: "_", value: 0, type: 0, properties: ["_": "dummy"]}, {name: "1", value: 1, type: 2-10, properties: ["1": "address":"channel"]} <- read {name: "1", value: 1, type: 2-10, properties: ["1": "address":"channel"]} mem/0: location 1 is 1030 run/0: instruction read/0 +run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new {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: 1127 run/0: instruction read/1 +run/0: {name: "chan", value: 1, type: 2-10, properties: ["chan": "address":"channel"]} <- next-ingredient run/0: product 0 is 1030 mem/0: storing 1030 in location 1129 run/0: instruction read/3 +run/0: {name: "empty", value: 2, type: 3, properties: ["empty": "boolean"]} <- channel-empty? {name: "chan", value: 1, type: 2-10, properties: ["chan": "address":"channel"]} mem/0: location 1129 is 1030 run/0: instruction channel-empty?/0 +run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new {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 channel-empty?/1 +run/0: {name: "chan", value: 1, type: 2-10, properties: ["chan": "address":"channel"]} <- next-ingredient run/0: product 0 is 1030 mem/0: storing 1030 in location 1159 run/0: instruction channel-empty?/2 +run/0: {name: "full", value: 2, type: 1, properties: ["full": "integer"]} <- get {name: "chan", value: 1, type: 2-10, properties: ["chan": "address":"channel", "deref": ]}, {name: "first-full", value: 0, type: 0, properties: ["first-full": "offset"]} run/0: ingredient 0 is chan mem/0: location 1159 is 1030 run/0: ingredient 1 is first-full @@ -261,6 +310,7 @@ mem/0: location 1030 is 0 run/0: product 0 is 0 mem/0: storing 0 in location 1160 run/0: instruction channel-empty?/3 +run/0: {name: "free", value: 3, type: 1, properties: ["free": "integer"]} <- get {name: "chan", value: 1, type: 2-10, properties: ["chan": "address":"channel", "deref": ]}, {name: "first-free", value: 1, type: 0, properties: ["first-free": "offset"]} run/0: ingredient 0 is chan mem/0: location 1159 is 1030 run/0: ingredient 1 is first-free @@ -270,6 +320,7 @@ mem/0: location 1031 is 1 run/0: product 0 is 1 mem/0: storing 1 in location 1161 run/0: instruction channel-empty?/4 +run/0: {name: "result", value: 4, type: 3, properties: ["result": "boolean"]} <- equal {name: "full", value: 2, type: 1, properties: ["full": "integer"]}, {name: "free", value: 3, type: 1, properties: ["free": "integer"]} run/0: ingredient 0 is full mem/0: location 1160 is 0 run/0: ingredient 1 is free @@ -277,15 +328,18 @@ mem/0: location 1161 is 1 run/0: product 0 is 0 mem/0: storing 0 in location 1162 run/0: instruction channel-empty?/5 +run/0: reply {name: "result", value: 4, type: 3, properties: ["result": "boolean"]} mem/0: location 1162 is 0 run/0: result 0 is 0 mem/0: storing 0 in location 1130 run/0: instruction read/4 +run/0: break-unless {name: "empty", value: 2, type: 3, properties: ["empty": "boolean"]}, {name: "", value: 2, type: , properties: ["": ]} mem/0: location 1130 is 0 run/0: ingredient 0 is 0 run/0: ingredient 1 is run/0: jumping to instruction 7 run/0: instruction read/8 +run/0: {name: "full", value: 4, type: 2-1, properties: ["full": "address":"integer"]} <- get-address {name: "chan", value: 1, type: 2-10, properties: ["chan": "address":"channel", "deref": ]}, {name: "first-full", value: 0, type: 0, properties: ["first-full": "offset"]} run/0: ingredient 0 is chan mem/0: location 1129 is 1030 run/0: ingredient 1 is first-full @@ -293,6 +347,7 @@ run/0: address to copy is 1030 run/0: product 0 is 1030 mem/0: storing 1030 in location 1132 run/0: instruction read/9 +run/0: {name: "circular-buffer", value: 5, type: 2-5-1, properties: ["circular-buffer": "address":"array":"location"]} <- get {name: "chan", value: 1, type: 2-10, properties: ["chan": "address":"channel", "deref": ]}, {name: "data", value: 2, type: 0, properties: ["data": "offset"]} run/0: ingredient 0 is chan mem/0: location 1129 is 1030 run/0: ingredient 1 is data @@ -302,6 +357,7 @@ mem/0: location 1032 is 1033 run/0: product 0 is 1033 mem/0: storing 1033 in location 1133 run/0: instruction read/10 +run/0: {name: "result", value: 6, type: 1, properties: ["result": "location"]} <- index {name: "circular-buffer", value: 5, type: 2-5-1, properties: ["circular-buffer": "address":"array":"location", "deref": ]}, {name: "full", value: 4, type: 2-1, properties: ["full": "address":"integer", "deref": ]} run/0: ingredient 0 is {name: "circular-buffer", value: 5, type: 2-5-1, properties: ["circular-buffer": "address":"array":"location", "deref": ]} mem/0: location 1133 is 1033 run/0: ingredient 1 is {name: "full", value: 4, type: 2-1, properties: ["full": "address":"integer", "deref": ]} @@ -313,6 +369,7 @@ mem/0: location 1034 is 34 run/0: product 0 is 34 mem/0: storing 34 in location 1134 run/0: instruction read/11 +run/0: {name: "full", value: 4, type: 2-1, properties: ["full": "address":"integer", "deref": ]} <- add {name: "full", value: 4, type: 2-1, properties: ["full": "address":"integer", "deref": ]}, {name: "1", value: 1, type: 0, properties: ["1": "literal"]} run/0: ingredient 0 is full mem/0: location 1132 is 1030 mem/0: location 1030 is 0 @@ -321,9 +378,11 @@ run/0: product 0 is 1 mem/0: location 1132 is 1030 mem/0: storing 1 in location 1030 run/0: instruction read/13 +run/0: {name: "len", value: 7, type: 1, properties: ["len": "integer"]} <- length {name: "circular-buffer", value: 5, type: 2-5-1, properties: ["circular-buffer": "address":"array":"location", "deref": ]} mem/0: location 1133 is 1033 mem/0: storing 4 in location 1135 run/0: instruction read/14 +run/0: {name: "at-end?", value: 8, type: 3, properties: ["at-end?": "boolean"]} <- greater-or-equal {name: "full", value: 4, type: 2-1, properties: ["full": "address":"integer", "deref": ]}, {name: "len", value: 7, type: 1, properties: ["len": "integer"]} run/0: ingredient 0 is full mem/0: location 1132 is 1030 mem/0: location 1030 is 1 @@ -332,17 +391,20 @@ mem/0: location 1135 is 4 run/0: product 0 is 0 mem/0: storing 0 in location 1136 run/0: instruction read/15 +run/0: break-unless {name: "at-end?", value: 8, type: 3, properties: ["at-end?": "boolean"]}, {name: "", value: 1, type: , properties: ["": ]} mem/0: location 1136 is 0 run/0: ingredient 0 is 0 run/0: ingredient 1 is run/0: jumping to instruction 17 run/0: instruction read/18 +run/0: reply {name: "result", value: 6, type: 1, properties: ["result": "location"]}, {name: "chan", value: 1, type: 2-10, properties: ["chan": "address":"channel", "same-as-ingredient": "0"]} mem/0: location 1134 is 34 mem/0: location 1129 is 1030 run/0: result 0 is 34 run/0: result 1 is 1030 mem/0: storing 1030 in location 1 run/0: instruction test-channel-read-increments-full/3 +run/0: {name: "2", value: 2, type: 1, properties: ["2": "integer"]} <- get {name: "1", value: 1, type: 2-10, properties: ["1": "address":"channel", "deref": ]}, {name: "first-full", value: 0, type: 0, properties: ["first-full": "offset"]} run/0: ingredient 0 is 1 mem/0: location 1 is 1030 run/0: ingredient 1 is first-full @@ -352,6 +414,7 @@ mem/0: location 1030 is 1 run/0: product 0 is 1 mem/0: storing 1 in location 2 run/0: instruction test-channel-read-increments-full/4 +run/0: {name: "3", value: 3, type: 1, properties: ["3": "integer"]} <- get {name: "1", value: 1, type: 2-10, properties: ["1": "address":"channel", "deref": ]}, {name: "first-free", value: 1, type: 0, properties: ["first-free": "offset"]} run/0: ingredient 0 is 1 mem/0: location 1 is 1030 run/0: ingredient 1 is first-free diff --git a/cpp/.traces/channel-read-not-full b/cpp/.traces/channel-read-not-full index 9cacc02b..859eaefd 100644 --- a/cpp/.traces/channel-read-not-full +++ b/cpp/.traces/channel-read-not-full @@ -24,13 +24,17 @@ after-brace/0: channel-full? ... new/0: routine allocated memory from 1000 to 101000 schedule/0: test-channel-read-not-full run/0: instruction test-channel-read-not-full/0 +run/0: {name: "1", value: 1, type: 2-10, properties: ["1": "address":"channel"]} <- init-channel {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 {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 {name: "channel", value: 10, type: 0, properties: ["channel": "type"]} mem/0: new alloc: 1030 mem/0: storing 1030 in location 1002 run/0: instruction init-channel/2 +run/0: {name: "full", value: 2, type: 2-1, properties: ["full": "address":"integer"]} <- get-address {name: "result", value: 1, type: 2-10, properties: ["result": "address":"channel", "deref": ]}, {name: "first-full", value: 0, type: 0, properties: ["first-full": "offset"]} run/0: ingredient 0 is result mem/0: location 1002 is 1030 run/0: ingredient 1 is first-full @@ -38,10 +42,12 @@ run/0: address to copy is 1030 run/0: product 0 is 1030 mem/0: storing 1030 in location 1003 run/0: instruction init-channel/3 +run/0: {name: "full", value: 2, type: 2-1, properties: ["full": "address":"integer", "deref": ]} <- copy {name: "0", value: 0, type: 0, properties: ["0": "literal"]} run/0: ingredient 0 is 0 mem/0: location 1003 is 1030 mem/0: storing 0 in location 1030 run/0: instruction init-channel/4 +run/0: {name: "free", value: 3, type: 2-1, properties: ["free": "address":"integer"]} <- get-address {name: "result", value: 1, type: 2-10, properties: ["result": "address":"channel", "deref": ]}, {name: "first-free", value: 1, type: 0, properties: ["first-free": "offset"]} run/0: ingredient 0 is result mem/0: location 1002 is 1030 run/0: ingredient 1 is first-free @@ -49,19 +55,23 @@ run/0: address to copy is 1031 run/0: product 0 is 1031 mem/0: storing 1031 in location 1004 run/0: instruction init-channel/5 +run/0: {name: "free", value: 3, type: 2-1, properties: ["free": "address":"integer", "deref": ]} <- copy {name: "0", value: 0, type: 0, properties: ["0": "literal"]} run/0: ingredient 0 is 0 mem/0: location 1004 is 1031 mem/0: storing 0 in location 1031 run/0: instruction init-channel/6 +run/0: {name: "capacity", value: 4, type: 1, properties: ["capacity": "integer"]} <- next-ingredient run/0: product 0 is 1 mem/0: storing 1 in location 1005 run/0: instruction init-channel/7 +run/0: {name: "capacity", value: 4, type: 1, properties: ["capacity": "integer"]} <- add {name: "capacity", value: 4, type: 1, properties: ["capacity": "integer"]}, {name: "1", value: 1, type: 0, properties: ["1": "literal"]} run/0: ingredient 0 is capacity mem/0: location 1005 is 1 run/0: ingredient 1 is 1 run/0: product 0 is 2 mem/0: storing 2 in location 1005 run/0: instruction init-channel/8 +run/0: {name: "dest", value: 5, type: 2-2-5-1, properties: ["dest": "address":"address":"array":"location"]} <- get-address {name: "result", value: 1, type: 2-10, properties: ["result": "address":"channel", "deref": ]}, {name: "data", value: 2, type: 0, properties: ["data": "offset"]} run/0: ingredient 0 is result mem/0: location 1002 is 1030 run/0: ingredient 1 is data @@ -69,35 +79,45 @@ run/0: address to copy is 1032 run/0: product 0 is 1032 mem/0: storing 1032 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 {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: 1033 mem/0: location 1006 is 1032 mem/0: storing 1033 in location 1032 run/0: instruction init-channel/10 +run/0: reply {name: "result", value: 1, type: 2-10, properties: ["result": "address":"channel"]} mem/0: location 1002 is 1030 run/0: result 0 is 1030 mem/0: storing 1030 in location 1 run/0: instruction test-channel-read-not-full/1 +run/0: {name: "1", value: 1, type: 2-10, properties: ["1": "address":"channel"]} <- write {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 1030 run/0: instruction write/0 +run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new {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 write/1 +run/0: {name: "chan", value: 1, type: 2-10, properties: ["chan": "address":"channel"]} <- next-ingredient run/0: product 0 is 1030 mem/0: storing 1030 in location 1037 run/0: instruction write/2 +run/0: {name: "val", value: 2, type: 1, properties: ["val": "location"]} <- next-ingredient run/0: product 0 is 34 mem/0: storing 34 in location 1038 run/0: instruction write/4 +run/0: {name: "full", value: 3, type: 3, properties: ["full": "boolean"]} <- channel-full? {name: "chan", value: 1, type: 2-10, properties: ["chan": "address":"channel"]} mem/0: location 1037 is 1030 run/0: instruction channel-full?/0 +run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new {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: 1065 run/0: instruction channel-full?/1 +run/0: {name: "chan", value: 1, type: 2-10, properties: ["chan": "address":"channel"]} <- next-ingredient run/0: product 0 is 1030 mem/0: storing 1030 in location 1067 run/0: instruction channel-full?/2 +run/0: {name: "tmp", value: 2, type: 1, properties: ["tmp": "integer"]} <- get {name: "chan", value: 1, type: 2-10, properties: ["chan": "address":"channel", "deref": ]}, {name: "first-free", value: 1, type: 0, properties: ["first-free": "offset"]} run/0: ingredient 0 is chan mem/0: location 1067 is 1030 run/0: ingredient 1 is first-free @@ -107,20 +127,25 @@ mem/0: location 1031 is 0 run/0: product 0 is 0 mem/0: storing 0 in location 1068 run/0: instruction channel-full?/3 +run/0: {name: "tmp", value: 2, type: 1, properties: ["tmp": "integer"]} <- add {name: "tmp", value: 2, type: 1, properties: ["tmp": "integer"]}, {name: "1", value: 1, type: 0, properties: ["1": "literal"]} run/0: ingredient 0 is tmp mem/0: location 1068 is 0 run/0: ingredient 1 is 1 run/0: product 0 is 1 mem/0: storing 1 in location 1068 run/0: instruction channel-full?/5 +run/0: {name: "len", value: 3, type: 1, properties: ["len": "integer"]} <- channel-capacity {name: "chan", value: 1, type: 2-10, properties: ["chan": "address":"channel"]} mem/0: location 1067 is 1030 run/0: instruction channel-capacity/0 +run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new {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 channel-capacity/1 +run/0: {name: "chan", value: 1, type: 2-10, properties: ["chan": "address":"channel"]} <- next-ingredient run/0: product 0 is 1030 mem/0: storing 1030 in location 1097 run/0: instruction channel-capacity/2 +run/0: {name: "q", value: 2, type: 2-5-1, properties: ["q": "address":"array":"location"]} <- get {name: "chan", value: 1, type: 2-10, properties: ["chan": "address":"channel", "deref": ]}, {name: "data", value: 2, type: 0, properties: ["data": "offset"]} run/0: ingredient 0 is chan mem/0: location 1097 is 1030 run/0: ingredient 1 is data @@ -130,13 +155,16 @@ mem/0: location 1032 is 1033 run/0: product 0 is 1033 mem/0: storing 1033 in location 1098 run/0: instruction channel-capacity/3 +run/0: {name: "result", value: 3, type: 1, properties: ["result": "integer"]} <- length {name: "q", value: 2, type: 2-5-1, properties: ["q": "address":"array":"location", "deref": ]} mem/0: location 1098 is 1033 mem/0: storing 2 in location 1099 run/0: instruction channel-capacity/4 +run/0: reply {name: "result", value: 3, type: 1, properties: ["result": "integer"]} mem/0: location 1099 is 2 run/0: result 0 is 2 mem/0: storing 2 in location 1069 run/0: instruction channel-full?/6 +run/0: {name: "at-end?", value: 4, type: 3, properties: ["at-end?": "boolean"]} <- greater-or-equal {name: "tmp", value: 2, type: 1, properties: ["tmp": "integer"]}, {name: "len", value: 3, type: 1, properties: ["len": "integer"]} run/0: ingredient 0 is tmp mem/0: location 1068 is 1 run/0: ingredient 1 is len @@ -144,11 +172,13 @@ mem/0: location 1069 is 2 run/0: product 0 is 0 mem/0: storing 0 in location 1070 run/0: instruction channel-full?/7 +run/0: break-unless {name: "at-end?", value: 4, type: 3, properties: ["at-end?": "boolean"]}, {name: "", value: 1, type: , properties: ["": ]} mem/0: location 1070 is 0 run/0: ingredient 0 is 0 run/0: ingredient 1 is run/0: jumping to instruction 9 run/0: instruction channel-full?/10 +run/0: {name: "full", value: 5, type: 1, properties: ["full": "integer"]} <- get {name: "chan", value: 1, type: 2-10, properties: ["chan": "address":"channel", "deref": ]}, {name: "first-full", value: 0, type: 0, properties: ["first-full": "offset"]} run/0: ingredient 0 is chan mem/0: location 1067 is 1030 run/0: ingredient 1 is first-full @@ -158,6 +188,7 @@ mem/0: location 1030 is 0 run/0: product 0 is 0 mem/0: storing 0 in location 1071 run/0: instruction channel-full?/11 +run/0: {name: "result", value: 6, type: 3, properties: ["result": "boolean"]} <- equal {name: "full", value: 5, type: 1, properties: ["full": "integer"]}, {name: "tmp", value: 2, type: 1, properties: ["tmp": "integer"]} run/0: ingredient 0 is full mem/0: location 1071 is 0 run/0: ingredient 1 is tmp @@ -165,15 +196,18 @@ mem/0: location 1068 is 1 run/0: product 0 is 0 mem/0: storing 0 in location 1072 run/0: instruction channel-full?/12 +run/0: reply {name: "result", value: 6, type: 3, properties: ["result": "boolean"]} mem/0: location 1072 is 0 run/0: result 0 is 0 mem/0: storing 0 in location 1039 run/0: instruction write/5 +run/0: break-unless {name: "full", value: 3, type: 3, properties: ["full": "boolean"]}, {name: "", value: 2, type: , properties: ["": ]} mem/0: location 1039 is 0 run/0: ingredient 0 is 0 run/0: ingredient 1 is run/0: jumping to instruction 8 run/0: instruction write/9 +run/0: {name: "circular-buffer", value: 5, type: 2-5-1, properties: ["circular-buffer": "address":"array":"location"]} <- get {name: "chan", value: 1, type: 2-10, properties: ["chan": "address":"channel", "deref": ]}, {name: "data", value: 2, type: 0, properties: ["data": "offset"]} run/0: ingredient 0 is chan mem/0: location 1037 is 1030 run/0: ingredient 1 is data @@ -183,6 +217,7 @@ mem/0: location 1032 is 1033 run/0: product 0 is 1033 mem/0: storing 1033 in location 1041 run/0: instruction write/10 +run/0: {name: "free", value: 6, type: 2-1, properties: ["free": "address":"integer"]} <- get-address {name: "chan", value: 1, type: 2-10, properties: ["chan": "address":"channel", "deref": ]}, {name: "first-free", value: 1, type: 0, properties: ["first-free": "offset"]} run/0: ingredient 0 is chan mem/0: location 1037 is 1030 run/0: ingredient 1 is first-free @@ -190,6 +225,7 @@ run/0: address to copy is 1031 run/0: product 0 is 1031 mem/0: storing 1031 in location 1042 run/0: instruction write/11 +run/0: {name: "dest", value: 7, type: 2-1, properties: ["dest": "address":"location"]} <- index-address {name: "circular-buffer", value: 5, type: 2-5-1, properties: ["circular-buffer": "address":"array":"location", "deref": ]}, {name: "free", value: 6, type: 2-1, properties: ["free": "address":"integer", "deref": ]} run/0: ingredient 0 is circular-buffer mem/0: location 1041 is 1033 run/0: ingredient 1 is {name: "free", value: 6, type: 2-1, properties: ["free": "address":"integer", "deref": ]} @@ -199,11 +235,13 @@ run/0: address to copy is 1034 run/0: product 0 is 1034 mem/0: storing 1034 in location 1043 run/0: instruction write/12 +run/0: {name: "dest", value: 7, type: 2-1, properties: ["dest": "address":"location", "deref": ]} <- copy {name: "val", value: 2, type: 1, properties: ["val": "location"]} run/0: ingredient 0 is val mem/0: location 1038 is 34 mem/0: location 1043 is 1034 mem/0: storing 34 in location 1034 run/0: instruction write/13 +run/0: {name: "free", value: 6, type: 2-1, properties: ["free": "address":"integer", "deref": ]} <- add {name: "free", value: 6, type: 2-1, properties: ["free": "address":"integer", "deref": ]}, {name: "1", value: 1, type: 0, properties: ["1": "literal"]} run/0: ingredient 0 is free mem/0: location 1042 is 1031 mem/0: location 1031 is 0 @@ -212,9 +250,11 @@ run/0: product 0 is 1 mem/0: location 1042 is 1031 mem/0: storing 1 in location 1031 run/0: instruction write/15 +run/0: {name: "len", value: 8, type: 1, properties: ["len": "integer"]} <- length {name: "circular-buffer", value: 5, type: 2-5-1, properties: ["circular-buffer": "address":"array":"location", "deref": ]} mem/0: location 1041 is 1033 mem/0: storing 2 in location 1044 run/0: instruction write/16 +run/0: {name: "at-end?", value: 9, type: 3, properties: ["at-end?": "boolean"]} <- greater-or-equal {name: "free", value: 6, type: 2-1, properties: ["free": "address":"integer", "deref": ]}, {name: "len", value: 8, type: 1, properties: ["len": "integer"]} run/0: ingredient 0 is free mem/0: location 1042 is 1031 mem/0: location 1031 is 1 @@ -223,31 +263,40 @@ mem/0: location 1044 is 2 run/0: product 0 is 0 mem/0: storing 0 in location 1045 run/0: instruction write/17 +run/0: break-unless {name: "at-end?", value: 9, type: 3, properties: ["at-end?": "boolean"]}, {name: "", value: 1, type: , properties: ["": ]} mem/0: location 1045 is 0 run/0: ingredient 0 is 0 run/0: ingredient 1 is run/0: jumping to instruction 19 run/0: instruction write/20 +run/0: reply {name: "chan", value: 1, type: 2-10, properties: ["chan": "address":"channel", "same-as-ingredient": "0"]} mem/0: location 1037 is 1030 run/0: result 0 is 1030 mem/0: storing 1030 in location 1 run/0: instruction test-channel-read-not-full/2 +run/0: {name: "_", value: 0, type: 0, properties: ["_": "dummy"]}, {name: "1", value: 1, type: 2-10, properties: ["1": "address":"channel"]} <- read {name: "1", value: 1, type: 2-10, properties: ["1": "address":"channel"]} mem/0: location 1 is 1030 run/0: instruction read/0 +run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new {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: 1125 run/0: instruction read/1 +run/0: {name: "chan", value: 1, type: 2-10, properties: ["chan": "address":"channel"]} <- next-ingredient run/0: product 0 is 1030 mem/0: storing 1030 in location 1127 run/0: instruction read/3 +run/0: {name: "empty", value: 2, type: 3, properties: ["empty": "boolean"]} <- channel-empty? {name: "chan", value: 1, type: 2-10, properties: ["chan": "address":"channel"]} mem/0: location 1127 is 1030 run/0: instruction channel-empty?/0 +run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new {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: 1155 run/0: instruction channel-empty?/1 +run/0: {name: "chan", value: 1, type: 2-10, properties: ["chan": "address":"channel"]} <- next-ingredient run/0: product 0 is 1030 mem/0: storing 1030 in location 1157 run/0: instruction channel-empty?/2 +run/0: {name: "full", value: 2, type: 1, properties: ["full": "integer"]} <- get {name: "chan", value: 1, type: 2-10, properties: ["chan": "address":"channel", "deref": ]}, {name: "first-full", value: 0, type: 0, properties: ["first-full": "offset"]} run/0: ingredient 0 is chan mem/0: location 1157 is 1030 run/0: ingredient 1 is first-full @@ -257,6 +306,7 @@ mem/0: location 1030 is 0 run/0: product 0 is 0 mem/0: storing 0 in location 1158 run/0: instruction channel-empty?/3 +run/0: {name: "free", value: 3, type: 1, properties: ["free": "integer"]} <- get {name: "chan", value: 1, type: 2-10, properties: ["chan": "address":"channel", "deref": ]}, {name: "first-free", value: 1, type: 0, properties: ["first-free": "offset"]} run/0: ingredient 0 is chan mem/0: location 1157 is 1030 run/0: ingredient 1 is first-free @@ -266,6 +316,7 @@ mem/0: location 1031 is 1 run/0: product 0 is 1 mem/0: storing 1 in location 1159 run/0: instruction channel-empty?/4 +run/0: {name: "result", value: 4, type: 3, properties: ["result": "boolean"]} <- equal {name: "full", value: 2, type: 1, properties: ["full": "integer"]}, {name: "free", value: 3, type: 1, properties: ["free": "integer"]} run/0: ingredient 0 is full mem/0: location 1158 is 0 run/0: ingredient 1 is free @@ -273,15 +324,18 @@ mem/0: location 1159 is 1 run/0: product 0 is 0 mem/0: storing 0 in location 1160 run/0: instruction channel-empty?/5 +run/0: reply {name: "result", value: 4, type: 3, properties: ["result": "boolean"]} mem/0: location 1160 is 0 run/0: result 0 is 0 mem/0: storing 0 in location 1128 run/0: instruction read/4 +run/0: break-unless {name: "empty", value: 2, type: 3, properties: ["empty": "boolean"]}, {name: "", value: 2, type: , properties: ["": ]} mem/0: location 1128 is 0 run/0: ingredient 0 is 0 run/0: ingredient 1 is run/0: jumping to instruction 7 run/0: instruction read/8 +run/0: {name: "full", value: 4, type: 2-1, properties: ["full": "address":"integer"]} <- get-address {name: "chan", value: 1, type: 2-10, properties: ["chan": "address":"channel", "deref": ]}, {name: "first-full", value: 0, type: 0, properties: ["first-full": "offset"]} run/0: ingredient 0 is chan mem/0: location 1127 is 1030 run/0: ingredient 1 is first-full @@ -289,6 +343,7 @@ run/0: address to copy is 1030 run/0: product 0 is 1030 mem/0: storing 1030 in location 1130 run/0: instruction read/9 +run/0: {name: "circular-buffer", value: 5, type: 2-5-1, properties: ["circular-buffer": "address":"array":"location"]} <- get {name: "chan", value: 1, type: 2-10, properties: ["chan": "address":"channel", "deref": ]}, {name: "data", value: 2, type: 0, properties: ["data": "offset"]} run/0: ingredient 0 is chan mem/0: location 1127 is 1030 run/0: ingredient 1 is data @@ -298,6 +353,7 @@ mem/0: location 1032 is 1033 run/0: product 0 is 1033 mem/0: storing 1033 in location 1131 run/0: instruction read/10 +run/0: {name: "result", value: 6, type: 1, properties: ["result": "location"]} <- index {name: "circular-buffer", value: 5, type: 2-5-1, properties: ["circular-buffer": "address":"array":"location", "deref": ]}, {name: "full", value: 4, type: 2-1, properties: ["full": "address":"integer", "deref": ]} run/0: ingredient 0 is {name: "circular-buffer", value: 5, type: 2-5-1, properties: ["circular-buffer": "address":"array":"location", "deref": ]} mem/0: location 1131 is 1033 run/0: ingredient 1 is {name: "full", value: 4, type: 2-1, properties: ["full": "address":"integer", "deref": ]} @@ -309,6 +365,7 @@ mem/0: location 1034 is 34 run/0: product 0 is 34 mem/0: storing 34 in location 1132 run/0: instruction read/11 +run/0: {name: "full", value: 4, type: 2-1, properties: ["full": "address":"integer", "deref": ]} <- add {name: "full", value: 4, type: 2-1, properties: ["full": "address":"integer", "deref": ]}, {name: "1", value: 1, type: 0, properties: ["1": "literal"]} run/0: ingredient 0 is full mem/0: location 1130 is 1030 mem/0: location 1030 is 0 @@ -317,9 +374,11 @@ run/0: product 0 is 1 mem/0: location 1130 is 1030 mem/0: storing 1 in location 1030 run/0: instruction read/13 +run/0: {name: "len", value: 7, type: 1, properties: ["len": "integer"]} <- length {name: "circular-buffer", value: 5, type: 2-5-1, properties: ["circular-buffer": "address":"array":"location", "deref": ]} mem/0: location 1131 is 1033 mem/0: storing 2 in location 1133 run/0: instruction read/14 +run/0: {name: "at-end?", value: 8, type: 3, properties: ["at-end?": "boolean"]} <- greater-or-equal {name: "full", value: 4, type: 2-1, properties: ["full": "address":"integer", "deref": ]}, {name: "len", value: 7, type: 1, properties: ["len": "integer"]} run/0: ingredient 0 is full mem/0: location 1130 is 1030 mem/0: location 1030 is 1 @@ -328,25 +387,31 @@ mem/0: location 1133 is 2 run/0: product 0 is 0 mem/0: storing 0 in location 1134 run/0: instruction read/15 +run/0: break-unless {name: "at-end?", value: 8, type: 3, properties: ["at-end?": "boolean"]}, {name: "", value: 1, type: , properties: ["": ]} mem/0: location 1134 is 0 run/0: ingredient 0 is 0 run/0: ingredient 1 is run/0: jumping to instruction 17 run/0: instruction read/18 +run/0: reply {name: "result", value: 6, type: 1, properties: ["result": "location"]}, {name: "chan", value: 1, type: 2-10, properties: ["chan": "address":"channel", "same-as-ingredient": "0"]} mem/0: location 1132 is 34 mem/0: location 1127 is 1030 run/0: result 0 is 34 run/0: result 1 is 1030 mem/0: storing 1030 in location 1 run/0: instruction test-channel-read-not-full/3 +run/0: {name: "2", value: 2, type: 1, properties: ["2": "integer"]} <- channel-empty? {name: "1", value: 1, type: 2-10, properties: ["1": "address":"channel"]} mem/0: location 1 is 1030 run/0: instruction channel-empty?/0 +run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new {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: 1185 run/0: instruction channel-empty?/1 +run/0: {name: "chan", value: 1, type: 2-10, properties: ["chan": "address":"channel"]} <- next-ingredient run/0: product 0 is 1030 mem/0: storing 1030 in location 1187 run/0: instruction channel-empty?/2 +run/0: {name: "full", value: 2, type: 1, properties: ["full": "integer"]} <- get {name: "chan", value: 1, type: 2-10, properties: ["chan": "address":"channel", "deref": ]}, {name: "first-full", value: 0, type: 0, properties: ["first-full": "offset"]} run/0: ingredient 0 is chan mem/0: location 1187 is 1030 run/0: ingredient 1 is first-full @@ -356,6 +421,7 @@ mem/0: location 1030 is 1 run/0: product 0 is 1 mem/0: storing 1 in location 1188 run/0: instruction channel-empty?/3 +run/0: {name: "free", value: 3, type: 1, properties: ["free": "integer"]} <- get {name: "chan", value: 1, type: 2-10, properties: ["chan": "address":"channel", "deref": ]}, {name: "first-free", value: 1, type: 0, properties: ["first-free": "offset"]} run/0: ingredient 0 is chan mem/0: location 1187 is 1030 run/0: ingredient 1 is first-free @@ -365,6 +431,7 @@ mem/0: location 1031 is 1 run/0: product 0 is 1 mem/0: storing 1 in location 1189 run/0: instruction channel-empty?/4 +run/0: {name: "result", value: 4, type: 3, properties: ["result": "boolean"]} <- equal {name: "full", value: 2, type: 1, properties: ["full": "integer"]}, {name: "free", value: 3, type: 1, properties: ["free": "integer"]} run/0: ingredient 0 is full mem/0: location 1188 is 1 run/0: ingredient 1 is free @@ -372,18 +439,23 @@ mem/0: location 1189 is 1 run/0: product 0 is 1 mem/0: storing 1 in location 1190 run/0: instruction channel-empty?/5 +run/0: reply {name: "result", value: 4, type: 3, properties: ["result": "boolean"]} mem/0: location 1190 is 1 run/0: result 0 is 1 mem/0: storing 1 in location 2 run/0: instruction test-channel-read-not-full/4 +run/0: {name: "3", value: 3, type: 1, properties: ["3": "integer"]} <- channel-full? {name: "1", value: 1, type: 2-10, properties: ["1": "address":"channel"]} mem/0: location 1 is 1030 run/0: instruction channel-full?/0 +run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new {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: 1215 run/0: instruction channel-full?/1 +run/0: {name: "chan", value: 1, type: 2-10, properties: ["chan": "address":"channel"]} <- next-ingredient run/0: product 0 is 1030 mem/0: storing 1030 in location 1217 run/0: instruction channel-full?/2 +run/0: {name: "tmp", value: 2, type: 1, properties: ["tmp": "integer"]} <- get {name: "chan", value: 1, type: 2-10, properties: ["chan": "address":"channel", "deref": ]}, {name: "first-free", value: 1, type: 0, properties: ["first-free": "offset"]} run/0: ingredient 0 is chan mem/0: location 1217 is 1030 run/0: ingredient 1 is first-free @@ -393,20 +465,25 @@ mem/0: location 1031 is 1 run/0: product 0 is 1 mem/0: storing 1 in location 1218 run/0: instruction channel-full?/3 +run/0: {name: "tmp", value: 2, type: 1, properties: ["tmp": "integer"]} <- add {name: "tmp", value: 2, type: 1, properties: ["tmp": "integer"]}, {name: "1", value: 1, type: 0, properties: ["1": "literal"]} run/0: ingredient 0 is tmp mem/0: location 1218 is 1 run/0: ingredient 1 is 1 run/0: product 0 is 2 mem/0: storing 2 in location 1218 run/0: instruction channel-full?/5 +run/0: {name: "len", value: 3, type: 1, properties: ["len": "integer"]} <- channel-capacity {name: "chan", value: 1, type: 2-10, properties: ["chan": "address":"channel"]} mem/0: location 1217 is 1030 run/0: instruction channel-capacity/0 +run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new {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: 1245 run/0: instruction channel-capacity/1 +run/0: {name: "chan", value: 1, type: 2-10, properties: ["chan": "address":"channel"]} <- next-ingredient run/0: product 0 is 1030 mem/0: storing 1030 in location 1247 run/0: instruction channel-capacity/2 +run/0: {name: "q", value: 2, type: 2-5-1, properties: ["q": "address":"array":"location"]} <- get {name: "chan", value: 1, type: 2-10, properties: ["chan": "address":"channel", "deref": ]}, {name: "data", value: 2, type: 0, properties: ["data": "offset"]} run/0: ingredient 0 is chan mem/0: location 1247 is 1030 run/0: ingredient 1 is data @@ -416,13 +493,16 @@ mem/0: location 1032 is 1033 run/0: product 0 is 1033 mem/0: storing 1033 in location 1248 run/0: instruction channel-capacity/3 +run/0: {name: "result", value: 3, type: 1, properties: ["result": "integer"]} <- length {name: "q", value: 2, type: 2-5-1, properties: ["q": "address":"array":"location", "deref": ]} mem/0: location 1248 is 1033 mem/0: storing 2 in location 1249 run/0: instruction channel-capacity/4 +run/0: reply {name: "result", value: 3, type: 1, properties: ["result": "integer"]} mem/0: location 1249 is 2 run/0: result 0 is 2 mem/0: storing 2 in location 1219 run/0: instruction channel-full?/6 +run/0: {name: "at-end?", value: 4, type: 3, properties: ["at-end?": "boolean"]} <- greater-or-equal {name: "tmp", value: 2, type: 1, properties: ["tmp": "integer"]}, {name: "len", value: 3, type: 1, properties: ["len": "integer"]} run/0: ingredient 0 is tmp mem/0: location 1218 is 2 run/0: ingredient 1 is len @@ -430,13 +510,16 @@ mem/0: location 1219 is 2 run/0: product 0 is 1 mem/0: storing 1 in location 1220 run/0: instruction channel-full?/7 +run/0: break-unless {name: "at-end?", value: 4, type: 3, properties: ["at-end?": "boolean"]}, {name: "", value: 1, type: , properties: ["": ]} mem/0: location 1220 is 1 run/0: ingredient 0 is 1 run/0: jump-unless fell through run/0: instruction channel-full?/8 +run/0: {name: "tmp", value: 2, type: 1, properties: ["tmp": "integer"]} <- copy {name: "0", value: 0, type: 0, properties: ["0": "literal"]} run/0: ingredient 0 is 0 mem/0: storing 0 in location 1218 run/0: instruction channel-full?/10 +run/0: {name: "full", value: 5, type: 1, properties: ["full": "integer"]} <- get {name: "chan", value: 1, type: 2-10, properties: ["chan": "address":"channel", "deref": ]}, {name: "first-full", value: 0, type: 0, properties: ["first-full": "offset"]} run/0: ingredient 0 is chan mem/0: location 1217 is 1030 run/0: ingredient 1 is first-full @@ -446,6 +529,7 @@ mem/0: location 1030 is 1 run/0: product 0 is 1 mem/0: storing 1 in location 1221 run/0: instruction channel-full?/11 +run/0: {name: "result", value: 6, type: 3, properties: ["result": "boolean"]} <- equal {name: "full", value: 5, type: 1, properties: ["full": "integer"]}, {name: "tmp", value: 2, type: 1, properties: ["tmp": "integer"]} run/0: ingredient 0 is full mem/0: location 1221 is 1 run/0: ingredient 1 is tmp @@ -453,6 +537,7 @@ mem/0: location 1218 is 0 run/0: product 0 is 0 mem/0: storing 0 in location 1222 run/0: instruction channel-full?/12 +run/0: reply {name: "result", value: 6, type: 3, properties: ["result": "boolean"]} mem/0: location 1222 is 0 run/0: result 0 is 0 mem/0: storing 0 in location 3 diff --git a/cpp/.traces/channel-wrap b/cpp/.traces/channel-wrap index 53e74673..9cc3177f 100644 --- a/cpp/.traces/channel-wrap +++ b/cpp/.traces/channel-wrap @@ -50,13 +50,17 @@ after-brace/0: get ... new/0: routine allocated memory from 1000 to 101000 schedule/0: test-channel-wrap run/0: instruction test-channel-wrap/0 +run/0: {name: "1", value: 1, type: 2-10, properties: ["1": "address":"channel"]} <- init-channel {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 {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 {name: "channel", value: 10, type: 0, properties: ["channel": "type"]} mem/0: new alloc: 1030 mem/0: storing 1030 in location 1002 run/0: instruction init-channel/2 +run/0: {name: "full", value: 2, type: 2-1, properties: ["full": "address":"integer"]} <- get-address {name: "result", value: 1, type: 2-10, properties: ["result": "address":"channel", "deref": ]}, {name: "first-full", value: 0, type: 0, properties: ["first-full": "offset"]} run/0: ingredient 0 is result mem/0: location 1002 is 1030 run/0: ingredient 1 is first-full @@ -64,10 +68,12 @@ run/0: address to copy is 1030 run/0: product 0 is 1030 mem/0: storing 1030 in location 1003 run/0: instruction init-channel/3 +run/0: {name: "full", value: 2, type: 2-1, properties: ["full": "address":"integer", "deref": ]} <- copy {name: "0", value: 0, type: 0, properties: ["0": "literal"]} run/0: ingredient 0 is 0 mem/0: location 1003 is 1030 mem/0: storing 0 in location 1030 run/0: instruction init-channel/4 +run/0: {name: "free", value: 3, type: 2-1, properties: ["free": "address":"integer"]} <- get-address {name: "result", value: 1, type: 2-10, properties: ["result": "address":"channel", "deref": ]}, {name: "first-free", value: 1, type: 0, properties: ["first-free": "offset"]} run/0: ingredient 0 is result mem/0: location 1002 is 1030 run/0: ingredient 1 is first-free @@ -75,19 +81,23 @@ run/0: address to copy is 1031 run/0: product 0 is 1031 mem/0: storing 1031 in location 1004 run/0: instruction init-channel/5 +run/0: {name: "free", value: 3, type: 2-1, properties: ["free": "address":"integer", "deref": ]} <- copy {name: "0", value: 0, type: 0, properties: ["0": "literal"]} run/0: ingredient 0 is 0 mem/0: location 1004 is 1031 mem/0: storing 0 in location 1031 run/0: instruction init-channel/6 +run/0: {name: "capacity", value: 4, type: 1, properties: ["capacity": "integer"]} <- next-ingredient run/0: product 0 is 1 mem/0: storing 1 in location 1005 run/0: instruction init-channel/7 +run/0: {name: "capacity", value: 4, type: 1, properties: ["capacity": "integer"]} <- add {name: "capacity", value: 4, type: 1, properties: ["capacity": "integer"]}, {name: "1", value: 1, type: 0, properties: ["1": "literal"]} run/0: ingredient 0 is capacity mem/0: location 1005 is 1 run/0: ingredient 1 is 1 run/0: product 0 is 2 mem/0: storing 2 in location 1005 run/0: instruction init-channel/8 +run/0: {name: "dest", value: 5, type: 2-2-5-1, properties: ["dest": "address":"address":"array":"location"]} <- get-address {name: "result", value: 1, type: 2-10, properties: ["result": "address":"channel", "deref": ]}, {name: "data", value: 2, type: 0, properties: ["data": "offset"]} run/0: ingredient 0 is result mem/0: location 1002 is 1030 run/0: ingredient 1 is data @@ -95,35 +105,45 @@ run/0: address to copy is 1032 run/0: product 0 is 1032 mem/0: storing 1032 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 {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: 1033 mem/0: location 1006 is 1032 mem/0: storing 1033 in location 1032 run/0: instruction init-channel/10 +run/0: reply {name: "result", value: 1, type: 2-10, properties: ["result": "address":"channel"]} mem/0: location 1002 is 1030 run/0: result 0 is 1030 mem/0: storing 1030 in location 1 run/0: instruction test-channel-wrap/1 +run/0: {name: "1", value: 1, type: 2-10, properties: ["1": "address":"channel"]} <- write {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 1030 run/0: instruction write/0 +run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new {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 write/1 +run/0: {name: "chan", value: 1, type: 2-10, properties: ["chan": "address":"channel"]} <- next-ingredient run/0: product 0 is 1030 mem/0: storing 1030 in location 1037 run/0: instruction write/2 +run/0: {name: "val", value: 2, type: 1, properties: ["val": "location"]} <- next-ingredient run/0: product 0 is 34 mem/0: storing 34 in location 1038 run/0: instruction write/4 +run/0: {name: "full", value: 3, type: 3, properties: ["full": "boolean"]} <- channel-full? {name: "chan", value: 1, type: 2-10, properties: ["chan": "address":"channel"]} mem/0: location 1037 is 1030 run/0: instruction channel-full?/0 +run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new {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: 1065 run/0: instruction channel-full?/1 +run/0: {name: "chan", value: 1, type: 2-10, properties: ["chan": "address":"channel"]} <- next-ingredient run/0: product 0 is 1030 mem/0: storing 1030 in location 1067 run/0: instruction channel-full?/2 +run/0: {name: "tmp", value: 2, type: 1, properties: ["tmp": "integer"]} <- get {name: "chan", value: 1, type: 2-10, properties: ["chan": "address":"channel", "deref": ]}, {name: "first-free", value: 1, type: 0, properties: ["first-free": "offset"]} run/0: ingredient 0 is chan mem/0: location 1067 is 1030 run/0: ingredient 1 is first-free @@ -133,20 +153,25 @@ mem/0: location 1031 is 0 run/0: product 0 is 0 mem/0: storing 0 in location 1068 run/0: instruction channel-full?/3 +run/0: {name: "tmp", value: 2, type: 1, properties: ["tmp": "integer"]} <- add {name: "tmp", value: 2, type: 1, properties: ["tmp": "integer"]}, {name: "1", value: 1, type: 0, properties: ["1": "literal"]} run/0: ingredient 0 is tmp mem/0: location 1068 is 0 run/0: ingredient 1 is 1 run/0: product 0 is 1 mem/0: storing 1 in location 1068 run/0: instruction channel-full?/5 +run/0: {name: "len", value: 3, type: 1, properties: ["len": "integer"]} <- channel-capacity {name: "chan", value: 1, type: 2-10, properties: ["chan": "address":"channel"]} mem/0: location 1067 is 1030 run/0: instruction channel-capacity/0 +run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new {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 channel-capacity/1 +run/0: {name: "chan", value: 1, type: 2-10, properties: ["chan": "address":"channel"]} <- next-ingredient run/0: product 0 is 1030 mem/0: storing 1030 in location 1097 run/0: instruction channel-capacity/2 +run/0: {name: "q", value: 2, type: 2-5-1, properties: ["q": "address":"array":"location"]} <- get {name: "chan", value: 1, type: 2-10, properties: ["chan": "address":"channel", "deref": ]}, {name: "data", value: 2, type: 0, properties: ["data": "offset"]} run/0: ingredient 0 is chan mem/0: location 1097 is 1030 run/0: ingredient 1 is data @@ -156,13 +181,16 @@ mem/0: location 1032 is 1033 run/0: product 0 is 1033 mem/0: storing 1033 in location 1098 run/0: instruction channel-capacity/3 +run/0: {name: "result", value: 3, type: 1, properties: ["result": "integer"]} <- length {name: "q", value: 2, type: 2-5-1, properties: ["q": "address":"array":"location", "deref": ]} mem/0: location 1098 is 1033 mem/0: storing 2 in location 1099 run/0: instruction channel-capacity/4 +run/0: reply {name: "result", value: 3, type: 1, properties: ["result": "integer"]} mem/0: location 1099 is 2 run/0: result 0 is 2 mem/0: storing 2 in location 1069 run/0: instruction channel-full?/6 +run/0: {name: "at-end?", value: 4, type: 3, properties: ["at-end?": "boolean"]} <- greater-or-equal {name: "tmp", value: 2, type: 1, properties: ["tmp": "integer"]}, {name: "len", value: 3, type: 1, properties: ["len": "integer"]} run/0: ingredient 0 is tmp mem/0: location 1068 is 1 run/0: ingredient 1 is len @@ -170,11 +198,13 @@ mem/0: location 1069 is 2 run/0: product 0 is 0 mem/0: storing 0 in location 1070 run/0: instruction channel-full?/7 +run/0: break-unless {name: "at-end?", value: 4, type: 3, properties: ["at-end?": "boolean"]}, {name: "", value: 1, type: , properties: ["": ]} mem/0: location 1070 is 0 run/0: ingredient 0 is 0 run/0: ingredient 1 is run/0: jumping to instruction 9 run/0: instruction channel-full?/10 +run/0: {name: "full", value: 5, type: 1, properties: ["full": "integer"]} <- get {name: "chan", value: 1, type: 2-10, properties: ["chan": "address":"channel", "deref": ]}, {name: "first-full", value: 0, type: 0, properties: ["first-full": "offset"]} run/0: ingredient 0 is chan mem/0: location 1067 is 1030 run/0: ingredient 1 is first-full @@ -184,6 +214,7 @@ mem/0: location 1030 is 0 run/0: product 0 is 0 mem/0: storing 0 in location 1071 run/0: instruction channel-full?/11 +run/0: {name: "result", value: 6, type: 3, properties: ["result": "boolean"]} <- equal {name: "full", value: 5, type: 1, properties: ["full": "integer"]}, {name: "tmp", value: 2, type: 1, properties: ["tmp": "integer"]} run/0: ingredient 0 is full mem/0: location 1071 is 0 run/0: ingredient 1 is tmp @@ -191,15 +222,18 @@ mem/0: location 1068 is 1 run/0: product 0 is 0 mem/0: storing 0 in location 1072 run/0: instruction channel-full?/12 +run/0: reply {name: "result", value: 6, type: 3, properties: ["result": "boolean"]} mem/0: location 1072 is 0 run/0: result 0 is 0 mem/0: storing 0 in location 1039 run/0: instruction write/5 +run/0: break-unless {name: "full", value: 3, type: 3, properties: ["full": "boolean"]}, {name: "", value: 2, type: , properties: ["": ]} mem/0: location 1039 is 0 run/0: ingredient 0 is 0 run/0: ingredient 1 is run/0: jumping to instruction 8 run/0: instruction write/9 +run/0: {name: "circular-buffer", value: 5, type: 2-5-1, properties: ["circular-buffer": "address":"array":"location"]} <- get {name: "chan", value: 1, type: 2-10, properties: ["chan": "address":"channel", "deref": ]}, {name: "data", value: 2, type: 0, properties: ["data": "offset"]} run/0: ingredient 0 is chan mem/0: location 1037 is 1030 run/0: ingredient 1 is data @@ -209,6 +243,7 @@ mem/0: location 1032 is 1033 run/0: product 0 is 1033 mem/0: storing 1033 in location 1041 run/0: instruction write/10 +run/0: {name: "free", value: 6, type: 2-1, properties: ["free": "address":"integer"]} <- get-address {name: "chan", value: 1, type: 2-10, properties: ["chan": "address":"channel", "deref": ]}, {name: "first-free", value: 1, type: 0, properties: ["first-free": "offset"]} run/0: ingredient 0 is chan mem/0: location 1037 is 1030 run/0: ingredient 1 is first-free @@ -216,6 +251,7 @@ run/0: address to copy is 1031 run/0: product 0 is 1031 mem/0: storing 1031 in location 1042 run/0: instruction write/11 +run/0: {name: "dest", value: 7, type: 2-1, properties: ["dest": "address":"location"]} <- index-address {name: "circular-buffer", value: 5, type: 2-5-1, properties: ["circular-buffer": "address":"array":"location", "deref": ]}, {name: "free", value: 6, type: 2-1, properties: ["free": "address":"integer", "deref": ]} run/0: ingredient 0 is circular-buffer mem/0: location 1041 is 1033 run/0: ingredient 1 is {name: "free", value: 6, type: 2-1, properties: ["free": "address":"integer", "deref": ]} @@ -225,11 +261,13 @@ run/0: address to copy is 1034 run/0: product 0 is 1034 mem/0: storing 1034 in location 1043 run/0: instruction write/12 +run/0: {name: "dest", value: 7, type: 2-1, properties: ["dest": "address":"location", "deref": ]} <- copy {name: "val", value: 2, type: 1, properties: ["val": "location"]} run/0: ingredient 0 is val mem/0: location 1038 is 34 mem/0: location 1043 is 1034 mem/0: storing 34 in location 1034 run/0: instruction write/13 +run/0: {name: "free", value: 6, type: 2-1, properties: ["free": "address":"integer", "deref": ]} <- add {name: "free", value: 6, type: 2-1, properties: ["free": "address":"integer", "deref": ]}, {name: "1", value: 1, type: 0, properties: ["1": "literal"]} run/0: ingredient 0 is free mem/0: location 1042 is 1031 mem/0: location 1031 is 0 @@ -238,9 +276,11 @@ run/0: product 0 is 1 mem/0: location 1042 is 1031 mem/0: storing 1 in location 1031 run/0: instruction write/15 +run/0: {name: "len", value: 8, type: 1, properties: ["len": "integer"]} <- length {name: "circular-buffer", value: 5, type: 2-5-1, properties: ["circular-buffer": "address":"array":"location", "deref": ]} mem/0: location 1041 is 1033 mem/0: storing 2 in location 1044 run/0: instruction write/16 +run/0: {name: "at-end?", value: 9, type: 3, properties: ["at-end?": "boolean"]} <- greater-or-equal {name: "free", value: 6, type: 2-1, properties: ["free": "address":"integer", "deref": ]}, {name: "len", value: 8, type: 1, properties: ["len": "integer"]} run/0: ingredient 0 is free mem/0: location 1042 is 1031 mem/0: location 1031 is 1 @@ -249,31 +289,40 @@ mem/0: location 1044 is 2 run/0: product 0 is 0 mem/0: storing 0 in location 1045 run/0: instruction write/17 +run/0: break-unless {name: "at-end?", value: 9, type: 3, properties: ["at-end?": "boolean"]}, {name: "", value: 1, type: , properties: ["": ]} mem/0: location 1045 is 0 run/0: ingredient 0 is 0 run/0: ingredient 1 is run/0: jumping to instruction 19 run/0: instruction write/20 +run/0: reply {name: "chan", value: 1, type: 2-10, properties: ["chan": "address":"channel", "same-as-ingredient": "0"]} mem/0: location 1037 is 1030 run/0: result 0 is 1030 mem/0: storing 1030 in location 1 run/0: instruction test-channel-wrap/2 +run/0: {name: "_", value: 0, type: 0, properties: ["_": "dummy"]}, {name: "1", value: 1, type: 2-10, properties: ["1": "address":"channel"]} <- read {name: "1", value: 1, type: 2-10, properties: ["1": "address":"channel"]} mem/0: location 1 is 1030 run/0: instruction read/0 +run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new {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: 1125 run/0: instruction read/1 +run/0: {name: "chan", value: 1, type: 2-10, properties: ["chan": "address":"channel"]} <- next-ingredient run/0: product 0 is 1030 mem/0: storing 1030 in location 1127 run/0: instruction read/3 +run/0: {name: "empty", value: 2, type: 3, properties: ["empty": "boolean"]} <- channel-empty? {name: "chan", value: 1, type: 2-10, properties: ["chan": "address":"channel"]} mem/0: location 1127 is 1030 run/0: instruction channel-empty?/0 +run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new {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: 1155 run/0: instruction channel-empty?/1 +run/0: {name: "chan", value: 1, type: 2-10, properties: ["chan": "address":"channel"]} <- next-ingredient run/0: product 0 is 1030 mem/0: storing 1030 in location 1157 run/0: instruction channel-empty?/2 +run/0: {name: "full", value: 2, type: 1, properties: ["full": "integer"]} <- get {name: "chan", value: 1, type: 2-10, properties: ["chan": "address":"channel", "deref": ]}, {name: "first-full", value: 0, type: 0, properties: ["first-full": "offset"]} run/0: ingredient 0 is chan mem/0: location 1157 is 1030 run/0: ingredient 1 is first-full @@ -283,6 +332,7 @@ mem/0: location 1030 is 0 run/0: product 0 is 0 mem/0: storing 0 in location 1158 run/0: instruction channel-empty?/3 +run/0: {name: "free", value: 3, type: 1, properties: ["free": "integer"]} <- get {name: "chan", value: 1, type: 2-10, properties: ["chan": "address":"channel", "deref": ]}, {name: "first-free", value: 1, type: 0, properties: ["first-free": "offset"]} run/0: ingredient 0 is chan mem/0: location 1157 is 1030 run/0: ingredient 1 is first-free @@ -292,6 +342,7 @@ mem/0: location 1031 is 1 run/0: product 0 is 1 mem/0: storing 1 in location 1159 run/0: instruction channel-empty?/4 +run/0: {name: "result", value: 4, type: 3, properties: ["result": "boolean"]} <- equal {name: "full", value: 2, type: 1, properties: ["full": "integer"]}, {name: "free", value: 3, type: 1, properties: ["free": "integer"]} run/0: ingredient 0 is full mem/0: location 1158 is 0 run/0: ingredient 1 is free @@ -299,15 +350,18 @@ mem/0: location 1159 is 1 run/0: product 0 is 0 mem/0: storing 0 in location 1160 run/0: instruction channel-empty?/5 +run/0: reply {name: "result", value: 4, type: 3, properties: ["result": "boolean"]} mem/0: location 1160 is 0 run/0: result 0 is 0 mem/0: storing 0 in location 1128 run/0: instruction read/4 +run/0: break-unless {name: "empty", value: 2, type: 3, properties: ["empty": "boolean"]}, {name: "", value: 2, type: , properties: ["": ]} mem/0: location 1128 is 0 run/0: ingredient 0 is 0 run/0: ingredient 1 is run/0: jumping to instruction 7 run/0: instruction read/8 +run/0: {name: "full", value: 4, type: 2-1, properties: ["full": "address":"integer"]} <- get-address {name: "chan", value: 1, type: 2-10, properties: ["chan": "address":"channel", "deref": ]}, {name: "first-full", value: 0, type: 0, properties: ["first-full": "offset"]} run/0: ingredient 0 is chan mem/0: location 1127 is 1030 run/0: ingredient 1 is first-full @@ -315,6 +369,7 @@ run/0: address to copy is 1030 run/0: product 0 is 1030 mem/0: storing 1030 in location 1130 run/0: instruction read/9 +run/0: {name: "circular-buffer", value: 5, type: 2-5-1, properties: ["circular-buffer": "address":"array":"location"]} <- get {name: "chan", value: 1, type: 2-10, properties: ["chan": "address":"channel", "deref": ]}, {name: "data", value: 2, type: 0, properties: ["data": "offset"]} run/0: ingredient 0 is chan mem/0: location 1127 is 1030 run/0: ingredient 1 is data @@ -324,6 +379,7 @@ mem/0: location 1032 is 1033 run/0: product 0 is 1033 mem/0: storing 1033 in location 1131 run/0: instruction read/10 +run/0: {name: "result", value: 6, type: 1, properties: ["result": "location"]} <- index {name: "circular-buffer", value: 5, type: 2-5-1, properties: ["circular-buffer": "address":"array":"location", "deref": ]}, {name: "full", value: 4, type: 2-1, properties: ["full": "address":"integer", "deref": ]} run/0: ingredient 0 is {name: "circular-buffer", value: 5, type: 2-5-1, properties: ["circular-buffer": "address":"array":"location", "deref": ]} mem/0: location 1131 is 1033 run/0: ingredient 1 is {name: "full", value: 4, type: 2-1, properties: ["full": "address":"integer", "deref": ]} @@ -335,6 +391,7 @@ mem/0: location 1034 is 34 run/0: product 0 is 34 mem/0: storing 34 in location 1132 run/0: instruction read/11 +run/0: {name: "full", value: 4, type: 2-1, properties: ["full": "address":"integer", "deref": ]} <- add {name: "full", value: 4, type: 2-1, properties: ["full": "address":"integer", "deref": ]}, {name: "1", value: 1, type: 0, properties: ["1": "literal"]} run/0: ingredient 0 is full mem/0: location 1130 is 1030 mem/0: location 1030 is 0 @@ -343,9 +400,11 @@ run/0: product 0 is 1 mem/0: location 1130 is 1030 mem/0: storing 1 in location 1030 run/0: instruction read/13 +run/0: {name: "len", value: 7, type: 1, properties: ["len": "integer"]} <- length {name: "circular-buffer", value: 5, type: 2-5-1, properties: ["circular-buffer": "address":"array":"location", "deref": ]} mem/0: location 1131 is 1033 mem/0: storing 2 in location 1133 run/0: instruction read/14 +run/0: {name: "at-end?", value: 8, type: 3, properties: ["at-end?": "boolean"]} <- greater-or-equal {name: "full", value: 4, type: 2-1, properties: ["full": "address":"integer", "deref": ]}, {name: "len", value: 7, type: 1, properties: ["len": "integer"]} run/0: ingredient 0 is full mem/0: location 1130 is 1030 mem/0: location 1030 is 1 @@ -354,17 +413,20 @@ mem/0: location 1133 is 2 run/0: product 0 is 0 mem/0: storing 0 in location 1134 run/0: instruction read/15 +run/0: break-unless {name: "at-end?", value: 8, type: 3, properties: ["at-end?": "boolean"]}, {name: "", value: 1, type: , properties: ["": ]} mem/0: location 1134 is 0 run/0: ingredient 0 is 0 run/0: ingredient 1 is run/0: jumping to instruction 17 run/0: instruction read/18 +run/0: reply {name: "result", value: 6, type: 1, properties: ["result": "location"]}, {name: "chan", value: 1, type: 2-10, properties: ["chan": "address":"channel", "same-as-ingredient": "0"]} mem/0: location 1132 is 34 mem/0: location 1127 is 1030 run/0: result 0 is 34 run/0: result 1 is 1030 mem/0: storing 1030 in location 1 run/0: instruction test-channel-wrap/3 +run/0: {name: "2", value: 2, type: 1, properties: ["2": "integer"]} <- get {name: "1", value: 1, type: 2-10, properties: ["1": "address":"channel", "deref": ]}, {name: "first-free", value: 1, type: 0, properties: ["first-free": "offset"]} run/0: ingredient 0 is 1 mem/0: location 1 is 1030 run/0: ingredient 1 is first-free @@ -374,6 +436,7 @@ mem/0: location 1031 is 1 run/0: product 0 is 1 mem/0: storing 1 in location 2 run/0: instruction test-channel-wrap/4 +run/0: {name: "3", value: 3, type: 1, properties: ["3": "integer"]} <- get {name: "1", value: 1, type: 2-10, properties: ["1": "address":"channel", "deref": ]}, {name: "first-free", value: 1, type: 0, properties: ["first-free": "offset"]} run/0: ingredient 0 is 1 mem/0: location 1 is 1030 run/0: ingredient 1 is first-free @@ -383,25 +446,33 @@ mem/0: location 1031 is 1 run/0: product 0 is 1 mem/0: storing 1 in location 3 run/0: instruction test-channel-wrap/5 +run/0: {name: "1", value: 1, type: 2-10, properties: ["1": "address":"channel"]} <- write {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 1030 run/0: instruction write/0 +run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new {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: 1185 run/0: instruction write/1 +run/0: {name: "chan", value: 1, type: 2-10, properties: ["chan": "address":"channel"]} <- next-ingredient run/0: product 0 is 1030 mem/0: storing 1030 in location 1187 run/0: instruction write/2 +run/0: {name: "val", value: 2, type: 1, properties: ["val": "location"]} <- next-ingredient run/0: product 0 is 34 mem/0: storing 34 in location 1188 run/0: instruction write/4 +run/0: {name: "full", value: 3, type: 3, properties: ["full": "boolean"]} <- channel-full? {name: "chan", value: 1, type: 2-10, properties: ["chan": "address":"channel"]} mem/0: location 1187 is 1030 run/0: instruction channel-full?/0 +run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new {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: 1215 run/0: instruction channel-full?/1 +run/0: {name: "chan", value: 1, type: 2-10, properties: ["chan": "address":"channel"]} <- next-ingredient run/0: product 0 is 1030 mem/0: storing 1030 in location 1217 run/0: instruction channel-full?/2 +run/0: {name: "tmp", value: 2, type: 1, properties: ["tmp": "integer"]} <- get {name: "chan", value: 1, type: 2-10, properties: ["chan": "address":"channel", "deref": ]}, {name: "first-free", value: 1, type: 0, properties: ["first-free": "offset"]} run/0: ingredient 0 is chan mem/0: location 1217 is 1030 run/0: ingredient 1 is first-free @@ -411,20 +482,25 @@ mem/0: location 1031 is 1 run/0: product 0 is 1 mem/0: storing 1 in location 1218 run/0: instruction channel-full?/3 +run/0: {name: "tmp", value: 2, type: 1, properties: ["tmp": "integer"]} <- add {name: "tmp", value: 2, type: 1, properties: ["tmp": "integer"]}, {name: "1", value: 1, type: 0, properties: ["1": "literal"]} run/0: ingredient 0 is tmp mem/0: location 1218 is 1 run/0: ingredient 1 is 1 run/0: product 0 is 2 mem/0: storing 2 in location 1218 run/0: instruction channel-full?/5 +run/0: {name: "len", value: 3, type: 1, properties: ["len": "integer"]} <- channel-capacity {name: "chan", value: 1, type: 2-10, properties: ["chan": "address":"channel"]} mem/0: location 1217 is 1030 run/0: instruction channel-capacity/0 +run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new {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: 1245 run/0: instruction channel-capacity/1 +run/0: {name: "chan", value: 1, type: 2-10, properties: ["chan": "address":"channel"]} <- next-ingredient run/0: product 0 is 1030 mem/0: storing 1030 in location 1247 run/0: instruction channel-capacity/2 +run/0: {name: "q", value: 2, type: 2-5-1, properties: ["q": "address":"array":"location"]} <- get {name: "chan", value: 1, type: 2-10, properties: ["chan": "address":"channel", "deref": ]}, {name: "data", value: 2, type: 0, properties: ["data": "offset"]} run/0: ingredient 0 is chan mem/0: location 1247 is 1030 run/0: ingredient 1 is data @@ -434,13 +510,16 @@ mem/0: location 1032 is 1033 run/0: product 0 is 1033 mem/0: storing 1033 in location 1248 run/0: instruction channel-capacity/3 +run/0: {name: "result", value: 3, type: 1, properties: ["result": "integer"]} <- length {name: "q", value: 2, type: 2-5-1, properties: ["q": "address":"array":"location", "deref": ]} mem/0: location 1248 is 1033 mem/0: storing 2 in location 1249 run/0: instruction channel-capacity/4 +run/0: reply {name: "result", value: 3, type: 1, properties: ["result": "integer"]} mem/0: location 1249 is 2 run/0: result 0 is 2 mem/0: storing 2 in location 1219 run/0: instruction channel-full?/6 +run/0: {name: "at-end?", value: 4, type: 3, properties: ["at-end?": "boolean"]} <- greater-or-equal {name: "tmp", value: 2, type: 1, properties: ["tmp": "integer"]}, {name: "len", value: 3, type: 1, properties: ["len": "integer"]} run/0: ingredient 0 is tmp mem/0: location 1218 is 2 run/0: ingredient 1 is len @@ -448,13 +527,16 @@ mem/0: location 1219 is 2 run/0: product 0 is 1 mem/0: storing 1 in location 1220 run/0: instruction channel-full?/7 +run/0: break-unless {name: "at-end?", value: 4, type: 3, properties: ["at-end?": "boolean"]}, {name: "", value: 1, type: , properties: ["": ]} mem/0: location 1220 is 1 run/0: ingredient 0 is 1 run/0: jump-unless fell through run/0: instruction channel-full?/8 +run/0: {name: "tmp", value: 2, type: 1, properties: ["tmp": "integer"]} <- copy {name: "0", value: 0, type: 0, properties: ["0": "literal"]} run/0: ingredient 0 is 0 mem/0: storing 0 in location 1218 run/0: instruction channel-full?/10 +run/0: {name: "full", value: 5, type: 1, properties: ["full": "integer"]} <- get {name: "chan", value: 1, type: 2-10, properties: ["chan": "address":"channel", "deref": ]}, {name: "first-full", value: 0, type: 0, properties: ["first-full": "offset"]} run/0: ingredient 0 is chan mem/0: location 1217 is 1030 run/0: ingredient 1 is first-full @@ -464,6 +546,7 @@ mem/0: location 1030 is 1 run/0: product 0 is 1 mem/0: storing 1 in location 1221 run/0: instruction channel-full?/11 +run/0: {name: "result", value: 6, type: 3, properties: ["result": "boolean"]} <- equal {name: "full", value: 5, type: 1, properties: ["full": "integer"]}, {name: "tmp", value: 2, type: 1, properties: ["tmp": "integer"]} run/0: ingredient 0 is full mem/0: location 1221 is 1 run/0: ingredient 1 is tmp @@ -471,15 +554,18 @@ mem/0: location 1218 is 0 run/0: product 0 is 0 mem/0: storing 0 in location 1222 run/0: instruction channel-full?/12 +run/0: reply {name: "result", value: 6, type: 3, properties: ["result": "boolean"]} mem/0: location 1222 is 0 run/0: result 0 is 0 mem/0: storing 0 in location 1189 run/0: instruction write/5 +run/0: break-unless {name: "full", value: 3, type: 3, properties: ["full": "boolean"]}, {name: "", value: 2, type: , properties: ["": ]} mem/0: location 1189 is 0 run/0: ingredient 0 is 0 run/0: ingredient 1 is run/0: jumping to instruction 8 run/0: instruction write/9 +run/0: {name: "circular-buffer", value: 5, type: 2-5-1, properties: ["circular-buffer": "address":"array":"location"]} <- get {name: "chan", value: 1, type: 2-10, properties: ["chan": "address":"channel", "deref": ]}, {name: "data", value: 2, type: 0, properties: ["data": "offset"]} run/0: ingredient 0 is chan mem/0: location 1187 is 1030 run/0: ingredient 1 is data @@ -489,6 +575,7 @@ mem/0: location 1032 is 1033 run/0: product 0 is 1033 mem/0: storing 1033 in location 1191 run/0: instruction write/10 +run/0: {name: "free", value: 6, type: 2-1, properties: ["free": "address":"integer"]} <- get-address {name: "chan", value: 1, type: 2-10, properties: ["chan": "address":"channel", "deref": ]}, {name: "first-free", value: 1, type: 0, properties: ["first-free": "offset"]} run/0: ingredient 0 is chan mem/0: location 1187 is 1030 run/0: ingredient 1 is first-free @@ -496,6 +583,7 @@ run/0: address to copy is 1031 run/0: product 0 is 1031 mem/0: storing 1031 in location 1192 run/0: instruction write/11 +run/0: {name: "dest", value: 7, type: 2-1, properties: ["dest": "address":"location"]} <- index-address {name: "circular-buffer", value: 5, type: 2-5-1, properties: ["circular-buffer": "address":"array":"location", "deref": ]}, {name: "free", value: 6, type: 2-1, properties: ["free": "address":"integer", "deref": ]} run/0: ingredient 0 is circular-buffer mem/0: location 1191 is 1033 run/0: ingredient 1 is {name: "free", value: 6, type: 2-1, properties: ["free": "address":"integer", "deref": ]} @@ -505,11 +593,13 @@ run/0: address to copy is 1035 run/0: product 0 is 1035 mem/0: storing 1035 in location 1193 run/0: instruction write/12 +run/0: {name: "dest", value: 7, type: 2-1, properties: ["dest": "address":"location", "deref": ]} <- copy {name: "val", value: 2, type: 1, properties: ["val": "location"]} run/0: ingredient 0 is val mem/0: location 1188 is 34 mem/0: location 1193 is 1035 mem/0: storing 34 in location 1035 run/0: instruction write/13 +run/0: {name: "free", value: 6, type: 2-1, properties: ["free": "address":"integer", "deref": ]} <- add {name: "free", value: 6, type: 2-1, properties: ["free": "address":"integer", "deref": ]}, {name: "1", value: 1, type: 0, properties: ["1": "literal"]} run/0: ingredient 0 is free mem/0: location 1192 is 1031 mem/0: location 1031 is 1 @@ -518,9 +608,11 @@ run/0: product 0 is 2 mem/0: location 1192 is 1031 mem/0: storing 2 in location 1031 run/0: instruction write/15 +run/0: {name: "len", value: 8, type: 1, properties: ["len": "integer"]} <- length {name: "circular-buffer", value: 5, type: 2-5-1, properties: ["circular-buffer": "address":"array":"location", "deref": ]} mem/0: location 1191 is 1033 mem/0: storing 2 in location 1194 run/0: instruction write/16 +run/0: {name: "at-end?", value: 9, type: 3, properties: ["at-end?": "boolean"]} <- greater-or-equal {name: "free", value: 6, type: 2-1, properties: ["free": "address":"integer", "deref": ]}, {name: "len", value: 8, type: 1, properties: ["len": "integer"]} run/0: ingredient 0 is free mem/0: location 1192 is 1031 mem/0: location 1031 is 2 @@ -529,18 +621,22 @@ mem/0: location 1194 is 2 run/0: product 0 is 1 mem/0: storing 1 in location 1195 run/0: instruction write/17 +run/0: break-unless {name: "at-end?", value: 9, type: 3, properties: ["at-end?": "boolean"]}, {name: "", value: 1, type: , properties: ["": ]} mem/0: location 1195 is 1 run/0: ingredient 0 is 1 run/0: jump-unless fell through run/0: instruction write/18 +run/0: {name: "free", value: 6, type: 2-1, properties: ["free": "address":"integer", "deref": ]} <- copy {name: "0", value: 0, type: 0, properties: ["0": "literal"]} run/0: ingredient 0 is 0 mem/0: location 1192 is 1031 mem/0: storing 0 in location 1031 run/0: instruction write/20 +run/0: reply {name: "chan", value: 1, type: 2-10, properties: ["chan": "address":"channel", "same-as-ingredient": "0"]} mem/0: location 1187 is 1030 run/0: result 0 is 1030 mem/0: storing 1030 in location 1 run/0: instruction test-channel-wrap/6 +run/0: {name: "4", value: 4, type: 1, properties: ["4": "integer"]} <- get {name: "1", value: 1, type: 2-10, properties: ["1": "address":"channel", "deref": ]}, {name: "first-free", value: 1, type: 0, properties: ["first-free": "offset"]} run/0: ingredient 0 is 1 mem/0: location 1 is 1030 run/0: ingredient 1 is first-free @@ -550,22 +646,29 @@ mem/0: location 1031 is 0 run/0: product 0 is 0 mem/0: storing 0 in location 4 run/0: instruction test-channel-wrap/7 +run/0: {name: "_", value: 0, type: 0, properties: ["_": "dummy"]}, {name: "1", value: 1, type: 2-10, properties: ["1": "address":"channel"]} <- read {name: "1", value: 1, type: 2-10, properties: ["1": "address":"channel"]} mem/0: location 1 is 1030 run/0: instruction read/0 +run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new {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: 1275 run/0: instruction read/1 +run/0: {name: "chan", value: 1, type: 2-10, properties: ["chan": "address":"channel"]} <- next-ingredient run/0: product 0 is 1030 mem/0: storing 1030 in location 1277 run/0: instruction read/3 +run/0: {name: "empty", value: 2, type: 3, properties: ["empty": "boolean"]} <- channel-empty? {name: "chan", value: 1, type: 2-10, properties: ["chan": "address":"channel"]} mem/0: location 1277 is 1030 run/0: instruction channel-empty?/0 +run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new {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: 1305 run/0: instruction channel-empty?/1 +run/0: {name: "chan", value: 1, type: 2-10, properties: ["chan": "address":"channel"]} <- next-ingredient run/0: product 0 is 1030 mem/0: storing 1030 in location 1307 run/0: instruction channel-empty?/2 +run/0: {name: "full", value: 2, type: 1, properties: ["full": "integer"]} <- get {name: "chan", value: 1, type: 2-10, properties: ["chan": "address":"channel", "deref": ]}, {name: "first-full", value: 0, type: 0, properties: ["first-full": "offset"]} run/0: ingredient 0 is chan mem/0: location 1307 is 1030 run/0: ingredient 1 is first-full @@ -575,6 +678,7 @@ mem/0: location 1030 is 1 run/0: product 0 is 1 mem/0: storing 1 in location 1308 run/0: instruction channel-empty?/3 +run/0: {name: "free", value: 3, type: 1, properties: ["free": "integer"]} <- get {name: "chan", value: 1, type: 2-10, properties: ["chan": "address":"channel", "deref": ]}, {name: "first-free", value: 1, type: 0, properties: ["first-free": "offset"]} run/0: ingredient 0 is chan mem/0: location 1307 is 1030 run/0: ingredient 1 is first-free @@ -584,6 +688,7 @@ mem/0: location 1031 is 0 run/0: product 0 is 0 mem/0: storing 0 in location 1309 run/0: instruction channel-empty?/4 +run/0: {name: "result", value: 4, type: 3, properties: ["result": "boolean"]} <- equal {name: "full", value: 2, type: 1, properties: ["full": "integer"]}, {name: "free", value: 3, type: 1, properties: ["free": "integer"]} run/0: ingredient 0 is full mem/0: location 1308 is 1 run/0: ingredient 1 is free @@ -591,15 +696,18 @@ mem/0: location 1309 is 0 run/0: product 0 is 0 mem/0: storing 0 in location 1310 run/0: instruction channel-empty?/5 +run/0: reply {name: "result", value: 4, type: 3, properties: ["result": "boolean"]} mem/0: location 1310 is 0 run/0: result 0 is 0 mem/0: storing 0 in location 1278 run/0: instruction read/4 +run/0: break-unless {name: "empty", value: 2, type: 3, properties: ["empty": "boolean"]}, {name: "", value: 2, type: , properties: ["": ]} mem/0: location 1278 is 0 run/0: ingredient 0 is 0 run/0: ingredient 1 is run/0: jumping to instruction 7 run/0: instruction read/8 +run/0: {name: "full", value: 4, type: 2-1, properties: ["full": "address":"integer"]} <- get-address {name: "chan", value: 1, type: 2-10, properties: ["chan": "address":"channel", "deref": ]}, {name: "first-full", value: 0, type: 0, properties: ["first-full": "offset"]} run/0: ingredient 0 is chan mem/0: location 1277 is 1030 run/0: ingredient 1 is first-full @@ -607,6 +715,7 @@ run/0: address to copy is 1030 run/0: product 0 is 1030 mem/0: storing 1030 in location 1280 run/0: instruction read/9 +run/0: {name: "circular-buffer", value: 5, type: 2-5-1, properties: ["circular-buffer": "address":"array":"location"]} <- get {name: "chan", value: 1, type: 2-10, properties: ["chan": "address":"channel", "deref": ]}, {name: "data", value: 2, type: 0, properties: ["data": "offset"]} run/0: ingredient 0 is chan mem/0: location 1277 is 1030 run/0: ingredient 1 is data @@ -616,6 +725,7 @@ mem/0: location 1032 is 1033 run/0: product 0 is 1033 mem/0: storing 1033 in location 1281 run/0: instruction read/10 +run/0: {name: "result", value: 6, type: 1, properties: ["result": "location"]} <- index {name: "circular-buffer", value: 5, type: 2-5-1, properties: ["circular-buffer": "address":"array":"location", "deref": ]}, {name: "full", value: 4, type: 2-1, properties: ["full": "address":"integer", "deref": ]} run/0: ingredient 0 is {name: "circular-buffer", value: 5, type: 2-5-1, properties: ["circular-buffer": "address":"array":"location", "deref": ]} mem/0: location 1281 is 1033 run/0: ingredient 1 is {name: "full", value: 4, type: 2-1, properties: ["full": "address":"integer", "deref": ]} @@ -627,6 +737,7 @@ mem/0: location 1035 is 34 run/0: product 0 is 34 mem/0: storing 34 in location 1282 run/0: instruction read/11 +run/0: {name: "full", value: 4, type: 2-1, properties: ["full": "address":"integer", "deref": ]} <- add {name: "full", value: 4, type: 2-1, properties: ["full": "address":"integer", "deref": ]}, {name: "1", value: 1, type: 0, properties: ["1": "literal"]} run/0: ingredient 0 is full mem/0: location 1280 is 1030 mem/0: location 1030 is 1 @@ -635,9 +746,11 @@ run/0: product 0 is 2 mem/0: location 1280 is 1030 mem/0: storing 2 in location 1030 run/0: instruction read/13 +run/0: {name: "len", value: 7, type: 1, properties: ["len": "integer"]} <- length {name: "circular-buffer", value: 5, type: 2-5-1, properties: ["circular-buffer": "address":"array":"location", "deref": ]} mem/0: location 1281 is 1033 mem/0: storing 2 in location 1283 run/0: instruction read/14 +run/0: {name: "at-end?", value: 8, type: 3, properties: ["at-end?": "boolean"]} <- greater-or-equal {name: "full", value: 4, type: 2-1, properties: ["full": "address":"integer", "deref": ]}, {name: "len", value: 7, type: 1, properties: ["len": "integer"]} run/0: ingredient 0 is full mem/0: location 1280 is 1030 mem/0: location 1030 is 2 @@ -646,20 +759,24 @@ mem/0: location 1283 is 2 run/0: product 0 is 1 mem/0: storing 1 in location 1284 run/0: instruction read/15 +run/0: break-unless {name: "at-end?", value: 8, type: 3, properties: ["at-end?": "boolean"]}, {name: "", value: 1, type: , properties: ["": ]} mem/0: location 1284 is 1 run/0: ingredient 0 is 1 run/0: jump-unless fell through run/0: instruction read/16 +run/0: {name: "full", value: 4, type: 2-1, properties: ["full": "address":"integer", "deref": ]} <- copy {name: "0", value: 0, type: 0, properties: ["0": "literal"]} run/0: ingredient 0 is 0 mem/0: location 1280 is 1030 mem/0: storing 0 in location 1030 run/0: instruction read/18 +run/0: reply {name: "result", value: 6, type: 1, properties: ["result": "location"]}, {name: "chan", value: 1, type: 2-10, properties: ["chan": "address":"channel", "same-as-ingredient": "0"]} mem/0: location 1282 is 34 mem/0: location 1277 is 1030 run/0: result 0 is 34 run/0: result 1 is 1030 mem/0: storing 1030 in location 1 run/0: instruction test-channel-wrap/8 +run/0: {name: "5", value: 5, type: 1, properties: ["5": "integer"]} <- get {name: "1", value: 1, type: 2-10, properties: ["1": "address":"channel", "deref": ]}, {name: "first-full", value: 0, type: 0, properties: ["first-full": "offset"]} run/0: ingredient 0 is 1 mem/0: location 1 is 1030 run/0: ingredient 1 is first-full diff --git a/cpp/.traces/channel-write-full b/cpp/.traces/channel-write-full index 857b4756..fe81114d 100644 --- a/cpp/.traces/channel-write-full +++ b/cpp/.traces/channel-write-full @@ -19,13 +19,17 @@ after-brace/0: channel-full? ... new/0: routine allocated memory from 1000 to 101000 schedule/0: test-channel-write-full run/0: instruction test-channel-write-full/0 +run/0: {name: "1", value: 1, type: 2-10, properties: ["1": "address":"channel"]} <- init-channel {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 {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 {name: "channel", value: 10, type: 0, properties: ["channel": "type"]} mem/0: new alloc: 1030 mem/0: storing 1030 in location 1002 run/0: instruction init-channel/2 +run/0: {name: "full", value: 2, type: 2-1, properties: ["full": "address":"integer"]} <- get-address {name: "result", value: 1, type: 2-10, properties: ["result": "address":"channel", "deref": ]}, {name: "first-full", value: 0, type: 0, properties: ["first-full": "offset"]} run/0: ingredient 0 is result mem/0: location 1002 is 1030 run/0: ingredient 1 is first-full @@ -33,10 +37,12 @@ run/0: address to copy is 1030 run/0: product 0 is 1030 mem/0: storing 1030 in location 1003 run/0: instruction init-channel/3 +run/0: {name: "full", value: 2, type: 2-1, properties: ["full": "address":"integer", "deref": ]} <- copy {name: "0", value: 0, type: 0, properties: ["0": "literal"]} run/0: ingredient 0 is 0 mem/0: location 1003 is 1030 mem/0: storing 0 in location 1030 run/0: instruction init-channel/4 +run/0: {name: "free", value: 3, type: 2-1, properties: ["free": "address":"integer"]} <- get-address {name: "result", value: 1, type: 2-10, properties: ["result": "address":"channel", "deref": ]}, {name: "first-free", value: 1, type: 0, properties: ["first-free": "offset"]} run/0: ingredient 0 is result mem/0: location 1002 is 1030 run/0: ingredient 1 is first-free @@ -44,19 +50,23 @@ run/0: address to copy is 1031 run/0: product 0 is 1031 mem/0: storing 1031 in location 1004 run/0: instruction init-channel/5 +run/0: {name: "free", value: 3, type: 2-1, properties: ["free": "address":"integer", "deref": ]} <- copy {name: "0", value: 0, type: 0, properties: ["0": "literal"]} run/0: ingredient 0 is 0 mem/0: location 1004 is 1031 mem/0: storing 0 in location 1031 run/0: instruction init-channel/6 +run/0: {name: "capacity", value: 4, type: 1, properties: ["capacity": "integer"]} <- next-ingredient run/0: product 0 is 1 mem/0: storing 1 in location 1005 run/0: instruction init-channel/7 +run/0: {name: "capacity", value: 4, type: 1, properties: ["capacity": "integer"]} <- add {name: "capacity", value: 4, type: 1, properties: ["capacity": "integer"]}, {name: "1", value: 1, type: 0, properties: ["1": "literal"]} run/0: ingredient 0 is capacity mem/0: location 1005 is 1 run/0: ingredient 1 is 1 run/0: product 0 is 2 mem/0: storing 2 in location 1005 run/0: instruction init-channel/8 +run/0: {name: "dest", value: 5, type: 2-2-5-1, properties: ["dest": "address":"address":"array":"location"]} <- get-address {name: "result", value: 1, type: 2-10, properties: ["result": "address":"channel", "deref": ]}, {name: "data", value: 2, type: 0, properties: ["data": "offset"]} run/0: ingredient 0 is result mem/0: location 1002 is 1030 run/0: ingredient 1 is data @@ -64,35 +74,45 @@ run/0: address to copy is 1032 run/0: product 0 is 1032 mem/0: storing 1032 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 {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: 1033 mem/0: location 1006 is 1032 mem/0: storing 1033 in location 1032 run/0: instruction init-channel/10 +run/0: reply {name: "result", value: 1, type: 2-10, properties: ["result": "address":"channel"]} mem/0: location 1002 is 1030 run/0: result 0 is 1030 mem/0: storing 1030 in location 1 run/0: instruction test-channel-write-full/1 +run/0: {name: "1", value: 1, type: 2-10, properties: ["1": "address":"channel"]} <- write {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 1030 run/0: instruction write/0 +run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new {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 write/1 +run/0: {name: "chan", value: 1, type: 2-10, properties: ["chan": "address":"channel"]} <- next-ingredient run/0: product 0 is 1030 mem/0: storing 1030 in location 1037 run/0: instruction write/2 +run/0: {name: "val", value: 2, type: 1, properties: ["val": "location"]} <- next-ingredient run/0: product 0 is 34 mem/0: storing 34 in location 1038 run/0: instruction write/4 +run/0: {name: "full", value: 3, type: 3, properties: ["full": "boolean"]} <- channel-full? {name: "chan", value: 1, type: 2-10, properties: ["chan": "address":"channel"]} mem/0: location 1037 is 1030 run/0: instruction channel-full?/0 +run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new {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: 1065 run/0: instruction channel-full?/1 +run/0: {name: "chan", value: 1, type: 2-10, properties: ["chan": "address":"channel"]} <- next-ingredient run/0: product 0 is 1030 mem/0: storing 1030 in location 1067 run/0: instruction channel-full?/2 +run/0: {name: "tmp", value: 2, type: 1, properties: ["tmp": "integer"]} <- get {name: "chan", value: 1, type: 2-10, properties: ["chan": "address":"channel", "deref": ]}, {name: "first-free", value: 1, type: 0, properties: ["first-free": "offset"]} run/0: ingredient 0 is chan mem/0: location 1067 is 1030 run/0: ingredient 1 is first-free @@ -102,20 +122,25 @@ mem/0: location 1031 is 0 run/0: product 0 is 0 mem/0: storing 0 in location 1068 run/0: instruction channel-full?/3 +run/0: {name: "tmp", value: 2, type: 1, properties: ["tmp": "integer"]} <- add {name: "tmp", value: 2, type: 1, properties: ["tmp": "integer"]}, {name: "1", value: 1, type: 0, properties: ["1": "literal"]} run/0: ingredient 0 is tmp mem/0: location 1068 is 0 run/0: ingredient 1 is 1 run/0: product 0 is 1 mem/0: storing 1 in location 1068 run/0: instruction channel-full?/5 +run/0: {name: "len", value: 3, type: 1, properties: ["len": "integer"]} <- channel-capacity {name: "chan", value: 1, type: 2-10, properties: ["chan": "address":"channel"]} mem/0: location 1067 is 1030 run/0: instruction channel-capacity/0 +run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new {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 channel-capacity/1 +run/0: {name: "chan", value: 1, type: 2-10, properties: ["chan": "address":"channel"]} <- next-ingredient run/0: product 0 is 1030 mem/0: storing 1030 in location 1097 run/0: instruction channel-capacity/2 +run/0: {name: "q", value: 2, type: 2-5-1, properties: ["q": "address":"array":"location"]} <- get {name: "chan", value: 1, type: 2-10, properties: ["chan": "address":"channel", "deref": ]}, {name: "data", value: 2, type: 0, properties: ["data": "offset"]} run/0: ingredient 0 is chan mem/0: location 1097 is 1030 run/0: ingredient 1 is data @@ -125,13 +150,16 @@ mem/0: location 1032 is 1033 run/0: product 0 is 1033 mem/0: storing 1033 in location 1098 run/0: instruction channel-capacity/3 +run/0: {name: "result", value: 3, type: 1, properties: ["result": "integer"]} <- length {name: "q", value: 2, type: 2-5-1, properties: ["q": "address":"array":"location", "deref": ]} mem/0: location 1098 is 1033 mem/0: storing 2 in location 1099 run/0: instruction channel-capacity/4 +run/0: reply {name: "result", value: 3, type: 1, properties: ["result": "integer"]} mem/0: location 1099 is 2 run/0: result 0 is 2 mem/0: storing 2 in location 1069 run/0: instruction channel-full?/6 +run/0: {name: "at-end?", value: 4, type: 3, properties: ["at-end?": "boolean"]} <- greater-or-equal {name: "tmp", value: 2, type: 1, properties: ["tmp": "integer"]}, {name: "len", value: 3, type: 1, properties: ["len": "integer"]} run/0: ingredient 0 is tmp mem/0: location 1068 is 1 run/0: ingredient 1 is len @@ -139,11 +167,13 @@ mem/0: location 1069 is 2 run/0: product 0 is 0 mem/0: storing 0 in location 1070 run/0: instruction channel-full?/7 +run/0: break-unless {name: "at-end?", value: 4, type: 3, properties: ["at-end?": "boolean"]}, {name: "", value: 1, type: , properties: ["": ]} mem/0: location 1070 is 0 run/0: ingredient 0 is 0 run/0: ingredient 1 is run/0: jumping to instruction 9 run/0: instruction channel-full?/10 +run/0: {name: "full", value: 5, type: 1, properties: ["full": "integer"]} <- get {name: "chan", value: 1, type: 2-10, properties: ["chan": "address":"channel", "deref": ]}, {name: "first-full", value: 0, type: 0, properties: ["first-full": "offset"]} run/0: ingredient 0 is chan mem/0: location 1067 is 1030 run/0: ingredient 1 is first-full @@ -153,6 +183,7 @@ mem/0: location 1030 is 0 run/0: product 0 is 0 mem/0: storing 0 in location 1071 run/0: instruction channel-full?/11 +run/0: {name: "result", value: 6, type: 3, properties: ["result": "boolean"]} <- equal {name: "full", value: 5, type: 1, properties: ["full": "integer"]}, {name: "tmp", value: 2, type: 1, properties: ["tmp": "integer"]} run/0: ingredient 0 is full mem/0: location 1071 is 0 run/0: ingredient 1 is tmp @@ -160,15 +191,18 @@ mem/0: location 1068 is 1 run/0: product 0 is 0 mem/0: storing 0 in location 1072 run/0: instruction channel-full?/12 +run/0: reply {name: "result", value: 6, type: 3, properties: ["result": "boolean"]} mem/0: location 1072 is 0 run/0: result 0 is 0 mem/0: storing 0 in location 1039 run/0: instruction write/5 +run/0: break-unless {name: "full", value: 3, type: 3, properties: ["full": "boolean"]}, {name: "", value: 2, type: , properties: ["": ]} mem/0: location 1039 is 0 run/0: ingredient 0 is 0 run/0: ingredient 1 is run/0: jumping to instruction 8 run/0: instruction write/9 +run/0: {name: "circular-buffer", value: 5, type: 2-5-1, properties: ["circular-buffer": "address":"array":"location"]} <- get {name: "chan", value: 1, type: 2-10, properties: ["chan": "address":"channel", "deref": ]}, {name: "data", value: 2, type: 0, properties: ["data": "offset"]} run/0: ingredient 0 is chan mem/0: location 1037 is 1030 run/0: ingredient 1 is data @@ -178,6 +212,7 @@ mem/0: location 1032 is 1033 run/0: product 0 is 1033 mem/0: storing 1033 in location 1041 run/0: instruction write/10 +run/0: {name: "free", value: 6, type: 2-1, properties: ["free": "address":"integer"]} <- get-address {name: "chan", value: 1, type: 2-10, properties: ["chan": "address":"channel", "deref": ]}, {name: "first-free", value: 1, type: 0, properties: ["first-free": "offset"]} run/0: ingredient 0 is chan mem/0: location 1037 is 1030 run/0: ingredient 1 is first-free @@ -185,6 +220,7 @@ run/0: address to copy is 1031 run/0: product 0 is 1031 mem/0: storing 1031 in location 1042 run/0: instruction write/11 +run/0: {name: "dest", value: 7, type: 2-1, properties: ["dest": "address":"location"]} <- index-address {name: "circular-buffer", value: 5, type: 2-5-1, properties: ["circular-buffer": "address":"array":"location", "deref": ]}, {name: "free", value: 6, type: 2-1, properties: ["free": "address":"integer", "deref": ]} run/0: ingredient 0 is circular-buffer mem/0: location 1041 is 1033 run/0: ingredient 1 is {name: "free", value: 6, type: 2-1, properties: ["free": "address":"integer", "deref": ]} @@ -194,11 +230,13 @@ run/0: address to copy is 1034 run/0: product 0 is 1034 mem/0: storing 1034 in location 1043 run/0: instruction write/12 +run/0: {name: "dest", value: 7, type: 2-1, properties: ["dest": "address":"location", "deref": ]} <- copy {name: "val", value: 2, type: 1, properties: ["val": "location"]} run/0: ingredient 0 is val mem/0: location 1038 is 34 mem/0: location 1043 is 1034 mem/0: storing 34 in location 1034 run/0: instruction write/13 +run/0: {name: "free", value: 6, type: 2-1, properties: ["free": "address":"integer", "deref": ]} <- add {name: "free", value: 6, type: 2-1, properties: ["free": "address":"integer", "deref": ]}, {name: "1", value: 1, type: 0, properties: ["1": "literal"]} run/0: ingredient 0 is free mem/0: location 1042 is 1031 mem/0: location 1031 is 0 @@ -207,9 +245,11 @@ run/0: product 0 is 1 mem/0: location 1042 is 1031 mem/0: storing 1 in location 1031 run/0: instruction write/15 +run/0: {name: "len", value: 8, type: 1, properties: ["len": "integer"]} <- length {name: "circular-buffer", value: 5, type: 2-5-1, properties: ["circular-buffer": "address":"array":"location", "deref": ]} mem/0: location 1041 is 1033 mem/0: storing 2 in location 1044 run/0: instruction write/16 +run/0: {name: "at-end?", value: 9, type: 3, properties: ["at-end?": "boolean"]} <- greater-or-equal {name: "free", value: 6, type: 2-1, properties: ["free": "address":"integer", "deref": ]}, {name: "len", value: 8, type: 1, properties: ["len": "integer"]} run/0: ingredient 0 is free mem/0: location 1042 is 1031 mem/0: location 1031 is 1 @@ -218,23 +258,29 @@ mem/0: location 1044 is 2 run/0: product 0 is 0 mem/0: storing 0 in location 1045 run/0: instruction write/17 +run/0: break-unless {name: "at-end?", value: 9, type: 3, properties: ["at-end?": "boolean"]}, {name: "", value: 1, type: , properties: ["": ]} mem/0: location 1045 is 0 run/0: ingredient 0 is 0 run/0: ingredient 1 is run/0: jumping to instruction 19 run/0: instruction write/20 +run/0: reply {name: "chan", value: 1, type: 2-10, properties: ["chan": "address":"channel", "same-as-ingredient": "0"]} mem/0: location 1037 is 1030 run/0: result 0 is 1030 mem/0: storing 1030 in location 1 run/0: instruction test-channel-write-full/2 +run/0: {name: "2", value: 2, type: 1, properties: ["2": "integer"]} <- channel-empty? {name: "1", value: 1, type: 2-10, properties: ["1": "address":"channel"]} mem/0: location 1 is 1030 run/0: instruction channel-empty?/0 +run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new {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: 1125 run/0: instruction channel-empty?/1 +run/0: {name: "chan", value: 1, type: 2-10, properties: ["chan": "address":"channel"]} <- next-ingredient run/0: product 0 is 1030 mem/0: storing 1030 in location 1127 run/0: instruction channel-empty?/2 +run/0: {name: "full", value: 2, type: 1, properties: ["full": "integer"]} <- get {name: "chan", value: 1, type: 2-10, properties: ["chan": "address":"channel", "deref": ]}, {name: "first-full", value: 0, type: 0, properties: ["first-full": "offset"]} run/0: ingredient 0 is chan mem/0: location 1127 is 1030 run/0: ingredient 1 is first-full @@ -244,6 +290,7 @@ mem/0: location 1030 is 0 run/0: product 0 is 0 mem/0: storing 0 in location 1128 run/0: instruction channel-empty?/3 +run/0: {name: "free", value: 3, type: 1, properties: ["free": "integer"]} <- get {name: "chan", value: 1, type: 2-10, properties: ["chan": "address":"channel", "deref": ]}, {name: "first-free", value: 1, type: 0, properties: ["first-free": "offset"]} run/0: ingredient 0 is chan mem/0: location 1127 is 1030 run/0: ingredient 1 is first-free @@ -253,6 +300,7 @@ mem/0: location 1031 is 1 run/0: product 0 is 1 mem/0: storing 1 in location 1129 run/0: instruction channel-empty?/4 +run/0: {name: "result", value: 4, type: 3, properties: ["result": "boolean"]} <- equal {name: "full", value: 2, type: 1, properties: ["full": "integer"]}, {name: "free", value: 3, type: 1, properties: ["free": "integer"]} run/0: ingredient 0 is full mem/0: location 1128 is 0 run/0: ingredient 1 is free @@ -260,18 +308,23 @@ mem/0: location 1129 is 1 run/0: product 0 is 0 mem/0: storing 0 in location 1130 run/0: instruction channel-empty?/5 +run/0: reply {name: "result", value: 4, type: 3, properties: ["result": "boolean"]} mem/0: location 1130 is 0 run/0: result 0 is 0 mem/0: storing 0 in location 2 run/0: instruction test-channel-write-full/3 +run/0: {name: "3", value: 3, type: 1, properties: ["3": "integer"]} <- channel-full? {name: "1", value: 1, type: 2-10, properties: ["1": "address":"channel"]} mem/0: location 1 is 1030 run/0: instruction channel-full?/0 +run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new {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: 1155 run/0: instruction channel-full?/1 +run/0: {name: "chan", value: 1, type: 2-10, properties: ["chan": "address":"channel"]} <- next-ingredient run/0: product 0 is 1030 mem/0: storing 1030 in location 1157 run/0: instruction channel-full?/2 +run/0: {name: "tmp", value: 2, type: 1, properties: ["tmp": "integer"]} <- get {name: "chan", value: 1, type: 2-10, properties: ["chan": "address":"channel", "deref": ]}, {name: "first-free", value: 1, type: 0, properties: ["first-free": "offset"]} run/0: ingredient 0 is chan mem/0: location 1157 is 1030 run/0: ingredient 1 is first-free @@ -281,20 +334,25 @@ mem/0: location 1031 is 1 run/0: product 0 is 1 mem/0: storing 1 in location 1158 run/0: instruction channel-full?/3 +run/0: {name: "tmp", value: 2, type: 1, properties: ["tmp": "integer"]} <- add {name: "tmp", value: 2, type: 1, properties: ["tmp": "integer"]}, {name: "1", value: 1, type: 0, properties: ["1": "literal"]} run/0: ingredient 0 is tmp mem/0: location 1158 is 1 run/0: ingredient 1 is 1 run/0: product 0 is 2 mem/0: storing 2 in location 1158 run/0: instruction channel-full?/5 +run/0: {name: "len", value: 3, type: 1, properties: ["len": "integer"]} <- channel-capacity {name: "chan", value: 1, type: 2-10, properties: ["chan": "address":"channel"]} mem/0: location 1157 is 1030 run/0: instruction channel-capacity/0 +run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new {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: 1185 run/0: instruction channel-capacity/1 +run/0: {name: "chan", value: 1, type: 2-10, properties: ["chan": "address":"channel"]} <- next-ingredient run/0: product 0 is 1030 mem/0: storing 1030 in location 1187 run/0: instruction channel-capacity/2 +run/0: {name: "q", value: 2, type: 2-5-1, properties: ["q": "address":"array":"location"]} <- get {name: "chan", value: 1, type: 2-10, properties: ["chan": "address":"channel", "deref": ]}, {name: "data", value: 2, type: 0, properties: ["data": "offset"]} run/0: ingredient 0 is chan mem/0: location 1187 is 1030 run/0: ingredient 1 is data @@ -304,13 +362,16 @@ mem/0: location 1032 is 1033 run/0: product 0 is 1033 mem/0: storing 1033 in location 1188 run/0: instruction channel-capacity/3 +run/0: {name: "result", value: 3, type: 1, properties: ["result": "integer"]} <- length {name: "q", value: 2, type: 2-5-1, properties: ["q": "address":"array":"location", "deref": ]} mem/0: location 1188 is 1033 mem/0: storing 2 in location 1189 run/0: instruction channel-capacity/4 +run/0: reply {name: "result", value: 3, type: 1, properties: ["result": "integer"]} mem/0: location 1189 is 2 run/0: result 0 is 2 mem/0: storing 2 in location 1159 run/0: instruction channel-full?/6 +run/0: {name: "at-end?", value: 4, type: 3, properties: ["at-end?": "boolean"]} <- greater-or-equal {name: "tmp", value: 2, type: 1, properties: ["tmp": "integer"]}, {name: "len", value: 3, type: 1, properties: ["len": "integer"]} run/0: ingredient 0 is tmp mem/0: location 1158 is 2 run/0: ingredient 1 is len @@ -318,13 +379,16 @@ mem/0: location 1159 is 2 run/0: product 0 is 1 mem/0: storing 1 in location 1160 run/0: instruction channel-full?/7 +run/0: break-unless {name: "at-end?", value: 4, type: 3, properties: ["at-end?": "boolean"]}, {name: "", value: 1, type: , properties: ["": ]} mem/0: location 1160 is 1 run/0: ingredient 0 is 1 run/0: jump-unless fell through run/0: instruction channel-full?/8 +run/0: {name: "tmp", value: 2, type: 1, properties: ["tmp": "integer"]} <- copy {name: "0", value: 0, type: 0, properties: ["0": "literal"]} run/0: ingredient 0 is 0 mem/0: storing 0 in location 1158 run/0: instruction channel-full?/10 +run/0: {name: "full", value: 5, type: 1, properties: ["full": "integer"]} <- get {name: "chan", value: 1, type: 2-10, properties: ["chan": "address":"channel", "deref": ]}, {name: "first-full", value: 0, type: 0, properties: ["first-full": "offset"]} run/0: ingredient 0 is chan mem/0: location 1157 is 1030 run/0: ingredient 1 is first-full @@ -334,6 +398,7 @@ mem/0: location 1030 is 0 run/0: product 0 is 0 mem/0: storing 0 in location 1161 run/0: instruction channel-full?/11 +run/0: {name: "result", value: 6, type: 3, properties: ["result": "boolean"]} <- equal {name: "full", value: 5, type: 1, properties: ["full": "integer"]}, {name: "tmp", value: 2, type: 1, properties: ["tmp": "integer"]} run/0: ingredient 0 is full mem/0: location 1161 is 0 run/0: ingredient 1 is tmp @@ -341,6 +406,7 @@ mem/0: location 1158 is 0 run/0: product 0 is 1 mem/0: storing 1 in location 1162 run/0: instruction channel-full?/12 +run/0: reply {name: "result", value: 6, type: 3, properties: ["result": "boolean"]} mem/0: location 1162 is 1 run/0: result 0 is 1 mem/0: storing 1 in location 3 diff --git a/cpp/.traces/channel-write-increments-free b/cpp/.traces/channel-write-increments-free index 753221a1..f060c64c 100644 --- a/cpp/.traces/channel-write-increments-free +++ b/cpp/.traces/channel-write-increments-free @@ -23,13 +23,17 @@ after-brace/0: get ... new/0: routine allocated memory from 1000 to 101000 schedule/0: test-channel-write-increments-free run/0: instruction test-channel-write-increments-free/0 +run/0: {name: "1", value: 1, type: 2-10, properties: ["1": "address":"channel"]} <- init-channel {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 {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 {name: "channel", value: 10, type: 0, properties: ["channel": "type"]} mem/0: new alloc: 1030 mem/0: storing 1030 in location 1002 run/0: instruction init-channel/2 +run/0: {name: "full", value: 2, type: 2-1, properties: ["full": "address":"integer"]} <- get-address {name: "result", value: 1, type: 2-10, properties: ["result": "address":"channel", "deref": ]}, {name: "first-full", value: 0, type: 0, properties: ["first-full": "offset"]} run/0: ingredient 0 is result mem/0: location 1002 is 1030 run/0: ingredient 1 is first-full @@ -37,10 +41,12 @@ run/0: address to copy is 1030 run/0: product 0 is 1030 mem/0: storing 1030 in location 1003 run/0: instruction init-channel/3 +run/0: {name: "full", value: 2, type: 2-1, properties: ["full": "address":"integer", "deref": ]} <- copy {name: "0", value: 0, type: 0, properties: ["0": "literal"]} run/0: ingredient 0 is 0 mem/0: location 1003 is 1030 mem/0: storing 0 in location 1030 run/0: instruction init-channel/4 +run/0: {name: "free", value: 3, type: 2-1, properties: ["free": "address":"integer"]} <- get-address {name: "result", value: 1, type: 2-10, properties: ["result": "address":"channel", "deref": ]}, {name: "first-free", value: 1, type: 0, properties: ["first-free": "offset"]} run/0: ingredient 0 is result mem/0: location 1002 is 1030 run/0: ingredient 1 is first-free @@ -48,19 +54,23 @@ run/0: address to copy is 1031 run/0: product 0 is 1031 mem/0: storing 1031 in location 1004 run/0: instruction init-channel/5 +run/0: {name: "free", value: 3, type: 2-1, properties: ["free": "address":"integer", "deref": ]} <- copy {name: "0", value: 0, type: 0, properties: ["0": "literal"]} run/0: ingredient 0 is 0 mem/0: location 1004 is 1031 mem/0: storing 0 in location 1031 run/0: instruction init-channel/6 +run/0: {name: "capacity", value: 4, type: 1, properties: ["capacity": "integer"]} <- next-ingredient run/0: product 0 is 3 mem/0: storing 3 in location 1005 run/0: instruction init-channel/7 +run/0: {name: "capacity", value: 4, type: 1, properties: ["capacity": "integer"]} <- add {name: "capacity", value: 4, type: 1, properties: ["capacity": "integer"]}, {name: "1", value: 1, type: 0, properties: ["1": "literal"]} run/0: ingredient 0 is capacity mem/0: location 1005 is 3 run/0: ingredient 1 is 1 run/0: product 0 is 4 mem/0: storing 4 in location 1005 run/0: instruction init-channel/8 +run/0: {name: "dest", value: 5, type: 2-2-5-1, properties: ["dest": "address":"address":"array":"location"]} <- get-address {name: "result", value: 1, type: 2-10, properties: ["result": "address":"channel", "deref": ]}, {name: "data", value: 2, type: 0, properties: ["data": "offset"]} run/0: ingredient 0 is result mem/0: location 1002 is 1030 run/0: ingredient 1 is data @@ -68,35 +78,45 @@ run/0: address to copy is 1032 run/0: product 0 is 1032 mem/0: storing 1032 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 {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: 1033 mem/0: location 1006 is 1032 mem/0: storing 1033 in location 1032 run/0: instruction init-channel/10 +run/0: reply {name: "result", value: 1, type: 2-10, properties: ["result": "address":"channel"]} mem/0: location 1002 is 1030 run/0: result 0 is 1030 mem/0: storing 1030 in location 1 run/0: instruction test-channel-write-increments-free/1 +run/0: {name: "1", value: 1, type: 2-10, properties: ["1": "address":"channel"]} <- write {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 1030 run/0: instruction write/0 +run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new {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 +run/0: {name: "chan", value: 1, type: 2-10, properties: ["chan": "address":"channel"]} <- next-ingredient run/0: product 0 is 1030 mem/0: storing 1030 in location 1039 run/0: instruction write/2 +run/0: {name: "val", value: 2, type: 1, properties: ["val": "location"]} <- next-ingredient run/0: product 0 is 34 mem/0: storing 34 in location 1040 run/0: instruction write/4 +run/0: {name: "full", value: 3, type: 3, properties: ["full": "boolean"]} <- channel-full? {name: "chan", value: 1, type: 2-10, properties: ["chan": "address":"channel"]} mem/0: location 1039 is 1030 run/0: instruction channel-full?/0 +run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new {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: 1067 run/0: instruction channel-full?/1 +run/0: {name: "chan", value: 1, type: 2-10, properties: ["chan": "address":"channel"]} <- next-ingredient run/0: product 0 is 1030 mem/0: storing 1030 in location 1069 run/0: instruction channel-full?/2 +run/0: {name: "tmp", value: 2, type: 1, properties: ["tmp": "integer"]} <- get {name: "chan", value: 1, type: 2-10, properties: ["chan": "address":"channel", "deref": ]}, {name: "first-free", value: 1, type: 0, properties: ["first-free": "offset"]} run/0: ingredient 0 is chan mem/0: location 1069 is 1030 run/0: ingredient 1 is first-free @@ -106,20 +126,25 @@ mem/0: location 1031 is 0 run/0: product 0 is 0 mem/0: storing 0 in location 1070 run/0: instruction channel-full?/3 +run/0: {name: "tmp", value: 2, type: 1, properties: ["tmp": "integer"]} <- add {name: "tmp", value: 2, type: 1, properties: ["tmp": "integer"]}, {name: "1", value: 1, type: 0, properties: ["1": "literal"]} run/0: ingredient 0 is tmp mem/0: location 1070 is 0 run/0: ingredient 1 is 1 run/0: product 0 is 1 mem/0: storing 1 in location 1070 run/0: instruction channel-full?/5 +run/0: {name: "len", value: 3, type: 1, properties: ["len": "integer"]} <- channel-capacity {name: "chan", value: 1, type: 2-10, properties: ["chan": "address":"channel"]} mem/0: location 1069 is 1030 run/0: instruction channel-capacity/0 +run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new {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: 1097 run/0: instruction channel-capacity/1 +run/0: {name: "chan", value: 1, type: 2-10, properties: ["chan": "address":"channel"]} <- next-ingredient run/0: product 0 is 1030 mem/0: storing 1030 in location 1099 run/0: instruction channel-capacity/2 +run/0: {name: "q", value: 2, type: 2-5-1, properties: ["q": "address":"array":"location"]} <- get {name: "chan", value: 1, type: 2-10, properties: ["chan": "address":"channel", "deref": ]}, {name: "data", value: 2, type: 0, properties: ["data": "offset"]} run/0: ingredient 0 is chan mem/0: location 1099 is 1030 run/0: ingredient 1 is data @@ -129,13 +154,16 @@ mem/0: location 1032 is 1033 run/0: product 0 is 1033 mem/0: storing 1033 in location 1100 run/0: instruction channel-capacity/3 +run/0: {name: "result", value: 3, type: 1, properties: ["result": "integer"]} <- length {name: "q", value: 2, type: 2-5-1, properties: ["q": "address":"array":"location", "deref": ]} mem/0: location 1100 is 1033 mem/0: storing 4 in location 1101 run/0: instruction channel-capacity/4 +run/0: reply {name: "result", value: 3, type: 1, properties: ["result": "integer"]} mem/0: location 1101 is 4 run/0: result 0 is 4 mem/0: storing 4 in location 1071 run/0: instruction channel-full?/6 +run/0: {name: "at-end?", value: 4, type: 3, properties: ["at-end?": "boolean"]} <- greater-or-equal {name: "tmp", value: 2, type: 1, properties: ["tmp": "integer"]}, {name: "len", value: 3, type: 1, properties: ["len": "integer"]} run/0: ingredient 0 is tmp mem/0: location 1070 is 1 run/0: ingredient 1 is len @@ -143,11 +171,13 @@ mem/0: location 1071 is 4 run/0: product 0 is 0 mem/0: storing 0 in location 1072 run/0: instruction channel-full?/7 +run/0: break-unless {name: "at-end?", value: 4, type: 3, properties: ["at-end?": "boolean"]}, {name: "", value: 1, type: , properties: ["": ]} mem/0: location 1072 is 0 run/0: ingredient 0 is 0 run/0: ingredient 1 is run/0: jumping to instruction 9 run/0: instruction channel-full?/10 +run/0: {name: "full", value: 5, type: 1, properties: ["full": "integer"]} <- get {name: "chan", value: 1, type: 2-10, properties: ["chan": "address":"channel", "deref": ]}, {name: "first-full", value: 0, type: 0, properties: ["first-full": "offset"]} run/0: ingredient 0 is chan mem/0: location 1069 is 1030 run/0: ingredient 1 is first-full @@ -157,6 +187,7 @@ mem/0: location 1030 is 0 run/0: product 0 is 0 mem/0: storing 0 in location 1073 run/0: instruction channel-full?/11 +run/0: {name: "result", value: 6, type: 3, properties: ["result": "boolean"]} <- equal {name: "full", value: 5, type: 1, properties: ["full": "integer"]}, {name: "tmp", value: 2, type: 1, properties: ["tmp": "integer"]} run/0: ingredient 0 is full mem/0: location 1073 is 0 run/0: ingredient 1 is tmp @@ -164,15 +195,18 @@ mem/0: location 1070 is 1 run/0: product 0 is 0 mem/0: storing 0 in location 1074 run/0: instruction channel-full?/12 +run/0: reply {name: "result", value: 6, type: 3, properties: ["result": "boolean"]} mem/0: location 1074 is 0 run/0: result 0 is 0 mem/0: storing 0 in location 1041 run/0: instruction write/5 +run/0: break-unless {name: "full", value: 3, type: 3, properties: ["full": "boolean"]}, {name: "", value: 2, type: , properties: ["": ]} mem/0: location 1041 is 0 run/0: ingredient 0 is 0 run/0: ingredient 1 is run/0: jumping to instruction 8 run/0: instruction write/9 +run/0: {name: "circular-buffer", value: 5, type: 2-5-1, properties: ["circular-buffer": "address":"array":"location"]} <- get {name: "chan", value: 1, type: 2-10, properties: ["chan": "address":"channel", "deref": ]}, {name: "data", value: 2, type: 0, properties: ["data": "offset"]} run/0: ingredient 0 is chan mem/0: location 1039 is 1030 run/0: ingredient 1 is data @@ -182,6 +216,7 @@ mem/0: location 1032 is 1033 run/0: product 0 is 1033 mem/0: storing 1033 in location 1043 run/0: instruction write/10 +run/0: {name: "free", value: 6, type: 2-1, properties: ["free": "address":"integer"]} <- get-address {name: "chan", value: 1, type: 2-10, properties: ["chan": "address":"channel", "deref": ]}, {name: "first-free", value: 1, type: 0, properties: ["first-free": "offset"]} run/0: ingredient 0 is chan mem/0: location 1039 is 1030 run/0: ingredient 1 is first-free @@ -189,6 +224,7 @@ run/0: address to copy is 1031 run/0: product 0 is 1031 mem/0: storing 1031 in location 1044 run/0: instruction write/11 +run/0: {name: "dest", value: 7, type: 2-1, properties: ["dest": "address":"location"]} <- index-address {name: "circular-buffer", value: 5, type: 2-5-1, properties: ["circular-buffer": "address":"array":"location", "deref": ]}, {name: "free", value: 6, type: 2-1, properties: ["free": "address":"integer", "deref": ]} run/0: ingredient 0 is circular-buffer mem/0: location 1043 is 1033 run/0: ingredient 1 is {name: "free", value: 6, type: 2-1, properties: ["free": "address":"integer", "deref": ]} @@ -198,11 +234,13 @@ run/0: address to copy is 1034 run/0: product 0 is 1034 mem/0: storing 1034 in location 1045 run/0: instruction write/12 +run/0: {name: "dest", value: 7, type: 2-1, properties: ["dest": "address":"location", "deref": ]} <- copy {name: "val", value: 2, type: 1, properties: ["val": "location"]} run/0: ingredient 0 is val mem/0: location 1040 is 34 mem/0: location 1045 is 1034 mem/0: storing 34 in location 1034 run/0: instruction write/13 +run/0: {name: "free", value: 6, type: 2-1, properties: ["free": "address":"integer", "deref": ]} <- add {name: "free", value: 6, type: 2-1, properties: ["free": "address":"integer", "deref": ]}, {name: "1", value: 1, type: 0, properties: ["1": "literal"]} run/0: ingredient 0 is free mem/0: location 1044 is 1031 mem/0: location 1031 is 0 @@ -211,9 +249,11 @@ run/0: product 0 is 1 mem/0: location 1044 is 1031 mem/0: storing 1 in location 1031 run/0: instruction write/15 +run/0: {name: "len", value: 8, type: 1, properties: ["len": "integer"]} <- length {name: "circular-buffer", value: 5, type: 2-5-1, properties: ["circular-buffer": "address":"array":"location", "deref": ]} mem/0: location 1043 is 1033 mem/0: storing 4 in location 1046 run/0: instruction write/16 +run/0: {name: "at-end?", value: 9, type: 3, properties: ["at-end?": "boolean"]} <- greater-or-equal {name: "free", value: 6, type: 2-1, properties: ["free": "address":"integer", "deref": ]}, {name: "len", value: 8, type: 1, properties: ["len": "integer"]} run/0: ingredient 0 is free mem/0: location 1044 is 1031 mem/0: location 1031 is 1 @@ -222,15 +262,18 @@ mem/0: location 1046 is 4 run/0: product 0 is 0 mem/0: storing 0 in location 1047 run/0: instruction write/17 +run/0: break-unless {name: "at-end?", value: 9, type: 3, properties: ["at-end?": "boolean"]}, {name: "", value: 1, type: , properties: ["": ]} mem/0: location 1047 is 0 run/0: ingredient 0 is 0 run/0: ingredient 1 is run/0: jumping to instruction 19 run/0: instruction write/20 +run/0: reply {name: "chan", value: 1, type: 2-10, properties: ["chan": "address":"channel", "same-as-ingredient": "0"]} mem/0: location 1039 is 1030 run/0: result 0 is 1030 mem/0: storing 1030 in location 1 run/0: instruction test-channel-write-increments-free/2 +run/0: {name: "2", value: 2, type: 1, properties: ["2": "integer"]} <- get {name: "1", value: 1, type: 2-10, properties: ["1": "address":"channel", "deref": ]}, {name: "first-full", value: 0, type: 0, properties: ["first-full": "offset"]} run/0: ingredient 0 is 1 mem/0: location 1 is 1030 run/0: ingredient 1 is first-full @@ -240,6 +283,7 @@ mem/0: location 1030 is 0 run/0: product 0 is 0 mem/0: storing 0 in location 2 run/0: instruction test-channel-write-increments-free/3 +run/0: {name: "3", value: 3, type: 1, properties: ["3": "integer"]} <- get {name: "1", value: 1, type: 2-10, properties: ["1": "address":"channel", "deref": ]}, {name: "first-free", value: 1, type: 0, properties: ["first-free": "offset"]} run/0: ingredient 0 is 1 mem/0: location 1 is 1030 run/0: ingredient 1 is first-free diff --git a/cpp/.traces/channel-write-not-empty b/cpp/.traces/channel-write-not-empty index 42d19d26..45a4a267 100644 --- a/cpp/.traces/channel-write-not-empty +++ b/cpp/.traces/channel-write-not-empty @@ -19,13 +19,17 @@ after-brace/0: channel-full? ... new/0: routine allocated memory from 1000 to 101000 schedule/0: test-channel-write-not-empty run/0: instruction test-channel-write-not-empty/0 +run/0: {name: "1", value: 1, type: 2-10, properties: ["1": "address":"channel"]} <- init-channel {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 {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 {name: "channel", value: 10, type: 0, properties: ["channel": "type"]} mem/0: new alloc: 1030 mem/0: storing 1030 in location 1002 run/0: instruction init-channel/2 +run/0: {name: "full", value: 2, type: 2-1, properties: ["full": "address":"integer"]} <- get-address {name: "result", value: 1, type: 2-10, properties: ["result": "address":"channel", "deref": ]}, {name: "first-full", value: 0, type: 0, properties: ["first-full": "offset"]} run/0: ingredient 0 is result mem/0: location 1002 is 1030 run/0: ingredient 1 is first-full @@ -33,10 +37,12 @@ run/0: address to copy is 1030 run/0: product 0 is 1030 mem/0: storing 1030 in location 1003 run/0: instruction init-channel/3 +run/0: {name: "full", value: 2, type: 2-1, properties: ["full": "address":"integer", "deref": ]} <- copy {name: "0", value: 0, type: 0, properties: ["0": "literal"]} run/0: ingredient 0 is 0 mem/0: location 1003 is 1030 mem/0: storing 0 in location 1030 run/0: instruction init-channel/4 +run/0: {name: "free", value: 3, type: 2-1, properties: ["free": "address":"integer"]} <- get-address {name: "result", value: 1, type: 2-10, properties: ["result": "address":"channel", "deref": ]}, {name: "first-free", value: 1, type: 0, properties: ["first-free": "offset"]} run/0: ingredient 0 is result mem/0: location 1002 is 1030 run/0: ingredient 1 is first-free @@ -44,19 +50,23 @@ run/0: address to copy is 1031 run/0: product 0 is 1031 mem/0: storing 1031 in location 1004 run/0: instruction init-channel/5 +run/0: {name: "free", value: 3, type: 2-1, properties: ["free": "address":"integer", "deref": ]} <- copy {name: "0", value: 0, type: 0, properties: ["0": "literal"]} run/0: ingredient 0 is 0 mem/0: location 1004 is 1031 mem/0: storing 0 in location 1031 run/0: instruction init-channel/6 +run/0: {name: "capacity", value: 4, type: 1, properties: ["capacity": "integer"]} <- next-ingredient run/0: product 0 is 3 mem/0: storing 3 in location 1005 run/0: instruction init-channel/7 +run/0: {name: "capacity", value: 4, type: 1, properties: ["capacity": "integer"]} <- add {name: "capacity", value: 4, type: 1, properties: ["capacity": "integer"]}, {name: "1", value: 1, type: 0, properties: ["1": "literal"]} run/0: ingredient 0 is capacity mem/0: location 1005 is 3 run/0: ingredient 1 is 1 run/0: product 0 is 4 mem/0: storing 4 in location 1005 run/0: instruction init-channel/8 +run/0: {name: "dest", value: 5, type: 2-2-5-1, properties: ["dest": "address":"address":"array":"location"]} <- get-address {name: "result", value: 1, type: 2-10, properties: ["result": "address":"channel", "deref": ]}, {name: "data", value: 2, type: 0, properties: ["data": "offset"]} run/0: ingredient 0 is result mem/0: location 1002 is 1030 run/0: ingredient 1 is data @@ -64,35 +74,45 @@ run/0: address to copy is 1032 run/0: product 0 is 1032 mem/0: storing 1032 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 {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: 1033 mem/0: location 1006 is 1032 mem/0: storing 1033 in location 1032 run/0: instruction init-channel/10 +run/0: reply {name: "result", value: 1, type: 2-10, properties: ["result": "address":"channel"]} mem/0: location 1002 is 1030 run/0: result 0 is 1030 mem/0: storing 1030 in location 1 run/0: instruction test-channel-write-not-empty/1 +run/0: {name: "1", value: 1, type: 2-10, properties: ["1": "address":"channel"]} <- write {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 1030 run/0: instruction write/0 +run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new {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 +run/0: {name: "chan", value: 1, type: 2-10, properties: ["chan": "address":"channel"]} <- next-ingredient run/0: product 0 is 1030 mem/0: storing 1030 in location 1039 run/0: instruction write/2 +run/0: {name: "val", value: 2, type: 1, properties: ["val": "location"]} <- next-ingredient run/0: product 0 is 34 mem/0: storing 34 in location 1040 run/0: instruction write/4 +run/0: {name: "full", value: 3, type: 3, properties: ["full": "boolean"]} <- channel-full? {name: "chan", value: 1, type: 2-10, properties: ["chan": "address":"channel"]} mem/0: location 1039 is 1030 run/0: instruction channel-full?/0 +run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new {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: 1067 run/0: instruction channel-full?/1 +run/0: {name: "chan", value: 1, type: 2-10, properties: ["chan": "address":"channel"]} <- next-ingredient run/0: product 0 is 1030 mem/0: storing 1030 in location 1069 run/0: instruction channel-full?/2 +run/0: {name: "tmp", value: 2, type: 1, properties: ["tmp": "integer"]} <- get {name: "chan", value: 1, type: 2-10, properties: ["chan": "address":"channel", "deref": ]}, {name: "first-free", value: 1, type: 0, properties: ["first-free": "offset"]} run/0: ingredient 0 is chan mem/0: location 1069 is 1030 run/0: ingredient 1 is first-free @@ -102,20 +122,25 @@ mem/0: location 1031 is 0 run/0: product 0 is 0 mem/0: storing 0 in location 1070 run/0: instruction channel-full?/3 +run/0: {name: "tmp", value: 2, type: 1, properties: ["tmp": "integer"]} <- add {name: "tmp", value: 2, type: 1, properties: ["tmp": "integer"]}, {name: "1", value: 1, type: 0, properties: ["1": "literal"]} run/0: ingredient 0 is tmp mem/0: location 1070 is 0 run/0: ingredient 1 is 1 run/0: product 0 is 1 mem/0: storing 1 in location 1070 run/0: instruction channel-full?/5 +run/0: {name: "len", value: 3, type: 1, properties: ["len": "integer"]} <- channel-capacity {name: "chan", value: 1, type: 2-10, properties: ["chan": "address":"channel"]} mem/0: location 1069 is 1030 run/0: instruction channel-capacity/0 +run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new {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: 1097 run/0: instruction channel-capacity/1 +run/0: {name: "chan", value: 1, type: 2-10, properties: ["chan": "address":"channel"]} <- next-ingredient run/0: product 0 is 1030 mem/0: storing 1030 in location 1099 run/0: instruction channel-capacity/2 +run/0: {name: "q", value: 2, type: 2-5-1, properties: ["q": "address":"array":"location"]} <- get {name: "chan", value: 1, type: 2-10, properties: ["chan": "address":"channel", "deref": ]}, {name: "data", value: 2, type: 0, properties: ["data": "offset"]} run/0: ingredient 0 is chan mem/0: location 1099 is 1030 run/0: ingredient 1 is data @@ -125,13 +150,16 @@ mem/0: location 1032 is 1033 run/0: product 0 is 1033 mem/0: storing 1033 in location 1100 run/0: instruction channel-capacity/3 +run/0: {name: "result", value: 3, type: 1, properties: ["result": "integer"]} <- length {name: "q", value: 2, type: 2-5-1, properties: ["q": "address":"array":"location", "deref": ]} mem/0: location 1100 is 1033 mem/0: storing 4 in location 1101 run/0: instruction channel-capacity/4 +run/0: reply {name: "result", value: 3, type: 1, properties: ["result": "integer"]} mem/0: location 1101 is 4 run/0: result 0 is 4 mem/0: storing 4 in location 1071 run/0: instruction channel-full?/6 +run/0: {name: "at-end?", value: 4, type: 3, properties: ["at-end?": "boolean"]} <- greater-or-equal {name: "tmp", value: 2, type: 1, properties: ["tmp": "integer"]}, {name: "len", value: 3, type: 1, properties: ["len": "integer"]} run/0: ingredient 0 is tmp mem/0: location 1070 is 1 run/0: ingredient 1 is len @@ -139,11 +167,13 @@ mem/0: location 1071 is 4 run/0: product 0 is 0 mem/0: storing 0 in location 1072 run/0: instruction channel-full?/7 +run/0: break-unless {name: "at-end?", value: 4, type: 3, properties: ["at-end?": "boolean"]}, {name: "", value: 1, type: , properties: ["": ]} mem/0: location 1072 is 0 run/0: ingredient 0 is 0 run/0: ingredient 1 is run/0: jumping to instruction 9 run/0: instruction channel-full?/10 +run/0: {name: "full", value: 5, type: 1, properties: ["full": "integer"]} <- get {name: "chan", value: 1, type: 2-10, properties: ["chan": "address":"channel", "deref": ]}, {name: "first-full", value: 0, type: 0, properties: ["first-full": "offset"]} run/0: ingredient 0 is chan mem/0: location 1069 is 1030 run/0: ingredient 1 is first-full @@ -153,6 +183,7 @@ mem/0: location 1030 is 0 run/0: product 0 is 0 mem/0: storing 0 in location 1073 run/0: instruction channel-full?/11 +run/0: {name: "result", value: 6, type: 3, properties: ["result": "boolean"]} <- equal {name: "full", value: 5, type: 1, properties: ["full": "integer"]}, {name: "tmp", value: 2, type: 1, properties: ["tmp": "integer"]} run/0: ingredient 0 is full mem/0: location 1073 is 0 run/0: ingredient 1 is tmp @@ -160,15 +191,18 @@ mem/0: location 1070 is 1 run/0: product 0 is 0 mem/0: storing 0 in location 1074 run/0: instruction channel-full?/12 +run/0: reply {name: "result", value: 6, type: 3, properties: ["result": "boolean"]} mem/0: location 1074 is 0 run/0: result 0 is 0 mem/0: storing 0 in location 1041 run/0: instruction write/5 +run/0: break-unless {name: "full", value: 3, type: 3, properties: ["full": "boolean"]}, {name: "", value: 2, type: , properties: ["": ]} mem/0: location 1041 is 0 run/0: ingredient 0 is 0 run/0: ingredient 1 is run/0: jumping to instruction 8 run/0: instruction write/9 +run/0: {name: "circular-buffer", value: 5, type: 2-5-1, properties: ["circular-buffer": "address":"array":"location"]} <- get {name: "chan", value: 1, type: 2-10, properties: ["chan": "address":"channel", "deref": ]}, {name: "data", value: 2, type: 0, properties: ["data": "offset"]} run/0: ingredient 0 is chan mem/0: location 1039 is 1030 run/0: ingredient 1 is data @@ -178,6 +212,7 @@ mem/0: location 1032 is 1033 run/0: product 0 is 1033 mem/0: storing 1033 in location 1043 run/0: instruction write/10 +run/0: {name: "free", value: 6, type: 2-1, properties: ["free": "address":"integer"]} <- get-address {name: "chan", value: 1, type: 2-10, properties: ["chan": "address":"channel", "deref": ]}, {name: "first-free", value: 1, type: 0, properties: ["first-free": "offset"]} run/0: ingredient 0 is chan mem/0: location 1039 is 1030 run/0: ingredient 1 is first-free @@ -185,6 +220,7 @@ run/0: address to copy is 1031 run/0: product 0 is 1031 mem/0: storing 1031 in location 1044 run/0: instruction write/11 +run/0: {name: "dest", value: 7, type: 2-1, properties: ["dest": "address":"location"]} <- index-address {name: "circular-buffer", value: 5, type: 2-5-1, properties: ["circular-buffer": "address":"array":"location", "deref": ]}, {name: "free", value: 6, type: 2-1, properties: ["free": "address":"integer", "deref": ]} run/0: ingredient 0 is circular-buffer mem/0: location 1043 is 1033 run/0: ingredient 1 is {name: "free", value: 6, type: 2-1, properties: ["free": "address":"integer", "deref": ]} @@ -194,11 +230,13 @@ run/0: address to copy is 1034 run/0: product 0 is 1034 mem/0: storing 1034 in location 1045 run/0: instruction write/12 +run/0: {name: "dest", value: 7, type: 2-1, properties: ["dest": "address":"location", "deref": ]} <- copy {name: "val", value: 2, type: 1, properties: ["val": "location"]} run/0: ingredient 0 is val mem/0: location 1040 is 34 mem/0: location 1045 is 1034 mem/0: storing 34 in location 1034 run/0: instruction write/13 +run/0: {name: "free", value: 6, type: 2-1, properties: ["free": "address":"integer", "deref": ]} <- add {name: "free", value: 6, type: 2-1, properties: ["free": "address":"integer", "deref": ]}, {name: "1", value: 1, type: 0, properties: ["1": "literal"]} run/0: ingredient 0 is free mem/0: location 1044 is 1031 mem/0: location 1031 is 0 @@ -207,9 +245,11 @@ run/0: product 0 is 1 mem/0: location 1044 is 1031 mem/0: storing 1 in location 1031 run/0: instruction write/15 +run/0: {name: "len", value: 8, type: 1, properties: ["len": "integer"]} <- length {name: "circular-buffer", value: 5, type: 2-5-1, properties: ["circular-buffer": "address":"array":"location", "deref": ]} mem/0: location 1043 is 1033 mem/0: storing 4 in location 1046 run/0: instruction write/16 +run/0: {name: "at-end?", value: 9, type: 3, properties: ["at-end?": "boolean"]} <- greater-or-equal {name: "free", value: 6, type: 2-1, properties: ["free": "address":"integer", "deref": ]}, {name: "len", value: 8, type: 1, properties: ["len": "integer"]} run/0: ingredient 0 is free mem/0: location 1044 is 1031 mem/0: location 1031 is 1 @@ -218,23 +258,29 @@ mem/0: location 1046 is 4 run/0: product 0 is 0 mem/0: storing 0 in location 1047 run/0: instruction write/17 +run/0: break-unless {name: "at-end?", value: 9, type: 3, properties: ["at-end?": "boolean"]}, {name: "", value: 1, type: , properties: ["": ]} mem/0: location 1047 is 0 run/0: ingredient 0 is 0 run/0: ingredient 1 is run/0: jumping to instruction 19 run/0: instruction write/20 +run/0: reply {name: "chan", value: 1, type: 2-10, properties: ["chan": "address":"channel", "same-as-ingredient": "0"]} mem/0: location 1039 is 1030 run/0: result 0 is 1030 mem/0: storing 1030 in location 1 run/0: instruction test-channel-write-not-empty/2 +run/0: {name: "2", value: 2, type: 1, properties: ["2": "integer"]} <- channel-empty? {name: "1", value: 1, type: 2-10, properties: ["1": "address":"channel"]} mem/0: location 1 is 1030 run/0: instruction channel-empty?/0 +run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new {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: 1127 run/0: instruction channel-empty?/1 +run/0: {name: "chan", value: 1, type: 2-10, properties: ["chan": "address":"channel"]} <- next-ingredient run/0: product 0 is 1030 mem/0: storing 1030 in location 1129 run/0: instruction channel-empty?/2 +run/0: {name: "full", value: 2, type: 1, properties: ["full": "integer"]} <- get {name: "chan", value: 1, type: 2-10, properties: ["chan": "address":"channel", "deref": ]}, {name: "first-full", value: 0, type: 0, properties: ["first-full": "offset"]} run/0: ingredient 0 is chan mem/0: location 1129 is 1030 run/0: ingredient 1 is first-full @@ -244,6 +290,7 @@ mem/0: location 1030 is 0 run/0: product 0 is 0 mem/0: storing 0 in location 1130 run/0: instruction channel-empty?/3 +run/0: {name: "free", value: 3, type: 1, properties: ["free": "integer"]} <- get {name: "chan", value: 1, type: 2-10, properties: ["chan": "address":"channel", "deref": ]}, {name: "first-free", value: 1, type: 0, properties: ["first-free": "offset"]} run/0: ingredient 0 is chan mem/0: location 1129 is 1030 run/0: ingredient 1 is first-free @@ -253,6 +300,7 @@ mem/0: location 1031 is 1 run/0: product 0 is 1 mem/0: storing 1 in location 1131 run/0: instruction channel-empty?/4 +run/0: {name: "result", value: 4, type: 3, properties: ["result": "boolean"]} <- equal {name: "full", value: 2, type: 1, properties: ["full": "integer"]}, {name: "free", value: 3, type: 1, properties: ["free": "integer"]} run/0: ingredient 0 is full mem/0: location 1130 is 0 run/0: ingredient 1 is free @@ -260,18 +308,23 @@ mem/0: location 1131 is 1 run/0: product 0 is 0 mem/0: storing 0 in location 1132 run/0: instruction channel-empty?/5 +run/0: reply {name: "result", value: 4, type: 3, properties: ["result": "boolean"]} mem/0: location 1132 is 0 run/0: result 0 is 0 mem/0: storing 0 in location 2 run/0: instruction test-channel-write-not-empty/3 +run/0: {name: "3", value: 3, type: 1, properties: ["3": "integer"]} <- channel-full? {name: "1", value: 1, type: 2-10, properties: ["1": "address":"channel"]} mem/0: location 1 is 1030 run/0: instruction channel-full?/0 +run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new {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 channel-full?/1 +run/0: {name: "chan", value: 1, type: 2-10, properties: ["chan": "address":"channel"]} <- next-ingredient run/0: product 0 is 1030 mem/0: storing 1030 in location 1159 run/0: instruction channel-full?/2 +run/0: {name: "tmp", value: 2, type: 1, properties: ["tmp": "integer"]} <- get {name: "chan", value: 1, type: 2-10, properties: ["chan": "address":"channel", "deref": ]}, {name: "first-free", value: 1, type: 0, properties: ["first-free": "offset"]} run/0: ingredient 0 is chan mem/0: location 1159 is 1030 run/0: ingredient 1 is first-free @@ -281,20 +334,25 @@ mem/0: location 1031 is 1 run/0: product 0 is 1 mem/0: storing 1 in location 1160 run/0: instruction channel-full?/3 +run/0: {name: "tmp", value: 2, type: 1, properties: ["tmp": "integer"]} <- add {name: "tmp", value: 2, type: 1, properties: ["tmp": "integer"]}, {name: "1", value: 1, type: 0, properties: ["1": "literal"]} run/0: ingredient 0 is tmp mem/0: location 1160 is 1 run/0: ingredient 1 is 1 run/0: product 0 is 2 mem/0: storing 2 in location 1160 run/0: instruction channel-full?/5 +run/0: {name: "len", value: 3, type: 1, properties: ["len": "integer"]} <- channel-capacity {name: "chan", value: 1, type: 2-10, properties: ["chan": "address":"channel"]} mem/0: location 1159 is 1030 run/0: instruction channel-capacity/0 +run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new {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: 1187 run/0: instruction channel-capacity/1 +run/0: {name: "chan", value: 1, type: 2-10, properties: ["chan": "address":"channel"]} <- next-ingredient run/0: product 0 is 1030 mem/0: storing 1030 in location 1189 run/0: instruction channel-capacity/2 +run/0: {name: "q", value: 2, type: 2-5-1, properties: ["q": "address":"array":"location"]} <- get {name: "chan", value: 1, type: 2-10, properties: ["chan": "address":"channel", "deref": ]}, {name: "data", value: 2, type: 0, properties: ["data": "offset"]} run/0: ingredient 0 is chan mem/0: location 1189 is 1030 run/0: ingredient 1 is data @@ -304,13 +362,16 @@ mem/0: location 1032 is 1033 run/0: product 0 is 1033 mem/0: storing 1033 in location 1190 run/0: instruction channel-capacity/3 +run/0: {name: "result", value: 3, type: 1, properties: ["result": "integer"]} <- length {name: "q", value: 2, type: 2-5-1, properties: ["q": "address":"array":"location", "deref": ]} mem/0: location 1190 is 1033 mem/0: storing 4 in location 1191 run/0: instruction channel-capacity/4 +run/0: reply {name: "result", value: 3, type: 1, properties: ["result": "integer"]} mem/0: location 1191 is 4 run/0: result 0 is 4 mem/0: storing 4 in location 1161 run/0: instruction channel-full?/6 +run/0: {name: "at-end?", value: 4, type: 3, properties: ["at-end?": "boolean"]} <- greater-or-equal {name: "tmp", value: 2, type: 1, properties: ["tmp": "integer"]}, {name: "len", value: 3, type: 1, properties: ["len": "integer"]} run/0: ingredient 0 is tmp mem/0: location 1160 is 2 run/0: ingredient 1 is len @@ -318,11 +379,13 @@ mem/0: location 1161 is 4 run/0: product 0 is 0 mem/0: storing 0 in location 1162 run/0: instruction channel-full?/7 +run/0: break-unless {name: "at-end?", value: 4, type: 3, properties: ["at-end?": "boolean"]}, {name: "", value: 1, type: , properties: ["": ]} mem/0: location 1162 is 0 run/0: ingredient 0 is 0 run/0: ingredient 1 is run/0: jumping to instruction 9 run/0: instruction channel-full?/10 +run/0: {name: "full", value: 5, type: 1, properties: ["full": "integer"]} <- get {name: "chan", value: 1, type: 2-10, properties: ["chan": "address":"channel", "deref": ]}, {name: "first-full", value: 0, type: 0, properties: ["first-full": "offset"]} run/0: ingredient 0 is chan mem/0: location 1159 is 1030 run/0: ingredient 1 is first-full @@ -332,6 +395,7 @@ mem/0: location 1030 is 0 run/0: product 0 is 0 mem/0: storing 0 in location 1163 run/0: instruction channel-full?/11 +run/0: {name: "result", value: 6, type: 3, properties: ["result": "boolean"]} <- equal {name: "full", value: 5, type: 1, properties: ["full": "integer"]}, {name: "tmp", value: 2, type: 1, properties: ["tmp": "integer"]} run/0: ingredient 0 is full mem/0: location 1163 is 0 run/0: ingredient 1 is tmp @@ -339,6 +403,7 @@ mem/0: location 1160 is 2 run/0: product 0 is 0 mem/0: storing 0 in location 1164 run/0: instruction channel-full?/12 +run/0: reply {name: "result", value: 6, type: 3, properties: ["result": "boolean"]} mem/0: location 1164 is 0 run/0: result 0 is 0 mem/0: storing 0 in location 3 diff --git a/cpp/.traces/check_string_in_memory b/cpp/.traces/check_string_in_memory index 3830dc47..635a5557 100644 --- a/cpp/.traces/check_string_in_memory +++ b/cpp/.traces/check_string_in_memory @@ -18,14 +18,18 @@ after-brace/0: copy ... new/0: routine allocated memory from 1000 to 101000 schedule/0: test-check_string_in_memory run/0: instruction test-check_string_in_memory/0 +run/0: {name: "1", value: 1, type: 1, properties: ["1": "integer"]} <- copy {name: "3", value: 3, type: 0, properties: ["3": "literal"]} run/0: ingredient 0 is 3 mem/0: storing 3 in location 1 run/0: instruction test-check_string_in_memory/1 +run/0: {name: "2", value: 2, type: 4, properties: ["2": "character"]} <- copy {name: "97", value: 97, type: 0, properties: ["97": "literal"]} run/0: ingredient 0 is 97 mem/0: storing 97 in location 2 run/0: instruction test-check_string_in_memory/2 +run/0: {name: "3", value: 3, type: 4, properties: ["3": "character"]} <- copy {name: "98", value: 98, type: 0, properties: ["98": "literal"]} run/0: ingredient 0 is 98 mem/0: storing 98 in location 3 run/0: instruction test-check_string_in_memory/3 +run/0: {name: "4", value: 4, type: 4, properties: ["4": "character"]} <- copy {name: "99", value: 99, type: 0, properties: ["99": "literal"]} run/0: ingredient 0 is 99 mem/0: storing 99 in location 4 diff --git a/cpp/.traces/closure b/cpp/.traces/closure index 047b3a7d..eea62ad0 100644 --- a/cpp/.traces/closure +++ b/cpp/.traces/closure @@ -63,60 +63,78 @@ 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 {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 run/0: instruction init-counter/0 +run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new {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: 1030 run/0: instruction init-counter/1 +run/0: {name: "x", value: 1, type: 1, properties: ["x": "integer"]} <- copy {name: "23", value: 23, type: 0, properties: ["23": "literal"]} run/0: ingredient 0 is 23 mem/0: storing 23 in location 1032 run/0: instruction init-counter/2 +run/0: {name: "y", value: 2, type: 1, properties: ["y": "integer"]} <- copy {name: "3", value: 3, type: 0, properties: ["3": "literal"]} run/0: ingredient 0 is 3 mem/0: storing 3 in location 1033 run/0: instruction init-counter/3 +run/0: reply {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} run/0: result 0 is 1030 mem/0: storing 1030 in location 1002 run/0: instruction main/2 +run/0: {name: "2", value: 2, type: 1, properties: ["2": "integer", "raw": ]} <- increment-counter {name: "1", value: 1, type: 2-5-1, properties: ["1": "address":"array":"location", "names": "init-counter"]} mem/0: location 1002 is 1030 run/0: instruction increment-counter/0 +run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new {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: 1060 run/0: instruction increment-counter/1 +run/0: {name: "0", value: 0, type: 2-5-1, properties: ["0": "address":"array":"location", "names": "init-counter"]} <- next-ingredient run/0: product 0 is 1030 mem/0: storing 1030 in location 1061 run/0: instruction increment-counter/2 +run/0: {name: "y", value: 2, type: 1, properties: ["y": "integer", "space": "1"]} <- add {name: "y", value: 2, type: 1, properties: ["y": "integer", "space": "1"]}, {name: "1", value: 1, type: 0, properties: ["1": "literal"]} run/0: ingredient 0 is y mem/0: location 1033 is 3 run/0: ingredient 1 is 1 run/0: product 0 is 4 mem/0: storing 4 in location 1033 run/0: instruction increment-counter/3 +run/0: {name: "y", value: 1, type: 1, properties: ["y": "integer"]} <- copy {name: "234", value: 234, type: 0, properties: ["234": "literal"]} run/0: ingredient 0 is 234 mem/0: storing 234 in location 1062 run/0: instruction increment-counter/4 +run/0: reply {name: "y", value: 2, type: 1, properties: ["y": "integer", "space": "1"]} mem/0: location 1033 is 4 run/0: result 0 is 4 mem/0: storing 4 in location 2 run/0: instruction main/3 +run/0: {name: "3", value: 3, type: 1, properties: ["3": "integer", "raw": ]} <- increment-counter {name: "1", value: 1, type: 2-5-1, properties: ["1": "address":"array":"location", "names": "init-counter"]} mem/0: location 1002 is 1030 run/0: instruction increment-counter/0 +run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new {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: 1090 run/0: instruction increment-counter/1 +run/0: {name: "0", value: 0, type: 2-5-1, properties: ["0": "address":"array":"location", "names": "init-counter"]} <- next-ingredient run/0: product 0 is 1030 mem/0: storing 1030 in location 1091 run/0: instruction increment-counter/2 +run/0: {name: "y", value: 2, type: 1, properties: ["y": "integer", "space": "1"]} <- add {name: "y", value: 2, type: 1, properties: ["y": "integer", "space": "1"]}, {name: "1", value: 1, type: 0, properties: ["1": "literal"]} run/0: ingredient 0 is y mem/0: location 1033 is 4 run/0: ingredient 1 is 1 run/0: product 0 is 5 mem/0: storing 5 in location 1033 run/0: instruction increment-counter/3 +run/0: {name: "y", value: 1, type: 1, properties: ["y": "integer"]} <- copy {name: "234", value: 234, type: 0, properties: ["234": "literal"]} run/0: ingredient 0 is 234 mem/0: storing 234 in location 1092 run/0: instruction increment-counter/4 +run/0: reply {name: "y", value: 2, type: 1, properties: ["y": "integer", "space": "1"]} mem/0: location 1033 is 5 run/0: result 0 is 5 mem/0: storing 5 in location 3 diff --git a/cpp/.traces/convert_names b/cpp/.traces/convert_names index 4d8a676b..96e8a0f8 100644 --- a/cpp/.traces/convert_names +++ b/cpp/.traces/convert_names @@ -7,5 +7,6 @@ after-brace/0: copy ... new/0: routine allocated memory from 1000 to 101000 schedule/0: main run/0: instruction main/0 +run/0: {name: "x", value: 1, type: 1, properties: ["x": "integer"]} <- copy {name: "0", value: 0, type: 0, properties: ["0": "literal"]} run/0: ingredient 0 is 0 mem/0: storing 0 in location 1 diff --git a/cpp/.traces/convert_names_passes_default_space b/cpp/.traces/convert_names_passes_default_space index c3a163bc..b26d843a 100644 --- a/cpp/.traces/convert_names_passes_default_space +++ b/cpp/.traces/convert_names_passes_default_space @@ -8,4 +8,5 @@ after-brace/0: copy ... 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: 1, properties: ["default-space": "integer"]}, {name: "x", value: 1, type: 1, properties: ["x": "integer"]} <- copy {name: "0", value: 0, type: 0, properties: ["0": "literal"]} run/0: ingredient 0 is 0 diff --git a/cpp/.traces/convert_names_passes_dummy b/cpp/.traces/convert_names_passes_dummy index 83d5c510..c0fe17de 100644 --- a/cpp/.traces/convert_names_passes_dummy +++ b/cpp/.traces/convert_names_passes_dummy @@ -8,4 +8,5 @@ after-brace/0: copy ... new/0: routine allocated memory from 1000 to 101000 schedule/0: main run/0: instruction main/0 +run/0: {name: "_", value: 0, type: 0, properties: ["_": "dummy"]}, {name: "x", value: 1, type: 1, properties: ["x": "integer"]} <- copy {name: "0", value: 0, type: 0, properties: ["0": "literal"]} run/0: ingredient 0 is 0 diff --git a/cpp/.traces/convert_names_passes_raw b/cpp/.traces/convert_names_passes_raw index e1d35cb7..6e25c354 100644 --- a/cpp/.traces/convert_names_passes_raw +++ b/cpp/.traces/convert_names_passes_raw @@ -6,5 +6,6 @@ after-brace/0: copy ... new/0: routine allocated memory from 1000 to 101000 schedule/0: main run/0: instruction main/0 +run/0: {name: "x", value: 0, type: 1, properties: ["x": "integer", "raw": ]} <- copy {name: "0", value: 0, type: 0, properties: ["0": "literal"]} run/0: ingredient 0 is 0 mem/0: storing 0 in location 0 diff --git a/cpp/.traces/convert_names_transforms_container_elements b/cpp/.traces/convert_names_transforms_container_elements index 64200f1e..5cf58994 100644 --- a/cpp/.traces/convert_names_transforms_container_elements +++ b/cpp/.traces/convert_names_transforms_container_elements @@ -16,6 +16,7 @@ after-brace/0: get ... new/0: routine allocated memory from 1000 to 101000 schedule/0: main run/0: instruction main/0 +run/0: {name: "a", value: 1, type: 1, properties: ["a": "integer"]} <- get {name: "0", value: 0, type: 6, properties: ["0": "point"]}, {name: "y", value: 1, type: 0, properties: ["y": "offset"]} run/0: ingredient 0 is 0 run/0: ingredient 1 is y run/0: address to copy is 1 @@ -24,6 +25,7 @@ mem/0: location 1 is 0 run/0: product 0 is 0 mem/0: storing 0 in location 1 run/0: instruction main/1 +run/0: {name: "b", value: 2, type: 1, properties: ["b": "integer"]} <- get {name: "0", value: 0, type: 6, properties: ["0": "point"]}, {name: "x", value: 0, type: 0, properties: ["x": "offset"]} run/0: ingredient 0 is 0 run/0: ingredient 1 is x run/0: address to copy is 0 diff --git a/cpp/.traces/convert_names_warns b/cpp/.traces/convert_names_warns index 3a4204dc..bd98273a 100644 --- a/cpp/.traces/convert_names_warns +++ b/cpp/.traces/convert_names_warns @@ -9,6 +9,7 @@ after-brace/0: copy ... new/0: routine allocated memory from 1000 to 101000 schedule/0: main run/0: instruction main/0 +run/0: {name: "x", value: 1, type: 1, properties: ["x": "integer"]} <- copy {name: "y", value: 0, type: 1, properties: ["y": "integer"]} run/0: ingredient 0 is y mem/0: location 0 is 0 mem/0: storing 0 in location 1 diff --git a/cpp/.traces/copy b/cpp/.traces/copy index 17a10725..e8cd036f 100644 --- a/cpp/.traces/copy +++ b/cpp/.traces/copy @@ -10,9 +10,11 @@ after-brace/0: copy ... new/0: routine allocated memory from 1000 to 101000 schedule/0: main run/0: instruction main/0 +run/0: {name: "1", value: 1, type: 1, properties: ["1": "integer"]} <- copy {name: "23", value: 23, type: 0, properties: ["23": "literal"]} run/0: ingredient 0 is 23 mem/0: storing 23 in location 1 run/0: instruction main/1 +run/0: {name: "2", value: 2, type: 1, properties: ["2": "integer"]} <- copy {name: "1", value: 1, type: 1, properties: ["1": "integer"]} run/0: ingredient 0 is 1 mem/0: location 1 is 23 mem/0: storing 23 in location 2 diff --git a/cpp/.traces/copy_array b/cpp/.traces/copy_array index 693d0c56..4acd43fe 100644 --- a/cpp/.traces/copy_array +++ b/cpp/.traces/copy_array @@ -22,18 +22,23 @@ after-brace/0: copy ... new/0: routine allocated memory from 1000 to 101000 schedule/0: main run/0: instruction main/0 +run/0: {name: "1", value: 1, type: 1, properties: ["1": "integer"]} <- copy {name: "3", value: 3, type: 0, properties: ["3": "literal"]} run/0: ingredient 0 is 3 mem/0: storing 3 in location 1 run/0: instruction main/1 +run/0: {name: "2", value: 2, type: 1, properties: ["2": "integer"]} <- copy {name: "14", value: 14, type: 0, properties: ["14": "literal"]} run/0: ingredient 0 is 14 mem/0: storing 14 in location 2 run/0: instruction main/2 +run/0: {name: "3", value: 3, type: 1, properties: ["3": "integer"]} <- copy {name: "15", value: 15, type: 0, properties: ["15": "literal"]} run/0: ingredient 0 is 15 mem/0: storing 15 in location 3 run/0: instruction main/3 +run/0: {name: "4", value: 4, type: 1, properties: ["4": "integer"]} <- copy {name: "16", value: 16, type: 0, properties: ["16": "literal"]} run/0: ingredient 0 is 16 mem/0: storing 16 in location 4 run/0: instruction main/4 +run/0: {name: "5", value: 5, type: 5-1, properties: ["5": "array":"integer"]} <- copy {name: "1", value: 1, type: 5-1, properties: ["1": "array":"integer"]} run/0: ingredient 0 is 1 mem/0: location 1 is 3 mem/0: location 2 is 14 diff --git a/cpp/.traces/copy_array_indirect b/cpp/.traces/copy_array_indirect index e09614f9..1ffcac68 100644 --- a/cpp/.traces/copy_array_indirect +++ b/cpp/.traces/copy_array_indirect @@ -26,21 +26,27 @@ after-brace/0: copy ... new/0: routine allocated memory from 1000 to 101000 schedule/0: main run/0: instruction main/0 +run/0: {name: "1", value: 1, type: 1, properties: ["1": "integer"]} <- copy {name: "3", value: 3, type: 0, properties: ["3": "literal"]} run/0: ingredient 0 is 3 mem/0: storing 3 in location 1 run/0: instruction main/1 +run/0: {name: "2", value: 2, type: 1, properties: ["2": "integer"]} <- copy {name: "14", value: 14, type: 0, properties: ["14": "literal"]} run/0: ingredient 0 is 14 mem/0: storing 14 in location 2 run/0: instruction main/2 +run/0: {name: "3", value: 3, type: 1, properties: ["3": "integer"]} <- copy {name: "15", value: 15, type: 0, properties: ["15": "literal"]} run/0: ingredient 0 is 15 mem/0: storing 15 in location 3 run/0: instruction main/3 +run/0: {name: "4", value: 4, type: 1, properties: ["4": "integer"]} <- copy {name: "16", value: 16, type: 0, properties: ["16": "literal"]} run/0: ingredient 0 is 16 mem/0: storing 16 in location 4 run/0: instruction main/4 +run/0: {name: "5", value: 5, type: 2-5-1, properties: ["5": "address":"array":"integer"]} <- copy {name: "1", value: 1, type: 0, properties: ["1": "literal"]} run/0: ingredient 0 is 1 mem/0: storing 1 in location 5 run/0: instruction main/5 +run/0: {name: "6", value: 6, type: 5-1, properties: ["6": "array":"integer"]} <- copy {name: "5", value: 5, type: 2-5-1, properties: ["5": "address":"array":"integer", "deref": ]} run/0: ingredient 0 is 5 mem/0: location 5 is 1 mem/0: location 1 is 3 diff --git a/cpp/.traces/copy_exclusive_container b/cpp/.traces/copy_exclusive_container index e6add356..46d3b69b 100644 --- a/cpp/.traces/copy_exclusive_container +++ b/cpp/.traces/copy_exclusive_container @@ -18,15 +18,19 @@ after-brace/0: copy ... new/0: routine allocated memory from 1000 to 101000 schedule/0: main run/0: instruction main/0 +run/0: {name: "1", value: 1, type: 1, properties: ["1": "integer"]} <- copy {name: "1", value: 1, type: 0, properties: ["1": "literal"]} run/0: ingredient 0 is 1 mem/0: storing 1 in location 1 run/0: instruction main/1 +run/0: {name: "2", value: 2, type: 1, properties: ["2": "integer"]} <- copy {name: "34", value: 34, type: 0, properties: ["34": "literal"]} run/0: ingredient 0 is 34 mem/0: storing 34 in location 2 run/0: instruction main/2 +run/0: {name: "3", value: 3, type: 1, properties: ["3": "integer"]} <- copy {name: "35", value: 35, type: 0, properties: ["35": "literal"]} run/0: ingredient 0 is 35 mem/0: storing 35 in location 3 run/0: instruction main/3 +run/0: {name: "4", value: 4, type: 8, properties: ["4": "integer-or-point"]} <- copy {name: "1", value: 1, type: 8, properties: ["1": "integer-or-point"]} run/0: ingredient 0 is 1 mem/0: location 1 is 1 mem/0: location 2 is 34 diff --git a/cpp/.traces/copy_handles_nested_container_elements b/cpp/.traces/copy_handles_nested_container_elements index f220c077..726ba849 100644 --- a/cpp/.traces/copy_handles_nested_container_elements +++ b/cpp/.traces/copy_handles_nested_container_elements @@ -18,15 +18,19 @@ after-brace/0: copy ... new/0: routine allocated memory from 1000 to 101000 schedule/0: main run/0: instruction main/0 +run/0: {name: "12", value: 12, type: 1, properties: ["12": "integer"]} <- copy {name: "34", value: 34, type: 0, properties: ["34": "literal"]} run/0: ingredient 0 is 34 mem/0: storing 34 in location 12 run/0: instruction main/1 +run/0: {name: "13", value: 13, type: 1, properties: ["13": "integer"]} <- copy {name: "35", value: 35, type: 0, properties: ["35": "literal"]} run/0: ingredient 0 is 35 mem/0: storing 35 in location 13 run/0: instruction main/2 +run/0: {name: "14", value: 14, type: 1, properties: ["14": "integer"]} <- copy {name: "36", value: 36, type: 0, properties: ["36": "literal"]} run/0: ingredient 0 is 36 mem/0: storing 36 in location 14 run/0: instruction main/3 +run/0: {name: "15", value: 15, type: 7, properties: ["15": "point-integer"]} <- copy {name: "12", value: 12, type: 7, properties: ["12": "point-integer"]} run/0: ingredient 0 is 12 mem/0: location 12 is 34 mem/0: location 13 is 35 diff --git a/cpp/.traces/copy_indirect b/cpp/.traces/copy_indirect index 72f4fe80..0b093016 100644 --- a/cpp/.traces/copy_indirect +++ b/cpp/.traces/copy_indirect @@ -14,12 +14,15 @@ after-brace/0: copy ... 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"]} <- copy {name: "2", value: 2, type: 0, properties: ["2": "literal"]} run/0: ingredient 0 is 2 mem/0: storing 2 in location 1 run/0: instruction main/1 +run/0: {name: "2", value: 2, type: 1, properties: ["2": "integer"]} <- copy {name: "34", value: 34, type: 0, properties: ["34": "literal"]} run/0: ingredient 0 is 34 mem/0: storing 34 in location 2 run/0: instruction main/2 +run/0: {name: "3", value: 3, type: 1, properties: ["3": "integer"]} <- copy {name: "1", value: 1, type: 2-1, properties: ["1": "address":"integer", "deref": ]} run/0: ingredient 0 is 1 mem/0: location 1 is 2 mem/0: location 2 is 34 diff --git a/cpp/.traces/copy_literal b/cpp/.traces/copy_literal index 6c3d0d7a..553aa000 100644 --- a/cpp/.traces/copy_literal +++ b/cpp/.traces/copy_literal @@ -6,5 +6,6 @@ after-brace/0: copy ... new/0: routine allocated memory from 1000 to 101000 schedule/0: main run/0: instruction main/0 +run/0: {name: "1", value: 1, type: 1, properties: ["1": "integer"]} <- copy {name: "23", value: 23, type: 0, properties: ["23": "literal"]} run/0: ingredient 0 is 23 mem/0: storing 23 in location 1 diff --git a/cpp/.traces/copy_multiple_locations b/cpp/.traces/copy_multiple_locations index 815d4ea9..a6df00c4 100644 --- a/cpp/.traces/copy_multiple_locations +++ b/cpp/.traces/copy_multiple_locations @@ -14,12 +14,15 @@ after-brace/0: copy ... new/0: routine allocated memory from 1000 to 101000 schedule/0: main run/0: instruction main/0 +run/0: {name: "1", value: 1, type: 1, properties: ["1": "integer"]} <- copy {name: "34", value: 34, type: 0, properties: ["34": "literal"]} run/0: ingredient 0 is 34 mem/0: storing 34 in location 1 run/0: instruction main/1 +run/0: {name: "2", value: 2, type: 1, properties: ["2": "integer"]} <- copy {name: "35", value: 35, type: 0, properties: ["35": "literal"]} run/0: ingredient 0 is 35 mem/0: storing 35 in location 2 run/0: instruction main/2 +run/0: {name: "3", value: 3, type: 6, properties: ["3": "point"]} <- copy {name: "1", value: 1, type: 6, properties: ["1": "point"]} run/0: ingredient 0 is 1 mem/0: location 1 is 34 mem/0: location 2 is 35 diff --git a/cpp/.traces/deref_sidesteps_default_space b/cpp/.traces/deref_sidesteps_default_space index 4d406fc7..f5912fa2 100644 --- a/cpp/.traces/deref_sidesteps_default_space +++ b/cpp/.traces/deref_sidesteps_default_space @@ -22,17 +22,22 @@ after-brace/0: copy ... new/0: routine allocated memory from 1000 to 101000 schedule/0: main run/0: instruction main/0 +run/0: {name: "3", value: 3, type: 1, properties: ["3": "integer"]} <- copy {name: "34", value: 34, type: 0, properties: ["34": "literal"]} run/0: ingredient 0 is 34 mem/0: storing 34 in location 3 run/0: instruction main/1 +run/0: {name: "1000", value: 1000, type: 1, properties: ["1000": "integer"]} <- copy {name: "5", value: 5, type: 0, properties: ["5": "literal"]} run/0: ingredient 0 is 5 mem/0: storing 5 in location 1000 run/0: instruction main/2 +run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- copy {name: "1000", value: 1000, type: 0, properties: ["1000": "literal"]} run/0: ingredient 0 is 1000 run/0: instruction main/3 +run/0: {name: "1", value: 1, type: 2-1, properties: ["1": "address":"integer"]} <- copy {name: "3", value: 3, type: 0, properties: ["3": "literal"]} run/0: ingredient 0 is 3 mem/0: storing 3 in location 1002 run/0: instruction main/4 +run/0: {name: "8", value: 8, type: 1, properties: ["8": "integer", "raw": ]} <- copy {name: "1", value: 1, type: 2-1, properties: ["1": "address":"integer", "deref": ]} run/0: ingredient 0 is 1 mem/0: location 1002 is 3 mem/0: location 3 is 34 diff --git a/cpp/.traces/deref_sidesteps_default_space_in_get b/cpp/.traces/deref_sidesteps_default_space_in_get index 0bc10c1e..364977e2 100644 --- a/cpp/.traces/deref_sidesteps_default_space_in_get +++ b/cpp/.traces/deref_sidesteps_default_space_in_get @@ -27,20 +27,26 @@ after-brace/0: get ... new/0: routine allocated memory from 1000 to 101000 schedule/0: main run/0: instruction main/0 +run/0: {name: "12", value: 12, type: 1, properties: ["12": "integer"]} <- copy {name: "34", value: 34, type: 0, properties: ["34": "literal"]} run/0: ingredient 0 is 34 mem/0: storing 34 in location 12 run/0: instruction main/1 +run/0: {name: "13", value: 13, type: 1, properties: ["13": "integer"]} <- copy {name: "35", value: 35, type: 0, properties: ["35": "literal"]} run/0: ingredient 0 is 35 mem/0: storing 35 in location 13 run/0: instruction main/2 +run/0: {name: "1000", value: 1000, type: 1, properties: ["1000": "integer"]} <- copy {name: "5", value: 5, type: 0, properties: ["5": "literal"]} run/0: ingredient 0 is 5 mem/0: storing 5 in location 1000 run/0: instruction main/3 +run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- copy {name: "1000", value: 1000, type: 0, properties: ["1000": "literal"]} run/0: ingredient 0 is 1000 run/0: instruction main/4 +run/0: {name: "1", value: 1, type: 2-6, properties: ["1": "address":"point"]} <- copy {name: "12", value: 12, type: 0, properties: ["12": "literal"]} run/0: ingredient 0 is 12 mem/0: storing 12 in location 1002 run/0: instruction main/5 +run/0: {name: "9", value: 9, type: 1, properties: ["9": "integer", "raw": ]} <- get {name: "1", value: 1, type: 2-6, properties: ["1": "address":"point", "deref": ]}, {name: "1", value: 1, type: 0, properties: ["1": "offset"]} run/0: ingredient 0 is 1 mem/0: location 1002 is 12 run/0: ingredient 1 is 1 diff --git a/cpp/.traces/deref_sidesteps_default_space_in_index b/cpp/.traces/deref_sidesteps_default_space_in_index index 97d3e806..705f2b59 100644 --- a/cpp/.traces/deref_sidesteps_default_space_in_index +++ b/cpp/.traces/deref_sidesteps_default_space_in_index @@ -31,23 +31,30 @@ after-brace/0: index ... new/0: routine allocated memory from 1000 to 101000 schedule/0: main run/0: instruction main/0 +run/0: {name: "12", value: 12, type: 1, properties: ["12": "integer"]} <- copy {name: "2", value: 2, type: 0, properties: ["2": "literal"]} run/0: ingredient 0 is 2 mem/0: storing 2 in location 12 run/0: instruction main/1 +run/0: {name: "13", value: 13, type: 1, properties: ["13": "integer"]} <- copy {name: "34", value: 34, type: 0, properties: ["34": "literal"]} run/0: ingredient 0 is 34 mem/0: storing 34 in location 13 run/0: instruction main/2 +run/0: {name: "14", value: 14, type: 1, properties: ["14": "integer"]} <- copy {name: "35", value: 35, type: 0, properties: ["35": "literal"]} run/0: ingredient 0 is 35 mem/0: storing 35 in location 14 run/0: instruction main/3 +run/0: {name: "1000", value: 1000, type: 1, properties: ["1000": "integer"]} <- copy {name: "5", value: 5, type: 0, properties: ["5": "literal"]} run/0: ingredient 0 is 5 mem/0: storing 5 in location 1000 run/0: instruction main/4 +run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- copy {name: "1000", value: 1000, type: 0, properties: ["1000": "literal"]} run/0: ingredient 0 is 1000 run/0: instruction main/5 +run/0: {name: "1", value: 1, type: 2-5-1, properties: ["1": "address":"array":"integer"]} <- copy {name: "12", value: 12, type: 0, properties: ["12": "literal"]} run/0: ingredient 0 is 12 mem/0: storing 12 in location 1002 run/0: instruction main/6 +run/0: {name: "9", value: 9, type: 1, properties: ["9": "integer", "raw": ]} <- index {name: "1", value: 1, type: 2-5-1, properties: ["1": "address":"array":"integer", "deref": ]}, {name: "1", value: 1, type: 0, properties: ["1": "literal"]} run/0: ingredient 0 is {name: "1", value: 1, type: 2-5-1, properties: ["1": "address":"array":"integer", "deref": ]} mem/0: location 1002 is 12 run/0: ingredient 1 is {name: "1", value: 1, type: 0, properties: ["1": "literal"]} diff --git a/cpp/.traces/divide b/cpp/.traces/divide index 87c827d6..9d83a35e 100644 --- a/cpp/.traces/divide +++ b/cpp/.traces/divide @@ -15,12 +15,15 @@ after-brace/0: divide ... new/0: routine allocated memory from 1000 to 101000 schedule/0: main run/0: instruction main/0 +run/0: {name: "1", value: 1, type: 1, properties: ["1": "integer"]} <- copy {name: "27", value: 27, type: 0, properties: ["27": "literal"]} run/0: ingredient 0 is 27 mem/0: storing 27 in location 1 run/0: instruction main/1 +run/0: {name: "2", value: 2, type: 1, properties: ["2": "integer"]} <- copy {name: "3", value: 3, type: 0, properties: ["3": "literal"]} run/0: ingredient 0 is 3 mem/0: storing 3 in location 2 run/0: instruction main/2 +run/0: {name: "3", value: 3, type: 1, properties: ["3": "integer"]} <- divide {name: "1", value: 1, type: 1, properties: ["1": "integer"]}, {name: "2", value: 2, type: 1, properties: ["2": "integer"]} run/0: ingredient 0 is 1 mem/0: location 1 is 27 run/0: ingredient 1 is 2 diff --git a/cpp/.traces/divide_literal b/cpp/.traces/divide_literal index 9b3c8934..40578702 100644 --- a/cpp/.traces/divide_literal +++ b/cpp/.traces/divide_literal @@ -7,6 +7,7 @@ after-brace/0: divide ... new/0: routine allocated memory from 1000 to 101000 schedule/0: main run/0: instruction main/0 +run/0: {name: "1", value: 1, type: 1, properties: ["1": "integer"]} <- divide {name: "8", value: 8, type: 0, properties: ["8": "literal"]}, {name: "2", value: 2, type: 0, properties: ["2": "literal"]} run/0: ingredient 0 is 8 run/0: ingredient 1 is 2 run/0: ingredient 1 is 2 diff --git a/cpp/.traces/divide_with_remainder b/cpp/.traces/divide_with_remainder index 3f680232..979e92d3 100644 --- a/cpp/.traces/divide_with_remainder +++ b/cpp/.traces/divide_with_remainder @@ -16,12 +16,15 @@ after-brace/0: divide-with-remainder ... new/0: routine allocated memory from 1000 to 101000 schedule/0: main run/0: instruction main/0 +run/0: {name: "1", value: 1, type: 1, properties: ["1": "integer"]} <- copy {name: "27", value: 27, type: 0, properties: ["27": "literal"]} run/0: ingredient 0 is 27 mem/0: storing 27 in location 1 run/0: instruction main/1 +run/0: {name: "2", value: 2, type: 1, properties: ["2": "integer"]} <- copy {name: "11", value: 11, type: 0, properties: ["11": "literal"]} run/0: ingredient 0 is 11 mem/0: storing 11 in location 2 run/0: instruction main/2 +run/0: {name: "3", value: 3, type: 1, properties: ["3": "integer"]}, {name: "4", value: 4, type: 1, properties: ["4": "integer"]} <- divide-with-remainder {name: "1", value: 1, type: 1, properties: ["1": "integer"]}, {name: "2", value: 2, type: 1, properties: ["2": "integer"]} run/0: ingredient 0 is 1 mem/0: location 1 is 27 run/0: ingredient 1 is 2 diff --git a/cpp/.traces/divide_with_remainder_literal b/cpp/.traces/divide_with_remainder_literal index 01e4abb0..a06d9e34 100644 --- a/cpp/.traces/divide_with_remainder_literal +++ b/cpp/.traces/divide_with_remainder_literal @@ -8,6 +8,7 @@ after-brace/0: divide-with-remainder ... new/0: routine allocated memory from 1000 to 101000 schedule/0: main run/0: instruction main/0 +run/0: {name: "1", value: 1, type: 1, properties: ["1": "integer"]}, {name: "2", value: 2, type: 1, properties: ["2": "integer"]} <- divide-with-remainder {name: "9", value: 9, type: 0, properties: ["9": "literal"]}, {name: "2", value: 2, type: 0, properties: ["2": "literal"]} run/0: ingredient 0 is 9 run/0: ingredient 1 is 2 run/0: product 0 is 4 diff --git a/cpp/.traces/equal b/cpp/.traces/equal index 7c5a280a..807515a8 100644 --- a/cpp/.traces/equal +++ b/cpp/.traces/equal @@ -15,12 +15,15 @@ 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: 1, properties: ["1": "integer"]} <- copy {name: "34", value: 34, type: 0, properties: ["34": "literal"]} run/0: ingredient 0 is 34 mem/0: storing 34 in location 1 run/0: instruction main/1 +run/0: {name: "2", value: 2, type: 1, properties: ["2": "integer"]} <- copy {name: "33", value: 33, type: 0, properties: ["33": "literal"]} run/0: ingredient 0 is 33 mem/0: storing 33 in location 2 run/0: instruction main/2 +run/0: {name: "3", value: 3, type: 1, properties: ["3": "integer"]} <- equal {name: "1", value: 1, type: 1, properties: ["1": "integer"]}, {name: "2", value: 2, type: 1, properties: ["2": "integer"]} run/0: ingredient 0 is 1 mem/0: location 1 is 34 run/0: ingredient 1 is 2 diff --git a/cpp/.traces/equal2 b/cpp/.traces/equal2 index e76a9aff..7fb70453 100644 --- a/cpp/.traces/equal2 +++ b/cpp/.traces/equal2 @@ -15,12 +15,15 @@ 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: 1, properties: ["1": "integer"]} <- copy {name: "34", value: 34, type: 0, properties: ["34": "literal"]} run/0: ingredient 0 is 34 mem/0: storing 34 in location 1 run/0: instruction main/1 +run/0: {name: "2", value: 2, type: 1, properties: ["2": "integer"]} <- copy {name: "34", value: 34, type: 0, properties: ["34": "literal"]} run/0: ingredient 0 is 34 mem/0: storing 34 in location 2 run/0: instruction main/2 +run/0: {name: "3", value: 3, type: 1, properties: ["3": "integer"]} <- equal {name: "1", value: 1, type: 1, properties: ["1": "integer"]}, {name: "2", value: 2, type: 1, properties: ["2": "integer"]} run/0: ingredient 0 is 1 mem/0: location 1 is 34 run/0: ingredient 1 is 2 diff --git a/cpp/.traces/first_scenario_checking_trace b/cpp/.traces/first_scenario_checking_trace index 0d7566ff..109fed69 100644 --- a/cpp/.traces/first_scenario_checking_trace +++ b/cpp/.traces/first_scenario_checking_trace @@ -7,6 +7,7 @@ after-brace/0: add ... new/0: routine allocated memory from 1000 to 101000 schedule/0: test-first_scenario_checking_trace run/0: instruction test-first_scenario_checking_trace/0 +run/0: {name: "1", value: 1, type: 1, properties: ["1": "integer"]} <- add {name: "2", value: 2, type: 0, properties: ["2": "literal"]}, {name: "2", value: 2, type: 0, properties: ["2": "literal"]} run/0: ingredient 0 is 2 run/0: ingredient 1 is 2 run/0: product 0 is 4 diff --git a/cpp/.traces/first_scenario_checking_trace_negative b/cpp/.traces/first_scenario_checking_trace_negative index d84f4e82..0214db4e 100644 --- a/cpp/.traces/first_scenario_checking_trace_negative +++ b/cpp/.traces/first_scenario_checking_trace_negative @@ -7,6 +7,7 @@ after-brace/0: add ... new/0: routine allocated memory from 1000 to 101000 schedule/0: test-first_scenario_checking_trace_negative run/0: instruction test-first_scenario_checking_trace_negative/0 +run/0: {name: "1", value: 1, type: 1, properties: ["1": "integer"]} <- add {name: "2", value: 2, type: 0, properties: ["2": "literal"]}, {name: "2", value: 2, type: 0, properties: ["2": "literal"]} run/0: ingredient 0 is 2 run/0: ingredient 1 is 2 run/0: product 0 is 4 diff --git a/cpp/.traces/first_scenario_in_mu b/cpp/.traces/first_scenario_in_mu index 6b664104..9e02c432 100644 --- a/cpp/.traces/first_scenario_in_mu +++ b/cpp/.traces/first_scenario_in_mu @@ -7,6 +7,7 @@ after-brace/0: add ... new/0: routine allocated memory from 1000 to 101000 schedule/0: test-first_scenario_in_mu run/0: instruction test-first_scenario_in_mu/0 +run/0: {name: "1", value: 1, type: 1, properties: ["1": "integer"]} <- add {name: "2", value: 2, type: 0, properties: ["2": "literal"]}, {name: "2", value: 2, type: 0, properties: ["2": "literal"]} run/0: ingredient 0 is 2 run/0: ingredient 1 is 2 run/0: product 0 is 4 diff --git a/cpp/.traces/get b/cpp/.traces/get index 22a263e7..1e3db5f3 100644 --- a/cpp/.traces/get +++ b/cpp/.traces/get @@ -15,12 +15,15 @@ after-brace/0: get ... new/0: routine allocated memory from 1000 to 101000 schedule/0: main run/0: instruction main/0 +run/0: {name: "12", value: 12, type: 1, properties: ["12": "integer"]} <- copy {name: "34", value: 34, type: 0, properties: ["34": "literal"]} run/0: ingredient 0 is 34 mem/0: storing 34 in location 12 run/0: instruction main/1 +run/0: {name: "13", value: 13, type: 1, properties: ["13": "integer"]} <- copy {name: "35", value: 35, type: 0, properties: ["35": "literal"]} run/0: ingredient 0 is 35 mem/0: storing 35 in location 13 run/0: instruction main/2 +run/0: {name: "15", value: 15, type: 1, properties: ["15": "integer"]} <- get {name: "12", value: 12, type: 6, properties: ["12": "point"]}, {name: "1", value: 1, type: 0, properties: ["1": "offset"]} run/0: ingredient 0 is 12 run/0: ingredient 1 is 1 run/0: address to copy is 13 diff --git a/cpp/.traces/get_address b/cpp/.traces/get_address index a08a0ba4..3238f4eb 100644 --- a/cpp/.traces/get_address +++ b/cpp/.traces/get_address @@ -15,12 +15,15 @@ after-brace/0: get-address ... new/0: routine allocated memory from 1000 to 101000 schedule/0: main run/0: instruction main/0 +run/0: {name: "12", value: 12, type: 1, properties: ["12": "integer"]} <- copy {name: "34", value: 34, type: 0, properties: ["34": "literal"]} run/0: ingredient 0 is 34 mem/0: storing 34 in location 12 run/0: instruction main/1 +run/0: {name: "13", value: 13, type: 1, properties: ["13": "integer"]} <- copy {name: "35", value: 35, type: 0, properties: ["35": "literal"]} run/0: ingredient 0 is 35 mem/0: storing 35 in location 13 run/0: instruction main/2 +run/0: {name: "15", value: 15, type: 2-1, properties: ["15": "address":"integer"]} <- get-address {name: "12", value: 12, type: 6, properties: ["12": "point"]}, {name: "1", value: 1, type: 0, properties: ["1": "offset"]} run/0: ingredient 0 is 12 run/0: ingredient 1 is 1 run/0: address to copy is 13 diff --git a/cpp/.traces/get_address_indirect b/cpp/.traces/get_address_indirect index e933a536..40f315d2 100644 --- a/cpp/.traces/get_address_indirect +++ b/cpp/.traces/get_address_indirect @@ -19,15 +19,19 @@ after-brace/0: get-address ... new/0: routine allocated memory from 1000 to 101000 schedule/0: main run/0: instruction main/0 +run/0: {name: "1", value: 1, type: 1, properties: ["1": "integer"]} <- copy {name: "2", value: 2, type: 0, properties: ["2": "literal"]} run/0: ingredient 0 is 2 mem/0: storing 2 in location 1 run/0: instruction main/1 +run/0: {name: "2", value: 2, type: 1, properties: ["2": "integer"]} <- copy {name: "34", value: 34, type: 0, properties: ["34": "literal"]} run/0: ingredient 0 is 34 mem/0: storing 34 in location 2 run/0: instruction main/2 +run/0: {name: "3", value: 3, type: 1, properties: ["3": "integer"]} <- copy {name: "35", value: 35, type: 0, properties: ["35": "literal"]} run/0: ingredient 0 is 35 mem/0: storing 35 in location 3 run/0: instruction main/3 +run/0: {name: "4", value: 4, type: 1, properties: ["4": "integer"]} <- get-address {name: "1", value: 1, type: 2-6, properties: ["1": "address":"point", "deref": ]}, {name: "0", value: 0, type: 0, properties: ["0": "offset"]} run/0: ingredient 0 is 1 mem/0: location 1 is 2 run/0: ingredient 1 is 0 diff --git a/cpp/.traces/get_default_space b/cpp/.traces/get_default_space index c24a357c..e9a108ab 100644 --- a/cpp/.traces/get_default_space +++ b/cpp/.traces/get_default_space @@ -10,7 +10,9 @@ after-brace/0: copy ... 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"]} <- copy {name: "10", value: 10, type: 0, properties: ["10": "literal"]} run/0: ingredient 0 is 10 run/0: instruction main/1 +run/0: {name: "1", value: 1, type: 1, properties: ["1": "integer", "raw": ]} <- copy {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} run/0: ingredient 0 is default-space mem/0: storing 10 in location 1 diff --git a/cpp/.traces/get_handles_nested_container_elements b/cpp/.traces/get_handles_nested_container_elements index 15563354..c91a14a1 100644 --- a/cpp/.traces/get_handles_nested_container_elements +++ b/cpp/.traces/get_handles_nested_container_elements @@ -19,15 +19,19 @@ after-brace/0: get ... new/0: routine allocated memory from 1000 to 101000 schedule/0: main run/0: instruction main/0 +run/0: {name: "12", value: 12, type: 1, properties: ["12": "integer"]} <- copy {name: "34", value: 34, type: 0, properties: ["34": "literal"]} run/0: ingredient 0 is 34 mem/0: storing 34 in location 12 run/0: instruction main/1 +run/0: {name: "13", value: 13, type: 1, properties: ["13": "integer"]} <- copy {name: "35", value: 35, type: 0, properties: ["35": "literal"]} run/0: ingredient 0 is 35 mem/0: storing 35 in location 13 run/0: instruction main/2 +run/0: {name: "14", value: 14, type: 1, properties: ["14": "integer"]} <- copy {name: "36", value: 36, type: 0, properties: ["36": "literal"]} run/0: ingredient 0 is 36 mem/0: storing 36 in location 14 run/0: instruction main/3 +run/0: {name: "15", value: 15, type: 1, properties: ["15": "integer"]} <- get {name: "12", value: 12, type: 7, properties: ["12": "point-integer"]}, {name: "1", value: 1, type: 0, properties: ["1": "offset"]} run/0: ingredient 0 is 12 run/0: ingredient 1 is 1 run/0: address to copy is 14 diff --git a/cpp/.traces/get_indirect b/cpp/.traces/get_indirect index abf734c2..4a276e98 100644 --- a/cpp/.traces/get_indirect +++ b/cpp/.traces/get_indirect @@ -19,15 +19,19 @@ after-brace/0: get ... new/0: routine allocated memory from 1000 to 101000 schedule/0: main run/0: instruction main/0 +run/0: {name: "1", value: 1, type: 1, properties: ["1": "integer"]} <- copy {name: "2", value: 2, type: 0, properties: ["2": "literal"]} run/0: ingredient 0 is 2 mem/0: storing 2 in location 1 run/0: instruction main/1 +run/0: {name: "2", value: 2, type: 1, properties: ["2": "integer"]} <- copy {name: "34", value: 34, type: 0, properties: ["34": "literal"]} run/0: ingredient 0 is 34 mem/0: storing 34 in location 2 run/0: instruction main/2 +run/0: {name: "3", value: 3, type: 1, properties: ["3": "integer"]} <- copy {name: "35", value: 35, type: 0, properties: ["35": "literal"]} run/0: ingredient 0 is 35 mem/0: storing 35 in location 3 run/0: instruction main/3 +run/0: {name: "4", value: 4, type: 1, properties: ["4": "integer"]} <- get {name: "1", value: 1, type: 2-6, properties: ["1": "address":"point", "deref": ]}, {name: "0", value: 0, type: 0, properties: ["0": "offset"]} run/0: ingredient 0 is 1 mem/0: location 1 is 2 run/0: ingredient 1 is 0 diff --git a/cpp/.traces/greater_or_equal b/cpp/.traces/greater_or_equal index 8f20b947..59f290c0 100644 --- a/cpp/.traces/greater_or_equal +++ b/cpp/.traces/greater_or_equal @@ -15,12 +15,15 @@ after-brace/0: greater-or-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: 1, properties: ["1": "integer"]} <- copy {name: "34", value: 34, type: 0, properties: ["34": "literal"]} run/0: ingredient 0 is 34 mem/0: storing 34 in location 1 run/0: instruction main/1 +run/0: {name: "2", value: 2, type: 1, properties: ["2": "integer"]} <- copy {name: "33", value: 33, type: 0, properties: ["33": "literal"]} run/0: ingredient 0 is 33 mem/0: storing 33 in location 2 run/0: instruction main/2 +run/0: {name: "3", value: 3, type: 1, properties: ["3": "integer"]} <- greater-or-equal {name: "1", value: 1, type: 1, properties: ["1": "integer"]}, {name: "2", value: 2, type: 1, properties: ["2": "integer"]} run/0: ingredient 0 is 1 mem/0: location 1 is 34 run/0: ingredient 1 is 2 diff --git a/cpp/.traces/greater_or_equal2 b/cpp/.traces/greater_or_equal2 index dc98460f..4f85470f 100644 --- a/cpp/.traces/greater_or_equal2 +++ b/cpp/.traces/greater_or_equal2 @@ -15,12 +15,15 @@ after-brace/0: greater-or-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: 1, properties: ["1": "integer"]} <- copy {name: "34", value: 34, type: 0, properties: ["34": "literal"]} run/0: ingredient 0 is 34 mem/0: storing 34 in location 1 run/0: instruction main/1 +run/0: {name: "2", value: 2, type: 1, properties: ["2": "integer"]} <- copy {name: "34", value: 34, type: 0, properties: ["34": "literal"]} run/0: ingredient 0 is 34 mem/0: storing 34 in location 2 run/0: instruction main/2 +run/0: {name: "3", value: 3, type: 1, properties: ["3": "integer"]} <- greater-or-equal {name: "1", value: 1, type: 1, properties: ["1": "integer"]}, {name: "2", value: 2, type: 1, properties: ["2": "integer"]} run/0: ingredient 0 is 1 mem/0: location 1 is 34 run/0: ingredient 1 is 2 diff --git a/cpp/.traces/greater_or_equal3 b/cpp/.traces/greater_or_equal3 index 53bf6b3b..2b43292f 100644 --- a/cpp/.traces/greater_or_equal3 +++ b/cpp/.traces/greater_or_equal3 @@ -15,12 +15,15 @@ after-brace/0: greater-or-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: 1, properties: ["1": "integer"]} <- copy {name: "34", value: 34, type: 0, properties: ["34": "literal"]} run/0: ingredient 0 is 34 mem/0: storing 34 in location 1 run/0: instruction main/1 +run/0: {name: "2", value: 2, type: 1, properties: ["2": "integer"]} <- copy {name: "35", value: 35, type: 0, properties: ["35": "literal"]} run/0: ingredient 0 is 35 mem/0: storing 35 in location 2 run/0: instruction main/2 +run/0: {name: "3", value: 3, type: 1, properties: ["3": "integer"]} <- greater-or-equal {name: "1", value: 1, type: 1, properties: ["1": "integer"]}, {name: "2", value: 2, type: 1, properties: ["2": "integer"]} run/0: ingredient 0 is 1 mem/0: location 1 is 34 run/0: ingredient 1 is 2 diff --git a/cpp/.traces/greater_than b/cpp/.traces/greater_than index 648d5e5a..211983c3 100644 --- a/cpp/.traces/greater_than +++ b/cpp/.traces/greater_than @@ -15,12 +15,15 @@ after-brace/0: greater-than ... new/0: routine allocated memory from 1000 to 101000 schedule/0: main run/0: instruction main/0 +run/0: {name: "1", value: 1, type: 1, properties: ["1": "integer"]} <- copy {name: "34", value: 34, type: 0, properties: ["34": "literal"]} run/0: ingredient 0 is 34 mem/0: storing 34 in location 1 run/0: instruction main/1 +run/0: {name: "2", value: 2, type: 1, properties: ["2": "integer"]} <- copy {name: "33", value: 33, type: 0, properties: ["33": "literal"]} run/0: ingredient 0 is 33 mem/0: storing 33 in location 2 run/0: instruction main/2 +run/0: {name: "3", value: 3, type: 1, properties: ["3": "integer"]} <- greater-than {name: "1", value: 1, type: 1, properties: ["1": "integer"]}, {name: "2", value: 2, type: 1, properties: ["2": "integer"]} run/0: ingredient 0 is 1 mem/0: location 1 is 34 run/0: ingredient 1 is 2 diff --git a/cpp/.traces/greater_than2 b/cpp/.traces/greater_than2 index 50a39727..b9ee951e 100644 --- a/cpp/.traces/greater_than2 +++ b/cpp/.traces/greater_than2 @@ -15,12 +15,15 @@ after-brace/0: greater-than ... new/0: routine allocated memory from 1000 to 101000 schedule/0: main run/0: instruction main/0 +run/0: {name: "1", value: 1, type: 1, properties: ["1": "integer"]} <- copy {name: "34", value: 34, type: 0, properties: ["34": "literal"]} run/0: ingredient 0 is 34 mem/0: storing 34 in location 1 run/0: instruction main/1 +run/0: {name: "2", value: 2, type: 1, properties: ["2": "integer"]} <- copy {name: "34", value: 34, type: 0, properties: ["34": "literal"]} run/0: ingredient 0 is 34 mem/0: storing 34 in location 2 run/0: instruction main/2 +run/0: {name: "3", value: 3, type: 1, properties: ["3": "integer"]} <- greater-than {name: "1", value: 1, type: 1, properties: ["1": "integer"]}, {name: "2", value: 2, type: 1, properties: ["2": "integer"]} run/0: ingredient 0 is 1 mem/0: location 1 is 34 run/0: ingredient 1 is 2 diff --git a/cpp/.traces/include_nonderef_properties b/cpp/.traces/include_nonderef_properties index 184127b8..7a073504 100644 --- a/cpp/.traces/include_nonderef_properties +++ b/cpp/.traces/include_nonderef_properties @@ -19,15 +19,19 @@ after-brace/0: get ... new/0: routine allocated memory from 1000 to 101000 schedule/0: main run/0: instruction main/0 +run/0: {name: "1", value: 1, type: 1, properties: ["1": "integer"]} <- copy {name: "2", value: 2, type: 0, properties: ["2": "literal"]} run/0: ingredient 0 is 2 mem/0: storing 2 in location 1 run/0: instruction main/1 +run/0: {name: "2", value: 2, type: 1, properties: ["2": "integer"]} <- copy {name: "34", value: 34, type: 0, properties: ["34": "literal"]} run/0: ingredient 0 is 34 mem/0: storing 34 in location 2 run/0: instruction main/2 +run/0: {name: "3", value: 3, type: 1, properties: ["3": "integer"]} <- copy {name: "35", value: 35, type: 0, properties: ["35": "literal"]} run/0: ingredient 0 is 35 mem/0: storing 35 in location 3 run/0: instruction main/3 +run/0: {name: "4", value: 4, type: 1, properties: ["4": "integer"]} <- get {name: "1", value: 1, type: 2-6, properties: ["1": "address":"point", "deref": , "foo": ]}, {name: "0", value: 0, type: 0, properties: ["0": "offset"]} run/0: ingredient 0 is 1 mem/0: location 1 is 2 run/0: ingredient 1 is 0 diff --git a/cpp/.traces/index b/cpp/.traces/index index 2ff0d46a..ed5c0662 100644 --- a/cpp/.traces/index +++ b/cpp/.traces/index @@ -23,18 +23,23 @@ 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: 1, properties: ["1": "integer"]} <- copy {name: "3", value: 3, type: 0, properties: ["3": "literal"]} run/0: ingredient 0 is 3 mem/0: storing 3 in location 1 run/0: instruction main/1 +run/0: {name: "2", value: 2, type: 1, properties: ["2": "integer"]} <- copy {name: "14", value: 14, type: 0, properties: ["14": "literal"]} run/0: ingredient 0 is 14 mem/0: storing 14 in location 2 run/0: instruction main/2 +run/0: {name: "3", value: 3, type: 1, properties: ["3": "integer"]} <- copy {name: "15", value: 15, type: 0, properties: ["15": "literal"]} run/0: ingredient 0 is 15 mem/0: storing 15 in location 3 run/0: instruction main/3 +run/0: {name: "4", value: 4, type: 1, properties: ["4": "integer"]} <- copy {name: "16", value: 16, type: 0, properties: ["16": "literal"]} run/0: ingredient 0 is 16 mem/0: storing 16 in location 4 run/0: instruction main/4 +run/0: {name: "5", value: 5, type: 1, properties: ["5": "integer"]} <- index {name: "1", value: 1, type: 5-1, properties: ["1": "array":"integer"]}, {name: "0", value: 0, type: 0, properties: ["0": "literal"]} run/0: ingredient 0 is {name: "1", value: 1, type: 5-1, properties: ["1": "array":"integer"]} run/0: ingredient 1 is {name: "0", value: 0, type: 0, properties: ["0": "literal"]} run/0: address to copy is 2 diff --git a/cpp/.traces/index_address b/cpp/.traces/index_address index 57e6b672..7041c06a 100644 --- a/cpp/.traces/index_address +++ b/cpp/.traces/index_address @@ -23,18 +23,23 @@ after-brace/0: index-address ... new/0: routine allocated memory from 1000 to 101000 schedule/0: main run/0: instruction main/0 +run/0: {name: "1", value: 1, type: 1, properties: ["1": "integer"]} <- copy {name: "3", value: 3, type: 0, properties: ["3": "literal"]} run/0: ingredient 0 is 3 mem/0: storing 3 in location 1 run/0: instruction main/1 +run/0: {name: "2", value: 2, type: 1, properties: ["2": "integer"]} <- copy {name: "14", value: 14, type: 0, properties: ["14": "literal"]} run/0: ingredient 0 is 14 mem/0: storing 14 in location 2 run/0: instruction main/2 +run/0: {name: "3", value: 3, type: 1, properties: ["3": "integer"]} <- copy {name: "15", value: 15, type: 0, properties: ["15": "literal"]} run/0: ingredient 0 is 15 mem/0: storing 15 in location 3 run/0: instruction main/3 +run/0: {name: "4", value: 4, type: 1, properties: ["4": "integer"]} <- copy {name: "16", value: 16, type: 0, properties: ["16": "literal"]} run/0: ingredient 0 is 16 mem/0: storing 16 in location 4 run/0: instruction main/4 +run/0: {name: "5", value: 5, type: 1, properties: ["5": "integer"]} <- index-address {name: "1", value: 1, type: 5-1, properties: ["1": "array":"integer"]}, {name: "0", value: 0, type: 0, properties: ["0": "literal"]} run/0: ingredient 0 is 1 run/0: ingredient 1 is {name: "0", value: 0, type: 0, properties: ["0": "literal"]} run/0: address to copy is 2 diff --git a/cpp/.traces/index_direct_offset b/cpp/.traces/index_direct_offset index 4b15fa3b..c31f843e 100644 --- a/cpp/.traces/index_direct_offset +++ b/cpp/.traces/index_direct_offset @@ -27,21 +27,27 @@ 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: 1, properties: ["1": "integer"]} <- copy {name: "3", value: 3, type: 0, properties: ["3": "literal"]} run/0: ingredient 0 is 3 mem/0: storing 3 in location 1 run/0: instruction main/1 +run/0: {name: "2", value: 2, type: 1, properties: ["2": "integer"]} <- copy {name: "14", value: 14, type: 0, properties: ["14": "literal"]} run/0: ingredient 0 is 14 mem/0: storing 14 in location 2 run/0: instruction main/2 +run/0: {name: "3", value: 3, type: 1, properties: ["3": "integer"]} <- copy {name: "15", value: 15, type: 0, properties: ["15": "literal"]} run/0: ingredient 0 is 15 mem/0: storing 15 in location 3 run/0: instruction main/3 +run/0: {name: "4", value: 4, type: 1, properties: ["4": "integer"]} <- copy {name: "16", value: 16, type: 0, properties: ["16": "literal"]} run/0: ingredient 0 is 16 mem/0: storing 16 in location 4 run/0: instruction main/4 +run/0: {name: "5", value: 5, type: 1, properties: ["5": "integer"]} <- copy {name: "0", value: 0, type: 0, properties: ["0": "literal"]} run/0: ingredient 0 is 0 mem/0: storing 0 in location 5 run/0: instruction main/5 +run/0: {name: "6", value: 6, type: 1, properties: ["6": "integer"]} <- index {name: "1", value: 1, type: 5-1, properties: ["1": "array":"integer"]}, {name: "5", value: 5, type: 1, properties: ["5": "integer"]} run/0: ingredient 0 is {name: "1", value: 1, type: 5-1, properties: ["1": "array":"integer"]} run/0: ingredient 1 is {name: "5", value: 5, type: 1, properties: ["5": "integer"]} mem/0: location 5 is 0 diff --git a/cpp/.traces/index_indirect b/cpp/.traces/index_indirect index d2963e34..ef73381b 100644 --- a/cpp/.traces/index_indirect +++ b/cpp/.traces/index_indirect @@ -27,21 +27,27 @@ 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: 1, properties: ["1": "integer"]} <- copy {name: "3", value: 3, type: 0, properties: ["3": "literal"]} run/0: ingredient 0 is 3 mem/0: storing 3 in location 1 run/0: instruction main/1 +run/0: {name: "2", value: 2, type: 1, properties: ["2": "integer"]} <- copy {name: "14", value: 14, type: 0, properties: ["14": "literal"]} run/0: ingredient 0 is 14 mem/0: storing 14 in location 2 run/0: instruction main/2 +run/0: {name: "3", value: 3, type: 1, properties: ["3": "integer"]} <- copy {name: "15", value: 15, type: 0, properties: ["15": "literal"]} run/0: ingredient 0 is 15 mem/0: storing 15 in location 3 run/0: instruction main/3 +run/0: {name: "4", value: 4, type: 1, properties: ["4": "integer"]} <- copy {name: "16", value: 16, type: 0, properties: ["16": "literal"]} run/0: ingredient 0 is 16 mem/0: storing 16 in location 4 run/0: instruction main/4 +run/0: {name: "5", value: 5, type: 2-5-1, properties: ["5": "address":"array":"integer"]} <- copy {name: "1", value: 1, type: 0, properties: ["1": "literal"]} run/0: ingredient 0 is 1 mem/0: storing 1 in location 5 run/0: instruction main/5 +run/0: {name: "6", value: 6, type: 1, properties: ["6": "integer"]} <- index {name: "5", value: 5, type: 2-5-1, properties: ["5": "address":"array":"integer", "deref": ]}, {name: "1", value: 1, type: 0, properties: ["1": "literal"]} run/0: ingredient 0 is {name: "5", value: 5, type: 2-5-1, properties: ["5": "address":"array":"integer", "deref": ]} mem/0: location 5 is 1 run/0: ingredient 1 is {name: "1", value: 1, type: 0, properties: ["1": "literal"]} diff --git a/cpp/.traces/ingredient b/cpp/.traces/ingredient index ae8b90f3..26deed09 100644 --- a/cpp/.traces/ingredient +++ b/cpp/.traces/ingredient @@ -15,8 +15,11 @@ after-brace/0: next-ingredient ... new/0: routine allocated memory from 1000 to 101000 schedule/0: main run/0: instruction main/0 +run/0: f {name: "1", value: 1, type: 0, properties: ["1": "literal"]}, {name: "2", value: 2, type: 0, properties: ["2": "literal"]} run/0: instruction f/0 +run/0: {name: "12", value: 12, type: 1, properties: ["12": "integer"]} <- ingredient {name: "1", value: 1, type: 0, properties: ["1": "literal"]} run/0: product 0 is 2 mem/0: storing 2 in location 12 run/0: instruction f/1 +run/0: {name: "13", value: 13, type: 1, properties: ["13": "integer"]}, {name: "1", value: 1, type: 3, properties: ["1": "boolean"]} <- next-ingredient mem/0: storing 0 in location 1 diff --git a/cpp/.traces/integer-to-decimal-digit-negative b/cpp/.traces/integer-to-decimal-digit-negative index 05521c72..39d56dd2 100644 --- a/cpp/.traces/integer-to-decimal-digit-negative +++ b/cpp/.traces/integer-to-decimal-digit-negative @@ -10,34 +10,43 @@ after-brace/0: copy ... new/0: routine allocated memory from 1000 to 101000 schedule/0: test-integer-to-decimal-digit-negative run/0: instruction test-integer-to-decimal-digit-negative/0 +run/0: {name: "1", value: 1, type: 2-5-4, properties: ["1": "address":"array":"character", "raw": ]} <- integer-to-decimal-string {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 {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 +run/0: {name: "n", value: 1, type: 1, properties: ["n": "integer"]} <- next-ingredient run/0: product 0 is -1 mem/0: storing -1 in location 1002 run/0: instruction integer-to-decimal-string/3 +run/0: break-if {name: "n", value: 1, type: 1, properties: ["n": "integer"]}, {name: "", value: 2, type: , properties: ["": ]} mem/0: location 1002 is -1 run/0: ingredient 0 is -1 run/0: ingredient 1 is run/0: jumping to instruction 6 run/0: instruction integer-to-decimal-string/7 +run/0: {name: "negate-result", value: 3, type: 3, properties: ["negate-result": "boolean"]} <- copy {name: "0", value: 0, type: 0, properties: ["0": "literal"]} run/0: ingredient 0 is 0 mem/0: storing 0 in location 1004 run/0: instruction integer-to-decimal-string/9 +run/0: {name: "negative?", value: 4, type: 3, properties: ["negative?": "boolean"]} <- lesser-than {name: "n", value: 1, type: 1, properties: ["n": "integer"]}, {name: "0", value: 0, type: 0, properties: ["0": "literal"]} run/0: ingredient 0 is n mem/0: location 1002 is -1 run/0: ingredient 1 is 0 run/0: product 0 is 1 mem/0: storing 1 in location 1005 run/0: instruction integer-to-decimal-string/10 +run/0: break-unless {name: "negative?", value: 4, type: 3, properties: ["negative?": "boolean"]}, {name: "", value: 2, type: , properties: ["": ]} mem/0: location 1005 is 1 run/0: ingredient 0 is 1 run/0: jump-unless fell through run/0: instruction integer-to-decimal-string/11 +run/0: {name: "negate-result", value: 3, type: 3, properties: ["negate-result": "boolean"]} <- copy {name: "1", value: 1, type: 0, properties: ["1": "literal"]} run/0: ingredient 0 is 1 mem/0: storing 1 in location 1004 run/0: instruction integer-to-decimal-string/12 +run/0: {name: "n", value: 1, type: 1, properties: ["n": "integer"]} <- multiply {name: "n", value: 1, type: 1, properties: ["n": "integer"]}, {name: "-1", value: -1, type: 0, properties: ["-1": "literal"]} run/0: ingredient 0 is n mem/0: location 1002 is -1 run/0: ingredient 1 is -1 @@ -45,13 +54,17 @@ run/0: ingredient 1 is -1 run/0: product 0 is 1 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 {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 {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: 1030 run/0: instruction init-buffer/1 +run/0: {name: "result", value: 1, type: 2-9, properties: ["result": "address":"buffer"]} <- new {name: "buffer", value: 9, type: 0, properties: ["buffer": "type"]} mem/0: new alloc: 1060 mem/0: storing 1060 in location 1032 run/0: instruction init-buffer/2 +run/0: {name: "len", value: 2, type: 2-1, properties: ["len": "address":"integer"]} <- get-address {name: "result", value: 1, type: 2-9, properties: ["result": "address":"buffer", "deref": ]}, {name: "length", value: 0, type: 0, properties: ["length": "offset"]} run/0: ingredient 0 is result mem/0: location 1032 is 1060 run/0: ingredient 1 is length @@ -59,10 +72,12 @@ run/0: address to copy is 1060 run/0: product 0 is 1060 mem/0: storing 1060 in location 1033 run/0: instruction init-buffer/3 +run/0: {name: "len", value: 2, type: 2-1, properties: ["len": "address":"integer", "deref": ]} <- copy {name: "0", value: 0, type: 0, properties: ["0": "literal"]} run/0: ingredient 0 is 0 mem/0: location 1033 is 1060 mem/0: storing 0 in location 1060 run/0: instruction init-buffer/4 +run/0: {name: "s", value: 3, type: 2-2-5-4, properties: ["s": "address":"address":"array":"character"]} <- get-address {name: "result", value: 1, type: 2-9, properties: ["result": "address":"buffer", "deref": ]}, {name: "data", value: 1, type: 0, properties: ["data": "offset"]} run/0: ingredient 0 is result mem/0: location 1032 is 1060 run/0: ingredient 1 is data @@ -70,32 +85,39 @@ run/0: address to copy is 1061 run/0: product 0 is 1061 mem/0: storing 1061 in location 1034 run/0: instruction init-buffer/5 +run/0: {name: "capacity", value: 4, type: 1, properties: ["capacity": "integer"]} <- next-ingredient run/0: product 0 is 30 mem/0: storing 30 in location 1035 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 {name: "character", value: 4, type: 0, properties: ["character": "type"]}, {name: "capacity", value: 4, type: 1, properties: ["capacity": "integer"]} mem/0: location 1035 is 30 mem/0: array size is 30 mem/0: new alloc: 1062 mem/0: location 1034 is 1061 mem/0: storing 1062 in location 1061 run/0: instruction init-buffer/7 +run/0: reply {name: "result", value: 1, type: 2-9, properties: ["result": "address":"buffer"]} mem/0: location 1032 is 1060 run/0: result 0 is 1060 mem/0: storing 1060 in location 1006 run/0: instruction integer-to-decimal-string/15 +run/0: {name: "digit-base", value: 6, type: 1, properties: ["digit-base": "integer"]} <- copy {name: "48", value: 48, type: 0, properties: ["48": "literal"]} run/0: ingredient 0 is 48 mem/0: storing 48 in location 1007 run/0: instruction integer-to-decimal-string/17 +run/0: {name: "done?", value: 7, type: 3, properties: ["done?": "boolean"]} <- equal {name: "n", value: 1, type: 1, properties: ["n": "integer"]}, {name: "0", value: 0, type: 0, properties: ["0": "literal"]} run/0: ingredient 0 is n mem/0: location 1002 is 1 run/0: ingredient 1 is 0 run/0: product 0 is 0 mem/0: storing 0 in location 1008 run/0: instruction integer-to-decimal-string/18 +run/0: break-if {name: "done?", value: 7, type: 3, properties: ["done?": "boolean"]}, {name: "", value: 4, type: , properties: ["": ]} mem/0: location 1008 is 0 run/0: ingredient 0 is 0 run/0: jump-if fell through run/0: instruction integer-to-decimal-string/19 +run/0: {name: "n", value: 1, type: 1, properties: ["n": "integer"]}, {name: "digit", value: 8, type: 1, properties: ["digit": "integer"]} <- divide-with-remainder {name: "n", value: 1, type: 1, properties: ["n": "integer"]}, {name: "10", value: 10, type: 0, properties: ["10": "literal"]} run/0: ingredient 0 is n mem/0: location 1002 is 1 run/0: ingredient 1 is 10 @@ -104,6 +126,7 @@ mem/0: storing 0 in location 1002 run/0: product 1 is 1 mem/0: storing 1 in location 1009 run/0: instruction integer-to-decimal-string/20 +run/0: {name: "c", value: 9, type: 4, properties: ["c": "character"]} <- add {name: "digit-base", value: 6, type: 1, properties: ["digit-base": "integer"]}, {name: "digit", value: 8, type: 1, properties: ["digit": "integer"]} run/0: ingredient 0 is digit-base mem/0: location 1007 is 48 run/0: ingredient 1 is digit @@ -111,26 +134,34 @@ mem/0: location 1009 is 1 run/0: product 0 is 49 mem/0: storing 49 in location 1010 run/0: instruction integer-to-decimal-string/21 +run/0: {name: "tmp", value: 5, type: 2-9, properties: ["tmp": "address":"buffer"]} <- buffer-append {name: "tmp", value: 5, type: 2-9, properties: ["tmp": "address":"buffer"]}, {name: "c", value: 9, type: 4, properties: ["c": "character"]} mem/0: location 1006 is 1060 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 {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: 1092 run/0: instruction buffer-append/1 +run/0: {name: "in", value: 1, type: 2-9, properties: ["in": "address":"buffer"]} <- next-ingredient run/0: product 0 is 1060 mem/0: storing 1060 in location 1094 run/0: instruction buffer-append/2 +run/0: {name: "c", value: 2, type: 4, properties: ["c": "character"]} <- next-ingredient run/0: product 0 is 49 mem/0: storing 49 in location 1095 run/0: instruction buffer-append/4 +run/0: {name: "full?", value: 3, type: 3, properties: ["full?": "boolean"]} <- buffer-full? {name: "in", value: 1, type: 2-9, properties: ["in": "address":"buffer"]} mem/0: location 1094 is 1060 run/0: instruction buffer-full?/0 +run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new {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: 1122 run/0: instruction buffer-full?/1 +run/0: {name: "in", value: 1, type: 2-9, properties: ["in": "address":"buffer"]} <- next-ingredient run/0: product 0 is 1060 mem/0: storing 1060 in location 1124 run/0: instruction buffer-full?/2 +run/0: {name: "len", value: 2, type: 1, properties: ["len": "integer"]} <- get {name: "in", value: 1, type: 2-9, properties: ["in": "address":"buffer", "deref": ]}, {name: "length", value: 0, type: 0, properties: ["length": "offset"]} run/0: ingredient 0 is in mem/0: location 1124 is 1060 run/0: ingredient 1 is length @@ -140,6 +171,7 @@ mem/0: location 1060 is 0 run/0: product 0 is 0 mem/0: storing 0 in location 1125 run/0: instruction buffer-full?/3 +run/0: {name: "s", value: 3, type: 2-5-4, properties: ["s": "address":"array":"character"]} <- get {name: "in", value: 1, type: 2-9, properties: ["in": "address":"buffer", "deref": ]}, {name: "data", value: 1, type: 0, properties: ["data": "offset"]} run/0: ingredient 0 is in mem/0: location 1124 is 1060 run/0: ingredient 1 is data @@ -149,9 +181,11 @@ mem/0: location 1061 is 1062 run/0: product 0 is 1062 mem/0: storing 1062 in location 1126 run/0: instruction buffer-full?/4 +run/0: {name: "capacity", value: 4, type: 1, properties: ["capacity": "integer"]} <- length {name: "s", value: 3, type: 2-5-4, properties: ["s": "address":"array":"character", "deref": ]} mem/0: location 1126 is 1062 mem/0: storing 30 in location 1127 run/0: instruction buffer-full?/5 +run/0: {name: "result", value: 5, type: 3, properties: ["result": "boolean"]} <- greater-or-equal {name: "len", value: 2, type: 1, properties: ["len": "integer"]}, {name: "capacity", value: 4, type: 1, properties: ["capacity": "integer"]} run/0: ingredient 0 is len mem/0: location 1125 is 0 run/0: ingredient 1 is capacity @@ -159,15 +193,18 @@ mem/0: location 1127 is 30 run/0: product 0 is 0 mem/0: storing 0 in location 1128 run/0: instruction buffer-full?/6 +run/0: reply {name: "result", value: 5, type: 3, properties: ["result": "boolean"]} mem/0: location 1128 is 0 run/0: result 0 is 0 mem/0: storing 0 in location 1096 run/0: instruction buffer-append/5 +run/0: break-unless {name: "full?", value: 3, type: 3, properties: ["full?": "boolean"]}, {name: "", value: 1, type: , properties: ["": ]} mem/0: location 1096 is 0 run/0: ingredient 0 is 0 run/0: ingredient 1 is run/0: jumping to instruction 7 run/0: instruction buffer-append/8 +run/0: {name: "len", value: 4, type: 2-1, properties: ["len": "address":"integer"]} <- get-address {name: "in", value: 1, type: 2-9, properties: ["in": "address":"buffer", "deref": ]}, {name: "length", value: 0, type: 0, properties: ["length": "offset"]} run/0: ingredient 0 is in mem/0: location 1094 is 1060 run/0: ingredient 1 is length @@ -175,6 +212,7 @@ run/0: address to copy is 1060 run/0: product 0 is 1060 mem/0: storing 1060 in location 1097 run/0: instruction buffer-append/9 +run/0: {name: "s", value: 5, type: 2-5-4, properties: ["s": "address":"array":"character"]} <- get {name: "in", value: 1, type: 2-9, properties: ["in": "address":"buffer", "deref": ]}, {name: "data", value: 1, type: 0, properties: ["data": "offset"]} run/0: ingredient 0 is in mem/0: location 1094 is 1060 run/0: ingredient 1 is data @@ -184,6 +222,7 @@ mem/0: location 1061 is 1062 run/0: product 0 is 1062 mem/0: storing 1062 in location 1098 run/0: instruction buffer-append/10 +run/0: {name: "dest", value: 6, type: 2-4, properties: ["dest": "address":"character"]} <- index-address {name: "s", value: 5, type: 2-5-4, properties: ["s": "address":"array":"character", "deref": ]}, {name: "len", value: 4, type: 2-1, properties: ["len": "address":"integer", "deref": ]} run/0: ingredient 0 is s mem/0: location 1098 is 1062 run/0: ingredient 1 is {name: "len", value: 4, type: 2-1, properties: ["len": "address":"integer", "deref": ]} @@ -193,11 +232,13 @@ run/0: address to copy is 1063 run/0: product 0 is 1063 mem/0: storing 1063 in location 1099 run/0: instruction buffer-append/11 +run/0: {name: "dest", value: 6, type: 2-4, properties: ["dest": "address":"character", "deref": ]} <- copy {name: "c", value: 2, type: 4, properties: ["c": "character"]} run/0: ingredient 0 is c mem/0: location 1095 is 49 mem/0: location 1099 is 1063 mem/0: storing 49 in location 1063 run/0: instruction buffer-append/12 +run/0: {name: "len", value: 4, type: 2-1, properties: ["len": "address":"integer", "deref": ]} <- add {name: "len", value: 4, type: 2-1, properties: ["len": "address":"integer", "deref": ]}, {name: "1", value: 1, type: 0, properties: ["1": "literal"]} run/0: ingredient 0 is len mem/0: location 1097 is 1060 mem/0: location 1060 is 0 @@ -206,47 +247,60 @@ run/0: product 0 is 1 mem/0: location 1097 is 1060 mem/0: storing 1 in location 1060 run/0: instruction buffer-append/13 +run/0: reply {name: "in", value: 1, type: 2-9, properties: ["in": "address":"buffer", "same-as-ingredient": "0"]} mem/0: location 1094 is 1060 run/0: result 0 is 1060 mem/0: storing 1060 in location 1006 run/0: instruction integer-to-decimal-string/22 +run/0: loop {name: "", value: -6, type: , properties: ["": ]} run/0: ingredient 0 is -6 run/0: jumping to instruction 17 run/0: instruction integer-to-decimal-string/17 +run/0: {name: "done?", value: 7, type: 3, properties: ["done?": "boolean"]} <- equal {name: "n", value: 1, type: 1, properties: ["n": "integer"]}, {name: "0", value: 0, type: 0, properties: ["0": "literal"]} run/0: ingredient 0 is n mem/0: location 1002 is 0 run/0: ingredient 1 is 0 run/0: product 0 is 1 mem/0: storing 1 in location 1008 run/0: instruction integer-to-decimal-string/18 +run/0: break-if {name: "done?", value: 7, type: 3, properties: ["done?": "boolean"]}, {name: "", value: 4, type: , properties: ["": ]} mem/0: location 1008 is 1 run/0: ingredient 0 is 1 run/0: ingredient 1 is run/0: jumping to instruction 23 run/0: instruction integer-to-decimal-string/25 +run/0: break-unless {name: "negate-result", value: 3, type: 3, properties: ["negate-result": "boolean"]}, {name: "", value: 1, type: , properties: ["": ]} mem/0: location 1004 is 1 run/0: ingredient 0 is 1 run/0: jump-unless fell through run/0: instruction integer-to-decimal-string/26 +run/0: {name: "tmp", value: 5, type: 2-9, properties: ["tmp": "address":"buffer"]} <- buffer-append {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 1060 run/0: instruction buffer-append/0 +run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new {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: 1152 run/0: instruction buffer-append/1 +run/0: {name: "in", value: 1, type: 2-9, properties: ["in": "address":"buffer"]} <- next-ingredient run/0: product 0 is 1060 mem/0: storing 1060 in location 1154 run/0: instruction buffer-append/2 +run/0: {name: "c", value: 2, type: 4, properties: ["c": "character"]} <- next-ingredient run/0: product 0 is 45 mem/0: storing 45 in location 1155 run/0: instruction buffer-append/4 +run/0: {name: "full?", value: 3, type: 3, properties: ["full?": "boolean"]} <- buffer-full? {name: "in", value: 1, type: 2-9, properties: ["in": "address":"buffer"]} mem/0: location 1154 is 1060 run/0: instruction buffer-full?/0 +run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new {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: 1182 run/0: instruction buffer-full?/1 +run/0: {name: "in", value: 1, type: 2-9, properties: ["in": "address":"buffer"]} <- next-ingredient run/0: product 0 is 1060 mem/0: storing 1060 in location 1184 run/0: instruction buffer-full?/2 +run/0: {name: "len", value: 2, type: 1, properties: ["len": "integer"]} <- get {name: "in", value: 1, type: 2-9, properties: ["in": "address":"buffer", "deref": ]}, {name: "length", value: 0, type: 0, properties: ["length": "offset"]} run/0: ingredient 0 is in mem/0: location 1184 is 1060 run/0: ingredient 1 is length @@ -256,6 +310,7 @@ mem/0: location 1060 is 1 run/0: product 0 is 1 mem/0: storing 1 in location 1185 run/0: instruction buffer-full?/3 +run/0: {name: "s", value: 3, type: 2-5-4, properties: ["s": "address":"array":"character"]} <- get {name: "in", value: 1, type: 2-9, properties: ["in": "address":"buffer", "deref": ]}, {name: "data", value: 1, type: 0, properties: ["data": "offset"]} run/0: ingredient 0 is in mem/0: location 1184 is 1060 run/0: ingredient 1 is data @@ -265,9 +320,11 @@ mem/0: location 1061 is 1062 run/0: product 0 is 1062 mem/0: storing 1062 in location 1186 run/0: instruction buffer-full?/4 +run/0: {name: "capacity", value: 4, type: 1, properties: ["capacity": "integer"]} <- length {name: "s", value: 3, type: 2-5-4, properties: ["s": "address":"array":"character", "deref": ]} mem/0: location 1186 is 1062 mem/0: storing 30 in location 1187 run/0: instruction buffer-full?/5 +run/0: {name: "result", value: 5, type: 3, properties: ["result": "boolean"]} <- greater-or-equal {name: "len", value: 2, type: 1, properties: ["len": "integer"]}, {name: "capacity", value: 4, type: 1, properties: ["capacity": "integer"]} run/0: ingredient 0 is len mem/0: location 1185 is 1 run/0: ingredient 1 is capacity @@ -275,15 +332,18 @@ mem/0: location 1187 is 30 run/0: product 0 is 0 mem/0: storing 0 in location 1188 run/0: instruction buffer-full?/6 +run/0: reply {name: "result", value: 5, type: 3, properties: ["result": "boolean"]} mem/0: location 1188 is 0 run/0: result 0 is 0 mem/0: storing 0 in location 1156 run/0: instruction buffer-append/5 +run/0: break-unless {name: "full?", value: 3, type: 3, properties: ["full?": "boolean"]}, {name: "", value: 1, type: , properties: ["": ]} mem/0: location 1156 is 0 run/0: ingredient 0 is 0 run/0: ingredient 1 is run/0: jumping to instruction 7 run/0: instruction buffer-append/8 +run/0: {name: "len", value: 4, type: 2-1, properties: ["len": "address":"integer"]} <- get-address {name: "in", value: 1, type: 2-9, properties: ["in": "address":"buffer", "deref": ]}, {name: "length", value: 0, type: 0, properties: ["length": "offset"]} run/0: ingredient 0 is in mem/0: location 1154 is 1060 run/0: ingredient 1 is length @@ -291,6 +351,7 @@ run/0: address to copy is 1060 run/0: product 0 is 1060 mem/0: storing 1060 in location 1157 run/0: instruction buffer-append/9 +run/0: {name: "s", value: 5, type: 2-5-4, properties: ["s": "address":"array":"character"]} <- get {name: "in", value: 1, type: 2-9, properties: ["in": "address":"buffer", "deref": ]}, {name: "data", value: 1, type: 0, properties: ["data": "offset"]} run/0: ingredient 0 is in mem/0: location 1154 is 1060 run/0: ingredient 1 is data @@ -300,6 +361,7 @@ mem/0: location 1061 is 1062 run/0: product 0 is 1062 mem/0: storing 1062 in location 1158 run/0: instruction buffer-append/10 +run/0: {name: "dest", value: 6, type: 2-4, properties: ["dest": "address":"character"]} <- index-address {name: "s", value: 5, type: 2-5-4, properties: ["s": "address":"array":"character", "deref": ]}, {name: "len", value: 4, type: 2-1, properties: ["len": "address":"integer", "deref": ]} run/0: ingredient 0 is s mem/0: location 1158 is 1062 run/0: ingredient 1 is {name: "len", value: 4, type: 2-1, properties: ["len": "address":"integer", "deref": ]} @@ -309,11 +371,13 @@ run/0: address to copy is 1064 run/0: product 0 is 1064 mem/0: storing 1064 in location 1159 run/0: instruction buffer-append/11 +run/0: {name: "dest", value: 6, type: 2-4, properties: ["dest": "address":"character", "deref": ]} <- copy {name: "c", value: 2, type: 4, properties: ["c": "character"]} run/0: ingredient 0 is c mem/0: location 1155 is 45 mem/0: location 1159 is 1064 mem/0: storing 45 in location 1064 run/0: instruction buffer-append/12 +run/0: {name: "len", value: 4, type: 2-1, properties: ["len": "address":"integer", "deref": ]} <- add {name: "len", value: 4, type: 2-1, properties: ["len": "address":"integer", "deref": ]}, {name: "1", value: 1, type: 0, properties: ["1": "literal"]} run/0: ingredient 0 is len mem/0: location 1157 is 1060 mem/0: location 1060 is 1 @@ -322,10 +386,12 @@ run/0: product 0 is 2 mem/0: location 1157 is 1060 mem/0: storing 2 in location 1060 run/0: instruction buffer-append/13 +run/0: reply {name: "in", value: 1, type: 2-9, properties: ["in": "address":"buffer", "same-as-ingredient": "0"]} mem/0: location 1154 is 1060 run/0: result 0 is 1060 mem/0: storing 1060 in location 1006 run/0: instruction integer-to-decimal-string/28 +run/0: {name: "len", value: 10, type: 1, properties: ["len": "integer"]} <- get {name: "tmp", value: 5, type: 2-9, properties: ["tmp": "address":"buffer", "deref": ]}, {name: "length", value: 0, type: 0, properties: ["length": "offset"]} run/0: ingredient 0 is tmp mem/0: location 1006 is 1060 run/0: ingredient 1 is length @@ -335,6 +401,7 @@ mem/0: location 1060 is 2 run/0: product 0 is 2 mem/0: storing 2 in location 1011 run/0: instruction integer-to-decimal-string/29 +run/0: {name: "buf", value: 11, type: 2-5-4, properties: ["buf": "address":"array":"character"]} <- get {name: "tmp", value: 5, type: 2-9, properties: ["tmp": "address":"buffer", "deref": ]}, {name: "data", value: 1, type: 0, properties: ["data": "offset"]} run/0: ingredient 0 is tmp mem/0: location 1006 is 1060 run/0: ingredient 1 is data @@ -344,30 +411,36 @@ mem/0: location 1061 is 1062 run/0: product 0 is 1062 mem/0: storing 1062 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 {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: 1212 mem/0: storing 1212 in location 1003 run/0: instruction integer-to-decimal-string/31 +run/0: {name: "i", value: 12, type: 1, properties: ["i": "integer"]} <- subtract {name: "len", value: 10, type: 1, properties: ["len": "integer"]}, {name: "1", value: 1, type: 0, properties: ["1": "literal"]} run/0: ingredient 0 is len mem/0: location 1011 is 2 run/0: ingredient 1 is 1 run/0: product 0 is 1 mem/0: storing 1 in location 1013 run/0: instruction integer-to-decimal-string/32 +run/0: {name: "j", value: 13, type: 1, properties: ["j": "integer"]} <- copy {name: "0", value: 0, type: 0, properties: ["0": "literal"]} run/0: ingredient 0 is 0 mem/0: storing 0 in location 1014 run/0: instruction integer-to-decimal-string/34 +run/0: {name: "done?", value: 7, type: 3, properties: ["done?": "boolean"]} <- lesser-than {name: "i", value: 12, type: 1, properties: ["i": "integer"]}, {name: "0", value: 0, type: 0, properties: ["0": "literal"]} run/0: ingredient 0 is i mem/0: location 1013 is 1 run/0: ingredient 1 is 0 run/0: product 0 is 0 mem/0: storing 0 in location 1008 run/0: instruction integer-to-decimal-string/35 +run/0: break-if {name: "done?", value: 7, type: 3, properties: ["done?": "boolean"]}, {name: "", value: 6, type: , properties: ["": ]} mem/0: location 1008 is 0 run/0: ingredient 0 is 0 run/0: jump-if fell through run/0: instruction integer-to-decimal-string/36 +run/0: {name: "src", value: 14, type: 4, properties: ["src": "character"]} <- index {name: "buf", value: 11, type: 2-5-4, properties: ["buf": "address":"array":"character", "deref": ]}, {name: "i", value: 12, type: 1, properties: ["i": "integer"]} run/0: ingredient 0 is {name: "buf", value: 11, type: 2-5-4, properties: ["buf": "address":"array":"character", "deref": ]} mem/0: location 1012 is 1062 run/0: ingredient 1 is {name: "i", value: 12, type: 1, properties: ["i": "integer"]} @@ -378,6 +451,7 @@ mem/0: location 1064 is 45 run/0: product 0 is 45 mem/0: storing 45 in location 1015 run/0: instruction integer-to-decimal-string/37 +run/0: {name: "dest", value: 15, type: 2-4, properties: ["dest": "address":"character"]} <- index-address {name: "result", value: 2, type: 2-5-4, properties: ["result": "address":"array":"character", "deref": ]}, {name: "j", value: 13, type: 1, properties: ["j": "integer"]} run/0: ingredient 0 is result mem/0: location 1003 is 1212 run/0: ingredient 1 is {name: "j", value: 13, type: 1, properties: ["j": "integer"]} @@ -386,36 +460,43 @@ run/0: address to copy is 1213 run/0: product 0 is 1213 mem/0: storing 1213 in location 1016 run/0: instruction integer-to-decimal-string/38 +run/0: {name: "dest", value: 15, type: 2-4, properties: ["dest": "address":"character", "deref": ]} <- copy {name: "src", value: 14, type: 4, properties: ["src": "character"]} run/0: ingredient 0 is src mem/0: location 1015 is 45 mem/0: location 1016 is 1213 mem/0: storing 45 in location 1213 run/0: instruction integer-to-decimal-string/39 +run/0: {name: "i", value: 12, type: 1, properties: ["i": "integer"]} <- subtract {name: "i", value: 12, type: 1, properties: ["i": "integer"]}, {name: "1", value: 1, type: 0, properties: ["1": "literal"]} run/0: ingredient 0 is i mem/0: location 1013 is 1 run/0: ingredient 1 is 1 run/0: product 0 is 0 mem/0: storing 0 in location 1013 run/0: instruction integer-to-decimal-string/40 +run/0: {name: "j", value: 13, type: 1, properties: ["j": "integer"]} <- add {name: "j", value: 13, type: 1, properties: ["j": "integer"]}, {name: "1", value: 1, type: 0, properties: ["1": "literal"]} run/0: ingredient 0 is j mem/0: location 1014 is 0 run/0: ingredient 1 is 1 run/0: product 0 is 1 mem/0: storing 1 in location 1014 run/0: instruction integer-to-decimal-string/41 +run/0: loop {name: "", value: -8, type: , properties: ["": ]} run/0: ingredient 0 is -8 run/0: jumping to instruction 34 run/0: instruction integer-to-decimal-string/34 +run/0: {name: "done?", value: 7, type: 3, properties: ["done?": "boolean"]} <- lesser-than {name: "i", value: 12, type: 1, properties: ["i": "integer"]}, {name: "0", value: 0, type: 0, properties: ["0": "literal"]} run/0: ingredient 0 is i mem/0: location 1013 is 0 run/0: ingredient 1 is 0 run/0: product 0 is 0 mem/0: storing 0 in location 1008 run/0: instruction integer-to-decimal-string/35 +run/0: break-if {name: "done?", value: 7, type: 3, properties: ["done?": "boolean"]}, {name: "", value: 6, type: , properties: ["": ]} mem/0: location 1008 is 0 run/0: ingredient 0 is 0 run/0: jump-if fell through run/0: instruction integer-to-decimal-string/36 +run/0: {name: "src", value: 14, type: 4, properties: ["src": "character"]} <- index {name: "buf", value: 11, type: 2-5-4, properties: ["buf": "address":"array":"character", "deref": ]}, {name: "i", value: 12, type: 1, properties: ["i": "integer"]} run/0: ingredient 0 is {name: "buf", value: 11, type: 2-5-4, properties: ["buf": "address":"array":"character", "deref": ]} mem/0: location 1012 is 1062 run/0: ingredient 1 is {name: "i", value: 12, type: 1, properties: ["i": "integer"]} @@ -426,6 +507,7 @@ mem/0: location 1063 is 49 run/0: product 0 is 49 mem/0: storing 49 in location 1015 run/0: instruction integer-to-decimal-string/37 +run/0: {name: "dest", value: 15, type: 2-4, properties: ["dest": "address":"character"]} <- index-address {name: "result", value: 2, type: 2-5-4, properties: ["result": "address":"array":"character", "deref": ]}, {name: "j", value: 13, type: 1, properties: ["j": "integer"]} run/0: ingredient 0 is result mem/0: location 1003 is 1212 run/0: ingredient 1 is {name: "j", value: 13, type: 1, properties: ["j": "integer"]} @@ -434,41 +516,49 @@ run/0: address to copy is 1214 run/0: product 0 is 1214 mem/0: storing 1214 in location 1016 run/0: instruction integer-to-decimal-string/38 +run/0: {name: "dest", value: 15, type: 2-4, properties: ["dest": "address":"character", "deref": ]} <- copy {name: "src", value: 14, type: 4, properties: ["src": "character"]} run/0: ingredient 0 is src mem/0: location 1015 is 49 mem/0: location 1016 is 1214 mem/0: storing 49 in location 1214 run/0: instruction integer-to-decimal-string/39 +run/0: {name: "i", value: 12, type: 1, properties: ["i": "integer"]} <- subtract {name: "i", value: 12, type: 1, properties: ["i": "integer"]}, {name: "1", value: 1, type: 0, properties: ["1": "literal"]} run/0: ingredient 0 is i mem/0: location 1013 is 0 run/0: ingredient 1 is 1 run/0: product 0 is -1 mem/0: storing -1 in location 1013 run/0: instruction integer-to-decimal-string/40 +run/0: {name: "j", value: 13, type: 1, properties: ["j": "integer"]} <- add {name: "j", value: 13, type: 1, properties: ["j": "integer"]}, {name: "1", value: 1, type: 0, properties: ["1": "literal"]} run/0: ingredient 0 is j mem/0: location 1014 is 1 run/0: ingredient 1 is 1 run/0: product 0 is 2 mem/0: storing 2 in location 1014 run/0: instruction integer-to-decimal-string/41 +run/0: loop {name: "", value: -8, type: , properties: ["": ]} run/0: ingredient 0 is -8 run/0: jumping to instruction 34 run/0: instruction integer-to-decimal-string/34 +run/0: {name: "done?", value: 7, type: 3, properties: ["done?": "boolean"]} <- lesser-than {name: "i", value: 12, type: 1, properties: ["i": "integer"]}, {name: "0", value: 0, type: 0, properties: ["0": "literal"]} run/0: ingredient 0 is i mem/0: location 1013 is -1 run/0: ingredient 1 is 0 run/0: product 0 is 1 mem/0: storing 1 in location 1008 run/0: instruction integer-to-decimal-string/35 +run/0: break-if {name: "done?", value: 7, type: 3, properties: ["done?": "boolean"]}, {name: "", value: 6, type: , properties: ["": ]} mem/0: location 1008 is 1 run/0: ingredient 0 is 1 run/0: ingredient 1 is run/0: jumping to instruction 42 run/0: instruction integer-to-decimal-string/43 +run/0: reply {name: "result", value: 2, type: 2-5-4, properties: ["result": "address":"array":"character"]} mem/0: location 1003 is 1212 run/0: result 0 is 1212 mem/0: storing 1212 in location 1 run/0: instruction test-integer-to-decimal-digit-negative/1 +run/0: {name: "2", value: 2, type: 5-4, properties: ["2": "array":"character", "raw": ]} <- copy {name: "1", value: 1, type: 2-5-4, properties: ["1": "address":"array":"character", "deref": , "raw": ]} run/0: ingredient 0 is 1 mem/0: location 1 is 1212 mem/0: location 1212 is 2 diff --git a/cpp/.traces/integer-to-decimal-digit-positive b/cpp/.traces/integer-to-decimal-digit-positive index eaa0ee3b..7239ec92 100644 --- a/cpp/.traces/integer-to-decimal-digit-positive +++ b/cpp/.traces/integer-to-decimal-digit-positive @@ -10,39 +10,50 @@ after-brace/0: copy ... new/0: routine allocated memory from 1000 to 101000 schedule/0: test-integer-to-decimal-digit-positive run/0: instruction test-integer-to-decimal-digit-positive/0 +run/0: {name: "1", value: 1, type: 2-5-4, properties: ["1": "address":"array":"character", "raw": ]} <- integer-to-decimal-string {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 {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 +run/0: {name: "n", value: 1, type: 1, properties: ["n": "integer"]} <- next-ingredient run/0: product 0 is 234 mem/0: storing 234 in location 1002 run/0: instruction integer-to-decimal-string/3 +run/0: break-if {name: "n", value: 1, type: 1, properties: ["n": "integer"]}, {name: "", value: 2, type: , properties: ["": ]} mem/0: location 1002 is 234 run/0: ingredient 0 is 234 run/0: ingredient 1 is run/0: jumping to instruction 6 run/0: instruction integer-to-decimal-string/7 +run/0: {name: "negate-result", value: 3, type: 3, properties: ["negate-result": "boolean"]} <- copy {name: "0", value: 0, type: 0, properties: ["0": "literal"]} run/0: ingredient 0 is 0 mem/0: storing 0 in location 1004 run/0: instruction integer-to-decimal-string/9 +run/0: {name: "negative?", value: 4, type: 3, properties: ["negative?": "boolean"]} <- lesser-than {name: "n", value: 1, type: 1, properties: ["n": "integer"]}, {name: "0", value: 0, type: 0, properties: ["0": "literal"]} run/0: ingredient 0 is n mem/0: location 1002 is 234 run/0: ingredient 1 is 0 run/0: product 0 is 0 mem/0: storing 0 in location 1005 run/0: instruction integer-to-decimal-string/10 +run/0: break-unless {name: "negative?", value: 4, type: 3, properties: ["negative?": "boolean"]}, {name: "", value: 2, type: , properties: ["": ]} mem/0: location 1005 is 0 run/0: ingredient 0 is 0 run/0: ingredient 1 is 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 {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 {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: 1030 run/0: instruction init-buffer/1 +run/0: {name: "result", value: 1, type: 2-9, properties: ["result": "address":"buffer"]} <- new {name: "buffer", value: 9, type: 0, properties: ["buffer": "type"]} mem/0: new alloc: 1060 mem/0: storing 1060 in location 1032 run/0: instruction init-buffer/2 +run/0: {name: "len", value: 2, type: 2-1, properties: ["len": "address":"integer"]} <- get-address {name: "result", value: 1, type: 2-9, properties: ["result": "address":"buffer", "deref": ]}, {name: "length", value: 0, type: 0, properties: ["length": "offset"]} run/0: ingredient 0 is result mem/0: location 1032 is 1060 run/0: ingredient 1 is length @@ -50,10 +61,12 @@ run/0: address to copy is 1060 run/0: product 0 is 1060 mem/0: storing 1060 in location 1033 run/0: instruction init-buffer/3 +run/0: {name: "len", value: 2, type: 2-1, properties: ["len": "address":"integer", "deref": ]} <- copy {name: "0", value: 0, type: 0, properties: ["0": "literal"]} run/0: ingredient 0 is 0 mem/0: location 1033 is 1060 mem/0: storing 0 in location 1060 run/0: instruction init-buffer/4 +run/0: {name: "s", value: 3, type: 2-2-5-4, properties: ["s": "address":"address":"array":"character"]} <- get-address {name: "result", value: 1, type: 2-9, properties: ["result": "address":"buffer", "deref": ]}, {name: "data", value: 1, type: 0, properties: ["data": "offset"]} run/0: ingredient 0 is result mem/0: location 1032 is 1060 run/0: ingredient 1 is data @@ -61,32 +74,39 @@ run/0: address to copy is 1061 run/0: product 0 is 1061 mem/0: storing 1061 in location 1034 run/0: instruction init-buffer/5 +run/0: {name: "capacity", value: 4, type: 1, properties: ["capacity": "integer"]} <- next-ingredient run/0: product 0 is 30 mem/0: storing 30 in location 1035 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 {name: "character", value: 4, type: 0, properties: ["character": "type"]}, {name: "capacity", value: 4, type: 1, properties: ["capacity": "integer"]} mem/0: location 1035 is 30 mem/0: array size is 30 mem/0: new alloc: 1062 mem/0: location 1034 is 1061 mem/0: storing 1062 in location 1061 run/0: instruction init-buffer/7 +run/0: reply {name: "result", value: 1, type: 2-9, properties: ["result": "address":"buffer"]} mem/0: location 1032 is 1060 run/0: result 0 is 1060 mem/0: storing 1060 in location 1006 run/0: instruction integer-to-decimal-string/15 +run/0: {name: "digit-base", value: 6, type: 1, properties: ["digit-base": "integer"]} <- copy {name: "48", value: 48, type: 0, properties: ["48": "literal"]} run/0: ingredient 0 is 48 mem/0: storing 48 in location 1007 run/0: instruction integer-to-decimal-string/17 +run/0: {name: "done?", value: 7, type: 3, properties: ["done?": "boolean"]} <- equal {name: "n", value: 1, type: 1, properties: ["n": "integer"]}, {name: "0", value: 0, type: 0, properties: ["0": "literal"]} run/0: ingredient 0 is n mem/0: location 1002 is 234 run/0: ingredient 1 is 0 run/0: product 0 is 0 mem/0: storing 0 in location 1008 run/0: instruction integer-to-decimal-string/18 +run/0: break-if {name: "done?", value: 7, type: 3, properties: ["done?": "boolean"]}, {name: "", value: 4, type: , properties: ["": ]} mem/0: location 1008 is 0 run/0: ingredient 0 is 0 run/0: jump-if fell through run/0: instruction integer-to-decimal-string/19 +run/0: {name: "n", value: 1, type: 1, properties: ["n": "integer"]}, {name: "digit", value: 8, type: 1, properties: ["digit": "integer"]} <- divide-with-remainder {name: "n", value: 1, type: 1, properties: ["n": "integer"]}, {name: "10", value: 10, type: 0, properties: ["10": "literal"]} run/0: ingredient 0 is n mem/0: location 1002 is 234 run/0: ingredient 1 is 10 @@ -95,6 +115,7 @@ mem/0: storing 23 in location 1002 run/0: product 1 is 4 mem/0: storing 4 in location 1009 run/0: instruction integer-to-decimal-string/20 +run/0: {name: "c", value: 9, type: 4, properties: ["c": "character"]} <- add {name: "digit-base", value: 6, type: 1, properties: ["digit-base": "integer"]}, {name: "digit", value: 8, type: 1, properties: ["digit": "integer"]} run/0: ingredient 0 is digit-base mem/0: location 1007 is 48 run/0: ingredient 1 is digit @@ -102,26 +123,34 @@ mem/0: location 1009 is 4 run/0: product 0 is 52 mem/0: storing 52 in location 1010 run/0: instruction integer-to-decimal-string/21 +run/0: {name: "tmp", value: 5, type: 2-9, properties: ["tmp": "address":"buffer"]} <- buffer-append {name: "tmp", value: 5, type: 2-9, properties: ["tmp": "address":"buffer"]}, {name: "c", value: 9, type: 4, properties: ["c": "character"]} mem/0: location 1006 is 1060 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 {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: 1092 run/0: instruction buffer-append/1 +run/0: {name: "in", value: 1, type: 2-9, properties: ["in": "address":"buffer"]} <- next-ingredient run/0: product 0 is 1060 mem/0: storing 1060 in location 1094 run/0: instruction buffer-append/2 +run/0: {name: "c", value: 2, type: 4, properties: ["c": "character"]} <- next-ingredient run/0: product 0 is 52 mem/0: storing 52 in location 1095 run/0: instruction buffer-append/4 +run/0: {name: "full?", value: 3, type: 3, properties: ["full?": "boolean"]} <- buffer-full? {name: "in", value: 1, type: 2-9, properties: ["in": "address":"buffer"]} mem/0: location 1094 is 1060 run/0: instruction buffer-full?/0 +run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new {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: 1122 run/0: instruction buffer-full?/1 +run/0: {name: "in", value: 1, type: 2-9, properties: ["in": "address":"buffer"]} <- next-ingredient run/0: product 0 is 1060 mem/0: storing 1060 in location 1124 run/0: instruction buffer-full?/2 +run/0: {name: "len", value: 2, type: 1, properties: ["len": "integer"]} <- get {name: "in", value: 1, type: 2-9, properties: ["in": "address":"buffer", "deref": ]}, {name: "length", value: 0, type: 0, properties: ["length": "offset"]} run/0: ingredient 0 is in mem/0: location 1124 is 1060 run/0: ingredient 1 is length @@ -131,6 +160,7 @@ mem/0: location 1060 is 0 run/0: product 0 is 0 mem/0: storing 0 in location 1125 run/0: instruction buffer-full?/3 +run/0: {name: "s", value: 3, type: 2-5-4, properties: ["s": "address":"array":"character"]} <- get {name: "in", value: 1, type: 2-9, properties: ["in": "address":"buffer", "deref": ]}, {name: "data", value: 1, type: 0, properties: ["data": "offset"]} run/0: ingredient 0 is in mem/0: location 1124 is 1060 run/0: ingredient 1 is data @@ -140,9 +170,11 @@ mem/0: location 1061 is 1062 run/0: product 0 is 1062 mem/0: storing 1062 in location 1126 run/0: instruction buffer-full?/4 +run/0: {name: "capacity", value: 4, type: 1, properties: ["capacity": "integer"]} <- length {name: "s", value: 3, type: 2-5-4, properties: ["s": "address":"array":"character", "deref": ]} mem/0: location 1126 is 1062 mem/0: storing 30 in location 1127 run/0: instruction buffer-full?/5 +run/0: {name: "result", value: 5, type: 3, properties: ["result": "boolean"]} <- greater-or-equal {name: "len", value: 2, type: 1, properties: ["len": "integer"]}, {name: "capacity", value: 4, type: 1, properties: ["capacity": "integer"]} run/0: ingredient 0 is len mem/0: location 1125 is 0 run/0: ingredient 1 is capacity @@ -150,15 +182,18 @@ mem/0: location 1127 is 30 run/0: product 0 is 0 mem/0: storing 0 in location 1128 run/0: instruction buffer-full?/6 +run/0: reply {name: "result", value: 5, type: 3, properties: ["result": "boolean"]} mem/0: location 1128 is 0 run/0: result 0 is 0 mem/0: storing 0 in location 1096 run/0: instruction buffer-append/5 +run/0: break-unless {name: "full?", value: 3, type: 3, properties: ["full?": "boolean"]}, {name: "", value: 1, type: , properties: ["": ]} mem/0: location 1096 is 0 run/0: ingredient 0 is 0 run/0: ingredient 1 is run/0: jumping to instruction 7 run/0: instruction buffer-append/8 +run/0: {name: "len", value: 4, type: 2-1, properties: ["len": "address":"integer"]} <- get-address {name: "in", value: 1, type: 2-9, properties: ["in": "address":"buffer", "deref": ]}, {name: "length", value: 0, type: 0, properties: ["length": "offset"]} run/0: ingredient 0 is in mem/0: location 1094 is 1060 run/0: ingredient 1 is length @@ -166,6 +201,7 @@ run/0: address to copy is 1060 run/0: product 0 is 1060 mem/0: storing 1060 in location 1097 run/0: instruction buffer-append/9 +run/0: {name: "s", value: 5, type: 2-5-4, properties: ["s": "address":"array":"character"]} <- get {name: "in", value: 1, type: 2-9, properties: ["in": "address":"buffer", "deref": ]}, {name: "data", value: 1, type: 0, properties: ["data": "offset"]} run/0: ingredient 0 is in mem/0: location 1094 is 1060 run/0: ingredient 1 is data @@ -175,6 +211,7 @@ mem/0: location 1061 is 1062 run/0: product 0 is 1062 mem/0: storing 1062 in location 1098 run/0: instruction buffer-append/10 +run/0: {name: "dest", value: 6, type: 2-4, properties: ["dest": "address":"character"]} <- index-address {name: "s", value: 5, type: 2-5-4, properties: ["s": "address":"array":"character", "deref": ]}, {name: "len", value: 4, type: 2-1, properties: ["len": "address":"integer", "deref": ]} run/0: ingredient 0 is s mem/0: location 1098 is 1062 run/0: ingredient 1 is {name: "len", value: 4, type: 2-1, properties: ["len": "address":"integer", "deref": ]} @@ -184,11 +221,13 @@ run/0: address to copy is 1063 run/0: product 0 is 1063 mem/0: storing 1063 in location 1099 run/0: instruction buffer-append/11 +run/0: {name: "dest", value: 6, type: 2-4, properties: ["dest": "address":"character", "deref": ]} <- copy {name: "c", value: 2, type: 4, properties: ["c": "character"]} run/0: ingredient 0 is c mem/0: location 1095 is 52 mem/0: location 1099 is 1063 mem/0: storing 52 in location 1063 run/0: instruction buffer-append/12 +run/0: {name: "len", value: 4, type: 2-1, properties: ["len": "address":"integer", "deref": ]} <- add {name: "len", value: 4, type: 2-1, properties: ["len": "address":"integer", "deref": ]}, {name: "1", value: 1, type: 0, properties: ["1": "literal"]} run/0: ingredient 0 is len mem/0: location 1097 is 1060 mem/0: location 1060 is 0 @@ -197,23 +236,28 @@ run/0: product 0 is 1 mem/0: location 1097 is 1060 mem/0: storing 1 in location 1060 run/0: instruction buffer-append/13 +run/0: reply {name: "in", value: 1, type: 2-9, properties: ["in": "address":"buffer", "same-as-ingredient": "0"]} mem/0: location 1094 is 1060 run/0: result 0 is 1060 mem/0: storing 1060 in location 1006 run/0: instruction integer-to-decimal-string/22 +run/0: loop {name: "", value: -6, type: , properties: ["": ]} run/0: ingredient 0 is -6 run/0: jumping to instruction 17 run/0: instruction integer-to-decimal-string/17 +run/0: {name: "done?", value: 7, type: 3, properties: ["done?": "boolean"]} <- equal {name: "n", value: 1, type: 1, properties: ["n": "integer"]}, {name: "0", value: 0, type: 0, properties: ["0": "literal"]} run/0: ingredient 0 is n mem/0: location 1002 is 23 run/0: ingredient 1 is 0 run/0: product 0 is 0 mem/0: storing 0 in location 1008 run/0: instruction integer-to-decimal-string/18 +run/0: break-if {name: "done?", value: 7, type: 3, properties: ["done?": "boolean"]}, {name: "", value: 4, type: , properties: ["": ]} mem/0: location 1008 is 0 run/0: ingredient 0 is 0 run/0: jump-if fell through run/0: instruction integer-to-decimal-string/19 +run/0: {name: "n", value: 1, type: 1, properties: ["n": "integer"]}, {name: "digit", value: 8, type: 1, properties: ["digit": "integer"]} <- divide-with-remainder {name: "n", value: 1, type: 1, properties: ["n": "integer"]}, {name: "10", value: 10, type: 0, properties: ["10": "literal"]} run/0: ingredient 0 is n mem/0: location 1002 is 23 run/0: ingredient 1 is 10 @@ -222,6 +266,7 @@ mem/0: storing 2 in location 1002 run/0: product 1 is 3 mem/0: storing 3 in location 1009 run/0: instruction integer-to-decimal-string/20 +run/0: {name: "c", value: 9, type: 4, properties: ["c": "character"]} <- add {name: "digit-base", value: 6, type: 1, properties: ["digit-base": "integer"]}, {name: "digit", value: 8, type: 1, properties: ["digit": "integer"]} run/0: ingredient 0 is digit-base mem/0: location 1007 is 48 run/0: ingredient 1 is digit @@ -229,26 +274,34 @@ mem/0: location 1009 is 3 run/0: product 0 is 51 mem/0: storing 51 in location 1010 run/0: instruction integer-to-decimal-string/21 +run/0: {name: "tmp", value: 5, type: 2-9, properties: ["tmp": "address":"buffer"]} <- buffer-append {name: "tmp", value: 5, type: 2-9, properties: ["tmp": "address":"buffer"]}, {name: "c", value: 9, type: 4, properties: ["c": "character"]} mem/0: location 1006 is 1060 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 {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: 1152 run/0: instruction buffer-append/1 +run/0: {name: "in", value: 1, type: 2-9, properties: ["in": "address":"buffer"]} <- next-ingredient run/0: product 0 is 1060 mem/0: storing 1060 in location 1154 run/0: instruction buffer-append/2 +run/0: {name: "c", value: 2, type: 4, properties: ["c": "character"]} <- next-ingredient run/0: product 0 is 51 mem/0: storing 51 in location 1155 run/0: instruction buffer-append/4 +run/0: {name: "full?", value: 3, type: 3, properties: ["full?": "boolean"]} <- buffer-full? {name: "in", value: 1, type: 2-9, properties: ["in": "address":"buffer"]} mem/0: location 1154 is 1060 run/0: instruction buffer-full?/0 +run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new {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: 1182 run/0: instruction buffer-full?/1 +run/0: {name: "in", value: 1, type: 2-9, properties: ["in": "address":"buffer"]} <- next-ingredient run/0: product 0 is 1060 mem/0: storing 1060 in location 1184 run/0: instruction buffer-full?/2 +run/0: {name: "len", value: 2, type: 1, properties: ["len": "integer"]} <- get {name: "in", value: 1, type: 2-9, properties: ["in": "address":"buffer", "deref": ]}, {name: "length", value: 0, type: 0, properties: ["length": "offset"]} run/0: ingredient 0 is in mem/0: location 1184 is 1060 run/0: ingredient 1 is length @@ -258,6 +311,7 @@ mem/0: location 1060 is 1 run/0: product 0 is 1 mem/0: storing 1 in location 1185 run/0: instruction buffer-full?/3 +run/0: {name: "s", value: 3, type: 2-5-4, properties: ["s": "address":"array":"character"]} <- get {name: "in", value: 1, type: 2-9, properties: ["in": "address":"buffer", "deref": ]}, {name: "data", value: 1, type: 0, properties: ["data": "offset"]} run/0: ingredient 0 is in mem/0: location 1184 is 1060 run/0: ingredient 1 is data @@ -267,9 +321,11 @@ mem/0: location 1061 is 1062 run/0: product 0 is 1062 mem/0: storing 1062 in location 1186 run/0: instruction buffer-full?/4 +run/0: {name: "capacity", value: 4, type: 1, properties: ["capacity": "integer"]} <- length {name: "s", value: 3, type: 2-5-4, properties: ["s": "address":"array":"character", "deref": ]} mem/0: location 1186 is 1062 mem/0: storing 30 in location 1187 run/0: instruction buffer-full?/5 +run/0: {name: "result", value: 5, type: 3, properties: ["result": "boolean"]} <- greater-or-equal {name: "len", value: 2, type: 1, properties: ["len": "integer"]}, {name: "capacity", value: 4, type: 1, properties: ["capacity": "integer"]} run/0: ingredient 0 is len mem/0: location 1185 is 1 run/0: ingredient 1 is capacity @@ -277,15 +333,18 @@ mem/0: location 1187 is 30 run/0: product 0 is 0 mem/0: storing 0 in location 1188 run/0: instruction buffer-full?/6 +run/0: reply {name: "result", value: 5, type: 3, properties: ["result": "boolean"]} mem/0: location 1188 is 0 run/0: result 0 is 0 mem/0: storing 0 in location 1156 run/0: instruction buffer-append/5 +run/0: break-unless {name: "full?", value: 3, type: 3, properties: ["full?": "boolean"]}, {name: "", value: 1, type: , properties: ["": ]} mem/0: location 1156 is 0 run/0: ingredient 0 is 0 run/0: ingredient 1 is run/0: jumping to instruction 7 run/0: instruction buffer-append/8 +run/0: {name: "len", value: 4, type: 2-1, properties: ["len": "address":"integer"]} <- get-address {name: "in", value: 1, type: 2-9, properties: ["in": "address":"buffer", "deref": ]}, {name: "length", value: 0, type: 0, properties: ["length": "offset"]} run/0: ingredient 0 is in mem/0: location 1154 is 1060 run/0: ingredient 1 is length @@ -293,6 +352,7 @@ run/0: address to copy is 1060 run/0: product 0 is 1060 mem/0: storing 1060 in location 1157 run/0: instruction buffer-append/9 +run/0: {name: "s", value: 5, type: 2-5-4, properties: ["s": "address":"array":"character"]} <- get {name: "in", value: 1, type: 2-9, properties: ["in": "address":"buffer", "deref": ]}, {name: "data", value: 1, type: 0, properties: ["data": "offset"]} run/0: ingredient 0 is in mem/0: location 1154 is 1060 run/0: ingredient 1 is data @@ -302,6 +362,7 @@ mem/0: location 1061 is 1062 run/0: product 0 is 1062 mem/0: storing 1062 in location 1158 run/0: instruction buffer-append/10 +run/0: {name: "dest", value: 6, type: 2-4, properties: ["dest": "address":"character"]} <- index-address {name: "s", value: 5, type: 2-5-4, properties: ["s": "address":"array":"character", "deref": ]}, {name: "len", value: 4, type: 2-1, properties: ["len": "address":"integer", "deref": ]} run/0: ingredient 0 is s mem/0: location 1158 is 1062 run/0: ingredient 1 is {name: "len", value: 4, type: 2-1, properties: ["len": "address":"integer", "deref": ]} @@ -311,11 +372,13 @@ run/0: address to copy is 1064 run/0: product 0 is 1064 mem/0: storing 1064 in location 1159 run/0: instruction buffer-append/11 +run/0: {name: "dest", value: 6, type: 2-4, properties: ["dest": "address":"character", "deref": ]} <- copy {name: "c", value: 2, type: 4, properties: ["c": "character"]} run/0: ingredient 0 is c mem/0: location 1155 is 51 mem/0: location 1159 is 1064 mem/0: storing 51 in location 1064 run/0: instruction buffer-append/12 +run/0: {name: "len", value: 4, type: 2-1, properties: ["len": "address":"integer", "deref": ]} <- add {name: "len", value: 4, type: 2-1, properties: ["len": "address":"integer", "deref": ]}, {name: "1", value: 1, type: 0, properties: ["1": "literal"]} run/0: ingredient 0 is len mem/0: location 1157 is 1060 mem/0: location 1060 is 1 @@ -324,23 +387,28 @@ run/0: product 0 is 2 mem/0: location 1157 is 1060 mem/0: storing 2 in location 1060 run/0: instruction buffer-append/13 +run/0: reply {name: "in", value: 1, type: 2-9, properties: ["in": "address":"buffer", "same-as-ingredient": "0"]} mem/0: location 1154 is 1060 run/0: result 0 is 1060 mem/0: storing 1060 in location 1006 run/0: instruction integer-to-decimal-string/22 +run/0: loop {name: "", value: -6, type: , properties: ["": ]} run/0: ingredient 0 is -6 run/0: jumping to instruction 17 run/0: instruction integer-to-decimal-string/17 +run/0: {name: "done?", value: 7, type: 3, properties: ["done?": "boolean"]} <- equal {name: "n", value: 1, type: 1, properties: ["n": "integer"]}, {name: "0", value: 0, type: 0, properties: ["0": "literal"]} run/0: ingredient 0 is n mem/0: location 1002 is 2 run/0: ingredient 1 is 0 run/0: product 0 is 0 mem/0: storing 0 in location 1008 run/0: instruction integer-to-decimal-string/18 +run/0: break-if {name: "done?", value: 7, type: 3, properties: ["done?": "boolean"]}, {name: "", value: 4, type: , properties: ["": ]} mem/0: location 1008 is 0 run/0: ingredient 0 is 0 run/0: jump-if fell through run/0: instruction integer-to-decimal-string/19 +run/0: {name: "n", value: 1, type: 1, properties: ["n": "integer"]}, {name: "digit", value: 8, type: 1, properties: ["digit": "integer"]} <- divide-with-remainder {name: "n", value: 1, type: 1, properties: ["n": "integer"]}, {name: "10", value: 10, type: 0, properties: ["10": "literal"]} run/0: ingredient 0 is n mem/0: location 1002 is 2 run/0: ingredient 1 is 10 @@ -349,6 +417,7 @@ mem/0: storing 0 in location 1002 run/0: product 1 is 2 mem/0: storing 2 in location 1009 run/0: instruction integer-to-decimal-string/20 +run/0: {name: "c", value: 9, type: 4, properties: ["c": "character"]} <- add {name: "digit-base", value: 6, type: 1, properties: ["digit-base": "integer"]}, {name: "digit", value: 8, type: 1, properties: ["digit": "integer"]} run/0: ingredient 0 is digit-base mem/0: location 1007 is 48 run/0: ingredient 1 is digit @@ -356,26 +425,34 @@ mem/0: location 1009 is 2 run/0: product 0 is 50 mem/0: storing 50 in location 1010 run/0: instruction integer-to-decimal-string/21 +run/0: {name: "tmp", value: 5, type: 2-9, properties: ["tmp": "address":"buffer"]} <- buffer-append {name: "tmp", value: 5, type: 2-9, properties: ["tmp": "address":"buffer"]}, {name: "c", value: 9, type: 4, properties: ["c": "character"]} mem/0: location 1006 is 1060 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 {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: 1212 run/0: instruction buffer-append/1 +run/0: {name: "in", value: 1, type: 2-9, properties: ["in": "address":"buffer"]} <- next-ingredient run/0: product 0 is 1060 mem/0: storing 1060 in location 1214 run/0: instruction buffer-append/2 +run/0: {name: "c", value: 2, type: 4, properties: ["c": "character"]} <- next-ingredient run/0: product 0 is 50 mem/0: storing 50 in location 1215 run/0: instruction buffer-append/4 +run/0: {name: "full?", value: 3, type: 3, properties: ["full?": "boolean"]} <- buffer-full? {name: "in", value: 1, type: 2-9, properties: ["in": "address":"buffer"]} mem/0: location 1214 is 1060 run/0: instruction buffer-full?/0 +run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new {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: 1242 run/0: instruction buffer-full?/1 +run/0: {name: "in", value: 1, type: 2-9, properties: ["in": "address":"buffer"]} <- next-ingredient run/0: product 0 is 1060 mem/0: storing 1060 in location 1244 run/0: instruction buffer-full?/2 +run/0: {name: "len", value: 2, type: 1, properties: ["len": "integer"]} <- get {name: "in", value: 1, type: 2-9, properties: ["in": "address":"buffer", "deref": ]}, {name: "length", value: 0, type: 0, properties: ["length": "offset"]} run/0: ingredient 0 is in mem/0: location 1244 is 1060 run/0: ingredient 1 is length @@ -385,6 +462,7 @@ mem/0: location 1060 is 2 run/0: product 0 is 2 mem/0: storing 2 in location 1245 run/0: instruction buffer-full?/3 +run/0: {name: "s", value: 3, type: 2-5-4, properties: ["s": "address":"array":"character"]} <- get {name: "in", value: 1, type: 2-9, properties: ["in": "address":"buffer", "deref": ]}, {name: "data", value: 1, type: 0, properties: ["data": "offset"]} run/0: ingredient 0 is in mem/0: location 1244 is 1060 run/0: ingredient 1 is data @@ -394,9 +472,11 @@ mem/0: location 1061 is 1062 run/0: product 0 is 1062 mem/0: storing 1062 in location 1246 run/0: instruction buffer-full?/4 +run/0: {name: "capacity", value: 4, type: 1, properties: ["capacity": "integer"]} <- length {name: "s", value: 3, type: 2-5-4, properties: ["s": "address":"array":"character", "deref": ]} mem/0: location 1246 is 1062 mem/0: storing 30 in location 1247 run/0: instruction buffer-full?/5 +run/0: {name: "result", value: 5, type: 3, properties: ["result": "boolean"]} <- greater-or-equal {name: "len", value: 2, type: 1, properties: ["len": "integer"]}, {name: "capacity", value: 4, type: 1, properties: ["capacity": "integer"]} run/0: ingredient 0 is len mem/0: location 1245 is 2 run/0: ingredient 1 is capacity @@ -404,15 +484,18 @@ mem/0: location 1247 is 30 run/0: product 0 is 0 mem/0: storing 0 in location 1248 run/0: instruction buffer-full?/6 +run/0: reply {name: "result", value: 5, type: 3, properties: ["result": "boolean"]} mem/0: location 1248 is 0 run/0: result 0 is 0 mem/0: storing 0 in location 1216 run/0: instruction buffer-append/5 +run/0: break-unless {name: "full?", value: 3, type: 3, properties: ["full?": "boolean"]}, {name: "", value: 1, type: , properties: ["": ]} mem/0: location 1216 is 0 run/0: ingredient 0 is 0 run/0: ingredient 1 is run/0: jumping to instruction 7 run/0: instruction buffer-append/8 +run/0: {name: "len", value: 4, type: 2-1, properties: ["len": "address":"integer"]} <- get-address {name: "in", value: 1, type: 2-9, properties: ["in": "address":"buffer", "deref": ]}, {name: "length", value: 0, type: 0, properties: ["length": "offset"]} run/0: ingredient 0 is in mem/0: location 1214 is 1060 run/0: ingredient 1 is length @@ -420,6 +503,7 @@ run/0: address to copy is 1060 run/0: product 0 is 1060 mem/0: storing 1060 in location 1217 run/0: instruction buffer-append/9 +run/0: {name: "s", value: 5, type: 2-5-4, properties: ["s": "address":"array":"character"]} <- get {name: "in", value: 1, type: 2-9, properties: ["in": "address":"buffer", "deref": ]}, {name: "data", value: 1, type: 0, properties: ["data": "offset"]} run/0: ingredient 0 is in mem/0: location 1214 is 1060 run/0: ingredient 1 is data @@ -429,6 +513,7 @@ mem/0: location 1061 is 1062 run/0: product 0 is 1062 mem/0: storing 1062 in location 1218 run/0: instruction buffer-append/10 +run/0: {name: "dest", value: 6, type: 2-4, properties: ["dest": "address":"character"]} <- index-address {name: "s", value: 5, type: 2-5-4, properties: ["s": "address":"array":"character", "deref": ]}, {name: "len", value: 4, type: 2-1, properties: ["len": "address":"integer", "deref": ]} run/0: ingredient 0 is s mem/0: location 1218 is 1062 run/0: ingredient 1 is {name: "len", value: 4, type: 2-1, properties: ["len": "address":"integer", "deref": ]} @@ -438,11 +523,13 @@ run/0: address to copy is 1065 run/0: product 0 is 1065 mem/0: storing 1065 in location 1219 run/0: instruction buffer-append/11 +run/0: {name: "dest", value: 6, type: 2-4, properties: ["dest": "address":"character", "deref": ]} <- copy {name: "c", value: 2, type: 4, properties: ["c": "character"]} run/0: ingredient 0 is c mem/0: location 1215 is 50 mem/0: location 1219 is 1065 mem/0: storing 50 in location 1065 run/0: instruction buffer-append/12 +run/0: {name: "len", value: 4, type: 2-1, properties: ["len": "address":"integer", "deref": ]} <- add {name: "len", value: 4, type: 2-1, properties: ["len": "address":"integer", "deref": ]}, {name: "1", value: 1, type: 0, properties: ["1": "literal"]} run/0: ingredient 0 is len mem/0: location 1217 is 1060 mem/0: location 1060 is 2 @@ -451,29 +538,35 @@ run/0: product 0 is 3 mem/0: location 1217 is 1060 mem/0: storing 3 in location 1060 run/0: instruction buffer-append/13 +run/0: reply {name: "in", value: 1, type: 2-9, properties: ["in": "address":"buffer", "same-as-ingredient": "0"]} mem/0: location 1214 is 1060 run/0: result 0 is 1060 mem/0: storing 1060 in location 1006 run/0: instruction integer-to-decimal-string/22 +run/0: loop {name: "", value: -6, type: , properties: ["": ]} run/0: ingredient 0 is -6 run/0: jumping to instruction 17 run/0: instruction integer-to-decimal-string/17 +run/0: {name: "done?", value: 7, type: 3, properties: ["done?": "boolean"]} <- equal {name: "n", value: 1, type: 1, properties: ["n": "integer"]}, {name: "0", value: 0, type: 0, properties: ["0": "literal"]} run/0: ingredient 0 is n mem/0: location 1002 is 0 run/0: ingredient 1 is 0 run/0: product 0 is 1 mem/0: storing 1 in location 1008 run/0: instruction integer-to-decimal-string/18 +run/0: break-if {name: "done?", value: 7, type: 3, properties: ["done?": "boolean"]}, {name: "", value: 4, type: , properties: ["": ]} mem/0: location 1008 is 1 run/0: ingredient 0 is 1 run/0: ingredient 1 is run/0: jumping to instruction 23 run/0: instruction integer-to-decimal-string/25 +run/0: break-unless {name: "negate-result", value: 3, type: 3, properties: ["negate-result": "boolean"]}, {name: "", value: 1, type: , properties: ["": ]} mem/0: location 1004 is 0 run/0: ingredient 0 is 0 run/0: ingredient 1 is run/0: jumping to instruction 27 run/0: instruction integer-to-decimal-string/28 +run/0: {name: "len", value: 10, type: 1, properties: ["len": "integer"]} <- get {name: "tmp", value: 5, type: 2-9, properties: ["tmp": "address":"buffer", "deref": ]}, {name: "length", value: 0, type: 0, properties: ["length": "offset"]} run/0: ingredient 0 is tmp mem/0: location 1006 is 1060 run/0: ingredient 1 is length @@ -483,6 +576,7 @@ mem/0: location 1060 is 3 run/0: product 0 is 3 mem/0: storing 3 in location 1011 run/0: instruction integer-to-decimal-string/29 +run/0: {name: "buf", value: 11, type: 2-5-4, properties: ["buf": "address":"array":"character"]} <- get {name: "tmp", value: 5, type: 2-9, properties: ["tmp": "address":"buffer", "deref": ]}, {name: "data", value: 1, type: 0, properties: ["data": "offset"]} run/0: ingredient 0 is tmp mem/0: location 1006 is 1060 run/0: ingredient 1 is data @@ -492,30 +586,36 @@ mem/0: location 1061 is 1062 run/0: product 0 is 1062 mem/0: storing 1062 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 {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: 1272 mem/0: storing 1272 in location 1003 run/0: instruction integer-to-decimal-string/31 +run/0: {name: "i", value: 12, type: 1, properties: ["i": "integer"]} <- subtract {name: "len", value: 10, type: 1, properties: ["len": "integer"]}, {name: "1", value: 1, type: 0, properties: ["1": "literal"]} run/0: ingredient 0 is len mem/0: location 1011 is 3 run/0: ingredient 1 is 1 run/0: product 0 is 2 mem/0: storing 2 in location 1013 run/0: instruction integer-to-decimal-string/32 +run/0: {name: "j", value: 13, type: 1, properties: ["j": "integer"]} <- copy {name: "0", value: 0, type: 0, properties: ["0": "literal"]} run/0: ingredient 0 is 0 mem/0: storing 0 in location 1014 run/0: instruction integer-to-decimal-string/34 +run/0: {name: "done?", value: 7, type: 3, properties: ["done?": "boolean"]} <- lesser-than {name: "i", value: 12, type: 1, properties: ["i": "integer"]}, {name: "0", value: 0, type: 0, properties: ["0": "literal"]} run/0: ingredient 0 is i mem/0: location 1013 is 2 run/0: ingredient 1 is 0 run/0: product 0 is 0 mem/0: storing 0 in location 1008 run/0: instruction integer-to-decimal-string/35 +run/0: break-if {name: "done?", value: 7, type: 3, properties: ["done?": "boolean"]}, {name: "", value: 6, type: , properties: ["": ]} mem/0: location 1008 is 0 run/0: ingredient 0 is 0 run/0: jump-if fell through run/0: instruction integer-to-decimal-string/36 +run/0: {name: "src", value: 14, type: 4, properties: ["src": "character"]} <- index {name: "buf", value: 11, type: 2-5-4, properties: ["buf": "address":"array":"character", "deref": ]}, {name: "i", value: 12, type: 1, properties: ["i": "integer"]} run/0: ingredient 0 is {name: "buf", value: 11, type: 2-5-4, properties: ["buf": "address":"array":"character", "deref": ]} mem/0: location 1012 is 1062 run/0: ingredient 1 is {name: "i", value: 12, type: 1, properties: ["i": "integer"]} @@ -526,6 +626,7 @@ mem/0: location 1065 is 50 run/0: product 0 is 50 mem/0: storing 50 in location 1015 run/0: instruction integer-to-decimal-string/37 +run/0: {name: "dest", value: 15, type: 2-4, properties: ["dest": "address":"character"]} <- index-address {name: "result", value: 2, type: 2-5-4, properties: ["result": "address":"array":"character", "deref": ]}, {name: "j", value: 13, type: 1, properties: ["j": "integer"]} run/0: ingredient 0 is result mem/0: location 1003 is 1272 run/0: ingredient 1 is {name: "j", value: 13, type: 1, properties: ["j": "integer"]} @@ -534,36 +635,43 @@ run/0: address to copy is 1273 run/0: product 0 is 1273 mem/0: storing 1273 in location 1016 run/0: instruction integer-to-decimal-string/38 +run/0: {name: "dest", value: 15, type: 2-4, properties: ["dest": "address":"character", "deref": ]} <- copy {name: "src", value: 14, type: 4, properties: ["src": "character"]} run/0: ingredient 0 is src mem/0: location 1015 is 50 mem/0: location 1016 is 1273 mem/0: storing 50 in location 1273 run/0: instruction integer-to-decimal-string/39 +run/0: {name: "i", value: 12, type: 1, properties: ["i": "integer"]} <- subtract {name: "i", value: 12, type: 1, properties: ["i": "integer"]}, {name: "1", value: 1, type: 0, properties: ["1": "literal"]} run/0: ingredient 0 is i mem/0: location 1013 is 2 run/0: ingredient 1 is 1 run/0: product 0 is 1 mem/0: storing 1 in location 1013 run/0: instruction integer-to-decimal-string/40 +run/0: {name: "j", value: 13, type: 1, properties: ["j": "integer"]} <- add {name: "j", value: 13, type: 1, properties: ["j": "integer"]}, {name: "1", value: 1, type: 0, properties: ["1": "literal"]} run/0: ingredient 0 is j mem/0: location 1014 is 0 run/0: ingredient 1 is 1 run/0: product 0 is 1 mem/0: storing 1 in location 1014 run/0: instruction integer-to-decimal-string/41 +run/0: loop {name: "", value: -8, type: , properties: ["": ]} run/0: ingredient 0 is -8 run/0: jumping to instruction 34 run/0: instruction integer-to-decimal-string/34 +run/0: {name: "done?", value: 7, type: 3, properties: ["done?": "boolean"]} <- lesser-than {name: "i", value: 12, type: 1, properties: ["i": "integer"]}, {name: "0", value: 0, type: 0, properties: ["0": "literal"]} run/0: ingredient 0 is i mem/0: location 1013 is 1 run/0: ingredient 1 is 0 run/0: product 0 is 0 mem/0: storing 0 in location 1008 run/0: instruction integer-to-decimal-string/35 +run/0: break-if {name: "done?", value: 7, type: 3, properties: ["done?": "boolean"]}, {name: "", value: 6, type: , properties: ["": ]} mem/0: location 1008 is 0 run/0: ingredient 0 is 0 run/0: jump-if fell through run/0: instruction integer-to-decimal-string/36 +run/0: {name: "src", value: 14, type: 4, properties: ["src": "character"]} <- index {name: "buf", value: 11, type: 2-5-4, properties: ["buf": "address":"array":"character", "deref": ]}, {name: "i", value: 12, type: 1, properties: ["i": "integer"]} run/0: ingredient 0 is {name: "buf", value: 11, type: 2-5-4, properties: ["buf": "address":"array":"character", "deref": ]} mem/0: location 1012 is 1062 run/0: ingredient 1 is {name: "i", value: 12, type: 1, properties: ["i": "integer"]} @@ -574,6 +682,7 @@ mem/0: location 1064 is 51 run/0: product 0 is 51 mem/0: storing 51 in location 1015 run/0: instruction integer-to-decimal-string/37 +run/0: {name: "dest", value: 15, type: 2-4, properties: ["dest": "address":"character"]} <- index-address {name: "result", value: 2, type: 2-5-4, properties: ["result": "address":"array":"character", "deref": ]}, {name: "j", value: 13, type: 1, properties: ["j": "integer"]} run/0: ingredient 0 is result mem/0: location 1003 is 1272 run/0: ingredient 1 is {name: "j", value: 13, type: 1, properties: ["j": "integer"]} @@ -582,36 +691,43 @@ run/0: address to copy is 1274 run/0: product 0 is 1274 mem/0: storing 1274 in location 1016 run/0: instruction integer-to-decimal-string/38 +run/0: {name: "dest", value: 15, type: 2-4, properties: ["dest": "address":"character", "deref": ]} <- copy {name: "src", value: 14, type: 4, properties: ["src": "character"]} run/0: ingredient 0 is src mem/0: location 1015 is 51 mem/0: location 1016 is 1274 mem/0: storing 51 in location 1274 run/0: instruction integer-to-decimal-string/39 +run/0: {name: "i", value: 12, type: 1, properties: ["i": "integer"]} <- subtract {name: "i", value: 12, type: 1, properties: ["i": "integer"]}, {name: "1", value: 1, type: 0, properties: ["1": "literal"]} run/0: ingredient 0 is i mem/0: location 1013 is 1 run/0: ingredient 1 is 1 run/0: product 0 is 0 mem/0: storing 0 in location 1013 run/0: instruction integer-to-decimal-string/40 +run/0: {name: "j", value: 13, type: 1, properties: ["j": "integer"]} <- add {name: "j", value: 13, type: 1, properties: ["j": "integer"]}, {name: "1", value: 1, type: 0, properties: ["1": "literal"]} run/0: ingredient 0 is j mem/0: location 1014 is 1 run/0: ingredient 1 is 1 run/0: product 0 is 2 mem/0: storing 2 in location 1014 run/0: instruction integer-to-decimal-string/41 +run/0: loop {name: "", value: -8, type: , properties: ["": ]} run/0: ingredient 0 is -8 run/0: jumping to instruction 34 run/0: instruction integer-to-decimal-string/34 +run/0: {name: "done?", value: 7, type: 3, properties: ["done?": "boolean"]} <- lesser-than {name: "i", value: 12, type: 1, properties: ["i": "integer"]}, {name: "0", value: 0, type: 0, properties: ["0": "literal"]} run/0: ingredient 0 is i mem/0: location 1013 is 0 run/0: ingredient 1 is 0 run/0: product 0 is 0 mem/0: storing 0 in location 1008 run/0: instruction integer-to-decimal-string/35 +run/0: break-if {name: "done?", value: 7, type: 3, properties: ["done?": "boolean"]}, {name: "", value: 6, type: , properties: ["": ]} mem/0: location 1008 is 0 run/0: ingredient 0 is 0 run/0: jump-if fell through run/0: instruction integer-to-decimal-string/36 +run/0: {name: "src", value: 14, type: 4, properties: ["src": "character"]} <- index {name: "buf", value: 11, type: 2-5-4, properties: ["buf": "address":"array":"character", "deref": ]}, {name: "i", value: 12, type: 1, properties: ["i": "integer"]} run/0: ingredient 0 is {name: "buf", value: 11, type: 2-5-4, properties: ["buf": "address":"array":"character", "deref": ]} mem/0: location 1012 is 1062 run/0: ingredient 1 is {name: "i", value: 12, type: 1, properties: ["i": "integer"]} @@ -622,6 +738,7 @@ mem/0: location 1063 is 52 run/0: product 0 is 52 mem/0: storing 52 in location 1015 run/0: instruction integer-to-decimal-string/37 +run/0: {name: "dest", value: 15, type: 2-4, properties: ["dest": "address":"character"]} <- index-address {name: "result", value: 2, type: 2-5-4, properties: ["result": "address":"array":"character", "deref": ]}, {name: "j", value: 13, type: 1, properties: ["j": "integer"]} run/0: ingredient 0 is result mem/0: location 1003 is 1272 run/0: ingredient 1 is {name: "j", value: 13, type: 1, properties: ["j": "integer"]} @@ -630,41 +747,49 @@ run/0: address to copy is 1275 run/0: product 0 is 1275 mem/0: storing 1275 in location 1016 run/0: instruction integer-to-decimal-string/38 +run/0: {name: "dest", value: 15, type: 2-4, properties: ["dest": "address":"character", "deref": ]} <- copy {name: "src", value: 14, type: 4, properties: ["src": "character"]} run/0: ingredient 0 is src mem/0: location 1015 is 52 mem/0: location 1016 is 1275 mem/0: storing 52 in location 1275 run/0: instruction integer-to-decimal-string/39 +run/0: {name: "i", value: 12, type: 1, properties: ["i": "integer"]} <- subtract {name: "i", value: 12, type: 1, properties: ["i": "integer"]}, {name: "1", value: 1, type: 0, properties: ["1": "literal"]} run/0: ingredient 0 is i mem/0: location 1013 is 0 run/0: ingredient 1 is 1 run/0: product 0 is -1 mem/0: storing -1 in location 1013 run/0: instruction integer-to-decimal-string/40 +run/0: {name: "j", value: 13, type: 1, properties: ["j": "integer"]} <- add {name: "j", value: 13, type: 1, properties: ["j": "integer"]}, {name: "1", value: 1, type: 0, properties: ["1": "literal"]} run/0: ingredient 0 is j mem/0: location 1014 is 2 run/0: ingredient 1 is 1 run/0: product 0 is 3 mem/0: storing 3 in location 1014 run/0: instruction integer-to-decimal-string/41 +run/0: loop {name: "", value: -8, type: , properties: ["": ]} run/0: ingredient 0 is -8 run/0: jumping to instruction 34 run/0: instruction integer-to-decimal-string/34 +run/0: {name: "done?", value: 7, type: 3, properties: ["done?": "boolean"]} <- lesser-than {name: "i", value: 12, type: 1, properties: ["i": "integer"]}, {name: "0", value: 0, type: 0, properties: ["0": "literal"]} run/0: ingredient 0 is i mem/0: location 1013 is -1 run/0: ingredient 1 is 0 run/0: product 0 is 1 mem/0: storing 1 in location 1008 run/0: instruction integer-to-decimal-string/35 +run/0: break-if {name: "done?", value: 7, type: 3, properties: ["done?": "boolean"]}, {name: "", value: 6, type: , properties: ["": ]} mem/0: location 1008 is 1 run/0: ingredient 0 is 1 run/0: ingredient 1 is run/0: jumping to instruction 42 run/0: instruction integer-to-decimal-string/43 +run/0: reply {name: "result", value: 2, type: 2-5-4, properties: ["result": "address":"array":"character"]} mem/0: location 1003 is 1272 run/0: result 0 is 1272 mem/0: storing 1272 in location 1 run/0: instruction test-integer-to-decimal-digit-positive/1 +run/0: {name: "2", value: 2, type: 5-4, properties: ["2": "array":"character", "raw": ]} <- copy {name: "1", value: 1, type: 2-5-4, properties: ["1": "address":"array":"character", "deref": , "raw": ]} run/0: ingredient 0 is 1 mem/0: location 1 is 1272 mem/0: location 1272 is 3 diff --git a/cpp/.traces/integer-to-decimal-digit-zero b/cpp/.traces/integer-to-decimal-digit-zero index 9d5fb6e3..16b62e31 100644 --- a/cpp/.traces/integer-to-decimal-digit-zero +++ b/cpp/.traces/integer-to-decimal-digit-zero @@ -10,23 +10,30 @@ after-brace/0: copy ... new/0: routine allocated memory from 1000 to 101000 schedule/0: test-integer-to-decimal-digit-zero run/0: instruction test-integer-to-decimal-digit-zero/0 +run/0: {name: "1", value: 1, type: 2-5-4, properties: ["1": "address":"array":"character", "raw": ]} <- integer-to-decimal-string {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 {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 +run/0: {name: "n", value: 1, type: 1, properties: ["n": "integer"]} <- next-ingredient run/0: product 0 is 0 mem/0: storing 0 in location 1002 run/0: instruction integer-to-decimal-string/3 +run/0: break-if {name: "n", value: 1, type: 1, properties: ["n": "integer"]}, {name: "", value: 2, type: , properties: ["": ]} 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 {name: "0", value: 0, type: 0, properties: ["0": "literal-string"]} mem/0: storing 1030 in location 1003 run/0: instruction integer-to-decimal-string/5 +run/0: reply {name: "result", value: 2, type: 2-5-4, properties: ["result": "address":"array":"character"]} mem/0: location 1003 is 1030 run/0: result 0 is 1030 mem/0: storing 1030 in location 1 run/0: instruction test-integer-to-decimal-digit-zero/1 +run/0: {name: "2", value: 2, type: 5-4, properties: ["2": "array":"character", "raw": ]} <- copy {name: "1", value: 1, type: 2-5-4, properties: ["1": "address":"array":"character", "deref": , "raw": ]} run/0: ingredient 0 is 1 mem/0: location 1 is 1030 mem/0: location 1030 is 1 diff --git a/cpp/.traces/interpolate-at-end b/cpp/.traces/interpolate-at-end index b2085a50..2ea86fe0 100644 --- a/cpp/.traces/interpolate-at-end +++ b/cpp/.traces/interpolate-at-end @@ -21,37 +21,48 @@ after-brace/0: copy ... new/0: routine allocated memory from 1000 to 101000 schedule/0: test-interpolate-at-end run/0: instruction test-interpolate-at-end/0 +run/0: {name: "1", value: 1, type: 2-5-4, properties: ["1": "address":"array":"character", "raw": ]} <- new {name: "hello, _", value: 0, type: 0, properties: ["hello, _": "literal-string"]} mem/0: storing 1000 in location 1 run/0: instruction test-interpolate-at-end/1 +run/0: {name: "2", value: 2, type: 2-5-4, properties: ["2": "address":"array":"character", "raw": ]} <- new {name: "abc", value: 0, type: 0, properties: ["abc": "literal-string"]} mem/0: storing 1009 in location 2 run/0: instruction test-interpolate-at-end/2 +run/0: {name: "3", value: 3, type: 2-5-4, properties: ["3": "address":"array":"character", "raw": ]} <- interpolate {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 {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 +run/0: {name: "template", value: 1, type: 2-5-4, properties: ["template": "address":"array":"character"]} <- next-ingredient run/0: product 0 is 1000 mem/0: storing 1000 in location 1015 run/0: instruction interpolate/2 +run/0: {name: "tem-len", value: 2, type: 1, properties: ["tem-len": "integer"]} <- length {name: "template", value: 1, type: 2-5-4, properties: ["template": "address":"array":"character", "deref": ]} mem/0: location 1015 is 1000 mem/0: storing 8 in location 1016 run/0: instruction interpolate/3 +run/0: {name: "result-len", value: 3, type: 1, properties: ["result-len": "integer"]} <- copy {name: "tem-len", value: 2, type: 1, properties: ["tem-len": "integer"]} run/0: ingredient 0 is tem-len mem/0: location 1016 is 8 mem/0: storing 8 in location 1017 run/0: instruction interpolate/5 +run/0: {name: "a", value: 4, type: 2-5-4, properties: ["a": "address":"array":"character"]}, {name: "arg-received?", value: 5, type: 3, properties: ["arg-received?": "boolean"]} <- next-ingredient run/0: product 0 is 1009 mem/0: storing 1009 in location 1018 mem/0: storing 1 in location 1019 run/0: instruction interpolate/6 +run/0: break-unless {name: "arg-received?", value: 5, type: 3, properties: ["arg-received?": "boolean"]}, {name: "", value: 4, type: , properties: ["": ]} mem/0: location 1019 is 1 run/0: ingredient 0 is 1 run/0: jump-unless fell through run/0: instruction interpolate/7 +run/0: {name: "a-len", value: 6, type: 1, properties: ["a-len": "integer"]} <- length {name: "a", value: 4, type: 2-5-4, properties: ["a": "address":"array":"character", "deref": ]} mem/0: location 1018 is 1009 mem/0: storing 3 in location 1020 run/0: instruction interpolate/8 +run/0: {name: "result-len", value: 3, type: 1, properties: ["result-len": "integer"]} <- add {name: "result-len", value: 3, type: 1, properties: ["result-len": "integer"]}, {name: "a-len", value: 6, type: 1, properties: ["a-len": "integer"]} run/0: ingredient 0 is result-len mem/0: location 1017 is 8 run/0: ingredient 1 is a-len @@ -59,44 +70,56 @@ mem/0: location 1020 is 3 run/0: product 0 is 11 mem/0: storing 11 in location 1017 run/0: instruction interpolate/9 +run/0: {name: "result-len", value: 3, type: 1, properties: ["result-len": "integer"]} <- subtract {name: "result-len", value: 3, type: 1, properties: ["result-len": "integer"]}, {name: "1", value: 1, type: 0, properties: ["1": "literal"]} run/0: ingredient 0 is result-len mem/0: location 1017 is 11 run/0: ingredient 1 is 1 run/0: product 0 is 10 mem/0: storing 10 in location 1017 run/0: instruction interpolate/10 +run/0: loop {name: "", value: -6, type: , properties: ["": ]} run/0: ingredient 0 is -6 run/0: jumping to instruction 5 run/0: instruction interpolate/5 +run/0: {name: "a", value: 4, type: 2-5-4, properties: ["a": "address":"array":"character"]}, {name: "arg-received?", value: 5, type: 3, properties: ["arg-received?": "boolean"]} <- next-ingredient mem/0: storing 0 in location 1019 run/0: instruction interpolate/6 +run/0: break-unless {name: "arg-received?", value: 5, type: 3, properties: ["arg-received?": "boolean"]}, {name: "", value: 4, type: , properties: ["": ]} mem/0: location 1019 is 0 run/0: ingredient 0 is 0 run/0: ingredient 1 is run/0: jumping to instruction 11 run/0: instruction interpolate/12 +run/0: rewind-ingredients run/0: instruction interpolate/13 +run/0: {name: "_", value: 0, type: 0, properties: ["_": "dummy"]} <- next-ingredient 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 {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: 1073 mem/0: storing 1073 in location 1021 run/0: instruction interpolate/15 +run/0: {name: "result-idx", value: 8, type: 1, properties: ["result-idx": "integer"]} <- copy {name: "0", value: 0, type: 0, properties: ["0": "literal"]} run/0: ingredient 0 is 0 mem/0: storing 0 in location 1022 run/0: instruction interpolate/16 +run/0: {name: "i", value: 9, type: 1, properties: ["i": "integer"]} <- copy {name: "0", value: 0, type: 0, properties: ["0": "literal"]} run/0: ingredient 0 is 0 mem/0: storing 0 in location 1023 run/0: instruction interpolate/18 +run/0: {name: "a", value: 4, type: 2-5-4, properties: ["a": "address":"array":"character"]}, {name: "arg-received?", value: 5, type: 3, properties: ["arg-received?": "boolean"]} <- next-ingredient run/0: product 0 is 1009 mem/0: storing 1009 in location 1018 mem/0: storing 1 in location 1019 run/0: instruction interpolate/19 +run/0: break-unless {name: "arg-received?", value: 5, type: 3, properties: ["arg-received?": "boolean"]}, {name: "", value: 25, type: , properties: ["": ]} mem/0: location 1019 is 1 run/0: ingredient 0 is 1 run/0: jump-unless fell through run/0: instruction interpolate/21 +run/0: {name: "tem-done?", value: 10, type: 3, properties: ["tem-done?": "boolean"]} <- greater-or-equal {name: "i", value: 9, type: 1, properties: ["i": "integer"]}, {name: "tem-len", value: 2, type: 1, properties: ["tem-len": "integer"]} run/0: ingredient 0 is i mem/0: location 1023 is 0 run/0: ingredient 1 is tem-len @@ -104,10 +127,12 @@ mem/0: location 1016 is 8 run/0: product 0 is 0 mem/0: storing 0 in location 1024 run/0: instruction interpolate/22 +run/0: break-if {name: "tem-done?", value: 10, type: 3, properties: ["tem-done?": "boolean"]}, {name: "2", value: 2, type: 0, properties: ["2": "blocks"]} mem/0: location 1024 is 0 run/0: ingredient 0 is 0 run/0: jump-if fell through run/0: instruction interpolate/23 +run/0: {name: "in", value: 11, type: 4, properties: ["in": "character"]} <- index {name: "template", value: 1, type: 2-5-4, properties: ["template": "address":"array":"character", "deref": ]}, {name: "i", value: 9, type: 1, properties: ["i": "integer"]} run/0: ingredient 0 is {name: "template", value: 1, type: 2-5-4, properties: ["template": "address":"array":"character", "deref": ]} mem/0: location 1015 is 1000 run/0: ingredient 1 is {name: "i", value: 9, type: 1, properties: ["i": "integer"]} @@ -118,16 +143,19 @@ mem/0: location 1001 is 104 run/0: product 0 is 104 mem/0: storing 104 in location 1025 run/0: instruction interpolate/24 +run/0: {name: "underscore?", value: 12, type: 3, properties: ["underscore?": "boolean"]} <- equal {name: "in", value: 11, type: 4, properties: ["in": "character"]}, {name: "95", value: 95, type: 0, properties: ["95": "literal"]} run/0: ingredient 0 is in mem/0: location 1025 is 104 run/0: ingredient 1 is 95 run/0: product 0 is 0 mem/0: storing 0 in location 1026 run/0: instruction interpolate/25 +run/0: break-if {name: "underscore?", value: 12, type: 3, properties: ["underscore?": "boolean"]}, {name: "", value: 5, type: , properties: ["": ]} mem/0: location 1026 is 0 run/0: ingredient 0 is 0 run/0: jump-if fell through run/0: instruction interpolate/26 +run/0: {name: "out", value: 13, type: 2-4, properties: ["out": "address":"character"]} <- index-address {name: "result", value: 7, type: 2-5-4, properties: ["result": "address":"array":"character", "deref": ]}, {name: "result-idx", value: 8, type: 1, properties: ["result-idx": "integer"]} run/0: ingredient 0 is result mem/0: location 1021 is 1073 run/0: ingredient 1 is {name: "result-idx", value: 8, type: 1, properties: ["result-idx": "integer"]} @@ -136,26 +164,31 @@ run/0: address to copy is 1074 run/0: product 0 is 1074 mem/0: storing 1074 in location 1027 run/0: instruction interpolate/27 +run/0: {name: "out", value: 13, type: 2-4, properties: ["out": "address":"character", "deref": ]} <- copy {name: "in", value: 11, type: 4, properties: ["in": "character"]} run/0: ingredient 0 is in mem/0: location 1025 is 104 mem/0: location 1027 is 1074 mem/0: storing 104 in location 1074 run/0: instruction interpolate/28 +run/0: {name: "i", value: 9, type: 1, properties: ["i": "integer"]} <- add {name: "i", value: 9, type: 1, properties: ["i": "integer"]}, {name: "1", value: 1, type: 0, properties: ["1": "literal"]} run/0: ingredient 0 is i mem/0: location 1023 is 0 run/0: ingredient 1 is 1 run/0: product 0 is 1 mem/0: storing 1 in location 1023 run/0: instruction interpolate/29 +run/0: {name: "result-idx", value: 8, type: 1, properties: ["result-idx": "integer"]} <- add {name: "result-idx", value: 8, type: 1, properties: ["result-idx": "integer"]}, {name: "1", value: 1, type: 0, properties: ["1": "literal"]} run/0: ingredient 0 is result-idx mem/0: location 1022 is 0 run/0: ingredient 1 is 1 run/0: product 0 is 1 mem/0: storing 1 in location 1022 run/0: instruction interpolate/30 +run/0: loop {name: "", value: -10, type: , properties: ["": ]} run/0: ingredient 0 is -10 run/0: jumping to instruction 21 run/0: instruction interpolate/21 +run/0: {name: "tem-done?", value: 10, type: 3, properties: ["tem-done?": "boolean"]} <- greater-or-equal {name: "i", value: 9, type: 1, properties: ["i": "integer"]}, {name: "tem-len", value: 2, type: 1, properties: ["tem-len": "integer"]} run/0: ingredient 0 is i mem/0: location 1023 is 1 run/0: ingredient 1 is tem-len @@ -163,10 +196,12 @@ mem/0: location 1016 is 8 run/0: product 0 is 0 mem/0: storing 0 in location 1024 run/0: instruction interpolate/22 +run/0: break-if {name: "tem-done?", value: 10, type: 3, properties: ["tem-done?": "boolean"]}, {name: "2", value: 2, type: 0, properties: ["2": "blocks"]} mem/0: location 1024 is 0 run/0: ingredient 0 is 0 run/0: jump-if fell through run/0: instruction interpolate/23 +run/0: {name: "in", value: 11, type: 4, properties: ["in": "character"]} <- index {name: "template", value: 1, type: 2-5-4, properties: ["template": "address":"array":"character", "deref": ]}, {name: "i", value: 9, type: 1, properties: ["i": "integer"]} run/0: ingredient 0 is {name: "template", value: 1, type: 2-5-4, properties: ["template": "address":"array":"character", "deref": ]} mem/0: location 1015 is 1000 run/0: ingredient 1 is {name: "i", value: 9, type: 1, properties: ["i": "integer"]} @@ -177,16 +212,19 @@ mem/0: location 1002 is 101 run/0: product 0 is 101 mem/0: storing 101 in location 1025 run/0: instruction interpolate/24 +run/0: {name: "underscore?", value: 12, type: 3, properties: ["underscore?": "boolean"]} <- equal {name: "in", value: 11, type: 4, properties: ["in": "character"]}, {name: "95", value: 95, type: 0, properties: ["95": "literal"]} run/0: ingredient 0 is in mem/0: location 1025 is 101 run/0: ingredient 1 is 95 run/0: product 0 is 0 mem/0: storing 0 in location 1026 run/0: instruction interpolate/25 +run/0: break-if {name: "underscore?", value: 12, type: 3, properties: ["underscore?": "boolean"]}, {name: "", value: 5, type: , properties: ["": ]} mem/0: location 1026 is 0 run/0: ingredient 0 is 0 run/0: jump-if fell through run/0: instruction interpolate/26 +run/0: {name: "out", value: 13, type: 2-4, properties: ["out": "address":"character"]} <- index-address {name: "result", value: 7, type: 2-5-4, properties: ["result": "address":"array":"character", "deref": ]}, {name: "result-idx", value: 8, type: 1, properties: ["result-idx": "integer"]} run/0: ingredient 0 is result mem/0: location 1021 is 1073 run/0: ingredient 1 is {name: "result-idx", value: 8, type: 1, properties: ["result-idx": "integer"]} @@ -195,26 +233,31 @@ run/0: address to copy is 1075 run/0: product 0 is 1075 mem/0: storing 1075 in location 1027 run/0: instruction interpolate/27 +run/0: {name: "out", value: 13, type: 2-4, properties: ["out": "address":"character", "deref": ]} <- copy {name: "in", value: 11, type: 4, properties: ["in": "character"]} run/0: ingredient 0 is in mem/0: location 1025 is 101 mem/0: location 1027 is 1075 mem/0: storing 101 in location 1075 run/0: instruction interpolate/28 +run/0: {name: "i", value: 9, type: 1, properties: ["i": "integer"]} <- add {name: "i", value: 9, type: 1, properties: ["i": "integer"]}, {name: "1", value: 1, type: 0, properties: ["1": "literal"]} run/0: ingredient 0 is i mem/0: location 1023 is 1 run/0: ingredient 1 is 1 run/0: product 0 is 2 mem/0: storing 2 in location 1023 run/0: instruction interpolate/29 +run/0: {name: "result-idx", value: 8, type: 1, properties: ["result-idx": "integer"]} <- add {name: "result-idx", value: 8, type: 1, properties: ["result-idx": "integer"]}, {name: "1", value: 1, type: 0, properties: ["1": "literal"]} run/0: ingredient 0 is result-idx mem/0: location 1022 is 1 run/0: ingredient 1 is 1 run/0: product 0 is 2 mem/0: storing 2 in location 1022 run/0: instruction interpolate/30 +run/0: loop {name: "", value: -10, type: , properties: ["": ]} run/0: ingredient 0 is -10 run/0: jumping to instruction 21 run/0: instruction interpolate/21 +run/0: {name: "tem-done?", value: 10, type: 3, properties: ["tem-done?": "boolean"]} <- greater-or-equal {name: "i", value: 9, type: 1, properties: ["i": "integer"]}, {name: "tem-len", value: 2, type: 1, properties: ["tem-len": "integer"]} run/0: ingredient 0 is i mem/0: location 1023 is 2 run/0: ingredient 1 is tem-len @@ -222,10 +265,12 @@ mem/0: location 1016 is 8 run/0: product 0 is 0 mem/0: storing 0 in location 1024 run/0: instruction interpolate/22 +run/0: break-if {name: "tem-done?", value: 10, type: 3, properties: ["tem-done?": "boolean"]}, {name: "2", value: 2, type: 0, properties: ["2": "blocks"]} mem/0: location 1024 is 0 run/0: ingredient 0 is 0 run/0: jump-if fell through run/0: instruction interpolate/23 +run/0: {name: "in", value: 11, type: 4, properties: ["in": "character"]} <- index {name: "template", value: 1, type: 2-5-4, properties: ["template": "address":"array":"character", "deref": ]}, {name: "i", value: 9, type: 1, properties: ["i": "integer"]} run/0: ingredient 0 is {name: "template", value: 1, type: 2-5-4, properties: ["template": "address":"array":"character", "deref": ]} mem/0: location 1015 is 1000 run/0: ingredient 1 is {name: "i", value: 9, type: 1, properties: ["i": "integer"]} @@ -236,16 +281,19 @@ mem/0: location 1003 is 108 run/0: product 0 is 108 mem/0: storing 108 in location 1025 run/0: instruction interpolate/24 +run/0: {name: "underscore?", value: 12, type: 3, properties: ["underscore?": "boolean"]} <- equal {name: "in", value: 11, type: 4, properties: ["in": "character"]}, {name: "95", value: 95, type: 0, properties: ["95": "literal"]} run/0: ingredient 0 is in mem/0: location 1025 is 108 run/0: ingredient 1 is 95 run/0: product 0 is 0 mem/0: storing 0 in location 1026 run/0: instruction interpolate/25 +run/0: break-if {name: "underscore?", value: 12, type: 3, properties: ["underscore?": "boolean"]}, {name: "", value: 5, type: , properties: ["": ]} mem/0: location 1026 is 0 run/0: ingredient 0 is 0 run/0: jump-if fell through run/0: instruction interpolate/26 +run/0: {name: "out", value: 13, type: 2-4, properties: ["out": "address":"character"]} <- index-address {name: "result", value: 7, type: 2-5-4, properties: ["result": "address":"array":"character", "deref": ]}, {name: "result-idx", value: 8, type: 1, properties: ["result-idx": "integer"]} run/0: ingredient 0 is result mem/0: location 1021 is 1073 run/0: ingredient 1 is {name: "result-idx", value: 8, type: 1, properties: ["result-idx": "integer"]} @@ -254,26 +302,31 @@ run/0: address to copy is 1076 run/0: product 0 is 1076 mem/0: storing 1076 in location 1027 run/0: instruction interpolate/27 +run/0: {name: "out", value: 13, type: 2-4, properties: ["out": "address":"character", "deref": ]} <- copy {name: "in", value: 11, type: 4, properties: ["in": "character"]} run/0: ingredient 0 is in mem/0: location 1025 is 108 mem/0: location 1027 is 1076 mem/0: storing 108 in location 1076 run/0: instruction interpolate/28 +run/0: {name: "i", value: 9, type: 1, properties: ["i": "integer"]} <- add {name: "i", value: 9, type: 1, properties: ["i": "integer"]}, {name: "1", value: 1, type: 0, properties: ["1": "literal"]} run/0: ingredient 0 is i mem/0: location 1023 is 2 run/0: ingredient 1 is 1 run/0: product 0 is 3 mem/0: storing 3 in location 1023 run/0: instruction interpolate/29 +run/0: {name: "result-idx", value: 8, type: 1, properties: ["result-idx": "integer"]} <- add {name: "result-idx", value: 8, type: 1, properties: ["result-idx": "integer"]}, {name: "1", value: 1, type: 0, properties: ["1": "literal"]} run/0: ingredient 0 is result-idx mem/0: location 1022 is 2 run/0: ingredient 1 is 1 run/0: product 0 is 3 mem/0: storing 3 in location 1022 run/0: instruction interpolate/30 +run/0: loop {name: "", value: -10, type: , properties: ["": ]} run/0: ingredient 0 is -10 run/0: jumping to instruction 21 run/0: instruction interpolate/21 +run/0: {name: "tem-done?", value: 10, type: 3, properties: ["tem-done?": "boolean"]} <- greater-or-equal {name: "i", value: 9, type: 1, properties: ["i": "integer"]}, {name: "tem-len", value: 2, type: 1, properties: ["tem-len": "integer"]} run/0: ingredient 0 is i mem/0: location 1023 is 3 run/0: ingredient 1 is tem-len @@ -281,10 +334,12 @@ mem/0: location 1016 is 8 run/0: product 0 is 0 mem/0: storing 0 in location 1024 run/0: instruction interpolate/22 +run/0: break-if {name: "tem-done?", value: 10, type: 3, properties: ["tem-done?": "boolean"]}, {name: "2", value: 2, type: 0, properties: ["2": "blocks"]} mem/0: location 1024 is 0 run/0: ingredient 0 is 0 run/0: jump-if fell through run/0: instruction interpolate/23 +run/0: {name: "in", value: 11, type: 4, properties: ["in": "character"]} <- index {name: "template", value: 1, type: 2-5-4, properties: ["template": "address":"array":"character", "deref": ]}, {name: "i", value: 9, type: 1, properties: ["i": "integer"]} run/0: ingredient 0 is {name: "template", value: 1, type: 2-5-4, properties: ["template": "address":"array":"character", "deref": ]} mem/0: location 1015 is 1000 run/0: ingredient 1 is {name: "i", value: 9, type: 1, properties: ["i": "integer"]} @@ -295,16 +350,19 @@ mem/0: location 1004 is 108 run/0: product 0 is 108 mem/0: storing 108 in location 1025 run/0: instruction interpolate/24 +run/0: {name: "underscore?", value: 12, type: 3, properties: ["underscore?": "boolean"]} <- equal {name: "in", value: 11, type: 4, properties: ["in": "character"]}, {name: "95", value: 95, type: 0, properties: ["95": "literal"]} run/0: ingredient 0 is in mem/0: location 1025 is 108 run/0: ingredient 1 is 95 run/0: product 0 is 0 mem/0: storing 0 in location 1026 run/0: instruction interpolate/25 +run/0: break-if {name: "underscore?", value: 12, type: 3, properties: ["underscore?": "boolean"]}, {name: "", value: 5, type: , properties: ["": ]} mem/0: location 1026 is 0 run/0: ingredient 0 is 0 run/0: jump-if fell through run/0: instruction interpolate/26 +run/0: {name: "out", value: 13, type: 2-4, properties: ["out": "address":"character"]} <- index-address {name: "result", value: 7, type: 2-5-4, properties: ["result": "address":"array":"character", "deref": ]}, {name: "result-idx", value: 8, type: 1, properties: ["result-idx": "integer"]} run/0: ingredient 0 is result mem/0: location 1021 is 1073 run/0: ingredient 1 is {name: "result-idx", value: 8, type: 1, properties: ["result-idx": "integer"]} @@ -313,26 +371,31 @@ run/0: address to copy is 1077 run/0: product 0 is 1077 mem/0: storing 1077 in location 1027 run/0: instruction interpolate/27 +run/0: {name: "out", value: 13, type: 2-4, properties: ["out": "address":"character", "deref": ]} <- copy {name: "in", value: 11, type: 4, properties: ["in": "character"]} run/0: ingredient 0 is in mem/0: location 1025 is 108 mem/0: location 1027 is 1077 mem/0: storing 108 in location 1077 run/0: instruction interpolate/28 +run/0: {name: "i", value: 9, type: 1, properties: ["i": "integer"]} <- add {name: "i", value: 9, type: 1, properties: ["i": "integer"]}, {name: "1", value: 1, type: 0, properties: ["1": "literal"]} run/0: ingredient 0 is i mem/0: location 1023 is 3 run/0: ingredient 1 is 1 run/0: product 0 is 4 mem/0: storing 4 in location 1023 run/0: instruction interpolate/29 +run/0: {name: "result-idx", value: 8, type: 1, properties: ["result-idx": "integer"]} <- add {name: "result-idx", value: 8, type: 1, properties: ["result-idx": "integer"]}, {name: "1", value: 1, type: 0, properties: ["1": "literal"]} run/0: ingredient 0 is result-idx mem/0: location 1022 is 3 run/0: ingredient 1 is 1 run/0: product 0 is 4 mem/0: storing 4 in location 1022 run/0: instruction interpolate/30 +run/0: loop {name: "", value: -10, type: , properties: ["": ]} run/0: ingredient 0 is -10 run/0: jumping to instruction 21 run/0: instruction interpolate/21 +run/0: {name: "tem-done?", value: 10, type: 3, properties: ["tem-done?": "boolean"]} <- greater-or-equal {name: "i", value: 9, type: 1, properties: ["i": "integer"]}, {name: "tem-len", value: 2, type: 1, properties: ["tem-len": "integer"]} run/0: ingredient 0 is i mem/0: location 1023 is 4 run/0: ingredient 1 is tem-len @@ -340,10 +403,12 @@ mem/0: location 1016 is 8 run/0: product 0 is 0 mem/0: storing 0 in location 1024 run/0: instruction interpolate/22 +run/0: break-if {name: "tem-done?", value: 10, type: 3, properties: ["tem-done?": "boolean"]}, {name: "2", value: 2, type: 0, properties: ["2": "blocks"]} mem/0: location 1024 is 0 run/0: ingredient 0 is 0 run/0: jump-if fell through run/0: instruction interpolate/23 +run/0: {name: "in", value: 11, type: 4, properties: ["in": "character"]} <- index {name: "template", value: 1, type: 2-5-4, properties: ["template": "address":"array":"character", "deref": ]}, {name: "i", value: 9, type: 1, properties: ["i": "integer"]} run/0: ingredient 0 is {name: "template", value: 1, type: 2-5-4, properties: ["template": "address":"array":"character", "deref": ]} mem/0: location 1015 is 1000 run/0: ingredient 1 is {name: "i", value: 9, type: 1, properties: ["i": "integer"]} @@ -354,16 +419,19 @@ mem/0: location 1005 is 111 run/0: product 0 is 111 mem/0: storing 111 in location 1025 run/0: instruction interpolate/24 +run/0: {name: "underscore?", value: 12, type: 3, properties: ["underscore?": "boolean"]} <- equal {name: "in", value: 11, type: 4, properties: ["in": "character"]}, {name: "95", value: 95, type: 0, properties: ["95": "literal"]} run/0: ingredient 0 is in mem/0: location 1025 is 111 run/0: ingredient 1 is 95 run/0: product 0 is 0 mem/0: storing 0 in location 1026 run/0: instruction interpolate/25 +run/0: break-if {name: "underscore?", value: 12, type: 3, properties: ["underscore?": "boolean"]}, {name: "", value: 5, type: , properties: ["": ]} mem/0: location 1026 is 0 run/0: ingredient 0 is 0 run/0: jump-if fell through run/0: instruction interpolate/26 +run/0: {name: "out", value: 13, type: 2-4, properties: ["out": "address":"character"]} <- index-address {name: "result", value: 7, type: 2-5-4, properties: ["result": "address":"array":"character", "deref": ]}, {name: "result-idx", value: 8, type: 1, properties: ["result-idx": "integer"]} run/0: ingredient 0 is result mem/0: location 1021 is 1073 run/0: ingredient 1 is {name: "result-idx", value: 8, type: 1, properties: ["result-idx": "integer"]} @@ -372,26 +440,31 @@ run/0: address to copy is 1078 run/0: product 0 is 1078 mem/0: storing 1078 in location 1027 run/0: instruction interpolate/27 +run/0: {name: "out", value: 13, type: 2-4, properties: ["out": "address":"character", "deref": ]} <- copy {name: "in", value: 11, type: 4, properties: ["in": "character"]} run/0: ingredient 0 is in mem/0: location 1025 is 111 mem/0: location 1027 is 1078 mem/0: storing 111 in location 1078 run/0: instruction interpolate/28 +run/0: {name: "i", value: 9, type: 1, properties: ["i": "integer"]} <- add {name: "i", value: 9, type: 1, properties: ["i": "integer"]}, {name: "1", value: 1, type: 0, properties: ["1": "literal"]} run/0: ingredient 0 is i mem/0: location 1023 is 4 run/0: ingredient 1 is 1 run/0: product 0 is 5 mem/0: storing 5 in location 1023 run/0: instruction interpolate/29 +run/0: {name: "result-idx", value: 8, type: 1, properties: ["result-idx": "integer"]} <- add {name: "result-idx", value: 8, type: 1, properties: ["result-idx": "integer"]}, {name: "1", value: 1, type: 0, properties: ["1": "literal"]} run/0: ingredient 0 is result-idx mem/0: location 1022 is 4 run/0: ingredient 1 is 1 run/0: product 0 is 5 mem/0: storing 5 in location 1022 run/0: instruction interpolate/30 +run/0: loop {name: "", value: -10, type: , properties: ["": ]} run/0: ingredient 0 is -10 run/0: jumping to instruction 21 run/0: instruction interpolate/21 +run/0: {name: "tem-done?", value: 10, type: 3, properties: ["tem-done?": "boolean"]} <- greater-or-equal {name: "i", value: 9, type: 1, properties: ["i": "integer"]}, {name: "tem-len", value: 2, type: 1, properties: ["tem-len": "integer"]} run/0: ingredient 0 is i mem/0: location 1023 is 5 run/0: ingredient 1 is tem-len @@ -399,10 +472,12 @@ mem/0: location 1016 is 8 run/0: product 0 is 0 mem/0: storing 0 in location 1024 run/0: instruction interpolate/22 +run/0: break-if {name: "tem-done?", value: 10, type: 3, properties: ["tem-done?": "boolean"]}, {name: "2", value: 2, type: 0, properties: ["2": "blocks"]} mem/0: location 1024 is 0 run/0: ingredient 0 is 0 run/0: jump-if fell through run/0: instruction interpolate/23 +run/0: {name: "in", value: 11, type: 4, properties: ["in": "character"]} <- index {name: "template", value: 1, type: 2-5-4, properties: ["template": "address":"array":"character", "deref": ]}, {name: "i", value: 9, type: 1, properties: ["i": "integer"]} run/0: ingredient 0 is {name: "template", value: 1, type: 2-5-4, properties: ["template": "address":"array":"character", "deref": ]} mem/0: location 1015 is 1000 run/0: ingredient 1 is {name: "i", value: 9, type: 1, properties: ["i": "integer"]} @@ -413,16 +488,19 @@ mem/0: location 1006 is 44 run/0: product 0 is 44 mem/0: storing 44 in location 1025 run/0: instruction interpolate/24 +run/0: {name: "underscore?", value: 12, type: 3, properties: ["underscore?": "boolean"]} <- equal {name: "in", value: 11, type: 4, properties: ["in": "character"]}, {name: "95", value: 95, type: 0, properties: ["95": "literal"]} run/0: ingredient 0 is in mem/0: location 1025 is 44 run/0: ingredient 1 is 95 run/0: product 0 is 0 mem/0: storing 0 in location 1026 run/0: instruction interpolate/25 +run/0: break-if {name: "underscore?", value: 12, type: 3, properties: ["underscore?": "boolean"]}, {name: "", value: 5, type: , properties: ["": ]} mem/0: location 1026 is 0 run/0: ingredient 0 is 0 run/0: jump-if fell through run/0: instruction interpolate/26 +run/0: {name: "out", value: 13, type: 2-4, properties: ["out": "address":"character"]} <- index-address {name: "result", value: 7, type: 2-5-4, properties: ["result": "address":"array":"character", "deref": ]}, {name: "result-idx", value: 8, type: 1, properties: ["result-idx": "integer"]} run/0: ingredient 0 is result mem/0: location 1021 is 1073 run/0: ingredient 1 is {name: "result-idx", value: 8, type: 1, properties: ["result-idx": "integer"]} @@ -431,26 +509,31 @@ run/0: address to copy is 1079 run/0: product 0 is 1079 mem/0: storing 1079 in location 1027 run/0: instruction interpolate/27 +run/0: {name: "out", value: 13, type: 2-4, properties: ["out": "address":"character", "deref": ]} <- copy {name: "in", value: 11, type: 4, properties: ["in": "character"]} run/0: ingredient 0 is in mem/0: location 1025 is 44 mem/0: location 1027 is 1079 mem/0: storing 44 in location 1079 run/0: instruction interpolate/28 +run/0: {name: "i", value: 9, type: 1, properties: ["i": "integer"]} <- add {name: "i", value: 9, type: 1, properties: ["i": "integer"]}, {name: "1", value: 1, type: 0, properties: ["1": "literal"]} run/0: ingredient 0 is i mem/0: location 1023 is 5 run/0: ingredient 1 is 1 run/0: product 0 is 6 mem/0: storing 6 in location 1023 run/0: instruction interpolate/29 +run/0: {name: "result-idx", value: 8, type: 1, properties: ["result-idx": "integer"]} <- add {name: "result-idx", value: 8, type: 1, properties: ["result-idx": "integer"]}, {name: "1", value: 1, type: 0, properties: ["1": "literal"]} run/0: ingredient 0 is result-idx mem/0: location 1022 is 5 run/0: ingredient 1 is 1 run/0: product 0 is 6 mem/0: storing 6 in location 1022 run/0: instruction interpolate/30 +run/0: loop {name: "", value: -10, type: , properties: ["": ]} run/0: ingredient 0 is -10 run/0: jumping to instruction 21 run/0: instruction interpolate/21 +run/0: {name: "tem-done?", value: 10, type: 3, properties: ["tem-done?": "boolean"]} <- greater-or-equal {name: "i", value: 9, type: 1, properties: ["i": "integer"]}, {name: "tem-len", value: 2, type: 1, properties: ["tem-len": "integer"]} run/0: ingredient 0 is i mem/0: location 1023 is 6 run/0: ingredient 1 is tem-len @@ -458,10 +541,12 @@ mem/0: location 1016 is 8 run/0: product 0 is 0 mem/0: storing 0 in location 1024 run/0: instruction interpolate/22 +run/0: break-if {name: "tem-done?", value: 10, type: 3, properties: ["tem-done?": "boolean"]}, {name: "2", value: 2, type: 0, properties: ["2": "blocks"]} mem/0: location 1024 is 0 run/0: ingredient 0 is 0 run/0: jump-if fell through run/0: instruction interpolate/23 +run/0: {name: "in", value: 11, type: 4, properties: ["in": "character"]} <- index {name: "template", value: 1, type: 2-5-4, properties: ["template": "address":"array":"character", "deref": ]}, {name: "i", value: 9, type: 1, properties: ["i": "integer"]} run/0: ingredient 0 is {name: "template", value: 1, type: 2-5-4, properties: ["template": "address":"array":"character", "deref": ]} mem/0: location 1015 is 1000 run/0: ingredient 1 is {name: "i", value: 9, type: 1, properties: ["i": "integer"]} @@ -472,16 +557,19 @@ mem/0: location 1007 is 32 run/0: product 0 is 32 mem/0: storing 32 in location 1025 run/0: instruction interpolate/24 +run/0: {name: "underscore?", value: 12, type: 3, properties: ["underscore?": "boolean"]} <- equal {name: "in", value: 11, type: 4, properties: ["in": "character"]}, {name: "95", value: 95, type: 0, properties: ["95": "literal"]} run/0: ingredient 0 is in mem/0: location 1025 is 32 run/0: ingredient 1 is 95 run/0: product 0 is 0 mem/0: storing 0 in location 1026 run/0: instruction interpolate/25 +run/0: break-if {name: "underscore?", value: 12, type: 3, properties: ["underscore?": "boolean"]}, {name: "", value: 5, type: , properties: ["": ]} mem/0: location 1026 is 0 run/0: ingredient 0 is 0 run/0: jump-if fell through run/0: instruction interpolate/26 +run/0: {name: "out", value: 13, type: 2-4, properties: ["out": "address":"character"]} <- index-address {name: "result", value: 7, type: 2-5-4, properties: ["result": "address":"array":"character", "deref": ]}, {name: "result-idx", value: 8, type: 1, properties: ["result-idx": "integer"]} run/0: ingredient 0 is result mem/0: location 1021 is 1073 run/0: ingredient 1 is {name: "result-idx", value: 8, type: 1, properties: ["result-idx": "integer"]} @@ -490,26 +578,31 @@ run/0: address to copy is 1080 run/0: product 0 is 1080 mem/0: storing 1080 in location 1027 run/0: instruction interpolate/27 +run/0: {name: "out", value: 13, type: 2-4, properties: ["out": "address":"character", "deref": ]} <- copy {name: "in", value: 11, type: 4, properties: ["in": "character"]} run/0: ingredient 0 is in mem/0: location 1025 is 32 mem/0: location 1027 is 1080 mem/0: storing 32 in location 1080 run/0: instruction interpolate/28 +run/0: {name: "i", value: 9, type: 1, properties: ["i": "integer"]} <- add {name: "i", value: 9, type: 1, properties: ["i": "integer"]}, {name: "1", value: 1, type: 0, properties: ["1": "literal"]} run/0: ingredient 0 is i mem/0: location 1023 is 6 run/0: ingredient 1 is 1 run/0: product 0 is 7 mem/0: storing 7 in location 1023 run/0: instruction interpolate/29 +run/0: {name: "result-idx", value: 8, type: 1, properties: ["result-idx": "integer"]} <- add {name: "result-idx", value: 8, type: 1, properties: ["result-idx": "integer"]}, {name: "1", value: 1, type: 0, properties: ["1": "literal"]} run/0: ingredient 0 is result-idx mem/0: location 1022 is 6 run/0: ingredient 1 is 1 run/0: product 0 is 7 mem/0: storing 7 in location 1022 run/0: instruction interpolate/30 +run/0: loop {name: "", value: -10, type: , properties: ["": ]} run/0: ingredient 0 is -10 run/0: jumping to instruction 21 run/0: instruction interpolate/21 +run/0: {name: "tem-done?", value: 10, type: 3, properties: ["tem-done?": "boolean"]} <- greater-or-equal {name: "i", value: 9, type: 1, properties: ["i": "integer"]}, {name: "tem-len", value: 2, type: 1, properties: ["tem-len": "integer"]} run/0: ingredient 0 is i mem/0: location 1023 is 7 run/0: ingredient 1 is tem-len @@ -517,10 +610,12 @@ mem/0: location 1016 is 8 run/0: product 0 is 0 mem/0: storing 0 in location 1024 run/0: instruction interpolate/22 +run/0: break-if {name: "tem-done?", value: 10, type: 3, properties: ["tem-done?": "boolean"]}, {name: "2", value: 2, type: 0, properties: ["2": "blocks"]} mem/0: location 1024 is 0 run/0: ingredient 0 is 0 run/0: jump-if fell through run/0: instruction interpolate/23 +run/0: {name: "in", value: 11, type: 4, properties: ["in": "character"]} <- index {name: "template", value: 1, type: 2-5-4, properties: ["template": "address":"array":"character", "deref": ]}, {name: "i", value: 9, type: 1, properties: ["i": "integer"]} run/0: ingredient 0 is {name: "template", value: 1, type: 2-5-4, properties: ["template": "address":"array":"character", "deref": ]} mem/0: location 1015 is 1000 run/0: ingredient 1 is {name: "i", value: 9, type: 1, properties: ["i": "integer"]} @@ -531,20 +626,24 @@ mem/0: location 1008 is 95 run/0: product 0 is 95 mem/0: storing 95 in location 1025 run/0: instruction interpolate/24 +run/0: {name: "underscore?", value: 12, type: 3, properties: ["underscore?": "boolean"]} <- equal {name: "in", value: 11, type: 4, properties: ["in": "character"]}, {name: "95", value: 95, type: 0, properties: ["95": "literal"]} run/0: ingredient 0 is in mem/0: location 1025 is 95 run/0: ingredient 1 is 95 run/0: product 0 is 1 mem/0: storing 1 in location 1026 run/0: instruction interpolate/25 +run/0: break-if {name: "underscore?", value: 12, type: 3, properties: ["underscore?": "boolean"]}, {name: "", value: 5, type: , properties: ["": ]} mem/0: location 1026 is 1 run/0: ingredient 0 is 1 run/0: ingredient 1 is run/0: jumping to instruction 31 run/0: instruction interpolate/32 +run/0: {name: "j", value: 14, type: 1, properties: ["j": "integer"]} <- copy {name: "0", value: 0, type: 0, properties: ["0": "literal"]} run/0: ingredient 0 is 0 mem/0: storing 0 in location 1028 run/0: instruction interpolate/34 +run/0: {name: "arg-done?", value: 15, type: 3, properties: ["arg-done?": "boolean"]} <- greater-or-equal {name: "j", value: 14, type: 1, properties: ["j": "integer"]}, {name: "a-len", value: 6, type: 1, properties: ["a-len": "integer"]} run/0: ingredient 0 is j mem/0: location 1028 is 0 run/0: ingredient 1 is a-len @@ -552,10 +651,12 @@ mem/0: location 1020 is 3 run/0: product 0 is 0 mem/0: storing 0 in location 1029 run/0: instruction interpolate/35 +run/0: break-if {name: "arg-done?", value: 15, type: 3, properties: ["arg-done?": "boolean"]}, {name: "", value: 6, type: , properties: ["": ]} mem/0: location 1029 is 0 run/0: ingredient 0 is 0 run/0: jump-if fell through run/0: instruction interpolate/36 +run/0: {name: "in", value: 11, type: 4, properties: ["in": "character"]} <- index {name: "a", value: 4, type: 2-5-4, properties: ["a": "address":"array":"character", "deref": ]}, {name: "j", value: 14, type: 1, properties: ["j": "integer"]} run/0: ingredient 0 is {name: "a", value: 4, type: 2-5-4, properties: ["a": "address":"array":"character", "deref": ]} mem/0: location 1018 is 1009 run/0: ingredient 1 is {name: "j", value: 14, type: 1, properties: ["j": "integer"]} @@ -566,6 +667,7 @@ mem/0: location 1010 is 97 run/0: product 0 is 97 mem/0: storing 97 in location 1025 run/0: instruction interpolate/37 +run/0: {name: "out", value: 13, type: 2-4, properties: ["out": "address":"character"]} <- index-address {name: "result", value: 7, type: 2-5-4, properties: ["result": "address":"array":"character", "deref": ]}, {name: "result-idx", value: 8, type: 1, properties: ["result-idx": "integer"]} run/0: ingredient 0 is result mem/0: location 1021 is 1073 run/0: ingredient 1 is {name: "result-idx", value: 8, type: 1, properties: ["result-idx": "integer"]} @@ -574,26 +676,31 @@ run/0: address to copy is 1081 run/0: product 0 is 1081 mem/0: storing 1081 in location 1027 run/0: instruction interpolate/38 +run/0: {name: "out", value: 13, type: 2-4, properties: ["out": "address":"character", "deref": ]} <- copy {name: "in", value: 11, type: 4, properties: ["in": "character"]} run/0: ingredient 0 is in mem/0: location 1025 is 97 mem/0: location 1027 is 1081 mem/0: storing 97 in location 1081 run/0: instruction interpolate/39 +run/0: {name: "j", value: 14, type: 1, properties: ["j": "integer"]} <- add {name: "j", value: 14, type: 1, properties: ["j": "integer"]}, {name: "1", value: 1, type: 0, properties: ["1": "literal"]} run/0: ingredient 0 is j mem/0: location 1028 is 0 run/0: ingredient 1 is 1 run/0: product 0 is 1 mem/0: storing 1 in location 1028 run/0: instruction interpolate/40 +run/0: {name: "result-idx", value: 8, type: 1, properties: ["result-idx": "integer"]} <- add {name: "result-idx", value: 8, type: 1, properties: ["result-idx": "integer"]}, {name: "1", value: 1, type: 0, properties: ["1": "literal"]} run/0: ingredient 0 is result-idx mem/0: location 1022 is 7 run/0: ingredient 1 is 1 run/0: product 0 is 8 mem/0: storing 8 in location 1022 run/0: instruction interpolate/41 +run/0: loop {name: "", value: -8, type: , properties: ["": ]} run/0: ingredient 0 is -8 run/0: jumping to instruction 34 run/0: instruction interpolate/34 +run/0: {name: "arg-done?", value: 15, type: 3, properties: ["arg-done?": "boolean"]} <- greater-or-equal {name: "j", value: 14, type: 1, properties: ["j": "integer"]}, {name: "a-len", value: 6, type: 1, properties: ["a-len": "integer"]} run/0: ingredient 0 is j mem/0: location 1028 is 1 run/0: ingredient 1 is a-len @@ -601,10 +708,12 @@ mem/0: location 1020 is 3 run/0: product 0 is 0 mem/0: storing 0 in location 1029 run/0: instruction interpolate/35 +run/0: break-if {name: "arg-done?", value: 15, type: 3, properties: ["arg-done?": "boolean"]}, {name: "", value: 6, type: , properties: ["": ]} mem/0: location 1029 is 0 run/0: ingredient 0 is 0 run/0: jump-if fell through run/0: instruction interpolate/36 +run/0: {name: "in", value: 11, type: 4, properties: ["in": "character"]} <- index {name: "a", value: 4, type: 2-5-4, properties: ["a": "address":"array":"character", "deref": ]}, {name: "j", value: 14, type: 1, properties: ["j": "integer"]} run/0: ingredient 0 is {name: "a", value: 4, type: 2-5-4, properties: ["a": "address":"array":"character", "deref": ]} mem/0: location 1018 is 1009 run/0: ingredient 1 is {name: "j", value: 14, type: 1, properties: ["j": "integer"]} @@ -615,6 +724,7 @@ mem/0: location 1011 is 98 run/0: product 0 is 98 mem/0: storing 98 in location 1025 run/0: instruction interpolate/37 +run/0: {name: "out", value: 13, type: 2-4, properties: ["out": "address":"character"]} <- index-address {name: "result", value: 7, type: 2-5-4, properties: ["result": "address":"array":"character", "deref": ]}, {name: "result-idx", value: 8, type: 1, properties: ["result-idx": "integer"]} run/0: ingredient 0 is result mem/0: location 1021 is 1073 run/0: ingredient 1 is {name: "result-idx", value: 8, type: 1, properties: ["result-idx": "integer"]} @@ -623,26 +733,31 @@ run/0: address to copy is 1082 run/0: product 0 is 1082 mem/0: storing 1082 in location 1027 run/0: instruction interpolate/38 +run/0: {name: "out", value: 13, type: 2-4, properties: ["out": "address":"character", "deref": ]} <- copy {name: "in", value: 11, type: 4, properties: ["in": "character"]} run/0: ingredient 0 is in mem/0: location 1025 is 98 mem/0: location 1027 is 1082 mem/0: storing 98 in location 1082 run/0: instruction interpolate/39 +run/0: {name: "j", value: 14, type: 1, properties: ["j": "integer"]} <- add {name: "j", value: 14, type: 1, properties: ["j": "integer"]}, {name: "1", value: 1, type: 0, properties: ["1": "literal"]} run/0: ingredient 0 is j mem/0: location 1028 is 1 run/0: ingredient 1 is 1 run/0: product 0 is 2 mem/0: storing 2 in location 1028 run/0: instruction interpolate/40 +run/0: {name: "result-idx", value: 8, type: 1, properties: ["result-idx": "integer"]} <- add {name: "result-idx", value: 8, type: 1, properties: ["result-idx": "integer"]}, {name: "1", value: 1, type: 0, properties: ["1": "literal"]} run/0: ingredient 0 is result-idx mem/0: location 1022 is 8 run/0: ingredient 1 is 1 run/0: product 0 is 9 mem/0: storing 9 in location 1022 run/0: instruction interpolate/41 +run/0: loop {name: "", value: -8, type: , properties: ["": ]} run/0: ingredient 0 is -8 run/0: jumping to instruction 34 run/0: instruction interpolate/34 +run/0: {name: "arg-done?", value: 15, type: 3, properties: ["arg-done?": "boolean"]} <- greater-or-equal {name: "j", value: 14, type: 1, properties: ["j": "integer"]}, {name: "a-len", value: 6, type: 1, properties: ["a-len": "integer"]} run/0: ingredient 0 is j mem/0: location 1028 is 2 run/0: ingredient 1 is a-len @@ -650,10 +765,12 @@ mem/0: location 1020 is 3 run/0: product 0 is 0 mem/0: storing 0 in location 1029 run/0: instruction interpolate/35 +run/0: break-if {name: "arg-done?", value: 15, type: 3, properties: ["arg-done?": "boolean"]}, {name: "", value: 6, type: , properties: ["": ]} mem/0: location 1029 is 0 run/0: ingredient 0 is 0 run/0: jump-if fell through run/0: instruction interpolate/36 +run/0: {name: "in", value: 11, type: 4, properties: ["in": "character"]} <- index {name: "a", value: 4, type: 2-5-4, properties: ["a": "address":"array":"character", "deref": ]}, {name: "j", value: 14, type: 1, properties: ["j": "integer"]} run/0: ingredient 0 is {name: "a", value: 4, type: 2-5-4, properties: ["a": "address":"array":"character", "deref": ]} mem/0: location 1018 is 1009 run/0: ingredient 1 is {name: "j", value: 14, type: 1, properties: ["j": "integer"]} @@ -664,6 +781,7 @@ mem/0: location 1012 is 99 run/0: product 0 is 99 mem/0: storing 99 in location 1025 run/0: instruction interpolate/37 +run/0: {name: "out", value: 13, type: 2-4, properties: ["out": "address":"character"]} <- index-address {name: "result", value: 7, type: 2-5-4, properties: ["result": "address":"array":"character", "deref": ]}, {name: "result-idx", value: 8, type: 1, properties: ["result-idx": "integer"]} run/0: ingredient 0 is result mem/0: location 1021 is 1073 run/0: ingredient 1 is {name: "result-idx", value: 8, type: 1, properties: ["result-idx": "integer"]} @@ -672,26 +790,31 @@ run/0: address to copy is 1083 run/0: product 0 is 1083 mem/0: storing 1083 in location 1027 run/0: instruction interpolate/38 +run/0: {name: "out", value: 13, type: 2-4, properties: ["out": "address":"character", "deref": ]} <- copy {name: "in", value: 11, type: 4, properties: ["in": "character"]} run/0: ingredient 0 is in mem/0: location 1025 is 99 mem/0: location 1027 is 1083 mem/0: storing 99 in location 1083 run/0: instruction interpolate/39 +run/0: {name: "j", value: 14, type: 1, properties: ["j": "integer"]} <- add {name: "j", value: 14, type: 1, properties: ["j": "integer"]}, {name: "1", value: 1, type: 0, properties: ["1": "literal"]} run/0: ingredient 0 is j mem/0: location 1028 is 2 run/0: ingredient 1 is 1 run/0: product 0 is 3 mem/0: storing 3 in location 1028 run/0: instruction interpolate/40 +run/0: {name: "result-idx", value: 8, type: 1, properties: ["result-idx": "integer"]} <- add {name: "result-idx", value: 8, type: 1, properties: ["result-idx": "integer"]}, {name: "1", value: 1, type: 0, properties: ["1": "literal"]} run/0: ingredient 0 is result-idx mem/0: location 1022 is 9 run/0: ingredient 1 is 1 run/0: product 0 is 10 mem/0: storing 10 in location 1022 run/0: instruction interpolate/41 +run/0: loop {name: "", value: -8, type: , properties: ["": ]} run/0: ingredient 0 is -8 run/0: jumping to instruction 34 run/0: instruction interpolate/34 +run/0: {name: "arg-done?", value: 15, type: 3, properties: ["arg-done?": "boolean"]} <- greater-or-equal {name: "j", value: 14, type: 1, properties: ["j": "integer"]}, {name: "a-len", value: 6, type: 1, properties: ["a-len": "integer"]} run/0: ingredient 0 is j mem/0: location 1028 is 3 run/0: ingredient 1 is a-len @@ -699,27 +822,33 @@ mem/0: location 1020 is 3 run/0: product 0 is 1 mem/0: storing 1 in location 1029 run/0: instruction interpolate/35 +run/0: break-if {name: "arg-done?", value: 15, type: 3, properties: ["arg-done?": "boolean"]}, {name: "", value: 6, type: , properties: ["": ]} mem/0: location 1029 is 1 run/0: ingredient 0 is 1 run/0: ingredient 1 is run/0: jumping to instruction 42 run/0: instruction interpolate/43 +run/0: {name: "i", value: 9, type: 1, properties: ["i": "integer"]} <- add {name: "i", value: 9, type: 1, properties: ["i": "integer"]}, {name: "1", value: 1, type: 0, properties: ["1": "literal"]} run/0: ingredient 0 is i mem/0: location 1023 is 7 run/0: ingredient 1 is 1 run/0: product 0 is 8 mem/0: storing 8 in location 1023 run/0: instruction interpolate/44 +run/0: loop {name: "", value: -27, type: , properties: ["": ]} run/0: ingredient 0 is -27 run/0: jumping to instruction 18 run/0: instruction interpolate/18 +run/0: {name: "a", value: 4, type: 2-5-4, properties: ["a": "address":"array":"character"]}, {name: "arg-received?", value: 5, type: 3, properties: ["arg-received?": "boolean"]} <- next-ingredient mem/0: storing 0 in location 1019 run/0: instruction interpolate/19 +run/0: break-unless {name: "arg-received?", value: 5, type: 3, properties: ["arg-received?": "boolean"]}, {name: "", value: 25, type: , properties: ["": ]} mem/0: location 1019 is 0 run/0: ingredient 0 is 0 run/0: ingredient 1 is run/0: jumping to instruction 45 run/0: instruction interpolate/47 +run/0: {name: "tem-done?", value: 10, type: 3, properties: ["tem-done?": "boolean"]} <- greater-or-equal {name: "i", value: 9, type: 1, properties: ["i": "integer"]}, {name: "tem-len", value: 2, type: 1, properties: ["tem-len": "integer"]} run/0: ingredient 0 is i mem/0: location 1023 is 8 run/0: ingredient 1 is tem-len @@ -727,15 +856,18 @@ mem/0: location 1016 is 8 run/0: product 0 is 1 mem/0: storing 1 in location 1024 run/0: instruction interpolate/48 +run/0: break-if {name: "tem-done?", value: 10, type: 3, properties: ["tem-done?": "boolean"]}, {name: "", value: 6, type: , properties: ["": ]} mem/0: location 1024 is 1 run/0: ingredient 0 is 1 run/0: ingredient 1 is run/0: jumping to instruction 55 run/0: instruction interpolate/56 +run/0: reply {name: "result", value: 7, type: 2-5-4, properties: ["result": "address":"array":"character"]} mem/0: location 1021 is 1073 run/0: result 0 is 1073 mem/0: storing 1073 in location 3 run/0: instruction test-interpolate-at-end/3 +run/0: {name: "4", value: 4, type: 5-4, properties: ["4": "array":"character", "raw": ]} <- copy {name: "3", value: 3, type: 2-5-4, properties: ["3": "address":"array":"character", "raw": , "deref": ]} run/0: ingredient 0 is 3 mem/0: location 3 is 1073 mem/0: location 1073 is 10 diff --git a/cpp/.traces/interpolate-at-start b/cpp/.traces/interpolate-at-start index f30ef81f..75c4420b 100644 --- a/cpp/.traces/interpolate-at-start +++ b/cpp/.traces/interpolate-at-start @@ -21,37 +21,48 @@ after-brace/0: copy ... new/0: routine allocated memory from 1000 to 101000 schedule/0: test-interpolate-at-start run/0: instruction test-interpolate-at-start/0 +run/0: {name: "1", value: 1, type: 2-5-4, properties: ["1": "address":"array":"character", "raw": ]} <- new {name: "_, hello!", value: 0, type: 0, properties: ["_, hello!": "literal-string"]} mem/0: storing 1000 in location 1 run/0: instruction test-interpolate-at-start/1 +run/0: {name: "2", value: 2, type: 2-5-4, properties: ["2": "address":"array":"character", "raw": ]} <- new {name: "abc", value: 0, type: 0, properties: ["abc": "literal-string"]} mem/0: storing 1010 in location 2 run/0: instruction test-interpolate-at-start/2 +run/0: {name: "3", value: 3, type: 2-5-4, properties: ["3": "address":"array":"character", "raw": ]} <- interpolate {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 {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 +run/0: {name: "template", value: 1, type: 2-5-4, properties: ["template": "address":"array":"character"]} <- next-ingredient run/0: product 0 is 1000 mem/0: storing 1000 in location 1016 run/0: instruction interpolate/2 +run/0: {name: "tem-len", value: 2, type: 1, properties: ["tem-len": "integer"]} <- length {name: "template", value: 1, type: 2-5-4, properties: ["template": "address":"array":"character", "deref": ]} mem/0: location 1016 is 1000 mem/0: storing 9 in location 1017 run/0: instruction interpolate/3 +run/0: {name: "result-len", value: 3, type: 1, properties: ["result-len": "integer"]} <- copy {name: "tem-len", value: 2, type: 1, properties: ["tem-len": "integer"]} run/0: ingredient 0 is tem-len mem/0: location 1017 is 9 mem/0: storing 9 in location 1018 run/0: instruction interpolate/5 +run/0: {name: "a", value: 4, type: 2-5-4, properties: ["a": "address":"array":"character"]}, {name: "arg-received?", value: 5, type: 3, properties: ["arg-received?": "boolean"]} <- next-ingredient run/0: product 0 is 1010 mem/0: storing 1010 in location 1019 mem/0: storing 1 in location 1020 run/0: instruction interpolate/6 +run/0: break-unless {name: "arg-received?", value: 5, type: 3, properties: ["arg-received?": "boolean"]}, {name: "", value: 4, type: , properties: ["": ]} mem/0: location 1020 is 1 run/0: ingredient 0 is 1 run/0: jump-unless fell through run/0: instruction interpolate/7 +run/0: {name: "a-len", value: 6, type: 1, properties: ["a-len": "integer"]} <- length {name: "a", value: 4, type: 2-5-4, properties: ["a": "address":"array":"character", "deref": ]} mem/0: location 1019 is 1010 mem/0: storing 3 in location 1021 run/0: instruction interpolate/8 +run/0: {name: "result-len", value: 3, type: 1, properties: ["result-len": "integer"]} <- add {name: "result-len", value: 3, type: 1, properties: ["result-len": "integer"]}, {name: "a-len", value: 6, type: 1, properties: ["a-len": "integer"]} run/0: ingredient 0 is result-len mem/0: location 1018 is 9 run/0: ingredient 1 is a-len @@ -59,44 +70,56 @@ mem/0: location 1021 is 3 run/0: product 0 is 12 mem/0: storing 12 in location 1018 run/0: instruction interpolate/9 +run/0: {name: "result-len", value: 3, type: 1, properties: ["result-len": "integer"]} <- subtract {name: "result-len", value: 3, type: 1, properties: ["result-len": "integer"]}, {name: "1", value: 1, type: 0, properties: ["1": "literal"]} run/0: ingredient 0 is result-len mem/0: location 1018 is 12 run/0: ingredient 1 is 1 run/0: product 0 is 11 mem/0: storing 11 in location 1018 run/0: instruction interpolate/10 +run/0: loop {name: "", value: -6, type: , properties: ["": ]} run/0: ingredient 0 is -6 run/0: jumping to instruction 5 run/0: instruction interpolate/5 +run/0: {name: "a", value: 4, type: 2-5-4, properties: ["a": "address":"array":"character"]}, {name: "arg-received?", value: 5, type: 3, properties: ["arg-received?": "boolean"]} <- next-ingredient mem/0: storing 0 in location 1020 run/0: instruction interpolate/6 +run/0: break-unless {name: "arg-received?", value: 5, type: 3, properties: ["arg-received?": "boolean"]}, {name: "", value: 4, type: , properties: ["": ]} mem/0: location 1020 is 0 run/0: ingredient 0 is 0 run/0: ingredient 1 is run/0: jumping to instruction 11 run/0: instruction interpolate/12 +run/0: rewind-ingredients run/0: instruction interpolate/13 +run/0: {name: "_", value: 0, type: 0, properties: ["_": "dummy"]} <- next-ingredient 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 {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: 1074 mem/0: storing 1074 in location 1022 run/0: instruction interpolate/15 +run/0: {name: "result-idx", value: 8, type: 1, properties: ["result-idx": "integer"]} <- copy {name: "0", value: 0, type: 0, properties: ["0": "literal"]} run/0: ingredient 0 is 0 mem/0: storing 0 in location 1023 run/0: instruction interpolate/16 +run/0: {name: "i", value: 9, type: 1, properties: ["i": "integer"]} <- copy {name: "0", value: 0, type: 0, properties: ["0": "literal"]} run/0: ingredient 0 is 0 mem/0: storing 0 in location 1024 run/0: instruction interpolate/18 +run/0: {name: "a", value: 4, type: 2-5-4, properties: ["a": "address":"array":"character"]}, {name: "arg-received?", value: 5, type: 3, properties: ["arg-received?": "boolean"]} <- next-ingredient run/0: product 0 is 1010 mem/0: storing 1010 in location 1019 mem/0: storing 1 in location 1020 run/0: instruction interpolate/19 +run/0: break-unless {name: "arg-received?", value: 5, type: 3, properties: ["arg-received?": "boolean"]}, {name: "", value: 25, type: , properties: ["": ]} mem/0: location 1020 is 1 run/0: ingredient 0 is 1 run/0: jump-unless fell through run/0: instruction interpolate/21 +run/0: {name: "tem-done?", value: 10, type: 3, properties: ["tem-done?": "boolean"]} <- greater-or-equal {name: "i", value: 9, type: 1, properties: ["i": "integer"]}, {name: "tem-len", value: 2, type: 1, properties: ["tem-len": "integer"]} run/0: ingredient 0 is i mem/0: location 1024 is 0 run/0: ingredient 1 is tem-len @@ -104,10 +127,12 @@ mem/0: location 1017 is 9 run/0: product 0 is 0 mem/0: storing 0 in location 1025 run/0: instruction interpolate/22 +run/0: break-if {name: "tem-done?", value: 10, type: 3, properties: ["tem-done?": "boolean"]}, {name: "2", value: 2, type: 0, properties: ["2": "blocks"]} mem/0: location 1025 is 0 run/0: ingredient 0 is 0 run/0: jump-if fell through run/0: instruction interpolate/23 +run/0: {name: "in", value: 11, type: 4, properties: ["in": "character"]} <- index {name: "template", value: 1, type: 2-5-4, properties: ["template": "address":"array":"character", "deref": ]}, {name: "i", value: 9, type: 1, properties: ["i": "integer"]} run/0: ingredient 0 is {name: "template", value: 1, type: 2-5-4, properties: ["template": "address":"array":"character", "deref": ]} mem/0: location 1016 is 1000 run/0: ingredient 1 is {name: "i", value: 9, type: 1, properties: ["i": "integer"]} @@ -118,20 +143,24 @@ mem/0: location 1001 is 95 run/0: product 0 is 95 mem/0: storing 95 in location 1026 run/0: instruction interpolate/24 +run/0: {name: "underscore?", value: 12, type: 3, properties: ["underscore?": "boolean"]} <- equal {name: "in", value: 11, type: 4, properties: ["in": "character"]}, {name: "95", value: 95, type: 0, properties: ["95": "literal"]} run/0: ingredient 0 is in mem/0: location 1026 is 95 run/0: ingredient 1 is 95 run/0: product 0 is 1 mem/0: storing 1 in location 1027 run/0: instruction interpolate/25 +run/0: break-if {name: "underscore?", value: 12, type: 3, properties: ["underscore?": "boolean"]}, {name: "", value: 5, type: , properties: ["": ]} mem/0: location 1027 is 1 run/0: ingredient 0 is 1 run/0: ingredient 1 is run/0: jumping to instruction 31 run/0: instruction interpolate/32 +run/0: {name: "j", value: 14, type: 1, properties: ["j": "integer"]} <- copy {name: "0", value: 0, type: 0, properties: ["0": "literal"]} run/0: ingredient 0 is 0 mem/0: storing 0 in location 1029 run/0: instruction interpolate/34 +run/0: {name: "arg-done?", value: 15, type: 3, properties: ["arg-done?": "boolean"]} <- greater-or-equal {name: "j", value: 14, type: 1, properties: ["j": "integer"]}, {name: "a-len", value: 6, type: 1, properties: ["a-len": "integer"]} run/0: ingredient 0 is j mem/0: location 1029 is 0 run/0: ingredient 1 is a-len @@ -139,10 +168,12 @@ mem/0: location 1021 is 3 run/0: product 0 is 0 mem/0: storing 0 in location 1030 run/0: instruction interpolate/35 +run/0: break-if {name: "arg-done?", value: 15, type: 3, properties: ["arg-done?": "boolean"]}, {name: "", value: 6, type: , properties: ["": ]} mem/0: location 1030 is 0 run/0: ingredient 0 is 0 run/0: jump-if fell through run/0: instruction interpolate/36 +run/0: {name: "in", value: 11, type: 4, properties: ["in": "character"]} <- index {name: "a", value: 4, type: 2-5-4, properties: ["a": "address":"array":"character", "deref": ]}, {name: "j", value: 14, type: 1, properties: ["j": "integer"]} run/0: ingredient 0 is {name: "a", value: 4, type: 2-5-4, properties: ["a": "address":"array":"character", "deref": ]} mem/0: location 1019 is 1010 run/0: ingredient 1 is {name: "j", value: 14, type: 1, properties: ["j": "integer"]} @@ -153,6 +184,7 @@ mem/0: location 1011 is 97 run/0: product 0 is 97 mem/0: storing 97 in location 1026 run/0: instruction interpolate/37 +run/0: {name: "out", value: 13, type: 2-4, properties: ["out": "address":"character"]} <- index-address {name: "result", value: 7, type: 2-5-4, properties: ["result": "address":"array":"character", "deref": ]}, {name: "result-idx", value: 8, type: 1, properties: ["result-idx": "integer"]} run/0: ingredient 0 is result mem/0: location 1022 is 1074 run/0: ingredient 1 is {name: "result-idx", value: 8, type: 1, properties: ["result-idx": "integer"]} @@ -161,26 +193,31 @@ run/0: address to copy is 1075 run/0: product 0 is 1075 mem/0: storing 1075 in location 1028 run/0: instruction interpolate/38 +run/0: {name: "out", value: 13, type: 2-4, properties: ["out": "address":"character", "deref": ]} <- copy {name: "in", value: 11, type: 4, properties: ["in": "character"]} run/0: ingredient 0 is in mem/0: location 1026 is 97 mem/0: location 1028 is 1075 mem/0: storing 97 in location 1075 run/0: instruction interpolate/39 +run/0: {name: "j", value: 14, type: 1, properties: ["j": "integer"]} <- add {name: "j", value: 14, type: 1, properties: ["j": "integer"]}, {name: "1", value: 1, type: 0, properties: ["1": "literal"]} run/0: ingredient 0 is j mem/0: location 1029 is 0 run/0: ingredient 1 is 1 run/0: product 0 is 1 mem/0: storing 1 in location 1029 run/0: instruction interpolate/40 +run/0: {name: "result-idx", value: 8, type: 1, properties: ["result-idx": "integer"]} <- add {name: "result-idx", value: 8, type: 1, properties: ["result-idx": "integer"]}, {name: "1", value: 1, type: 0, properties: ["1": "literal"]} run/0: ingredient 0 is result-idx mem/0: location 1023 is 0 run/0: ingredient 1 is 1 run/0: product 0 is 1 mem/0: storing 1 in location 1023 run/0: instruction interpolate/41 +run/0: loop {name: "", value: -8, type: , properties: ["": ]} run/0: ingredient 0 is -8 run/0: jumping to instruction 34 run/0: instruction interpolate/34 +run/0: {name: "arg-done?", value: 15, type: 3, properties: ["arg-done?": "boolean"]} <- greater-or-equal {name: "j", value: 14, type: 1, properties: ["j": "integer"]}, {name: "a-len", value: 6, type: 1, properties: ["a-len": "integer"]} run/0: ingredient 0 is j mem/0: location 1029 is 1 run/0: ingredient 1 is a-len @@ -188,10 +225,12 @@ mem/0: location 1021 is 3 run/0: product 0 is 0 mem/0: storing 0 in location 1030 run/0: instruction interpolate/35 +run/0: break-if {name: "arg-done?", value: 15, type: 3, properties: ["arg-done?": "boolean"]}, {name: "", value: 6, type: , properties: ["": ]} mem/0: location 1030 is 0 run/0: ingredient 0 is 0 run/0: jump-if fell through run/0: instruction interpolate/36 +run/0: {name: "in", value: 11, type: 4, properties: ["in": "character"]} <- index {name: "a", value: 4, type: 2-5-4, properties: ["a": "address":"array":"character", "deref": ]}, {name: "j", value: 14, type: 1, properties: ["j": "integer"]} run/0: ingredient 0 is {name: "a", value: 4, type: 2-5-4, properties: ["a": "address":"array":"character", "deref": ]} mem/0: location 1019 is 1010 run/0: ingredient 1 is {name: "j", value: 14, type: 1, properties: ["j": "integer"]} @@ -202,6 +241,7 @@ mem/0: location 1012 is 98 run/0: product 0 is 98 mem/0: storing 98 in location 1026 run/0: instruction interpolate/37 +run/0: {name: "out", value: 13, type: 2-4, properties: ["out": "address":"character"]} <- index-address {name: "result", value: 7, type: 2-5-4, properties: ["result": "address":"array":"character", "deref": ]}, {name: "result-idx", value: 8, type: 1, properties: ["result-idx": "integer"]} run/0: ingredient 0 is result mem/0: location 1022 is 1074 run/0: ingredient 1 is {name: "result-idx", value: 8, type: 1, properties: ["result-idx": "integer"]} @@ -210,26 +250,31 @@ run/0: address to copy is 1076 run/0: product 0 is 1076 mem/0: storing 1076 in location 1028 run/0: instruction interpolate/38 +run/0: {name: "out", value: 13, type: 2-4, properties: ["out": "address":"character", "deref": ]} <- copy {name: "in", value: 11, type: 4, properties: ["in": "character"]} run/0: ingredient 0 is in mem/0: location 1026 is 98 mem/0: location 1028 is 1076 mem/0: storing 98 in location 1076 run/0: instruction interpolate/39 +run/0: {name: "j", value: 14, type: 1, properties: ["j": "integer"]} <- add {name: "j", value: 14, type: 1, properties: ["j": "integer"]}, {name: "1", value: 1, type: 0, properties: ["1": "literal"]} run/0: ingredient 0 is j mem/0: location 1029 is 1 run/0: ingredient 1 is 1 run/0: product 0 is 2 mem/0: storing 2 in location 1029 run/0: instruction interpolate/40 +run/0: {name: "result-idx", value: 8, type: 1, properties: ["result-idx": "integer"]} <- add {name: "result-idx", value: 8, type: 1, properties: ["result-idx": "integer"]}, {name: "1", value: 1, type: 0, properties: ["1": "literal"]} run/0: ingredient 0 is result-idx mem/0: location 1023 is 1 run/0: ingredient 1 is 1 run/0: product 0 is 2 mem/0: storing 2 in location 1023 run/0: instruction interpolate/41 +run/0: loop {name: "", value: -8, type: , properties: ["": ]} run/0: ingredient 0 is -8 run/0: jumping to instruction 34 run/0: instruction interpolate/34 +run/0: {name: "arg-done?", value: 15, type: 3, properties: ["arg-done?": "boolean"]} <- greater-or-equal {name: "j", value: 14, type: 1, properties: ["j": "integer"]}, {name: "a-len", value: 6, type: 1, properties: ["a-len": "integer"]} run/0: ingredient 0 is j mem/0: location 1029 is 2 run/0: ingredient 1 is a-len @@ -237,10 +282,12 @@ mem/0: location 1021 is 3 run/0: product 0 is 0 mem/0: storing 0 in location 1030 run/0: instruction interpolate/35 +run/0: break-if {name: "arg-done?", value: 15, type: 3, properties: ["arg-done?": "boolean"]}, {name: "", value: 6, type: , properties: ["": ]} mem/0: location 1030 is 0 run/0: ingredient 0 is 0 run/0: jump-if fell through run/0: instruction interpolate/36 +run/0: {name: "in", value: 11, type: 4, properties: ["in": "character"]} <- index {name: "a", value: 4, type: 2-5-4, properties: ["a": "address":"array":"character", "deref": ]}, {name: "j", value: 14, type: 1, properties: ["j": "integer"]} run/0: ingredient 0 is {name: "a", value: 4, type: 2-5-4, properties: ["a": "address":"array":"character", "deref": ]} mem/0: location 1019 is 1010 run/0: ingredient 1 is {name: "j", value: 14, type: 1, properties: ["j": "integer"]} @@ -251,6 +298,7 @@ mem/0: location 1013 is 99 run/0: product 0 is 99 mem/0: storing 99 in location 1026 run/0: instruction interpolate/37 +run/0: {name: "out", value: 13, type: 2-4, properties: ["out": "address":"character"]} <- index-address {name: "result", value: 7, type: 2-5-4, properties: ["result": "address":"array":"character", "deref": ]}, {name: "result-idx", value: 8, type: 1, properties: ["result-idx": "integer"]} run/0: ingredient 0 is result mem/0: location 1022 is 1074 run/0: ingredient 1 is {name: "result-idx", value: 8, type: 1, properties: ["result-idx": "integer"]} @@ -259,26 +307,31 @@ run/0: address to copy is 1077 run/0: product 0 is 1077 mem/0: storing 1077 in location 1028 run/0: instruction interpolate/38 +run/0: {name: "out", value: 13, type: 2-4, properties: ["out": "address":"character", "deref": ]} <- copy {name: "in", value: 11, type: 4, properties: ["in": "character"]} run/0: ingredient 0 is in mem/0: location 1026 is 99 mem/0: location 1028 is 1077 mem/0: storing 99 in location 1077 run/0: instruction interpolate/39 +run/0: {name: "j", value: 14, type: 1, properties: ["j": "integer"]} <- add {name: "j", value: 14, type: 1, properties: ["j": "integer"]}, {name: "1", value: 1, type: 0, properties: ["1": "literal"]} run/0: ingredient 0 is j mem/0: location 1029 is 2 run/0: ingredient 1 is 1 run/0: product 0 is 3 mem/0: storing 3 in location 1029 run/0: instruction interpolate/40 +run/0: {name: "result-idx", value: 8, type: 1, properties: ["result-idx": "integer"]} <- add {name: "result-idx", value: 8, type: 1, properties: ["result-idx": "integer"]}, {name: "1", value: 1, type: 0, properties: ["1": "literal"]} run/0: ingredient 0 is result-idx mem/0: location 1023 is 2 run/0: ingredient 1 is 1 run/0: product 0 is 3 mem/0: storing 3 in location 1023 run/0: instruction interpolate/41 +run/0: loop {name: "", value: -8, type: , properties: ["": ]} run/0: ingredient 0 is -8 run/0: jumping to instruction 34 run/0: instruction interpolate/34 +run/0: {name: "arg-done?", value: 15, type: 3, properties: ["arg-done?": "boolean"]} <- greater-or-equal {name: "j", value: 14, type: 1, properties: ["j": "integer"]}, {name: "a-len", value: 6, type: 1, properties: ["a-len": "integer"]} run/0: ingredient 0 is j mem/0: location 1029 is 3 run/0: ingredient 1 is a-len @@ -286,27 +339,33 @@ mem/0: location 1021 is 3 run/0: product 0 is 1 mem/0: storing 1 in location 1030 run/0: instruction interpolate/35 +run/0: break-if {name: "arg-done?", value: 15, type: 3, properties: ["arg-done?": "boolean"]}, {name: "", value: 6, type: , properties: ["": ]} mem/0: location 1030 is 1 run/0: ingredient 0 is 1 run/0: ingredient 1 is run/0: jumping to instruction 42 run/0: instruction interpolate/43 +run/0: {name: "i", value: 9, type: 1, properties: ["i": "integer"]} <- add {name: "i", value: 9, type: 1, properties: ["i": "integer"]}, {name: "1", value: 1, type: 0, properties: ["1": "literal"]} run/0: ingredient 0 is i mem/0: location 1024 is 0 run/0: ingredient 1 is 1 run/0: product 0 is 1 mem/0: storing 1 in location 1024 run/0: instruction interpolate/44 +run/0: loop {name: "", value: -27, type: , properties: ["": ]} run/0: ingredient 0 is -27 run/0: jumping to instruction 18 run/0: instruction interpolate/18 +run/0: {name: "a", value: 4, type: 2-5-4, properties: ["a": "address":"array":"character"]}, {name: "arg-received?", value: 5, type: 3, properties: ["arg-received?": "boolean"]} <- next-ingredient mem/0: storing 0 in location 1020 run/0: instruction interpolate/19 +run/0: break-unless {name: "arg-received?", value: 5, type: 3, properties: ["arg-received?": "boolean"]}, {name: "", value: 25, type: , properties: ["": ]} mem/0: location 1020 is 0 run/0: ingredient 0 is 0 run/0: ingredient 1 is run/0: jumping to instruction 45 run/0: instruction interpolate/47 +run/0: {name: "tem-done?", value: 10, type: 3, properties: ["tem-done?": "boolean"]} <- greater-or-equal {name: "i", value: 9, type: 1, properties: ["i": "integer"]}, {name: "tem-len", value: 2, type: 1, properties: ["tem-len": "integer"]} run/0: ingredient 0 is i mem/0: location 1024 is 1 run/0: ingredient 1 is tem-len @@ -314,10 +373,12 @@ mem/0: location 1017 is 9 run/0: product 0 is 0 mem/0: storing 0 in location 1025 run/0: instruction interpolate/48 +run/0: break-if {name: "tem-done?", value: 10, type: 3, properties: ["tem-done?": "boolean"]}, {name: "", value: 6, type: , properties: ["": ]} mem/0: location 1025 is 0 run/0: ingredient 0 is 0 run/0: jump-if fell through run/0: instruction interpolate/49 +run/0: {name: "in", value: 11, type: 4, properties: ["in": "character"]} <- index {name: "template", value: 1, type: 2-5-4, properties: ["template": "address":"array":"character", "deref": ]}, {name: "i", value: 9, type: 1, properties: ["i": "integer"]} run/0: ingredient 0 is {name: "template", value: 1, type: 2-5-4, properties: ["template": "address":"array":"character", "deref": ]} mem/0: location 1016 is 1000 run/0: ingredient 1 is {name: "i", value: 9, type: 1, properties: ["i": "integer"]} @@ -328,6 +389,7 @@ mem/0: location 1002 is 44 run/0: product 0 is 44 mem/0: storing 44 in location 1026 run/0: instruction interpolate/50 +run/0: {name: "out", value: 13, type: 2-4, properties: ["out": "address":"character"]} <- index-address {name: "result", value: 7, type: 2-5-4, properties: ["result": "address":"array":"character", "deref": ]}, {name: "result-idx", value: 8, type: 1, properties: ["result-idx": "integer"]} run/0: ingredient 0 is result mem/0: location 1022 is 1074 run/0: ingredient 1 is {name: "result-idx", value: 8, type: 1, properties: ["result-idx": "integer"]} @@ -336,26 +398,31 @@ run/0: address to copy is 1078 run/0: product 0 is 1078 mem/0: storing 1078 in location 1028 run/0: instruction interpolate/51 +run/0: {name: "out", value: 13, type: 2-4, properties: ["out": "address":"character", "deref": ]} <- copy {name: "in", value: 11, type: 4, properties: ["in": "character"]} run/0: ingredient 0 is in mem/0: location 1026 is 44 mem/0: location 1028 is 1078 mem/0: storing 44 in location 1078 run/0: instruction interpolate/52 +run/0: {name: "i", value: 9, type: 1, properties: ["i": "integer"]} <- add {name: "i", value: 9, type: 1, properties: ["i": "integer"]}, {name: "1", value: 1, type: 0, properties: ["1": "literal"]} run/0: ingredient 0 is i mem/0: location 1024 is 1 run/0: ingredient 1 is 1 run/0: product 0 is 2 mem/0: storing 2 in location 1024 run/0: instruction interpolate/53 +run/0: {name: "result-idx", value: 8, type: 1, properties: ["result-idx": "integer"]} <- add {name: "result-idx", value: 8, type: 1, properties: ["result-idx": "integer"]}, {name: "1", value: 1, type: 0, properties: ["1": "literal"]} run/0: ingredient 0 is result-idx mem/0: location 1023 is 3 run/0: ingredient 1 is 1 run/0: product 0 is 4 mem/0: storing 4 in location 1023 run/0: instruction interpolate/54 +run/0: loop {name: "", value: -8, type: , properties: ["": ]} run/0: ingredient 0 is -8 run/0: jumping to instruction 47 run/0: instruction interpolate/47 +run/0: {name: "tem-done?", value: 10, type: 3, properties: ["tem-done?": "boolean"]} <- greater-or-equal {name: "i", value: 9, type: 1, properties: ["i": "integer"]}, {name: "tem-len", value: 2, type: 1, properties: ["tem-len": "integer"]} run/0: ingredient 0 is i mem/0: location 1024 is 2 run/0: ingredient 1 is tem-len @@ -363,10 +430,12 @@ mem/0: location 1017 is 9 run/0: product 0 is 0 mem/0: storing 0 in location 1025 run/0: instruction interpolate/48 +run/0: break-if {name: "tem-done?", value: 10, type: 3, properties: ["tem-done?": "boolean"]}, {name: "", value: 6, type: , properties: ["": ]} mem/0: location 1025 is 0 run/0: ingredient 0 is 0 run/0: jump-if fell through run/0: instruction interpolate/49 +run/0: {name: "in", value: 11, type: 4, properties: ["in": "character"]} <- index {name: "template", value: 1, type: 2-5-4, properties: ["template": "address":"array":"character", "deref": ]}, {name: "i", value: 9, type: 1, properties: ["i": "integer"]} run/0: ingredient 0 is {name: "template", value: 1, type: 2-5-4, properties: ["template": "address":"array":"character", "deref": ]} mem/0: location 1016 is 1000 run/0: ingredient 1 is {name: "i", value: 9, type: 1, properties: ["i": "integer"]} @@ -377,6 +446,7 @@ mem/0: location 1003 is 32 run/0: product 0 is 32 mem/0: storing 32 in location 1026 run/0: instruction interpolate/50 +run/0: {name: "out", value: 13, type: 2-4, properties: ["out": "address":"character"]} <- index-address {name: "result", value: 7, type: 2-5-4, properties: ["result": "address":"array":"character", "deref": ]}, {name: "result-idx", value: 8, type: 1, properties: ["result-idx": "integer"]} run/0: ingredient 0 is result mem/0: location 1022 is 1074 run/0: ingredient 1 is {name: "result-idx", value: 8, type: 1, properties: ["result-idx": "integer"]} @@ -385,26 +455,31 @@ run/0: address to copy is 1079 run/0: product 0 is 1079 mem/0: storing 1079 in location 1028 run/0: instruction interpolate/51 +run/0: {name: "out", value: 13, type: 2-4, properties: ["out": "address":"character", "deref": ]} <- copy {name: "in", value: 11, type: 4, properties: ["in": "character"]} run/0: ingredient 0 is in mem/0: location 1026 is 32 mem/0: location 1028 is 1079 mem/0: storing 32 in location 1079 run/0: instruction interpolate/52 +run/0: {name: "i", value: 9, type: 1, properties: ["i": "integer"]} <- add {name: "i", value: 9, type: 1, properties: ["i": "integer"]}, {name: "1", value: 1, type: 0, properties: ["1": "literal"]} run/0: ingredient 0 is i mem/0: location 1024 is 2 run/0: ingredient 1 is 1 run/0: product 0 is 3 mem/0: storing 3 in location 1024 run/0: instruction interpolate/53 +run/0: {name: "result-idx", value: 8, type: 1, properties: ["result-idx": "integer"]} <- add {name: "result-idx", value: 8, type: 1, properties: ["result-idx": "integer"]}, {name: "1", value: 1, type: 0, properties: ["1": "literal"]} run/0: ingredient 0 is result-idx mem/0: location 1023 is 4 run/0: ingredient 1 is 1 run/0: product 0 is 5 mem/0: storing 5 in location 1023 run/0: instruction interpolate/54 +run/0: loop {name: "", value: -8, type: , properties: ["": ]} run/0: ingredient 0 is -8 run/0: jumping to instruction 47 run/0: instruction interpolate/47 +run/0: {name: "tem-done?", value: 10, type: 3, properties: ["tem-done?": "boolean"]} <- greater-or-equal {name: "i", value: 9, type: 1, properties: ["i": "integer"]}, {name: "tem-len", value: 2, type: 1, properties: ["tem-len": "integer"]} run/0: ingredient 0 is i mem/0: location 1024 is 3 run/0: ingredient 1 is tem-len @@ -412,10 +487,12 @@ mem/0: location 1017 is 9 run/0: product 0 is 0 mem/0: storing 0 in location 1025 run/0: instruction interpolate/48 +run/0: break-if {name: "tem-done?", value: 10, type: 3, properties: ["tem-done?": "boolean"]}, {name: "", value: 6, type: , properties: ["": ]} mem/0: location 1025 is 0 run/0: ingredient 0 is 0 run/0: jump-if fell through run/0: instruction interpolate/49 +run/0: {name: "in", value: 11, type: 4, properties: ["in": "character"]} <- index {name: "template", value: 1, type: 2-5-4, properties: ["template": "address":"array":"character", "deref": ]}, {name: "i", value: 9, type: 1, properties: ["i": "integer"]} run/0: ingredient 0 is {name: "template", value: 1, type: 2-5-4, properties: ["template": "address":"array":"character", "deref": ]} mem/0: location 1016 is 1000 run/0: ingredient 1 is {name: "i", value: 9, type: 1, properties: ["i": "integer"]} @@ -426,6 +503,7 @@ mem/0: location 1004 is 104 run/0: product 0 is 104 mem/0: storing 104 in location 1026 run/0: instruction interpolate/50 +run/0: {name: "out", value: 13, type: 2-4, properties: ["out": "address":"character"]} <- index-address {name: "result", value: 7, type: 2-5-4, properties: ["result": "address":"array":"character", "deref": ]}, {name: "result-idx", value: 8, type: 1, properties: ["result-idx": "integer"]} run/0: ingredient 0 is result mem/0: location 1022 is 1074 run/0: ingredient 1 is {name: "result-idx", value: 8, type: 1, properties: ["result-idx": "integer"]} @@ -434,26 +512,31 @@ run/0: address to copy is 1080 run/0: product 0 is 1080 mem/0: storing 1080 in location 1028 run/0: instruction interpolate/51 +run/0: {name: "out", value: 13, type: 2-4, properties: ["out": "address":"character", "deref": ]} <- copy {name: "in", value: 11, type: 4, properties: ["in": "character"]} run/0: ingredient 0 is in mem/0: location 1026 is 104 mem/0: location 1028 is 1080 mem/0: storing 104 in location 1080 run/0: instruction interpolate/52 +run/0: {name: "i", value: 9, type: 1, properties: ["i": "integer"]} <- add {name: "i", value: 9, type: 1, properties: ["i": "integer"]}, {name: "1", value: 1, type: 0, properties: ["1": "literal"]} run/0: ingredient 0 is i mem/0: location 1024 is 3 run/0: ingredient 1 is 1 run/0: product 0 is 4 mem/0: storing 4 in location 1024 run/0: instruction interpolate/53 +run/0: {name: "result-idx", value: 8, type: 1, properties: ["result-idx": "integer"]} <- add {name: "result-idx", value: 8, type: 1, properties: ["result-idx": "integer"]}, {name: "1", value: 1, type: 0, properties: ["1": "literal"]} run/0: ingredient 0 is result-idx mem/0: location 1023 is 5 run/0: ingredient 1 is 1 run/0: product 0 is 6 mem/0: storing 6 in location 1023 run/0: instruction interpolate/54 +run/0: loop {name: "", value: -8, type: , properties: ["": ]} run/0: ingredient 0 is -8 run/0: jumping to instruction 47 run/0: instruction interpolate/47 +run/0: {name: "tem-done?", value: 10, type: 3, properties: ["tem-done?": "boolean"]} <- greater-or-equal {name: "i", value: 9, type: 1, properties: ["i": "integer"]}, {name: "tem-len", value: 2, type: 1, properties: ["tem-len": "integer"]} run/0: ingredient 0 is i mem/0: location 1024 is 4 run/0: ingredient 1 is tem-len @@ -461,10 +544,12 @@ mem/0: location 1017 is 9 run/0: product 0 is 0 mem/0: storing 0 in location 1025 run/0: instruction interpolate/48 +run/0: break-if {name: "tem-done?", value: 10, type: 3, properties: ["tem-done?": "boolean"]}, {name: "", value: 6, type: , properties: ["": ]} mem/0: location 1025 is 0 run/0: ingredient 0 is 0 run/0: jump-if fell through run/0: instruction interpolate/49 +run/0: {name: "in", value: 11, type: 4, properties: ["in": "character"]} <- index {name: "template", value: 1, type: 2-5-4, properties: ["template": "address":"array":"character", "deref": ]}, {name: "i", value: 9, type: 1, properties: ["i": "integer"]} run/0: ingredient 0 is {name: "template", value: 1, type: 2-5-4, properties: ["template": "address":"array":"character", "deref": ]} mem/0: location 1016 is 1000 run/0: ingredient 1 is {name: "i", value: 9, type: 1, properties: ["i": "integer"]} @@ -475,6 +560,7 @@ mem/0: location 1005 is 101 run/0: product 0 is 101 mem/0: storing 101 in location 1026 run/0: instruction interpolate/50 +run/0: {name: "out", value: 13, type: 2-4, properties: ["out": "address":"character"]} <- index-address {name: "result", value: 7, type: 2-5-4, properties: ["result": "address":"array":"character", "deref": ]}, {name: "result-idx", value: 8, type: 1, properties: ["result-idx": "integer"]} run/0: ingredient 0 is result mem/0: location 1022 is 1074 run/0: ingredient 1 is {name: "result-idx", value: 8, type: 1, properties: ["result-idx": "integer"]} @@ -483,26 +569,31 @@ run/0: address to copy is 1081 run/0: product 0 is 1081 mem/0: storing 1081 in location 1028 run/0: instruction interpolate/51 +run/0: {name: "out", value: 13, type: 2-4, properties: ["out": "address":"character", "deref": ]} <- copy {name: "in", value: 11, type: 4, properties: ["in": "character"]} run/0: ingredient 0 is in mem/0: location 1026 is 101 mem/0: location 1028 is 1081 mem/0: storing 101 in location 1081 run/0: instruction interpolate/52 +run/0: {name: "i", value: 9, type: 1, properties: ["i": "integer"]} <- add {name: "i", value: 9, type: 1, properties: ["i": "integer"]}, {name: "1", value: 1, type: 0, properties: ["1": "literal"]} run/0: ingredient 0 is i mem/0: location 1024 is 4 run/0: ingredient 1 is 1 run/0: product 0 is 5 mem/0: storing 5 in location 1024 run/0: instruction interpolate/53 +run/0: {name: "result-idx", value: 8, type: 1, properties: ["result-idx": "integer"]} <- add {name: "result-idx", value: 8, type: 1, properties: ["result-idx": "integer"]}, {name: "1", value: 1, type: 0, properties: ["1": "literal"]} run/0: ingredient 0 is result-idx mem/0: location 1023 is 6 run/0: ingredient 1 is 1 run/0: product 0 is 7 mem/0: storing 7 in location 1023 run/0: instruction interpolate/54 +run/0: loop {name: "", value: -8, type: , properties: ["": ]} run/0: ingredient 0 is -8 run/0: jumping to instruction 47 run/0: instruction interpolate/47 +run/0: {name: "tem-done?", value: 10, type: 3, properties: ["tem-done?": "boolean"]} <- greater-or-equal {name: "i", value: 9, type: 1, properties: ["i": "integer"]}, {name: "tem-len", value: 2, type: 1, properties: ["tem-len": "integer"]} run/0: ingredient 0 is i mem/0: location 1024 is 5 run/0: ingredient 1 is tem-len @@ -510,10 +601,12 @@ mem/0: location 1017 is 9 run/0: product 0 is 0 mem/0: storing 0 in location 1025 run/0: instruction interpolate/48 +run/0: break-if {name: "tem-done?", value: 10, type: 3, properties: ["tem-done?": "boolean"]}, {name: "", value: 6, type: , properties: ["": ]} mem/0: location 1025 is 0 run/0: ingredient 0 is 0 run/0: jump-if fell through run/0: instruction interpolate/49 +run/0: {name: "in", value: 11, type: 4, properties: ["in": "character"]} <- index {name: "template", value: 1, type: 2-5-4, properties: ["template": "address":"array":"character", "deref": ]}, {name: "i", value: 9, type: 1, properties: ["i": "integer"]} run/0: ingredient 0 is {name: "template", value: 1, type: 2-5-4, properties: ["template": "address":"array":"character", "deref": ]} mem/0: location 1016 is 1000 run/0: ingredient 1 is {name: "i", value: 9, type: 1, properties: ["i": "integer"]} @@ -524,6 +617,7 @@ mem/0: location 1006 is 108 run/0: product 0 is 108 mem/0: storing 108 in location 1026 run/0: instruction interpolate/50 +run/0: {name: "out", value: 13, type: 2-4, properties: ["out": "address":"character"]} <- index-address {name: "result", value: 7, type: 2-5-4, properties: ["result": "address":"array":"character", "deref": ]}, {name: "result-idx", value: 8, type: 1, properties: ["result-idx": "integer"]} run/0: ingredient 0 is result mem/0: location 1022 is 1074 run/0: ingredient 1 is {name: "result-idx", value: 8, type: 1, properties: ["result-idx": "integer"]} @@ -532,26 +626,31 @@ run/0: address to copy is 1082 run/0: product 0 is 1082 mem/0: storing 1082 in location 1028 run/0: instruction interpolate/51 +run/0: {name: "out", value: 13, type: 2-4, properties: ["out": "address":"character", "deref": ]} <- copy {name: "in", value: 11, type: 4, properties: ["in": "character"]} run/0: ingredient 0 is in mem/0: location 1026 is 108 mem/0: location 1028 is 1082 mem/0: storing 108 in location 1082 run/0: instruction interpolate/52 +run/0: {name: "i", value: 9, type: 1, properties: ["i": "integer"]} <- add {name: "i", value: 9, type: 1, properties: ["i": "integer"]}, {name: "1", value: 1, type: 0, properties: ["1": "literal"]} run/0: ingredient 0 is i mem/0: location 1024 is 5 run/0: ingredient 1 is 1 run/0: product 0 is 6 mem/0: storing 6 in location 1024 run/0: instruction interpolate/53 +run/0: {name: "result-idx", value: 8, type: 1, properties: ["result-idx": "integer"]} <- add {name: "result-idx", value: 8, type: 1, properties: ["result-idx": "integer"]}, {name: "1", value: 1, type: 0, properties: ["1": "literal"]} run/0: ingredient 0 is result-idx mem/0: location 1023 is 7 run/0: ingredient 1 is 1 run/0: product 0 is 8 mem/0: storing 8 in location 1023 run/0: instruction interpolate/54 +run/0: loop {name: "", value: -8, type: , properties: ["": ]} run/0: ingredient 0 is -8 run/0: jumping to instruction 47 run/0: instruction interpolate/47 +run/0: {name: "tem-done?", value: 10, type: 3, properties: ["tem-done?": "boolean"]} <- greater-or-equal {name: "i", value: 9, type: 1, properties: ["i": "integer"]}, {name: "tem-len", value: 2, type: 1, properties: ["tem-len": "integer"]} run/0: ingredient 0 is i mem/0: location 1024 is 6 run/0: ingredient 1 is tem-len @@ -559,10 +658,12 @@ mem/0: location 1017 is 9 run/0: product 0 is 0 mem/0: storing 0 in location 1025 run/0: instruction interpolate/48 +run/0: break-if {name: "tem-done?", value: 10, type: 3, properties: ["tem-done?": "boolean"]}, {name: "", value: 6, type: , properties: ["": ]} mem/0: location 1025 is 0 run/0: ingredient 0 is 0 run/0: jump-if fell through run/0: instruction interpolate/49 +run/0: {name: "in", value: 11, type: 4, properties: ["in": "character"]} <- index {name: "template", value: 1, type: 2-5-4, properties: ["template": "address":"array":"character", "deref": ]}, {name: "i", value: 9, type: 1, properties: ["i": "integer"]} run/0: ingredient 0 is {name: "template", value: 1, type: 2-5-4, properties: ["template": "address":"array":"character", "deref": ]} mem/0: location 1016 is 1000 run/0: ingredient 1 is {name: "i", value: 9, type: 1, properties: ["i": "integer"]} @@ -573,6 +674,7 @@ mem/0: location 1007 is 108 run/0: product 0 is 108 mem/0: storing 108 in location 1026 run/0: instruction interpolate/50 +run/0: {name: "out", value: 13, type: 2-4, properties: ["out": "address":"character"]} <- index-address {name: "result", value: 7, type: 2-5-4, properties: ["result": "address":"array":"character", "deref": ]}, {name: "result-idx", value: 8, type: 1, properties: ["result-idx": "integer"]} run/0: ingredient 0 is result mem/0: location 1022 is 1074 run/0: ingredient 1 is {name: "result-idx", value: 8, type: 1, properties: ["result-idx": "integer"]} @@ -581,26 +683,31 @@ run/0: address to copy is 1083 run/0: product 0 is 1083 mem/0: storing 1083 in location 1028 run/0: instruction interpolate/51 +run/0: {name: "out", value: 13, type: 2-4, properties: ["out": "address":"character", "deref": ]} <- copy {name: "in", value: 11, type: 4, properties: ["in": "character"]} run/0: ingredient 0 is in mem/0: location 1026 is 108 mem/0: location 1028 is 1083 mem/0: storing 108 in location 1083 run/0: instruction interpolate/52 +run/0: {name: "i", value: 9, type: 1, properties: ["i": "integer"]} <- add {name: "i", value: 9, type: 1, properties: ["i": "integer"]}, {name: "1", value: 1, type: 0, properties: ["1": "literal"]} run/0: ingredient 0 is i mem/0: location 1024 is 6 run/0: ingredient 1 is 1 run/0: product 0 is 7 mem/0: storing 7 in location 1024 run/0: instruction interpolate/53 +run/0: {name: "result-idx", value: 8, type: 1, properties: ["result-idx": "integer"]} <- add {name: "result-idx", value: 8, type: 1, properties: ["result-idx": "integer"]}, {name: "1", value: 1, type: 0, properties: ["1": "literal"]} run/0: ingredient 0 is result-idx mem/0: location 1023 is 8 run/0: ingredient 1 is 1 run/0: product 0 is 9 mem/0: storing 9 in location 1023 run/0: instruction interpolate/54 +run/0: loop {name: "", value: -8, type: , properties: ["": ]} run/0: ingredient 0 is -8 run/0: jumping to instruction 47 run/0: instruction interpolate/47 +run/0: {name: "tem-done?", value: 10, type: 3, properties: ["tem-done?": "boolean"]} <- greater-or-equal {name: "i", value: 9, type: 1, properties: ["i": "integer"]}, {name: "tem-len", value: 2, type: 1, properties: ["tem-len": "integer"]} run/0: ingredient 0 is i mem/0: location 1024 is 7 run/0: ingredient 1 is tem-len @@ -608,10 +715,12 @@ mem/0: location 1017 is 9 run/0: product 0 is 0 mem/0: storing 0 in location 1025 run/0: instruction interpolate/48 +run/0: break-if {name: "tem-done?", value: 10, type: 3, properties: ["tem-done?": "boolean"]}, {name: "", value: 6, type: , properties: ["": ]} mem/0: location 1025 is 0 run/0: ingredient 0 is 0 run/0: jump-if fell through run/0: instruction interpolate/49 +run/0: {name: "in", value: 11, type: 4, properties: ["in": "character"]} <- index {name: "template", value: 1, type: 2-5-4, properties: ["template": "address":"array":"character", "deref": ]}, {name: "i", value: 9, type: 1, properties: ["i": "integer"]} run/0: ingredient 0 is {name: "template", value: 1, type: 2-5-4, properties: ["template": "address":"array":"character", "deref": ]} mem/0: location 1016 is 1000 run/0: ingredient 1 is {name: "i", value: 9, type: 1, properties: ["i": "integer"]} @@ -622,6 +731,7 @@ mem/0: location 1008 is 111 run/0: product 0 is 111 mem/0: storing 111 in location 1026 run/0: instruction interpolate/50 +run/0: {name: "out", value: 13, type: 2-4, properties: ["out": "address":"character"]} <- index-address {name: "result", value: 7, type: 2-5-4, properties: ["result": "address":"array":"character", "deref": ]}, {name: "result-idx", value: 8, type: 1, properties: ["result-idx": "integer"]} run/0: ingredient 0 is result mem/0: location 1022 is 1074 run/0: ingredient 1 is {name: "result-idx", value: 8, type: 1, properties: ["result-idx": "integer"]} @@ -630,26 +740,31 @@ run/0: address to copy is 1084 run/0: product 0 is 1084 mem/0: storing 1084 in location 1028 run/0: instruction interpolate/51 +run/0: {name: "out", value: 13, type: 2-4, properties: ["out": "address":"character", "deref": ]} <- copy {name: "in", value: 11, type: 4, properties: ["in": "character"]} run/0: ingredient 0 is in mem/0: location 1026 is 111 mem/0: location 1028 is 1084 mem/0: storing 111 in location 1084 run/0: instruction interpolate/52 +run/0: {name: "i", value: 9, type: 1, properties: ["i": "integer"]} <- add {name: "i", value: 9, type: 1, properties: ["i": "integer"]}, {name: "1", value: 1, type: 0, properties: ["1": "literal"]} run/0: ingredient 0 is i mem/0: location 1024 is 7 run/0: ingredient 1 is 1 run/0: product 0 is 8 mem/0: storing 8 in location 1024 run/0: instruction interpolate/53 +run/0: {name: "result-idx", value: 8, type: 1, properties: ["result-idx": "integer"]} <- add {name: "result-idx", value: 8, type: 1, properties: ["result-idx": "integer"]}, {name: "1", value: 1, type: 0, properties: ["1": "literal"]} run/0: ingredient 0 is result-idx mem/0: location 1023 is 9 run/0: ingredient 1 is 1 run/0: product 0 is 10 mem/0: storing 10 in location 1023 run/0: instruction interpolate/54 +run/0: loop {name: "", value: -8, type: , properties: ["": ]} run/0: ingredient 0 is -8 run/0: jumping to instruction 47 run/0: instruction interpolate/47 +run/0: {name: "tem-done?", value: 10, type: 3, properties: ["tem-done?": "boolean"]} <- greater-or-equal {name: "i", value: 9, type: 1, properties: ["i": "integer"]}, {name: "tem-len", value: 2, type: 1, properties: ["tem-len": "integer"]} run/0: ingredient 0 is i mem/0: location 1024 is 8 run/0: ingredient 1 is tem-len @@ -657,10 +772,12 @@ mem/0: location 1017 is 9 run/0: product 0 is 0 mem/0: storing 0 in location 1025 run/0: instruction interpolate/48 +run/0: break-if {name: "tem-done?", value: 10, type: 3, properties: ["tem-done?": "boolean"]}, {name: "", value: 6, type: , properties: ["": ]} mem/0: location 1025 is 0 run/0: ingredient 0 is 0 run/0: jump-if fell through run/0: instruction interpolate/49 +run/0: {name: "in", value: 11, type: 4, properties: ["in": "character"]} <- index {name: "template", value: 1, type: 2-5-4, properties: ["template": "address":"array":"character", "deref": ]}, {name: "i", value: 9, type: 1, properties: ["i": "integer"]} run/0: ingredient 0 is {name: "template", value: 1, type: 2-5-4, properties: ["template": "address":"array":"character", "deref": ]} mem/0: location 1016 is 1000 run/0: ingredient 1 is {name: "i", value: 9, type: 1, properties: ["i": "integer"]} @@ -671,6 +788,7 @@ mem/0: location 1009 is 33 run/0: product 0 is 33 mem/0: storing 33 in location 1026 run/0: instruction interpolate/50 +run/0: {name: "out", value: 13, type: 2-4, properties: ["out": "address":"character"]} <- index-address {name: "result", value: 7, type: 2-5-4, properties: ["result": "address":"array":"character", "deref": ]}, {name: "result-idx", value: 8, type: 1, properties: ["result-idx": "integer"]} run/0: ingredient 0 is result mem/0: location 1022 is 1074 run/0: ingredient 1 is {name: "result-idx", value: 8, type: 1, properties: ["result-idx": "integer"]} @@ -679,26 +797,31 @@ run/0: address to copy is 1085 run/0: product 0 is 1085 mem/0: storing 1085 in location 1028 run/0: instruction interpolate/51 +run/0: {name: "out", value: 13, type: 2-4, properties: ["out": "address":"character", "deref": ]} <- copy {name: "in", value: 11, type: 4, properties: ["in": "character"]} run/0: ingredient 0 is in mem/0: location 1026 is 33 mem/0: location 1028 is 1085 mem/0: storing 33 in location 1085 run/0: instruction interpolate/52 +run/0: {name: "i", value: 9, type: 1, properties: ["i": "integer"]} <- add {name: "i", value: 9, type: 1, properties: ["i": "integer"]}, {name: "1", value: 1, type: 0, properties: ["1": "literal"]} run/0: ingredient 0 is i mem/0: location 1024 is 8 run/0: ingredient 1 is 1 run/0: product 0 is 9 mem/0: storing 9 in location 1024 run/0: instruction interpolate/53 +run/0: {name: "result-idx", value: 8, type: 1, properties: ["result-idx": "integer"]} <- add {name: "result-idx", value: 8, type: 1, properties: ["result-idx": "integer"]}, {name: "1", value: 1, type: 0, properties: ["1": "literal"]} run/0: ingredient 0 is result-idx mem/0: location 1023 is 10 run/0: ingredient 1 is 1 run/0: product 0 is 11 mem/0: storing 11 in location 1023 run/0: instruction interpolate/54 +run/0: loop {name: "", value: -8, type: , properties: ["": ]} run/0: ingredient 0 is -8 run/0: jumping to instruction 47 run/0: instruction interpolate/47 +run/0: {name: "tem-done?", value: 10, type: 3, properties: ["tem-done?": "boolean"]} <- greater-or-equal {name: "i", value: 9, type: 1, properties: ["i": "integer"]}, {name: "tem-len", value: 2, type: 1, properties: ["tem-len": "integer"]} run/0: ingredient 0 is i mem/0: location 1024 is 9 run/0: ingredient 1 is tem-len @@ -706,15 +829,18 @@ mem/0: location 1017 is 9 run/0: product 0 is 1 mem/0: storing 1 in location 1025 run/0: instruction interpolate/48 +run/0: break-if {name: "tem-done?", value: 10, type: 3, properties: ["tem-done?": "boolean"]}, {name: "", value: 6, type: , properties: ["": ]} mem/0: location 1025 is 1 run/0: ingredient 0 is 1 run/0: ingredient 1 is run/0: jumping to instruction 55 run/0: instruction interpolate/56 +run/0: reply {name: "result", value: 7, type: 2-5-4, properties: ["result": "address":"array":"character"]} mem/0: location 1022 is 1074 run/0: result 0 is 1074 mem/0: storing 1074 in location 3 run/0: instruction test-interpolate-at-start/3 +run/0: {name: "4", value: 4, type: 5-4, properties: ["4": "array":"character", "raw": ]} <- copy {name: "3", value: 3, type: 2-5-4, properties: ["3": "address":"array":"character", "raw": , "deref": ]} run/0: ingredient 0 is 3 mem/0: location 3 is 1074 mem/0: location 1074 is 11 diff --git a/cpp/.traces/interpolate-works b/cpp/.traces/interpolate-works index c7dc2ee9..e299c10a 100644 --- a/cpp/.traces/interpolate-works +++ b/cpp/.traces/interpolate-works @@ -21,37 +21,48 @@ after-brace/0: copy ... new/0: routine allocated memory from 1000 to 101000 schedule/0: test-interpolate-works run/0: instruction test-interpolate-works/0 +run/0: {name: "1", value: 1, type: 2-5-4, properties: ["1": "address":"array":"character", "raw": ]} <- new {name: "abc _", value: 0, type: 0, properties: ["abc _": "literal-string"]} mem/0: storing 1000 in location 1 run/0: instruction test-interpolate-works/1 +run/0: {name: "2", value: 2, type: 2-5-4, properties: ["2": "address":"array":"character", "raw": ]} <- new {name: "def", value: 0, type: 0, properties: ["def": "literal-string"]} mem/0: storing 1006 in location 2 run/0: instruction test-interpolate-works/2 +run/0: {name: "3", value: 3, type: 2-5-4, properties: ["3": "address":"array":"character", "raw": ]} <- interpolate {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 {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 +run/0: {name: "template", value: 1, type: 2-5-4, properties: ["template": "address":"array":"character"]} <- next-ingredient run/0: product 0 is 1000 mem/0: storing 1000 in location 1012 run/0: instruction interpolate/2 +run/0: {name: "tem-len", value: 2, type: 1, properties: ["tem-len": "integer"]} <- length {name: "template", value: 1, type: 2-5-4, properties: ["template": "address":"array":"character", "deref": ]} mem/0: location 1012 is 1000 mem/0: storing 5 in location 1013 run/0: instruction interpolate/3 +run/0: {name: "result-len", value: 3, type: 1, properties: ["result-len": "integer"]} <- copy {name: "tem-len", value: 2, type: 1, properties: ["tem-len": "integer"]} run/0: ingredient 0 is tem-len mem/0: location 1013 is 5 mem/0: storing 5 in location 1014 run/0: instruction interpolate/5 +run/0: {name: "a", value: 4, type: 2-5-4, properties: ["a": "address":"array":"character"]}, {name: "arg-received?", value: 5, type: 3, properties: ["arg-received?": "boolean"]} <- next-ingredient run/0: product 0 is 1006 mem/0: storing 1006 in location 1015 mem/0: storing 1 in location 1016 run/0: instruction interpolate/6 +run/0: break-unless {name: "arg-received?", value: 5, type: 3, properties: ["arg-received?": "boolean"]}, {name: "", value: 4, type: , properties: ["": ]} mem/0: location 1016 is 1 run/0: ingredient 0 is 1 run/0: jump-unless fell through run/0: instruction interpolate/7 +run/0: {name: "a-len", value: 6, type: 1, properties: ["a-len": "integer"]} <- length {name: "a", value: 4, type: 2-5-4, properties: ["a": "address":"array":"character", "deref": ]} mem/0: location 1015 is 1006 mem/0: storing 3 in location 1017 run/0: instruction interpolate/8 +run/0: {name: "result-len", value: 3, type: 1, properties: ["result-len": "integer"]} <- add {name: "result-len", value: 3, type: 1, properties: ["result-len": "integer"]}, {name: "a-len", value: 6, type: 1, properties: ["a-len": "integer"]} run/0: ingredient 0 is result-len mem/0: location 1014 is 5 run/0: ingredient 1 is a-len @@ -59,44 +70,56 @@ mem/0: location 1017 is 3 run/0: product 0 is 8 mem/0: storing 8 in location 1014 run/0: instruction interpolate/9 +run/0: {name: "result-len", value: 3, type: 1, properties: ["result-len": "integer"]} <- subtract {name: "result-len", value: 3, type: 1, properties: ["result-len": "integer"]}, {name: "1", value: 1, type: 0, properties: ["1": "literal"]} run/0: ingredient 0 is result-len mem/0: location 1014 is 8 run/0: ingredient 1 is 1 run/0: product 0 is 7 mem/0: storing 7 in location 1014 run/0: instruction interpolate/10 +run/0: loop {name: "", value: -6, type: , properties: ["": ]} run/0: ingredient 0 is -6 run/0: jumping to instruction 5 run/0: instruction interpolate/5 +run/0: {name: "a", value: 4, type: 2-5-4, properties: ["a": "address":"array":"character"]}, {name: "arg-received?", value: 5, type: 3, properties: ["arg-received?": "boolean"]} <- next-ingredient mem/0: storing 0 in location 1016 run/0: instruction interpolate/6 +run/0: break-unless {name: "arg-received?", value: 5, type: 3, properties: ["arg-received?": "boolean"]}, {name: "", value: 4, type: , properties: ["": ]} mem/0: location 1016 is 0 run/0: ingredient 0 is 0 run/0: ingredient 1 is run/0: jumping to instruction 11 run/0: instruction interpolate/12 +run/0: rewind-ingredients run/0: instruction interpolate/13 +run/0: {name: "_", value: 0, type: 0, properties: ["_": "dummy"]} <- next-ingredient 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 {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: 1070 mem/0: storing 1070 in location 1018 run/0: instruction interpolate/15 +run/0: {name: "result-idx", value: 8, type: 1, properties: ["result-idx": "integer"]} <- copy {name: "0", value: 0, type: 0, properties: ["0": "literal"]} run/0: ingredient 0 is 0 mem/0: storing 0 in location 1019 run/0: instruction interpolate/16 +run/0: {name: "i", value: 9, type: 1, properties: ["i": "integer"]} <- copy {name: "0", value: 0, type: 0, properties: ["0": "literal"]} run/0: ingredient 0 is 0 mem/0: storing 0 in location 1020 run/0: instruction interpolate/18 +run/0: {name: "a", value: 4, type: 2-5-4, properties: ["a": "address":"array":"character"]}, {name: "arg-received?", value: 5, type: 3, properties: ["arg-received?": "boolean"]} <- next-ingredient run/0: product 0 is 1006 mem/0: storing 1006 in location 1015 mem/0: storing 1 in location 1016 run/0: instruction interpolate/19 +run/0: break-unless {name: "arg-received?", value: 5, type: 3, properties: ["arg-received?": "boolean"]}, {name: "", value: 25, type: , properties: ["": ]} mem/0: location 1016 is 1 run/0: ingredient 0 is 1 run/0: jump-unless fell through run/0: instruction interpolate/21 +run/0: {name: "tem-done?", value: 10, type: 3, properties: ["tem-done?": "boolean"]} <- greater-or-equal {name: "i", value: 9, type: 1, properties: ["i": "integer"]}, {name: "tem-len", value: 2, type: 1, properties: ["tem-len": "integer"]} run/0: ingredient 0 is i mem/0: location 1020 is 0 run/0: ingredient 1 is tem-len @@ -104,10 +127,12 @@ mem/0: location 1013 is 5 run/0: product 0 is 0 mem/0: storing 0 in location 1021 run/0: instruction interpolate/22 +run/0: break-if {name: "tem-done?", value: 10, type: 3, properties: ["tem-done?": "boolean"]}, {name: "2", value: 2, type: 0, properties: ["2": "blocks"]} mem/0: location 1021 is 0 run/0: ingredient 0 is 0 run/0: jump-if fell through run/0: instruction interpolate/23 +run/0: {name: "in", value: 11, type: 4, properties: ["in": "character"]} <- index {name: "template", value: 1, type: 2-5-4, properties: ["template": "address":"array":"character", "deref": ]}, {name: "i", value: 9, type: 1, properties: ["i": "integer"]} run/0: ingredient 0 is {name: "template", value: 1, type: 2-5-4, properties: ["template": "address":"array":"character", "deref": ]} mem/0: location 1012 is 1000 run/0: ingredient 1 is {name: "i", value: 9, type: 1, properties: ["i": "integer"]} @@ -118,16 +143,19 @@ mem/0: location 1001 is 97 run/0: product 0 is 97 mem/0: storing 97 in location 1022 run/0: instruction interpolate/24 +run/0: {name: "underscore?", value: 12, type: 3, properties: ["underscore?": "boolean"]} <- equal {name: "in", value: 11, type: 4, properties: ["in": "character"]}, {name: "95", value: 95, type: 0, properties: ["95": "literal"]} run/0: ingredient 0 is in mem/0: location 1022 is 97 run/0: ingredient 1 is 95 run/0: product 0 is 0 mem/0: storing 0 in location 1023 run/0: instruction interpolate/25 +run/0: break-if {name: "underscore?", value: 12, type: 3, properties: ["underscore?": "boolean"]}, {name: "", value: 5, type: , properties: ["": ]} mem/0: location 1023 is 0 run/0: ingredient 0 is 0 run/0: jump-if fell through run/0: instruction interpolate/26 +run/0: {name: "out", value: 13, type: 2-4, properties: ["out": "address":"character"]} <- index-address {name: "result", value: 7, type: 2-5-4, properties: ["result": "address":"array":"character", "deref": ]}, {name: "result-idx", value: 8, type: 1, properties: ["result-idx": "integer"]} run/0: ingredient 0 is result mem/0: location 1018 is 1070 run/0: ingredient 1 is {name: "result-idx", value: 8, type: 1, properties: ["result-idx": "integer"]} @@ -136,26 +164,31 @@ run/0: address to copy is 1071 run/0: product 0 is 1071 mem/0: storing 1071 in location 1024 run/0: instruction interpolate/27 +run/0: {name: "out", value: 13, type: 2-4, properties: ["out": "address":"character", "deref": ]} <- copy {name: "in", value: 11, type: 4, properties: ["in": "character"]} run/0: ingredient 0 is in mem/0: location 1022 is 97 mem/0: location 1024 is 1071 mem/0: storing 97 in location 1071 run/0: instruction interpolate/28 +run/0: {name: "i", value: 9, type: 1, properties: ["i": "integer"]} <- add {name: "i", value: 9, type: 1, properties: ["i": "integer"]}, {name: "1", value: 1, type: 0, properties: ["1": "literal"]} run/0: ingredient 0 is i mem/0: location 1020 is 0 run/0: ingredient 1 is 1 run/0: product 0 is 1 mem/0: storing 1 in location 1020 run/0: instruction interpolate/29 +run/0: {name: "result-idx", value: 8, type: 1, properties: ["result-idx": "integer"]} <- add {name: "result-idx", value: 8, type: 1, properties: ["result-idx": "integer"]}, {name: "1", value: 1, type: 0, properties: ["1": "literal"]} run/0: ingredient 0 is result-idx mem/0: location 1019 is 0 run/0: ingredient 1 is 1 run/0: product 0 is 1 mem/0: storing 1 in location 1019 run/0: instruction interpolate/30 +run/0: loop {name: "", value: -10, type: , properties: ["": ]} run/0: ingredient 0 is -10 run/0: jumping to instruction 21 run/0: instruction interpolate/21 +run/0: {name: "tem-done?", value: 10, type: 3, properties: ["tem-done?": "boolean"]} <- greater-or-equal {name: "i", value: 9, type: 1, properties: ["i": "integer"]}, {name: "tem-len", value: 2, type: 1, properties: ["tem-len": "integer"]} run/0: ingredient 0 is i mem/0: location 1020 is 1 run/0: ingredient 1 is tem-len @@ -163,10 +196,12 @@ mem/0: location 1013 is 5 run/0: product 0 is 0 mem/0: storing 0 in location 1021 run/0: instruction interpolate/22 +run/0: break-if {name: "tem-done?", value: 10, type: 3, properties: ["tem-done?": "boolean"]}, {name: "2", value: 2, type: 0, properties: ["2": "blocks"]} mem/0: location 1021 is 0 run/0: ingredient 0 is 0 run/0: jump-if fell through run/0: instruction interpolate/23 +run/0: {name: "in", value: 11, type: 4, properties: ["in": "character"]} <- index {name: "template", value: 1, type: 2-5-4, properties: ["template": "address":"array":"character", "deref": ]}, {name: "i", value: 9, type: 1, properties: ["i": "integer"]} run/0: ingredient 0 is {name: "template", value: 1, type: 2-5-4, properties: ["template": "address":"array":"character", "deref": ]} mem/0: location 1012 is 1000 run/0: ingredient 1 is {name: "i", value: 9, type: 1, properties: ["i": "integer"]} @@ -177,16 +212,19 @@ mem/0: location 1002 is 98 run/0: product 0 is 98 mem/0: storing 98 in location 1022 run/0: instruction interpolate/24 +run/0: {name: "underscore?", value: 12, type: 3, properties: ["underscore?": "boolean"]} <- equal {name: "in", value: 11, type: 4, properties: ["in": "character"]}, {name: "95", value: 95, type: 0, properties: ["95": "literal"]} run/0: ingredient 0 is in mem/0: location 1022 is 98 run/0: ingredient 1 is 95 run/0: product 0 is 0 mem/0: storing 0 in location 1023 run/0: instruction interpolate/25 +run/0: break-if {name: "underscore?", value: 12, type: 3, properties: ["underscore?": "boolean"]}, {name: "", value: 5, type: , properties: ["": ]} mem/0: location 1023 is 0 run/0: ingredient 0 is 0 run/0: jump-if fell through run/0: instruction interpolate/26 +run/0: {name: "out", value: 13, type: 2-4, properties: ["out": "address":"character"]} <- index-address {name: "result", value: 7, type: 2-5-4, properties: ["result": "address":"array":"character", "deref": ]}, {name: "result-idx", value: 8, type: 1, properties: ["result-idx": "integer"]} run/0: ingredient 0 is result mem/0: location 1018 is 1070 run/0: ingredient 1 is {name: "result-idx", value: 8, type: 1, properties: ["result-idx": "integer"]} @@ -195,26 +233,31 @@ run/0: address to copy is 1072 run/0: product 0 is 1072 mem/0: storing 1072 in location 1024 run/0: instruction interpolate/27 +run/0: {name: "out", value: 13, type: 2-4, properties: ["out": "address":"character", "deref": ]} <- copy {name: "in", value: 11, type: 4, properties: ["in": "character"]} run/0: ingredient 0 is in mem/0: location 1022 is 98 mem/0: location 1024 is 1072 mem/0: storing 98 in location 1072 run/0: instruction interpolate/28 +run/0: {name: "i", value: 9, type: 1, properties: ["i": "integer"]} <- add {name: "i", value: 9, type: 1, properties: ["i": "integer"]}, {name: "1", value: 1, type: 0, properties: ["1": "literal"]} run/0: ingredient 0 is i mem/0: location 1020 is 1 run/0: ingredient 1 is 1 run/0: product 0 is 2 mem/0: storing 2 in location 1020 run/0: instruction interpolate/29 +run/0: {name: "result-idx", value: 8, type: 1, properties: ["result-idx": "integer"]} <- add {name: "result-idx", value: 8, type: 1, properties: ["result-idx": "integer"]}, {name: "1", value: 1, type: 0, properties: ["1": "literal"]} run/0: ingredient 0 is result-idx mem/0: location 1019 is 1 run/0: ingredient 1 is 1 run/0: product 0 is 2 mem/0: storing 2 in location 1019 run/0: instruction interpolate/30 +run/0: loop {name: "", value: -10, type: , properties: ["": ]} run/0: ingredient 0 is -10 run/0: jumping to instruction 21 run/0: instruction interpolate/21 +run/0: {name: "tem-done?", value: 10, type: 3, properties: ["tem-done?": "boolean"]} <- greater-or-equal {name: "i", value: 9, type: 1, properties: ["i": "integer"]}, {name: "tem-len", value: 2, type: 1, properties: ["tem-len": "integer"]} run/0: ingredient 0 is i mem/0: location 1020 is 2 run/0: ingredient 1 is tem-len @@ -222,10 +265,12 @@ mem/0: location 1013 is 5 run/0: product 0 is 0 mem/0: storing 0 in location 1021 run/0: instruction interpolate/22 +run/0: break-if {name: "tem-done?", value: 10, type: 3, properties: ["tem-done?": "boolean"]}, {name: "2", value: 2, type: 0, properties: ["2": "blocks"]} mem/0: location 1021 is 0 run/0: ingredient 0 is 0 run/0: jump-if fell through run/0: instruction interpolate/23 +run/0: {name: "in", value: 11, type: 4, properties: ["in": "character"]} <- index {name: "template", value: 1, type: 2-5-4, properties: ["template": "address":"array":"character", "deref": ]}, {name: "i", value: 9, type: 1, properties: ["i": "integer"]} run/0: ingredient 0 is {name: "template", value: 1, type: 2-5-4, properties: ["template": "address":"array":"character", "deref": ]} mem/0: location 1012 is 1000 run/0: ingredient 1 is {name: "i", value: 9, type: 1, properties: ["i": "integer"]} @@ -236,16 +281,19 @@ mem/0: location 1003 is 99 run/0: product 0 is 99 mem/0: storing 99 in location 1022 run/0: instruction interpolate/24 +run/0: {name: "underscore?", value: 12, type: 3, properties: ["underscore?": "boolean"]} <- equal {name: "in", value: 11, type: 4, properties: ["in": "character"]}, {name: "95", value: 95, type: 0, properties: ["95": "literal"]} run/0: ingredient 0 is in mem/0: location 1022 is 99 run/0: ingredient 1 is 95 run/0: product 0 is 0 mem/0: storing 0 in location 1023 run/0: instruction interpolate/25 +run/0: break-if {name: "underscore?", value: 12, type: 3, properties: ["underscore?": "boolean"]}, {name: "", value: 5, type: , properties: ["": ]} mem/0: location 1023 is 0 run/0: ingredient 0 is 0 run/0: jump-if fell through run/0: instruction interpolate/26 +run/0: {name: "out", value: 13, type: 2-4, properties: ["out": "address":"character"]} <- index-address {name: "result", value: 7, type: 2-5-4, properties: ["result": "address":"array":"character", "deref": ]}, {name: "result-idx", value: 8, type: 1, properties: ["result-idx": "integer"]} run/0: ingredient 0 is result mem/0: location 1018 is 1070 run/0: ingredient 1 is {name: "result-idx", value: 8, type: 1, properties: ["result-idx": "integer"]} @@ -254,26 +302,31 @@ run/0: address to copy is 1073 run/0: product 0 is 1073 mem/0: storing 1073 in location 1024 run/0: instruction interpolate/27 +run/0: {name: "out", value: 13, type: 2-4, properties: ["out": "address":"character", "deref": ]} <- copy {name: "in", value: 11, type: 4, properties: ["in": "character"]} run/0: ingredient 0 is in mem/0: location 1022 is 99 mem/0: location 1024 is 1073 mem/0: storing 99 in location 1073 run/0: instruction interpolate/28 +run/0: {name: "i", value: 9, type: 1, properties: ["i": "integer"]} <- add {name: "i", value: 9, type: 1, properties: ["i": "integer"]}, {name: "1", value: 1, type: 0, properties: ["1": "literal"]} run/0: ingredient 0 is i mem/0: location 1020 is 2 run/0: ingredient 1 is 1 run/0: product 0 is 3 mem/0: storing 3 in location 1020 run/0: instruction interpolate/29 +run/0: {name: "result-idx", value: 8, type: 1, properties: ["result-idx": "integer"]} <- add {name: "result-idx", value: 8, type: 1, properties: ["result-idx": "integer"]}, {name: "1", value: 1, type: 0, properties: ["1": "literal"]} run/0: ingredient 0 is result-idx mem/0: location 1019 is 2 run/0: ingredient 1 is 1 run/0: product 0 is 3 mem/0: storing 3 in location 1019 run/0: instruction interpolate/30 +run/0: loop {name: "", value: -10, type: , properties: ["": ]} run/0: ingredient 0 is -10 run/0: jumping to instruction 21 run/0: instruction interpolate/21 +run/0: {name: "tem-done?", value: 10, type: 3, properties: ["tem-done?": "boolean"]} <- greater-or-equal {name: "i", value: 9, type: 1, properties: ["i": "integer"]}, {name: "tem-len", value: 2, type: 1, properties: ["tem-len": "integer"]} run/0: ingredient 0 is i mem/0: location 1020 is 3 run/0: ingredient 1 is tem-len @@ -281,10 +334,12 @@ mem/0: location 1013 is 5 run/0: product 0 is 0 mem/0: storing 0 in location 1021 run/0: instruction interpolate/22 +run/0: break-if {name: "tem-done?", value: 10, type: 3, properties: ["tem-done?": "boolean"]}, {name: "2", value: 2, type: 0, properties: ["2": "blocks"]} mem/0: location 1021 is 0 run/0: ingredient 0 is 0 run/0: jump-if fell through run/0: instruction interpolate/23 +run/0: {name: "in", value: 11, type: 4, properties: ["in": "character"]} <- index {name: "template", value: 1, type: 2-5-4, properties: ["template": "address":"array":"character", "deref": ]}, {name: "i", value: 9, type: 1, properties: ["i": "integer"]} run/0: ingredient 0 is {name: "template", value: 1, type: 2-5-4, properties: ["template": "address":"array":"character", "deref": ]} mem/0: location 1012 is 1000 run/0: ingredient 1 is {name: "i", value: 9, type: 1, properties: ["i": "integer"]} @@ -295,16 +350,19 @@ mem/0: location 1004 is 32 run/0: product 0 is 32 mem/0: storing 32 in location 1022 run/0: instruction interpolate/24 +run/0: {name: "underscore?", value: 12, type: 3, properties: ["underscore?": "boolean"]} <- equal {name: "in", value: 11, type: 4, properties: ["in": "character"]}, {name: "95", value: 95, type: 0, properties: ["95": "literal"]} run/0: ingredient 0 is in mem/0: location 1022 is 32 run/0: ingredient 1 is 95 run/0: product 0 is 0 mem/0: storing 0 in location 1023 run/0: instruction interpolate/25 +run/0: break-if {name: "underscore?", value: 12, type: 3, properties: ["underscore?": "boolean"]}, {name: "", value: 5, type: , properties: ["": ]} mem/0: location 1023 is 0 run/0: ingredient 0 is 0 run/0: jump-if fell through run/0: instruction interpolate/26 +run/0: {name: "out", value: 13, type: 2-4, properties: ["out": "address":"character"]} <- index-address {name: "result", value: 7, type: 2-5-4, properties: ["result": "address":"array":"character", "deref": ]}, {name: "result-idx", value: 8, type: 1, properties: ["result-idx": "integer"]} run/0: ingredient 0 is result mem/0: location 1018 is 1070 run/0: ingredient 1 is {name: "result-idx", value: 8, type: 1, properties: ["result-idx": "integer"]} @@ -313,26 +371,31 @@ run/0: address to copy is 1074 run/0: product 0 is 1074 mem/0: storing 1074 in location 1024 run/0: instruction interpolate/27 +run/0: {name: "out", value: 13, type: 2-4, properties: ["out": "address":"character", "deref": ]} <- copy {name: "in", value: 11, type: 4, properties: ["in": "character"]} run/0: ingredient 0 is in mem/0: location 1022 is 32 mem/0: location 1024 is 1074 mem/0: storing 32 in location 1074 run/0: instruction interpolate/28 +run/0: {name: "i", value: 9, type: 1, properties: ["i": "integer"]} <- add {name: "i", value: 9, type: 1, properties: ["i": "integer"]}, {name: "1", value: 1, type: 0, properties: ["1": "literal"]} run/0: ingredient 0 is i mem/0: location 1020 is 3 run/0: ingredient 1 is 1 run/0: product 0 is 4 mem/0: storing 4 in location 1020 run/0: instruction interpolate/29 +run/0: {name: "result-idx", value: 8, type: 1, properties: ["result-idx": "integer"]} <- add {name: "result-idx", value: 8, type: 1, properties: ["result-idx": "integer"]}, {name: "1", value: 1, type: 0, properties: ["1": "literal"]} run/0: ingredient 0 is result-idx mem/0: location 1019 is 3 run/0: ingredient 1 is 1 run/0: product 0 is 4 mem/0: storing 4 in location 1019 run/0: instruction interpolate/30 +run/0: loop {name: "", value: -10, type: , properties: ["": ]} run/0: ingredient 0 is -10 run/0: jumping to instruction 21 run/0: instruction interpolate/21 +run/0: {name: "tem-done?", value: 10, type: 3, properties: ["tem-done?": "boolean"]} <- greater-or-equal {name: "i", value: 9, type: 1, properties: ["i": "integer"]}, {name: "tem-len", value: 2, type: 1, properties: ["tem-len": "integer"]} run/0: ingredient 0 is i mem/0: location 1020 is 4 run/0: ingredient 1 is tem-len @@ -340,10 +403,12 @@ mem/0: location 1013 is 5 run/0: product 0 is 0 mem/0: storing 0 in location 1021 run/0: instruction interpolate/22 +run/0: break-if {name: "tem-done?", value: 10, type: 3, properties: ["tem-done?": "boolean"]}, {name: "2", value: 2, type: 0, properties: ["2": "blocks"]} mem/0: location 1021 is 0 run/0: ingredient 0 is 0 run/0: jump-if fell through run/0: instruction interpolate/23 +run/0: {name: "in", value: 11, type: 4, properties: ["in": "character"]} <- index {name: "template", value: 1, type: 2-5-4, properties: ["template": "address":"array":"character", "deref": ]}, {name: "i", value: 9, type: 1, properties: ["i": "integer"]} run/0: ingredient 0 is {name: "template", value: 1, type: 2-5-4, properties: ["template": "address":"array":"character", "deref": ]} mem/0: location 1012 is 1000 run/0: ingredient 1 is {name: "i", value: 9, type: 1, properties: ["i": "integer"]} @@ -354,20 +419,24 @@ mem/0: location 1005 is 95 run/0: product 0 is 95 mem/0: storing 95 in location 1022 run/0: instruction interpolate/24 +run/0: {name: "underscore?", value: 12, type: 3, properties: ["underscore?": "boolean"]} <- equal {name: "in", value: 11, type: 4, properties: ["in": "character"]}, {name: "95", value: 95, type: 0, properties: ["95": "literal"]} run/0: ingredient 0 is in mem/0: location 1022 is 95 run/0: ingredient 1 is 95 run/0: product 0 is 1 mem/0: storing 1 in location 1023 run/0: instruction interpolate/25 +run/0: break-if {name: "underscore?", value: 12, type: 3, properties: ["underscore?": "boolean"]}, {name: "", value: 5, type: , properties: ["": ]} mem/0: location 1023 is 1 run/0: ingredient 0 is 1 run/0: ingredient 1 is run/0: jumping to instruction 31 run/0: instruction interpolate/32 +run/0: {name: "j", value: 14, type: 1, properties: ["j": "integer"]} <- copy {name: "0", value: 0, type: 0, properties: ["0": "literal"]} run/0: ingredient 0 is 0 mem/0: storing 0 in location 1025 run/0: instruction interpolate/34 +run/0: {name: "arg-done?", value: 15, type: 3, properties: ["arg-done?": "boolean"]} <- greater-or-equal {name: "j", value: 14, type: 1, properties: ["j": "integer"]}, {name: "a-len", value: 6, type: 1, properties: ["a-len": "integer"]} run/0: ingredient 0 is j mem/0: location 1025 is 0 run/0: ingredient 1 is a-len @@ -375,10 +444,12 @@ mem/0: location 1017 is 3 run/0: product 0 is 0 mem/0: storing 0 in location 1026 run/0: instruction interpolate/35 +run/0: break-if {name: "arg-done?", value: 15, type: 3, properties: ["arg-done?": "boolean"]}, {name: "", value: 6, type: , properties: ["": ]} mem/0: location 1026 is 0 run/0: ingredient 0 is 0 run/0: jump-if fell through run/0: instruction interpolate/36 +run/0: {name: "in", value: 11, type: 4, properties: ["in": "character"]} <- index {name: "a", value: 4, type: 2-5-4, properties: ["a": "address":"array":"character", "deref": ]}, {name: "j", value: 14, type: 1, properties: ["j": "integer"]} run/0: ingredient 0 is {name: "a", value: 4, type: 2-5-4, properties: ["a": "address":"array":"character", "deref": ]} mem/0: location 1015 is 1006 run/0: ingredient 1 is {name: "j", value: 14, type: 1, properties: ["j": "integer"]} @@ -389,6 +460,7 @@ mem/0: location 1007 is 100 run/0: product 0 is 100 mem/0: storing 100 in location 1022 run/0: instruction interpolate/37 +run/0: {name: "out", value: 13, type: 2-4, properties: ["out": "address":"character"]} <- index-address {name: "result", value: 7, type: 2-5-4, properties: ["result": "address":"array":"character", "deref": ]}, {name: "result-idx", value: 8, type: 1, properties: ["result-idx": "integer"]} run/0: ingredient 0 is result mem/0: location 1018 is 1070 run/0: ingredient 1 is {name: "result-idx", value: 8, type: 1, properties: ["result-idx": "integer"]} @@ -397,26 +469,31 @@ run/0: address to copy is 1075 run/0: product 0 is 1075 mem/0: storing 1075 in location 1024 run/0: instruction interpolate/38 +run/0: {name: "out", value: 13, type: 2-4, properties: ["out": "address":"character", "deref": ]} <- copy {name: "in", value: 11, type: 4, properties: ["in": "character"]} run/0: ingredient 0 is in mem/0: location 1022 is 100 mem/0: location 1024 is 1075 mem/0: storing 100 in location 1075 run/0: instruction interpolate/39 +run/0: {name: "j", value: 14, type: 1, properties: ["j": "integer"]} <- add {name: "j", value: 14, type: 1, properties: ["j": "integer"]}, {name: "1", value: 1, type: 0, properties: ["1": "literal"]} run/0: ingredient 0 is j mem/0: location 1025 is 0 run/0: ingredient 1 is 1 run/0: product 0 is 1 mem/0: storing 1 in location 1025 run/0: instruction interpolate/40 +run/0: {name: "result-idx", value: 8, type: 1, properties: ["result-idx": "integer"]} <- add {name: "result-idx", value: 8, type: 1, properties: ["result-idx": "integer"]}, {name: "1", value: 1, type: 0, properties: ["1": "literal"]} run/0: ingredient 0 is result-idx mem/0: location 1019 is 4 run/0: ingredient 1 is 1 run/0: product 0 is 5 mem/0: storing 5 in location 1019 run/0: instruction interpolate/41 +run/0: loop {name: "", value: -8, type: , properties: ["": ]} run/0: ingredient 0 is -8 run/0: jumping to instruction 34 run/0: instruction interpolate/34 +run/0: {name: "arg-done?", value: 15, type: 3, properties: ["arg-done?": "boolean"]} <- greater-or-equal {name: "j", value: 14, type: 1, properties: ["j": "integer"]}, {name: "a-len", value: 6, type: 1, properties: ["a-len": "integer"]} run/0: ingredient 0 is j mem/0: location 1025 is 1 run/0: ingredient 1 is a-len @@ -424,10 +501,12 @@ mem/0: location 1017 is 3 run/0: product 0 is 0 mem/0: storing 0 in location 1026 run/0: instruction interpolate/35 +run/0: break-if {name: "arg-done?", value: 15, type: 3, properties: ["arg-done?": "boolean"]}, {name: "", value: 6, type: , properties: ["": ]} mem/0: location 1026 is 0 run/0: ingredient 0 is 0 run/0: jump-if fell through run/0: instruction interpolate/36 +run/0: {name: "in", value: 11, type: 4, properties: ["in": "character"]} <- index {name: "a", value: 4, type: 2-5-4, properties: ["a": "address":"array":"character", "deref": ]}, {name: "j", value: 14, type: 1, properties: ["j": "integer"]} run/0: ingredient 0 is {name: "a", value: 4, type: 2-5-4, properties: ["a": "address":"array":"character", "deref": ]} mem/0: location 1015 is 1006 run/0: ingredient 1 is {name: "j", value: 14, type: 1, properties: ["j": "integer"]} @@ -438,6 +517,7 @@ mem/0: location 1008 is 101 run/0: product 0 is 101 mem/0: storing 101 in location 1022 run/0: instruction interpolate/37 +run/0: {name: "out", value: 13, type: 2-4, properties: ["out": "address":"character"]} <- index-address {name: "result", value: 7, type: 2-5-4, properties: ["result": "address":"array":"character", "deref": ]}, {name: "result-idx", value: 8, type: 1, properties: ["result-idx": "integer"]} run/0: ingredient 0 is result mem/0: location 1018 is 1070 run/0: ingredient 1 is {name: "result-idx", value: 8, type: 1, properties: ["result-idx": "integer"]} @@ -446,26 +526,31 @@ run/0: address to copy is 1076 run/0: product 0 is 1076 mem/0: storing 1076 in location 1024 run/0: instruction interpolate/38 +run/0: {name: "out", value: 13, type: 2-4, properties: ["out": "address":"character", "deref": ]} <- copy {name: "in", value: 11, type: 4, properties: ["in": "character"]} run/0: ingredient 0 is in mem/0: location 1022 is 101 mem/0: location 1024 is 1076 mem/0: storing 101 in location 1076 run/0: instruction interpolate/39 +run/0: {name: "j", value: 14, type: 1, properties: ["j": "integer"]} <- add {name: "j", value: 14, type: 1, properties: ["j": "integer"]}, {name: "1", value: 1, type: 0, properties: ["1": "literal"]} run/0: ingredient 0 is j mem/0: location 1025 is 1 run/0: ingredient 1 is 1 run/0: product 0 is 2 mem/0: storing 2 in location 1025 run/0: instruction interpolate/40 +run/0: {name: "result-idx", value: 8, type: 1, properties: ["result-idx": "integer"]} <- add {name: "result-idx", value: 8, type: 1, properties: ["result-idx": "integer"]}, {name: "1", value: 1, type: 0, properties: ["1": "literal"]} run/0: ingredient 0 is result-idx mem/0: location 1019 is 5 run/0: ingredient 1 is 1 run/0: product 0 is 6 mem/0: storing 6 in location 1019 run/0: instruction interpolate/41 +run/0: loop {name: "", value: -8, type: , properties: ["": ]} run/0: ingredient 0 is -8 run/0: jumping to instruction 34 run/0: instruction interpolate/34 +run/0: {name: "arg-done?", value: 15, type: 3, properties: ["arg-done?": "boolean"]} <- greater-or-equal {name: "j", value: 14, type: 1, properties: ["j": "integer"]}, {name: "a-len", value: 6, type: 1, properties: ["a-len": "integer"]} run/0: ingredient 0 is j mem/0: location 1025 is 2 run/0: ingredient 1 is a-len @@ -473,10 +558,12 @@ mem/0: location 1017 is 3 run/0: product 0 is 0 mem/0: storing 0 in location 1026 run/0: instruction interpolate/35 +run/0: break-if {name: "arg-done?", value: 15, type: 3, properties: ["arg-done?": "boolean"]}, {name: "", value: 6, type: , properties: ["": ]} mem/0: location 1026 is 0 run/0: ingredient 0 is 0 run/0: jump-if fell through run/0: instruction interpolate/36 +run/0: {name: "in", value: 11, type: 4, properties: ["in": "character"]} <- index {name: "a", value: 4, type: 2-5-4, properties: ["a": "address":"array":"character", "deref": ]}, {name: "j", value: 14, type: 1, properties: ["j": "integer"]} run/0: ingredient 0 is {name: "a", value: 4, type: 2-5-4, properties: ["a": "address":"array":"character", "deref": ]} mem/0: location 1015 is 1006 run/0: ingredient 1 is {name: "j", value: 14, type: 1, properties: ["j": "integer"]} @@ -487,6 +574,7 @@ mem/0: location 1009 is 102 run/0: product 0 is 102 mem/0: storing 102 in location 1022 run/0: instruction interpolate/37 +run/0: {name: "out", value: 13, type: 2-4, properties: ["out": "address":"character"]} <- index-address {name: "result", value: 7, type: 2-5-4, properties: ["result": "address":"array":"character", "deref": ]}, {name: "result-idx", value: 8, type: 1, properties: ["result-idx": "integer"]} run/0: ingredient 0 is result mem/0: location 1018 is 1070 run/0: ingredient 1 is {name: "result-idx", value: 8, type: 1, properties: ["result-idx": "integer"]} @@ -495,26 +583,31 @@ run/0: address to copy is 1077 run/0: product 0 is 1077 mem/0: storing 1077 in location 1024 run/0: instruction interpolate/38 +run/0: {name: "out", value: 13, type: 2-4, properties: ["out": "address":"character", "deref": ]} <- copy {name: "in", value: 11, type: 4, properties: ["in": "character"]} run/0: ingredient 0 is in mem/0: location 1022 is 102 mem/0: location 1024 is 1077 mem/0: storing 102 in location 1077 run/0: instruction interpolate/39 +run/0: {name: "j", value: 14, type: 1, properties: ["j": "integer"]} <- add {name: "j", value: 14, type: 1, properties: ["j": "integer"]}, {name: "1", value: 1, type: 0, properties: ["1": "literal"]} run/0: ingredient 0 is j mem/0: location 1025 is 2 run/0: ingredient 1 is 1 run/0: product 0 is 3 mem/0: storing 3 in location 1025 run/0: instruction interpolate/40 +run/0: {name: "result-idx", value: 8, type: 1, properties: ["result-idx": "integer"]} <- add {name: "result-idx", value: 8, type: 1, properties: ["result-idx": "integer"]}, {name: "1", value: 1, type: 0, properties: ["1": "literal"]} run/0: ingredient 0 is result-idx mem/0: location 1019 is 6 run/0: ingredient 1 is 1 run/0: product 0 is 7 mem/0: storing 7 in location 1019 run/0: instruction interpolate/41 +run/0: loop {name: "", value: -8, type: , properties: ["": ]} run/0: ingredient 0 is -8 run/0: jumping to instruction 34 run/0: instruction interpolate/34 +run/0: {name: "arg-done?", value: 15, type: 3, properties: ["arg-done?": "boolean"]} <- greater-or-equal {name: "j", value: 14, type: 1, properties: ["j": "integer"]}, {name: "a-len", value: 6, type: 1, properties: ["a-len": "integer"]} run/0: ingredient 0 is j mem/0: location 1025 is 3 run/0: ingredient 1 is a-len @@ -522,27 +615,33 @@ mem/0: location 1017 is 3 run/0: product 0 is 1 mem/0: storing 1 in location 1026 run/0: instruction interpolate/35 +run/0: break-if {name: "arg-done?", value: 15, type: 3, properties: ["arg-done?": "boolean"]}, {name: "", value: 6, type: , properties: ["": ]} mem/0: location 1026 is 1 run/0: ingredient 0 is 1 run/0: ingredient 1 is run/0: jumping to instruction 42 run/0: instruction interpolate/43 +run/0: {name: "i", value: 9, type: 1, properties: ["i": "integer"]} <- add {name: "i", value: 9, type: 1, properties: ["i": "integer"]}, {name: "1", value: 1, type: 0, properties: ["1": "literal"]} run/0: ingredient 0 is i mem/0: location 1020 is 4 run/0: ingredient 1 is 1 run/0: product 0 is 5 mem/0: storing 5 in location 1020 run/0: instruction interpolate/44 +run/0: loop {name: "", value: -27, type: , properties: ["": ]} run/0: ingredient 0 is -27 run/0: jumping to instruction 18 run/0: instruction interpolate/18 +run/0: {name: "a", value: 4, type: 2-5-4, properties: ["a": "address":"array":"character"]}, {name: "arg-received?", value: 5, type: 3, properties: ["arg-received?": "boolean"]} <- next-ingredient mem/0: storing 0 in location 1016 run/0: instruction interpolate/19 +run/0: break-unless {name: "arg-received?", value: 5, type: 3, properties: ["arg-received?": "boolean"]}, {name: "", value: 25, type: , properties: ["": ]} mem/0: location 1016 is 0 run/0: ingredient 0 is 0 run/0: ingredient 1 is run/0: jumping to instruction 45 run/0: instruction interpolate/47 +run/0: {name: "tem-done?", value: 10, type: 3, properties: ["tem-done?": "boolean"]} <- greater-or-equal {name: "i", value: 9, type: 1, properties: ["i": "integer"]}, {name: "tem-len", value: 2, type: 1, properties: ["tem-len": "integer"]} run/0: ingredient 0 is i mem/0: location 1020 is 5 run/0: ingredient 1 is tem-len @@ -550,15 +649,18 @@ mem/0: location 1013 is 5 run/0: product 0 is 1 mem/0: storing 1 in location 1021 run/0: instruction interpolate/48 +run/0: break-if {name: "tem-done?", value: 10, type: 3, properties: ["tem-done?": "boolean"]}, {name: "", value: 6, type: , properties: ["": ]} mem/0: location 1021 is 1 run/0: ingredient 0 is 1 run/0: ingredient 1 is run/0: jumping to instruction 55 run/0: instruction interpolate/56 +run/0: reply {name: "result", value: 7, type: 2-5-4, properties: ["result": "address":"array":"character"]} mem/0: location 1018 is 1070 run/0: result 0 is 1070 mem/0: storing 1070 in location 3 run/0: instruction test-interpolate-works/3 +run/0: {name: "4", value: 4, type: 5-4, properties: ["4": "array":"character", "raw": ]} <- copy {name: "3", value: 3, type: 2-5-4, properties: ["3": "address":"array":"character", "raw": , "deref": ]} run/0: ingredient 0 is 3 mem/0: location 3 is 1070 mem/0: location 1070 is 7 diff --git a/cpp/.traces/jump_backward b/cpp/.traces/jump_backward index 524894a7..4de52a27 100644 --- a/cpp/.traces/jump_backward +++ b/cpp/.traces/jump_backward @@ -11,11 +11,14 @@ after-brace/0: jump ... new/0: routine allocated memory from 1000 to 101000 schedule/0: main run/0: instruction main/0 +run/0: jump {name: "1", value: 1, type: 0, properties: ["1": "offset"]} run/0: ingredient 0 is 1 run/0: jumping to instruction 2 run/0: instruction main/2 +run/0: jump {name: "-2", value: -2, type: 0, properties: ["-2": "offset"]} run/0: ingredient 0 is -2 run/0: jumping to instruction 1 run/0: instruction main/1 +run/0: jump {name: "1", value: 1, type: 0, properties: ["1": "offset"]} run/0: ingredient 0 is 1 run/0: jumping to instruction 3 diff --git a/cpp/.traces/jump_can_skip_instructions b/cpp/.traces/jump_can_skip_instructions index ced4b32e..6bfdce8b 100644 --- a/cpp/.traces/jump_can_skip_instructions +++ b/cpp/.traces/jump_can_skip_instructions @@ -9,5 +9,6 @@ after-brace/0: copy ... new/0: routine allocated memory from 1000 to 101000 schedule/0: main run/0: instruction main/0 +run/0: jump {name: "1", value: 1, type: 0, properties: ["1": "offset"]} run/0: ingredient 0 is 1 run/0: jumping to instruction 2 diff --git a/cpp/.traces/jump_if b/cpp/.traces/jump_if index 9e63fab6..b01ed9dd 100644 --- a/cpp/.traces/jump_if +++ b/cpp/.traces/jump_if @@ -10,6 +10,7 @@ after-brace/0: copy ... new/0: routine allocated memory from 1000 to 101000 schedule/0: main run/0: instruction main/0 +run/0: jump-if {name: "999", value: 999, type: 0, properties: ["999": "literal"]}, {name: "1", value: 1, type: 0, properties: ["1": "offset"]} run/0: ingredient 0 is 999 run/0: ingredient 1 is 1 run/0: jumping to instruction 2 diff --git a/cpp/.traces/jump_if_fallthrough b/cpp/.traces/jump_if_fallthrough index a3b5e347..d87703c0 100644 --- a/cpp/.traces/jump_if_fallthrough +++ b/cpp/.traces/jump_if_fallthrough @@ -10,8 +10,10 @@ after-brace/0: copy ... new/0: routine allocated memory from 1000 to 101000 schedule/0: main run/0: instruction main/0 +run/0: jump-if {name: "0", value: 0, type: 0, properties: ["0": "literal"]}, {name: "1", value: 1, type: 0, properties: ["1": "offset"]} run/0: ingredient 0 is 0 run/0: jump-if fell through run/0: instruction main/1 +run/0: {name: "123", value: 123, type: 1, properties: ["123": "integer"]} <- copy {name: "1", value: 1, type: 0, properties: ["1": "literal"]} run/0: ingredient 0 is 1 mem/0: storing 1 in location 123 diff --git a/cpp/.traces/jump_unless b/cpp/.traces/jump_unless index 31055471..5c986093 100644 --- a/cpp/.traces/jump_unless +++ b/cpp/.traces/jump_unless @@ -10,6 +10,7 @@ after-brace/0: copy ... new/0: routine allocated memory from 1000 to 101000 schedule/0: main run/0: instruction main/0 +run/0: jump-unless {name: "0", value: 0, type: 0, properties: ["0": "literal"]}, {name: "1", value: 1, type: 0, properties: ["1": "offset"]} run/0: ingredient 0 is 0 run/0: ingredient 1 is 1 run/0: jumping to instruction 2 diff --git a/cpp/.traces/jump_unless_fallthrough b/cpp/.traces/jump_unless_fallthrough index 0785e2d0..b54b5c18 100644 --- a/cpp/.traces/jump_unless_fallthrough +++ b/cpp/.traces/jump_unless_fallthrough @@ -10,8 +10,10 @@ after-brace/0: copy ... new/0: routine allocated memory from 1000 to 101000 schedule/0: main run/0: instruction main/0 +run/0: jump-unless {name: "999", value: 999, type: 0, properties: ["999": "literal"]}, {name: "1", value: 1, type: 0, properties: ["1": "offset"]} run/0: ingredient 0 is 999 run/0: jump-unless fell through run/0: instruction main/1 +run/0: {name: "123", value: 123, type: 1, properties: ["123": "integer"]} <- copy {name: "1", value: 1, type: 0, properties: ["1": "literal"]} run/0: ingredient 0 is 1 mem/0: storing 1 in location 123 diff --git a/cpp/.traces/lesser_or_equal b/cpp/.traces/lesser_or_equal index 803ee048..a8f225ec 100644 --- a/cpp/.traces/lesser_or_equal +++ b/cpp/.traces/lesser_or_equal @@ -15,12 +15,15 @@ after-brace/0: lesser-or-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: 1, properties: ["1": "integer"]} <- copy {name: "32", value: 32, type: 0, properties: ["32": "literal"]} run/0: ingredient 0 is 32 mem/0: storing 32 in location 1 run/0: instruction main/1 +run/0: {name: "2", value: 2, type: 1, properties: ["2": "integer"]} <- copy {name: "33", value: 33, type: 0, properties: ["33": "literal"]} run/0: ingredient 0 is 33 mem/0: storing 33 in location 2 run/0: instruction main/2 +run/0: {name: "3", value: 3, type: 1, properties: ["3": "integer"]} <- lesser-or-equal {name: "1", value: 1, type: 1, properties: ["1": "integer"]}, {name: "2", value: 2, type: 1, properties: ["2": "integer"]} run/0: ingredient 0 is 1 mem/0: location 1 is 32 run/0: ingredient 1 is 2 diff --git a/cpp/.traces/lesser_or_equal2 b/cpp/.traces/lesser_or_equal2 index 306bb53f..a7ee1aff 100644 --- a/cpp/.traces/lesser_or_equal2 +++ b/cpp/.traces/lesser_or_equal2 @@ -15,12 +15,15 @@ after-brace/0: lesser-or-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: 1, properties: ["1": "integer"]} <- copy {name: "33", value: 33, type: 0, properties: ["33": "literal"]} run/0: ingredient 0 is 33 mem/0: storing 33 in location 1 run/0: instruction main/1 +run/0: {name: "2", value: 2, type: 1, properties: ["2": "integer"]} <- copy {name: "33", value: 33, type: 0, properties: ["33": "literal"]} run/0: ingredient 0 is 33 mem/0: storing 33 in location 2 run/0: instruction main/2 +run/0: {name: "3", value: 3, type: 1, properties: ["3": "integer"]} <- lesser-or-equal {name: "1", value: 1, type: 1, properties: ["1": "integer"]}, {name: "2", value: 2, type: 1, properties: ["2": "integer"]} run/0: ingredient 0 is 1 mem/0: location 1 is 33 run/0: ingredient 1 is 2 diff --git a/cpp/.traces/lesser_or_equal3 b/cpp/.traces/lesser_or_equal3 index 73148c77..027d1458 100644 --- a/cpp/.traces/lesser_or_equal3 +++ b/cpp/.traces/lesser_or_equal3 @@ -15,12 +15,15 @@ after-brace/0: lesser-or-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: 1, properties: ["1": "integer"]} <- copy {name: "34", value: 34, type: 0, properties: ["34": "literal"]} run/0: ingredient 0 is 34 mem/0: storing 34 in location 1 run/0: instruction main/1 +run/0: {name: "2", value: 2, type: 1, properties: ["2": "integer"]} <- copy {name: "33", value: 33, type: 0, properties: ["33": "literal"]} run/0: ingredient 0 is 33 mem/0: storing 33 in location 2 run/0: instruction main/2 +run/0: {name: "3", value: 3, type: 1, properties: ["3": "integer"]} <- lesser-or-equal {name: "1", value: 1, type: 1, properties: ["1": "integer"]}, {name: "2", value: 2, type: 1, properties: ["2": "integer"]} run/0: ingredient 0 is 1 mem/0: location 1 is 34 run/0: ingredient 1 is 2 diff --git a/cpp/.traces/lesser_than b/cpp/.traces/lesser_than index 9295dc29..ccac221d 100644 --- a/cpp/.traces/lesser_than +++ b/cpp/.traces/lesser_than @@ -15,12 +15,15 @@ after-brace/0: lesser-than ... new/0: routine allocated memory from 1000 to 101000 schedule/0: main run/0: instruction main/0 +run/0: {name: "1", value: 1, type: 1, properties: ["1": "integer"]} <- copy {name: "32", value: 32, type: 0, properties: ["32": "literal"]} run/0: ingredient 0 is 32 mem/0: storing 32 in location 1 run/0: instruction main/1 +run/0: {name: "2", value: 2, type: 1, properties: ["2": "integer"]} <- copy {name: "33", value: 33, type: 0, properties: ["33": "literal"]} run/0: ingredient 0 is 33 mem/0: storing 33 in location 2 run/0: instruction main/2 +run/0: {name: "3", value: 3, type: 1, properties: ["3": "integer"]} <- lesser-than {name: "1", value: 1, type: 1, properties: ["1": "integer"]}, {name: "2", value: 2, type: 1, properties: ["2": "integer"]} run/0: ingredient 0 is 1 mem/0: location 1 is 32 run/0: ingredient 1 is 2 diff --git a/cpp/.traces/lesser_than2 b/cpp/.traces/lesser_than2 index cb26c302..bddf9eff 100644 --- a/cpp/.traces/lesser_than2 +++ b/cpp/.traces/lesser_than2 @@ -15,12 +15,15 @@ after-brace/0: lesser-than ... new/0: routine allocated memory from 1000 to 101000 schedule/0: main run/0: instruction main/0 +run/0: {name: "1", value: 1, type: 1, properties: ["1": "integer"]} <- copy {name: "34", value: 34, type: 0, properties: ["34": "literal"]} run/0: ingredient 0 is 34 mem/0: storing 34 in location 1 run/0: instruction main/1 +run/0: {name: "2", value: 2, type: 1, properties: ["2": "integer"]} <- copy {name: "33", value: 33, type: 0, properties: ["33": "literal"]} run/0: ingredient 0 is 33 mem/0: storing 33 in location 2 run/0: instruction main/2 +run/0: {name: "3", value: 3, type: 1, properties: ["3": "integer"]} <- lesser-than {name: "1", value: 1, type: 1, properties: ["1": "integer"]}, {name: "2", value: 2, type: 1, properties: ["2": "integer"]} run/0: ingredient 0 is 1 mem/0: location 1 is 34 run/0: ingredient 1 is 2 diff --git a/cpp/.traces/maybe_convert b/cpp/.traces/maybe_convert index 3baed6d3..adb8ebe7 100644 --- a/cpp/.traces/maybe_convert +++ b/cpp/.traces/maybe_convert @@ -19,15 +19,19 @@ after-brace/0: maybe-convert ... new/0: routine allocated memory from 1000 to 101000 schedule/0: main run/0: instruction main/0 +run/0: {name: "12", value: 12, type: 1, properties: ["12": "integer"]} <- copy {name: "1", value: 1, type: 0, properties: ["1": "literal"]} run/0: ingredient 0 is 1 mem/0: storing 1 in location 12 run/0: instruction main/1 +run/0: {name: "13", value: 13, type: 1, properties: ["13": "integer"]} <- copy {name: "35", value: 35, type: 0, properties: ["35": "literal"]} run/0: ingredient 0 is 35 mem/0: storing 35 in location 13 run/0: instruction main/2 +run/0: {name: "14", value: 14, type: 1, properties: ["14": "integer"]} <- copy {name: "36", value: 36, type: 0, properties: ["36": "literal"]} run/0: ingredient 0 is 36 mem/0: storing 36 in location 14 run/0: instruction main/3 +run/0: {name: "20", value: 20, type: 2-6, properties: ["20": "address":"point"]} <- maybe-convert {name: "12", value: 12, type: 8, properties: ["12": "integer-or-point"]}, {name: "1", value: 1, type: 0, properties: ["1": "variant"]} run/0: ingredient 0 is 12 run/0: ingredient 1 is 1 mem/0: storing 13 in location 20 diff --git a/cpp/.traces/maybe_convert_fail b/cpp/.traces/maybe_convert_fail index b2b3c83a..31922135 100644 --- a/cpp/.traces/maybe_convert_fail +++ b/cpp/.traces/maybe_convert_fail @@ -19,15 +19,19 @@ after-brace/0: maybe-convert ... new/0: routine allocated memory from 1000 to 101000 schedule/0: main run/0: instruction main/0 +run/0: {name: "12", value: 12, type: 1, properties: ["12": "integer"]} <- copy {name: "1", value: 1, type: 0, properties: ["1": "literal"]} run/0: ingredient 0 is 1 mem/0: storing 1 in location 12 run/0: instruction main/1 +run/0: {name: "13", value: 13, type: 1, properties: ["13": "integer"]} <- copy {name: "35", value: 35, type: 0, properties: ["35": "literal"]} run/0: ingredient 0 is 35 mem/0: storing 35 in location 13 run/0: instruction main/2 +run/0: {name: "14", value: 14, type: 1, properties: ["14": "integer"]} <- copy {name: "36", value: 36, type: 0, properties: ["36": "literal"]} run/0: ingredient 0 is 36 mem/0: storing 36 in location 14 run/0: instruction main/3 +run/0: {name: "20", value: 20, type: 2-6, properties: ["20": "address":"point"]} <- maybe-convert {name: "12", value: 12, type: 8, properties: ["12": "integer-or-point"]}, {name: "0", value: 0, type: 0, properties: ["0": "variant"]} run/0: ingredient 0 is 12 run/0: ingredient 1 is 0 mem/0: storing 0 in location 20 diff --git a/cpp/.traces/maybe_convert_named b/cpp/.traces/maybe_convert_named index f0576fe3..3444a65f 100644 --- a/cpp/.traces/maybe_convert_named +++ b/cpp/.traces/maybe_convert_named @@ -20,15 +20,19 @@ after-brace/0: maybe-convert ... new/0: routine allocated memory from 1000 to 101000 schedule/0: main run/0: instruction main/0 +run/0: {name: "12", value: 12, type: 1, properties: ["12": "integer"]} <- copy {name: "1", value: 1, type: 0, properties: ["1": "literal"]} run/0: ingredient 0 is 1 mem/0: storing 1 in location 12 run/0: instruction main/1 +run/0: {name: "13", value: 13, type: 1, properties: ["13": "integer"]} <- copy {name: "35", value: 35, type: 0, properties: ["35": "literal"]} run/0: ingredient 0 is 35 mem/0: storing 35 in location 13 run/0: instruction main/2 +run/0: {name: "14", value: 14, type: 1, properties: ["14": "integer"]} <- copy {name: "36", value: 36, type: 0, properties: ["36": "literal"]} run/0: ingredient 0 is 36 mem/0: storing 36 in location 14 run/0: instruction main/3 +run/0: {name: "20", value: 20, type: 2-6, properties: ["20": "address":"point"]} <- maybe-convert {name: "12", value: 12, type: 8, properties: ["12": "integer-or-point"]}, {name: "p", value: 1, type: 0, properties: ["p": "variant"]} run/0: ingredient 0 is 12 run/0: ingredient 1 is p mem/0: storing 13 in location 20 diff --git a/cpp/.traces/multiply b/cpp/.traces/multiply index 74c0c818..85425656 100644 --- a/cpp/.traces/multiply +++ b/cpp/.traces/multiply @@ -15,12 +15,15 @@ after-brace/0: multiply ... new/0: routine allocated memory from 1000 to 101000 schedule/0: main run/0: instruction main/0 +run/0: {name: "1", value: 1, type: 1, properties: ["1": "integer"]} <- copy {name: "4", value: 4, type: 0, properties: ["4": "literal"]} run/0: ingredient 0 is 4 mem/0: storing 4 in location 1 run/0: instruction main/1 +run/0: {name: "2", value: 2, type: 1, properties: ["2": "integer"]} <- copy {name: "6", value: 6, type: 0, properties: ["6": "literal"]} run/0: ingredient 0 is 6 mem/0: storing 6 in location 2 run/0: instruction main/2 +run/0: {name: "3", value: 3, type: 1, properties: ["3": "integer"]} <- multiply {name: "1", value: 1, type: 1, properties: ["1": "integer"]}, {name: "2", value: 2, type: 1, properties: ["2": "integer"]} run/0: ingredient 0 is 1 mem/0: location 1 is 4 run/0: ingredient 1 is 2 diff --git a/cpp/.traces/multiply_literal b/cpp/.traces/multiply_literal index 20701f9b..cd240a9a 100644 --- a/cpp/.traces/multiply_literal +++ b/cpp/.traces/multiply_literal @@ -7,6 +7,7 @@ after-brace/0: multiply ... new/0: routine allocated memory from 1000 to 101000 schedule/0: main run/0: instruction main/0 +run/0: {name: "1", value: 1, type: 1, properties: ["1": "integer"]} <- multiply {name: "2", value: 2, type: 0, properties: ["2": "literal"]}, {name: "3", value: 3, type: 0, properties: ["3": "literal"]} run/0: ingredient 0 is 2 run/0: ingredient 1 is 3 run/0: ingredient 1 is 3 diff --git a/cpp/.traces/new b/cpp/.traces/new index fdb33f1d..0ec29cd9 100644 --- a/cpp/.traces/new +++ b/cpp/.traces/new @@ -17,12 +17,15 @@ 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 {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 {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 +run/0: {name: "3", value: 3, type: 3, properties: ["3": "boolean", "raw": ]} <- equal {name: "1", value: 1, type: 2-1, properties: ["1": "address":"integer", "raw": ]}, {name: "2", value: 2, type: 2-1, properties: ["2": "address":"integer", "raw": ]} run/0: ingredient 0 is 1 mem/0: location 1 is 1000 run/0: ingredient 1 is 2 diff --git a/cpp/.traces/new_array b/cpp/.traces/new_array index e692fc38..1cf28797 100644 --- a/cpp/.traces/new_array +++ b/cpp/.traces/new_array @@ -18,13 +18,16 @@ 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 {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 {name: "integer", value: 1, type: 0, properties: ["integer": "type"]} mem/0: new alloc: 1005 mem/0: storing 1005 in location 2 run/0: instruction main/2 +run/0: {name: "3", value: 3, type: 1, properties: ["3": "integer", "raw": ]} <- subtract {name: "2", value: 2, type: 2-1, properties: ["2": "address":"integer", "raw": ]}, {name: "1", value: 1, type: 2-5-1, properties: ["1": "address":"array":"integer", "raw": ]} run/0: ingredient 0 is 2 mem/0: location 2 is 1005 run/0: ingredient 1 is 1 diff --git a/cpp/.traces/new_concurrent b/cpp/.traces/new_concurrent index 4f9f5327..a21c2fe6 100644 --- a/cpp/.traces/new_concurrent +++ b/cpp/.traces/new_concurrent @@ -21,16 +21,20 @@ after-brace/0: equal ... new/0: routine allocated memory from 1000 to 101000 schedule/0: f1 run/0: instruction f1/0 +run/0: run {name: "f2", value: 0, type: 0, properties: ["f2": "recipe"]} 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 {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 {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 +run/0: {name: "3", value: 3, type: 3, properties: ["3": "boolean", "raw": ]} <- equal {name: "1", value: 1, type: 2-1, properties: ["1": "address":"integer", "raw": ]}, {name: "2", value: 2, type: 2-1, properties: ["2": "address":"integer", "raw": ]} run/0: ingredient 0 is 1 mem/0: location 1 is 1000 run/0: ingredient 1 is 2 diff --git a/cpp/.traces/new_overflow b/cpp/.traces/new_overflow index 35cdb690..1e41e693 100644 --- a/cpp/.traces/new_overflow +++ b/cpp/.traces/new_overflow @@ -12,9 +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 {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 {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 diff --git a/cpp/.traces/new_string b/cpp/.traces/new_string index 3cfa1d7c..d926b829 100644 --- a/cpp/.traces/new_string +++ b/cpp/.traces/new_string @@ -12,8 +12,10 @@ 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 {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 {name: "1", value: 1, type: 2-5-4, properties: ["1": "address":"array":"character", "deref": ]}, {name: "5", value: 5, type: 0, properties: ["5": "literal"]} run/0: ingredient 0 is {name: "1", value: 1, type: 2-5-4, properties: ["1": "address":"array":"character", "deref": ]} mem/0: location 1 is 1000 run/0: ingredient 1 is {name: "5", value: 5, type: 0, properties: ["5": "literal"]} diff --git a/cpp/.traces/next_ingredient b/cpp/.traces/next_ingredient index bcc3bfed..0b91ebf7 100644 --- a/cpp/.traces/next_ingredient +++ b/cpp/.traces/next_ingredient @@ -14,10 +14,13 @@ after-brace/0: add ... new/0: routine allocated memory from 1000 to 101000 schedule/0: main run/0: instruction main/0 +run/0: f {name: "2", value: 2, type: 0, properties: ["2": "literal"]} run/0: instruction f/0 +run/0: {name: "12", value: 12, type: 1, properties: ["12": "integer"]} <- next-ingredient run/0: product 0 is 2 mem/0: storing 2 in location 12 run/0: instruction f/1 +run/0: {name: "13", value: 13, type: 1, properties: ["13": "integer"]} <- add {name: "1", value: 1, type: 0, properties: ["1": "literal"]}, {name: "12", value: 12, type: 1, properties: ["12": "integer"]} run/0: ingredient 0 is 1 run/0: ingredient 1 is 12 mem/0: location 12 is 2 diff --git a/cpp/.traces/next_ingredient_missing b/cpp/.traces/next_ingredient_missing index cc1c6d42..06f8e65c 100644 --- a/cpp/.traces/next_ingredient_missing +++ b/cpp/.traces/next_ingredient_missing @@ -9,5 +9,7 @@ after-brace/0: next-ingredient ... new/0: routine allocated memory from 1000 to 101000 schedule/0: main run/0: instruction main/0 +run/0: f run/0: instruction f/0 +run/0: {name: "_", value: 0, type: 0, properties: ["_": "dummy"]}, {name: "12", value: 12, type: 1, properties: ["12": "integer"]} <- next-ingredient mem/0: storing 0 in location 12 diff --git a/cpp/.traces/not b/cpp/.traces/not index 81962f94..24db029f 100644 --- a/cpp/.traces/not +++ b/cpp/.traces/not @@ -10,9 +10,11 @@ after-brace/0: not ... new/0: routine allocated memory from 1000 to 101000 schedule/0: main run/0: instruction main/0 +run/0: {name: "1", value: 1, type: 1, properties: ["1": "integer"]} <- copy {name: "1", value: 1, type: 0, properties: ["1": "literal"]} run/0: ingredient 0 is 1 mem/0: storing 1 in location 1 run/0: instruction main/1 +run/0: {name: "2", value: 2, type: 1, properties: ["2": "integer"]} <- not {name: "1", value: 1, type: 1, properties: ["1": "integer"]} run/0: ingredient 0 is 1 mem/0: location 1 is 1 run/0: product 0 is 0 diff --git a/cpp/.traces/or b/cpp/.traces/or index 422558bc..50a78dee 100644 --- a/cpp/.traces/or +++ b/cpp/.traces/or @@ -15,12 +15,15 @@ after-brace/0: or ... new/0: routine allocated memory from 1000 to 101000 schedule/0: main run/0: instruction main/0 +run/0: {name: "1", value: 1, type: 1, properties: ["1": "integer"]} <- copy {name: "1", value: 1, type: 0, properties: ["1": "literal"]} run/0: ingredient 0 is 1 mem/0: storing 1 in location 1 run/0: instruction main/1 +run/0: {name: "2", value: 2, type: 1, properties: ["2": "integer"]} <- copy {name: "0", value: 0, type: 0, properties: ["0": "literal"]} run/0: ingredient 0 is 0 mem/0: storing 0 in location 2 run/0: instruction main/2 +run/0: {name: "3", value: 3, type: 1, properties: ["3": "integer"]} <- or {name: "1", value: 1, type: 1, properties: ["1": "integer"]}, {name: "2", value: 2, type: 1, properties: ["2": "integer"]} run/0: ingredient 0 is 1 mem/0: location 1 is 1 run/0: ingredient 1 is 2 diff --git a/cpp/.traces/reply b/cpp/.traces/reply index 4793d27c..de83831a 100644 --- a/cpp/.traces/reply +++ b/cpp/.traces/reply @@ -20,16 +20,20 @@ after-brace/0: reply ... new/0: routine allocated memory from 1000 to 101000 schedule/0: main run/0: instruction main/0 +run/0: {name: "3", value: 3, type: 1, properties: ["3": "integer"]}, {name: "4", value: 4, type: 1, properties: ["4": "integer"]} <- f {name: "2", value: 2, type: 0, properties: ["2": "literal"]} run/0: instruction f/0 +run/0: {name: "12", value: 12, type: 1, properties: ["12": "integer"]} <- next-ingredient run/0: product 0 is 2 mem/0: storing 2 in location 12 run/0: instruction f/1 +run/0: {name: "13", value: 13, type: 1, properties: ["13": "integer"]} <- add {name: "1", value: 1, type: 0, properties: ["1": "literal"]}, {name: "12", value: 12, type: 1, properties: ["12": "integer"]} run/0: ingredient 0 is 1 run/0: ingredient 1 is 12 mem/0: location 12 is 2 run/0: product 0 is 3 mem/0: storing 3 in location 13 run/0: instruction f/2 +run/0: reply {name: "12", value: 12, type: 1, properties: ["12": "integer"]}, {name: "13", value: 13, type: 1, properties: ["13": "integer"]} mem/0: location 12 is 2 mem/0: location 13 is 3 run/0: result 0 is 2 diff --git a/cpp/.traces/reply_container b/cpp/.traces/reply_container index c3518d49..10916f34 100644 --- a/cpp/.traces/reply_container +++ b/cpp/.traces/reply_container @@ -17,13 +17,17 @@ after-brace/0: reply ... new/0: routine allocated memory from 1000 to 101000 schedule/0: main run/0: instruction main/0 +run/0: {name: "3", value: 3, type: 6, properties: ["3": "point"]} <- f {name: "2", value: 2, type: 0, properties: ["2": "literal"]} run/0: instruction f/0 +run/0: {name: "12", value: 12, type: 1, properties: ["12": "integer"]} <- next-ingredient run/0: product 0 is 2 mem/0: storing 2 in location 12 run/0: instruction f/1 +run/0: {name: "13", value: 13, type: 1, properties: ["13": "integer"]} <- copy {name: "35", value: 35, type: 0, properties: ["35": "literal"]} run/0: ingredient 0 is 35 mem/0: storing 35 in location 13 run/0: instruction f/2 +run/0: reply {name: "12", value: 12, type: 6, properties: ["12": "point"]} mem/0: location 12 is 2 mem/0: location 13 is 35 run/0: result 0 is [2, 35] diff --git a/cpp/.traces/reply_same_as_ingredient b/cpp/.traces/reply_same_as_ingredient index ee430bd7..781da74a 100644 --- a/cpp/.traces/reply_same_as_ingredient +++ b/cpp/.traces/reply_same_as_ingredient @@ -18,14 +18,18 @@ 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 {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"]} <- test1 {name: "1", value: 1, type: 2-1, properties: ["1": "address":"integer"]} mem/0: location 1 is 1000 run/0: instruction test1/0 +run/0: {name: "10", value: 10, type: 2-1, properties: ["10": "address":"integer"]} <- next-ingredient run/0: product 0 is 1000 mem/0: storing 1000 in location 10 run/0: instruction test1/1 +run/0: reply {name: "10", value: 10, type: 2-1, properties: ["10": "address":"integer", "same-as-ingredient": "0"]} mem/0: location 10 is 1000 run/0: result 0 is 1000 warn/0: 'same-as-ingredient' result 2 must be location 1 diff --git a/cpp/.traces/return_on_fallthrough b/cpp/.traces/return_on_fallthrough index f6df99fb..60b3b79f 100644 --- a/cpp/.traces/return_on_fallthrough +++ b/cpp/.traces/return_on_fallthrough @@ -25,18 +25,24 @@ after-brace/0: copy ... new/0: routine allocated memory from 1000 to 101000 schedule/0: main run/0: instruction main/0 +run/0: f run/0: instruction f/0 +run/0: {name: "4", value: 4, type: 1, properties: ["4": "integer"]} <- copy {name: "34", value: 34, type: 0, properties: ["34": "literal"]} run/0: ingredient 0 is 34 mem/0: storing 34 in location 4 run/0: instruction f/1 +run/0: {name: "5", value: 5, type: 1, properties: ["5": "integer"]} <- copy {name: "34", value: 34, type: 0, properties: ["34": "literal"]} run/0: ingredient 0 is 34 mem/0: storing 34 in location 5 run/0: instruction main/1 +run/0: {name: "1", value: 1, type: 1, properties: ["1": "integer"]} <- copy {name: "34", value: 34, type: 0, properties: ["34": "literal"]} run/0: ingredient 0 is 34 mem/0: storing 34 in location 1 run/0: instruction main/2 +run/0: {name: "2", value: 2, type: 1, properties: ["2": "integer"]} <- copy {name: "34", value: 34, type: 0, properties: ["34": "literal"]} run/0: ingredient 0 is 34 mem/0: storing 34 in location 2 run/0: instruction main/3 +run/0: {name: "3", value: 3, type: 1, properties: ["3": "integer"]} <- copy {name: "34", value: 34, type: 0, properties: ["34": "literal"]} run/0: ingredient 0 is 34 mem/0: storing 34 in location 3 diff --git a/cpp/.traces/rewind_ingredients b/cpp/.traces/rewind_ingredients index c1231232..ffe655b3 100644 --- a/cpp/.traces/rewind_ingredients +++ b/cpp/.traces/rewind_ingredients @@ -19,13 +19,18 @@ after-brace/0: next-ingredient ... new/0: routine allocated memory from 1000 to 101000 schedule/0: main run/0: instruction main/0 +run/0: f {name: "2", value: 2, type: 0, properties: ["2": "literal"]} run/0: instruction f/0 +run/0: {name: "12", value: 12, type: 1, properties: ["12": "integer"]} <- next-ingredient run/0: product 0 is 2 mem/0: storing 2 in location 12 run/0: instruction f/1 +run/0: {name: "_", value: 0, type: 0, properties: ["_": "dummy"]}, {name: "1", value: 1, type: 3, properties: ["1": "boolean"]} <- next-ingredient mem/0: storing 0 in location 1 run/0: instruction f/2 +run/0: rewind-ingredients run/0: instruction f/3 +run/0: {name: "13", value: 13, type: 1, properties: ["13": "integer"]}, {name: "2", value: 2, type: 3, properties: ["2": "boolean"]} <- next-ingredient run/0: product 0 is 2 mem/0: storing 2 in location 13 mem/0: storing 1 in location 2 diff --git a/cpp/.traces/run_dummy b/cpp/.traces/run_dummy index 6cc72980..49ad354d 100644 --- a/cpp/.traces/run_dummy +++ b/cpp/.traces/run_dummy @@ -6,4 +6,5 @@ after-brace/0: copy ... new/0: routine allocated memory from 1000 to 101000 schedule/0: main run/0: instruction main/0 +run/0: {name: "_", value: 0, type: 0, properties: ["_": "dummy"]} <- copy {name: "0", value: 0, type: 0, properties: ["0": "literal"]} run/0: ingredient 0 is 0 diff --git a/cpp/.traces/run_label b/cpp/.traces/run_label index 60cf4bbb..4d643bd7 100644 --- a/cpp/.traces/run_label +++ b/cpp/.traces/run_label @@ -11,9 +11,11 @@ after-brace/0: copy ... new/0: routine allocated memory from 1000 to 101000 schedule/0: main run/0: instruction main/1 +run/0: {name: "1", value: 1, type: 1, properties: ["1": "integer"]} <- copy {name: "23", value: 23, type: 0, properties: ["23": "literal"]} run/0: ingredient 0 is 23 mem/0: storing 23 in location 1 run/0: instruction main/2 +run/0: {name: "2", value: 2, type: 1, properties: ["2": "integer"]} <- copy {name: "1", value: 1, type: 1, properties: ["1": "integer"]} run/0: ingredient 0 is 1 mem/0: location 1 is 23 mem/0: storing 23 in location 2 diff --git a/cpp/.traces/scheduler b/cpp/.traces/scheduler index 0a02e949..072dbcdb 100644 --- a/cpp/.traces/scheduler +++ b/cpp/.traces/scheduler @@ -14,12 +14,15 @@ after-brace/0: copy ... new/0: routine allocated memory from 1000 to 101000 schedule/0: f1 run/0: instruction f1/0 +run/0: run {name: "f2", value: 0, type: 0, properties: ["f2": "recipe"]} 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: 1, properties: ["1": "integer"]} <- copy {name: "3", value: 3, type: 0, properties: ["3": "literal"]} run/0: ingredient 0 is 3 mem/0: storing 3 in location 1 schedule/0: f2 run/0: instruction f2/0 +run/0: {name: "2", value: 2, type: 1, properties: ["2": "integer"]} <- copy {name: "4", value: 4, type: 0, properties: ["4": "literal"]} run/0: ingredient 0 is 4 mem/0: storing 4 in location 2 diff --git a/cpp/.traces/scheduler_interleaves_routines b/cpp/.traces/scheduler_interleaves_routines index 99fc8eb5..35b25d6e 100644 --- a/cpp/.traces/scheduler_interleaves_routines +++ b/cpp/.traces/scheduler_interleaves_routines @@ -22,22 +22,27 @@ after-brace/0: copy ... new/0: routine allocated memory from 1000 to 101000 schedule/0: f1 run/0: instruction f1/0 +run/0: run {name: "f2", value: 0, type: 0, properties: ["f2": "recipe"]} run/0: ingredient 0 is f2 new/0: routine allocated memory from 101000 to 201000 schedule/0: f2 run/0: instruction f2/0 +run/0: {name: "3", value: 3, type: 1, properties: ["3": "integer"]} <- copy {name: "4", value: 4, type: 0, properties: ["4": "literal"]} run/0: ingredient 0 is 4 mem/0: storing 4 in location 3 schedule/0: f1 run/0: instruction f1/1 +run/0: {name: "1", value: 1, type: 1, properties: ["1": "integer"]} <- copy {name: "0", value: 0, type: 0, properties: ["0": "literal"]} run/0: ingredient 0 is 0 mem/0: storing 0 in location 1 schedule/0: f2 run/0: instruction f2/1 +run/0: {name: "4", value: 4, type: 1, properties: ["4": "integer"]} <- copy {name: "4", value: 4, type: 0, properties: ["4": "literal"]} run/0: ingredient 0 is 4 mem/0: storing 4 in location 4 schedule/0: f1 run/0: instruction f1/2 +run/0: {name: "2", value: 2, type: 1, properties: ["2": "integer"]} <- copy {name: "0", value: 0, type: 0, properties: ["0": "literal"]} run/0: ingredient 0 is 0 mem/0: storing 0 in location 2 schedule/0: f2 diff --git a/cpp/.traces/set_default_space b/cpp/.traces/set_default_space index b1d99e84..fbaa9aec 100644 --- a/cpp/.traces/set_default_space +++ b/cpp/.traces/set_default_space @@ -14,10 +14,13 @@ after-brace/0: copy ... new/0: routine allocated memory from 1000 to 101000 schedule/0: main run/0: instruction main/0 +run/0: {name: "10", value: 10, type: 1, properties: ["10": "integer"]} <- copy {name: "5", value: 5, type: 0, properties: ["5": "literal"]} run/0: ingredient 0 is 5 mem/0: storing 5 in location 10 run/0: instruction main/1 +run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- copy {name: "10", value: 10, type: 0, properties: ["10": "literal"]} run/0: ingredient 0 is 10 run/0: instruction main/2 +run/0: {name: "1", value: 1, type: 1, properties: ["1": "integer"]} <- copy {name: "23", value: 23, type: 0, properties: ["23": "literal"]} run/0: ingredient 0 is 23 mem/0: storing 23 in location 12 diff --git a/cpp/.traces/store_indirect b/cpp/.traces/store_indirect index fc979e97..0bfc8cc6 100644 --- a/cpp/.traces/store_indirect +++ b/cpp/.traces/store_indirect @@ -10,9 +10,11 @@ after-brace/0: copy ... 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"]} <- copy {name: "2", value: 2, type: 0, properties: ["2": "literal"]} run/0: ingredient 0 is 2 mem/0: storing 2 in location 1 run/0: instruction main/1 +run/0: {name: "1", value: 1, type: 2-1, properties: ["1": "address":"integer", "deref": ]} <- copy {name: "34", value: 34, type: 0, properties: ["34": "literal"]} run/0: ingredient 0 is 34 mem/0: location 1 is 2 mem/0: storing 34 in location 2 diff --git a/cpp/.traces/string-append-1 b/cpp/.traces/string-append-1 index afdc8dcb..ce50ab28 100644 --- a/cpp/.traces/string-append-1 +++ b/cpp/.traces/string-append-1 @@ -21,28 +21,37 @@ after-brace/0: copy ... new/0: routine allocated memory from 1000 to 101000 schedule/0: test-string-append-1 run/0: instruction test-string-append-1/0 +run/0: {name: "1", value: 1, type: 2-5-4, properties: ["1": "address":"array":"character", "raw": ]} <- new {name: "hello,", value: 0, type: 0, properties: ["hello,": "literal-string"]} mem/0: storing 1000 in location 1 run/0: instruction test-string-append-1/1 +run/0: {name: "2", value: 2, type: 2-5-4, properties: ["2": "address":"array":"character", "raw": ]} <- new {name: " world!", value: 0, type: 0, properties: [" world!": "literal-string"]} mem/0: storing 1007 in location 2 run/0: instruction test-string-append-1/2 +run/0: {name: "3", value: 3, type: 2-5-4, properties: ["3": "address":"array":"character", "raw": ]} <- string-append {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 {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 +run/0: {name: "a", value: 1, type: 2-5-4, properties: ["a": "address":"array":"character"]} <- next-ingredient run/0: product 0 is 1000 mem/0: storing 1000 in location 1017 run/0: instruction string-append/2 +run/0: {name: "a-len", value: 2, type: 1, properties: ["a-len": "integer"]} <- length {name: "a", value: 1, type: 2-5-4, properties: ["a": "address":"array":"character", "deref": ]} mem/0: location 1017 is 1000 mem/0: storing 6 in location 1018 run/0: instruction string-append/3 +run/0: {name: "b", value: 3, type: 2-5-4, properties: ["b": "address":"array":"character"]} <- next-ingredient run/0: product 0 is 1007 mem/0: storing 1007 in location 1019 run/0: instruction string-append/4 +run/0: {name: "b-len", value: 4, type: 1, properties: ["b-len": "integer"]} <- length {name: "b", value: 3, type: 2-5-4, properties: ["b": "address":"array":"character", "deref": ]} mem/0: location 1019 is 1007 mem/0: storing 7 in location 1020 run/0: instruction string-append/5 +run/0: {name: "result-len", value: 5, type: 1, properties: ["result-len": "integer"]} <- add {name: "a-len", value: 2, type: 1, properties: ["a-len": "integer"]}, {name: "b-len", value: 4, type: 1, properties: ["b-len": "integer"]} run/0: ingredient 0 is a-len mem/0: location 1018 is 6 run/0: ingredient 1 is b-len @@ -50,17 +59,21 @@ 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 {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: 1045 mem/0: storing 1045 in location 1022 run/0: instruction string-append/7 +run/0: {name: "result-idx", value: 7, type: 1, properties: ["result-idx": "integer"]} <- copy {name: "0", value: 0, type: 0, properties: ["0": "literal"]} run/0: ingredient 0 is 0 mem/0: storing 0 in location 1023 run/0: instruction string-append/8 +run/0: {name: "i", value: 8, type: 1, properties: ["i": "integer"]} <- copy {name: "0", value: 0, type: 0, properties: ["0": "literal"]} run/0: ingredient 0 is 0 mem/0: storing 0 in location 1024 run/0: instruction string-append/10 +run/0: {name: "a-done?", value: 9, type: 3, properties: ["a-done?": "boolean"]} <- greater-or-equal {name: "i", value: 8, type: 1, properties: ["i": "integer"]}, {name: "a-len", value: 2, type: 1, properties: ["a-len": "integer"]} run/0: ingredient 0 is i mem/0: location 1024 is 0 run/0: ingredient 1 is a-len @@ -68,10 +81,12 @@ mem/0: location 1018 is 6 run/0: product 0 is 0 mem/0: storing 0 in location 1025 run/0: instruction string-append/11 +run/0: break-if {name: "a-done?", value: 9, type: 3, properties: ["a-done?": "boolean"]}, {name: "", value: 6, type: , properties: ["": ]} mem/0: location 1025 is 0 run/0: ingredient 0 is 0 run/0: jump-if fell through run/0: instruction string-append/12 +run/0: {name: "out", value: 10, type: 2-4, properties: ["out": "address":"character"]} <- index-address {name: "result", value: 6, type: 2-5-4, properties: ["result": "address":"array":"character", "deref": ]}, {name: "result-idx", value: 7, type: 1, properties: ["result-idx": "integer"]} run/0: ingredient 0 is result mem/0: location 1022 is 1045 run/0: ingredient 1 is {name: "result-idx", value: 7, type: 1, properties: ["result-idx": "integer"]} @@ -80,6 +95,7 @@ run/0: address to copy is 1046 run/0: product 0 is 1046 mem/0: storing 1046 in location 1026 run/0: instruction string-append/13 +run/0: {name: "in", value: 11, type: 4, properties: ["in": "character"]} <- index {name: "a", value: 1, type: 2-5-4, properties: ["a": "address":"array":"character", "deref": ]}, {name: "i", value: 8, type: 1, properties: ["i": "integer"]} run/0: ingredient 0 is {name: "a", value: 1, type: 2-5-4, properties: ["a": "address":"array":"character", "deref": ]} mem/0: location 1017 is 1000 run/0: ingredient 1 is {name: "i", value: 8, type: 1, properties: ["i": "integer"]} @@ -90,26 +106,31 @@ mem/0: location 1001 is 104 run/0: product 0 is 104 mem/0: storing 104 in location 1027 run/0: instruction string-append/14 +run/0: {name: "out", value: 10, type: 2-4, properties: ["out": "address":"character", "deref": ]} <- copy {name: "in", value: 11, type: 4, properties: ["in": "character"]} run/0: ingredient 0 is in mem/0: location 1027 is 104 mem/0: location 1026 is 1046 mem/0: storing 104 in location 1046 run/0: instruction string-append/15 +run/0: {name: "i", value: 8, type: 1, properties: ["i": "integer"]} <- add {name: "i", value: 8, type: 1, properties: ["i": "integer"]}, {name: "1", value: 1, type: 0, properties: ["1": "literal"]} run/0: ingredient 0 is i mem/0: location 1024 is 0 run/0: ingredient 1 is 1 run/0: product 0 is 1 mem/0: storing 1 in location 1024 run/0: instruction string-append/16 +run/0: {name: "result-idx", value: 7, type: 1, properties: ["result-idx": "integer"]} <- add {name: "result-idx", value: 7, type: 1, properties: ["result-idx": "integer"]}, {name: "1", value: 1, type: 0, properties: ["1": "literal"]} run/0: ingredient 0 is result-idx mem/0: location 1023 is 0 run/0: ingredient 1 is 1 run/0: product 0 is 1 mem/0: storing 1 in location 1023 run/0: instruction string-append/17 +run/0: loop {name: "", value: -8, type: , properties: ["": ]} run/0: ingredient 0 is -8 run/0: jumping to instruction 10 run/0: instruction string-append/10 +run/0: {name: "a-done?", value: 9, type: 3, properties: ["a-done?": "boolean"]} <- greater-or-equal {name: "i", value: 8, type: 1, properties: ["i": "integer"]}, {name: "a-len", value: 2, type: 1, properties: ["a-len": "integer"]} run/0: ingredient 0 is i mem/0: location 1024 is 1 run/0: ingredient 1 is a-len @@ -117,10 +138,12 @@ mem/0: location 1018 is 6 run/0: product 0 is 0 mem/0: storing 0 in location 1025 run/0: instruction string-append/11 +run/0: break-if {name: "a-done?", value: 9, type: 3, properties: ["a-done?": "boolean"]}, {name: "", value: 6, type: , properties: ["": ]} mem/0: location 1025 is 0 run/0: ingredient 0 is 0 run/0: jump-if fell through run/0: instruction string-append/12 +run/0: {name: "out", value: 10, type: 2-4, properties: ["out": "address":"character"]} <- index-address {name: "result", value: 6, type: 2-5-4, properties: ["result": "address":"array":"character", "deref": ]}, {name: "result-idx", value: 7, type: 1, properties: ["result-idx": "integer"]} run/0: ingredient 0 is result mem/0: location 1022 is 1045 run/0: ingredient 1 is {name: "result-idx", value: 7, type: 1, properties: ["result-idx": "integer"]} @@ -129,6 +152,7 @@ run/0: address to copy is 1047 run/0: product 0 is 1047 mem/0: storing 1047 in location 1026 run/0: instruction string-append/13 +run/0: {name: "in", value: 11, type: 4, properties: ["in": "character"]} <- index {name: "a", value: 1, type: 2-5-4, properties: ["a": "address":"array":"character", "deref": ]}, {name: "i", value: 8, type: 1, properties: ["i": "integer"]} run/0: ingredient 0 is {name: "a", value: 1, type: 2-5-4, properties: ["a": "address":"array":"character", "deref": ]} mem/0: location 1017 is 1000 run/0: ingredient 1 is {name: "i", value: 8, type: 1, properties: ["i": "integer"]} @@ -139,26 +163,31 @@ mem/0: location 1002 is 101 run/0: product 0 is 101 mem/0: storing 101 in location 1027 run/0: instruction string-append/14 +run/0: {name: "out", value: 10, type: 2-4, properties: ["out": "address":"character", "deref": ]} <- copy {name: "in", value: 11, type: 4, properties: ["in": "character"]} run/0: ingredient 0 is in mem/0: location 1027 is 101 mem/0: location 1026 is 1047 mem/0: storing 101 in location 1047 run/0: instruction string-append/15 +run/0: {name: "i", value: 8, type: 1, properties: ["i": "integer"]} <- add {name: "i", value: 8, type: 1, properties: ["i": "integer"]}, {name: "1", value: 1, type: 0, properties: ["1": "literal"]} run/0: ingredient 0 is i mem/0: location 1024 is 1 run/0: ingredient 1 is 1 run/0: product 0 is 2 mem/0: storing 2 in location 1024 run/0: instruction string-append/16 +run/0: {name: "result-idx", value: 7, type: 1, properties: ["result-idx": "integer"]} <- add {name: "result-idx", value: 7, type: 1, properties: ["result-idx": "integer"]}, {name: "1", value: 1, type: 0, properties: ["1": "literal"]} run/0: ingredient 0 is result-idx mem/0: location 1023 is 1 run/0: ingredient 1 is 1 run/0: product 0 is 2 mem/0: storing 2 in location 1023 run/0: instruction string-append/17 +run/0: loop {name: "", value: -8, type: , properties: ["": ]} run/0: ingredient 0 is -8 run/0: jumping to instruction 10 run/0: instruction string-append/10 +run/0: {name: "a-done?", value: 9, type: 3, properties: ["a-done?": "boolean"]} <- greater-or-equal {name: "i", value: 8, type: 1, properties: ["i": "integer"]}, {name: "a-len", value: 2, type: 1, properties: ["a-len": "integer"]} run/0: ingredient 0 is i mem/0: location 1024 is 2 run/0: ingredient 1 is a-len @@ -166,10 +195,12 @@ mem/0: location 1018 is 6 run/0: product 0 is 0 mem/0: storing 0 in location 1025 run/0: instruction string-append/11 +run/0: break-if {name: "a-done?", value: 9, type: 3, properties: ["a-done?": "boolean"]}, {name: "", value: 6, type: , properties: ["": ]} mem/0: location 1025 is 0 run/0: ingredient 0 is 0 run/0: jump-if fell through run/0: instruction string-append/12 +run/0: {name: "out", value: 10, type: 2-4, properties: ["out": "address":"character"]} <- index-address {name: "result", value: 6, type: 2-5-4, properties: ["result": "address":"array":"character", "deref": ]}, {name: "result-idx", value: 7, type: 1, properties: ["result-idx": "integer"]} run/0: ingredient 0 is result mem/0: location 1022 is 1045 run/0: ingredient 1 is {name: "result-idx", value: 7, type: 1, properties: ["result-idx": "integer"]} @@ -178,6 +209,7 @@ run/0: address to copy is 1048 run/0: product 0 is 1048 mem/0: storing 1048 in location 1026 run/0: instruction string-append/13 +run/0: {name: "in", value: 11, type: 4, properties: ["in": "character"]} <- index {name: "a", value: 1, type: 2-5-4, properties: ["a": "address":"array":"character", "deref": ]}, {name: "i", value: 8, type: 1, properties: ["i": "integer"]} run/0: ingredient 0 is {name: "a", value: 1, type: 2-5-4, properties: ["a": "address":"array":"character", "deref": ]} mem/0: location 1017 is 1000 run/0: ingredient 1 is {name: "i", value: 8, type: 1, properties: ["i": "integer"]} @@ -188,26 +220,31 @@ mem/0: location 1003 is 108 run/0: product 0 is 108 mem/0: storing 108 in location 1027 run/0: instruction string-append/14 +run/0: {name: "out", value: 10, type: 2-4, properties: ["out": "address":"character", "deref": ]} <- copy {name: "in", value: 11, type: 4, properties: ["in": "character"]} run/0: ingredient 0 is in mem/0: location 1027 is 108 mem/0: location 1026 is 1048 mem/0: storing 108 in location 1048 run/0: instruction string-append/15 +run/0: {name: "i", value: 8, type: 1, properties: ["i": "integer"]} <- add {name: "i", value: 8, type: 1, properties: ["i": "integer"]}, {name: "1", value: 1, type: 0, properties: ["1": "literal"]} run/0: ingredient 0 is i mem/0: location 1024 is 2 run/0: ingredient 1 is 1 run/0: product 0 is 3 mem/0: storing 3 in location 1024 run/0: instruction string-append/16 +run/0: {name: "result-idx", value: 7, type: 1, properties: ["result-idx": "integer"]} <- add {name: "result-idx", value: 7, type: 1, properties: ["result-idx": "integer"]}, {name: "1", value: 1, type: 0, properties: ["1": "literal"]} run/0: ingredient 0 is result-idx mem/0: location 1023 is 2 run/0: ingredient 1 is 1 run/0: product 0 is 3 mem/0: storing 3 in location 1023 run/0: instruction string-append/17 +run/0: loop {name: "", value: -8, type: , properties: ["": ]} run/0: ingredient 0 is -8 run/0: jumping to instruction 10 run/0: instruction string-append/10 +run/0: {name: "a-done?", value: 9, type: 3, properties: ["a-done?": "boolean"]} <- greater-or-equal {name: "i", value: 8, type: 1, properties: ["i": "integer"]}, {name: "a-len", value: 2, type: 1, properties: ["a-len": "integer"]} run/0: ingredient 0 is i mem/0: location 1024 is 3 run/0: ingredient 1 is a-len @@ -215,10 +252,12 @@ mem/0: location 1018 is 6 run/0: product 0 is 0 mem/0: storing 0 in location 1025 run/0: instruction string-append/11 +run/0: break-if {name: "a-done?", value: 9, type: 3, properties: ["a-done?": "boolean"]}, {name: "", value: 6, type: , properties: ["": ]} mem/0: location 1025 is 0 run/0: ingredient 0 is 0 run/0: jump-if fell through run/0: instruction string-append/12 +run/0: {name: "out", value: 10, type: 2-4, properties: ["out": "address":"character"]} <- index-address {name: "result", value: 6, type: 2-5-4, properties: ["result": "address":"array":"character", "deref": ]}, {name: "result-idx", value: 7, type: 1, properties: ["result-idx": "integer"]} run/0: ingredient 0 is result mem/0: location 1022 is 1045 run/0: ingredient 1 is {name: "result-idx", value: 7, type: 1, properties: ["result-idx": "integer"]} @@ -227,6 +266,7 @@ run/0: address to copy is 1049 run/0: product 0 is 1049 mem/0: storing 1049 in location 1026 run/0: instruction string-append/13 +run/0: {name: "in", value: 11, type: 4, properties: ["in": "character"]} <- index {name: "a", value: 1, type: 2-5-4, properties: ["a": "address":"array":"character", "deref": ]}, {name: "i", value: 8, type: 1, properties: ["i": "integer"]} run/0: ingredient 0 is {name: "a", value: 1, type: 2-5-4, properties: ["a": "address":"array":"character", "deref": ]} mem/0: location 1017 is 1000 run/0: ingredient 1 is {name: "i", value: 8, type: 1, properties: ["i": "integer"]} @@ -237,26 +277,31 @@ mem/0: location 1004 is 108 run/0: product 0 is 108 mem/0: storing 108 in location 1027 run/0: instruction string-append/14 +run/0: {name: "out", value: 10, type: 2-4, properties: ["out": "address":"character", "deref": ]} <- copy {name: "in", value: 11, type: 4, properties: ["in": "character"]} run/0: ingredient 0 is in mem/0: location 1027 is 108 mem/0: location 1026 is 1049 mem/0: storing 108 in location 1049 run/0: instruction string-append/15 +run/0: {name: "i", value: 8, type: 1, properties: ["i": "integer"]} <- add {name: "i", value: 8, type: 1, properties: ["i": "integer"]}, {name: "1", value: 1, type: 0, properties: ["1": "literal"]} run/0: ingredient 0 is i mem/0: location 1024 is 3 run/0: ingredient 1 is 1 run/0: product 0 is 4 mem/0: storing 4 in location 1024 run/0: instruction string-append/16 +run/0: {name: "result-idx", value: 7, type: 1, properties: ["result-idx": "integer"]} <- add {name: "result-idx", value: 7, type: 1, properties: ["result-idx": "integer"]}, {name: "1", value: 1, type: 0, properties: ["1": "literal"]} run/0: ingredient 0 is result-idx mem/0: location 1023 is 3 run/0: ingredient 1 is 1 run/0: product 0 is 4 mem/0: storing 4 in location 1023 run/0: instruction string-append/17 +run/0: loop {name: "", value: -8, type: , properties: ["": ]} run/0: ingredient 0 is -8 run/0: jumping to instruction 10 run/0: instruction string-append/10 +run/0: {name: "a-done?", value: 9, type: 3, properties: ["a-done?": "boolean"]} <- greater-or-equal {name: "i", value: 8, type: 1, properties: ["i": "integer"]}, {name: "a-len", value: 2, type: 1, properties: ["a-len": "integer"]} run/0: ingredient 0 is i mem/0: location 1024 is 4 run/0: ingredient 1 is a-len @@ -264,10 +309,12 @@ mem/0: location 1018 is 6 run/0: product 0 is 0 mem/0: storing 0 in location 1025 run/0: instruction string-append/11 +run/0: break-if {name: "a-done?", value: 9, type: 3, properties: ["a-done?": "boolean"]}, {name: "", value: 6, type: , properties: ["": ]} mem/0: location 1025 is 0 run/0: ingredient 0 is 0 run/0: jump-if fell through run/0: instruction string-append/12 +run/0: {name: "out", value: 10, type: 2-4, properties: ["out": "address":"character"]} <- index-address {name: "result", value: 6, type: 2-5-4, properties: ["result": "address":"array":"character", "deref": ]}, {name: "result-idx", value: 7, type: 1, properties: ["result-idx": "integer"]} run/0: ingredient 0 is result mem/0: location 1022 is 1045 run/0: ingredient 1 is {name: "result-idx", value: 7, type: 1, properties: ["result-idx": "integer"]} @@ -276,6 +323,7 @@ run/0: address to copy is 1050 run/0: product 0 is 1050 mem/0: storing 1050 in location 1026 run/0: instruction string-append/13 +run/0: {name: "in", value: 11, type: 4, properties: ["in": "character"]} <- index {name: "a", value: 1, type: 2-5-4, properties: ["a": "address":"array":"character", "deref": ]}, {name: "i", value: 8, type: 1, properties: ["i": "integer"]} run/0: ingredient 0 is {name: "a", value: 1, type: 2-5-4, properties: ["a": "address":"array":"character", "deref": ]} mem/0: location 1017 is 1000 run/0: ingredient 1 is {name: "i", value: 8, type: 1, properties: ["i": "integer"]} @@ -286,26 +334,31 @@ mem/0: location 1005 is 111 run/0: product 0 is 111 mem/0: storing 111 in location 1027 run/0: instruction string-append/14 +run/0: {name: "out", value: 10, type: 2-4, properties: ["out": "address":"character", "deref": ]} <- copy {name: "in", value: 11, type: 4, properties: ["in": "character"]} run/0: ingredient 0 is in mem/0: location 1027 is 111 mem/0: location 1026 is 1050 mem/0: storing 111 in location 1050 run/0: instruction string-append/15 +run/0: {name: "i", value: 8, type: 1, properties: ["i": "integer"]} <- add {name: "i", value: 8, type: 1, properties: ["i": "integer"]}, {name: "1", value: 1, type: 0, properties: ["1": "literal"]} run/0: ingredient 0 is i mem/0: location 1024 is 4 run/0: ingredient 1 is 1 run/0: product 0 is 5 mem/0: storing 5 in location 1024 run/0: instruction string-append/16 +run/0: {name: "result-idx", value: 7, type: 1, properties: ["result-idx": "integer"]} <- add {name: "result-idx", value: 7, type: 1, properties: ["result-idx": "integer"]}, {name: "1", value: 1, type: 0, properties: ["1": "literal"]} run/0: ingredient 0 is result-idx mem/0: location 1023 is 4 run/0: ingredient 1 is 1 run/0: product 0 is 5 mem/0: storing 5 in location 1023 run/0: instruction string-append/17 +run/0: loop {name: "", value: -8, type: , properties: ["": ]} run/0: ingredient 0 is -8 run/0: jumping to instruction 10 run/0: instruction string-append/10 +run/0: {name: "a-done?", value: 9, type: 3, properties: ["a-done?": "boolean"]} <- greater-or-equal {name: "i", value: 8, type: 1, properties: ["i": "integer"]}, {name: "a-len", value: 2, type: 1, properties: ["a-len": "integer"]} run/0: ingredient 0 is i mem/0: location 1024 is 5 run/0: ingredient 1 is a-len @@ -313,10 +366,12 @@ mem/0: location 1018 is 6 run/0: product 0 is 0 mem/0: storing 0 in location 1025 run/0: instruction string-append/11 +run/0: break-if {name: "a-done?", value: 9, type: 3, properties: ["a-done?": "boolean"]}, {name: "", value: 6, type: , properties: ["": ]} mem/0: location 1025 is 0 run/0: ingredient 0 is 0 run/0: jump-if fell through run/0: instruction string-append/12 +run/0: {name: "out", value: 10, type: 2-4, properties: ["out": "address":"character"]} <- index-address {name: "result", value: 6, type: 2-5-4, properties: ["result": "address":"array":"character", "deref": ]}, {name: "result-idx", value: 7, type: 1, properties: ["result-idx": "integer"]} run/0: ingredient 0 is result mem/0: location 1022 is 1045 run/0: ingredient 1 is {name: "result-idx", value: 7, type: 1, properties: ["result-idx": "integer"]} @@ -325,6 +380,7 @@ run/0: address to copy is 1051 run/0: product 0 is 1051 mem/0: storing 1051 in location 1026 run/0: instruction string-append/13 +run/0: {name: "in", value: 11, type: 4, properties: ["in": "character"]} <- index {name: "a", value: 1, type: 2-5-4, properties: ["a": "address":"array":"character", "deref": ]}, {name: "i", value: 8, type: 1, properties: ["i": "integer"]} run/0: ingredient 0 is {name: "a", value: 1, type: 2-5-4, properties: ["a": "address":"array":"character", "deref": ]} mem/0: location 1017 is 1000 run/0: ingredient 1 is {name: "i", value: 8, type: 1, properties: ["i": "integer"]} @@ -335,26 +391,31 @@ mem/0: location 1006 is 44 run/0: product 0 is 44 mem/0: storing 44 in location 1027 run/0: instruction string-append/14 +run/0: {name: "out", value: 10, type: 2-4, properties: ["out": "address":"character", "deref": ]} <- copy {name: "in", value: 11, type: 4, properties: ["in": "character"]} run/0: ingredient 0 is in mem/0: location 1027 is 44 mem/0: location 1026 is 1051 mem/0: storing 44 in location 1051 run/0: instruction string-append/15 +run/0: {name: "i", value: 8, type: 1, properties: ["i": "integer"]} <- add {name: "i", value: 8, type: 1, properties: ["i": "integer"]}, {name: "1", value: 1, type: 0, properties: ["1": "literal"]} run/0: ingredient 0 is i mem/0: location 1024 is 5 run/0: ingredient 1 is 1 run/0: product 0 is 6 mem/0: storing 6 in location 1024 run/0: instruction string-append/16 +run/0: {name: "result-idx", value: 7, type: 1, properties: ["result-idx": "integer"]} <- add {name: "result-idx", value: 7, type: 1, properties: ["result-idx": "integer"]}, {name: "1", value: 1, type: 0, properties: ["1": "literal"]} run/0: ingredient 0 is result-idx mem/0: location 1023 is 5 run/0: ingredient 1 is 1 run/0: product 0 is 6 mem/0: storing 6 in location 1023 run/0: instruction string-append/17 +run/0: loop {name: "", value: -8, type: , properties: ["": ]} run/0: ingredient 0 is -8 run/0: jumping to instruction 10 run/0: instruction string-append/10 +run/0: {name: "a-done?", value: 9, type: 3, properties: ["a-done?": "boolean"]} <- greater-or-equal {name: "i", value: 8, type: 1, properties: ["i": "integer"]}, {name: "a-len", value: 2, type: 1, properties: ["a-len": "integer"]} run/0: ingredient 0 is i mem/0: location 1024 is 6 run/0: ingredient 1 is a-len @@ -362,14 +423,17 @@ mem/0: location 1018 is 6 run/0: product 0 is 1 mem/0: storing 1 in location 1025 run/0: instruction string-append/11 +run/0: break-if {name: "a-done?", value: 9, type: 3, properties: ["a-done?": "boolean"]}, {name: "", value: 6, type: , properties: ["": ]} mem/0: location 1025 is 1 run/0: ingredient 0 is 1 run/0: ingredient 1 is run/0: jumping to instruction 18 run/0: instruction string-append/19 +run/0: {name: "i", value: 8, type: 1, properties: ["i": "integer"]} <- copy {name: "0", value: 0, type: 0, properties: ["0": "literal"]} run/0: ingredient 0 is 0 mem/0: storing 0 in location 1024 run/0: instruction string-append/21 +run/0: {name: "b-done?", value: 12, type: 3, properties: ["b-done?": "boolean"]} <- greater-or-equal {name: "i", value: 8, type: 1, properties: ["i": "integer"]}, {name: "b-len", value: 4, type: 1, properties: ["b-len": "integer"]} run/0: ingredient 0 is i mem/0: location 1024 is 0 run/0: ingredient 1 is b-len @@ -377,10 +441,12 @@ mem/0: location 1020 is 7 run/0: product 0 is 0 mem/0: storing 0 in location 1028 run/0: instruction string-append/22 +run/0: break-if {name: "b-done?", value: 12, type: 3, properties: ["b-done?": "boolean"]}, {name: "", value: 6, type: , properties: ["": ]} mem/0: location 1028 is 0 run/0: ingredient 0 is 0 run/0: jump-if fell through run/0: instruction string-append/23 +run/0: {name: "out", value: 10, type: 2-4, properties: ["out": "address":"character"]} <- index-address {name: "result", value: 6, type: 2-5-4, properties: ["result": "address":"array":"character", "deref": ]}, {name: "result-idx", value: 7, type: 1, properties: ["result-idx": "integer"]} run/0: ingredient 0 is result mem/0: location 1022 is 1045 run/0: ingredient 1 is {name: "result-idx", value: 7, type: 1, properties: ["result-idx": "integer"]} @@ -389,6 +455,7 @@ run/0: address to copy is 1052 run/0: product 0 is 1052 mem/0: storing 1052 in location 1026 run/0: instruction string-append/24 +run/0: {name: "in", value: 11, type: 4, properties: ["in": "character"]} <- index {name: "b", value: 3, type: 2-5-4, properties: ["b": "address":"array":"character", "deref": ]}, {name: "i", value: 8, type: 1, properties: ["i": "integer"]} run/0: ingredient 0 is {name: "b", value: 3, type: 2-5-4, properties: ["b": "address":"array":"character", "deref": ]} mem/0: location 1019 is 1007 run/0: ingredient 1 is {name: "i", value: 8, type: 1, properties: ["i": "integer"]} @@ -399,26 +466,31 @@ mem/0: location 1008 is 32 run/0: product 0 is 32 mem/0: storing 32 in location 1027 run/0: instruction string-append/25 +run/0: {name: "out", value: 10, type: 2-4, properties: ["out": "address":"character", "deref": ]} <- copy {name: "in", value: 11, type: 4, properties: ["in": "character"]} run/0: ingredient 0 is in mem/0: location 1027 is 32 mem/0: location 1026 is 1052 mem/0: storing 32 in location 1052 run/0: instruction string-append/26 +run/0: {name: "i", value: 8, type: 1, properties: ["i": "integer"]} <- add {name: "i", value: 8, type: 1, properties: ["i": "integer"]}, {name: "1", value: 1, type: 0, properties: ["1": "literal"]} run/0: ingredient 0 is i mem/0: location 1024 is 0 run/0: ingredient 1 is 1 run/0: product 0 is 1 mem/0: storing 1 in location 1024 run/0: instruction string-append/27 +run/0: {name: "result-idx", value: 7, type: 1, properties: ["result-idx": "integer"]} <- add {name: "result-idx", value: 7, type: 1, properties: ["result-idx": "integer"]}, {name: "1", value: 1, type: 0, properties: ["1": "literal"]} run/0: ingredient 0 is result-idx mem/0: location 1023 is 6 run/0: ingredient 1 is 1 run/0: product 0 is 7 mem/0: storing 7 in location 1023 run/0: instruction string-append/28 +run/0: loop {name: "", value: -8, type: , properties: ["": ]} run/0: ingredient 0 is -8 run/0: jumping to instruction 21 run/0: instruction string-append/21 +run/0: {name: "b-done?", value: 12, type: 3, properties: ["b-done?": "boolean"]} <- greater-or-equal {name: "i", value: 8, type: 1, properties: ["i": "integer"]}, {name: "b-len", value: 4, type: 1, properties: ["b-len": "integer"]} run/0: ingredient 0 is i mem/0: location 1024 is 1 run/0: ingredient 1 is b-len @@ -426,10 +498,12 @@ mem/0: location 1020 is 7 run/0: product 0 is 0 mem/0: storing 0 in location 1028 run/0: instruction string-append/22 +run/0: break-if {name: "b-done?", value: 12, type: 3, properties: ["b-done?": "boolean"]}, {name: "", value: 6, type: , properties: ["": ]} mem/0: location 1028 is 0 run/0: ingredient 0 is 0 run/0: jump-if fell through run/0: instruction string-append/23 +run/0: {name: "out", value: 10, type: 2-4, properties: ["out": "address":"character"]} <- index-address {name: "result", value: 6, type: 2-5-4, properties: ["result": "address":"array":"character", "deref": ]}, {name: "result-idx", value: 7, type: 1, properties: ["result-idx": "integer"]} run/0: ingredient 0 is result mem/0: location 1022 is 1045 run/0: ingredient 1 is {name: "result-idx", value: 7, type: 1, properties: ["result-idx": "integer"]} @@ -438,6 +512,7 @@ run/0: address to copy is 1053 run/0: product 0 is 1053 mem/0: storing 1053 in location 1026 run/0: instruction string-append/24 +run/0: {name: "in", value: 11, type: 4, properties: ["in": "character"]} <- index {name: "b", value: 3, type: 2-5-4, properties: ["b": "address":"array":"character", "deref": ]}, {name: "i", value: 8, type: 1, properties: ["i": "integer"]} run/0: ingredient 0 is {name: "b", value: 3, type: 2-5-4, properties: ["b": "address":"array":"character", "deref": ]} mem/0: location 1019 is 1007 run/0: ingredient 1 is {name: "i", value: 8, type: 1, properties: ["i": "integer"]} @@ -448,26 +523,31 @@ mem/0: location 1009 is 119 run/0: product 0 is 119 mem/0: storing 119 in location 1027 run/0: instruction string-append/25 +run/0: {name: "out", value: 10, type: 2-4, properties: ["out": "address":"character", "deref": ]} <- copy {name: "in", value: 11, type: 4, properties: ["in": "character"]} run/0: ingredient 0 is in mem/0: location 1027 is 119 mem/0: location 1026 is 1053 mem/0: storing 119 in location 1053 run/0: instruction string-append/26 +run/0: {name: "i", value: 8, type: 1, properties: ["i": "integer"]} <- add {name: "i", value: 8, type: 1, properties: ["i": "integer"]}, {name: "1", value: 1, type: 0, properties: ["1": "literal"]} run/0: ingredient 0 is i mem/0: location 1024 is 1 run/0: ingredient 1 is 1 run/0: product 0 is 2 mem/0: storing 2 in location 1024 run/0: instruction string-append/27 +run/0: {name: "result-idx", value: 7, type: 1, properties: ["result-idx": "integer"]} <- add {name: "result-idx", value: 7, type: 1, properties: ["result-idx": "integer"]}, {name: "1", value: 1, type: 0, properties: ["1": "literal"]} run/0: ingredient 0 is result-idx mem/0: location 1023 is 7 run/0: ingredient 1 is 1 run/0: product 0 is 8 mem/0: storing 8 in location 1023 run/0: instruction string-append/28 +run/0: loop {name: "", value: -8, type: , properties: ["": ]} run/0: ingredient 0 is -8 run/0: jumping to instruction 21 run/0: instruction string-append/21 +run/0: {name: "b-done?", value: 12, type: 3, properties: ["b-done?": "boolean"]} <- greater-or-equal {name: "i", value: 8, type: 1, properties: ["i": "integer"]}, {name: "b-len", value: 4, type: 1, properties: ["b-len": "integer"]} run/0: ingredient 0 is i mem/0: location 1024 is 2 run/0: ingredient 1 is b-len @@ -475,10 +555,12 @@ mem/0: location 1020 is 7 run/0: product 0 is 0 mem/0: storing 0 in location 1028 run/0: instruction string-append/22 +run/0: break-if {name: "b-done?", value: 12, type: 3, properties: ["b-done?": "boolean"]}, {name: "", value: 6, type: , properties: ["": ]} mem/0: location 1028 is 0 run/0: ingredient 0 is 0 run/0: jump-if fell through run/0: instruction string-append/23 +run/0: {name: "out", value: 10, type: 2-4, properties: ["out": "address":"character"]} <- index-address {name: "result", value: 6, type: 2-5-4, properties: ["result": "address":"array":"character", "deref": ]}, {name: "result-idx", value: 7, type: 1, properties: ["result-idx": "integer"]} run/0: ingredient 0 is result mem/0: location 1022 is 1045 run/0: ingredient 1 is {name: "result-idx", value: 7, type: 1, properties: ["result-idx": "integer"]} @@ -487,6 +569,7 @@ run/0: address to copy is 1054 run/0: product 0 is 1054 mem/0: storing 1054 in location 1026 run/0: instruction string-append/24 +run/0: {name: "in", value: 11, type: 4, properties: ["in": "character"]} <- index {name: "b", value: 3, type: 2-5-4, properties: ["b": "address":"array":"character", "deref": ]}, {name: "i", value: 8, type: 1, properties: ["i": "integer"]} run/0: ingredient 0 is {name: "b", value: 3, type: 2-5-4, properties: ["b": "address":"array":"character", "deref": ]} mem/0: location 1019 is 1007 run/0: ingredient 1 is {name: "i", value: 8, type: 1, properties: ["i": "integer"]} @@ -497,26 +580,31 @@ mem/0: location 1010 is 111 run/0: product 0 is 111 mem/0: storing 111 in location 1027 run/0: instruction string-append/25 +run/0: {name: "out", value: 10, type: 2-4, properties: ["out": "address":"character", "deref": ]} <- copy {name: "in", value: 11, type: 4, properties: ["in": "character"]} run/0: ingredient 0 is in mem/0: location 1027 is 111 mem/0: location 1026 is 1054 mem/0: storing 111 in location 1054 run/0: instruction string-append/26 +run/0: {name: "i", value: 8, type: 1, properties: ["i": "integer"]} <- add {name: "i", value: 8, type: 1, properties: ["i": "integer"]}, {name: "1", value: 1, type: 0, properties: ["1": "literal"]} run/0: ingredient 0 is i mem/0: location 1024 is 2 run/0: ingredient 1 is 1 run/0: product 0 is 3 mem/0: storing 3 in location 1024 run/0: instruction string-append/27 +run/0: {name: "result-idx", value: 7, type: 1, properties: ["result-idx": "integer"]} <- add {name: "result-idx", value: 7, type: 1, properties: ["result-idx": "integer"]}, {name: "1", value: 1, type: 0, properties: ["1": "literal"]} run/0: ingredient 0 is result-idx mem/0: location 1023 is 8 run/0: ingredient 1 is 1 run/0: product 0 is 9 mem/0: storing 9 in location 1023 run/0: instruction string-append/28 +run/0: loop {name: "", value: -8, type: , properties: ["": ]} run/0: ingredient 0 is -8 run/0: jumping to instruction 21 run/0: instruction string-append/21 +run/0: {name: "b-done?", value: 12, type: 3, properties: ["b-done?": "boolean"]} <- greater-or-equal {name: "i", value: 8, type: 1, properties: ["i": "integer"]}, {name: "b-len", value: 4, type: 1, properties: ["b-len": "integer"]} run/0: ingredient 0 is i mem/0: location 1024 is 3 run/0: ingredient 1 is b-len @@ -524,10 +612,12 @@ mem/0: location 1020 is 7 run/0: product 0 is 0 mem/0: storing 0 in location 1028 run/0: instruction string-append/22 +run/0: break-if {name: "b-done?", value: 12, type: 3, properties: ["b-done?": "boolean"]}, {name: "", value: 6, type: , properties: ["": ]} mem/0: location 1028 is 0 run/0: ingredient 0 is 0 run/0: jump-if fell through run/0: instruction string-append/23 +run/0: {name: "out", value: 10, type: 2-4, properties: ["out": "address":"character"]} <- index-address {name: "result", value: 6, type: 2-5-4, properties: ["result": "address":"array":"character", "deref": ]}, {name: "result-idx", value: 7, type: 1, properties: ["result-idx": "integer"]} run/0: ingredient 0 is result mem/0: location 1022 is 1045 run/0: ingredient 1 is {name: "result-idx", value: 7, type: 1, properties: ["result-idx": "integer"]} @@ -536,6 +626,7 @@ run/0: address to copy is 1055 run/0: product 0 is 1055 mem/0: storing 1055 in location 1026 run/0: instruction string-append/24 +run/0: {name: "in", value: 11, type: 4, properties: ["in": "character"]} <- index {name: "b", value: 3, type: 2-5-4, properties: ["b": "address":"array":"character", "deref": ]}, {name: "i", value: 8, type: 1, properties: ["i": "integer"]} run/0: ingredient 0 is {name: "b", value: 3, type: 2-5-4, properties: ["b": "address":"array":"character", "deref": ]} mem/0: location 1019 is 1007 run/0: ingredient 1 is {name: "i", value: 8, type: 1, properties: ["i": "integer"]} @@ -546,26 +637,31 @@ mem/0: location 1011 is 114 run/0: product 0 is 114 mem/0: storing 114 in location 1027 run/0: instruction string-append/25 +run/0: {name: "out", value: 10, type: 2-4, properties: ["out": "address":"character", "deref": ]} <- copy {name: "in", value: 11, type: 4, properties: ["in": "character"]} run/0: ingredient 0 is in mem/0: location 1027 is 114 mem/0: location 1026 is 1055 mem/0: storing 114 in location 1055 run/0: instruction string-append/26 +run/0: {name: "i", value: 8, type: 1, properties: ["i": "integer"]} <- add {name: "i", value: 8, type: 1, properties: ["i": "integer"]}, {name: "1", value: 1, type: 0, properties: ["1": "literal"]} run/0: ingredient 0 is i mem/0: location 1024 is 3 run/0: ingredient 1 is 1 run/0: product 0 is 4 mem/0: storing 4 in location 1024 run/0: instruction string-append/27 +run/0: {name: "result-idx", value: 7, type: 1, properties: ["result-idx": "integer"]} <- add {name: "result-idx", value: 7, type: 1, properties: ["result-idx": "integer"]}, {name: "1", value: 1, type: 0, properties: ["1": "literal"]} run/0: ingredient 0 is result-idx mem/0: location 1023 is 9 run/0: ingredient 1 is 1 run/0: product 0 is 10 mem/0: storing 10 in location 1023 run/0: instruction string-append/28 +run/0: loop {name: "", value: -8, type: , properties: ["": ]} run/0: ingredient 0 is -8 run/0: jumping to instruction 21 run/0: instruction string-append/21 +run/0: {name: "b-done?", value: 12, type: 3, properties: ["b-done?": "boolean"]} <- greater-or-equal {name: "i", value: 8, type: 1, properties: ["i": "integer"]}, {name: "b-len", value: 4, type: 1, properties: ["b-len": "integer"]} run/0: ingredient 0 is i mem/0: location 1024 is 4 run/0: ingredient 1 is b-len @@ -573,10 +669,12 @@ mem/0: location 1020 is 7 run/0: product 0 is 0 mem/0: storing 0 in location 1028 run/0: instruction string-append/22 +run/0: break-if {name: "b-done?", value: 12, type: 3, properties: ["b-done?": "boolean"]}, {name: "", value: 6, type: , properties: ["": ]} mem/0: location 1028 is 0 run/0: ingredient 0 is 0 run/0: jump-if fell through run/0: instruction string-append/23 +run/0: {name: "out", value: 10, type: 2-4, properties: ["out": "address":"character"]} <- index-address {name: "result", value: 6, type: 2-5-4, properties: ["result": "address":"array":"character", "deref": ]}, {name: "result-idx", value: 7, type: 1, properties: ["result-idx": "integer"]} run/0: ingredient 0 is result mem/0: location 1022 is 1045 run/0: ingredient 1 is {name: "result-idx", value: 7, type: 1, properties: ["result-idx": "integer"]} @@ -585,6 +683,7 @@ run/0: address to copy is 1056 run/0: product 0 is 1056 mem/0: storing 1056 in location 1026 run/0: instruction string-append/24 +run/0: {name: "in", value: 11, type: 4, properties: ["in": "character"]} <- index {name: "b", value: 3, type: 2-5-4, properties: ["b": "address":"array":"character", "deref": ]}, {name: "i", value: 8, type: 1, properties: ["i": "integer"]} run/0: ingredient 0 is {name: "b", value: 3, type: 2-5-4, properties: ["b": "address":"array":"character", "deref": ]} mem/0: location 1019 is 1007 run/0: ingredient 1 is {name: "i", value: 8, type: 1, properties: ["i": "integer"]} @@ -595,26 +694,31 @@ mem/0: location 1012 is 108 run/0: product 0 is 108 mem/0: storing 108 in location 1027 run/0: instruction string-append/25 +run/0: {name: "out", value: 10, type: 2-4, properties: ["out": "address":"character", "deref": ]} <- copy {name: "in", value: 11, type: 4, properties: ["in": "character"]} run/0: ingredient 0 is in mem/0: location 1027 is 108 mem/0: location 1026 is 1056 mem/0: storing 108 in location 1056 run/0: instruction string-append/26 +run/0: {name: "i", value: 8, type: 1, properties: ["i": "integer"]} <- add {name: "i", value: 8, type: 1, properties: ["i": "integer"]}, {name: "1", value: 1, type: 0, properties: ["1": "literal"]} run/0: ingredient 0 is i mem/0: location 1024 is 4 run/0: ingredient 1 is 1 run/0: product 0 is 5 mem/0: storing 5 in location 1024 run/0: instruction string-append/27 +run/0: {name: "result-idx", value: 7, type: 1, properties: ["result-idx": "integer"]} <- add {name: "result-idx", value: 7, type: 1, properties: ["result-idx": "integer"]}, {name: "1", value: 1, type: 0, properties: ["1": "literal"]} run/0: ingredient 0 is result-idx mem/0: location 1023 is 10 run/0: ingredient 1 is 1 run/0: product 0 is 11 mem/0: storing 11 in location 1023 run/0: instruction string-append/28 +run/0: loop {name: "", value: -8, type: , properties: ["": ]} run/0: ingredient 0 is -8 run/0: jumping to instruction 21 run/0: instruction string-append/21 +run/0: {name: "b-done?", value: 12, type: 3, properties: ["b-done?": "boolean"]} <- greater-or-equal {name: "i", value: 8, type: 1, properties: ["i": "integer"]}, {name: "b-len", value: 4, type: 1, properties: ["b-len": "integer"]} run/0: ingredient 0 is i mem/0: location 1024 is 5 run/0: ingredient 1 is b-len @@ -622,10 +726,12 @@ mem/0: location 1020 is 7 run/0: product 0 is 0 mem/0: storing 0 in location 1028 run/0: instruction string-append/22 +run/0: break-if {name: "b-done?", value: 12, type: 3, properties: ["b-done?": "boolean"]}, {name: "", value: 6, type: , properties: ["": ]} mem/0: location 1028 is 0 run/0: ingredient 0 is 0 run/0: jump-if fell through run/0: instruction string-append/23 +run/0: {name: "out", value: 10, type: 2-4, properties: ["out": "address":"character"]} <- index-address {name: "result", value: 6, type: 2-5-4, properties: ["result": "address":"array":"character", "deref": ]}, {name: "result-idx", value: 7, type: 1, properties: ["result-idx": "integer"]} run/0: ingredient 0 is result mem/0: location 1022 is 1045 run/0: ingredient 1 is {name: "result-idx", value: 7, type: 1, properties: ["result-idx": "integer"]} @@ -634,6 +740,7 @@ run/0: address to copy is 1057 run/0: product 0 is 1057 mem/0: storing 1057 in location 1026 run/0: instruction string-append/24 +run/0: {name: "in", value: 11, type: 4, properties: ["in": "character"]} <- index {name: "b", value: 3, type: 2-5-4, properties: ["b": "address":"array":"character", "deref": ]}, {name: "i", value: 8, type: 1, properties: ["i": "integer"]} run/0: ingredient 0 is {name: "b", value: 3, type: 2-5-4, properties: ["b": "address":"array":"character", "deref": ]} mem/0: location 1019 is 1007 run/0: ingredient 1 is {name: "i", value: 8, type: 1, properties: ["i": "integer"]} @@ -644,26 +751,31 @@ mem/0: location 1013 is 100 run/0: product 0 is 100 mem/0: storing 100 in location 1027 run/0: instruction string-append/25 +run/0: {name: "out", value: 10, type: 2-4, properties: ["out": "address":"character", "deref": ]} <- copy {name: "in", value: 11, type: 4, properties: ["in": "character"]} run/0: ingredient 0 is in mem/0: location 1027 is 100 mem/0: location 1026 is 1057 mem/0: storing 100 in location 1057 run/0: instruction string-append/26 +run/0: {name: "i", value: 8, type: 1, properties: ["i": "integer"]} <- add {name: "i", value: 8, type: 1, properties: ["i": "integer"]}, {name: "1", value: 1, type: 0, properties: ["1": "literal"]} run/0: ingredient 0 is i mem/0: location 1024 is 5 run/0: ingredient 1 is 1 run/0: product 0 is 6 mem/0: storing 6 in location 1024 run/0: instruction string-append/27 +run/0: {name: "result-idx", value: 7, type: 1, properties: ["result-idx": "integer"]} <- add {name: "result-idx", value: 7, type: 1, properties: ["result-idx": "integer"]}, {name: "1", value: 1, type: 0, properties: ["1": "literal"]} run/0: ingredient 0 is result-idx mem/0: location 1023 is 11 run/0: ingredient 1 is 1 run/0: product 0 is 12 mem/0: storing 12 in location 1023 run/0: instruction string-append/28 +run/0: loop {name: "", value: -8, type: , properties: ["": ]} run/0: ingredient 0 is -8 run/0: jumping to instruction 21 run/0: instruction string-append/21 +run/0: {name: "b-done?", value: 12, type: 3, properties: ["b-done?": "boolean"]} <- greater-or-equal {name: "i", value: 8, type: 1, properties: ["i": "integer"]}, {name: "b-len", value: 4, type: 1, properties: ["b-len": "integer"]} run/0: ingredient 0 is i mem/0: location 1024 is 6 run/0: ingredient 1 is b-len @@ -671,10 +783,12 @@ mem/0: location 1020 is 7 run/0: product 0 is 0 mem/0: storing 0 in location 1028 run/0: instruction string-append/22 +run/0: break-if {name: "b-done?", value: 12, type: 3, properties: ["b-done?": "boolean"]}, {name: "", value: 6, type: , properties: ["": ]} mem/0: location 1028 is 0 run/0: ingredient 0 is 0 run/0: jump-if fell through run/0: instruction string-append/23 +run/0: {name: "out", value: 10, type: 2-4, properties: ["out": "address":"character"]} <- index-address {name: "result", value: 6, type: 2-5-4, properties: ["result": "address":"array":"character", "deref": ]}, {name: "result-idx", value: 7, type: 1, properties: ["result-idx": "integer"]} run/0: ingredient 0 is result mem/0: location 1022 is 1045 run/0: ingredient 1 is {name: "result-idx", value: 7, type: 1, properties: ["result-idx": "integer"]} @@ -683,6 +797,7 @@ run/0: address to copy is 1058 run/0: product 0 is 1058 mem/0: storing 1058 in location 1026 run/0: instruction string-append/24 +run/0: {name: "in", value: 11, type: 4, properties: ["in": "character"]} <- index {name: "b", value: 3, type: 2-5-4, properties: ["b": "address":"array":"character", "deref": ]}, {name: "i", value: 8, type: 1, properties: ["i": "integer"]} run/0: ingredient 0 is {name: "b", value: 3, type: 2-5-4, properties: ["b": "address":"array":"character", "deref": ]} mem/0: location 1019 is 1007 run/0: ingredient 1 is {name: "i", value: 8, type: 1, properties: ["i": "integer"]} @@ -693,26 +808,31 @@ mem/0: location 1014 is 33 run/0: product 0 is 33 mem/0: storing 33 in location 1027 run/0: instruction string-append/25 +run/0: {name: "out", value: 10, type: 2-4, properties: ["out": "address":"character", "deref": ]} <- copy {name: "in", value: 11, type: 4, properties: ["in": "character"]} run/0: ingredient 0 is in mem/0: location 1027 is 33 mem/0: location 1026 is 1058 mem/0: storing 33 in location 1058 run/0: instruction string-append/26 +run/0: {name: "i", value: 8, type: 1, properties: ["i": "integer"]} <- add {name: "i", value: 8, type: 1, properties: ["i": "integer"]}, {name: "1", value: 1, type: 0, properties: ["1": "literal"]} run/0: ingredient 0 is i mem/0: location 1024 is 6 run/0: ingredient 1 is 1 run/0: product 0 is 7 mem/0: storing 7 in location 1024 run/0: instruction string-append/27 +run/0: {name: "result-idx", value: 7, type: 1, properties: ["result-idx": "integer"]} <- add {name: "result-idx", value: 7, type: 1, properties: ["result-idx": "integer"]}, {name: "1", value: 1, type: 0, properties: ["1": "literal"]} run/0: ingredient 0 is result-idx mem/0: location 1023 is 12 run/0: ingredient 1 is 1 run/0: product 0 is 13 mem/0: storing 13 in location 1023 run/0: instruction string-append/28 +run/0: loop {name: "", value: -8, type: , properties: ["": ]} run/0: ingredient 0 is -8 run/0: jumping to instruction 21 run/0: instruction string-append/21 +run/0: {name: "b-done?", value: 12, type: 3, properties: ["b-done?": "boolean"]} <- greater-or-equal {name: "i", value: 8, type: 1, properties: ["i": "integer"]}, {name: "b-len", value: 4, type: 1, properties: ["b-len": "integer"]} run/0: ingredient 0 is i mem/0: location 1024 is 7 run/0: ingredient 1 is b-len @@ -720,15 +840,18 @@ mem/0: location 1020 is 7 run/0: product 0 is 1 mem/0: storing 1 in location 1028 run/0: instruction string-append/22 +run/0: break-if {name: "b-done?", value: 12, type: 3, properties: ["b-done?": "boolean"]}, {name: "", value: 6, type: , properties: ["": ]} mem/0: location 1028 is 1 run/0: ingredient 0 is 1 run/0: ingredient 1 is run/0: jumping to instruction 29 run/0: instruction string-append/30 +run/0: reply {name: "result", value: 6, type: 2-5-4, properties: ["result": "address":"array":"character"]} mem/0: location 1022 is 1045 run/0: result 0 is 1045 mem/0: storing 1045 in location 3 run/0: instruction test-string-append-1/3 +run/0: {name: "4", value: 4, type: 5-4, properties: ["4": "array":"character", "raw": ]} <- copy {name: "3", value: 3, type: 2-5-4, properties: ["3": "address":"array":"character", "raw": , "deref": ]} run/0: ingredient 0 is 3 mem/0: location 3 is 1045 mem/0: location 1045 is 13 diff --git a/cpp/.traces/string-equal-common-lengths-but-distinct b/cpp/.traces/string-equal-common-lengths-but-distinct index 3decd91b..c74e78bf 100644 --- a/cpp/.traces/string-equal-common-lengths-but-distinct +++ b/cpp/.traces/string-equal-common-lengths-but-distinct @@ -25,33 +25,44 @@ after-brace/0: string-equal ... new/0: routine allocated memory from 1000 to 101000 schedule/0: test-string-equal-common-lengths-but-distinct run/0: instruction test-string-equal-common-lengths-but-distinct/0 +run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new {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 test-string-equal-common-lengths-but-distinct/1 +run/0: {name: "x", value: 1, type: 2-5-4, properties: ["x": "address":"array":"character"]} <- new {name: "abc", value: 0, type: 0, properties: ["abc": "literal-string"]} mem/0: storing 1030 in location 1002 run/0: instruction test-string-equal-common-lengths-but-distinct/2 +run/0: {name: "y", value: 2, type: 2-5-4, properties: ["y": "address":"array":"character"]} <- new {name: "abd", value: 0, type: 0, properties: ["abd": "literal-string"]} mem/0: storing 1034 in location 1003 run/0: instruction test-string-equal-common-lengths-but-distinct/3 +run/0: {name: "3", value: 3, type: 3, properties: ["3": "boolean", "raw": ]} <- string-equal {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 1030 mem/0: location 1003 is 1034 run/0: instruction string-equal/0 +run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new {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: 1038 run/0: instruction string-equal/1 +run/0: {name: "a", value: 1, type: 2-5-4, properties: ["a": "address":"array":"character"]} <- next-ingredient run/0: product 0 is 1030 mem/0: storing 1030 in location 1040 run/0: instruction string-equal/2 +run/0: {name: "a-len", value: 2, type: 1, properties: ["a-len": "integer"]} <- length {name: "a", value: 1, type: 2-5-4, properties: ["a": "address":"array":"character", "deref": ]} mem/0: location 1040 is 1030 mem/0: storing 3 in location 1041 run/0: instruction string-equal/3 +run/0: {name: "b", value: 3, type: 2-5-4, properties: ["b": "address":"array":"character"]} <- next-ingredient run/0: product 0 is 1034 mem/0: storing 1034 in location 1042 run/0: instruction string-equal/4 +run/0: {name: "b-len", value: 4, type: 1, properties: ["b-len": "integer"]} <- length {name: "b", value: 3, type: 2-5-4, properties: ["b": "address":"array":"character", "deref": ]} mem/0: location 1042 is 1034 mem/0: storing 3 in location 1043 run/0: instruction string-equal/6 +run/0: trace {name: "string-equal", value: 0, type: 0, properties: ["string-equal": "literal-string"]}, {name: "comparing lengths", value: 0, type: 0, properties: ["comparing lengths": "literal-string"]} string-equal/0: comparing lengths run/0: instruction string-equal/7 +run/0: {name: "length-equal?", value: 5, type: 3, properties: ["length-equal?": "boolean"]} <- equal {name: "a-len", value: 2, type: 1, properties: ["a-len": "integer"]}, {name: "b-len", value: 4, type: 1, properties: ["b-len": "integer"]} run/0: ingredient 0 is a-len mem/0: location 1041 is 3 run/0: ingredient 1 is b-len @@ -59,16 +70,20 @@ mem/0: location 1043 is 3 run/0: product 0 is 1 mem/0: storing 1 in location 1044 run/0: instruction string-equal/8 +run/0: break-if {name: "length-equal?", value: 5, type: 3, properties: ["length-equal?": "boolean"]}, {name: "", value: 1, type: , properties: ["": ]} mem/0: location 1044 is 1 run/0: ingredient 0 is 1 run/0: ingredient 1 is run/0: jumping to instruction 10 run/0: instruction string-equal/11 +run/0: trace {name: "string-equal", value: 0, type: 0, properties: ["string-equal": "literal-string"]}, {name: "comparing characters", value: 0, type: 0, properties: ["comparing characters": "literal-string"]} string-equal/0: comparing characters run/0: instruction string-equal/12 +run/0: {name: "i", value: 6, type: 1, properties: ["i": "integer"]} <- copy {name: "0", value: 0, type: 0, properties: ["0": "literal"]} run/0: ingredient 0 is 0 mem/0: storing 0 in location 1045 run/0: instruction string-equal/14 +run/0: {name: "done?", value: 7, type: 3, properties: ["done?": "boolean"]} <- greater-or-equal {name: "i", value: 6, type: 1, properties: ["i": "integer"]}, {name: "a-len", value: 2, type: 1, properties: ["a-len": "integer"]} run/0: ingredient 0 is i mem/0: location 1045 is 0 run/0: ingredient 1 is a-len @@ -76,10 +91,12 @@ mem/0: location 1041 is 3 run/0: product 0 is 0 mem/0: storing 0 in location 1046 run/0: instruction string-equal/15 +run/0: break-if {name: "done?", value: 7, type: 3, properties: ["done?": "boolean"]}, {name: "", value: 9, type: , properties: ["": ]} mem/0: location 1046 is 0 run/0: ingredient 0 is 0 run/0: jump-if fell through run/0: instruction string-equal/16 +run/0: {name: "a2", value: 8, type: 4, properties: ["a2": "character"]} <- index {name: "a", value: 1, type: 2-5-4, properties: ["a": "address":"array":"character", "deref": ]}, {name: "i", value: 6, type: 1, properties: ["i": "integer"]} run/0: ingredient 0 is {name: "a", value: 1, type: 2-5-4, properties: ["a": "address":"array":"character", "deref": ]} mem/0: location 1040 is 1030 run/0: ingredient 1 is {name: "i", value: 6, type: 1, properties: ["i": "integer"]} @@ -90,6 +107,7 @@ mem/0: location 1031 is 97 run/0: product 0 is 97 mem/0: storing 97 in location 1047 run/0: instruction string-equal/17 +run/0: {name: "b2", value: 9, type: 4, properties: ["b2": "character"]} <- index {name: "b", value: 3, type: 2-5-4, properties: ["b": "address":"array":"character", "deref": ]}, {name: "i", value: 6, type: 1, properties: ["i": "integer"]} run/0: ingredient 0 is {name: "b", value: 3, type: 2-5-4, properties: ["b": "address":"array":"character", "deref": ]} mem/0: location 1042 is 1034 run/0: ingredient 1 is {name: "i", value: 6, type: 1, properties: ["i": "integer"]} @@ -100,6 +118,7 @@ mem/0: location 1035 is 97 run/0: product 0 is 97 mem/0: storing 97 in location 1048 run/0: instruction string-equal/19 +run/0: {name: "chars-match?", value: 10, type: 3, properties: ["chars-match?": "boolean"]} <- equal {name: "a2", value: 8, type: 4, properties: ["a2": "character"]}, {name: "b2", value: 9, type: 4, properties: ["b2": "character"]} run/0: ingredient 0 is a2 mem/0: location 1047 is 97 run/0: ingredient 1 is b2 @@ -107,20 +126,24 @@ mem/0: location 1048 is 97 run/0: product 0 is 1 mem/0: storing 1 in location 1049 run/0: instruction string-equal/20 +run/0: break-if {name: "chars-match?", value: 10, type: 3, properties: ["chars-match?": "boolean"]}, {name: "", value: 1, type: , properties: ["": ]} mem/0: location 1049 is 1 run/0: ingredient 0 is 1 run/0: ingredient 1 is run/0: jumping to instruction 22 run/0: instruction string-equal/23 +run/0: {name: "i", value: 6, type: 1, properties: ["i": "integer"]} <- add {name: "i", value: 6, type: 1, properties: ["i": "integer"]}, {name: "1", value: 1, type: 0, properties: ["1": "literal"]} run/0: ingredient 0 is i mem/0: location 1045 is 0 run/0: ingredient 1 is 1 run/0: product 0 is 1 mem/0: storing 1 in location 1045 run/0: instruction string-equal/24 +run/0: loop {name: "", value: -11, type: , properties: ["": ]} run/0: ingredient 0 is -11 run/0: jumping to instruction 14 run/0: instruction string-equal/14 +run/0: {name: "done?", value: 7, type: 3, properties: ["done?": "boolean"]} <- greater-or-equal {name: "i", value: 6, type: 1, properties: ["i": "integer"]}, {name: "a-len", value: 2, type: 1, properties: ["a-len": "integer"]} run/0: ingredient 0 is i mem/0: location 1045 is 1 run/0: ingredient 1 is a-len @@ -128,10 +151,12 @@ mem/0: location 1041 is 3 run/0: product 0 is 0 mem/0: storing 0 in location 1046 run/0: instruction string-equal/15 +run/0: break-if {name: "done?", value: 7, type: 3, properties: ["done?": "boolean"]}, {name: "", value: 9, type: , properties: ["": ]} mem/0: location 1046 is 0 run/0: ingredient 0 is 0 run/0: jump-if fell through run/0: instruction string-equal/16 +run/0: {name: "a2", value: 8, type: 4, properties: ["a2": "character"]} <- index {name: "a", value: 1, type: 2-5-4, properties: ["a": "address":"array":"character", "deref": ]}, {name: "i", value: 6, type: 1, properties: ["i": "integer"]} run/0: ingredient 0 is {name: "a", value: 1, type: 2-5-4, properties: ["a": "address":"array":"character", "deref": ]} mem/0: location 1040 is 1030 run/0: ingredient 1 is {name: "i", value: 6, type: 1, properties: ["i": "integer"]} @@ -142,6 +167,7 @@ mem/0: location 1032 is 98 run/0: product 0 is 98 mem/0: storing 98 in location 1047 run/0: instruction string-equal/17 +run/0: {name: "b2", value: 9, type: 4, properties: ["b2": "character"]} <- index {name: "b", value: 3, type: 2-5-4, properties: ["b": "address":"array":"character", "deref": ]}, {name: "i", value: 6, type: 1, properties: ["i": "integer"]} run/0: ingredient 0 is {name: "b", value: 3, type: 2-5-4, properties: ["b": "address":"array":"character", "deref": ]} mem/0: location 1042 is 1034 run/0: ingredient 1 is {name: "i", value: 6, type: 1, properties: ["i": "integer"]} @@ -152,6 +178,7 @@ mem/0: location 1036 is 98 run/0: product 0 is 98 mem/0: storing 98 in location 1048 run/0: instruction string-equal/19 +run/0: {name: "chars-match?", value: 10, type: 3, properties: ["chars-match?": "boolean"]} <- equal {name: "a2", value: 8, type: 4, properties: ["a2": "character"]}, {name: "b2", value: 9, type: 4, properties: ["b2": "character"]} run/0: ingredient 0 is a2 mem/0: location 1047 is 98 run/0: ingredient 1 is b2 @@ -159,20 +186,24 @@ mem/0: location 1048 is 98 run/0: product 0 is 1 mem/0: storing 1 in location 1049 run/0: instruction string-equal/20 +run/0: break-if {name: "chars-match?", value: 10, type: 3, properties: ["chars-match?": "boolean"]}, {name: "", value: 1, type: , properties: ["": ]} mem/0: location 1049 is 1 run/0: ingredient 0 is 1 run/0: ingredient 1 is run/0: jumping to instruction 22 run/0: instruction string-equal/23 +run/0: {name: "i", value: 6, type: 1, properties: ["i": "integer"]} <- add {name: "i", value: 6, type: 1, properties: ["i": "integer"]}, {name: "1", value: 1, type: 0, properties: ["1": "literal"]} run/0: ingredient 0 is i mem/0: location 1045 is 1 run/0: ingredient 1 is 1 run/0: product 0 is 2 mem/0: storing 2 in location 1045 run/0: instruction string-equal/24 +run/0: loop {name: "", value: -11, type: , properties: ["": ]} run/0: ingredient 0 is -11 run/0: jumping to instruction 14 run/0: instruction string-equal/14 +run/0: {name: "done?", value: 7, type: 3, properties: ["done?": "boolean"]} <- greater-or-equal {name: "i", value: 6, type: 1, properties: ["i": "integer"]}, {name: "a-len", value: 2, type: 1, properties: ["a-len": "integer"]} run/0: ingredient 0 is i mem/0: location 1045 is 2 run/0: ingredient 1 is a-len @@ -180,10 +211,12 @@ mem/0: location 1041 is 3 run/0: product 0 is 0 mem/0: storing 0 in location 1046 run/0: instruction string-equal/15 +run/0: break-if {name: "done?", value: 7, type: 3, properties: ["done?": "boolean"]}, {name: "", value: 9, type: , properties: ["": ]} mem/0: location 1046 is 0 run/0: ingredient 0 is 0 run/0: jump-if fell through run/0: instruction string-equal/16 +run/0: {name: "a2", value: 8, type: 4, properties: ["a2": "character"]} <- index {name: "a", value: 1, type: 2-5-4, properties: ["a": "address":"array":"character", "deref": ]}, {name: "i", value: 6, type: 1, properties: ["i": "integer"]} run/0: ingredient 0 is {name: "a", value: 1, type: 2-5-4, properties: ["a": "address":"array":"character", "deref": ]} mem/0: location 1040 is 1030 run/0: ingredient 1 is {name: "i", value: 6, type: 1, properties: ["i": "integer"]} @@ -194,6 +227,7 @@ mem/0: location 1033 is 99 run/0: product 0 is 99 mem/0: storing 99 in location 1047 run/0: instruction string-equal/17 +run/0: {name: "b2", value: 9, type: 4, properties: ["b2": "character"]} <- index {name: "b", value: 3, type: 2-5-4, properties: ["b": "address":"array":"character", "deref": ]}, {name: "i", value: 6, type: 1, properties: ["i": "integer"]} run/0: ingredient 0 is {name: "b", value: 3, type: 2-5-4, properties: ["b": "address":"array":"character", "deref": ]} mem/0: location 1042 is 1034 run/0: ingredient 1 is {name: "i", value: 6, type: 1, properties: ["i": "integer"]} @@ -204,6 +238,7 @@ mem/0: location 1037 is 100 run/0: product 0 is 100 mem/0: storing 100 in location 1048 run/0: instruction string-equal/19 +run/0: {name: "chars-match?", value: 10, type: 3, properties: ["chars-match?": "boolean"]} <- equal {name: "a2", value: 8, type: 4, properties: ["a2": "character"]}, {name: "b2", value: 9, type: 4, properties: ["b2": "character"]} run/0: ingredient 0 is a2 mem/0: location 1047 is 99 run/0: ingredient 1 is b2 @@ -211,9 +246,11 @@ mem/0: location 1048 is 100 run/0: product 0 is 0 mem/0: storing 0 in location 1049 run/0: instruction string-equal/20 +run/0: break-if {name: "chars-match?", value: 10, type: 3, properties: ["chars-match?": "boolean"]}, {name: "", value: 1, type: , properties: ["": ]} mem/0: location 1049 is 0 run/0: ingredient 0 is 0 run/0: jump-if fell through run/0: instruction string-equal/21 +run/0: reply {name: "0", value: 0, type: 0, properties: ["0": "literal"]} run/0: result 0 is 0 mem/0: storing 0 in location 3 diff --git a/cpp/.traces/string-equal-distinct-lengths b/cpp/.traces/string-equal-distinct-lengths index dd9eeed0..22c4c754 100644 --- a/cpp/.traces/string-equal-distinct-lengths +++ b/cpp/.traces/string-equal-distinct-lengths @@ -25,33 +25,44 @@ after-brace/0: string-equal ... new/0: routine allocated memory from 1000 to 101000 schedule/0: test-string-equal-distinct-lengths run/0: instruction test-string-equal-distinct-lengths/0 +run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new {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 test-string-equal-distinct-lengths/1 +run/0: {name: "x", value: 1, type: 2-5-4, properties: ["x": "address":"array":"character"]} <- new {name: "abc", value: 0, type: 0, properties: ["abc": "literal-string"]} mem/0: storing 1030 in location 1002 run/0: instruction test-string-equal-distinct-lengths/2 +run/0: {name: "y", value: 2, type: 2-5-4, properties: ["y": "address":"array":"character"]} <- new {name: "abcd", value: 0, type: 0, properties: ["abcd": "literal-string"]} mem/0: storing 1034 in location 1003 run/0: instruction test-string-equal-distinct-lengths/3 +run/0: {name: "3", value: 3, type: 3, properties: ["3": "boolean", "raw": ]} <- string-equal {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 1030 mem/0: location 1003 is 1034 run/0: instruction string-equal/0 +run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new {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 +run/0: {name: "a", value: 1, type: 2-5-4, properties: ["a": "address":"array":"character"]} <- next-ingredient run/0: product 0 is 1030 mem/0: storing 1030 in location 1041 run/0: instruction string-equal/2 +run/0: {name: "a-len", value: 2, type: 1, properties: ["a-len": "integer"]} <- length {name: "a", value: 1, type: 2-5-4, properties: ["a": "address":"array":"character", "deref": ]} mem/0: location 1041 is 1030 mem/0: storing 3 in location 1042 run/0: instruction string-equal/3 +run/0: {name: "b", value: 3, type: 2-5-4, properties: ["b": "address":"array":"character"]} <- next-ingredient run/0: product 0 is 1034 mem/0: storing 1034 in location 1043 run/0: instruction string-equal/4 +run/0: {name: "b-len", value: 4, type: 1, properties: ["b-len": "integer"]} <- length {name: "b", value: 3, type: 2-5-4, properties: ["b": "address":"array":"character", "deref": ]} mem/0: location 1043 is 1034 mem/0: storing 4 in location 1044 run/0: instruction string-equal/6 +run/0: trace {name: "string-equal", value: 0, type: 0, properties: ["string-equal": "literal-string"]}, {name: "comparing lengths", value: 0, type: 0, properties: ["comparing lengths": "literal-string"]} string-equal/0: comparing lengths run/0: instruction string-equal/7 +run/0: {name: "length-equal?", value: 5, type: 3, properties: ["length-equal?": "boolean"]} <- equal {name: "a-len", value: 2, type: 1, properties: ["a-len": "integer"]}, {name: "b-len", value: 4, type: 1, properties: ["b-len": "integer"]} run/0: ingredient 0 is a-len mem/0: location 1042 is 3 run/0: ingredient 1 is b-len @@ -59,9 +70,11 @@ mem/0: location 1044 is 4 run/0: product 0 is 0 mem/0: storing 0 in location 1045 run/0: instruction string-equal/8 +run/0: break-if {name: "length-equal?", value: 5, type: 3, properties: ["length-equal?": "boolean"]}, {name: "", value: 1, type: , properties: ["": ]} mem/0: location 1045 is 0 run/0: ingredient 0 is 0 run/0: jump-if fell through run/0: instruction string-equal/9 +run/0: reply {name: "0", value: 0, type: 0, properties: ["0": "literal"]} run/0: result 0 is 0 mem/0: storing 0 in location 3 diff --git a/cpp/.traces/string-equal-identical b/cpp/.traces/string-equal-identical index 5c23287d..db4b3558 100644 --- a/cpp/.traces/string-equal-identical +++ b/cpp/.traces/string-equal-identical @@ -25,33 +25,44 @@ after-brace/0: string-equal ... new/0: routine allocated memory from 1000 to 101000 schedule/0: test-string-equal-identical run/0: instruction test-string-equal-identical/0 +run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new {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 test-string-equal-identical/1 +run/0: {name: "x", value: 1, type: 2-5-4, properties: ["x": "address":"array":"character"]} <- new {name: "abc", value: 0, type: 0, properties: ["abc": "literal-string"]} mem/0: storing 1030 in location 1002 run/0: instruction test-string-equal-identical/2 +run/0: {name: "y", value: 2, type: 2-5-4, properties: ["y": "address":"array":"character"]} <- new {name: "abc", value: 0, type: 0, properties: ["abc": "literal-string"]} mem/0: storing 1034 in location 1003 run/0: instruction test-string-equal-identical/3 +run/0: {name: "3", value: 3, type: 3, properties: ["3": "boolean", "raw": ]} <- string-equal {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 1030 mem/0: location 1003 is 1034 run/0: instruction string-equal/0 +run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new {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: 1038 run/0: instruction string-equal/1 +run/0: {name: "a", value: 1, type: 2-5-4, properties: ["a": "address":"array":"character"]} <- next-ingredient run/0: product 0 is 1030 mem/0: storing 1030 in location 1040 run/0: instruction string-equal/2 +run/0: {name: "a-len", value: 2, type: 1, properties: ["a-len": "integer"]} <- length {name: "a", value: 1, type: 2-5-4, properties: ["a": "address":"array":"character", "deref": ]} mem/0: location 1040 is 1030 mem/0: storing 3 in location 1041 run/0: instruction string-equal/3 +run/0: {name: "b", value: 3, type: 2-5-4, properties: ["b": "address":"array":"character"]} <- next-ingredient run/0: product 0 is 1034 mem/0: storing 1034 in location 1042 run/0: instruction string-equal/4 +run/0: {name: "b-len", value: 4, type: 1, properties: ["b-len": "integer"]} <- length {name: "b", value: 3, type: 2-5-4, properties: ["b": "address":"array":"character", "deref": ]} mem/0: location 1042 is 1034 mem/0: storing 3 in location 1043 run/0: instruction string-equal/6 +run/0: trace {name: "string-equal", value: 0, type: 0, properties: ["string-equal": "literal-string"]}, {name: "comparing lengths", value: 0, type: 0, properties: ["comparing lengths": "literal-string"]} string-equal/0: comparing lengths run/0: instruction string-equal/7 +run/0: {name: "length-equal?", value: 5, type: 3, properties: ["length-equal?": "boolean"]} <- equal {name: "a-len", value: 2, type: 1, properties: ["a-len": "integer"]}, {name: "b-len", value: 4, type: 1, properties: ["b-len": "integer"]} run/0: ingredient 0 is a-len mem/0: location 1041 is 3 run/0: ingredient 1 is b-len @@ -59,16 +70,20 @@ mem/0: location 1043 is 3 run/0: product 0 is 1 mem/0: storing 1 in location 1044 run/0: instruction string-equal/8 +run/0: break-if {name: "length-equal?", value: 5, type: 3, properties: ["length-equal?": "boolean"]}, {name: "", value: 1, type: , properties: ["": ]} mem/0: location 1044 is 1 run/0: ingredient 0 is 1 run/0: ingredient 1 is run/0: jumping to instruction 10 run/0: instruction string-equal/11 +run/0: trace {name: "string-equal", value: 0, type: 0, properties: ["string-equal": "literal-string"]}, {name: "comparing characters", value: 0, type: 0, properties: ["comparing characters": "literal-string"]} string-equal/0: comparing characters run/0: instruction string-equal/12 +run/0: {name: "i", value: 6, type: 1, properties: ["i": "integer"]} <- copy {name: "0", value: 0, type: 0, properties: ["0": "literal"]} run/0: ingredient 0 is 0 mem/0: storing 0 in location 1045 run/0: instruction string-equal/14 +run/0: {name: "done?", value: 7, type: 3, properties: ["done?": "boolean"]} <- greater-or-equal {name: "i", value: 6, type: 1, properties: ["i": "integer"]}, {name: "a-len", value: 2, type: 1, properties: ["a-len": "integer"]} run/0: ingredient 0 is i mem/0: location 1045 is 0 run/0: ingredient 1 is a-len @@ -76,10 +91,12 @@ mem/0: location 1041 is 3 run/0: product 0 is 0 mem/0: storing 0 in location 1046 run/0: instruction string-equal/15 +run/0: break-if {name: "done?", value: 7, type: 3, properties: ["done?": "boolean"]}, {name: "", value: 9, type: , properties: ["": ]} mem/0: location 1046 is 0 run/0: ingredient 0 is 0 run/0: jump-if fell through run/0: instruction string-equal/16 +run/0: {name: "a2", value: 8, type: 4, properties: ["a2": "character"]} <- index {name: "a", value: 1, type: 2-5-4, properties: ["a": "address":"array":"character", "deref": ]}, {name: "i", value: 6, type: 1, properties: ["i": "integer"]} run/0: ingredient 0 is {name: "a", value: 1, type: 2-5-4, properties: ["a": "address":"array":"character", "deref": ]} mem/0: location 1040 is 1030 run/0: ingredient 1 is {name: "i", value: 6, type: 1, properties: ["i": "integer"]} @@ -90,6 +107,7 @@ mem/0: location 1031 is 97 run/0: product 0 is 97 mem/0: storing 97 in location 1047 run/0: instruction string-equal/17 +run/0: {name: "b2", value: 9, type: 4, properties: ["b2": "character"]} <- index {name: "b", value: 3, type: 2-5-4, properties: ["b": "address":"array":"character", "deref": ]}, {name: "i", value: 6, type: 1, properties: ["i": "integer"]} run/0: ingredient 0 is {name: "b", value: 3, type: 2-5-4, properties: ["b": "address":"array":"character", "deref": ]} mem/0: location 1042 is 1034 run/0: ingredient 1 is {name: "i", value: 6, type: 1, properties: ["i": "integer"]} @@ -100,6 +118,7 @@ mem/0: location 1035 is 97 run/0: product 0 is 97 mem/0: storing 97 in location 1048 run/0: instruction string-equal/19 +run/0: {name: "chars-match?", value: 10, type: 3, properties: ["chars-match?": "boolean"]} <- equal {name: "a2", value: 8, type: 4, properties: ["a2": "character"]}, {name: "b2", value: 9, type: 4, properties: ["b2": "character"]} run/0: ingredient 0 is a2 mem/0: location 1047 is 97 run/0: ingredient 1 is b2 @@ -107,20 +126,24 @@ mem/0: location 1048 is 97 run/0: product 0 is 1 mem/0: storing 1 in location 1049 run/0: instruction string-equal/20 +run/0: break-if {name: "chars-match?", value: 10, type: 3, properties: ["chars-match?": "boolean"]}, {name: "", value: 1, type: , properties: ["": ]} mem/0: location 1049 is 1 run/0: ingredient 0 is 1 run/0: ingredient 1 is run/0: jumping to instruction 22 run/0: instruction string-equal/23 +run/0: {name: "i", value: 6, type: 1, properties: ["i": "integer"]} <- add {name: "i", value: 6, type: 1, properties: ["i": "integer"]}, {name: "1", value: 1, type: 0, properties: ["1": "literal"]} run/0: ingredient 0 is i mem/0: location 1045 is 0 run/0: ingredient 1 is 1 run/0: product 0 is 1 mem/0: storing 1 in location 1045 run/0: instruction string-equal/24 +run/0: loop {name: "", value: -11, type: , properties: ["": ]} run/0: ingredient 0 is -11 run/0: jumping to instruction 14 run/0: instruction string-equal/14 +run/0: {name: "done?", value: 7, type: 3, properties: ["done?": "boolean"]} <- greater-or-equal {name: "i", value: 6, type: 1, properties: ["i": "integer"]}, {name: "a-len", value: 2, type: 1, properties: ["a-len": "integer"]} run/0: ingredient 0 is i mem/0: location 1045 is 1 run/0: ingredient 1 is a-len @@ -128,10 +151,12 @@ mem/0: location 1041 is 3 run/0: product 0 is 0 mem/0: storing 0 in location 1046 run/0: instruction string-equal/15 +run/0: break-if {name: "done?", value: 7, type: 3, properties: ["done?": "boolean"]}, {name: "", value: 9, type: , properties: ["": ]} mem/0: location 1046 is 0 run/0: ingredient 0 is 0 run/0: jump-if fell through run/0: instruction string-equal/16 +run/0: {name: "a2", value: 8, type: 4, properties: ["a2": "character"]} <- index {name: "a", value: 1, type: 2-5-4, properties: ["a": "address":"array":"character", "deref": ]}, {name: "i", value: 6, type: 1, properties: ["i": "integer"]} run/0: ingredient 0 is {name: "a", value: 1, type: 2-5-4, properties: ["a": "address":"array":"character", "deref": ]} mem/0: location 1040 is 1030 run/0: ingredient 1 is {name: "i", value: 6, type: 1, properties: ["i": "integer"]} @@ -142,6 +167,7 @@ mem/0: location 1032 is 98 run/0: product 0 is 98 mem/0: storing 98 in location 1047 run/0: instruction string-equal/17 +run/0: {name: "b2", value: 9, type: 4, properties: ["b2": "character"]} <- index {name: "b", value: 3, type: 2-5-4, properties: ["b": "address":"array":"character", "deref": ]}, {name: "i", value: 6, type: 1, properties: ["i": "integer"]} run/0: ingredient 0 is {name: "b", value: 3, type: 2-5-4, properties: ["b": "address":"array":"character", "deref": ]} mem/0: location 1042 is 1034 run/0: ingredient 1 is {name: "i", value: 6, type: 1, properties: ["i": "integer"]} @@ -152,6 +178,7 @@ mem/0: location 1036 is 98 run/0: product 0 is 98 mem/0: storing 98 in location 1048 run/0: instruction string-equal/19 +run/0: {name: "chars-match?", value: 10, type: 3, properties: ["chars-match?": "boolean"]} <- equal {name: "a2", value: 8, type: 4, properties: ["a2": "character"]}, {name: "b2", value: 9, type: 4, properties: ["b2": "character"]} run/0: ingredient 0 is a2 mem/0: location 1047 is 98 run/0: ingredient 1 is b2 @@ -159,20 +186,24 @@ mem/0: location 1048 is 98 run/0: product 0 is 1 mem/0: storing 1 in location 1049 run/0: instruction string-equal/20 +run/0: break-if {name: "chars-match?", value: 10, type: 3, properties: ["chars-match?": "boolean"]}, {name: "", value: 1, type: , properties: ["": ]} mem/0: location 1049 is 1 run/0: ingredient 0 is 1 run/0: ingredient 1 is run/0: jumping to instruction 22 run/0: instruction string-equal/23 +run/0: {name: "i", value: 6, type: 1, properties: ["i": "integer"]} <- add {name: "i", value: 6, type: 1, properties: ["i": "integer"]}, {name: "1", value: 1, type: 0, properties: ["1": "literal"]} run/0: ingredient 0 is i mem/0: location 1045 is 1 run/0: ingredient 1 is 1 run/0: product 0 is 2 mem/0: storing 2 in location 1045 run/0: instruction string-equal/24 +run/0: loop {name: "", value: -11, type: , properties: ["": ]} run/0: ingredient 0 is -11 run/0: jumping to instruction 14 run/0: instruction string-equal/14 +run/0: {name: "done?", value: 7, type: 3, properties: ["done?": "boolean"]} <- greater-or-equal {name: "i", value: 6, type: 1, properties: ["i": "integer"]}, {name: "a-len", value: 2, type: 1, properties: ["a-len": "integer"]} run/0: ingredient 0 is i mem/0: location 1045 is 2 run/0: ingredient 1 is a-len @@ -180,10 +211,12 @@ mem/0: location 1041 is 3 run/0: product 0 is 0 mem/0: storing 0 in location 1046 run/0: instruction string-equal/15 +run/0: break-if {name: "done?", value: 7, type: 3, properties: ["done?": "boolean"]}, {name: "", value: 9, type: , properties: ["": ]} mem/0: location 1046 is 0 run/0: ingredient 0 is 0 run/0: jump-if fell through run/0: instruction string-equal/16 +run/0: {name: "a2", value: 8, type: 4, properties: ["a2": "character"]} <- index {name: "a", value: 1, type: 2-5-4, properties: ["a": "address":"array":"character", "deref": ]}, {name: "i", value: 6, type: 1, properties: ["i": "integer"]} run/0: ingredient 0 is {name: "a", value: 1, type: 2-5-4, properties: ["a": "address":"array":"character", "deref": ]} mem/0: location 1040 is 1030 run/0: ingredient 1 is {name: "i", value: 6, type: 1, properties: ["i": "integer"]} @@ -194,6 +227,7 @@ mem/0: location 1033 is 99 run/0: product 0 is 99 mem/0: storing 99 in location 1047 run/0: instruction string-equal/17 +run/0: {name: "b2", value: 9, type: 4, properties: ["b2": "character"]} <- index {name: "b", value: 3, type: 2-5-4, properties: ["b": "address":"array":"character", "deref": ]}, {name: "i", value: 6, type: 1, properties: ["i": "integer"]} run/0: ingredient 0 is {name: "b", value: 3, type: 2-5-4, properties: ["b": "address":"array":"character", "deref": ]} mem/0: location 1042 is 1034 run/0: ingredient 1 is {name: "i", value: 6, type: 1, properties: ["i": "integer"]} @@ -204,6 +238,7 @@ mem/0: location 1037 is 99 run/0: product 0 is 99 mem/0: storing 99 in location 1048 run/0: instruction string-equal/19 +run/0: {name: "chars-match?", value: 10, type: 3, properties: ["chars-match?": "boolean"]} <- equal {name: "a2", value: 8, type: 4, properties: ["a2": "character"]}, {name: "b2", value: 9, type: 4, properties: ["b2": "character"]} run/0: ingredient 0 is a2 mem/0: location 1047 is 99 run/0: ingredient 1 is b2 @@ -211,20 +246,24 @@ mem/0: location 1048 is 99 run/0: product 0 is 1 mem/0: storing 1 in location 1049 run/0: instruction string-equal/20 +run/0: break-if {name: "chars-match?", value: 10, type: 3, properties: ["chars-match?": "boolean"]}, {name: "", value: 1, type: , properties: ["": ]} mem/0: location 1049 is 1 run/0: ingredient 0 is 1 run/0: ingredient 1 is run/0: jumping to instruction 22 run/0: instruction string-equal/23 +run/0: {name: "i", value: 6, type: 1, properties: ["i": "integer"]} <- add {name: "i", value: 6, type: 1, properties: ["i": "integer"]}, {name: "1", value: 1, type: 0, properties: ["1": "literal"]} run/0: ingredient 0 is i mem/0: location 1045 is 2 run/0: ingredient 1 is 1 run/0: product 0 is 3 mem/0: storing 3 in location 1045 run/0: instruction string-equal/24 +run/0: loop {name: "", value: -11, type: , properties: ["": ]} run/0: ingredient 0 is -11 run/0: jumping to instruction 14 run/0: instruction string-equal/14 +run/0: {name: "done?", value: 7, type: 3, properties: ["done?": "boolean"]} <- greater-or-equal {name: "i", value: 6, type: 1, properties: ["i": "integer"]}, {name: "a-len", value: 2, type: 1, properties: ["a-len": "integer"]} run/0: ingredient 0 is i mem/0: location 1045 is 3 run/0: ingredient 1 is a-len @@ -232,10 +271,12 @@ mem/0: location 1041 is 3 run/0: product 0 is 1 mem/0: storing 1 in location 1046 run/0: instruction string-equal/15 +run/0: break-if {name: "done?", value: 7, type: 3, properties: ["done?": "boolean"]}, {name: "", value: 9, type: , properties: ["": ]} mem/0: location 1046 is 1 run/0: ingredient 0 is 1 run/0: ingredient 1 is run/0: jumping to instruction 25 run/0: instruction string-equal/26 +run/0: reply {name: "1", value: 1, type: 0, properties: ["1": "literal"]} run/0: result 0 is 1 mem/0: storing 1 in location 3 diff --git a/cpp/.traces/string-equal-reflexive b/cpp/.traces/string-equal-reflexive index 8aad4bd5..9384569d 100644 --- a/cpp/.traces/string-equal-reflexive +++ b/cpp/.traces/string-equal-reflexive @@ -19,31 +19,41 @@ after-brace/0: string-equal ... new/0: routine allocated memory from 1000 to 101000 schedule/0: test-string-equal-reflexive run/0: instruction test-string-equal-reflexive/0 +run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new {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 test-string-equal-reflexive/1 +run/0: {name: "x", value: 1, type: 2-5-4, properties: ["x": "address":"array":"character"]} <- new {name: "abc", value: 0, type: 0, properties: ["abc": "literal-string"]} mem/0: storing 1030 in location 1002 run/0: instruction test-string-equal-reflexive/2 +run/0: {name: "3", value: 3, type: 3, properties: ["3": "boolean", "raw": ]} <- string-equal {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 1030 mem/0: location 1002 is 1030 run/0: instruction string-equal/0 +run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new {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: 1034 run/0: instruction string-equal/1 +run/0: {name: "a", value: 1, type: 2-5-4, properties: ["a": "address":"array":"character"]} <- next-ingredient run/0: product 0 is 1030 mem/0: storing 1030 in location 1036 run/0: instruction string-equal/2 +run/0: {name: "a-len", value: 2, type: 1, properties: ["a-len": "integer"]} <- length {name: "a", value: 1, type: 2-5-4, properties: ["a": "address":"array":"character", "deref": ]} mem/0: location 1036 is 1030 mem/0: storing 3 in location 1037 run/0: instruction string-equal/3 +run/0: {name: "b", value: 3, type: 2-5-4, properties: ["b": "address":"array":"character"]} <- next-ingredient run/0: product 0 is 1030 mem/0: storing 1030 in location 1038 run/0: instruction string-equal/4 +run/0: {name: "b-len", value: 4, type: 1, properties: ["b-len": "integer"]} <- length {name: "b", value: 3, type: 2-5-4, properties: ["b": "address":"array":"character", "deref": ]} mem/0: location 1038 is 1030 mem/0: storing 3 in location 1039 run/0: instruction string-equal/6 +run/0: trace {name: "string-equal", value: 0, type: 0, properties: ["string-equal": "literal-string"]}, {name: "comparing lengths", value: 0, type: 0, properties: ["comparing lengths": "literal-string"]} string-equal/0: comparing lengths run/0: instruction string-equal/7 +run/0: {name: "length-equal?", value: 5, type: 3, properties: ["length-equal?": "boolean"]} <- equal {name: "a-len", value: 2, type: 1, properties: ["a-len": "integer"]}, {name: "b-len", value: 4, type: 1, properties: ["b-len": "integer"]} run/0: ingredient 0 is a-len mem/0: location 1037 is 3 run/0: ingredient 1 is b-len @@ -51,16 +61,20 @@ mem/0: location 1039 is 3 run/0: product 0 is 1 mem/0: storing 1 in location 1040 run/0: instruction string-equal/8 +run/0: break-if {name: "length-equal?", value: 5, type: 3, properties: ["length-equal?": "boolean"]}, {name: "", value: 1, type: , properties: ["": ]} mem/0: location 1040 is 1 run/0: ingredient 0 is 1 run/0: ingredient 1 is run/0: jumping to instruction 10 run/0: instruction string-equal/11 +run/0: trace {name: "string-equal", value: 0, type: 0, properties: ["string-equal": "literal-string"]}, {name: "comparing characters", value: 0, type: 0, properties: ["comparing characters": "literal-string"]} string-equal/0: comparing characters run/0: instruction string-equal/12 +run/0: {name: "i", value: 6, type: 1, properties: ["i": "integer"]} <- copy {name: "0", value: 0, type: 0, properties: ["0": "literal"]} run/0: ingredient 0 is 0 mem/0: storing 0 in location 1041 run/0: instruction string-equal/14 +run/0: {name: "done?", value: 7, type: 3, properties: ["done?": "boolean"]} <- greater-or-equal {name: "i", value: 6, type: 1, properties: ["i": "integer"]}, {name: "a-len", value: 2, type: 1, properties: ["a-len": "integer"]} run/0: ingredient 0 is i mem/0: location 1041 is 0 run/0: ingredient 1 is a-len @@ -68,10 +82,12 @@ mem/0: location 1037 is 3 run/0: product 0 is 0 mem/0: storing 0 in location 1042 run/0: instruction string-equal/15 +run/0: break-if {name: "done?", value: 7, type: 3, properties: ["done?": "boolean"]}, {name: "", value: 9, type: , properties: ["": ]} mem/0: location 1042 is 0 run/0: ingredient 0 is 0 run/0: jump-if fell through run/0: instruction string-equal/16 +run/0: {name: "a2", value: 8, type: 4, properties: ["a2": "character"]} <- index {name: "a", value: 1, type: 2-5-4, properties: ["a": "address":"array":"character", "deref": ]}, {name: "i", value: 6, type: 1, properties: ["i": "integer"]} run/0: ingredient 0 is {name: "a", value: 1, type: 2-5-4, properties: ["a": "address":"array":"character", "deref": ]} mem/0: location 1036 is 1030 run/0: ingredient 1 is {name: "i", value: 6, type: 1, properties: ["i": "integer"]} @@ -82,6 +98,7 @@ mem/0: location 1031 is 97 run/0: product 0 is 97 mem/0: storing 97 in location 1043 run/0: instruction string-equal/17 +run/0: {name: "b2", value: 9, type: 4, properties: ["b2": "character"]} <- index {name: "b", value: 3, type: 2-5-4, properties: ["b": "address":"array":"character", "deref": ]}, {name: "i", value: 6, type: 1, properties: ["i": "integer"]} run/0: ingredient 0 is {name: "b", value: 3, type: 2-5-4, properties: ["b": "address":"array":"character", "deref": ]} mem/0: location 1038 is 1030 run/0: ingredient 1 is {name: "i", value: 6, type: 1, properties: ["i": "integer"]} @@ -92,6 +109,7 @@ mem/0: location 1031 is 97 run/0: product 0 is 97 mem/0: storing 97 in location 1044 run/0: instruction string-equal/19 +run/0: {name: "chars-match?", value: 10, type: 3, properties: ["chars-match?": "boolean"]} <- equal {name: "a2", value: 8, type: 4, properties: ["a2": "character"]}, {name: "b2", value: 9, type: 4, properties: ["b2": "character"]} run/0: ingredient 0 is a2 mem/0: location 1043 is 97 run/0: ingredient 1 is b2 @@ -99,20 +117,24 @@ mem/0: location 1044 is 97 run/0: product 0 is 1 mem/0: storing 1 in location 1045 run/0: instruction string-equal/20 +run/0: break-if {name: "chars-match?", value: 10, type: 3, properties: ["chars-match?": "boolean"]}, {name: "", value: 1, type: , properties: ["": ]} mem/0: location 1045 is 1 run/0: ingredient 0 is 1 run/0: ingredient 1 is run/0: jumping to instruction 22 run/0: instruction string-equal/23 +run/0: {name: "i", value: 6, type: 1, properties: ["i": "integer"]} <- add {name: "i", value: 6, type: 1, properties: ["i": "integer"]}, {name: "1", value: 1, type: 0, properties: ["1": "literal"]} run/0: ingredient 0 is i mem/0: location 1041 is 0 run/0: ingredient 1 is 1 run/0: product 0 is 1 mem/0: storing 1 in location 1041 run/0: instruction string-equal/24 +run/0: loop {name: "", value: -11, type: , properties: ["": ]} run/0: ingredient 0 is -11 run/0: jumping to instruction 14 run/0: instruction string-equal/14 +run/0: {name: "done?", value: 7, type: 3, properties: ["done?": "boolean"]} <- greater-or-equal {name: "i", value: 6, type: 1, properties: ["i": "integer"]}, {name: "a-len", value: 2, type: 1, properties: ["a-len": "integer"]} run/0: ingredient 0 is i mem/0: location 1041 is 1 run/0: ingredient 1 is a-len @@ -120,10 +142,12 @@ mem/0: location 1037 is 3 run/0: product 0 is 0 mem/0: storing 0 in location 1042 run/0: instruction string-equal/15 +run/0: break-if {name: "done?", value: 7, type: 3, properties: ["done?": "boolean"]}, {name: "", value: 9, type: , properties: ["": ]} mem/0: location 1042 is 0 run/0: ingredient 0 is 0 run/0: jump-if fell through run/0: instruction string-equal/16 +run/0: {name: "a2", value: 8, type: 4, properties: ["a2": "character"]} <- index {name: "a", value: 1, type: 2-5-4, properties: ["a": "address":"array":"character", "deref": ]}, {name: "i", value: 6, type: 1, properties: ["i": "integer"]} run/0: ingredient 0 is {name: "a", value: 1, type: 2-5-4, properties: ["a": "address":"array":"character", "deref": ]} mem/0: location 1036 is 1030 run/0: ingredient 1 is {name: "i", value: 6, type: 1, properties: ["i": "integer"]} @@ -134,6 +158,7 @@ mem/0: location 1032 is 98 run/0: product 0 is 98 mem/0: storing 98 in location 1043 run/0: instruction string-equal/17 +run/0: {name: "b2", value: 9, type: 4, properties: ["b2": "character"]} <- index {name: "b", value: 3, type: 2-5-4, properties: ["b": "address":"array":"character", "deref": ]}, {name: "i", value: 6, type: 1, properties: ["i": "integer"]} run/0: ingredient 0 is {name: "b", value: 3, type: 2-5-4, properties: ["b": "address":"array":"character", "deref": ]} mem/0: location 1038 is 1030 run/0: ingredient 1 is {name: "i", value: 6, type: 1, properties: ["i": "integer"]} @@ -144,6 +169,7 @@ mem/0: location 1032 is 98 run/0: product 0 is 98 mem/0: storing 98 in location 1044 run/0: instruction string-equal/19 +run/0: {name: "chars-match?", value: 10, type: 3, properties: ["chars-match?": "boolean"]} <- equal {name: "a2", value: 8, type: 4, properties: ["a2": "character"]}, {name: "b2", value: 9, type: 4, properties: ["b2": "character"]} run/0: ingredient 0 is a2 mem/0: location 1043 is 98 run/0: ingredient 1 is b2 @@ -151,20 +177,24 @@ mem/0: location 1044 is 98 run/0: product 0 is 1 mem/0: storing 1 in location 1045 run/0: instruction string-equal/20 +run/0: break-if {name: "chars-match?", value: 10, type: 3, properties: ["chars-match?": "boolean"]}, {name: "", value: 1, type: , properties: ["": ]} mem/0: location 1045 is 1 run/0: ingredient 0 is 1 run/0: ingredient 1 is run/0: jumping to instruction 22 run/0: instruction string-equal/23 +run/0: {name: "i", value: 6, type: 1, properties: ["i": "integer"]} <- add {name: "i", value: 6, type: 1, properties: ["i": "integer"]}, {name: "1", value: 1, type: 0, properties: ["1": "literal"]} run/0: ingredient 0 is i mem/0: location 1041 is 1 run/0: ingredient 1 is 1 run/0: product 0 is 2 mem/0: storing 2 in location 1041 run/0: instruction string-equal/24 +run/0: loop {name: "", value: -11, type: , properties: ["": ]} run/0: ingredient 0 is -11 run/0: jumping to instruction 14 run/0: instruction string-equal/14 +run/0: {name: "done?", value: 7, type: 3, properties: ["done?": "boolean"]} <- greater-or-equal {name: "i", value: 6, type: 1, properties: ["i": "integer"]}, {name: "a-len", value: 2, type: 1, properties: ["a-len": "integer"]} run/0: ingredient 0 is i mem/0: location 1041 is 2 run/0: ingredient 1 is a-len @@ -172,10 +202,12 @@ mem/0: location 1037 is 3 run/0: product 0 is 0 mem/0: storing 0 in location 1042 run/0: instruction string-equal/15 +run/0: break-if {name: "done?", value: 7, type: 3, properties: ["done?": "boolean"]}, {name: "", value: 9, type: , properties: ["": ]} mem/0: location 1042 is 0 run/0: ingredient 0 is 0 run/0: jump-if fell through run/0: instruction string-equal/16 +run/0: {name: "a2", value: 8, type: 4, properties: ["a2": "character"]} <- index {name: "a", value: 1, type: 2-5-4, properties: ["a": "address":"array":"character", "deref": ]}, {name: "i", value: 6, type: 1, properties: ["i": "integer"]} run/0: ingredient 0 is {name: "a", value: 1, type: 2-5-4, properties: ["a": "address":"array":"character", "deref": ]} mem/0: location 1036 is 1030 run/0: ingredient 1 is {name: "i", value: 6, type: 1, properties: ["i": "integer"]} @@ -186,6 +218,7 @@ mem/0: location 1033 is 99 run/0: product 0 is 99 mem/0: storing 99 in location 1043 run/0: instruction string-equal/17 +run/0: {name: "b2", value: 9, type: 4, properties: ["b2": "character"]} <- index {name: "b", value: 3, type: 2-5-4, properties: ["b": "address":"array":"character", "deref": ]}, {name: "i", value: 6, type: 1, properties: ["i": "integer"]} run/0: ingredient 0 is {name: "b", value: 3, type: 2-5-4, properties: ["b": "address":"array":"character", "deref": ]} mem/0: location 1038 is 1030 run/0: ingredient 1 is {name: "i", value: 6, type: 1, properties: ["i": "integer"]} @@ -196,6 +229,7 @@ mem/0: location 1033 is 99 run/0: product 0 is 99 mem/0: storing 99 in location 1044 run/0: instruction string-equal/19 +run/0: {name: "chars-match?", value: 10, type: 3, properties: ["chars-match?": "boolean"]} <- equal {name: "a2", value: 8, type: 4, properties: ["a2": "character"]}, {name: "b2", value: 9, type: 4, properties: ["b2": "character"]} run/0: ingredient 0 is a2 mem/0: location 1043 is 99 run/0: ingredient 1 is b2 @@ -203,20 +237,24 @@ mem/0: location 1044 is 99 run/0: product 0 is 1 mem/0: storing 1 in location 1045 run/0: instruction string-equal/20 +run/0: break-if {name: "chars-match?", value: 10, type: 3, properties: ["chars-match?": "boolean"]}, {name: "", value: 1, type: , properties: ["": ]} mem/0: location 1045 is 1 run/0: ingredient 0 is 1 run/0: ingredient 1 is run/0: jumping to instruction 22 run/0: instruction string-equal/23 +run/0: {name: "i", value: 6, type: 1, properties: ["i": "integer"]} <- add {name: "i", value: 6, type: 1, properties: ["i": "integer"]}, {name: "1", value: 1, type: 0, properties: ["1": "literal"]} run/0: ingredient 0 is i mem/0: location 1041 is 2 run/0: ingredient 1 is 1 run/0: product 0 is 3 mem/0: storing 3 in location 1041 run/0: instruction string-equal/24 +run/0: loop {name: "", value: -11, type: , properties: ["": ]} run/0: ingredient 0 is -11 run/0: jumping to instruction 14 run/0: instruction string-equal/14 +run/0: {name: "done?", value: 7, type: 3, properties: ["done?": "boolean"]} <- greater-or-equal {name: "i", value: 6, type: 1, properties: ["i": "integer"]}, {name: "a-len", value: 2, type: 1, properties: ["a-len": "integer"]} run/0: ingredient 0 is i mem/0: location 1041 is 3 run/0: ingredient 1 is a-len @@ -224,10 +262,12 @@ mem/0: location 1037 is 3 run/0: product 0 is 1 mem/0: storing 1 in location 1042 run/0: instruction string-equal/15 +run/0: break-if {name: "done?", value: 7, type: 3, properties: ["done?": "boolean"]}, {name: "", value: 9, type: , properties: ["": ]} mem/0: location 1042 is 1 run/0: ingredient 0 is 1 run/0: ingredient 1 is run/0: jumping to instruction 25 run/0: instruction string-equal/26 +run/0: reply {name: "1", value: 1, type: 0, properties: ["1": "literal"]} run/0: result 0 is 1 mem/0: storing 1 in location 3 diff --git a/cpp/.traces/string-equal-with-empty b/cpp/.traces/string-equal-with-empty index fa59bc57..b3e87b15 100644 --- a/cpp/.traces/string-equal-with-empty +++ b/cpp/.traces/string-equal-with-empty @@ -25,33 +25,44 @@ after-brace/0: string-equal ... new/0: routine allocated memory from 1000 to 101000 schedule/0: test-string-equal-with-empty run/0: instruction test-string-equal-with-empty/0 +run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new {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 test-string-equal-with-empty/1 +run/0: {name: "x", value: 1, type: 2-5-4, properties: ["x": "address":"array":"character"]} <- new {name: "", value: 0, type: 0, properties: ["": "literal-string"]} mem/0: storing 1030 in location 1002 run/0: instruction test-string-equal-with-empty/2 +run/0: {name: "y", value: 2, type: 2-5-4, properties: ["y": "address":"array":"character"]} <- new {name: "abcd", value: 0, type: 0, properties: ["abcd": "literal-string"]} mem/0: storing 1031 in location 1003 run/0: instruction test-string-equal-with-empty/3 +run/0: {name: "3", value: 3, type: 3, properties: ["3": "boolean", "raw": ]} <- string-equal {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 1030 mem/0: location 1003 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 {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: 1036 run/0: instruction string-equal/1 +run/0: {name: "a", value: 1, type: 2-5-4, properties: ["a": "address":"array":"character"]} <- next-ingredient run/0: product 0 is 1030 mem/0: storing 1030 in location 1038 run/0: instruction string-equal/2 +run/0: {name: "a-len", value: 2, type: 1, properties: ["a-len": "integer"]} <- length {name: "a", value: 1, type: 2-5-4, properties: ["a": "address":"array":"character", "deref": ]} mem/0: location 1038 is 1030 mem/0: storing 0 in location 1039 run/0: instruction string-equal/3 +run/0: {name: "b", value: 3, type: 2-5-4, properties: ["b": "address":"array":"character"]} <- next-ingredient run/0: product 0 is 1031 mem/0: storing 1031 in location 1040 run/0: instruction string-equal/4 +run/0: {name: "b-len", value: 4, type: 1, properties: ["b-len": "integer"]} <- length {name: "b", value: 3, type: 2-5-4, properties: ["b": "address":"array":"character", "deref": ]} mem/0: location 1040 is 1031 mem/0: storing 4 in location 1041 run/0: instruction string-equal/6 +run/0: trace {name: "string-equal", value: 0, type: 0, properties: ["string-equal": "literal-string"]}, {name: "comparing lengths", value: 0, type: 0, properties: ["comparing lengths": "literal-string"]} string-equal/0: comparing lengths run/0: instruction string-equal/7 +run/0: {name: "length-equal?", value: 5, type: 3, properties: ["length-equal?": "boolean"]} <- equal {name: "a-len", value: 2, type: 1, properties: ["a-len": "integer"]}, {name: "b-len", value: 4, type: 1, properties: ["b-len": "integer"]} run/0: ingredient 0 is a-len mem/0: location 1039 is 0 run/0: ingredient 1 is b-len @@ -59,9 +70,11 @@ mem/0: location 1041 is 4 run/0: product 0 is 0 mem/0: storing 0 in location 1042 run/0: instruction string-equal/8 +run/0: break-if {name: "length-equal?", value: 5, type: 3, properties: ["length-equal?": "boolean"]}, {name: "", value: 1, type: , properties: ["": ]} mem/0: location 1042 is 0 run/0: ingredient 0 is 0 run/0: jump-if fell through run/0: instruction string-equal/9 +run/0: reply {name: "0", value: 0, type: 0, properties: ["0": "literal"]} run/0: result 0 is 0 mem/0: storing 0 in location 3 diff --git a/cpp/.traces/subtract b/cpp/.traces/subtract index 14a46ec2..328bec86 100644 --- a/cpp/.traces/subtract +++ b/cpp/.traces/subtract @@ -15,12 +15,15 @@ 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: 1, properties: ["1": "integer"]} <- copy {name: "23", value: 23, type: 0, properties: ["23": "literal"]} run/0: ingredient 0 is 23 mem/0: storing 23 in location 1 run/0: instruction main/1 +run/0: {name: "2", value: 2, type: 1, properties: ["2": "integer"]} <- copy {name: "34", value: 34, type: 0, properties: ["34": "literal"]} run/0: ingredient 0 is 34 mem/0: storing 34 in location 2 run/0: instruction main/2 +run/0: {name: "3", value: 3, type: 1, properties: ["3": "integer"]} <- subtract {name: "1", value: 1, type: 1, properties: ["1": "integer"]}, {name: "2", value: 2, type: 1, properties: ["2": "integer"]} run/0: ingredient 0 is 1 mem/0: location 1 is 23 run/0: ingredient 1 is 2 diff --git a/cpp/.traces/subtract_literal b/cpp/.traces/subtract_literal index b9b587b6..24d3d23f 100644 --- a/cpp/.traces/subtract_literal +++ b/cpp/.traces/subtract_literal @@ -7,6 +7,7 @@ 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: 1, properties: ["1": "integer"]} <- subtract {name: "5", value: 5, type: 0, properties: ["5": "literal"]}, {name: "2", value: 2, type: 0, properties: ["2": "literal"]} run/0: ingredient 0 is 5 run/0: ingredient 1 is 2 run/0: product 0 is 3 diff --git a/cpp/.traces/surrounding_space b/cpp/.traces/surrounding_space index 8787231f..abba5d00 100644 --- a/cpp/.traces/surrounding_space +++ b/cpp/.traces/surrounding_space @@ -27,19 +27,25 @@ after-brace/0: copy ... new/0: routine allocated memory from 1000 to 101000 schedule/0: main run/0: instruction main/0 +run/0: {name: "10", value: 10, type: 1, properties: ["10": "integer"]} <- copy {name: "5", value: 5, type: 0, properties: ["5": "literal"]} run/0: ingredient 0 is 5 mem/0: storing 5 in location 10 run/0: instruction main/1 +run/0: {name: "20", value: 20, type: 1, properties: ["20": "integer"]} <- copy {name: "5", value: 5, type: 0, properties: ["5": "literal"]} run/0: ingredient 0 is 5 mem/0: storing 5 in location 20 run/0: instruction main/2 +run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- copy {name: "10", value: 10, type: 0, properties: ["10": "literal"]} run/0: ingredient 0 is 10 run/0: instruction main/3 +run/0: {name: "0", value: 0, type: 2-5-1, properties: ["0": "address":"array":"location", "names": "dummy"]} <- copy {name: "20", value: 20, type: 0, properties: ["20": "literal"]} run/0: ingredient 0 is 20 mem/0: storing 20 in location 11 run/0: instruction main/4 +run/0: {name: "1", value: 1, type: 1, properties: ["1": "integer"]} <- copy {name: "32", value: 32, type: 0, properties: ["32": "literal"]} run/0: ingredient 0 is 32 mem/0: storing 32 in location 12 run/0: instruction main/5 +run/0: {name: "1", value: 1, type: 1, properties: ["1": "integer", "space": "1"]} <- copy {name: "33", value: 33, type: 0, properties: ["33": "literal"]} run/0: ingredient 0 is 33 mem/0: storing 33 in location 22 diff --git a/cpp/.traces/trace b/cpp/.traces/trace index 888c600a..50220cc0 100644 --- a/cpp/.traces/trace +++ b/cpp/.traces/trace @@ -6,4 +6,5 @@ after-brace/0: trace ... new/0: routine allocated memory from 1000 to 101000 schedule/0: main run/0: instruction main/0 +run/0: trace {name: "foo", value: 0, type: 0, properties: ["foo": "literal-string"]}, {name: "this is a trace in mu", value: 0, type: 0, properties: ["this is a trace in mu": "literal-string"]} foo/0: this is a trace in mu diff --git a/cpp/.traces/trace_in_mu b/cpp/.traces/trace_in_mu index 8fb1484a..468f0880 100644 --- a/cpp/.traces/trace_in_mu +++ b/cpp/.traces/trace_in_mu @@ -6,4 +6,5 @@ after-brace/0: trace ... new/0: routine allocated memory from 1000 to 101000 schedule/0: test-trace_in_mu run/0: instruction test-trace_in_mu/0 +run/0: trace {name: "foo", value: 0, type: 0, properties: ["foo": "literal-string"]}, {name: "aaa", value: 0, type: 0, properties: ["aaa": "literal-string"]} foo/0: aaa diff --git a/cpp/.traces/wait_for_location b/cpp/.traces/wait_for_location index ab2205d4..1cabe1a7 100644 --- a/cpp/.traces/wait_for_location +++ b/cpp/.traces/wait_for_location @@ -21,20 +21,25 @@ 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"]} <- copy {name: "0", value: 0, type: 0, properties: ["0": "literal"]} run/0: ingredient 0 is 0 mem/0: storing 0 in location 1 run/0: instruction f1/1 +run/0: run {name: "f2", value: 0, type: 0, properties: ["f2": "recipe"]} 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 {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 +run/0: {name: "1", value: 1, type: 1, properties: ["1": "integer"]} <- copy {name: "34", value: 34, type: 0, properties: ["34": "literal"]} run/0: ingredient 0 is 34 mem/0: storing 34 in location 1 schedule/0: waking up routine schedule/0: f1 run/0: instruction f1/3 +run/0: {name: "2", value: 2, type: 1, properties: ["2": "integer"]} <- copy {name: "1", value: 1, type: 1, properties: ["1": "integer"]} run/0: ingredient 0 is 1 mem/0: location 1 is 34 mem/0: storing 34 in location 2 diff --git a/cpp/010vm.cc b/cpp/010vm.cc index 40f8f269..e38a5958 100644 --- a/cpp/010vm.cc +++ b/cpp/010vm.cc @@ -30,6 +30,7 @@ struct instruction { vector<reagent> products; // only if !is_label instruction(); void clear(); + string to_string() const; }; :(before "struct instruction") @@ -218,6 +219,22 @@ string reagent::to_string() const { return out.str(); } +string instruction::to_string() const { + if (is_label) return label; + ostringstream out; + for (size_t i = 0; i < products.size(); ++i) { + if (i > 0) out << ", "; + out << products[i].to_string(); + } + if (!products.empty()) out << " <- "; + out << name << ' '; + for (size_t i = 0; i < ingredients.size(); ++i) { + if (i > 0) out << ", "; + out << ingredients[i].to_string(); + } + return out.str(); +} + string slurp_until(istream& in, char delim) { ostringstream out; char c; diff --git a/cpp/020run.cc b/cpp/020run.cc index e43085e2..95a8a0b1 100644 --- a/cpp/020run.cc +++ b/cpp/020run.cc @@ -54,6 +54,7 @@ void run_current_routine() // Running One Instruction. if (current_instruction().is_label) { ++current_step_index(); continue; } trace("run") << "instruction " << current_recipe_name() << '/' << current_step_index(); + trace("run") << current_instruction().to_string(); //? cout << "operation " << current_instruction().operation << '\n'; //? 3 switch (current_instruction().operation) { // Primitive Recipe Implementations |