diff options
-rw-r--r-- | cpp/.traces/string-equal-common-lengths-but-distinct | 211 | ||||
-rw-r--r-- | cpp/.traces/string-equal-distinct-lengths | 61 | ||||
-rw-r--r-- | cpp/.traces/string-equal-identical | 233 | ||||
-rw-r--r-- | cpp/.traces/string-equal-reflexive | 225 | ||||
-rw-r--r-- | cpp/.traces/string-equal-with-empty | 61 | ||||
-rw-r--r-- | cpp/031scenario | 3 |
6 files changed, 793 insertions, 1 deletions
diff --git a/cpp/.traces/string-equal-common-lengths-but-distinct b/cpp/.traces/string-equal-common-lengths-but-distinct new file mode 100644 index 00000000..a65bf671 --- /dev/null +++ b/cpp/.traces/string-equal-common-lengths-but-distinct @@ -0,0 +1,211 @@ +parse/0: instruction: 30 +parse/0: ingredient: {name: "location", value: 0, type: 0, properties: ["location": "type"]} +parse/0: ingredient: {name: "30", value: 0, type: 0, properties: ["30": "literal"]} +parse/0: product: {name: "default-space", value: 0, type: 2-0, properties: ["default-space": "address":"space"]} +parse/0: instruction: 30 +parse/0: ingredient: {name: "abc", value: 0, type: 0, properties: ["abc": "literal-string"]} +parse/0: product: {name: "x", value: 0, type: 2-5-8, properties: ["x": "address":"array":"character"]} +parse/0: instruction: 30 +parse/0: ingredient: {name: "abd", value: 0, type: 0, properties: ["abd": "literal-string"]} +parse/0: product: {name: "y", value: 0, type: 2-5-8, properties: ["y": "address":"array":"character"]} +parse/0: instruction: 32 +parse/0: ingredient: {name: "x", value: 0, type: 2-5-8, properties: ["x": "address":"array":"character"]} +parse/0: ingredient: {name: "y", value: 0, type: 2-5-8, properties: ["y": "address":"array":"character"]} +parse/0: product: {name: "3", value: 0, type: 3, properties: ["3": "boolean", "raw": ]} +new/0: location -> 1 +new/0: abc -> 0 +name/0: assign x 1 +new/0: abd -> 0 +name/0: assign y 2 +after-brace/0: recipe test-string-equal-common-lengths-but-distinct +after-brace/0: new ... +after-brace/0: new ... +after-brace/0: new ... +after-brace/0: string-equal ... +run/0: instruction test-string-equal-common-lengths-but-distinct/0 +mem/0: array size is 30 +run/0: instruction test-string-equal-common-lengths-but-distinct/1 +mem/0: storing 1030 in location 1002 +run/0: instruction test-string-equal-common-lengths-but-distinct/2 +mem/0: storing 1034 in location 1003 +run/0: instruction test-string-equal-common-lengths-but-distinct/3 +mem/0: location 1002 is 1030 +mem/0: location 1003 is 1034 +run/0: instruction string-equal/0 +mem/0: array size is 30 +run/0: instruction string-equal/1 +run/0: product 0 is 1030 +mem/0: storing 1030 in location 1040 +run/0: instruction string-equal/2 +mem/0: location 1040 is 1030 +mem/0: storing 3 in location 1041 +run/0: instruction string-equal/3 +run/0: product 0 is 1034 +mem/0: storing 1034 in location 1042 +run/0: instruction string-equal/4 +mem/0: location 1042 is 1034 +mem/0: storing 3 in location 1043 +run/0: instruction string-equal/6 +run/0: ingredient 0 is a-len +mem/0: location 1041 is 3 +run/0: ingredient 1 is b-len +mem/0: location 1043 is 3 +run/0: product 0 is 1 +mem/0: storing 1 in location 1044 +run/0: instruction string-equal/7 +mem/0: location 1044 is 1 +run/0: ingredient 0 is 1 +run/0: ingredient 1 is +run/0: jumping to instruction 9 +run/0: instruction string-equal/10 +run/0: ingredient 0 is 0 +mem/0: storing 0 in location 1045 +run/0: instruction string-equal/12 +run/0: ingredient 0 is i +mem/0: location 1045 is 0 +run/0: ingredient 1 is a-len +mem/0: location 1041 is 3 +run/0: product 0 is 0 +mem/0: storing 0 in location 1046 +run/0: instruction string-equal/13 +mem/0: location 1046 is 0 +run/0: ingredient 0 is 0 +run/0: jump-if fell through +run/0: instruction string-equal/14 +run/0: ingredient 0 is {name: "a", value: 1, type: 2-5-8, 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"]} +mem/0: location 1045 is 0 +run/0: address to copy is 1031 +run/0: its type is 8 +mem/0: location 1031 is 97 +run/0: product 0 is 97 +mem/0: storing 97 in location 1047 +run/0: instruction string-equal/15 +run/0: ingredient 0 is {name: "b", value: 3, type: 2-5-8, 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"]} +mem/0: location 1045 is 0 +run/0: address to copy is 1035 +run/0: its type is 8 +mem/0: location 1035 is 97 +run/0: product 0 is 97 +mem/0: storing 97 in location 1048 +run/0: instruction string-equal/17 +run/0: ingredient 0 is a2 +mem/0: location 1047 is 97 +run/0: ingredient 1 is b2 +mem/0: location 1048 is 97 +run/0: product 0 is 1 +mem/0: storing 1 in location 1049 +run/0: instruction string-equal/18 +mem/0: location 1049 is 1 +run/0: ingredient 0 is 1 +run/0: ingredient 1 is +run/0: jumping to instruction 20 +run/0: instruction string-equal/21 +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/22 +run/0: ingredient 0 is -11 +run/0: pc now 11 +run/0: instruction string-equal/12 +run/0: ingredient 0 is i +mem/0: location 1045 is 1 +run/0: ingredient 1 is a-len +mem/0: location 1041 is 3 +run/0: product 0 is 0 +mem/0: storing 0 in location 1046 +run/0: instruction string-equal/13 +mem/0: location 1046 is 0 +run/0: ingredient 0 is 0 +run/0: jump-if fell through +run/0: instruction string-equal/14 +run/0: ingredient 0 is {name: "a", value: 1, type: 2-5-8, 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"]} +mem/0: location 1045 is 1 +run/0: address to copy is 1032 +run/0: its type is 8 +mem/0: location 1032 is 98 +run/0: product 0 is 98 +mem/0: storing 98 in location 1047 +run/0: instruction string-equal/15 +run/0: ingredient 0 is {name: "b", value: 3, type: 2-5-8, 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"]} +mem/0: location 1045 is 1 +run/0: address to copy is 1036 +run/0: its type is 8 +mem/0: location 1036 is 98 +run/0: product 0 is 98 +mem/0: storing 98 in location 1048 +run/0: instruction string-equal/17 +run/0: ingredient 0 is a2 +mem/0: location 1047 is 98 +run/0: ingredient 1 is b2 +mem/0: location 1048 is 98 +run/0: product 0 is 1 +mem/0: storing 1 in location 1049 +run/0: instruction string-equal/18 +mem/0: location 1049 is 1 +run/0: ingredient 0 is 1 +run/0: ingredient 1 is +run/0: jumping to instruction 20 +run/0: instruction string-equal/21 +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/22 +run/0: ingredient 0 is -11 +run/0: pc now 11 +run/0: instruction string-equal/12 +run/0: ingredient 0 is i +mem/0: location 1045 is 2 +run/0: ingredient 1 is a-len +mem/0: location 1041 is 3 +run/0: product 0 is 0 +mem/0: storing 0 in location 1046 +run/0: instruction string-equal/13 +mem/0: location 1046 is 0 +run/0: ingredient 0 is 0 +run/0: jump-if fell through +run/0: instruction string-equal/14 +run/0: ingredient 0 is {name: "a", value: 1, type: 2-5-8, 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"]} +mem/0: location 1045 is 2 +run/0: address to copy is 1033 +run/0: its type is 8 +mem/0: location 1033 is 99 +run/0: product 0 is 99 +mem/0: storing 99 in location 1047 +run/0: instruction string-equal/15 +run/0: ingredient 0 is {name: "b", value: 3, type: 2-5-8, 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"]} +mem/0: location 1045 is 2 +run/0: address to copy is 1037 +run/0: its type is 8 +mem/0: location 1037 is 100 +run/0: product 0 is 100 +mem/0: storing 100 in location 1048 +run/0: instruction string-equal/17 +run/0: ingredient 0 is a2 +mem/0: location 1047 is 99 +run/0: ingredient 1 is b2 +mem/0: location 1048 is 100 +run/0: product 0 is 0 +mem/0: storing 0 in location 1049 +run/0: instruction string-equal/18 +mem/0: location 1049 is 0 +run/0: ingredient 0 is 0 +run/0: jump-if fell through +run/0: instruction string-equal/19 +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 new file mode 100644 index 00000000..55c980f5 --- /dev/null +++ b/cpp/.traces/string-equal-distinct-lengths @@ -0,0 +1,61 @@ +parse/0: instruction: 30 +parse/0: ingredient: {name: "location", value: 0, type: 0, properties: ["location": "type"]} +parse/0: ingredient: {name: "30", value: 0, type: 0, properties: ["30": "literal"]} +parse/0: product: {name: "default-space", value: 0, type: 2-0, properties: ["default-space": "address":"space"]} +parse/0: instruction: 30 +parse/0: ingredient: {name: "abc", value: 0, type: 0, properties: ["abc": "literal-string"]} +parse/0: product: {name: "x", value: 0, type: 2-5-8, properties: ["x": "address":"array":"character"]} +parse/0: instruction: 30 +parse/0: ingredient: {name: "abcd", value: 0, type: 0, properties: ["abcd": "literal-string"]} +parse/0: product: {name: "y", value: 0, type: 2-5-8, properties: ["y": "address":"array":"character"]} +parse/0: instruction: 32 +parse/0: ingredient: {name: "x", value: 0, type: 2-5-8, properties: ["x": "address":"array":"character"]} +parse/0: ingredient: {name: "y", value: 0, type: 2-5-8, properties: ["y": "address":"array":"character"]} +parse/0: product: {name: "3", value: 0, type: 3, properties: ["3": "boolean", "raw": ]} +new/0: location -> 1 +new/0: abc -> 0 +name/0: assign x 1 +new/0: abcd -> 0 +name/0: assign y 2 +after-brace/0: recipe test-string-equal-distinct-lengths +after-brace/0: new ... +after-brace/0: new ... +after-brace/0: new ... +after-brace/0: string-equal ... +run/0: instruction test-string-equal-distinct-lengths/0 +mem/0: array size is 30 +run/0: instruction test-string-equal-distinct-lengths/1 +mem/0: storing 1030 in location 1002 +run/0: instruction test-string-equal-distinct-lengths/2 +mem/0: storing 1034 in location 1003 +run/0: instruction test-string-equal-distinct-lengths/3 +mem/0: location 1002 is 1030 +mem/0: location 1003 is 1034 +run/0: instruction string-equal/0 +mem/0: array size is 30 +run/0: instruction string-equal/1 +run/0: product 0 is 1030 +mem/0: storing 1030 in location 1041 +run/0: instruction string-equal/2 +mem/0: location 1041 is 1030 +mem/0: storing 3 in location 1042 +run/0: instruction string-equal/3 +run/0: product 0 is 1034 +mem/0: storing 1034 in location 1043 +run/0: instruction string-equal/4 +mem/0: location 1043 is 1034 +mem/0: storing 4 in location 1044 +run/0: instruction string-equal/6 +run/0: ingredient 0 is a-len +mem/0: location 1042 is 3 +run/0: ingredient 1 is b-len +mem/0: location 1044 is 4 +run/0: product 0 is 0 +mem/0: storing 0 in location 1045 +run/0: instruction string-equal/7 +mem/0: location 1045 is 0 +run/0: ingredient 0 is 0 +run/0: jump-if fell through +run/0: instruction string-equal/8 +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 new file mode 100644 index 00000000..6617774c --- /dev/null +++ b/cpp/.traces/string-equal-identical @@ -0,0 +1,233 @@ +parse/0: instruction: 30 +parse/0: ingredient: {name: "location", value: 0, type: 0, properties: ["location": "type"]} +parse/0: ingredient: {name: "30", value: 0, type: 0, properties: ["30": "literal"]} +parse/0: product: {name: "default-space", value: 0, type: 2-0, properties: ["default-space": "address":"space"]} +parse/0: instruction: 30 +parse/0: ingredient: {name: "abc", value: 0, type: 0, properties: ["abc": "literal-string"]} +parse/0: product: {name: "x", value: 0, type: 2-5-8, properties: ["x": "address":"array":"character"]} +parse/0: instruction: 30 +parse/0: ingredient: {name: "abc", value: 0, type: 0, properties: ["abc": "literal-string"]} +parse/0: product: {name: "y", value: 0, type: 2-5-8, properties: ["y": "address":"array":"character"]} +parse/0: instruction: 32 +parse/0: ingredient: {name: "x", value: 0, type: 2-5-8, properties: ["x": "address":"array":"character"]} +parse/0: ingredient: {name: "y", value: 0, type: 2-5-8, properties: ["y": "address":"array":"character"]} +parse/0: product: {name: "3", value: 0, type: 3, properties: ["3": "boolean", "raw": ]} +new/0: location -> 1 +new/0: abc -> 0 +name/0: assign x 1 +new/0: abc -> 0 +name/0: assign y 2 +after-brace/0: recipe test-string-equal-identical +after-brace/0: new ... +after-brace/0: new ... +after-brace/0: new ... +after-brace/0: string-equal ... +run/0: instruction test-string-equal-identical/0 +mem/0: array size is 30 +run/0: instruction test-string-equal-identical/1 +mem/0: storing 1030 in location 1002 +run/0: instruction test-string-equal-identical/2 +mem/0: storing 1034 in location 1003 +run/0: instruction test-string-equal-identical/3 +mem/0: location 1002 is 1030 +mem/0: location 1003 is 1034 +run/0: instruction string-equal/0 +mem/0: array size is 30 +run/0: instruction string-equal/1 +run/0: product 0 is 1030 +mem/0: storing 1030 in location 1040 +run/0: instruction string-equal/2 +mem/0: location 1040 is 1030 +mem/0: storing 3 in location 1041 +run/0: instruction string-equal/3 +run/0: product 0 is 1034 +mem/0: storing 1034 in location 1042 +run/0: instruction string-equal/4 +mem/0: location 1042 is 1034 +mem/0: storing 3 in location 1043 +run/0: instruction string-equal/6 +run/0: ingredient 0 is a-len +mem/0: location 1041 is 3 +run/0: ingredient 1 is b-len +mem/0: location 1043 is 3 +run/0: product 0 is 1 +mem/0: storing 1 in location 1044 +run/0: instruction string-equal/7 +mem/0: location 1044 is 1 +run/0: ingredient 0 is 1 +run/0: ingredient 1 is +run/0: jumping to instruction 9 +run/0: instruction string-equal/10 +run/0: ingredient 0 is 0 +mem/0: storing 0 in location 1045 +run/0: instruction string-equal/12 +run/0: ingredient 0 is i +mem/0: location 1045 is 0 +run/0: ingredient 1 is a-len +mem/0: location 1041 is 3 +run/0: product 0 is 0 +mem/0: storing 0 in location 1046 +run/0: instruction string-equal/13 +mem/0: location 1046 is 0 +run/0: ingredient 0 is 0 +run/0: jump-if fell through +run/0: instruction string-equal/14 +run/0: ingredient 0 is {name: "a", value: 1, type: 2-5-8, 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"]} +mem/0: location 1045 is 0 +run/0: address to copy is 1031 +run/0: its type is 8 +mem/0: location 1031 is 97 +run/0: product 0 is 97 +mem/0: storing 97 in location 1047 +run/0: instruction string-equal/15 +run/0: ingredient 0 is {name: "b", value: 3, type: 2-5-8, 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"]} +mem/0: location 1045 is 0 +run/0: address to copy is 1035 +run/0: its type is 8 +mem/0: location 1035 is 97 +run/0: product 0 is 97 +mem/0: storing 97 in location 1048 +run/0: instruction string-equal/17 +run/0: ingredient 0 is a2 +mem/0: location 1047 is 97 +run/0: ingredient 1 is b2 +mem/0: location 1048 is 97 +run/0: product 0 is 1 +mem/0: storing 1 in location 1049 +run/0: instruction string-equal/18 +mem/0: location 1049 is 1 +run/0: ingredient 0 is 1 +run/0: ingredient 1 is +run/0: jumping to instruction 20 +run/0: instruction string-equal/21 +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/22 +run/0: ingredient 0 is -11 +run/0: pc now 11 +run/0: instruction string-equal/12 +run/0: ingredient 0 is i +mem/0: location 1045 is 1 +run/0: ingredient 1 is a-len +mem/0: location 1041 is 3 +run/0: product 0 is 0 +mem/0: storing 0 in location 1046 +run/0: instruction string-equal/13 +mem/0: location 1046 is 0 +run/0: ingredient 0 is 0 +run/0: jump-if fell through +run/0: instruction string-equal/14 +run/0: ingredient 0 is {name: "a", value: 1, type: 2-5-8, 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"]} +mem/0: location 1045 is 1 +run/0: address to copy is 1032 +run/0: its type is 8 +mem/0: location 1032 is 98 +run/0: product 0 is 98 +mem/0: storing 98 in location 1047 +run/0: instruction string-equal/15 +run/0: ingredient 0 is {name: "b", value: 3, type: 2-5-8, 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"]} +mem/0: location 1045 is 1 +run/0: address to copy is 1036 +run/0: its type is 8 +mem/0: location 1036 is 98 +run/0: product 0 is 98 +mem/0: storing 98 in location 1048 +run/0: instruction string-equal/17 +run/0: ingredient 0 is a2 +mem/0: location 1047 is 98 +run/0: ingredient 1 is b2 +mem/0: location 1048 is 98 +run/0: product 0 is 1 +mem/0: storing 1 in location 1049 +run/0: instruction string-equal/18 +mem/0: location 1049 is 1 +run/0: ingredient 0 is 1 +run/0: ingredient 1 is +run/0: jumping to instruction 20 +run/0: instruction string-equal/21 +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/22 +run/0: ingredient 0 is -11 +run/0: pc now 11 +run/0: instruction string-equal/12 +run/0: ingredient 0 is i +mem/0: location 1045 is 2 +run/0: ingredient 1 is a-len +mem/0: location 1041 is 3 +run/0: product 0 is 0 +mem/0: storing 0 in location 1046 +run/0: instruction string-equal/13 +mem/0: location 1046 is 0 +run/0: ingredient 0 is 0 +run/0: jump-if fell through +run/0: instruction string-equal/14 +run/0: ingredient 0 is {name: "a", value: 1, type: 2-5-8, 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"]} +mem/0: location 1045 is 2 +run/0: address to copy is 1033 +run/0: its type is 8 +mem/0: location 1033 is 99 +run/0: product 0 is 99 +mem/0: storing 99 in location 1047 +run/0: instruction string-equal/15 +run/0: ingredient 0 is {name: "b", value: 3, type: 2-5-8, 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"]} +mem/0: location 1045 is 2 +run/0: address to copy is 1037 +run/0: its type is 8 +mem/0: location 1037 is 99 +run/0: product 0 is 99 +mem/0: storing 99 in location 1048 +run/0: instruction string-equal/17 +run/0: ingredient 0 is a2 +mem/0: location 1047 is 99 +run/0: ingredient 1 is b2 +mem/0: location 1048 is 99 +run/0: product 0 is 1 +mem/0: storing 1 in location 1049 +run/0: instruction string-equal/18 +mem/0: location 1049 is 1 +run/0: ingredient 0 is 1 +run/0: ingredient 1 is +run/0: jumping to instruction 20 +run/0: instruction string-equal/21 +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/22 +run/0: ingredient 0 is -11 +run/0: pc now 11 +run/0: instruction string-equal/12 +run/0: ingredient 0 is i +mem/0: location 1045 is 3 +run/0: ingredient 1 is a-len +mem/0: location 1041 is 3 +run/0: product 0 is 1 +mem/0: storing 1 in location 1046 +run/0: instruction string-equal/13 +mem/0: location 1046 is 1 +run/0: ingredient 0 is 1 +run/0: ingredient 1 is +run/0: jumping to instruction 23 +run/0: instruction string-equal/24 +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 new file mode 100644 index 00000000..43ab5d7d --- /dev/null +++ b/cpp/.traces/string-equal-reflexive @@ -0,0 +1,225 @@ +parse/0: instruction: 30 +parse/0: ingredient: {name: "location", value: 0, type: 0, properties: ["location": "type"]} +parse/0: ingredient: {name: "30", value: 0, type: 0, properties: ["30": "literal"]} +parse/0: product: {name: "default-space", value: 0, type: 2-0, properties: ["default-space": "address":"space"]} +parse/0: instruction: 30 +parse/0: ingredient: {name: "abc", value: 0, type: 0, properties: ["abc": "literal-string"]} +parse/0: product: {name: "x", value: 0, type: 2-5-8, properties: ["x": "address":"array":"character"]} +parse/0: instruction: 32 +parse/0: ingredient: {name: "x", value: 0, type: 2-5-8, properties: ["x": "address":"array":"character"]} +parse/0: ingredient: {name: "x", value: 0, type: 2-5-8, properties: ["x": "address":"array":"character"]} +parse/0: product: {name: "3", value: 0, type: 3, properties: ["3": "boolean", "raw": ]} +new/0: location -> 1 +new/0: abc -> 0 +name/0: assign x 1 +after-brace/0: recipe test-string-equal-reflexive +after-brace/0: new ... +after-brace/0: new ... +after-brace/0: string-equal ... +run/0: instruction test-string-equal-reflexive/0 +mem/0: array size is 30 +run/0: instruction test-string-equal-reflexive/1 +mem/0: storing 1030 in location 1002 +run/0: instruction test-string-equal-reflexive/2 +mem/0: location 1002 is 1030 +mem/0: location 1002 is 1030 +run/0: instruction string-equal/0 +mem/0: array size is 30 +run/0: instruction string-equal/1 +run/0: product 0 is 1030 +mem/0: storing 1030 in location 1036 +run/0: instruction string-equal/2 +mem/0: location 1036 is 1030 +mem/0: storing 3 in location 1037 +run/0: instruction string-equal/3 +run/0: product 0 is 1030 +mem/0: storing 1030 in location 1038 +run/0: instruction string-equal/4 +mem/0: location 1038 is 1030 +mem/0: storing 3 in location 1039 +run/0: instruction string-equal/6 +run/0: ingredient 0 is a-len +mem/0: location 1037 is 3 +run/0: ingredient 1 is b-len +mem/0: location 1039 is 3 +run/0: product 0 is 1 +mem/0: storing 1 in location 1040 +run/0: instruction string-equal/7 +mem/0: location 1040 is 1 +run/0: ingredient 0 is 1 +run/0: ingredient 1 is +run/0: jumping to instruction 9 +run/0: instruction string-equal/10 +run/0: ingredient 0 is 0 +mem/0: storing 0 in location 1041 +run/0: instruction string-equal/12 +run/0: ingredient 0 is i +mem/0: location 1041 is 0 +run/0: ingredient 1 is a-len +mem/0: location 1037 is 3 +run/0: product 0 is 0 +mem/0: storing 0 in location 1042 +run/0: instruction string-equal/13 +mem/0: location 1042 is 0 +run/0: ingredient 0 is 0 +run/0: jump-if fell through +run/0: instruction string-equal/14 +run/0: ingredient 0 is {name: "a", value: 1, type: 2-5-8, 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"]} +mem/0: location 1041 is 0 +run/0: address to copy is 1031 +run/0: its type is 8 +mem/0: location 1031 is 97 +run/0: product 0 is 97 +mem/0: storing 97 in location 1043 +run/0: instruction string-equal/15 +run/0: ingredient 0 is {name: "b", value: 3, type: 2-5-8, 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"]} +mem/0: location 1041 is 0 +run/0: address to copy is 1031 +run/0: its type is 8 +mem/0: location 1031 is 97 +run/0: product 0 is 97 +mem/0: storing 97 in location 1044 +run/0: instruction string-equal/17 +run/0: ingredient 0 is a2 +mem/0: location 1043 is 97 +run/0: ingredient 1 is b2 +mem/0: location 1044 is 97 +run/0: product 0 is 1 +mem/0: storing 1 in location 1045 +run/0: instruction string-equal/18 +mem/0: location 1045 is 1 +run/0: ingredient 0 is 1 +run/0: ingredient 1 is +run/0: jumping to instruction 20 +run/0: instruction string-equal/21 +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/22 +run/0: ingredient 0 is -11 +run/0: pc now 11 +run/0: instruction string-equal/12 +run/0: ingredient 0 is i +mem/0: location 1041 is 1 +run/0: ingredient 1 is a-len +mem/0: location 1037 is 3 +run/0: product 0 is 0 +mem/0: storing 0 in location 1042 +run/0: instruction string-equal/13 +mem/0: location 1042 is 0 +run/0: ingredient 0 is 0 +run/0: jump-if fell through +run/0: instruction string-equal/14 +run/0: ingredient 0 is {name: "a", value: 1, type: 2-5-8, 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"]} +mem/0: location 1041 is 1 +run/0: address to copy is 1032 +run/0: its type is 8 +mem/0: location 1032 is 98 +run/0: product 0 is 98 +mem/0: storing 98 in location 1043 +run/0: instruction string-equal/15 +run/0: ingredient 0 is {name: "b", value: 3, type: 2-5-8, 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"]} +mem/0: location 1041 is 1 +run/0: address to copy is 1032 +run/0: its type is 8 +mem/0: location 1032 is 98 +run/0: product 0 is 98 +mem/0: storing 98 in location 1044 +run/0: instruction string-equal/17 +run/0: ingredient 0 is a2 +mem/0: location 1043 is 98 +run/0: ingredient 1 is b2 +mem/0: location 1044 is 98 +run/0: product 0 is 1 +mem/0: storing 1 in location 1045 +run/0: instruction string-equal/18 +mem/0: location 1045 is 1 +run/0: ingredient 0 is 1 +run/0: ingredient 1 is +run/0: jumping to instruction 20 +run/0: instruction string-equal/21 +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/22 +run/0: ingredient 0 is -11 +run/0: pc now 11 +run/0: instruction string-equal/12 +run/0: ingredient 0 is i +mem/0: location 1041 is 2 +run/0: ingredient 1 is a-len +mem/0: location 1037 is 3 +run/0: product 0 is 0 +mem/0: storing 0 in location 1042 +run/0: instruction string-equal/13 +mem/0: location 1042 is 0 +run/0: ingredient 0 is 0 +run/0: jump-if fell through +run/0: instruction string-equal/14 +run/0: ingredient 0 is {name: "a", value: 1, type: 2-5-8, 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"]} +mem/0: location 1041 is 2 +run/0: address to copy is 1033 +run/0: its type is 8 +mem/0: location 1033 is 99 +run/0: product 0 is 99 +mem/0: storing 99 in location 1043 +run/0: instruction string-equal/15 +run/0: ingredient 0 is {name: "b", value: 3, type: 2-5-8, 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"]} +mem/0: location 1041 is 2 +run/0: address to copy is 1033 +run/0: its type is 8 +mem/0: location 1033 is 99 +run/0: product 0 is 99 +mem/0: storing 99 in location 1044 +run/0: instruction string-equal/17 +run/0: ingredient 0 is a2 +mem/0: location 1043 is 99 +run/0: ingredient 1 is b2 +mem/0: location 1044 is 99 +run/0: product 0 is 1 +mem/0: storing 1 in location 1045 +run/0: instruction string-equal/18 +mem/0: location 1045 is 1 +run/0: ingredient 0 is 1 +run/0: ingredient 1 is +run/0: jumping to instruction 20 +run/0: instruction string-equal/21 +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/22 +run/0: ingredient 0 is -11 +run/0: pc now 11 +run/0: instruction string-equal/12 +run/0: ingredient 0 is i +mem/0: location 1041 is 3 +run/0: ingredient 1 is a-len +mem/0: location 1037 is 3 +run/0: product 0 is 1 +mem/0: storing 1 in location 1042 +run/0: instruction string-equal/13 +mem/0: location 1042 is 1 +run/0: ingredient 0 is 1 +run/0: ingredient 1 is +run/0: jumping to instruction 23 +run/0: instruction string-equal/24 +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 new file mode 100644 index 00000000..9a447e51 --- /dev/null +++ b/cpp/.traces/string-equal-with-empty @@ -0,0 +1,61 @@ +parse/0: instruction: 30 +parse/0: ingredient: {name: "location", value: 0, type: 0, properties: ["location": "type"]} +parse/0: ingredient: {name: "30", value: 0, type: 0, properties: ["30": "literal"]} +parse/0: product: {name: "default-space", value: 0, type: 2-0, properties: ["default-space": "address":"space"]} +parse/0: instruction: 30 +parse/0: ingredient: {name: "", value: 0, type: 0, properties: ["": "literal-string"]} +parse/0: product: {name: "x", value: 0, type: 2-5-8, properties: ["x": "address":"array":"character"]} +parse/0: instruction: 30 +parse/0: ingredient: {name: "abcd", value: 0, type: 0, properties: ["abcd": "literal-string"]} +parse/0: product: {name: "y", value: 0, type: 2-5-8, properties: ["y": "address":"array":"character"]} +parse/0: instruction: 32 +parse/0: ingredient: {name: "x", value: 0, type: 2-5-8, properties: ["x": "address":"array":"character"]} +parse/0: ingredient: {name: "y", value: 0, type: 2-5-8, properties: ["y": "address":"array":"character"]} +parse/0: product: {name: "3", value: 0, type: 3, properties: ["3": "boolean", "raw": ]} +new/0: location -> 1 +new/0: -> 0 +name/0: assign x 1 +new/0: abcd -> 0 +name/0: assign y 2 +after-brace/0: recipe test-string-equal-with-empty +after-brace/0: new ... +after-brace/0: new ... +after-brace/0: new ... +after-brace/0: string-equal ... +run/0: instruction test-string-equal-with-empty/0 +mem/0: array size is 30 +run/0: instruction test-string-equal-with-empty/1 +mem/0: storing 1030 in location 1002 +run/0: instruction test-string-equal-with-empty/2 +mem/0: storing 1031 in location 1003 +run/0: instruction test-string-equal-with-empty/3 +mem/0: location 1002 is 1030 +mem/0: location 1003 is 1031 +run/0: instruction string-equal/0 +mem/0: array size is 30 +run/0: instruction string-equal/1 +run/0: product 0 is 1030 +mem/0: storing 1030 in location 1038 +run/0: instruction string-equal/2 +mem/0: location 1038 is 1030 +mem/0: storing 0 in location 1039 +run/0: instruction string-equal/3 +run/0: product 0 is 1031 +mem/0: storing 1031 in location 1040 +run/0: instruction string-equal/4 +mem/0: location 1040 is 1031 +mem/0: storing 4 in location 1041 +run/0: instruction string-equal/6 +run/0: ingredient 0 is a-len +mem/0: location 1039 is 0 +run/0: ingredient 1 is b-len +mem/0: location 1041 is 4 +run/0: product 0 is 0 +mem/0: storing 0 in location 1042 +run/0: instruction string-equal/7 +mem/0: location 1042 is 0 +run/0: ingredient 0 is 0 +run/0: jump-if fell through +run/0: instruction string-equal/8 +run/0: result 0 is 0 +mem/0: storing 0 in location 3 diff --git a/cpp/031scenario b/cpp/031scenario index 693f9bf8..8a3ced47 100644 --- a/cpp/031scenario +++ b/cpp/031scenario @@ -13,7 +13,8 @@ time_t mu_time; time(&mu_time); cerr << "\nMu tests: " << ctime(&mu_time); for (size_t i = 0; i < Scenarios.size(); ++i) { setup(); - Trace_stream = new trace_stream; + Trace_file = Scenarios[i].name; + START_TRACING_UNTIL_END_OF_SCOPE //? Trace_stream->dump_layer = "all"; //? 1 //? cout << "Before:\n"; dump_memory(); //? 1 //? cout << Scenarios[i].to_run; //? 1 |