From 82ac0b7ecbc145ed8c8ecd8309166f654af1ee75 Mon Sep 17 00:00:00 2001 From: "Kartik K. Agaram" Date: Tue, 14 Apr 2015 19:06:57 -0700 Subject: 1063 - variable names for surrounding spaces now work This was a pain to debug. --- cpp/.traces/closure | 120 +++++++++++++++++++++ cpp/.traces/convert_names_warns | 1 + cpp/.traces/new | 2 + cpp/.traces/new_array | 2 + .../string-equal-common-lengths-but-distinct | 2 + cpp/.traces/string-equal-distinct-lengths | 2 + cpp/.traces/string-equal-identical | 2 + cpp/.traces/string-equal-reflexive | 2 + cpp/.traces/string-equal-with-empty | 2 + cpp/.traces/surrounding_space | 3 +- 10 files changed, 137 insertions(+), 1 deletion(-) create mode 100644 cpp/.traces/closure (limited to 'cpp/.traces') diff --git a/cpp/.traces/closure b/cpp/.traces/closure new file mode 100644 index 00000000..152df47e --- /dev/null +++ b/cpp/.traces/closure @@ -0,0 +1,120 @@ +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: 1001 +parse/0: product: {name: "1", value: 0, type: 2-0, properties: ["1": "address":"space", "names": "init-counter"]} +parse/0: instruction: 1002 +parse/0: ingredient: {name: "1", value: 0, type: 2-0, properties: ["1": "address":"space", "names": "init-counter"]} +parse/0: product: {name: "2", value: 0, type: 1, properties: ["2": "integer", "raw": ]} +parse/0: instruction: 1002 +parse/0: ingredient: {name: "1", value: 0, type: 2-0, properties: ["1": "address":"space", "names": "init-counter"]} +parse/0: product: {name: "3", value: 0, type: 1, properties: ["3": "integer", "raw": ]} +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: 1 +parse/0: ingredient: {name: "23", value: 0, type: 0, properties: ["23": "literal"]} +parse/0: product: {name: "x", value: 0, type: 1, properties: ["x": "integer"]} +parse/0: instruction: 1 +parse/0: ingredient: {name: "3", value: 0, type: 0, properties: ["3": "literal"]} +parse/0: product: {name: "y", value: 0, type: 1, properties: ["y": "integer"]} +parse/0: instruction: 23 +parse/0: ingredient: {name: "default-space", value: 0, type: 2-0, properties: ["default-space": "address":"space"]} +parse/0: instruction: 30 +parse/0: ingredient: {name: "space", value: 0, type: 0, properties: ["space": "literal"]} +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: 22 +parse/0: product: {name: "0", value: 0, type: 2-0, properties: ["0": "address":"space", "names": "init-counter"]} +parse/0: instruction: 2 +parse/0: ingredient: {name: "y", value: 0, type: 1, properties: ["y": "integer", "space": "1"]} +parse/0: ingredient: {name: "1", value: 0, type: 0, properties: ["1": "literal"]} +parse/0: product: {name: "y", value: 0, type: 1, properties: ["y": "integer", "space": "1"]} +parse/0: instruction: 1 +parse/0: ingredient: {name: "234", value: 0, type: 0, properties: ["234": "literal"]} +parse/0: product: {name: "y", value: 0, type: 1, properties: ["y": "integer"]} +parse/0: instruction: 23 +parse/0: ingredient: {name: "y", value: 0, type: 1, properties: ["y": "integer", "space": "1"]} +name/0: recipe increment-counter is surrounded by init-counter +new/0: location -> 1 +name/0: assign x 1 +name/0: assign y 2 +new/0: space -> 0 +name/0: assign y 1 +new/0: location -> 1 +after-brace/0: recipe init-counter +after-brace/0: new ... +after-brace/0: copy ... +after-brace/0: copy ... +after-brace/0: reply ... +after-brace/0: recipe increment-counter +after-brace/0: new ... +after-brace/0: next-ingredient ... +after-brace/0: add ... +after-brace/0: copy ... +after-brace/0: reply ... +after-brace/0: recipe main +after-brace/0: new ... +after-brace/0: init-counter ... +after-brace/0: increment-counter ... +after-brace/0: increment-counter ... +run/0: instruction main/0 +mem/0: new alloc: 1000 +mem/0: array size is 30 +run/0: instruction main/1 +run/0: instruction init-counter/0 +mem/0: new alloc: 1030 +mem/0: array size is 30 +run/0: instruction init-counter/1 +run/0: ingredient 0 is 23 +mem/0: storing 23 in location 1032 +run/0: instruction init-counter/2 +run/0: ingredient 0 is 3 +mem/0: storing 3 in location 1033 +run/0: instruction init-counter/3 +run/0: result 0 is 1030 +mem/0: storing 1030 in location 1002 +run/0: instruction main/2 +mem/0: location 1002 is 1030 +run/0: instruction increment-counter/0 +mem/0: new alloc: 1060 +mem/0: array size is 30 +run/0: instruction increment-counter/1 +run/0: product 0 is 1030 +mem/0: storing 1030 in location 1061 +run/0: instruction increment-counter/2 +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: ingredient 0 is 234 +mem/0: storing 234 in location 1062 +run/0: instruction increment-counter/4 +mem/0: location 1033 is 4 +run/0: result 0 is 4 +mem/0: storing 4 in location 2 +run/0: instruction main/3 +mem/0: location 1002 is 1030 +run/0: instruction increment-counter/0 +mem/0: new alloc: 1090 +mem/0: array size is 30 +run/0: instruction increment-counter/1 +run/0: product 0 is 1030 +mem/0: storing 1030 in location 1091 +run/0: instruction increment-counter/2 +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: ingredient 0 is 234 +mem/0: storing 234 in location 1092 +run/0: instruction increment-counter/4 +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_warns b/cpp/.traces/convert_names_warns index 837f83df..11614845 100644 --- a/cpp/.traces/convert_names_warns +++ b/cpp/.traces/convert_names_warns @@ -2,6 +2,7 @@ parse/0: instruction: 1 parse/0: ingredient: {name: "y", value: 0, type: 1, properties: ["y": "integer"]} parse/0: product: {name: "x", value: 0, type: 1, properties: ["x": "integer"]} warn/0: use before set: y in main +warn/0: name not found: y name/0: assign x 1 after-brace/0: recipe main after-brace/0: copy ... diff --git a/cpp/.traces/new b/cpp/.traces/new index e9be5862..4c3d8001 100644 --- a/cpp/.traces/new +++ b/cpp/.traces/new @@ -15,8 +15,10 @@ after-brace/0: new ... after-brace/0: new ... after-brace/0: equal ... run/0: instruction main/0 +mem/0: new alloc: 1000 mem/0: storing 1000 in location 1 run/0: instruction main/1 +mem/0: new alloc: 1001 mem/0: storing 1001 in location 2 run/0: instruction main/2 run/0: ingredient 0 is 1 diff --git a/cpp/.traces/new_array b/cpp/.traces/new_array index 8a44bcf8..d2e846bb 100644 --- a/cpp/.traces/new_array +++ b/cpp/.traces/new_array @@ -16,9 +16,11 @@ after-brace/0: new ... after-brace/0: new ... after-brace/0: subtract ... run/0: instruction main/0 +mem/0: new alloc: 1000 mem/0: storing 1000 in location 1 mem/0: array size is 5 run/0: instruction main/1 +mem/0: new alloc: 1005 mem/0: storing 1005 in location 2 run/0: instruction main/2 run/0: ingredient 0 is 2 diff --git a/cpp/.traces/string-equal-common-lengths-but-distinct b/cpp/.traces/string-equal-common-lengths-but-distinct index 58112874..e5e99282 100644 --- a/cpp/.traces/string-equal-common-lengths-but-distinct +++ b/cpp/.traces/string-equal-common-lengths-but-distinct @@ -23,6 +23,7 @@ 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: new alloc: 1000 mem/0: array size is 30 run/0: instruction test-string-equal-common-lengths-but-distinct/1 mem/0: storing 1030 in location 1002 @@ -32,6 +33,7 @@ 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: new alloc: 1038 mem/0: array size is 30 run/0: instruction string-equal/1 run/0: product 0 is 1030 diff --git a/cpp/.traces/string-equal-distinct-lengths b/cpp/.traces/string-equal-distinct-lengths index 6008eaf4..4af8113c 100644 --- a/cpp/.traces/string-equal-distinct-lengths +++ b/cpp/.traces/string-equal-distinct-lengths @@ -23,6 +23,7 @@ after-brace/0: new ... after-brace/0: new ... after-brace/0: string-equal ... run/0: instruction test-string-equal-distinct-lengths/0 +mem/0: new alloc: 1000 mem/0: array size is 30 run/0: instruction test-string-equal-distinct-lengths/1 mem/0: storing 1030 in location 1002 @@ -32,6 +33,7 @@ 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: new alloc: 1039 mem/0: array size is 30 run/0: instruction string-equal/1 run/0: product 0 is 1030 diff --git a/cpp/.traces/string-equal-identical b/cpp/.traces/string-equal-identical index ad2db713..7d25443e 100644 --- a/cpp/.traces/string-equal-identical +++ b/cpp/.traces/string-equal-identical @@ -23,6 +23,7 @@ after-brace/0: new ... after-brace/0: new ... after-brace/0: string-equal ... run/0: instruction test-string-equal-identical/0 +mem/0: new alloc: 1000 mem/0: array size is 30 run/0: instruction test-string-equal-identical/1 mem/0: storing 1030 in location 1002 @@ -32,6 +33,7 @@ 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: new alloc: 1038 mem/0: array size is 30 run/0: instruction string-equal/1 run/0: product 0 is 1030 diff --git a/cpp/.traces/string-equal-reflexive b/cpp/.traces/string-equal-reflexive index be1548bb..ab94aa39 100644 --- a/cpp/.traces/string-equal-reflexive +++ b/cpp/.traces/string-equal-reflexive @@ -17,6 +17,7 @@ after-brace/0: new ... after-brace/0: new ... after-brace/0: string-equal ... run/0: instruction test-string-equal-reflexive/0 +mem/0: new alloc: 1000 mem/0: array size is 30 run/0: instruction test-string-equal-reflexive/1 mem/0: storing 1030 in location 1002 @@ -24,6 +25,7 @@ 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: new alloc: 1034 mem/0: array size is 30 run/0: instruction string-equal/1 run/0: product 0 is 1030 diff --git a/cpp/.traces/string-equal-with-empty b/cpp/.traces/string-equal-with-empty index 13f64aac..22a9d4a9 100644 --- a/cpp/.traces/string-equal-with-empty +++ b/cpp/.traces/string-equal-with-empty @@ -23,6 +23,7 @@ after-brace/0: new ... after-brace/0: new ... after-brace/0: string-equal ... run/0: instruction test-string-equal-with-empty/0 +mem/0: new alloc: 1000 mem/0: array size is 30 run/0: instruction test-string-equal-with-empty/1 mem/0: storing 1030 in location 1002 @@ -32,6 +33,7 @@ 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: new alloc: 1036 mem/0: array size is 30 run/0: instruction string-equal/1 run/0: product 0 is 1030 diff --git a/cpp/.traces/surrounding_space b/cpp/.traces/surrounding_space index 0f1371d5..f4bc55fe 100644 --- a/cpp/.traces/surrounding_space +++ b/cpp/.traces/surrounding_space @@ -9,13 +9,14 @@ parse/0: ingredient: {name: "10", value: 0, type: 0, properties: ["10": "liter parse/0: product: {name: "default-space", value: 0, type: 2-0, properties: ["default-space": "address":"space"]} parse/0: instruction: 1 parse/0: ingredient: {name: "20", value: 0, type: 0, properties: ["20": "literal"]} -parse/0: product: {name: "0", value: 0, type: 2-0, properties: ["0": "address":"space"]} +parse/0: product: {name: "0", value: 0, type: 2-0, properties: ["0": "address":"space", "names": "dummy"]} parse/0: instruction: 1 parse/0: ingredient: {name: "32", value: 0, type: 0, properties: ["32": "literal"]} parse/0: product: {name: "1", value: 0, type: 1, properties: ["1": "integer"]} parse/0: instruction: 1 parse/0: ingredient: {name: "33", value: 0, type: 0, properties: ["33": "literal"]} parse/0: product: {name: "1", value: 0, type: 1, properties: ["1": "integer", "space": "1"]} +name/0: recipe main is surrounded by dummy after-brace/0: recipe main after-brace/0: copy ... after-brace/0: copy ... -- cgit 1.4.1-2-gfad0