about summary refs log tree commit diff stats
path: root/cpp/.traces/read-key-in-mu
blob: c1b0b274b2bdd0f94bdc297b57676bf5014ded44 (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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
parse/0: instruction: assume-keyboard
parse/0:   ingredient: {name: "abc", value: 0, type: 0, properties: ["abc": "literal-string"]}
parse/0: instruction: run
parse/0:   ingredient: {name: "
    1:character, 2:boolean, keyboard:address <- read-key keyboard:address
    3:character, 4:boolean, keyboard:address <- read-key keyboard:address
    5:character, 6:boolean, keyboard:address <- read-key keyboard:address
    7:character, 8:boolean, keyboard:address <- read-key keyboard:address
  ", value: 0, type: 0, properties: ["
    1:character, 2:boolean, keyboard:address <- read-key keyboard:address
    3:character, 4:boolean, keyboard:address <- read-key keyboard:address
    5:character, 6:boolean, keyboard:address <- read-key keyboard:address
    7:character, 8:boolean, keyboard:address <- read-key keyboard:address
  ": "literal-string"]}
parse/0: instruction: memory-should-contain
parse/0:   ingredient: {name: "
    1 <- 97  # 'a'
    2 <- 1  # first read-key call found a character
    3 <- 98  # 'b'
    4 <- 1  # second read-key call found a character
    5 <- 99  # 'c'
    6 <- 1  # third read-key call found a character
    7 <- 0
    8 <- 0  # fourth read-key call didn't find a character
  ", value: 0, type: 0, properties: ["
    1 <- 97  # 'a'
    2 <- 1  # first read-key call found a character
    3 <- 98  # 'b'
    4 <- 1  # second read-key call found a character
    5 <- 99  # 'c'
    6 <- 1  # third read-key call found a character
    7 <- 0
    8 <- 0  # fourth read-key call didn't find a character
  ": "literal-string"]}
new/0: abc -> 0
after-brace/0: recipe read-key-in-mu
after-brace/0: assume-keyboard ...
after-brace/0: assume-keyboard ...
after-brace/0: run ...
after-brace/0: memory-should-contain ...
new/0: routine allocated memory from 1000 to 101000
schedule/0: read-key-in-mu
run/0: instruction read-key-in-mu/0
run/0: {name: "keyboard", value: 901, type: 2, properties: ["keyboard": "address"]} <- assume-keyboard/44 {name: "abc", value: 0, type: 0, properties: ["abc": "literal-string"]}
mem/0: storing 1000 in location 901
run/0: instruction read-key-in-mu/1
run/0: {name: "keyboard", value: 901, type: 2, properties: ["keyboard": "address"]} <- assume-keyboard/125 {name: "keyboard", value: 901, type: 2, properties: ["keyboard": "address"]}
mem/0: location 901 is 1000
run/0: instruction init-fake-keyboard/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: 1004
run/0: instruction init-fake-keyboard/1
run/0: {name: "result", value: 1, type: 2-12, properties: ["result": "address":"keyboard"]} <- new/44 {name: "keyboard", value: 12, type: 0, properties: ["keyboard": "type"]}
mem/0: new alloc: 1035
mem/0: storing 1035 in location 1006
run/0: instruction init-fake-keyboard/2
run/0: {name: "buf", value: 2, type: 2-2-5-4, properties: ["buf": "address":"address":"array":"character"]} <- get-address/25 {name: "result", value: 1, type: 2-12, properties: ["result": "address":"keyboard", "deref": ]}, {name: "data", value: 1, type: 0, properties: ["data": "offset"]}
run/0: ingredient 0 is result
mem/0: location 1006 is 1035
run/0: ingredient 1 is data
run/0: address to copy is 1036
run/0: product 0 is 1036
mem/0: storing 1036 in location 1007
run/0: instruction init-fake-keyboard/3
run/0: {name: "buf", value: 2, type: 2-2-5-4, properties: ["buf": "address":"address":"array":"character", "deref": ]} <- next-ingredient/30 
run/0: product 0 is 1000
mem/0: location 1007 is 1036
mem/0: storing 1000 in location 1036
run/0: instruction init-fake-keyboard/4
run/0: {name: "idx", value: 3, type: 2-1, properties: ["idx": "address":"integer"]} <- get-address/25 {name: "result", value: 1, type: 2-12, properties: ["result": "address":"keyboard", "deref": ]}, {name: "index", value: 0, type: 0, properties: ["index": "offset"]}
run/0: ingredient 0 is result
mem/0: location 1006 is 1035
run/0: ingredient 1 is index
run/0: address to copy is 1035
run/0: product 0 is 1035
mem/0: storing 1035 in location 1008
run/0: instruction init-fake-keyboard/5
run/0: {name: "idx", value: 3, type: 2-1, properties: ["idx": "address":"integer", "deref": ]} <- copy/1 {name: "0", value: 0, type: 0, properties: ["0": "literal"]}
run/0: ingredient 0 is 0
mem/0: location 1008 is 1035
mem/0: storing 0 in location 1035
run/0: instruction init-fake-keyboard/6
run/0: reply/33 {name: "result", value: 1, type: 2-12, properties: ["result": "address":"keyboard"]}
mem/0: location 1006 is 1035
run/0: result 0 is 1035
mem/0: storing 1035 in location 901
run/0: instruction read-key-in-mu/2
run/0: run/45 {name: "
    1:character, 2:boolean, keyboard:address <- read-key keyboard:address
    3:character, 4:boolean, keyboard:address <- read-key keyboard:address
    5:character, 6:boolean, keyboard:address <- read-key keyboard:address
    7:character, 8:boolean, keyboard:address <- read-key keyboard:address
  ", value: 0, type: 0, properties: ["
    1:character, 2:boolean, keyboard:address <- read-key keyboard:address
    3:character, 4:boolean, keyboard:address <- read-key keyboard:address
    5:character, 6:boolean, keyboard:address <- read-key keyboard:address
    7:character, 8:boolean, keyboard:address <- read-key keyboard:address
  ": "literal-string"]}
parse/0: instruction: read-key
parse/0:   ingredient: {name: "keyboard", value: 0, type: 2, properties: ["keyboard": "address"]}
parse/0:   product: {name: "1", value: 0, type: 4, properties: ["1": "character"]}
parse/0:   product: {name: "2", value: 0, type: 3, properties: ["2": "boolean"]}
parse/0:   product: {name: "keyboard", value: 0, type: 2, properties: ["keyboard": "address"]}
parse/0: instruction: read-key
parse/0:   ingredient: {name: "keyboard", value: 0, type: 2, properties: ["keyboard": "address"]}
parse/0:   product: {name: "3", value: 0, type: 4, properties: ["3": "character"]}
parse/0:   product: {name: "4", value: 0, type: 3, properties: ["4": "boolean"]}
parse/0:   product: {name: "keyboard", value: 0, type: 2, properties: ["keyboard": "address"]}
parse/0: instruction: read-key
parse/0:   ingredient: {name: "keyboard", value: 0, type: 2, properties: ["keyboard": "address"]}
parse/0:   product: {name: "5", value: 0, type: 4, properties: ["5": "character"]}
parse/0:   product: {name: "6", value: 0, type: 3, properties: ["6": "boolean"]}
parse/0:   product: {name: "keyboard", value: 0, type: 2, properties: ["keyboard": "address"]}
parse/0: instruction: read-key
parse/0:   ingredient: {name: "keyboard", value: 0, type: 2, properties: ["keyboard": "address"]}
parse/0:   product: {name: "7", value: 0, type: 4, properties: ["7": "character"]}
parse/0:   product: {name: "8", value: 0, type: 3, properties: ["8": "boolean"]}
parse/0:   product: {name: "keyboard", value: 0, type: 2, properties: ["keyboard": "address"]}
after-brace/0: recipe run1001
after-brace/0: read-key ...
after-brace/0: read-key ...
after-brace/0: read-key ...
after-brace/0: read-key ...
run/0: instruction run1001/0
run/0: {name: "1", value: 1, type: 4, properties: ["1": "character"]}, {name: "2", value: 2, type: 3, properties: ["2": "boolean"]}, {name: "keyboard", value: 901, type: 2, properties: ["keyboard": "address"]} <- read-key/126 {name: "keyboard", value: 901, type: 2, properties: ["keyboard": "address"]}
mem/0: location 901 is 1035
run/0: instruction read-key/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: 1037
run/0: instruction read-key/1
run/0: {name: "x", value: 1, type: 2-12, properties: ["x": "address":"keyboard"]} <- next-ingredient/30 
run/0: product 0 is 1035
mem/0: storing 1035 in location 1039
run/0: instruction read-key/3
run/0: break-unless/12 {name: "x", value: 1, type: 2-12, properties: ["x": "address":"keyboard"]}, {name: "", value: 11, type: , properties: ["": ]}
mem/0: location 1039 is 1035
run/0: ingredient 0 is 1035
run/0: jump-unless fell through
run/0: instruction read-key/4
run/0: {name: "idx", value: 2, type: 2-1, properties: ["idx": "address":"integer"]} <- get-address/25 {name: "x", value: 1, type: 2-12, properties: ["x": "address":"keyboard", "deref": ]}, {name: "index", value: 0, type: 0, properties: ["index": "offset"]}
run/0: ingredient 0 is x
mem/0: location 1039 is 1035
run/0: ingredient 1 is index
run/0: address to copy is 1035
run/0: product 0 is 1035
mem/0: storing 1035 in location 1040
run/0: instruction read-key/5
run/0: {name: "buf", value: 3, type: 2-5-4, properties: ["buf": "address":"array":"character"]} <- get/24 {name: "x", value: 1, type: 2-12, properties: ["x": "address":"keyboard", "deref": ]}, {name: "data", value: 1, type: 0, properties: ["data": "offset"]}
run/0: ingredient 0 is x
mem/0: location 1039 is 1035
run/0: ingredient 1 is data
run/0: address to copy is 1036
run/0: its type is 2
mem/0: location 1036 is 1000
run/0: product 0 is 1000
mem/0: storing 1000 in location 1041
run/0: instruction read-key/6
run/0: {name: "max", value: 4, type: 1, properties: ["max": "integer"]} <- length/28 {name: "buf", value: 3, type: 2-5-4, properties: ["buf": "address":"array":"character", "deref": ]}
mem/0: location 1041 is 1000
mem/0: storing 3 in location 1042
run/0: instruction read-key/8
run/0: {name: "done?", value: 5, type: 3, properties: ["done?": "boolean"]} <- greater-or-equal/16 {name: "idx", value: 2, type: 2-1, properties: ["idx": "address":"integer", "deref": ]}, {name: "max", value: 4, type: 1, properties: ["max": "integer"]}
run/0: ingredient 0 is idx
mem/0: location 1040 is 1035
mem/0: location 1035 is 0
run/0: ingredient 1 is max
mem/0: location 1042 is 3
run/0: product 0 is 0
mem/0: storing 0 in location 1043
run/0: instruction read-key/9
run/0: break-unless/12 {name: "done?", value: 5, type: 3, properties: ["done?": "boolean"]}, {name: "", value: 1, type: , properties: ["": ]}
mem/0: location 1043 is 0
run/0: ingredient 0 is 0
run/0: ingredient 1 is 
run/0: jumping to instruction 11
run/0: instruction read-key/12
run/0: {name: "c", value: 6, type: 4, properties: ["c": "character"]} <- index/26 {name: "buf", value: 3, type: 2-5-4, properties: ["buf": "address":"array":"character", "deref": ]}, {name: "idx", value: 2, type: 2-1, properties: ["idx": "address":"integer", "deref": ]}
run/0: ingredient 0 is {name: "buf", value: 3, type: 2-5-4, properties: ["buf": "address":"array":"character", "deref": ]}
mem/0: location 1041 is 1000
run/0: ingredient 1 is {name: "idx", value: 2, type: 2-1, properties: ["idx": "address":"integer", "deref": ]}
mem/0: location 1040 is 1035
mem/0: location 1035 is 0
run/0: address to copy is 1001
run/0: its type is 4
mem/0: location 1001 is 97
run/0: product 0 is 97
mem/0: storing 97 in location 1044
run/0: instruction read-key/13
run/0: {name: "idx", value: 2, type: 2-1, properties: ["idx": "address":"integer", "deref": ]} <- add/2 {name: "idx", value: 2, type: 2-1, properties: ["idx": "address":"integer", "deref": ]}, {name: "1", value: 1, type: 0, properties: ["1": "literal"]}
run/0: ingredient 0 is idx
mem/0: location 1040 is 1035
mem/0: location 1035 is 0
run/0: ingredient 1 is 1
run/0: product 0 is 1
mem/0: location 1040 is 1035
mem/0: storing 1 in location 1035
run/0: instruction read-key/14
run/0: reply/33 {name: "c", value: 6, type: 4, properties: ["c": "character"]}, {name: "1", value: 1, type: 0, properties: ["1": "literal", "found": ]}, {name: "x", value: 1, type: 2-12, properties: ["x": "address":"keyboard", "same-as-ingredient": "0"]}
mem/0: location 1044 is 97
mem/0: location 1039 is 1035
run/0: result 0 is 97
mem/0: storing 97 in location 1
run/0: result 1 is 1
mem/0: storing 1 in location 2
run/0: result 2 is 1035
mem/0: storing 1035 in location 901
run/0: instruction run1001/1
run/0: {name: "3", value: 3, type: 4, properties: ["3": "character"]}, {name: "4", value: 4, type: 3, properties: ["4": "boolean"]}, {name: "keyboard", value: 901, type: 2, properties: ["keyboard": "address"]} <- read-key/126 {name: "keyboard", value: 901, type: 2, properties: ["keyboard": "address"]}
mem/0: location 901 is 1035
run/0: instruction read-key/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: 1068
run/0: instruction read-key/1
run/0: {name: "x", value: 1, type: 2-12, properties: ["x": "address":"keyboard"]} <- next-ingredient/30 
run/0: product 0 is 1035
mem/0: storing 1035 in location 1070
run/0: instruction read-key/3
run/0: break-unless/12 {name: "x", value: 1, type: 2-12, properties: ["x": "address":"keyboard"]}, {name: "", value: 11, type: , properties: ["": ]}
mem/0: location 1070 is 1035
run/0: ingredient 0 is 1035
run/0: jump-unless fell through
run/0: instruction read-key/4
run/0: {name: "idx", value: 2, type: 2-1, properties: ["idx": "address":"integer"]} <- get-address/25 {name: "x", value: 1, type: 2-12, properties: ["x": "address":"keyboard", "deref": ]}, {name: "index", value: 0, type: 0, properties: ["index": "offset"]}
run/0: ingredient 0 is x
mem/0: location 1070 is 1035
run/0: ingredient 1 is index
run/0: address to copy is 1035
run/0: product 0 is 1035
mem/0: storing 1035 in location 1071
run/0: instruction read-key/5
run/0: {name: "buf", value: 3, type: 2-5-4, properties: ["buf": "address":"array":"character"]} <- get/24 {name: "x", value: 1, type: 2-12, properties: ["x": "address":"keyboard", "deref": ]}, {name: "data", value: 1, type: 0, properties: ["data": "offset"]}
run/0: ingredient 0 is x
mem/0: location 1070 is 1035
run/0: ingredient 1 is data
run/0: address to copy is 1036
run/0: its type is 2
mem/0: location 1036 is 1000
run/0: product 0 is 1000
mem/0: storing 1000 in location 1072
run/0: instruction read-key/6
run/0: {name: "max", value: 4, type: 1, properties: ["max": "integer"]} <- length/28 {name: "buf", value: 3, type: 2-5-4, properties: ["buf": "address":"array":"character", "deref": ]}
mem/0: location 1072 is 1000
mem/0: storing 3 in location 1073
run/0: instruction read-key/8
run/0: {name: "done?", value: 5, type: 3, properties: ["done?": "boolean"]} <- greater-or-equal/16 {name: "idx", value: 2, type: 2-1, properties: ["idx": "address":"integer", "deref": ]}, {name: "max", value: 4, type: 1, properties: ["max": "integer"]}
run/0: ingredient 0 is idx
mem/0: location 1071 is 1035
mem/0: location 1035 is 1
run/0: ingredient 1 is max
mem/0: location 1073 is 3
run/0: product 0 is 0
mem/0: storing 0 in location 1074
run/0: instruction read-key/9
run/0: break-unless/12 {name: "done?", value: 5, type: 3, properties: ["done?": "boolean"]}, {name: "", value: 1, type: , properties: ["": ]}
mem/0: location 1074 is 0
run/0: ingredient 0 is 0
run/0: ingredient 1 is 
run/0: jumping to instruction 11
run/0: instruction read-key/12
run/0: {name: "c", value: 6, type: 4, properties: ["c": "character"]} <- index/26 {name: "buf", value: 3, type: 2-5-4, properties: ["buf": "address":"array":"character", "deref": ]}, {name: "idx", value: 2, type: 2-1, properties: ["idx": "address":"integer", "deref": ]}
run/0: ingredient 0 is {name: "buf", value: 3, type: 2-5-4, properties: ["buf": "address":"array":"character", "deref": ]}
mem/0: location 1072 is 1000
run/0: ingredient 1 is {name: "idx", value: 2, type: 2-1, properties: ["idx": "address":"integer", "deref": ]}
mem/0: location 1071 is 1035
mem/0: location 1035 is 1
run/0: address to copy is 1002
run/0: its type is 4
mem/0: location 1002 is 98
run/0: product 0 is 98
mem/0: storing 98 in location 1075
run/0: instruction read-key/13
run/0: {name: "idx", value: 2, type: 2-1, properties: ["idx": "address":"integer", "deref": ]} <- add/2 {name: "idx", value: 2, type: 2-1, properties: ["idx": "address":"integer", "deref": ]}, {name: "1", value: 1, type: 0, properties: ["1": "literal"]}
run/0: ingredient 0 is idx
mem/0: location 1071 is 1035
mem/0: location 1035 is 1
run/0: ingredient 1 is 1
run/0: product 0 is 2
mem/0: location 1071 is 1035
mem/0: storing 2 in location 1035
run/0: instruction read-key/14
run/0: reply/33 {name: "c", value: 6, type: 4, properties: ["c": "character"]}, {name: "1", value: 1, type: 0, properties: ["1": "literal", "found": ]}, {name: "x", value: 1, type: 2-12, properties: ["x": "address":"keyboard", "same-as-ingredient": "0"]}
mem/0: location 1075 is 98
mem/0: location 1070 is 1035
run/0: result 0 is 98
mem/0: storing 98 in location 3
run/0: result 1 is 1
mem/0: storing 1 in location 4
run/0: result 2 is 1035
mem/0: storing 1035 in location 901
run/0: instruction run1001/2
run/0: {name: "5", value: 5, type: 4, properties: ["5": "character"]}, {name: "6", value: 6, type: 3, properties: ["6": "boolean"]}, {name: "keyboard", value: 901, type: 2, properties: ["keyboard": "address"]} <- read-key/126 {name: "keyboard", value: 901, type: 2, properties: ["keyboard": "address"]}
mem/0: location 901 is 1035
run/0: instruction read-key/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: 1099
run/0: instruction read-key/1
run/0: {name: "x", value: 1, type: 2-12, properties: ["x": "address":"keyboard"]} <- next-ingredient/30 
run/0: product 0 is 1035
mem/0: storing 1035 in location 1101
run/0: instruction read-key/3
run/0: break-unless/12 {name: "x", value: 1, type: 2-12, properties: ["x": "address":"keyboard"]}, {name: "", value: 11, type: , properties: ["": ]}
mem/0: location 1101 is 1035
run/0: ingredient 0 is 1035
run/0: jump-unless fell through
run/0: instruction read-key/4
run/0: {name: "idx", value: 2, type: 2-1, properties: ["idx": "address":"integer"]} <- get-address/25 {name: "x", value: 1, type: 2-12, properties: ["x": "address":"keyboard", "deref": ]}, {name: "index", value: 0, type: 0, properties: ["index": "offset"]}
run/0: ingredient 0 is x
mem/0: location 1101 is 1035
run/0: ingredient 1 is index
run/0: address to copy is 1035
run/0: product 0 is 1035
mem/0: storing 1035 in location 1102
run/0: instruction read-key/5
run/0: {name: "buf", value: 3, type: 2-5-4, properties: ["buf": "address":"array":"character"]} <- get/24 {name: "x", value: 1, type: 2-12, properties: ["x": "address":"keyboard", "deref": ]}, {name: "data", value: 1, type: 0, properties: ["data": "offset"]}
run/0: ingredient 0 is x
mem/0: location 1101 is 1035
run/0: ingredient 1 is data
run/0: address to copy is 1036
run/0: its type is 2
mem/0: location 1036 is 1000
run/0: product 0 is 1000
mem/0: storing 1000 in location 1103
run/0: instruction read-key/6
run/0: {name: "max", value: 4, type: 1, properties: ["max": "integer"]} <- length/28 {name: "buf", value: 3, type: 2-5-4, properties: ["buf": "address":"array":"character", "deref": ]}
mem/0: location 1103 is 1000
mem/0: storing 3 in location 1104
run/0: instruction read-key/8
run/0: {name: "done?", value: 5, type: 3, properties: ["done?": "boolean"]} <- greater-or-equal/16 {name: "idx", value: 2, type: 2-1, properties: ["idx": "address":"integer", "deref": ]}, {name: "max", value: 4, type: 1, properties: ["max": "integer"]}
run/0: ingredient 0 is idx
mem/0: location 1102 is 1035
mem/0: location 1035 is 2
run/0: ingredient 1 is max
mem/0: location 1104 is 3
run/0: product 0 is 0
mem/0: storing 0 in location 1105
run/0: instruction read-key/9
run/0: break-unless/12 {name: "done?", value: 5, type: 3, properties: ["done?": "boolean"]}, {name: "", value: 1, type: , properties: ["": ]}
mem/0: location 1105 is 0
run/0: ingredient 0 is 0
run/0: ingredient 1 is 
run/0: jumping to instruction 11
run/0: instruction read-key/12
run/0: {name: "c", value: 6, type: 4, properties: ["c": "character"]} <- index/26 {name: "buf", value: 3, type: 2-5-4, properties: ["buf": "address":"array":"character", "deref": ]}, {name: "idx", value: 2, type: 2-1, properties: ["idx": "address":"integer", "deref": ]}
run/0: ingredient 0 is {name: "buf", value: 3, type: 2-5-4, properties: ["buf": "address":"array":"character", "deref": ]}
mem/0: location 1103 is 1000
run/0: ingredient 1 is {name: "idx", value: 2, type: 2-1, properties: ["idx": "address":"integer", "deref": ]}
mem/0: location 1102 is 1035
mem/0: location 1035 is 2
run/0: address to copy is 1003
run/0: its type is 4
mem/0: location 1003 is 99
run/0: product 0 is 99
mem/0: storing 99 in location 1106
run/0: instruction read-key/13
run/0: {name: "idx", value: 2, type: 2-1, properties: ["idx": "address":"integer", "deref": ]} <- add/2 {name: "idx", value: 2, type: 2-1, properties: ["idx": "address":"integer", "deref": ]}, {name: "1", value: 1, type: 0, properties: ["1": "literal"]}
run/0: ingredient 0 is idx
mem/0: location 1102 is 1035
mem/0: location 1035 is 2
run/0: ingredient 1 is 1
run/0: product 0 is 3
mem/0: location 1102 is 1035
mem/0: storing 3 in location 1035
run/0: instruction read-key/14
run/0: reply/33 {name: "c", value: 6, type: 4, properties: ["c": "character"]}, {name: "1", value: 1, type: 0, properties: ["1": "literal", "found": ]}, {name: "x", value: 1, type: 2-12, properties: ["x": "address":"keyboard", "same-as-ingredient": "0"]}
mem/0: location 1106 is 99
mem/0: location 1101 is 1035
run/0: result 0 is 99
mem/0: storing 99 in location 5
run/0: result 1 is 1
mem/0: storing 1 in location 6
run/0: result 2 is 1035
mem/0: storing 1035 in location 901
run/0: instruction run1001/3
run/0: {name: "7", value: 7, type: 4, properties: ["7": "character"]}, {name: "8", value: 8, type: 3, properties: ["8": "boolean"]}, {name: "keyboard", value: 901, type: 2, properties: ["keyboard": "address"]} <- read-key/126 {name: "keyboard", value: 901, type: 2, properties: ["keyboard": "address"]}
mem/0: location 901 is 1035
run/0: instruction read-key/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: 1130
run/0: instruction read-key/1
run/0: {name: "x", value: 1, type: 2-12, properties: ["x": "address":"keyboard"]} <- next-ingredient/30 
run/0: product 0 is 1035
mem/0: storing 1035 in location 1132
run/0: instruction read-key/3
run/0: break-unless/12 {name: "x", value: 1, type: 2-12, properties: ["x": "address":"keyboard"]}, {name: "", value: 11, type: , properties: ["": ]}
mem/0: location 1132 is 1035
run/0: ingredient 0 is 1035
run/0: jump-unless fell through
run/0: instruction read-key/4
run/0: {name: "idx", value: 2, type: 2-1, properties: ["idx": "address":"integer"]} <- get-address/25 {name: "x", value: 1, type: 2-12, properties: ["x": "address":"keyboard", "deref": ]}, {name: "index", value: 0, type: 0, properties: ["index": "offset"]}
run/0: ingredient 0 is x
mem/0: location 1132 is 1035
run/0: ingredient 1 is index
run/0: address to copy is 1035
run/0: product 0 is 1035
mem/0: storing 1035 in location 1133
run/0: instruction read-key/5
run/0: {name: "buf", value: 3, type: 2-5-4, properties: ["buf": "address":"array":"character"]} <- get/24 {name: "x", value: 1, type: 2-12, properties: ["x": "address":"keyboard", "deref": ]}, {name: "data", value: 1, type: 0, properties: ["data": "offset"]}
run/0: ingredient 0 is x
mem/0: location 1132 is 1035
run/0: ingredient 1 is data
run/0: address to copy is 1036
run/0: its type is 2
mem/0: location 1036 is 1000
run/0: product 0 is 1000
mem/0: storing 1000 in location 1134
run/0: instruction read-key/6
run/0: {name: "max", value: 4, type: 1, properties: ["max": "integer"]} <- length/28 {name: "buf", value: 3, type: 2-5-4, properties: ["buf": "address":"array":"character", "deref": ]}
mem/0: location 1134 is 1000
mem/0: storing 3 in location 1135
run/0: instruction read-key/8
run/0: {name: "done?", value: 5, type: 3, properties: ["done?": "boolean"]} <- greater-or-equal/16 {name: "idx", value: 2, type: 2-1, properties: ["idx": "address":"integer", "deref": ]}, {name: "max", value: 4, type: 1, properties: ["max": "integer"]}
run/0: ingredient 0 is idx
mem/0: location 1133 is 1035
mem/0: location 1035 is 3
run/0: ingredient 1 is max
mem/0: location 1135 is 3
run/0: product 0 is 1
mem/0: storing 1 in location 1136
run/0: instruction read-key/9
run/0: break-unless/12 {name: "done?", value: 5, type: 3, properties: ["done?": "boolean"]}, {name: "", value: 1, type: , properties: ["": ]}
mem/0: location 1136 is 1
run/0: ingredient 0 is 1
run/0: jump-unless fell through
run/0: instruction read-key/10
run/0: reply/33 {name: "0", value: 0, type: 0, properties: ["0": "literal"]}, {name: "0", value: 0, type: 0, properties: ["0": "literal", "done": ]}, {name: "x", value: 1, type: 2-12, properties: ["x": "address":"keyboard", "same-as-ingredient": "0"]}
mem/0: location 1132 is 1035
run/0: result 0 is 0
mem/0: storing 0 in location 7
run/0: result 1 is 0
mem/0: storing 0 in location 8
run/0: result 2 is 1035
mem/0: storing 1035 in location 901
run/0: instruction read-key-in-mu/3
run/0: memory-should-contain/46 {name: "
    1 <- 97  # 'a'
    2 <- 1  # first read-key call found a character
    3 <- 98  # 'b'
    4 <- 1  # second read-key call found a character
    5 <- 99  # 'c'
    6 <- 1  # third read-key call found a character
    7 <- 0
    8 <- 0  # fourth read-key call didn't find a character
  ", value: 0, type: 0, properties: ["
    1 <- 97  # 'a'
    2 <- 1  # first read-key call found a character
    3 <- 98  # 'b'
    4 <- 1  # second read-key call found a character
    5 <- 99  # 'c'
    6 <- 1  # third read-key call found a character
    7 <- 0
    8 <- 0  # fourth read-key call didn't find a character
  ": "literal-string"]}
run/0: checking location 1
run/0: checking location 2
run/0: checking location 3
run/0: checking location 4
run/0: checking location 5
run/0: checking location 6
run/0: checking location 7
run/0: checking location 8