diff options
author | Kartik K. Agaram <vc@akkartik.com> | 2015-05-02 15:52:22 -0700 |
---|---|---|
committer | Kartik K. Agaram <vc@akkartik.com> | 2015-05-02 22:56:13 -0700 |
commit | 22b3069272c1a177e814a7c4e769e20858e2b368 (patch) | |
tree | 761199b26823fe5ba11af66108e95ece1bc4f02c /cpp/.traces/interpolate-works | |
parent | a316f1e4168a98ba8c1bbe7b091f8a7e7b3f03e6 (diff) | |
download | mu-22b3069272c1a177e814a7c4e769e20858e2b368.tar.gz |
1242 - simpler implementation for 'scenario'
Also now has the side effect that scenarios can have any number of 'run' or check or any future blocks, in any order.
Diffstat (limited to 'cpp/.traces/interpolate-works')
-rw-r--r-- | cpp/.traces/interpolate-works | 61 |
1 files changed, 54 insertions, 7 deletions
diff --git a/cpp/.traces/interpolate-works b/cpp/.traces/interpolate-works index c093cc14..265b48b3 100644 --- a/cpp/.traces/interpolate-works +++ b/cpp/.traces/interpolate-works @@ -1,3 +1,38 @@ +parse/0: instruction: run +parse/0: ingredient: {name: " + 1:address:array:character/raw <- new [abc _] + 2:address:array:character/raw <- new [def] + 3:address:array:character/raw <- interpolate 1:address:array:character/raw, 2:address:array:character/raw + 4:array:character/raw <- copy 3:address:array:character/raw/deref + ", value: 0, type: 0, properties: [" + 1:address:array:character/raw <- new [abc _] + 2:address:array:character/raw <- new [def] + 3:address:array:character/raw <- interpolate 1:address:array:character/raw, 2:address:array:character/raw + 4:array:character/raw <- copy 3:address:array:character/raw/deref + ": "literal-string"]} +parse/0: instruction: memory-should-contain +parse/0: ingredient: {name: " + 4:string <- [abc def] + ", value: 0, type: 0, properties: [" + 4:string <- [abc def] + ": "literal-string"]} +after-brace/0: recipe interpolate-works +after-brace/0: run ... +after-brace/0: memory-should-contain ... +new/0: routine allocated memory from 1000 to 101000 +schedule/0: interpolate-works +run/0: instruction interpolate-works/0 +run/0: run {name: " + 1:address:array:character/raw <- new [abc _] + 2:address:array:character/raw <- new [def] + 3:address:array:character/raw <- interpolate 1:address:array:character/raw, 2:address:array:character/raw + 4:array:character/raw <- copy 3:address:array:character/raw/deref + ", value: 0, type: 0, properties: [" + 1:address:array:character/raw <- new [abc _] + 2:address:array:character/raw <- new [def] + 3:address:array:character/raw <- interpolate 1:address:array:character/raw, 2:address:array:character/raw + 4:array:character/raw <- copy 3:address:array:character/raw/deref + ": "literal-string"]} parse/0: instruction: new parse/0: ingredient: {name: "abc _", value: 0, type: 0, properties: ["abc _": "literal-string"]} parse/0: product: {name: "1", value: 0, type: 2-5-4, properties: ["1": "address":"array":"character", "raw": ]} @@ -13,20 +48,18 @@ parse/0: ingredient: {name: "3", value: 0, type: 2-5-4, properties: ["3": "add parse/0: product: {name: "4", value: 0, type: 5-4, properties: ["4": "array":"character", "raw": ]} new/0: abc _ -> 0 new/0: def -> 0 -after-brace/0: recipe test-interpolate-works +after-brace/0: recipe tmp0 after-brace/0: new ... after-brace/0: new ... after-brace/0: interpolate ... 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: instruction tmp0/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: instruction tmp0/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: instruction tmp0/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 @@ -659,7 +692,7 @@ run/0: reply {name: "result", value: 7, type: 2-5-4, properties: ["result": "add mem/0: location 1018 is 1071 run/0: result 0 is 1071 mem/0: storing 1071 in location 3 -run/0: instruction test-interpolate-works/3 +run/0: instruction tmp0/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 1071 @@ -679,3 +712,17 @@ mem/0: storing 32 in location 8 mem/0: storing 100 in location 9 mem/0: storing 101 in location 10 mem/0: storing 102 in location 11 +run/0: instruction interpolate-works/1 +run/0: memory-should-contain {name: " + 4:string <- [abc def] + ", value: 0, type: 0, properties: [" + 4:string <- [abc def] + ": "literal-string"]} +run/0: checking array length at 4 +run/0: checking location 5 +run/0: checking location 6 +run/0: checking location 7 +run/0: checking location 8 +run/0: checking location 9 +run/0: checking location 10 +run/0: checking location 11 |