about summary refs log tree commit diff stats
path: root/cpp/.traces/string-equal-distinct-lengths
blob: 3a92b20443deb8c9874540fa89c7933e33c2414d (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
pre { line-height: 125%; }
td.linenos .normal { color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px; }
span.linenos { color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px; }
td.linenos .special { color: #000000; background-color: #ffffc0; padding-left: 5px; padding-right: 5px; }
span.linenos.special { color: #000000; background-color: #ffffc0; padding-left: 5px; padding-right: 5px; }
.highlight .hll { background-color: #ffffcc }
.highlight .c { color: #888888 } /* Comment */
.highlight .err { color: #a61717; background-color: #e3d2d2 } /* Error */
.highlight .k { color: #008800; font-weight: bold } /* Keyword */
.highlight .ch { color: #888888 } /* Comment.Hashbang */
.highlight .cm { color: #888888 } /* Comment.Multiline */
.highlight .cp { color: #cc0000; font-weight: bold } /* Comment.Preproc */
.highlight .cpf { color: #888888 } /* Comment.PreprocFile */
.highlight .c1 { color: #888888 } /* Comment.Single */
.highlight .cs { color: #cc0000; font-weight: bold; background-color: #fff0f0 } /* Comment.Special */
.highlight .gd { color: #000000; background-color: #ffdddd } /* Generic.Deleted */
.highlight .ge { font-style: italic } /* Generic.Emph */
.highlight .ges { font-weight: bold; font-style: italic } /* Generic.EmphStrong */
.highlight .gr { color: #aa0000 } /* Generic.Error */
.highlight .gh { color: #333333 } /* Generic.Heading */
.highlight .gi { color: #000000; background-color: #ddffdd } /* Generic.Inserted */
.highlight .go { color: #888888 } /* Generic.Output */
.highlight .gp { color: #555555 } /* Generic.Prompt */
.highlight .gs { font-weight: bold } /* Generic.Strong */
.highlight .gu { color: #666666 } /* Generic.Subheading */
.highlight .gt { color: #aa0000 } /* Generic.Traceback */
.highlight .kc { color: #008800; font-weight: bold } /* Keyword.Constant */
.highlight .kd { color: #008800; font-weight: bold } /* Keyword.Declaration */
.highlight .kn { color: #008800; font-weight: bold } /* Keyword.Namespace */
.highlight .kp { color: #008800 } /* Keyword.Pseudo */
.highlight .kr { color: #008800; font-weight: bold } /* Keyword.Reserved */
.highlight .kt { color: #888888; font-weight: bold } /* Keyword.Type */
.highlight .m { color: #0000DD; font-weight: bold } /* Literal.Number */
.highlight .s { color: #dd2200; background-color: #fff0f0 } /* Literal.String */
.highlight .na { color: #336699 } /* Name.Attribute */
.highlight .nb { color: #003388 } /* Name.Builtin */
.highlight .nc { color: #bb0066; font-weight: bold } /* Name.Class */
.highlight .no { color: #003366; font-weight: bold } /* Name.Constant */
.highlight .nd { 
parse/0: instruction: run
parse/0:   ingredient: {name: "
    default-space:address:array:location <- new location:type, 30:literal
    x:address:array:character <- new [abc]
    y:address:array:character <- new [abcd]
    3:boolean/raw <- string-equal x:address:array:character, y:address:array:character
  ", value: 0, type: 0, properties: ["
    default-space:address:array:location <- new location:type, 30:literal
    x:address:array:character <- new [abc]
    y:address:array:character <- new [abcd]
    3:boolean/raw <- string-equal x:address:array:character, y:address:array:character
  ": "literal-string"]}
parse/0: instruction: memory-should-contain
parse/0:   ingredient: {name: "
    3 <- 0  # abc != abcd
  ", value: 0, type: 0, properties: ["
    3 <- 0  # abc != abcd
  ": "literal-string"]}
parse/0: instruction: trace-should-contain
parse/0:   ingredient: {name: "
    string-equal: comparing lengths
  ", value: 0, type: 0, properties: ["
    string-equal: comparing lengths
  ": "literal-string"]}
parse/0: instruction: trace-should-not-contain
parse/0:   ingredient: {name: "
    string-equal: comparing characters
  ", value: 0, type: 0, properties: ["
    string-equal: comparing characters
  ": "literal-string"]}
after-brace/0: recipe string-equal-distinct-lengths
after-brace/0: run ...
after-brace/0: memory-should-contain ...
after-brace/0: trace-should-contain ...
after-brace/0: trace-should-not-contain ...
new/0: routine allocated memory from 1000 to 101000
schedule/0: string-equal-distinct-lengths
run/0: instruction string-equal-distinct-lengths/0
run/0: run/45 {name: "
    default-space:address:array:location <- new location:type, 30:literal
    x:address:array:character <- new [abc]
    y:address:array:character <- new [abcd]
    3:boolean/raw <- string-equal x:address:array:character, y:address:array:character
  ", value: 0, type: 0, properties: ["
    default-space:address:array:location <- new location:type, 30:literal
    x:address:array:character <- new [abc]
    y:address:array:character <- new [abcd]
    3:boolean/raw <- string-equal x:address:array:character, y:address:array:character
  ": "literal-string"]}
parse/0: instruction: new
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-5-1, properties: ["default-space": "address":"array":"location"]}
parse/0: instruction: new
parse/0:   ingredient: {name: "abc", value: 0, type: 0, properties: ["abc": "literal-string"]}
parse/0:   product: {name: "x", value: 0, type: 2-5-4, properties: ["x": "address":"array":"character"]}
parse/0: instruction: new
parse/0:   ingredient: {name: "abcd", value: 0, type: 0, properties: ["abcd": "literal-string"]}
parse/0:   product: {name: "y", value: 0, type: 2-5-4, properties: ["y": "address":"array":"character"]}
parse/0: instruction: string-equal
parse/0:   ingredient: {name: "x", value: 0, type: 2-5-4, properties: ["x": "address":"array":"character"]}
parse/0:   ingredient: {name: "y", value: 0, type: 2-5-4, 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 run1001
after-brace/0: new ...
after-brace/0: new ...
after-brace/0: new ...
after-brace/0: string-equal ...
run/0: instruction run1001/0
run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new/44 {name: "location", value: 1, type: 0, properties: ["location": "type"]}, {name: "30", value: 30, type: 0, properties: ["30": "literal"]}
mem/0: array size is 30
mem/0: new alloc: 1000
run/0: instruction run1001/1
run/0: {name: "x", value: 1, type: 2-5-4, properties: ["x": "address":"array":"character"]} <- new/44 {name: "abc", value: 0, type: 0, properties: ["abc": "literal-string"]}
mem/0: storing 1031 in location 1002
run/0: instruction run1001/2
run/0: {name: "y", value: 2, type: 2-5-4, properties: ["y": "address":"array":"character"]} <- new/44 {name: "abcd", value: 0, type: 0, properties: ["abcd": "literal-string"]}
mem/0: storing 1035 in location 1003
run/0: instruction run1001/3
run/0: {name: "3", value: 3, type: 3, properties: ["3": "boolean", "raw": ]} <- string-equal/100 {name: "x", value: 1, type: 2-5-4, properties: ["x": "address":"array":"character"]}, {name: "y", value: 2, type: 2-5-4, properties: ["y": "address":"array":"character"]}
mem/0: location 1002 is 1031
mem/0: location 1003 is 1035
run/0: instruction string-equal/0
run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new/44 {name: "location", value: 1, type: 0, properties: ["location": "type"]}, {name: "30", value: 30, type: 0, properties: ["30": "literal"]}
mem/0: array size is 30
mem/0: new alloc: 1040
run/0: instruction string-equal/1
run/0: {name: "a", value: 1, type: 2-5-4, properties: ["a": "address":"array":"character"]} <- next-ingredient/30 
run/0: product 0 is 1031
mem/0: storing 1031 in location 1042
run/0: instruction string-equal/2
run/0: {name: "a-len", value: 2, type: 1, properties: ["a-len": "integer"]} <- length/28 {name: "a", value: 1, type: 2-5-4, properties: ["a": "address":"array":"character", "deref": ]}
mem/0: location 1042 is 1031
mem/0: storing 3 in location 1043
run/0: instruction string-equal/3
run/0: {name: "b", value: 3, type: 2-5-4, properties: ["b": "address":"array":"character"]} <- next-ingredient/30 
run/0: product 0 is 1035
mem/0: storing 1035 in location 1044
run/0: instruction string-equal/4
run/0: {name: "b-len", value: 4, type: 1, properties: ["b-len": "integer"]} <- length/28 {name: "b", value: 3, type: 2-5-4, properties: ["b": "address":"array":"character", "deref": ]}
mem/0: location 1044 is 1035
mem/0: storing 4 in location 1045
run/0: instruction string-equal/6
run/0: trace/18 {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/13 {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 1043 is 3
run/0: ingredient 1 is b-len
mem/0: location 1045 is 4
run/0: product 0 is 0
mem/0: storing 0 in location 1046
run/0: instruction string-equal/8
run/0: break-if/11 {name: "length-equal?", value: 5, type: 3, properties: ["length-equal?": "boolean"]}, {name: "", value: 1, 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/9
run/0: reply/33 {name: "0", value: 0, type: 0, properties: ["0": "literal"]}
run/0: result 0 is 0
mem/0: storing 0 in location 3
run/0: instruction string-equal-distinct-lengths/1
run/0: memory-should-contain/46 {name: "
    3 <- 0  # abc != abcd
  ", value: 0, type: 0, properties: ["
    3 <- 0  # abc != abcd
  ": "literal-string"]}
run/0: checking location 3
run/0: instruction string-equal-distinct-lengths/2
run/0: trace-should-contain/47 {name: "
    string-equal: comparing lengths
  ", value: 0, type: 0, properties: ["
    string-equal: comparing lengths
  ": "literal-string"]}
run/0: instruction string-equal-distinct-lengths/3
run/0: trace-should-not-contain/48 {name: "
    string-equal: comparing characters
  ", value: 0, type: 0, properties: ["
    string-equal: comparing characters
  ": "literal-string"]}