about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorKartik K. Agaram <vc@akkartik.com>2015-05-05 17:54:46 -0700
committerKartik K. Agaram <vc@akkartik.com>2015-05-05 17:54:46 -0700
commit82ceda30ad6fb32382bb6d0565c75fe6a1a01b9f (patch)
tree91b52744240749efdacb87a86455e753dab31e84
parent6d17ef493bbec78ebda37e50e0cc8ce21fd9f46b (diff)
downloadmu-82ceda30ad6fb32382bb6d0565c75fe6a1a01b9f.tar.gz
1267 - 'routine-state' can use the provided routine id
-rw-r--r--cpp/.traces/array-from-args8
-rw-r--r--cpp/.traces/buffer-append-works32
-rw-r--r--cpp/.traces/channel20
-rw-r--r--cpp/.traces/channel-initialization10
-rw-r--r--cpp/.traces/channel-new-empty-not-full16
-rw-r--r--cpp/.traces/channel-read-increments-full20
-rw-r--r--cpp/.traces/channel-read-not-full26
-rw-r--r--cpp/.traces/channel-wrap30
-rw-r--r--cpp/.traces/channel-write-full22
-rw-r--r--cpp/.traces/channel-write-increments-free16
-rw-r--r--cpp/.traces/channel-write-not-empty22
-rw-r--r--cpp/.traces/check_string_in_memory4
-rw-r--r--cpp/.traces/check_trace4
-rw-r--r--cpp/.traces/check_trace_instruction4
-rw-r--r--cpp/.traces/check_trace_negative4
-rw-r--r--cpp/.traces/clear-line-erases-printed-characters24
-rw-r--r--cpp/.traces/clear-line-erases-printed-characters228
-rw-r--r--cpp/.traces/closure8
-rw-r--r--cpp/.traces/first_scenario_in_mu4
-rw-r--r--cpp/.traces/integer-to-decimal-digit-negative22
-rw-r--r--cpp/.traces/integer-to-decimal-digit-positive26
-rw-r--r--cpp/.traces/integer-to-decimal-digit-zero8
-rw-r--r--cpp/.traces/interpolate-at-end12
-rw-r--r--cpp/.traces/interpolate-at-start12
-rw-r--r--cpp/.traces/interpolate-works12
-rw-r--r--cpp/.traces/keyboard_in_scenario18
-rw-r--r--cpp/.traces/memory_check2
-rw-r--r--cpp/.traces/memory_check_multiple2
-rw-r--r--cpp/.traces/memory_check_string2
-rw-r--r--cpp/.traces/memory_check_string_length2
-rw-r--r--cpp/.traces/new4
-rw-r--r--cpp/.traces/new_array4
-rw-r--r--cpp/.traces/new_concurrent4
-rw-r--r--cpp/.traces/new_overflow4
-rw-r--r--cpp/.traces/new_string2
-rw-r--r--cpp/.traces/print-character-at-top-left14
-rw-r--r--cpp/.traces/print-character-at-top-left214
-rw-r--r--cpp/.traces/read-key-in-mu18
-rw-r--r--cpp/.traces/reply_same_as_ingredient2
-rw-r--r--cpp/.traces/routine_state_test39
-rw-r--r--cpp/.traces/run2
-rw-r--r--cpp/.traces/run_multiple4
-rw-r--r--cpp/.traces/scenario_block4
-rw-r--r--cpp/.traces/scenario_check_memory_and_trace8
-rw-r--r--cpp/.traces/scenario_multiple_blocks8
-rw-r--r--cpp/.traces/scenario_with_comment_in_mu4
-rw-r--r--cpp/.traces/scenario_with_multiple_comments_in_mu4
-rw-r--r--cpp/.traces/screen_in_scenario14
-rw-r--r--cpp/.traces/screen_in_scenario_error14
-rw-r--r--cpp/.traces/string-append-112
-rw-r--r--cpp/.traces/string-equal-common-lengths-but-distinct12
-rw-r--r--cpp/.traces/string-equal-distinct-lengths16
-rw-r--r--cpp/.traces/string-equal-identical12
-rw-r--r--cpp/.traces/string-equal-reflexive10
-rw-r--r--cpp/.traces/string-equal-with-empty12
-rw-r--r--cpp/.traces/trace_check_passes_silently4
-rw-r--r--cpp/.traces/trace_check_warns_on_failure2
-rw-r--r--cpp/.traces/trace_check_warns_on_failure_in_later_line4
-rw-r--r--cpp/.traces/trace_negative_check_passes_silently2
-rw-r--r--cpp/.traces/trace_negative_check_warns_on_any_unexpected_line4
-rw-r--r--cpp/.traces/trace_negative_check_warns_on_failure4
-rw-r--r--cpp/.traces/wait_for_location2
-rw-r--r--cpp/038scheduler.cc35
63 files changed, 396 insertions, 322 deletions
diff --git a/cpp/.traces/array-from-args b/cpp/.traces/array-from-args
index a9d4341f..58df5f9e 100644
--- a/cpp/.traces/array-from-args
+++ b/cpp/.traces/array-from-args
@@ -24,7 +24,7 @@ after-brace/0: memory-should-contain ...
 new/0: routine allocated memory from 1000 to 101000
 schedule/0: array-from-args
 run/0: instruction array-from-args/0
-run/0: run/43 {name: "
+run/0: run/44 {name: "
     1:address:array:location <- init-array 0:literal, 1:literal, 2:literal
     2:array:location <- copy 1:address:array:location/deref
   ", value: 0, type: 0, properties: ["
@@ -45,7 +45,7 @@ after-brace/0: copy ...
 run/0: instruction run1001/0
 run/0: {name: "1", value: 1, type: 2-5-1, properties: ["1": "address":"array":"location"]} <- init-array/114 {name: "0", value: 0, type: 0, properties: ["0": "literal"]}, {name: "1", value: 1, type: 0, properties: ["1": "literal"]}, {name: "2", value: 2, type: 0, properties: ["2": "literal"]}
 run/0: instruction init-array/0
-run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new/42 {name: "location", value: 1, type: 0, properties: ["location": "type"]}, {name: "30", value: 30, type: 0, properties: ["30": "literal"]}
+run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new/43 {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 init-array/1
@@ -125,7 +125,7 @@ run/0: ingredient 0 is 0
 run/0: ingredient 1 is 
 run/0: jumping to instruction 7
 run/0: instruction init-array/8
-run/0: {name: "result", value: 4, type: 2-5-1, properties: ["result": "address":"array":"location"]} <- new/42 {name: "location", value: 1, type: 0, properties: ["location": "type"]}, {name: "capacity", value: 1, type: 1, properties: ["capacity": "integer"]}
+run/0: {name: "result", value: 4, type: 2-5-1, properties: ["result": "address":"array":"location"]} <- new/43 {name: "location", value: 1, type: 0, properties: ["location": "type"]}, {name: "capacity", value: 1, type: 1, properties: ["capacity": "integer"]}
 mem/0: location 1002 is 3
 mem/0: array size is 3
 mem/0: new alloc: 1031
@@ -312,7 +312,7 @@ mem/0: storing 0 in location 3
 mem/0: storing 1 in location 4
 mem/0: storing 2 in location 5
 run/0: instruction array-from-args/1
-run/0: memory-should-contain/44 {name: "
+run/0: memory-should-contain/45 {name: "
     2 <- 3  # array length
     3 <- 0
     4 <- 1
diff --git a/cpp/.traces/buffer-append-works b/cpp/.traces/buffer-append-works
index 1e974f80..5f40fc2e 100644
--- a/cpp/.traces/buffer-append-works
+++ b/cpp/.traces/buffer-append-works
@@ -116,7 +116,7 @@ after-brace/0: memory-should-contain ...
 new/0: routine allocated memory from 1000 to 101000
 schedule/0: buffer-append-works
 run/0: instruction buffer-append-works/0
-run/0: run/43 {name: "
+run/0: run/44 {name: "
     default-space:address:array:location <- new location:type, 30:literal
     x:address:buffer <- init-buffer 3:literal
     s1:address:array:character <- get x:address:buffer/deref, data:offset
@@ -270,17 +270,17 @@ after-brace/0: equal ...
 after-brace/0: get ...
 after-brace/0: copy ...
 run/0: instruction run1001/0
-run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new/42 {name: "location", value: 1, type: 0, properties: ["location": "type"]}, {name: "30", value: 30, type: 0, properties: ["30": "literal"]}
+run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new/43 {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-9, properties: ["x": "address":"buffer"]} <- init-buffer/101 {name: "3", value: 3, type: 0, properties: ["3": "literal"]}
 run/0: instruction init-buffer/0
-run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new/42 {name: "location", value: 1, type: 0, properties: ["location": "type"]}, {name: "30", value: 30, type: 0, properties: ["30": "literal"]}
+run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new/43 {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: 1031
 run/0: instruction init-buffer/1
-run/0: {name: "result", value: 1, type: 2-9, properties: ["result": "address":"buffer"]} <- new/42 {name: "buffer", value: 9, type: 0, properties: ["buffer": "type"]}
+run/0: {name: "result", value: 1, type: 2-9, properties: ["result": "address":"buffer"]} <- new/43 {name: "buffer", value: 9, type: 0, properties: ["buffer": "type"]}
 mem/0: new alloc: 1062
 mem/0: storing 1062 in location 1033
 run/0: instruction init-buffer/2
@@ -309,7 +309,7 @@ run/0: {name: "capacity", value: 4, type: 1, properties: ["capacity": "integer"]
 run/0: product 0 is 3
 mem/0: storing 3 in location 1036
 run/0: instruction init-buffer/6
-run/0: {name: "s", value: 3, type: 2-2-5-4, properties: ["s": "address":"address":"array":"character", "deref": ]} <- new/42 {name: "character", value: 4, type: 0, properties: ["character": "type"]}, {name: "capacity", value: 4, type: 1, properties: ["capacity": "integer"]}
+run/0: {name: "s", value: 3, type: 2-2-5-4, properties: ["s": "address":"address":"array":"character", "deref": ]} <- new/43 {name: "character", value: 4, type: 0, properties: ["character": "type"]}, {name: "capacity", value: 4, type: 1, properties: ["capacity": "integer"]}
 mem/0: location 1036 is 3
 mem/0: array size is 3
 mem/0: new alloc: 1064
@@ -334,7 +334,7 @@ run/0: instruction run1001/3
 run/0: {name: "x", value: 1, type: 2-9, properties: ["x": "address":"buffer"]} <- buffer-append/104 {name: "x", value: 1, type: 2-9, properties: ["x": "address":"buffer"]}, {name: "97", value: 97, type: 0, properties: ["97": "literal"]}
 mem/0: location 1002 is 1062
 run/0: instruction buffer-append/0
-run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new/42 {name: "location", value: 1, type: 0, properties: ["location": "type"]}, {name: "30", value: 30, type: 0, properties: ["30": "literal"]}
+run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new/43 {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 buffer-append/1
@@ -349,7 +349,7 @@ run/0: instruction buffer-append/4
 run/0: {name: "full?", value: 3, type: 3, properties: ["full?": "boolean"]} <- buffer-full?/103 {name: "in", value: 1, type: 2-9, properties: ["in": "address":"buffer"]}
 mem/0: location 1070 is 1062
 run/0: instruction buffer-full?/0
-run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new/42 {name: "location", value: 1, type: 0, properties: ["location": "type"]}, {name: "30", value: 30, type: 0, properties: ["30": "literal"]}
+run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new/43 {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 buffer-full?/1
@@ -451,7 +451,7 @@ run/0: instruction run1001/4
 run/0: {name: "x", value: 1, type: 2-9, properties: ["x": "address":"buffer"]} <- buffer-append/104 {name: "x", value: 1, type: 2-9, properties: ["x": "address":"buffer"]}, {name: "98", value: 98, type: 0, properties: ["98": "literal"]}
 mem/0: location 1002 is 1062
 run/0: instruction buffer-append/0
-run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new/42 {name: "location", value: 1, type: 0, properties: ["location": "type"]}, {name: "30", value: 30, type: 0, properties: ["30": "literal"]}
+run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new/43 {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 buffer-append/1
@@ -466,7 +466,7 @@ run/0: instruction buffer-append/4
 run/0: {name: "full?", value: 3, type: 3, properties: ["full?": "boolean"]} <- buffer-full?/103 {name: "in", value: 1, type: 2-9, properties: ["in": "address":"buffer"]}
 mem/0: location 1132 is 1062
 run/0: instruction buffer-full?/0
-run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new/42 {name: "location", value: 1, type: 0, properties: ["location": "type"]}, {name: "30", value: 30, type: 0, properties: ["30": "literal"]}
+run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new/43 {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: 1161
 run/0: instruction buffer-full?/1
@@ -568,7 +568,7 @@ run/0: instruction run1001/5
 run/0: {name: "x", value: 1, type: 2-9, properties: ["x": "address":"buffer"]} <- buffer-append/104 {name: "x", value: 1, type: 2-9, properties: ["x": "address":"buffer"]}, {name: "99", value: 99, type: 0, properties: ["99": "literal"]}
 mem/0: location 1002 is 1062
 run/0: instruction buffer-append/0
-run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new/42 {name: "location", value: 1, type: 0, properties: ["location": "type"]}, {name: "30", value: 30, type: 0, properties: ["30": "literal"]}
+run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new/43 {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: 1192
 run/0: instruction buffer-append/1
@@ -583,7 +583,7 @@ run/0: instruction buffer-append/4
 run/0: {name: "full?", value: 3, type: 3, properties: ["full?": "boolean"]} <- buffer-full?/103 {name: "in", value: 1, type: 2-9, properties: ["in": "address":"buffer"]}
 mem/0: location 1194 is 1062
 run/0: instruction buffer-full?/0
-run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new/42 {name: "location", value: 1, type: 0, properties: ["location": "type"]}, {name: "30", value: 30, type: 0, properties: ["30": "literal"]}
+run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new/43 {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: 1223
 run/0: instruction buffer-full?/1
@@ -715,7 +715,7 @@ run/0: instruction run1001/10
 run/0: {name: "x", value: 1, type: 2-9, properties: ["x": "address":"buffer"]} <- buffer-append/104 {name: "x", value: 1, type: 2-9, properties: ["x": "address":"buffer"]}, {name: "100", value: 100, type: 0, properties: ["100": "literal"]}
 mem/0: location 1002 is 1062
 run/0: instruction buffer-append/0
-run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new/42 {name: "location", value: 1, type: 0, properties: ["location": "type"]}, {name: "30", value: 30, type: 0, properties: ["30": "literal"]}
+run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new/43 {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: 1254
 run/0: instruction buffer-append/1
@@ -730,7 +730,7 @@ run/0: instruction buffer-append/4
 run/0: {name: "full?", value: 3, type: 3, properties: ["full?": "boolean"]} <- buffer-full?/103 {name: "in", value: 1, type: 2-9, properties: ["in": "address":"buffer"]}
 mem/0: location 1256 is 1062
 run/0: instruction buffer-full?/0
-run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new/42 {name: "location", value: 1, type: 0, properties: ["location": "type"]}, {name: "30", value: 30, type: 0, properties: ["30": "literal"]}
+run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new/43 {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: 1285
 run/0: instruction buffer-full?/1
@@ -783,7 +783,7 @@ run/0: instruction buffer-append/6
 run/0: {name: "in", value: 1, type: 2-9, properties: ["in": "address":"buffer"]} <- grow-buffer/102 {name: "in", value: 1, type: 2-9, properties: ["in": "address":"buffer"]}
 mem/0: location 1256 is 1062
 run/0: instruction grow-buffer/0
-run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new/42 {name: "location", value: 1, type: 0, properties: ["location": "type"]}, {name: "30", value: 30, type: 0, properties: ["30": "literal"]}
+run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new/43 {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: 1316
 run/0: instruction grow-buffer/1
@@ -818,7 +818,7 @@ mem/0: location 1319 is 1063
 mem/0: location 1063 is 1064
 mem/0: storing 1064 in location 1322
 run/0: instruction grow-buffer/6
-run/0: {name: "x", value: 2, type: 2-2-5-4, properties: ["x": "address":"address":"array":"character", "deref": ]} <- new/42 {name: "character", value: 4, type: 0, properties: ["character": "type"]}, {name: "newlen", value: 4, type: 1, properties: ["newlen": "integer"]}
+run/0: {name: "x", value: 2, type: 2-2-5-4, properties: ["x": "address":"address":"array":"character", "deref": ]} <- new/43 {name: "character", value: 4, type: 0, properties: ["character": "type"]}, {name: "newlen", value: 4, type: 1, properties: ["newlen": "integer"]}
 mem/0: location 1321 is 6
 mem/0: array size is 6
 mem/0: new alloc: 1347
@@ -1095,7 +1095,7 @@ mem/0: storing 100 in location 16
 mem/0: storing 0 in location 17
 mem/0: storing 0 in location 18
 run/0: instruction buffer-append-works/1
-run/0: memory-should-contain/44 {name: "
+run/0: memory-should-contain/45 {name: "
     # before +buffer-filled
     1 <- 1   # no change in data pointer
     2 <- 3   # size of data
diff --git a/cpp/.traces/channel b/cpp/.traces/channel
index 4af4241c..a1edee71 100644
--- a/cpp/.traces/channel
+++ b/cpp/.traces/channel
@@ -20,7 +20,7 @@ after-brace/0: memory-should-contain ...
 new/0: routine allocated memory from 1000 to 101000
 schedule/0: channel
 run/0: instruction channel/0
-run/0: run/43 {name: "
+run/0: run/44 {name: "
     1:address:channel <- init-channel 3:literal/capacity
     1:address:channel <- write 1:address:channel, 34:literal
     2:integer, 1:address:channel <- read 1:address:channel
@@ -47,11 +47,11 @@ after-brace/0: read ...
 run/0: instruction run1001/0
 run/0: {name: "1", value: 1, type: 2-10, properties: ["1": "address":"channel"]} <- init-channel/108 {name: "3", value: 3, type: 0, properties: ["3": "literal", "capacity": ]}
 run/0: instruction init-channel/0
-run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new/42 {name: "location", value: 1, type: 0, properties: ["location": "type"]}, {name: "30", value: 30, type: 0, properties: ["30": "literal"]}
+run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new/43 {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 init-channel/1
-run/0: {name: "result", value: 1, type: 2-10, properties: ["result": "address":"channel"]} <- new/42 {name: "channel", value: 10, type: 0, properties: ["channel": "type"]}
+run/0: {name: "result", value: 1, type: 2-10, properties: ["result": "address":"channel"]} <- new/43 {name: "channel", value: 10, type: 0, properties: ["channel": "type"]}
 mem/0: new alloc: 1031
 mem/0: storing 1031 in location 1002
 run/0: instruction init-channel/2
@@ -100,7 +100,7 @@ run/0: address to copy is 1033
 run/0: product 0 is 1033
 mem/0: storing 1033 in location 1006
 run/0: instruction init-channel/9
-run/0: {name: "dest", value: 5, type: 2-2-5-1, properties: ["dest": "address":"address":"array":"location", "deref": ]} <- new/42 {name: "location", value: 1, type: 0, properties: ["location": "type"]}, {name: "capacity", value: 4, type: 1, properties: ["capacity": "integer"]}
+run/0: {name: "dest", value: 5, type: 2-2-5-1, properties: ["dest": "address":"address":"array":"location", "deref": ]} <- new/43 {name: "location", value: 1, type: 0, properties: ["location": "type"]}, {name: "capacity", value: 4, type: 1, properties: ["capacity": "integer"]}
 mem/0: location 1005 is 4
 mem/0: array size is 4
 mem/0: new alloc: 1034
@@ -115,7 +115,7 @@ run/0: instruction run1001/1
 run/0: {name: "1", value: 1, type: 2-10, properties: ["1": "address":"channel"]} <- write/109 {name: "1", value: 1, type: 2-10, properties: ["1": "address":"channel"]}, {name: "34", value: 34, type: 0, properties: ["34": "literal"]}
 mem/0: location 1 is 1031
 run/0: instruction write/0
-run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new/42 {name: "location", value: 1, type: 0, properties: ["location": "type"]}, {name: "30", value: 30, type: 0, properties: ["30": "literal"]}
+run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new/43 {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: 1039
 run/0: instruction write/1
@@ -130,7 +130,7 @@ run/0: instruction write/4
 run/0: {name: "full", value: 3, type: 3, properties: ["full": "boolean"]} <- channel-full?/110 {name: "chan", value: 1, type: 2-10, properties: ["chan": "address":"channel"]}
 mem/0: location 1041 is 1031
 run/0: instruction channel-full?/0
-run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new/42 {name: "location", value: 1, type: 0, properties: ["location": "type"]}, {name: "30", value: 30, type: 0, properties: ["30": "literal"]}
+run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new/43 {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: 1070
 run/0: instruction channel-full?/1
@@ -158,7 +158,7 @@ run/0: instruction channel-full?/5
 run/0: {name: "len", value: 3, type: 1, properties: ["len": "integer"]} <- channel-capacity/113 {name: "chan", value: 1, type: 2-10, properties: ["chan": "address":"channel"]}
 mem/0: location 1072 is 1031
 run/0: instruction channel-capacity/0
-run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new/42 {name: "location", value: 1, type: 0, properties: ["location": "type"]}, {name: "30", value: 30, type: 0, properties: ["30": "literal"]}
+run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new/43 {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: 1101
 run/0: instruction channel-capacity/1
@@ -298,7 +298,7 @@ run/0: instruction run1001/2
 run/0: {name: "2", value: 2, type: 1, properties: ["2": "integer"]}, {name: "1", value: 1, type: 2-10, properties: ["1": "address":"channel"]} <- read/111 {name: "1", value: 1, type: 2-10, properties: ["1": "address":"channel"]}
 mem/0: location 1 is 1031
 run/0: instruction read/0
-run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new/42 {name: "location", value: 1, type: 0, properties: ["location": "type"]}, {name: "30", value: 30, type: 0, properties: ["30": "literal"]}
+run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new/43 {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: 1132
 run/0: instruction read/1
@@ -309,7 +309,7 @@ run/0: instruction read/3
 run/0: {name: "empty", value: 2, type: 3, properties: ["empty": "boolean"]} <- channel-empty?/112 {name: "chan", value: 1, type: 2-10, properties: ["chan": "address":"channel"]}
 mem/0: location 1134 is 1031
 run/0: instruction channel-empty?/0
-run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new/42 {name: "location", value: 1, type: 0, properties: ["location": "type"]}, {name: "30", value: 30, type: 0, properties: ["30": "literal"]}
+run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new/43 {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: 1163
 run/0: instruction channel-empty?/1
@@ -422,7 +422,7 @@ mem/0: storing 34 in location 2
 run/0: result 1 is 1031
 mem/0: storing 1031 in location 1
 run/0: instruction channel/1
-run/0: memory-should-contain/44 {name: "
+run/0: memory-should-contain/45 {name: "
     2 <- 34
   ", value: 0, type: 0, properties: ["
     2 <- 34
diff --git a/cpp/.traces/channel-initialization b/cpp/.traces/channel-initialization
index 87f54f41..7bafc5ff 100644
--- a/cpp/.traces/channel-initialization
+++ b/cpp/.traces/channel-initialization
@@ -22,7 +22,7 @@ after-brace/0: memory-should-contain ...
 new/0: routine allocated memory from 1000 to 101000
 schedule/0: channel-initialization
 run/0: instruction channel-initialization/0
-run/0: run/43 {name: "
+run/0: run/44 {name: "
     1:address:channel <- init-channel 3:literal/capacity
     2:integer <- get 1:address:channel/deref, first-full:offset
     3:integer <- get 1:address:channel/deref, first-free:offset
@@ -51,11 +51,11 @@ after-brace/0: get ...
 run/0: instruction run1001/0
 run/0: {name: "1", value: 1, type: 2-10, properties: ["1": "address":"channel"]} <- init-channel/108 {name: "3", value: 3, type: 0, properties: ["3": "literal", "capacity": ]}
 run/0: instruction init-channel/0
-run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new/42 {name: "location", value: 1, type: 0, properties: ["location": "type"]}, {name: "30", value: 30, type: 0, properties: ["30": "literal"]}
+run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new/43 {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 init-channel/1
-run/0: {name: "result", value: 1, type: 2-10, properties: ["result": "address":"channel"]} <- new/42 {name: "channel", value: 10, type: 0, properties: ["channel": "type"]}
+run/0: {name: "result", value: 1, type: 2-10, properties: ["result": "address":"channel"]} <- new/43 {name: "channel", value: 10, type: 0, properties: ["channel": "type"]}
 mem/0: new alloc: 1031
 mem/0: storing 1031 in location 1002
 run/0: instruction init-channel/2
@@ -104,7 +104,7 @@ run/0: address to copy is 1033
 run/0: product 0 is 1033
 mem/0: storing 1033 in location 1006
 run/0: instruction init-channel/9
-run/0: {name: "dest", value: 5, type: 2-2-5-1, properties: ["dest": "address":"address":"array":"location", "deref": ]} <- new/42 {name: "location", value: 1, type: 0, properties: ["location": "type"]}, {name: "capacity", value: 4, type: 1, properties: ["capacity": "integer"]}
+run/0: {name: "dest", value: 5, type: 2-2-5-1, properties: ["dest": "address":"address":"array":"location", "deref": ]} <- new/43 {name: "location", value: 1, type: 0, properties: ["location": "type"]}, {name: "capacity", value: 4, type: 1, properties: ["capacity": "integer"]}
 mem/0: location 1005 is 4
 mem/0: array size is 4
 mem/0: new alloc: 1034
@@ -136,7 +136,7 @@ mem/0: location 1032 is 0
 run/0: product 0 is 0
 mem/0: storing 0 in location 3
 run/0: instruction channel-initialization/1
-run/0: memory-should-contain/44 {name: "
+run/0: memory-should-contain/45 {name: "
     2 <- 0  # first-full
     3 <- 0  # first-free
   ", value: 0, type: 0, properties: ["
diff --git a/cpp/.traces/channel-new-empty-not-full b/cpp/.traces/channel-new-empty-not-full
index dbf18483..65116fad 100644
--- a/cpp/.traces/channel-new-empty-not-full
+++ b/cpp/.traces/channel-new-empty-not-full
@@ -22,7 +22,7 @@ after-brace/0: memory-should-contain ...
 new/0: routine allocated memory from 1000 to 101000
 schedule/0: channel-new-empty-not-full
 run/0: instruction channel-new-empty-not-full/0
-run/0: run/43 {name: "
+run/0: run/44 {name: "
     1:address:channel <- init-channel 3:literal/capacity
     2:integer <- channel-empty? 1:address:channel
     3:integer <- channel-full? 1:address:channel
@@ -47,11 +47,11 @@ after-brace/0: channel-full? ...
 run/0: instruction run1001/0
 run/0: {name: "1", value: 1, type: 2-10, properties: ["1": "address":"channel"]} <- init-channel/108 {name: "3", value: 3, type: 0, properties: ["3": "literal", "capacity": ]}
 run/0: instruction init-channel/0
-run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new/42 {name: "location", value: 1, type: 0, properties: ["location": "type"]}, {name: "30", value: 30, type: 0, properties: ["30": "literal"]}
+run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new/43 {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 init-channel/1
-run/0: {name: "result", value: 1, type: 2-10, properties: ["result": "address":"channel"]} <- new/42 {name: "channel", value: 10, type: 0, properties: ["channel": "type"]}
+run/0: {name: "result", value: 1, type: 2-10, properties: ["result": "address":"channel"]} <- new/43 {name: "channel", value: 10, type: 0, properties: ["channel": "type"]}
 mem/0: new alloc: 1031
 mem/0: storing 1031 in location 1002
 run/0: instruction init-channel/2
@@ -100,7 +100,7 @@ run/0: address to copy is 1033
 run/0: product 0 is 1033
 mem/0: storing 1033 in location 1006
 run/0: instruction init-channel/9
-run/0: {name: "dest", value: 5, type: 2-2-5-1, properties: ["dest": "address":"address":"array":"location", "deref": ]} <- new/42 {name: "location", value: 1, type: 0, properties: ["location": "type"]}, {name: "capacity", value: 4, type: 1, properties: ["capacity": "integer"]}
+run/0: {name: "dest", value: 5, type: 2-2-5-1, properties: ["dest": "address":"address":"array":"location", "deref": ]} <- new/43 {name: "location", value: 1, type: 0, properties: ["location": "type"]}, {name: "capacity", value: 4, type: 1, properties: ["capacity": "integer"]}
 mem/0: location 1005 is 4
 mem/0: array size is 4
 mem/0: new alloc: 1034
@@ -115,7 +115,7 @@ run/0: instruction run1001/1
 run/0: {name: "2", value: 2, type: 1, properties: ["2": "integer"]} <- channel-empty?/112 {name: "1", value: 1, type: 2-10, properties: ["1": "address":"channel"]}
 mem/0: location 1 is 1031
 run/0: instruction channel-empty?/0
-run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new/42 {name: "location", value: 1, type: 0, properties: ["location": "type"]}, {name: "30", value: 30, type: 0, properties: ["30": "literal"]}
+run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new/43 {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: 1039
 run/0: instruction channel-empty?/1
@@ -159,7 +159,7 @@ run/0: instruction run1001/2
 run/0: {name: "3", value: 3, type: 1, properties: ["3": "integer"]} <- channel-full?/110 {name: "1", value: 1, type: 2-10, properties: ["1": "address":"channel"]}
 mem/0: location 1 is 1031
 run/0: instruction channel-full?/0
-run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new/42 {name: "location", value: 1, type: 0, properties: ["location": "type"]}, {name: "30", value: 30, type: 0, properties: ["30": "literal"]}
+run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new/43 {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: 1070
 run/0: instruction channel-full?/1
@@ -187,7 +187,7 @@ run/0: instruction channel-full?/5
 run/0: {name: "len", value: 3, type: 1, properties: ["len": "integer"]} <- channel-capacity/113 {name: "chan", value: 1, type: 2-10, properties: ["chan": "address":"channel"]}
 mem/0: location 1072 is 1031
 run/0: instruction channel-capacity/0
-run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new/42 {name: "location", value: 1, type: 0, properties: ["location": "type"]}, {name: "30", value: 30, type: 0, properties: ["30": "literal"]}
+run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new/43 {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: 1101
 run/0: instruction channel-capacity/1
@@ -251,7 +251,7 @@ mem/0: location 1077 is 0
 run/0: result 0 is 0
 mem/0: storing 0 in location 3
 run/0: instruction channel-new-empty-not-full/1
-run/0: memory-should-contain/44 {name: "
+run/0: memory-should-contain/45 {name: "
     2 <- 1  # empty?
     3 <- 0  # full?
   ", value: 0, type: 0, properties: ["
diff --git a/cpp/.traces/channel-read-increments-full b/cpp/.traces/channel-read-increments-full
index 9d8de61f..5f2dff22 100644
--- a/cpp/.traces/channel-read-increments-full
+++ b/cpp/.traces/channel-read-increments-full
@@ -26,7 +26,7 @@ after-brace/0: memory-should-contain ...
 new/0: routine allocated memory from 1000 to 101000
 schedule/0: channel-read-increments-full
 run/0: instruction channel-read-increments-full/0
-run/0: run/43 {name: "
+run/0: run/44 {name: "
     1:address:channel <- init-channel 3:literal/capacity
     1:address:channel <- write 1:address:channel, 34:literal
     _, 1:address:channel <- read 1:address:channel
@@ -69,11 +69,11 @@ after-brace/0: get ...
 run/0: instruction run1001/0
 run/0: {name: "1", value: 1, type: 2-10, properties: ["1": "address":"channel"]} <- init-channel/108 {name: "3", value: 3, type: 0, properties: ["3": "literal", "capacity": ]}
 run/0: instruction init-channel/0
-run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new/42 {name: "location", value: 1, type: 0, properties: ["location": "type"]}, {name: "30", value: 30, type: 0, properties: ["30": "literal"]}
+run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new/43 {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 init-channel/1
-run/0: {name: "result", value: 1, type: 2-10, properties: ["result": "address":"channel"]} <- new/42 {name: "channel", value: 10, type: 0, properties: ["channel": "type"]}
+run/0: {name: "result", value: 1, type: 2-10, properties: ["result": "address":"channel"]} <- new/43 {name: "channel", value: 10, type: 0, properties: ["channel": "type"]}
 mem/0: new alloc: 1031
 mem/0: storing 1031 in location 1002
 run/0: instruction init-channel/2
@@ -122,7 +122,7 @@ run/0: address to copy is 1033
 run/0: product 0 is 1033
 mem/0: storing 1033 in location 1006
 run/0: instruction init-channel/9
-run/0: {name: "dest", value: 5, type: 2-2-5-1, properties: ["dest": "address":"address":"array":"location", "deref": ]} <- new/42 {name: "location", value: 1, type: 0, properties: ["location": "type"]}, {name: "capacity", value: 4, type: 1, properties: ["capacity": "integer"]}
+run/0: {name: "dest", value: 5, type: 2-2-5-1, properties: ["dest": "address":"address":"array":"location", "deref": ]} <- new/43 {name: "location", value: 1, type: 0, properties: ["location": "type"]}, {name: "capacity", value: 4, type: 1, properties: ["capacity": "integer"]}
 mem/0: location 1005 is 4
 mem/0: array size is 4
 mem/0: new alloc: 1034
@@ -137,7 +137,7 @@ run/0: instruction run1001/1
 run/0: {name: "1", value: 1, type: 2-10, properties: ["1": "address":"channel"]} <- write/109 {name: "1", value: 1, type: 2-10, properties: ["1": "address":"channel"]}, {name: "34", value: 34, type: 0, properties: ["34": "literal"]}
 mem/0: location 1 is 1031
 run/0: instruction write/0
-run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new/42 {name: "location", value: 1, type: 0, properties: ["location": "type"]}, {name: "30", value: 30, type: 0, properties: ["30": "literal"]}
+run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new/43 {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: 1039
 run/0: instruction write/1
@@ -152,7 +152,7 @@ run/0: instruction write/4
 run/0: {name: "full", value: 3, type: 3, properties: ["full": "boolean"]} <- channel-full?/110 {name: "chan", value: 1, type: 2-10, properties: ["chan": "address":"channel"]}
 mem/0: location 1041 is 1031
 run/0: instruction channel-full?/0
-run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new/42 {name: "location", value: 1, type: 0, properties: ["location": "type"]}, {name: "30", value: 30, type: 0, properties: ["30": "literal"]}
+run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new/43 {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: 1070
 run/0: instruction channel-full?/1
@@ -180,7 +180,7 @@ run/0: instruction channel-full?/5
 run/0: {name: "len", value: 3, type: 1, properties: ["len": "integer"]} <- channel-capacity/113 {name: "chan", value: 1, type: 2-10, properties: ["chan": "address":"channel"]}
 mem/0: location 1072 is 1031
 run/0: instruction channel-capacity/0
-run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new/42 {name: "location", value: 1, type: 0, properties: ["location": "type"]}, {name: "30", value: 30, type: 0, properties: ["30": "literal"]}
+run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new/43 {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: 1101
 run/0: instruction channel-capacity/1
@@ -320,7 +320,7 @@ run/0: instruction run1001/2
 run/0: {name: "_", value: 0, type: 0, properties: ["_": "dummy"]}, {name: "1", value: 1, type: 2-10, properties: ["1": "address":"channel"]} <- read/111 {name: "1", value: 1, type: 2-10, properties: ["1": "address":"channel"]}
 mem/0: location 1 is 1031
 run/0: instruction read/0
-run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new/42 {name: "location", value: 1, type: 0, properties: ["location": "type"]}, {name: "30", value: 30, type: 0, properties: ["30": "literal"]}
+run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new/43 {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: 1132
 run/0: instruction read/1
@@ -331,7 +331,7 @@ run/0: instruction read/3
 run/0: {name: "empty", value: 2, type: 3, properties: ["empty": "boolean"]} <- channel-empty?/112 {name: "chan", value: 1, type: 2-10, properties: ["chan": "address":"channel"]}
 mem/0: location 1134 is 1031
 run/0: instruction channel-empty?/0
-run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new/42 {name: "location", value: 1, type: 0, properties: ["location": "type"]}, {name: "30", value: 30, type: 0, properties: ["30": "literal"]}
+run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new/43 {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: 1163
 run/0: instruction channel-empty?/1
@@ -463,7 +463,7 @@ mem/0: location 1032 is 1
 run/0: product 0 is 1
 mem/0: storing 1 in location 3
 run/0: instruction channel-read-increments-full/1
-run/0: memory-should-contain/44 {name: "
+run/0: memory-should-contain/45 {name: "
     2 <- 1  # first-full
     3 <- 1  # first-free
   ", value: 0, type: 0, properties: ["
diff --git a/cpp/.traces/channel-read-not-full b/cpp/.traces/channel-read-not-full
index f17dd812..268a6151 100644
--- a/cpp/.traces/channel-read-not-full
+++ b/cpp/.traces/channel-read-not-full
@@ -26,7 +26,7 @@ after-brace/0: memory-should-contain ...
 new/0: routine allocated memory from 1000 to 101000
 schedule/0: channel-read-not-full
 run/0: instruction channel-read-not-full/0
-run/0: run/43 {name: "
+run/0: run/44 {name: "
     1:address:channel <- init-channel 1:literal/capacity
     1:address:channel <- write 1:address:channel, 34:literal
     _, 1:address:channel <- read 1:address:channel
@@ -65,11 +65,11 @@ after-brace/0: channel-full? ...
 run/0: instruction run1001/0
 run/0: {name: "1", value: 1, type: 2-10, properties: ["1": "address":"channel"]} <- init-channel/108 {name: "1", value: 1, type: 0, properties: ["1": "literal", "capacity": ]}
 run/0: instruction init-channel/0
-run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new/42 {name: "location", value: 1, type: 0, properties: ["location": "type"]}, {name: "30", value: 30, type: 0, properties: ["30": "literal"]}
+run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new/43 {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 init-channel/1
-run/0: {name: "result", value: 1, type: 2-10, properties: ["result": "address":"channel"]} <- new/42 {name: "channel", value: 10, type: 0, properties: ["channel": "type"]}
+run/0: {name: "result", value: 1, type: 2-10, properties: ["result": "address":"channel"]} <- new/43 {name: "channel", value: 10, type: 0, properties: ["channel": "type"]}
 mem/0: new alloc: 1031
 mem/0: storing 1031 in location 1002
 run/0: instruction init-channel/2
@@ -118,7 +118,7 @@ run/0: address to copy is 1033
 run/0: product 0 is 1033
 mem/0: storing 1033 in location 1006
 run/0: instruction init-channel/9
-run/0: {name: "dest", value: 5, type: 2-2-5-1, properties: ["dest": "address":"address":"array":"location", "deref": ]} <- new/42 {name: "location", value: 1, type: 0, properties: ["location": "type"]}, {name: "capacity", value: 4, type: 1, properties: ["capacity": "integer"]}
+run/0: {name: "dest", value: 5, type: 2-2-5-1, properties: ["dest": "address":"address":"array":"location", "deref": ]} <- new/43 {name: "location", value: 1, type: 0, properties: ["location": "type"]}, {name: "capacity", value: 4, type: 1, properties: ["capacity": "integer"]}
 mem/0: location 1005 is 2
 mem/0: array size is 2
 mem/0: new alloc: 1034
@@ -133,7 +133,7 @@ run/0: instruction run1001/1
 run/0: {name: "1", value: 1, type: 2-10, properties: ["1": "address":"channel"]} <- write/109 {name: "1", value: 1, type: 2-10, properties: ["1": "address":"channel"]}, {name: "34", value: 34, type: 0, properties: ["34": "literal"]}
 mem/0: location 1 is 1031
 run/0: instruction write/0
-run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new/42 {name: "location", value: 1, type: 0, properties: ["location": "type"]}, {name: "30", value: 30, type: 0, properties: ["30": "literal"]}
+run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new/43 {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 write/1
@@ -148,7 +148,7 @@ run/0: instruction write/4
 run/0: {name: "full", value: 3, type: 3, properties: ["full": "boolean"]} <- channel-full?/110 {name: "chan", value: 1, type: 2-10, properties: ["chan": "address":"channel"]}
 mem/0: location 1039 is 1031
 run/0: instruction channel-full?/0
-run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new/42 {name: "location", value: 1, type: 0, properties: ["location": "type"]}, {name: "30", value: 30, type: 0, properties: ["30": "literal"]}
+run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new/43 {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 channel-full?/1
@@ -176,7 +176,7 @@ run/0: instruction channel-full?/5
 run/0: {name: "len", value: 3, type: 1, properties: ["len": "integer"]} <- channel-capacity/113 {name: "chan", value: 1, type: 2-10, properties: ["chan": "address":"channel"]}
 mem/0: location 1070 is 1031
 run/0: instruction channel-capacity/0
-run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new/42 {name: "location", value: 1, type: 0, properties: ["location": "type"]}, {name: "30", value: 30, type: 0, properties: ["30": "literal"]}
+run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new/43 {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 channel-capacity/1
@@ -316,7 +316,7 @@ run/0: instruction run1001/2
 run/0: {name: "_", value: 0, type: 0, properties: ["_": "dummy"]}, {name: "1", value: 1, type: 2-10, properties: ["1": "address":"channel"]} <- read/111 {name: "1", value: 1, type: 2-10, properties: ["1": "address":"channel"]}
 mem/0: location 1 is 1031
 run/0: instruction read/0
-run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new/42 {name: "location", value: 1, type: 0, properties: ["location": "type"]}, {name: "30", value: 30, type: 0, properties: ["30": "literal"]}
+run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new/43 {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/1
@@ -327,7 +327,7 @@ run/0: instruction read/3
 run/0: {name: "empty", value: 2, type: 3, properties: ["empty": "boolean"]} <- channel-empty?/112 {name: "chan", value: 1, type: 2-10, properties: ["chan": "address":"channel"]}
 mem/0: location 1132 is 1031
 run/0: instruction channel-empty?/0
-run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new/42 {name: "location", value: 1, type: 0, properties: ["location": "type"]}, {name: "30", value: 30, type: 0, properties: ["30": "literal"]}
+run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new/43 {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: 1161
 run/0: instruction channel-empty?/1
@@ -442,7 +442,7 @@ run/0: instruction run1001/3
 run/0: {name: "2", value: 2, type: 1, properties: ["2": "integer"]} <- channel-empty?/112 {name: "1", value: 1, type: 2-10, properties: ["1": "address":"channel"]}
 mem/0: location 1 is 1031
 run/0: instruction channel-empty?/0
-run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new/42 {name: "location", value: 1, type: 0, properties: ["location": "type"]}, {name: "30", value: 30, type: 0, properties: ["30": "literal"]}
+run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new/43 {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: 1192
 run/0: instruction channel-empty?/1
@@ -486,7 +486,7 @@ run/0: instruction run1001/4
 run/0: {name: "3", value: 3, type: 1, properties: ["3": "integer"]} <- channel-full?/110 {name: "1", value: 1, type: 2-10, properties: ["1": "address":"channel"]}
 mem/0: location 1 is 1031
 run/0: instruction channel-full?/0
-run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new/42 {name: "location", value: 1, type: 0, properties: ["location": "type"]}, {name: "30", value: 30, type: 0, properties: ["30": "literal"]}
+run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new/43 {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: 1223
 run/0: instruction channel-full?/1
@@ -514,7 +514,7 @@ run/0: instruction channel-full?/5
 run/0: {name: "len", value: 3, type: 1, properties: ["len": "integer"]} <- channel-capacity/113 {name: "chan", value: 1, type: 2-10, properties: ["chan": "address":"channel"]}
 mem/0: location 1225 is 1031
 run/0: instruction channel-capacity/0
-run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new/42 {name: "location", value: 1, type: 0, properties: ["location": "type"]}, {name: "30", value: 30, type: 0, properties: ["30": "literal"]}
+run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new/43 {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: 1254
 run/0: instruction channel-capacity/1
@@ -581,7 +581,7 @@ mem/0: location 1230 is 0
 run/0: result 0 is 0
 mem/0: storing 0 in location 3
 run/0: instruction channel-read-not-full/1
-run/0: memory-should-contain/44 {name: "
+run/0: memory-should-contain/45 {name: "
     2 <- 1  # empty?
     3 <- 0  # full?
   ", value: 0, type: 0, properties: ["
diff --git a/cpp/.traces/channel-wrap b/cpp/.traces/channel-wrap
index dc636db0..277309ec 100644
--- a/cpp/.traces/channel-wrap
+++ b/cpp/.traces/channel-wrap
@@ -48,7 +48,7 @@ after-brace/0: memory-should-contain ...
 new/0: routine allocated memory from 1000 to 101000
 schedule/0: channel-wrap
 run/0: instruction channel-wrap/0
-run/0: run/43 {name: "
+run/0: run/44 {name: "
     # channel with just 1 slot
     1:address:channel <- init-channel 1:literal/capacity
     # write and read a value
@@ -131,11 +131,11 @@ after-brace/0: get ...
 run/0: instruction run1001/0
 run/0: {name: "1", value: 1, type: 2-10, properties: ["1": "address":"channel"]} <- init-channel/108 {name: "1", value: 1, type: 0, properties: ["1": "literal", "capacity": ]}
 run/0: instruction init-channel/0
-run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new/42 {name: "location", value: 1, type: 0, properties: ["location": "type"]}, {name: "30", value: 30, type: 0, properties: ["30": "literal"]}
+run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new/43 {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 init-channel/1
-run/0: {name: "result", value: 1, type: 2-10, properties: ["result": "address":"channel"]} <- new/42 {name: "channel", value: 10, type: 0, properties: ["channel": "type"]}
+run/0: {name: "result", value: 1, type: 2-10, properties: ["result": "address":"channel"]} <- new/43 {name: "channel", value: 10, type: 0, properties: ["channel": "type"]}
 mem/0: new alloc: 1031
 mem/0: storing 1031 in location 1002
 run/0: instruction init-channel/2
@@ -184,7 +184,7 @@ run/0: address to copy is 1033
 run/0: product 0 is 1033
 mem/0: storing 1033 in location 1006
 run/0: instruction init-channel/9
-run/0: {name: "dest", value: 5, type: 2-2-5-1, properties: ["dest": "address":"address":"array":"location", "deref": ]} <- new/42 {name: "location", value: 1, type: 0, properties: ["location": "type"]}, {name: "capacity", value: 4, type: 1, properties: ["capacity": "integer"]}
+run/0: {name: "dest", value: 5, type: 2-2-5-1, properties: ["dest": "address":"address":"array":"location", "deref": ]} <- new/43 {name: "location", value: 1, type: 0, properties: ["location": "type"]}, {name: "capacity", value: 4, type: 1, properties: ["capacity": "integer"]}
 mem/0: location 1005 is 2
 mem/0: array size is 2
 mem/0: new alloc: 1034
@@ -199,7 +199,7 @@ run/0: instruction run1001/1
 run/0: {name: "1", value: 1, type: 2-10, properties: ["1": "address":"channel"]} <- write/109 {name: "1", value: 1, type: 2-10, properties: ["1": "address":"channel"]}, {name: "34", value: 34, type: 0, properties: ["34": "literal"]}
 mem/0: location 1 is 1031
 run/0: instruction write/0
-run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new/42 {name: "location", value: 1, type: 0, properties: ["location": "type"]}, {name: "30", value: 30, type: 0, properties: ["30": "literal"]}
+run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new/43 {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 write/1
@@ -214,7 +214,7 @@ run/0: instruction write/4
 run/0: {name: "full", value: 3, type: 3, properties: ["full": "boolean"]} <- channel-full?/110 {name: "chan", value: 1, type: 2-10, properties: ["chan": "address":"channel"]}
 mem/0: location 1039 is 1031
 run/0: instruction channel-full?/0
-run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new/42 {name: "location", value: 1, type: 0, properties: ["location": "type"]}, {name: "30", value: 30, type: 0, properties: ["30": "literal"]}
+run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new/43 {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 channel-full?/1
@@ -242,7 +242,7 @@ run/0: instruction channel-full?/5
 run/0: {name: "len", value: 3, type: 1, properties: ["len": "integer"]} <- channel-capacity/113 {name: "chan", value: 1, type: 2-10, properties: ["chan": "address":"channel"]}
 mem/0: location 1070 is 1031
 run/0: instruction channel-capacity/0
-run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new/42 {name: "location", value: 1, type: 0, properties: ["location": "type"]}, {name: "30", value: 30, type: 0, properties: ["30": "literal"]}
+run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new/43 {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 channel-capacity/1
@@ -382,7 +382,7 @@ run/0: instruction run1001/2
 run/0: {name: "_", value: 0, type: 0, properties: ["_": "dummy"]}, {name: "1", value: 1, type: 2-10, properties: ["1": "address":"channel"]} <- read/111 {name: "1", value: 1, type: 2-10, properties: ["1": "address":"channel"]}
 mem/0: location 1 is 1031
 run/0: instruction read/0
-run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new/42 {name: "location", value: 1, type: 0, properties: ["location": "type"]}, {name: "30", value: 30, type: 0, properties: ["30": "literal"]}
+run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new/43 {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/1
@@ -393,7 +393,7 @@ run/0: instruction read/3
 run/0: {name: "empty", value: 2, type: 3, properties: ["empty": "boolean"]} <- channel-empty?/112 {name: "chan", value: 1, type: 2-10, properties: ["chan": "address":"channel"]}
 mem/0: location 1132 is 1031
 run/0: instruction channel-empty?/0
-run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new/42 {name: "location", value: 1, type: 0, properties: ["location": "type"]}, {name: "30", value: 30, type: 0, properties: ["30": "literal"]}
+run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new/43 {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: 1161
 run/0: instruction channel-empty?/1
@@ -528,7 +528,7 @@ run/0: instruction run1001/5
 run/0: {name: "1", value: 1, type: 2-10, properties: ["1": "address":"channel"]} <- write/109 {name: "1", value: 1, type: 2-10, properties: ["1": "address":"channel"]}, {name: "34", value: 34, type: 0, properties: ["34": "literal"]}
 mem/0: location 1 is 1031
 run/0: instruction write/0
-run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new/42 {name: "location", value: 1, type: 0, properties: ["location": "type"]}, {name: "30", value: 30, type: 0, properties: ["30": "literal"]}
+run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new/43 {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: 1192
 run/0: instruction write/1
@@ -543,7 +543,7 @@ run/0: instruction write/4
 run/0: {name: "full", value: 3, type: 3, properties: ["full": "boolean"]} <- channel-full?/110 {name: "chan", value: 1, type: 2-10, properties: ["chan": "address":"channel"]}
 mem/0: location 1194 is 1031
 run/0: instruction channel-full?/0
-run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new/42 {name: "location", value: 1, type: 0, properties: ["location": "type"]}, {name: "30", value: 30, type: 0, properties: ["30": "literal"]}
+run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new/43 {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: 1223
 run/0: instruction channel-full?/1
@@ -571,7 +571,7 @@ run/0: instruction channel-full?/5
 run/0: {name: "len", value: 3, type: 1, properties: ["len": "integer"]} <- channel-capacity/113 {name: "chan", value: 1, type: 2-10, properties: ["chan": "address":"channel"]}
 mem/0: location 1225 is 1031
 run/0: instruction channel-capacity/0
-run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new/42 {name: "location", value: 1, type: 0, properties: ["location": "type"]}, {name: "30", value: 30, type: 0, properties: ["30": "literal"]}
+run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new/43 {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: 1254
 run/0: instruction channel-capacity/1
@@ -728,7 +728,7 @@ run/0: instruction run1001/7
 run/0: {name: "_", value: 0, type: 0, properties: ["_": "dummy"]}, {name: "1", value: 1, type: 2-10, properties: ["1": "address":"channel"]} <- read/111 {name: "1", value: 1, type: 2-10, properties: ["1": "address":"channel"]}
 mem/0: location 1 is 1031
 run/0: instruction read/0
-run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new/42 {name: "location", value: 1, type: 0, properties: ["location": "type"]}, {name: "30", value: 30, type: 0, properties: ["30": "literal"]}
+run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new/43 {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: 1285
 run/0: instruction read/1
@@ -739,7 +739,7 @@ run/0: instruction read/3
 run/0: {name: "empty", value: 2, type: 3, properties: ["empty": "boolean"]} <- channel-empty?/112 {name: "chan", value: 1, type: 2-10, properties: ["chan": "address":"channel"]}
 mem/0: location 1287 is 1031
 run/0: instruction channel-empty?/0
-run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new/42 {name: "location", value: 1, type: 0, properties: ["location": "type"]}, {name: "30", value: 30, type: 0, properties: ["30": "literal"]}
+run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new/43 {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: 1316
 run/0: instruction channel-empty?/1
@@ -865,7 +865,7 @@ mem/0: location 1031 is 0
 run/0: product 0 is 0
 mem/0: storing 0 in location 5
 run/0: instruction channel-wrap/1
-run/0: memory-should-contain/44 {name: "
+run/0: memory-should-contain/45 {name: "
     2 <- 1  # first-free after first write
     3 <- 1  # first-full after first read
     4 <- 0  # first-free after second write, wrapped
diff --git a/cpp/.traces/channel-write-full b/cpp/.traces/channel-write-full
index 2f602df1..c7c911f2 100644
--- a/cpp/.traces/channel-write-full
+++ b/cpp/.traces/channel-write-full
@@ -24,7 +24,7 @@ after-brace/0: memory-should-contain ...
 new/0: routine allocated memory from 1000 to 101000
 schedule/0: channel-write-full
 run/0: instruction channel-write-full/0
-run/0: run/43 {name: "
+run/0: run/44 {name: "
     1:address:channel <- init-channel 1:literal/capacity
     1:address:channel <- write 1:address:channel, 34:literal
     2:integer <- channel-empty? 1:address:channel
@@ -56,11 +56,11 @@ after-brace/0: channel-full? ...
 run/0: instruction run1001/0
 run/0: {name: "1", value: 1, type: 2-10, properties: ["1": "address":"channel"]} <- init-channel/108 {name: "1", value: 1, type: 0, properties: ["1": "literal", "capacity": ]}
 run/0: instruction init-channel/0
-run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new/42 {name: "location", value: 1, type: 0, properties: ["location": "type"]}, {name: "30", value: 30, type: 0, properties: ["30": "literal"]}
+run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new/43 {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 init-channel/1
-run/0: {name: "result", value: 1, type: 2-10, properties: ["result": "address":"channel"]} <- new/42 {name: "channel", value: 10, type: 0, properties: ["channel": "type"]}
+run/0: {name: "result", value: 1, type: 2-10, properties: ["result": "address":"channel"]} <- new/43 {name: "channel", value: 10, type: 0, properties: ["channel": "type"]}
 mem/0: new alloc: 1031
 mem/0: storing 1031 in location 1002
 run/0: instruction init-channel/2
@@ -109,7 +109,7 @@ run/0: address to copy is 1033
 run/0: product 0 is 1033
 mem/0: storing 1033 in location 1006
 run/0: instruction init-channel/9
-run/0: {name: "dest", value: 5, type: 2-2-5-1, properties: ["dest": "address":"address":"array":"location", "deref": ]} <- new/42 {name: "location", value: 1, type: 0, properties: ["location": "type"]}, {name: "capacity", value: 4, type: 1, properties: ["capacity": "integer"]}
+run/0: {name: "dest", value: 5, type: 2-2-5-1, properties: ["dest": "address":"address":"array":"location", "deref": ]} <- new/43 {name: "location", value: 1, type: 0, properties: ["location": "type"]}, {name: "capacity", value: 4, type: 1, properties: ["capacity": "integer"]}
 mem/0: location 1005 is 2
 mem/0: array size is 2
 mem/0: new alloc: 1034
@@ -124,7 +124,7 @@ run/0: instruction run1001/1
 run/0: {name: "1", value: 1, type: 2-10, properties: ["1": "address":"channel"]} <- write/109 {name: "1", value: 1, type: 2-10, properties: ["1": "address":"channel"]}, {name: "34", value: 34, type: 0, properties: ["34": "literal"]}
 mem/0: location 1 is 1031
 run/0: instruction write/0
-run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new/42 {name: "location", value: 1, type: 0, properties: ["location": "type"]}, {name: "30", value: 30, type: 0, properties: ["30": "literal"]}
+run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new/43 {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 write/1
@@ -139,7 +139,7 @@ run/0: instruction write/4
 run/0: {name: "full", value: 3, type: 3, properties: ["full": "boolean"]} <- channel-full?/110 {name: "chan", value: 1, type: 2-10, properties: ["chan": "address":"channel"]}
 mem/0: location 1039 is 1031
 run/0: instruction channel-full?/0
-run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new/42 {name: "location", value: 1, type: 0, properties: ["location": "type"]}, {name: "30", value: 30, type: 0, properties: ["30": "literal"]}
+run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new/43 {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 channel-full?/1
@@ -167,7 +167,7 @@ run/0: instruction channel-full?/5
 run/0: {name: "len", value: 3, type: 1, properties: ["len": "integer"]} <- channel-capacity/113 {name: "chan", value: 1, type: 2-10, properties: ["chan": "address":"channel"]}
 mem/0: location 1070 is 1031
 run/0: instruction channel-capacity/0
-run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new/42 {name: "location", value: 1, type: 0, properties: ["location": "type"]}, {name: "30", value: 30, type: 0, properties: ["30": "literal"]}
+run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new/43 {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 channel-capacity/1
@@ -307,7 +307,7 @@ run/0: instruction run1001/2
 run/0: {name: "2", value: 2, type: 1, properties: ["2": "integer"]} <- channel-empty?/112 {name: "1", value: 1, type: 2-10, properties: ["1": "address":"channel"]}
 mem/0: location 1 is 1031
 run/0: instruction channel-empty?/0
-run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new/42 {name: "location", value: 1, type: 0, properties: ["location": "type"]}, {name: "30", value: 30, type: 0, properties: ["30": "literal"]}
+run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new/43 {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 channel-empty?/1
@@ -351,7 +351,7 @@ run/0: instruction run1001/3
 run/0: {name: "3", value: 3, type: 1, properties: ["3": "integer"]} <- channel-full?/110 {name: "1", value: 1, type: 2-10, properties: ["1": "address":"channel"]}
 mem/0: location 1 is 1031
 run/0: instruction channel-full?/0
-run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new/42 {name: "location", value: 1, type: 0, properties: ["location": "type"]}, {name: "30", value: 30, type: 0, properties: ["30": "literal"]}
+run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new/43 {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: 1161
 run/0: instruction channel-full?/1
@@ -379,7 +379,7 @@ run/0: instruction channel-full?/5
 run/0: {name: "len", value: 3, type: 1, properties: ["len": "integer"]} <- channel-capacity/113 {name: "chan", value: 1, type: 2-10, properties: ["chan": "address":"channel"]}
 mem/0: location 1163 is 1031
 run/0: instruction channel-capacity/0
-run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new/42 {name: "location", value: 1, type: 0, properties: ["location": "type"]}, {name: "30", value: 30, type: 0, properties: ["30": "literal"]}
+run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new/43 {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: 1192
 run/0: instruction channel-capacity/1
@@ -446,7 +446,7 @@ mem/0: location 1168 is 1
 run/0: result 0 is 1
 mem/0: storing 1 in location 3
 run/0: instruction channel-write-full/1
-run/0: memory-should-contain/44 {name: "
+run/0: memory-should-contain/45 {name: "
     2 <- 0  # empty?
     3 <- 1  # full?
   ", value: 0, type: 0, properties: ["
diff --git a/cpp/.traces/channel-write-increments-free b/cpp/.traces/channel-write-increments-free
index 083e3503..44dd1ebd 100644
--- a/cpp/.traces/channel-write-increments-free
+++ b/cpp/.traces/channel-write-increments-free
@@ -24,7 +24,7 @@ after-brace/0: memory-should-contain ...
 new/0: routine allocated memory from 1000 to 101000
 schedule/0: channel-write-increments-free
 run/0: instruction channel-write-increments-free/0
-run/0: run/43 {name: "
+run/0: run/44 {name: "
     1:address:channel <- init-channel 3:literal/capacity
     1:address:channel <- write 1:address:channel, 34:literal
     2:integer <- get 1:address:channel/deref, first-full:offset
@@ -60,11 +60,11 @@ after-brace/0: get ...
 run/0: instruction run1001/0
 run/0: {name: "1", value: 1, type: 2-10, properties: ["1": "address":"channel"]} <- init-channel/108 {name: "3", value: 3, type: 0, properties: ["3": "literal", "capacity": ]}
 run/0: instruction init-channel/0
-run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new/42 {name: "location", value: 1, type: 0, properties: ["location": "type"]}, {name: "30", value: 30, type: 0, properties: ["30": "literal"]}
+run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new/43 {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 init-channel/1
-run/0: {name: "result", value: 1, type: 2-10, properties: ["result": "address":"channel"]} <- new/42 {name: "channel", value: 10, type: 0, properties: ["channel": "type"]}
+run/0: {name: "result", value: 1, type: 2-10, properties: ["result": "address":"channel"]} <- new/43 {name: "channel", value: 10, type: 0, properties: ["channel": "type"]}
 mem/0: new alloc: 1031
 mem/0: storing 1031 in location 1002
 run/0: instruction init-channel/2
@@ -113,7 +113,7 @@ run/0: address to copy is 1033
 run/0: product 0 is 1033
 mem/0: storing 1033 in location 1006
 run/0: instruction init-channel/9
-run/0: {name: "dest", value: 5, type: 2-2-5-1, properties: ["dest": "address":"address":"array":"location", "deref": ]} <- new/42 {name: "location", value: 1, type: 0, properties: ["location": "type"]}, {name: "capacity", value: 4, type: 1, properties: ["capacity": "integer"]}
+run/0: {name: "dest", value: 5, type: 2-2-5-1, properties: ["dest": "address":"address":"array":"location", "deref": ]} <- new/43 {name: "location", value: 1, type: 0, properties: ["location": "type"]}, {name: "capacity", value: 4, type: 1, properties: ["capacity": "integer"]}
 mem/0: location 1005 is 4
 mem/0: array size is 4
 mem/0: new alloc: 1034
@@ -128,7 +128,7 @@ run/0: instruction run1001/1
 run/0: {name: "1", value: 1, type: 2-10, properties: ["1": "address":"channel"]} <- write/109 {name: "1", value: 1, type: 2-10, properties: ["1": "address":"channel"]}, {name: "34", value: 34, type: 0, properties: ["34": "literal"]}
 mem/0: location 1 is 1031
 run/0: instruction write/0
-run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new/42 {name: "location", value: 1, type: 0, properties: ["location": "type"]}, {name: "30", value: 30, type: 0, properties: ["30": "literal"]}
+run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new/43 {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: 1039
 run/0: instruction write/1
@@ -143,7 +143,7 @@ run/0: instruction write/4
 run/0: {name: "full", value: 3, type: 3, properties: ["full": "boolean"]} <- channel-full?/110 {name: "chan", value: 1, type: 2-10, properties: ["chan": "address":"channel"]}
 mem/0: location 1041 is 1031
 run/0: instruction channel-full?/0
-run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new/42 {name: "location", value: 1, type: 0, properties: ["location": "type"]}, {name: "30", value: 30, type: 0, properties: ["30": "literal"]}
+run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new/43 {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: 1070
 run/0: instruction channel-full?/1
@@ -171,7 +171,7 @@ run/0: instruction channel-full?/5
 run/0: {name: "len", value: 3, type: 1, properties: ["len": "integer"]} <- channel-capacity/113 {name: "chan", value: 1, type: 2-10, properties: ["chan": "address":"channel"]}
 mem/0: location 1072 is 1031
 run/0: instruction channel-capacity/0
-run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new/42 {name: "location", value: 1, type: 0, properties: ["location": "type"]}, {name: "30", value: 30, type: 0, properties: ["30": "literal"]}
+run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new/43 {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: 1101
 run/0: instruction channel-capacity/1
@@ -328,7 +328,7 @@ mem/0: location 1032 is 1
 run/0: product 0 is 1
 mem/0: storing 1 in location 3
 run/0: instruction channel-write-increments-free/1
-run/0: memory-should-contain/44 {name: "
+run/0: memory-should-contain/45 {name: "
     2 <- 0  # first-full
     3 <- 1  # first-free
   ", value: 0, type: 0, properties: ["
diff --git a/cpp/.traces/channel-write-not-empty b/cpp/.traces/channel-write-not-empty
index 4ddf4687..59182ddd 100644
--- a/cpp/.traces/channel-write-not-empty
+++ b/cpp/.traces/channel-write-not-empty
@@ -24,7 +24,7 @@ after-brace/0: memory-should-contain ...
 new/0: routine allocated memory from 1000 to 101000
 schedule/0: channel-write-not-empty
 run/0: instruction channel-write-not-empty/0
-run/0: run/43 {name: "
+run/0: run/44 {name: "
     1:address:channel <- init-channel 3:literal/capacity
     1:address:channel <- write 1:address:channel, 34:literal
     2:integer <- channel-empty? 1:address:channel
@@ -56,11 +56,11 @@ after-brace/0: channel-full? ...
 run/0: instruction run1001/0
 run/0: {name: "1", value: 1, type: 2-10, properties: ["1": "address":"channel"]} <- init-channel/108 {name: "3", value: 3, type: 0, properties: ["3": "literal", "capacity": ]}
 run/0: instruction init-channel/0
-run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new/42 {name: "location", value: 1, type: 0, properties: ["location": "type"]}, {name: "30", value: 30, type: 0, properties: ["30": "literal"]}
+run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new/43 {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 init-channel/1
-run/0: {name: "result", value: 1, type: 2-10, properties: ["result": "address":"channel"]} <- new/42 {name: "channel", value: 10, type: 0, properties: ["channel": "type"]}
+run/0: {name: "result", value: 1, type: 2-10, properties: ["result": "address":"channel"]} <- new/43 {name: "channel", value: 10, type: 0, properties: ["channel": "type"]}
 mem/0: new alloc: 1031
 mem/0: storing 1031 in location 1002
 run/0: instruction init-channel/2
@@ -109,7 +109,7 @@ run/0: address to copy is 1033
 run/0: product 0 is 1033
 mem/0: storing 1033 in location 1006
 run/0: instruction init-channel/9
-run/0: {name: "dest", value: 5, type: 2-2-5-1, properties: ["dest": "address":"address":"array":"location", "deref": ]} <- new/42 {name: "location", value: 1, type: 0, properties: ["location": "type"]}, {name: "capacity", value: 4, type: 1, properties: ["capacity": "integer"]}
+run/0: {name: "dest", value: 5, type: 2-2-5-1, properties: ["dest": "address":"address":"array":"location", "deref": ]} <- new/43 {name: "location", value: 1, type: 0, properties: ["location": "type"]}, {name: "capacity", value: 4, type: 1, properties: ["capacity": "integer"]}
 mem/0: location 1005 is 4
 mem/0: array size is 4
 mem/0: new alloc: 1034
@@ -124,7 +124,7 @@ run/0: instruction run1001/1
 run/0: {name: "1", value: 1, type: 2-10, properties: ["1": "address":"channel"]} <- write/109 {name: "1", value: 1, type: 2-10, properties: ["1": "address":"channel"]}, {name: "34", value: 34, type: 0, properties: ["34": "literal"]}
 mem/0: location 1 is 1031
 run/0: instruction write/0
-run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new/42 {name: "location", value: 1, type: 0, properties: ["location": "type"]}, {name: "30", value: 30, type: 0, properties: ["30": "literal"]}
+run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new/43 {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: 1039
 run/0: instruction write/1
@@ -139,7 +139,7 @@ run/0: instruction write/4
 run/0: {name: "full", value: 3, type: 3, properties: ["full": "boolean"]} <- channel-full?/110 {name: "chan", value: 1, type: 2-10, properties: ["chan": "address":"channel"]}
 mem/0: location 1041 is 1031
 run/0: instruction channel-full?/0
-run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new/42 {name: "location", value: 1, type: 0, properties: ["location": "type"]}, {name: "30", value: 30, type: 0, properties: ["30": "literal"]}
+run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new/43 {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: 1070
 run/0: instruction channel-full?/1
@@ -167,7 +167,7 @@ run/0: instruction channel-full?/5
 run/0: {name: "len", value: 3, type: 1, properties: ["len": "integer"]} <- channel-capacity/113 {name: "chan", value: 1, type: 2-10, properties: ["chan": "address":"channel"]}
 mem/0: location 1072 is 1031
 run/0: instruction channel-capacity/0
-run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new/42 {name: "location", value: 1, type: 0, properties: ["location": "type"]}, {name: "30", value: 30, type: 0, properties: ["30": "literal"]}
+run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new/43 {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: 1101
 run/0: instruction channel-capacity/1
@@ -307,7 +307,7 @@ run/0: instruction run1001/2
 run/0: {name: "2", value: 2, type: 1, properties: ["2": "integer"]} <- channel-empty?/112 {name: "1", value: 1, type: 2-10, properties: ["1": "address":"channel"]}
 mem/0: location 1 is 1031
 run/0: instruction channel-empty?/0
-run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new/42 {name: "location", value: 1, type: 0, properties: ["location": "type"]}, {name: "30", value: 30, type: 0, properties: ["30": "literal"]}
+run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new/43 {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: 1132
 run/0: instruction channel-empty?/1
@@ -351,7 +351,7 @@ run/0: instruction run1001/3
 run/0: {name: "3", value: 3, type: 1, properties: ["3": "integer"]} <- channel-full?/110 {name: "1", value: 1, type: 2-10, properties: ["1": "address":"channel"]}
 mem/0: location 1 is 1031
 run/0: instruction channel-full?/0
-run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new/42 {name: "location", value: 1, type: 0, properties: ["location": "type"]}, {name: "30", value: 30, type: 0, properties: ["30": "literal"]}
+run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new/43 {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: 1163
 run/0: instruction channel-full?/1
@@ -379,7 +379,7 @@ run/0: instruction channel-full?/5
 run/0: {name: "len", value: 3, type: 1, properties: ["len": "integer"]} <- channel-capacity/113 {name: "chan", value: 1, type: 2-10, properties: ["chan": "address":"channel"]}
 mem/0: location 1165 is 1031
 run/0: instruction channel-capacity/0
-run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new/42 {name: "location", value: 1, type: 0, properties: ["location": "type"]}, {name: "30", value: 30, type: 0, properties: ["30": "literal"]}
+run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new/43 {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: 1194
 run/0: instruction channel-capacity/1
@@ -443,7 +443,7 @@ mem/0: location 1170 is 0
 run/0: result 0 is 0
 mem/0: storing 0 in location 3
 run/0: instruction channel-write-not-empty/1
-run/0: memory-should-contain/44 {name: "
+run/0: memory-should-contain/45 {name: "
     2 <- 0  # empty?
     3 <- 0  # full?
   ", value: 0, type: 0, properties: ["
diff --git a/cpp/.traces/check_string_in_memory b/cpp/.traces/check_string_in_memory
index 335059f6..7dde3bb0 100644
--- a/cpp/.traces/check_string_in_memory
+++ b/cpp/.traces/check_string_in_memory
@@ -22,7 +22,7 @@ after-brace/0: memory-should-contain ...
 new/0: routine allocated memory from 1000 to 101000
 schedule/0: check_string_in_memory
 run/0: instruction check_string_in_memory/0
-run/0: run/43 {name: "
+run/0: run/44 {name: "
     1:integer <- copy 3:literal
     2:character <- copy 97:literal  # 'a'
     3:character <- copy 98:literal  # 'b'
@@ -67,7 +67,7 @@ run/0: {name: "4", value: 4, type: 4, properties: ["4": "character"]} <- copy/1
 run/0: ingredient 0 is 99
 mem/0: storing 99 in location 4
 run/0: instruction check_string_in_memory/1
-run/0: memory-should-contain/44 {name: "
+run/0: memory-should-contain/45 {name: "
     1:string <- [abc]
   ", value: 0, type: 0, properties: ["
     1:string <- [abc]
diff --git a/cpp/.traces/check_trace b/cpp/.traces/check_trace
index bdea161d..624d3b95 100644
--- a/cpp/.traces/check_trace
+++ b/cpp/.traces/check_trace
@@ -16,7 +16,7 @@ after-brace/0: trace-should-contain ...
 new/0: routine allocated memory from 1000 to 101000
 schedule/0: check_trace
 run/0: instruction check_trace/0
-run/0: run/43 {name: "
+run/0: run/44 {name: "
     1:integer <- add 2:literal, 2:literal
   ", value: 0, type: 0, properties: ["
     1:integer <- add 2:literal, 2:literal
@@ -34,7 +34,7 @@ run/0: ingredient 1 is 2
 run/0: product 0 is 4
 mem/0: storing 4 in location 1
 run/0: instruction check_trace/1
-run/0: trace-should-contain/45 {name: "
+run/0: trace-should-contain/46 {name: "
     mem: storing 4 in location 1
   ", value: 0, type: 0, properties: ["
     mem: storing 4 in location 1
diff --git a/cpp/.traces/check_trace_instruction b/cpp/.traces/check_trace_instruction
index 95e712ff..f812060d 100644
--- a/cpp/.traces/check_trace_instruction
+++ b/cpp/.traces/check_trace_instruction
@@ -16,7 +16,7 @@ after-brace/0: trace-should-contain ...
 new/0: routine allocated memory from 1000 to 101000
 schedule/0: check_trace_instruction
 run/0: instruction check_trace_instruction/0
-run/0: run/43 {name: "
+run/0: run/44 {name: "
     trace [foo], [aaa]
   ", value: 0, type: 0, properties: ["
     trace [foo], [aaa]
@@ -30,7 +30,7 @@ run/0: instruction run1001/0
 run/0: trace/18 {name: "foo", value: 0, type: 0, properties: ["foo": "literal-string"]}, {name: "aaa", value: 0, type: 0, properties: ["aaa": "literal-string"]}
 foo/0: aaa
 run/0: instruction check_trace_instruction/1
-run/0: trace-should-contain/45 {name: "
+run/0: trace-should-contain/46 {name: "
     foo: aaa
   ", value: 0, type: 0, properties: ["
     foo: aaa
diff --git a/cpp/.traces/check_trace_negative b/cpp/.traces/check_trace_negative
index ca979241..b5330633 100644
--- a/cpp/.traces/check_trace_negative
+++ b/cpp/.traces/check_trace_negative
@@ -16,7 +16,7 @@ after-brace/0: trace-should-not-contain ...
 new/0: routine allocated memory from 1000 to 101000
 schedule/0: check_trace_negative
 run/0: instruction check_trace_negative/0
-run/0: run/43 {name: "
+run/0: run/44 {name: "
     1:integer <- add 2:literal, 2:literal
   ", value: 0, type: 0, properties: ["
     1:integer <- add 2:literal, 2:literal
@@ -34,7 +34,7 @@ run/0: ingredient 1 is 2
 run/0: product 0 is 4
 mem/0: storing 4 in location 1
 run/0: instruction check_trace_negative/1
-run/0: trace-should-not-contain/46 {name: "
+run/0: trace-should-not-contain/47 {name: "
     mem: storing 5 in location 1
   ", value: 0, type: 0, properties: ["
     mem: storing 5 in location 1
diff --git a/cpp/.traces/clear-line-erases-printed-characters b/cpp/.traces/clear-line-erases-printed-characters
index 33dbbe49..9a7e36aa 100644
--- a/cpp/.traces/clear-line-erases-printed-characters
+++ b/cpp/.traces/clear-line-erases-printed-characters
@@ -46,7 +46,7 @@ after-brace/0: memory-should-contain ...
 new/0: routine allocated memory from 1000 to 101000
 schedule/0: clear-line-erases-printed-characters
 run/0: instruction clear-line-erases-printed-characters/0
-run/0: run/43 {name: "
+run/0: run/44 {name: "
 #?     $start-tracing #? 3
     1:address:screen <- init-fake-screen 3:literal/width, 2:literal/height
     # print a character
@@ -103,11 +103,11 @@ after-brace/0: copy ...
 run/0: instruction run1001/0
 run/0: {name: "1", value: 1, type: 2-11, properties: ["1": "address":"screen"]} <- init-fake-screen/115 {name: "3", value: 3, type: 0, properties: ["3": "literal", "width": ]}, {name: "2", value: 2, type: 0, properties: ["2": "literal", "height": ]}
 run/0: instruction init-fake-screen/0
-run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new/42 {name: "location", value: 1, type: 0, properties: ["location": "type"]}, {name: "30", value: 30, type: 0, properties: ["30": "literal", "capacity": ]}
+run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new/43 {name: "location", value: 1, type: 0, properties: ["location": "type"]}, {name: "30", value: 30, type: 0, properties: ["30": "literal", "capacity": ]}
 mem/0: array size is 30
 mem/0: new alloc: 1000
 run/0: instruction init-fake-screen/1
-run/0: {name: "result", value: 1, type: 2-11, properties: ["result": "address":"screen"]} <- new/42 {name: "screen", value: 11, type: 0, properties: ["screen": "type"]}
+run/0: {name: "result", value: 1, type: 2-11, properties: ["result": "address":"screen"]} <- new/43 {name: "screen", value: 11, type: 0, properties: ["screen": "type"]}
 mem/0: new alloc: 1031
 mem/0: storing 1031 in location 1002
 run/0: instruction init-fake-screen/2
@@ -182,7 +182,7 @@ 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-screen/12
-run/0: {name: "buf", value: 7, type: 2-2-5-4, properties: ["buf": "address":"address":"array":"character", "deref": ]} <- new/42 {name: "character", value: 0, type: 0, properties: ["character": "literal"]}, {name: "bufsize", value: 6, type: 1, properties: ["bufsize": "integer"]}
+run/0: {name: "buf", value: 7, type: 2-2-5-4, properties: ["buf": "address":"address":"array":"character", "deref": ]} <- new/43 {name: "character", value: 0, type: 0, properties: ["character": "literal"]}, {name: "bufsize", value: 6, type: 1, properties: ["bufsize": "integer"]}
 mem/0: location 1007 is 6
 mem/0: array size is 6
 mem/0: new alloc: 1036
@@ -192,7 +192,7 @@ run/0: instruction init-fake-screen/13
 run/0: clear-screen/116 {name: "result", value: 1, type: 2-11, properties: ["result": "address":"screen"]}
 mem/0: location 1002 is 1031
 run/0: instruction clear-screen/0
-run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new/42 {name: "location", value: 1, type: 0, properties: ["location": "type"]}, {name: "30", value: 30, type: 0, properties: ["30": "literal"]}
+run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new/43 {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: 1043
 run/0: instruction clear-screen/1
@@ -476,7 +476,7 @@ run/0: instruction run1001/1
 run/0: {name: "1", value: 1, type: 2-11, properties: ["1": "address":"screen"]} <- print-character/117 {name: "1", value: 1, type: 2-11, properties: ["1": "address":"screen"]}, {name: "97", value: 97, type: 0, properties: ["97": "literal"]}
 mem/0: location 1 is 1031
 run/0: instruction print-character/0
-run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new/42 {name: "location", value: 1, type: 0, properties: ["location": "type"]}, {name: "30", value: 30, type: 0, properties: ["30": "literal"]}
+run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new/43 {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: 1074
 run/0: instruction print-character/1
@@ -594,7 +594,7 @@ run/0: instruction run1001/2
 run/0: {name: "1", value: 1, type: 2-11, properties: ["1": "address":"screen"]} <- move-cursor/120 {name: "1", value: 1, type: 2-11, properties: ["1": "address":"screen"]}, {name: "0", value: 0, type: 0, properties: ["0": "literal", "row": ]}, {name: "0", value: 0, type: 0, properties: ["0": "literal", "column": ]}
 mem/0: location 1 is 1031
 run/0: instruction move-cursor/0
-run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new/42 {name: "location", value: 1, type: 0, properties: ["location": "type"]}, {name: "30", value: 30, type: 0, properties: ["30": "literal"]}
+run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new/43 {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: 1105
 run/0: instruction move-cursor/1
@@ -651,7 +651,7 @@ run/0: instruction run1001/3
 run/0: {name: "1", value: 1, type: 2-11, properties: ["1": "address":"screen"]} <- clear-line/118 {name: "1", value: 1, type: 2-11, properties: ["1": "address":"screen"]}
 mem/0: location 1 is 1031
 run/0: instruction clear-line/0
-run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new/42 {name: "location", value: 1, type: 0, properties: ["location": "type"]}, {name: "30", value: 30, type: 0, properties: ["30": "literal"]}
+run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new/43 {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: 1136
 run/0: instruction clear-line/1
@@ -705,7 +705,7 @@ run/0: instruction clear-line/10
 run/0: print-character/117 {name: "x", value: 1, type: 2-11, properties: ["x": "address":"screen"]}, {name: " ", value: 0, type: 0, properties: [" ": "literal-string"]}
 mem/0: location 1138 is 1031
 run/0: instruction print-character/0
-run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new/42 {name: "location", value: 1, type: 0, properties: ["location": "type"]}, {name: "30", value: 30, type: 0, properties: ["30": "literal"]}
+run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new/43 {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: 1167
 run/0: instruction print-character/1
@@ -839,7 +839,7 @@ run/0: instruction clear-line/10
 run/0: print-character/117 {name: "x", value: 1, type: 2-11, properties: ["x": "address":"screen"]}, {name: " ", value: 0, type: 0, properties: [" ": "literal-string"]}
 mem/0: location 1138 is 1031
 run/0: instruction print-character/0
-run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new/42 {name: "location", value: 1, type: 0, properties: ["location": "type"]}, {name: "30", value: 30, type: 0, properties: ["30": "literal"]}
+run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new/43 {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: 1198
 run/0: instruction print-character/1
@@ -973,7 +973,7 @@ run/0: instruction clear-line/10
 run/0: print-character/117 {name: "x", value: 1, type: 2-11, properties: ["x": "address":"screen"]}, {name: " ", value: 0, type: 0, properties: [" ": "literal-string"]}
 mem/0: location 1138 is 1031
 run/0: instruction print-character/0
-run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new/42 {name: "location", value: 1, type: 0, properties: ["location": "type"]}, {name: "30", value: 30, type: 0, properties: ["30": "literal"]}
+run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new/43 {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: 1229
 run/0: instruction print-character/1
@@ -1144,7 +1144,7 @@ mem/0: storing 0 in location 7
 mem/0: storing 0 in location 8
 mem/0: storing 0 in location 9
 run/0: instruction clear-line-erases-printed-characters/1
-run/0: memory-should-contain/44 {name: "
+run/0: memory-should-contain/45 {name: "
     3 <- 6  # width*height
     4 <- 0
     5 <- 0
diff --git a/cpp/.traces/clear-line-erases-printed-characters2 b/cpp/.traces/clear-line-erases-printed-characters2
index 0c239a4e..f66506e6 100644
--- a/cpp/.traces/clear-line-erases-printed-characters2
+++ b/cpp/.traces/clear-line-erases-printed-characters2
@@ -36,11 +36,11 @@ schedule/0: clear-line-erases-printed-characters2
 run/0: instruction clear-line-erases-printed-characters2/0
 run/0: {name: "screen", value: 900, type: 2, properties: ["screen": "address"]} <- assume-screen/115 {name: "5", value: 5, type: 0, properties: ["5": "literal", "width": ]}, {name: "3", value: 3, type: 0, properties: ["3": "literal", "height": ]}
 run/0: instruction init-fake-screen/0
-run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new/42 {name: "location", value: 1, type: 0, properties: ["location": "type"]}, {name: "30", value: 30, type: 0, properties: ["30": "literal", "capacity": ]}
+run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new/43 {name: "location", value: 1, type: 0, properties: ["location": "type"]}, {name: "30", value: 30, type: 0, properties: ["30": "literal", "capacity": ]}
 mem/0: array size is 30
 mem/0: new alloc: 1000
 run/0: instruction init-fake-screen/1
-run/0: {name: "result", value: 1, type: 2-11, properties: ["result": "address":"screen"]} <- new/42 {name: "screen", value: 11, type: 0, properties: ["screen": "type"]}
+run/0: {name: "result", value: 1, type: 2-11, properties: ["result": "address":"screen"]} <- new/43 {name: "screen", value: 11, type: 0, properties: ["screen": "type"]}
 mem/0: new alloc: 1031
 mem/0: storing 1031 in location 1002
 run/0: instruction init-fake-screen/2
@@ -115,7 +115,7 @@ 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-screen/12
-run/0: {name: "buf", value: 7, type: 2-2-5-4, properties: ["buf": "address":"address":"array":"character", "deref": ]} <- new/42 {name: "character", value: 0, type: 0, properties: ["character": "literal"]}, {name: "bufsize", value: 6, type: 1, properties: ["bufsize": "integer"]}
+run/0: {name: "buf", value: 7, type: 2-2-5-4, properties: ["buf": "address":"address":"array":"character", "deref": ]} <- new/43 {name: "character", value: 0, type: 0, properties: ["character": "literal"]}, {name: "bufsize", value: 6, type: 1, properties: ["bufsize": "integer"]}
 mem/0: location 1007 is 15
 mem/0: array size is 15
 mem/0: new alloc: 1036
@@ -125,7 +125,7 @@ run/0: instruction init-fake-screen/13
 run/0: clear-screen/116 {name: "result", value: 1, type: 2-11, properties: ["result": "address":"screen"]}
 mem/0: location 1002 is 1031
 run/0: instruction clear-screen/0
-run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new/42 {name: "location", value: 1, type: 0, properties: ["location": "type"]}, {name: "30", value: 30, type: 0, properties: ["30": "literal"]}
+run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new/43 {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: 1052
 run/0: instruction clear-screen/1
@@ -748,7 +748,7 @@ mem/0: location 1002 is 1031
 run/0: result 0 is 1031
 mem/0: storing 1031 in location 900
 run/0: instruction clear-line-erases-printed-characters2/1
-run/0: run/43 {name: "
+run/0: run/44 {name: "
     # print a character
     screen:address <- print-character screen:address, 97:literal  # 'a'
     # move cursor to start of line
@@ -783,7 +783,7 @@ run/0: instruction run1001/0
 run/0: {name: "screen", value: 900, type: 2, properties: ["screen": "address"]} <- print-character/117 {name: "screen", value: 900, type: 2, properties: ["screen": "address"]}, {name: "97", value: 97, type: 0, properties: ["97": "literal"]}
 mem/0: location 900 is 1031
 run/0: instruction print-character/0
-run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new/42 {name: "location", value: 1, type: 0, properties: ["location": "type"]}, {name: "30", value: 30, type: 0, properties: ["30": "literal"]}
+run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new/43 {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: 1083
 run/0: instruction print-character/1
@@ -901,7 +901,7 @@ run/0: instruction run1001/1
 run/0: {name: "screen", value: 900, type: 2, properties: ["screen": "address"]} <- move-cursor/120 {name: "screen", value: 900, type: 2, properties: ["screen": "address"]}, {name: "0", value: 0, type: 0, properties: ["0": "literal", "row": ]}, {name: "0", value: 0, type: 0, properties: ["0": "literal", "column": ]}
 mem/0: location 900 is 1031
 run/0: instruction move-cursor/0
-run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new/42 {name: "location", value: 1, type: 0, properties: ["location": "type"]}, {name: "30", value: 30, type: 0, properties: ["30": "literal"]}
+run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new/43 {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: 1114
 run/0: instruction move-cursor/1
@@ -958,7 +958,7 @@ run/0: instruction run1001/2
 run/0: {name: "screen", value: 900, type: 2, properties: ["screen": "address"]} <- clear-line/118 {name: "screen", value: 900, type: 2, properties: ["screen": "address"]}
 mem/0: location 900 is 1031
 run/0: instruction clear-line/0
-run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new/42 {name: "location", value: 1, type: 0, properties: ["location": "type"]}, {name: "30", value: 30, type: 0, properties: ["30": "literal"]}
+run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new/43 {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: 1145
 run/0: instruction clear-line/1
@@ -1012,7 +1012,7 @@ run/0: instruction clear-line/10
 run/0: print-character/117 {name: "x", value: 1, type: 2-11, properties: ["x": "address":"screen"]}, {name: " ", value: 0, type: 0, properties: [" ": "literal-string"]}
 mem/0: location 1147 is 1031
 run/0: instruction print-character/0
-run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new/42 {name: "location", value: 1, type: 0, properties: ["location": "type"]}, {name: "30", value: 30, type: 0, properties: ["30": "literal"]}
+run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new/43 {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: 1176
 run/0: instruction print-character/1
@@ -1146,7 +1146,7 @@ run/0: instruction clear-line/10
 run/0: print-character/117 {name: "x", value: 1, type: 2-11, properties: ["x": "address":"screen"]}, {name: " ", value: 0, type: 0, properties: [" ": "literal-string"]}
 mem/0: location 1147 is 1031
 run/0: instruction print-character/0
-run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new/42 {name: "location", value: 1, type: 0, properties: ["location": "type"]}, {name: "30", value: 30, type: 0, properties: ["30": "literal"]}
+run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new/43 {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: 1207
 run/0: instruction print-character/1
@@ -1280,7 +1280,7 @@ run/0: instruction clear-line/10
 run/0: print-character/117 {name: "x", value: 1, type: 2-11, properties: ["x": "address":"screen"]}, {name: " ", value: 0, type: 0, properties: [" ": "literal-string"]}
 mem/0: location 1147 is 1031
 run/0: instruction print-character/0
-run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new/42 {name: "location", value: 1, type: 0, properties: ["location": "type"]}, {name: "30", value: 30, type: 0, properties: ["30": "literal"]}
+run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new/43 {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: 1238
 run/0: instruction print-character/1
@@ -1414,7 +1414,7 @@ run/0: instruction clear-line/10
 run/0: print-character/117 {name: "x", value: 1, type: 2-11, properties: ["x": "address":"screen"]}, {name: " ", value: 0, type: 0, properties: [" ": "literal-string"]}
 mem/0: location 1147 is 1031
 run/0: instruction print-character/0
-run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new/42 {name: "location", value: 1, type: 0, properties: ["location": "type"]}, {name: "30", value: 30, type: 0, properties: ["30": "literal"]}
+run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new/43 {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: 1269
 run/0: instruction print-character/1
@@ -1548,7 +1548,7 @@ run/0: instruction clear-line/10
 run/0: print-character/117 {name: "x", value: 1, type: 2-11, properties: ["x": "address":"screen"]}, {name: " ", value: 0, type: 0, properties: [" ": "literal-string"]}
 mem/0: location 1147 is 1031
 run/0: instruction print-character/0
-run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new/42 {name: "location", value: 1, type: 0, properties: ["location": "type"]}, {name: "30", value: 30, type: 0, properties: ["30": "literal"]}
+run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new/43 {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: 1300
 run/0: instruction print-character/1
@@ -1691,7 +1691,7 @@ mem/0: location 1147 is 1031
 run/0: result 0 is 1031
 mem/0: storing 1031 in location 900
 run/0: instruction clear-line-erases-printed-characters2/2
-run/0: screen-should-contain/60 {name: "
+run/0: screen-should-contain/61 {name: "
     .     .
     .     .
     .     .
diff --git a/cpp/.traces/closure b/cpp/.traces/closure
index fdec57d7..a506ac06 100644
--- a/cpp/.traces/closure
+++ b/cpp/.traces/closure
@@ -63,13 +63,13 @@ after-brace/0: reply ...
 new/0: routine allocated memory from 1000 to 101000
 schedule/0: main
 run/0: instruction main/0
-run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new/42 {name: "location", value: 1, type: 0, properties: ["location": "type"]}, {name: "30", value: 30, type: 0, properties: ["30": "literal"]}
+run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new/43 {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 main/1
 run/0: {name: "1", value: 1, type: 2-5-1, properties: ["1": "address":"array":"location", "names": "init-counter"]} <- init-counter/1001 
 run/0: instruction init-counter/0
-run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new/42 {name: "location", value: 1, type: 0, properties: ["location": "type"]}, {name: "30", value: 30, type: 0, properties: ["30": "literal"]}
+run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new/43 {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: 1031
 run/0: instruction init-counter/1
@@ -88,7 +88,7 @@ run/0: instruction main/2
 run/0: {name: "2", value: 2, type: 1, properties: ["2": "integer", "raw": ]} <- increment-counter/1002 {name: "1", value: 1, type: 2-5-1, properties: ["1": "address":"array":"location", "names": "init-counter"]}
 mem/0: location 1002 is 1031
 run/0: instruction increment-counter/0
-run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new/42 {name: "space", value: 0, type: 0, properties: ["space": "literal"]}, {name: "30", value: 30, type: 0, properties: ["30": "literal"]}
+run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new/43 {name: "space", value: 0, type: 0, properties: ["space": "literal"]}, {name: "30", value: 30, type: 0, properties: ["30": "literal"]}
 mem/0: array size is 30
 mem/0: new alloc: 1062
 run/0: instruction increment-counter/1
@@ -115,7 +115,7 @@ run/0: instruction main/3
 run/0: {name: "3", value: 3, type: 1, properties: ["3": "integer", "raw": ]} <- increment-counter/1002 {name: "1", value: 1, type: 2-5-1, properties: ["1": "address":"array":"location", "names": "init-counter"]}
 mem/0: location 1002 is 1031
 run/0: instruction increment-counter/0
-run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new/42 {name: "space", value: 0, type: 0, properties: ["space": "literal"]}, {name: "30", value: 30, type: 0, properties: ["30": "literal"]}
+run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new/43 {name: "space", value: 0, type: 0, properties: ["space": "literal"]}, {name: "30", value: 30, type: 0, properties: ["30": "literal"]}
 mem/0: array size is 30
 mem/0: new alloc: 1093
 run/0: instruction increment-counter/1
diff --git a/cpp/.traces/first_scenario_in_mu b/cpp/.traces/first_scenario_in_mu
index 48ac75b5..57b18527 100644
--- a/cpp/.traces/first_scenario_in_mu
+++ b/cpp/.traces/first_scenario_in_mu
@@ -16,7 +16,7 @@ after-brace/0: memory-should-contain ...
 new/0: routine allocated memory from 1000 to 101000
 schedule/0: first_scenario_in_mu
 run/0: instruction first_scenario_in_mu/0
-run/0: run/43 {name: "
+run/0: run/44 {name: "
     1:integer <- add 2:literal, 2:literal
   ", value: 0, type: 0, properties: ["
     1:integer <- add 2:literal, 2:literal
@@ -34,7 +34,7 @@ run/0: ingredient 1 is 2
 run/0: product 0 is 4
 mem/0: storing 4 in location 1
 run/0: instruction first_scenario_in_mu/1
-run/0: memory-should-contain/44 {name: "
+run/0: memory-should-contain/45 {name: "
     1 <- 4
   ", value: 0, type: 0, properties: ["
     1 <- 4
diff --git a/cpp/.traces/integer-to-decimal-digit-negative b/cpp/.traces/integer-to-decimal-digit-negative
index 069c202f..0f1d0bee 100644
--- a/cpp/.traces/integer-to-decimal-digit-negative
+++ b/cpp/.traces/integer-to-decimal-digit-negative
@@ -22,7 +22,7 @@ after-brace/0: memory-should-contain ...
 new/0: routine allocated memory from 1000 to 101000
 schedule/0: integer-to-decimal-digit-negative
 run/0: instruction integer-to-decimal-digit-negative/0
-run/0: run/43 {name: "
+run/0: run/44 {name: "
     1:address:array:character/raw <- integer-to-decimal-string -1:literal
     2:array:character/raw <- copy 1:address:array:character/deref/raw
   ", value: 0, type: 0, properties: ["
@@ -41,7 +41,7 @@ after-brace/0: copy ...
 run/0: instruction run1001/0
 run/0: {name: "1", value: 1, type: 2-5-4, properties: ["1": "address":"array":"character", "raw": ]} <- integer-to-decimal-string/105 {name: "-1", value: -1, type: 0, properties: ["-1": "literal"]}
 run/0: instruction integer-to-decimal-string/0
-run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new/42 {name: "location", value: 1, type: 0, properties: ["location": "type"]}, {name: "30", value: 30, type: 0, properties: ["30": "literal"]}
+run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new/43 {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 integer-to-decimal-string/1
@@ -85,11 +85,11 @@ mem/0: storing 1 in location 1002
 run/0: instruction integer-to-decimal-string/14
 run/0: {name: "tmp", value: 5, type: 2-9, properties: ["tmp": "address":"buffer"]} <- init-buffer/101 {name: "30", value: 30, type: 0, properties: ["30": "literal"]}
 run/0: instruction init-buffer/0
-run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new/42 {name: "location", value: 1, type: 0, properties: ["location": "type"]}, {name: "30", value: 30, type: 0, properties: ["30": "literal"]}
+run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new/43 {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: 1031
 run/0: instruction init-buffer/1
-run/0: {name: "result", value: 1, type: 2-9, properties: ["result": "address":"buffer"]} <- new/42 {name: "buffer", value: 9, type: 0, properties: ["buffer": "type"]}
+run/0: {name: "result", value: 1, type: 2-9, properties: ["result": "address":"buffer"]} <- new/43 {name: "buffer", value: 9, type: 0, properties: ["buffer": "type"]}
 mem/0: new alloc: 1062
 mem/0: storing 1062 in location 1033
 run/0: instruction init-buffer/2
@@ -118,7 +118,7 @@ run/0: {name: "capacity", value: 4, type: 1, properties: ["capacity": "integer"]
 run/0: product 0 is 30
 mem/0: storing 30 in location 1036
 run/0: instruction init-buffer/6
-run/0: {name: "s", value: 3, type: 2-2-5-4, properties: ["s": "address":"address":"array":"character", "deref": ]} <- new/42 {name: "character", value: 4, type: 0, properties: ["character": "type"]}, {name: "capacity", value: 4, type: 1, properties: ["capacity": "integer"]}
+run/0: {name: "s", value: 3, type: 2-2-5-4, properties: ["s": "address":"address":"array":"character", "deref": ]} <- new/43 {name: "character", value: 4, type: 0, properties: ["character": "type"]}, {name: "capacity", value: 4, type: 1, properties: ["capacity": "integer"]}
 mem/0: location 1036 is 30
 mem/0: array size is 30
 mem/0: new alloc: 1064
@@ -167,7 +167,7 @@ run/0: {name: "tmp", value: 5, type: 2-9, properties: ["tmp": "address":"buffer"
 mem/0: location 1006 is 1062
 mem/0: location 1010 is 49
 run/0: instruction buffer-append/0
-run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new/42 {name: "location", value: 1, type: 0, properties: ["location": "type"]}, {name: "30", value: 30, type: 0, properties: ["30": "literal"]}
+run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new/43 {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: 1095
 run/0: instruction buffer-append/1
@@ -182,7 +182,7 @@ run/0: instruction buffer-append/4
 run/0: {name: "full?", value: 3, type: 3, properties: ["full?": "boolean"]} <- buffer-full?/103 {name: "in", value: 1, type: 2-9, properties: ["in": "address":"buffer"]}
 mem/0: location 1097 is 1062
 run/0: instruction buffer-full?/0
-run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new/42 {name: "location", value: 1, type: 0, properties: ["location": "type"]}, {name: "30", value: 30, type: 0, properties: ["30": "literal"]}
+run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new/43 {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: 1126
 run/0: instruction buffer-full?/1
@@ -306,7 +306,7 @@ run/0: instruction integer-to-decimal-string/26
 run/0: {name: "tmp", value: 5, type: 2-9, properties: ["tmp": "address":"buffer"]} <- buffer-append/104 {name: "tmp", value: 5, type: 2-9, properties: ["tmp": "address":"buffer"]}, {name: "45", value: 45, type: 0, properties: ["45": "literal"]}
 mem/0: location 1006 is 1062
 run/0: instruction buffer-append/0
-run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new/42 {name: "location", value: 1, type: 0, properties: ["location": "type"]}, {name: "30", value: 30, type: 0, properties: ["30": "literal"]}
+run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new/43 {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: 1157
 run/0: instruction buffer-append/1
@@ -321,7 +321,7 @@ run/0: instruction buffer-append/4
 run/0: {name: "full?", value: 3, type: 3, properties: ["full?": "boolean"]} <- buffer-full?/103 {name: "in", value: 1, type: 2-9, properties: ["in": "address":"buffer"]}
 mem/0: location 1159 is 1062
 run/0: instruction buffer-full?/0
-run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new/42 {name: "location", value: 1, type: 0, properties: ["location": "type"]}, {name: "30", value: 30, type: 0, properties: ["30": "literal"]}
+run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new/43 {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: 1188
 run/0: instruction buffer-full?/1
@@ -440,7 +440,7 @@ mem/0: location 1063 is 1064
 run/0: product 0 is 1064
 mem/0: storing 1064 in location 1012
 run/0: instruction integer-to-decimal-string/30
-run/0: {name: "result", value: 2, type: 2-5-4, properties: ["result": "address":"array":"character"]} <- new/42 {name: "character", value: 4, type: 0, properties: ["character": "type"]}, {name: "len", value: 10, type: 1, properties: ["len": "integer"]}
+run/0: {name: "result", value: 2, type: 2-5-4, properties: ["result": "address":"array":"character"]} <- new/43 {name: "character", value: 4, type: 0, properties: ["character": "type"]}, {name: "len", value: 10, type: 1, properties: ["len": "integer"]}
 mem/0: location 1011 is 2
 mem/0: array size is 2
 mem/0: new alloc: 1219
@@ -597,7 +597,7 @@ mem/0: storing 2 in location 2
 mem/0: storing 45 in location 3
 mem/0: storing 49 in location 4
 run/0: instruction integer-to-decimal-digit-negative/1
-run/0: memory-should-contain/44 {name: "
+run/0: memory-should-contain/45 {name: "
     2 <- 2
     3 <- 45  # '-'
     4 <- 49  # '1'
diff --git a/cpp/.traces/integer-to-decimal-digit-positive b/cpp/.traces/integer-to-decimal-digit-positive
index d6718be3..903c2762 100644
--- a/cpp/.traces/integer-to-decimal-digit-positive
+++ b/cpp/.traces/integer-to-decimal-digit-positive
@@ -18,7 +18,7 @@ after-brace/0: memory-should-contain ...
 new/0: routine allocated memory from 1000 to 101000
 schedule/0: integer-to-decimal-digit-positive
 run/0: instruction integer-to-decimal-digit-positive/0
-run/0: run/43 {name: "
+run/0: run/44 {name: "
     1:address:array:character/raw <- integer-to-decimal-string 234:literal
     2:array:character/raw <- copy 1:address:array:character/deref/raw
   ", value: 0, type: 0, properties: ["
@@ -37,7 +37,7 @@ after-brace/0: copy ...
 run/0: instruction run1001/0
 run/0: {name: "1", value: 1, type: 2-5-4, properties: ["1": "address":"array":"character", "raw": ]} <- integer-to-decimal-string/105 {name: "234", value: 234, type: 0, properties: ["234": "literal"]}
 run/0: instruction integer-to-decimal-string/0
-run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new/42 {name: "location", value: 1, type: 0, properties: ["location": "type"]}, {name: "30", value: 30, type: 0, properties: ["30": "literal"]}
+run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new/43 {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 integer-to-decimal-string/1
@@ -70,11 +70,11 @@ run/0: jumping to instruction 13
 run/0: instruction integer-to-decimal-string/14
 run/0: {name: "tmp", value: 5, type: 2-9, properties: ["tmp": "address":"buffer"]} <- init-buffer/101 {name: "30", value: 30, type: 0, properties: ["30": "literal"]}
 run/0: instruction init-buffer/0
-run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new/42 {name: "location", value: 1, type: 0, properties: ["location": "type"]}, {name: "30", value: 30, type: 0, properties: ["30": "literal"]}
+run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new/43 {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: 1031
 run/0: instruction init-buffer/1
-run/0: {name: "result", value: 1, type: 2-9, properties: ["result": "address":"buffer"]} <- new/42 {name: "buffer", value: 9, type: 0, properties: ["buffer": "type"]}
+run/0: {name: "result", value: 1, type: 2-9, properties: ["result": "address":"buffer"]} <- new/43 {name: "buffer", value: 9, type: 0, properties: ["buffer": "type"]}
 mem/0: new alloc: 1062
 mem/0: storing 1062 in location 1033
 run/0: instruction init-buffer/2
@@ -103,7 +103,7 @@ run/0: {name: "capacity", value: 4, type: 1, properties: ["capacity": "integer"]
 run/0: product 0 is 30
 mem/0: storing 30 in location 1036
 run/0: instruction init-buffer/6
-run/0: {name: "s", value: 3, type: 2-2-5-4, properties: ["s": "address":"address":"array":"character", "deref": ]} <- new/42 {name: "character", value: 4, type: 0, properties: ["character": "type"]}, {name: "capacity", value: 4, type: 1, properties: ["capacity": "integer"]}
+run/0: {name: "s", value: 3, type: 2-2-5-4, properties: ["s": "address":"address":"array":"character", "deref": ]} <- new/43 {name: "character", value: 4, type: 0, properties: ["character": "type"]}, {name: "capacity", value: 4, type: 1, properties: ["capacity": "integer"]}
 mem/0: location 1036 is 30
 mem/0: array size is 30
 mem/0: new alloc: 1064
@@ -152,7 +152,7 @@ run/0: {name: "tmp", value: 5, type: 2-9, properties: ["tmp": "address":"buffer"
 mem/0: location 1006 is 1062
 mem/0: location 1010 is 52
 run/0: instruction buffer-append/0
-run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new/42 {name: "location", value: 1, type: 0, properties: ["location": "type"]}, {name: "30", value: 30, type: 0, properties: ["30": "literal"]}
+run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new/43 {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: 1095
 run/0: instruction buffer-append/1
@@ -167,7 +167,7 @@ run/0: instruction buffer-append/4
 run/0: {name: "full?", value: 3, type: 3, properties: ["full?": "boolean"]} <- buffer-full?/103 {name: "in", value: 1, type: 2-9, properties: ["in": "address":"buffer"]}
 mem/0: location 1097 is 1062
 run/0: instruction buffer-full?/0
-run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new/42 {name: "location", value: 1, type: 0, properties: ["location": "type"]}, {name: "30", value: 30, type: 0, properties: ["30": "literal"]}
+run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new/43 {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: 1126
 run/0: instruction buffer-full?/1
@@ -303,7 +303,7 @@ run/0: {name: "tmp", value: 5, type: 2-9, properties: ["tmp": "address":"buffer"
 mem/0: location 1006 is 1062
 mem/0: location 1010 is 51
 run/0: instruction buffer-append/0
-run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new/42 {name: "location", value: 1, type: 0, properties: ["location": "type"]}, {name: "30", value: 30, type: 0, properties: ["30": "literal"]}
+run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new/43 {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: 1157
 run/0: instruction buffer-append/1
@@ -318,7 +318,7 @@ run/0: instruction buffer-append/4
 run/0: {name: "full?", value: 3, type: 3, properties: ["full?": "boolean"]} <- buffer-full?/103 {name: "in", value: 1, type: 2-9, properties: ["in": "address":"buffer"]}
 mem/0: location 1159 is 1062
 run/0: instruction buffer-full?/0
-run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new/42 {name: "location", value: 1, type: 0, properties: ["location": "type"]}, {name: "30", value: 30, type: 0, properties: ["30": "literal"]}
+run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new/43 {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: 1188
 run/0: instruction buffer-full?/1
@@ -454,7 +454,7 @@ run/0: {name: "tmp", value: 5, type: 2-9, properties: ["tmp": "address":"buffer"
 mem/0: location 1006 is 1062
 mem/0: location 1010 is 50
 run/0: instruction buffer-append/0
-run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new/42 {name: "location", value: 1, type: 0, properties: ["location": "type"]}, {name: "30", value: 30, type: 0, properties: ["30": "literal"]}
+run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new/43 {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: 1219
 run/0: instruction buffer-append/1
@@ -469,7 +469,7 @@ run/0: instruction buffer-append/4
 run/0: {name: "full?", value: 3, type: 3, properties: ["full?": "boolean"]} <- buffer-full?/103 {name: "in", value: 1, type: 2-9, properties: ["in": "address":"buffer"]}
 mem/0: location 1221 is 1062
 run/0: instruction buffer-full?/0
-run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new/42 {name: "location", value: 1, type: 0, properties: ["location": "type"]}, {name: "30", value: 30, type: 0, properties: ["30": "literal"]}
+run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new/43 {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: 1250
 run/0: instruction buffer-full?/1
@@ -611,7 +611,7 @@ mem/0: location 1063 is 1064
 run/0: product 0 is 1064
 mem/0: storing 1064 in location 1012
 run/0: instruction integer-to-decimal-string/30
-run/0: {name: "result", value: 2, type: 2-5-4, properties: ["result": "address":"array":"character"]} <- new/42 {name: "character", value: 4, type: 0, properties: ["character": "type"]}, {name: "len", value: 10, type: 1, properties: ["len": "integer"]}
+run/0: {name: "result", value: 2, type: 2-5-4, properties: ["result": "address":"array":"character"]} <- new/43 {name: "character", value: 4, type: 0, properties: ["character": "type"]}, {name: "len", value: 10, type: 1, properties: ["len": "integer"]}
 mem/0: location 1011 is 3
 mem/0: array size is 3
 mem/0: new alloc: 1281
@@ -826,7 +826,7 @@ mem/0: storing 50 in location 3
 mem/0: storing 51 in location 4
 mem/0: storing 52 in location 5
 run/0: instruction integer-to-decimal-digit-positive/1
-run/0: memory-should-contain/44 {name: "
+run/0: memory-should-contain/45 {name: "
     2:string <- [234]
   ", value: 0, type: 0, properties: ["
     2:string <- [234]
diff --git a/cpp/.traces/integer-to-decimal-digit-zero b/cpp/.traces/integer-to-decimal-digit-zero
index 2c6d63fd..1d382ba4 100644
--- a/cpp/.traces/integer-to-decimal-digit-zero
+++ b/cpp/.traces/integer-to-decimal-digit-zero
@@ -18,7 +18,7 @@ after-brace/0: memory-should-contain ...
 new/0: routine allocated memory from 1000 to 101000
 schedule/0: integer-to-decimal-digit-zero
 run/0: instruction integer-to-decimal-digit-zero/0
-run/0: run/43 {name: "
+run/0: run/44 {name: "
     1:address:array:character/raw <- integer-to-decimal-string 0:literal
     2:array:character/raw <- copy 1:address:array:character/deref/raw
   ", value: 0, type: 0, properties: ["
@@ -37,7 +37,7 @@ after-brace/0: copy ...
 run/0: instruction run1001/0
 run/0: {name: "1", value: 1, type: 2-5-4, properties: ["1": "address":"array":"character", "raw": ]} <- integer-to-decimal-string/105 {name: "0", value: 0, type: 0, properties: ["0": "literal"]}
 run/0: instruction integer-to-decimal-string/0
-run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new/42 {name: "location", value: 1, type: 0, properties: ["location": "type"]}, {name: "30", value: 30, type: 0, properties: ["30": "literal"]}
+run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new/43 {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 integer-to-decimal-string/1
@@ -50,7 +50,7 @@ mem/0: location 1002 is 0
 run/0: ingredient 0 is 0
 run/0: jump-if fell through
 run/0: instruction integer-to-decimal-string/4
-run/0: {name: "result", value: 2, type: 2-5-4, properties: ["result": "address":"array":"character"]} <- new/42 {name: "0", value: 0, type: 0, properties: ["0": "literal-string"]}
+run/0: {name: "result", value: 2, type: 2-5-4, properties: ["result": "address":"array":"character"]} <- new/43 {name: "0", value: 0, type: 0, properties: ["0": "literal-string"]}
 mem/0: storing 1031 in location 1003
 run/0: instruction integer-to-decimal-string/5
 run/0: reply/33 {name: "result", value: 2, type: 2-5-4, properties: ["result": "address":"array":"character"]}
@@ -66,7 +66,7 @@ mem/0: location 1032 is 48
 mem/0: storing 1 in location 2
 mem/0: storing 48 in location 3
 run/0: instruction integer-to-decimal-digit-zero/1
-run/0: memory-should-contain/44 {name: "
+run/0: memory-should-contain/45 {name: "
     2:string <- [0]
   ", value: 0, type: 0, properties: ["
     2:string <- [0]
diff --git a/cpp/.traces/interpolate-at-end b/cpp/.traces/interpolate-at-end
index 38e84646..602a6630 100644
--- a/cpp/.traces/interpolate-at-end
+++ b/cpp/.traces/interpolate-at-end
@@ -22,7 +22,7 @@ after-brace/0: memory-should-contain ...
 new/0: routine allocated memory from 1000 to 101000
 schedule/0: interpolate-at-end
 run/0: instruction interpolate-at-end/0
-run/0: run/43 {name: "
+run/0: run/44 {name: "
     1:address:array:character/raw <- new [hello, _]
     2:address:array:character/raw <- new [abc]
     3:address:array:character/raw <- interpolate 1:address:array:character/raw, 2:address:array:character/raw
@@ -54,17 +54,17 @@ after-brace/0: new ...
 after-brace/0: interpolate ...
 after-brace/0: copy ...
 run/0: instruction run1001/0
-run/0: {name: "1", value: 1, type: 2-5-4, properties: ["1": "address":"array":"character", "raw": ]} <- new/42 {name: "hello, _", value: 0, type: 0, properties: ["hello, _": "literal-string"]}
+run/0: {name: "1", value: 1, type: 2-5-4, properties: ["1": "address":"array":"character", "raw": ]} <- new/43 {name: "hello, _", value: 0, type: 0, properties: ["hello, _": "literal-string"]}
 mem/0: storing 1000 in location 1
 run/0: instruction run1001/1
-run/0: {name: "2", value: 2, type: 2-5-4, properties: ["2": "address":"array":"character", "raw": ]} <- new/42 {name: "abc", value: 0, type: 0, properties: ["abc": "literal-string"]}
+run/0: {name: "2", value: 2, type: 2-5-4, properties: ["2": "address":"array":"character", "raw": ]} <- new/43 {name: "abc", value: 0, type: 0, properties: ["abc": "literal-string"]}
 mem/0: storing 1009 in location 2
 run/0: instruction run1001/2
 run/0: {name: "3", value: 3, type: 2-5-4, properties: ["3": "address":"array":"character", "raw": ]} <- interpolate/107 {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 1009
 run/0: instruction interpolate/0
-run/0: {name: "default-space", value: 0, type: 5-2-1, properties: ["default-space": "array":"address":"location"]} <- new/42 {name: "location", value: 1, type: 0, properties: ["location": "type"]}, {name: "60", value: 60, type: 0, properties: ["60": "literal"]}
+run/0: {name: "default-space", value: 0, type: 5-2-1, properties: ["default-space": "array":"address":"location"]} <- new/43 {name: "location", value: 1, type: 0, properties: ["location": "type"]}, {name: "60", value: 60, type: 0, properties: ["60": "literal"]}
 mem/0: array size is 60
 mem/0: new alloc: 1013
 run/0: instruction interpolate/1
@@ -128,7 +128,7 @@ run/0: instruction interpolate/13
 run/0: {name: "_", value: 0, type: 0, properties: ["_": "dummy"]} <- next-ingredient/30 
 run/0: product 0 is 1000
 run/0: instruction interpolate/14
-run/0: {name: "result", value: 7, type: 2-5-4, properties: ["result": "address":"array":"character"]} <- new/42 {name: "character", value: 4, type: 0, properties: ["character": "type"]}, {name: "result-len", value: 3, type: 1, properties: ["result-len": "integer"]}
+run/0: {name: "result", value: 7, type: 2-5-4, properties: ["result": "address":"array":"character"]} <- new/43 {name: "character", value: 4, type: 0, properties: ["character": "type"]}, {name: "result-len", value: 3, type: 1, properties: ["result-len": "integer"]}
 mem/0: location 1017 is 10
 mem/0: array size is 10
 mem/0: new alloc: 1074
@@ -926,7 +926,7 @@ mem/0: storing 97 in location 12
 mem/0: storing 98 in location 13
 mem/0: storing 99 in location 14
 run/0: instruction interpolate-at-end/1
-run/0: memory-should-contain/44 {name: "
+run/0: memory-should-contain/45 {name: "
     4:string <- [hello, abc]
   ", value: 0, type: 0, properties: ["
     4:string <- [hello, abc]
diff --git a/cpp/.traces/interpolate-at-start b/cpp/.traces/interpolate-at-start
index 2ab1b7d0..48475ee6 100644
--- a/cpp/.traces/interpolate-at-start
+++ b/cpp/.traces/interpolate-at-start
@@ -24,7 +24,7 @@ after-brace/0: memory-should-contain ...
 new/0: routine allocated memory from 1000 to 101000
 schedule/0: interpolate-at-start
 run/0: instruction interpolate-at-start/0
-run/0: run/43 {name: "
+run/0: run/44 {name: "
     1:address:array:character/raw <- new [_, hello!]
     2:address:array:character/raw <- new [abc]
     3:address:array:character/raw <- interpolate 1:address:array:character/raw, 2:address:array:character/raw
@@ -56,17 +56,17 @@ after-brace/0: new ...
 after-brace/0: interpolate ...
 after-brace/0: copy ...
 run/0: instruction run1001/0
-run/0: {name: "1", value: 1, type: 2-5-4, properties: ["1": "address":"array":"character", "raw": ]} <- new/42 {name: "_, hello!", value: 0, type: 0, properties: ["_, hello!": "literal-string"]}
+run/0: {name: "1", value: 1, type: 2-5-4, properties: ["1": "address":"array":"character", "raw": ]} <- new/43 {name: "_, hello!", value: 0, type: 0, properties: ["_, hello!": "literal-string"]}
 mem/0: storing 1000 in location 1
 run/0: instruction run1001/1
-run/0: {name: "2", value: 2, type: 2-5-4, properties: ["2": "address":"array":"character", "raw": ]} <- new/42 {name: "abc", value: 0, type: 0, properties: ["abc": "literal-string"]}
+run/0: {name: "2", value: 2, type: 2-5-4, properties: ["2": "address":"array":"character", "raw": ]} <- new/43 {name: "abc", value: 0, type: 0, properties: ["abc": "literal-string"]}
 mem/0: storing 1010 in location 2
 run/0: instruction run1001/2
 run/0: {name: "3", value: 3, type: 2-5-4, properties: ["3": "address":"array":"character", "raw": ]} <- interpolate/107 {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 1010
 run/0: instruction interpolate/0
-run/0: {name: "default-space", value: 0, type: 5-2-1, properties: ["default-space": "array":"address":"location"]} <- new/42 {name: "location", value: 1, type: 0, properties: ["location": "type"]}, {name: "60", value: 60, type: 0, properties: ["60": "literal"]}
+run/0: {name: "default-space", value: 0, type: 5-2-1, properties: ["default-space": "array":"address":"location"]} <- new/43 {name: "location", value: 1, type: 0, properties: ["location": "type"]}, {name: "60", value: 60, type: 0, properties: ["60": "literal"]}
 mem/0: array size is 60
 mem/0: new alloc: 1014
 run/0: instruction interpolate/1
@@ -130,7 +130,7 @@ run/0: instruction interpolate/13
 run/0: {name: "_", value: 0, type: 0, properties: ["_": "dummy"]} <- next-ingredient/30 
 run/0: product 0 is 1000
 run/0: instruction interpolate/14
-run/0: {name: "result", value: 7, type: 2-5-4, properties: ["result": "address":"array":"character"]} <- new/42 {name: "character", value: 4, type: 0, properties: ["character": "type"]}, {name: "result-len", value: 3, type: 1, properties: ["result-len": "integer"]}
+run/0: {name: "result", value: 7, type: 2-5-4, properties: ["result": "address":"array":"character"]} <- new/43 {name: "character", value: 4, type: 0, properties: ["character": "type"]}, {name: "result-len", value: 3, type: 1, properties: ["result-len": "integer"]}
 mem/0: location 1018 is 11
 mem/0: array size is 11
 mem/0: new alloc: 1075
@@ -903,7 +903,7 @@ mem/0: storing 108 in location 13
 mem/0: storing 111 in location 14
 mem/0: storing 33 in location 15
 run/0: instruction interpolate-at-start/1
-run/0: memory-should-contain/44 {name: "
+run/0: memory-should-contain/45 {name: "
     4:string <- [abc, hello!]
     16 <- 0  # out of bounds
   ", value: 0, type: 0, properties: ["
diff --git a/cpp/.traces/interpolate-works b/cpp/.traces/interpolate-works
index ae942940..4b11f649 100644
--- a/cpp/.traces/interpolate-works
+++ b/cpp/.traces/interpolate-works
@@ -22,7 +22,7 @@ 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/43 {name: "
+run/0: run/44 {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
@@ -54,17 +54,17 @@ after-brace/0: new ...
 after-brace/0: interpolate ...
 after-brace/0: copy ...
 run/0: instruction run1001/0
-run/0: {name: "1", value: 1, type: 2-5-4, properties: ["1": "address":"array":"character", "raw": ]} <- new/42 {name: "abc _", value: 0, type: 0, properties: ["abc _": "literal-string"]}
+run/0: {name: "1", value: 1, type: 2-5-4, properties: ["1": "address":"array":"character", "raw": ]} <- new/43 {name: "abc _", value: 0, type: 0, properties: ["abc _": "literal-string"]}
 mem/0: storing 1000 in location 1
 run/0: instruction run1001/1
-run/0: {name: "2", value: 2, type: 2-5-4, properties: ["2": "address":"array":"character", "raw": ]} <- new/42 {name: "def", value: 0, type: 0, properties: ["def": "literal-string"]}
+run/0: {name: "2", value: 2, type: 2-5-4, properties: ["2": "address":"array":"character", "raw": ]} <- new/43 {name: "def", value: 0, type: 0, properties: ["def": "literal-string"]}
 mem/0: storing 1006 in location 2
 run/0: instruction run1001/2
 run/0: {name: "3", value: 3, type: 2-5-4, properties: ["3": "address":"array":"character", "raw": ]} <- interpolate/107 {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
 run/0: instruction interpolate/0
-run/0: {name: "default-space", value: 0, type: 5-2-1, properties: ["default-space": "array":"address":"location"]} <- new/42 {name: "location", value: 1, type: 0, properties: ["location": "type"]}, {name: "60", value: 60, type: 0, properties: ["60": "literal"]}
+run/0: {name: "default-space", value: 0, type: 5-2-1, properties: ["default-space": "array":"address":"location"]} <- new/43 {name: "location", value: 1, type: 0, properties: ["location": "type"]}, {name: "60", value: 60, type: 0, properties: ["60": "literal"]}
 mem/0: array size is 60
 mem/0: new alloc: 1010
 run/0: instruction interpolate/1
@@ -128,7 +128,7 @@ run/0: instruction interpolate/13
 run/0: {name: "_", value: 0, type: 0, properties: ["_": "dummy"]} <- next-ingredient/30 
 run/0: product 0 is 1000
 run/0: instruction interpolate/14
-run/0: {name: "result", value: 7, type: 2-5-4, properties: ["result": "address":"array":"character"]} <- new/42 {name: "character", value: 4, type: 0, properties: ["character": "type"]}, {name: "result-len", value: 3, type: 1, properties: ["result-len": "integer"]}
+run/0: {name: "result", value: 7, type: 2-5-4, properties: ["result": "address":"array":"character"]} <- new/43 {name: "character", value: 4, type: 0, properties: ["character": "type"]}, {name: "result-len", value: 3, type: 1, properties: ["result-len": "integer"]}
 mem/0: location 1014 is 7
 mem/0: array size is 7
 mem/0: new alloc: 1071
@@ -713,7 +713,7 @@ 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/44 {name: "
+run/0: memory-should-contain/45 {name: "
     4:string <- [abc def]
   ", value: 0, type: 0, properties: ["
     4:string <- [abc def]
diff --git a/cpp/.traces/keyboard_in_scenario b/cpp/.traces/keyboard_in_scenario
index a6bc5f3b..132100f6 100644
--- a/cpp/.traces/keyboard_in_scenario
+++ b/cpp/.traces/keyboard_in_scenario
@@ -41,17 +41,17 @@ after-brace/0: memory-should-contain ...
 new/0: routine allocated memory from 1000 to 101000
 schedule/0: keyboard-in-scenario
 run/0: instruction keyboard-in-scenario/0
-run/0: {name: "keyboard", value: 901, type: 2, properties: ["keyboard": "address"]} <- assume-keyboard/42 {name: "abc", value: 0, type: 0, properties: ["abc": "literal-string"]}
+run/0: {name: "keyboard", value: 901, type: 2, properties: ["keyboard": "address"]} <- assume-keyboard/43 {name: "abc", value: 0, type: 0, properties: ["abc": "literal-string"]}
 mem/0: storing 1000 in location 901
 run/0: instruction keyboard-in-scenario/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/42 {name: "location", value: 1, type: 0, properties: ["location": "type"]}, {name: "30", value: 30, type: 0, properties: ["30": "literal"]}
+run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new/43 {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/42 {name: "keyboard", value: 12, type: 0, properties: ["keyboard": "type"]}
+run/0: {name: "result", value: 1, type: 2-12, properties: ["result": "address":"keyboard"]} <- new/43 {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
@@ -86,7 +86,7 @@ mem/0: location 1006 is 1035
 run/0: result 0 is 1035
 mem/0: storing 1035 in location 901
 run/0: instruction keyboard-in-scenario/2
-run/0: run/43 {name: "
+run/0: run/44 {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
@@ -126,7 +126,7 @@ run/0: instruction run1002/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/42 {name: "location", value: 1, type: 0, properties: ["location": "type"]}, {name: "30", value: 30, type: 0, properties: ["30": "literal"]}
+run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new/43 {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
@@ -210,7 +210,7 @@ run/0: instruction run1002/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/42 {name: "location", value: 1, type: 0, properties: ["location": "type"]}, {name: "30", value: 30, type: 0, properties: ["30": "literal"]}
+run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new/43 {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
@@ -294,7 +294,7 @@ run/0: instruction run1002/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/42 {name: "location", value: 1, type: 0, properties: ["location": "type"]}, {name: "30", value: 30, type: 0, properties: ["30": "literal"]}
+run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new/43 {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
@@ -378,7 +378,7 @@ run/0: instruction run1002/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/42 {name: "location", value: 1, type: 0, properties: ["location": "type"]}, {name: "30", value: 30, type: 0, properties: ["30": "literal"]}
+run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new/43 {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
@@ -436,7 +436,7 @@ mem/0: storing 0 in location 8
 run/0: result 2 is 1035
 mem/0: storing 1035 in location 901
 run/0: instruction keyboard-in-scenario/3
-run/0: memory-should-contain/44 {name: "
+run/0: memory-should-contain/45 {name: "
     1 <- 97  # 'a'
     2 <- 1  # first read-key call found a character
     3 <- 98  # 'b'
diff --git a/cpp/.traces/memory_check b/cpp/.traces/memory_check
index 5af724c2..7549a1eb 100644
--- a/cpp/.traces/memory_check
+++ b/cpp/.traces/memory_check
@@ -9,7 +9,7 @@ after-brace/0: memory-should-contain ...
 new/0: routine allocated memory from 1000 to 101000
 schedule/0: main
 run/0: instruction main/0
-run/0: memory-should-contain/44 {name: "
+run/0: memory-should-contain/45 {name: "
     1 <- 13
   ", value: 0, type: 0, properties: ["
     1 <- 13
diff --git a/cpp/.traces/memory_check_multiple b/cpp/.traces/memory_check_multiple
index cc3b17d6..f9c78bc3 100644
--- a/cpp/.traces/memory_check_multiple
+++ b/cpp/.traces/memory_check_multiple
@@ -11,7 +11,7 @@ after-brace/0: memory-should-contain ...
 new/0: routine allocated memory from 1000 to 101000
 schedule/0: main
 run/0: instruction main/0
-run/0: memory-should-contain/44 {name: "
+run/0: memory-should-contain/45 {name: "
     1 <- 0
     1 <- 0
   ", value: 0, type: 0, properties: ["
diff --git a/cpp/.traces/memory_check_string b/cpp/.traces/memory_check_string
index 2d49c3c9..cb04b0f5 100644
--- a/cpp/.traces/memory_check_string
+++ b/cpp/.traces/memory_check_string
@@ -41,7 +41,7 @@ run/0: {name: "4", value: 4, type: 1, properties: ["4": "integer"]} <- copy/1 {n
 run/0: ingredient 0 is 99
 mem/0: storing 99 in location 4
 run/0: instruction main/4
-run/0: memory-should-contain/44 {name: "
+run/0: memory-should-contain/45 {name: "
     1:string <- [abc]
   ", value: 0, type: 0, properties: ["
     1:string <- [abc]
diff --git a/cpp/.traces/memory_check_string_length b/cpp/.traces/memory_check_string_length
index af2a030a..5236e2ed 100644
--- a/cpp/.traces/memory_check_string_length
+++ b/cpp/.traces/memory_check_string_length
@@ -41,7 +41,7 @@ run/0: {name: "4", value: 4, type: 1, properties: ["4": "integer"]} <- copy/1 {n
 run/0: ingredient 0 is 99
 mem/0: storing 99 in location 4
 run/0: instruction main/4
-run/0: memory-should-contain/44 {name: "
+run/0: memory-should-contain/45 {name: "
     1:string <- [ab]
   ", value: 0, type: 0, properties: ["
     1:string <- [ab]
diff --git a/cpp/.traces/new b/cpp/.traces/new
index cf7869b3..6a66646f 100644
--- a/cpp/.traces/new
+++ b/cpp/.traces/new
@@ -17,11 +17,11 @@ after-brace/0: equal ...
 new/0: routine allocated memory from 1000 to 101000
 schedule/0: main
 run/0: instruction main/0
-run/0: {name: "1", value: 1, type: 2-1, properties: ["1": "address":"integer", "raw": ]} <- new/42 {name: "integer", value: 1, type: 0, properties: ["integer": "type"]}
+run/0: {name: "1", value: 1, type: 2-1, properties: ["1": "address":"integer", "raw": ]} <- new/43 {name: "integer", value: 1, type: 0, properties: ["integer": "type"]}
 mem/0: new alloc: 1000
 mem/0: storing 1000 in location 1
 run/0: instruction main/1
-run/0: {name: "2", value: 2, type: 2-1, properties: ["2": "address":"integer", "raw": ]} <- new/42 {name: "integer", value: 1, type: 0, properties: ["integer": "type"]}
+run/0: {name: "2", value: 2, type: 2-1, properties: ["2": "address":"integer", "raw": ]} <- new/43 {name: "integer", value: 1, type: 0, properties: ["integer": "type"]}
 mem/0: new alloc: 1001
 mem/0: storing 1001 in location 2
 run/0: instruction main/2
diff --git a/cpp/.traces/new_array b/cpp/.traces/new_array
index b54be5a0..b980e670 100644
--- a/cpp/.traces/new_array
+++ b/cpp/.traces/new_array
@@ -18,12 +18,12 @@ after-brace/0: subtract ...
 new/0: routine allocated memory from 1000 to 101000
 schedule/0: main
 run/0: instruction main/0
-run/0: {name: "1", value: 1, type: 2-5-1, properties: ["1": "address":"array":"integer", "raw": ]} <- new/42 {name: "integer", value: 1, type: 0, properties: ["integer": "type"]}, {name: "5", value: 5, type: 0, properties: ["5": "literal"]}
+run/0: {name: "1", value: 1, type: 2-5-1, properties: ["1": "address":"array":"integer", "raw": ]} <- new/43 {name: "integer", value: 1, type: 0, properties: ["integer": "type"]}, {name: "5", value: 5, type: 0, properties: ["5": "literal"]}
 mem/0: array size is 5
 mem/0: new alloc: 1000
 mem/0: storing 1000 in location 1
 run/0: instruction main/1
-run/0: {name: "2", value: 2, type: 2-1, properties: ["2": "address":"integer", "raw": ]} <- new/42 {name: "integer", value: 1, type: 0, properties: ["integer": "type"]}
+run/0: {name: "2", value: 2, type: 2-1, properties: ["2": "address":"integer", "raw": ]} <- new/43 {name: "integer", value: 1, type: 0, properties: ["integer": "type"]}
 mem/0: new alloc: 1006
 mem/0: storing 1006 in location 2
 run/0: instruction main/2
diff --git a/cpp/.traces/new_concurrent b/cpp/.traces/new_concurrent
index be0d15a9..a03bbafc 100644
--- a/cpp/.traces/new_concurrent
+++ b/cpp/.traces/new_concurrent
@@ -25,12 +25,12 @@ run/0: start-running/34 {name: "f2", value: 0, type: 0, properties: ["f2": "reci
 run/0: ingredient 0 is f2
 new/0: routine allocated memory from 101000 to 201000
 run/0: instruction f1/1
-run/0: {name: "1", value: 1, type: 2-1, properties: ["1": "address":"integer", "raw": ]} <- new/42 {name: "integer", value: 1, type: 0, properties: ["integer": "type"]}
+run/0: {name: "1", value: 1, type: 2-1, properties: ["1": "address":"integer", "raw": ]} <- new/43 {name: "integer", value: 1, type: 0, properties: ["integer": "type"]}
 mem/0: new alloc: 1000
 mem/0: storing 1000 in location 1
 schedule/0: f2
 run/0: instruction f2/0
-run/0: {name: "2", value: 2, type: 2-1, properties: ["2": "address":"integer", "raw": ]} <- new/42 {name: "integer", value: 1, type: 0, properties: ["integer": "type"]}
+run/0: {name: "2", value: 2, type: 2-1, properties: ["2": "address":"integer", "raw": ]} <- new/43 {name: "integer", value: 1, type: 0, properties: ["integer": "type"]}
 mem/0: new alloc: 101000
 mem/0: storing 101000 in location 2
 run/0: instruction f2/1
diff --git a/cpp/.traces/new_overflow b/cpp/.traces/new_overflow
index d620bc27..0751770f 100644
--- a/cpp/.traces/new_overflow
+++ b/cpp/.traces/new_overflow
@@ -12,11 +12,11 @@ after-brace/0: new ...
 new/0: routine allocated memory from 1000 to 1002
 schedule/0: main
 run/0: instruction main/0
-run/0: {name: "1", value: 1, type: 2-1, properties: ["1": "address":"integer", "raw": ]} <- new/42 {name: "integer", value: 1, type: 0, properties: ["integer": "type"]}
+run/0: {name: "1", value: 1, type: 2-1, properties: ["1": "address":"integer", "raw": ]} <- new/43 {name: "integer", value: 1, type: 0, properties: ["integer": "type"]}
 mem/0: new alloc: 1000
 mem/0: storing 1000 in location 1
 run/0: instruction main/1
-run/0: {name: "2", value: 2, type: 2-6, properties: ["2": "address":"point", "raw": ]} <- new/42 {name: "point", value: 6, type: 0, properties: ["point": "type"]}
+run/0: {name: "2", value: 2, type: 2-6, properties: ["2": "address":"point", "raw": ]} <- new/43 {name: "point", value: 6, type: 0, properties: ["point": "type"]}
 new/0: routine allocated memory from 1002 to 1004
 mem/0: new alloc: 1002
 mem/0: storing 1002 in location 2
diff --git a/cpp/.traces/new_string b/cpp/.traces/new_string
index b6c939ba..4e16d378 100644
--- a/cpp/.traces/new_string
+++ b/cpp/.traces/new_string
@@ -12,7 +12,7 @@ after-brace/0: index ...
 new/0: routine allocated memory from 1000 to 101000
 schedule/0: main
 run/0: instruction main/0
-run/0: {name: "1", value: 1, type: 2-5-4, properties: ["1": "address":"array":"character"]} <- new/42 {name: "abc def", value: 0, type: 0, properties: ["abc def": "literal-string"]}
+run/0: {name: "1", value: 1, type: 2-5-4, properties: ["1": "address":"array":"character"]} <- new/43 {name: "abc def", value: 0, type: 0, properties: ["abc def": "literal-string"]}
 mem/0: storing 1000 in location 1
 run/0: instruction main/1
 run/0: {name: "2", value: 2, type: 4, properties: ["2": "character"]} <- index/26 {name: "1", value: 1, type: 2-5-4, properties: ["1": "address":"array":"character", "deref": ]}, {name: "5", value: 5, type: 0, properties: ["5": "literal"]}
diff --git a/cpp/.traces/print-character-at-top-left b/cpp/.traces/print-character-at-top-left
index 83aec2dd..15c41b74 100644
--- a/cpp/.traces/print-character-at-top-left
+++ b/cpp/.traces/print-character-at-top-left
@@ -28,7 +28,7 @@ after-brace/0: memory-should-contain ...
 new/0: routine allocated memory from 1000 to 101000
 schedule/0: print-character-at-top-left
 run/0: instruction print-character-at-top-left/0
-run/0: run/43 {name: "
+run/0: run/44 {name: "
 #?     $start-tracing #? 3
     1:address:screen <- init-fake-screen 3:literal/width, 2:literal/height
     1:address:screen <- print-character 1:address:screen, 97:literal  # 'a'
@@ -65,11 +65,11 @@ after-brace/0: copy ...
 run/0: instruction run1001/0
 run/0: {name: "1", value: 1, type: 2-11, properties: ["1": "address":"screen"]} <- init-fake-screen/115 {name: "3", value: 3, type: 0, properties: ["3": "literal", "width": ]}, {name: "2", value: 2, type: 0, properties: ["2": "literal", "height": ]}
 run/0: instruction init-fake-screen/0
-run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new/42 {name: "location", value: 1, type: 0, properties: ["location": "type"]}, {name: "30", value: 30, type: 0, properties: ["30": "literal", "capacity": ]}
+run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new/43 {name: "location", value: 1, type: 0, properties: ["location": "type"]}, {name: "30", value: 30, type: 0, properties: ["30": "literal", "capacity": ]}
 mem/0: array size is 30
 mem/0: new alloc: 1000
 run/0: instruction init-fake-screen/1
-run/0: {name: "result", value: 1, type: 2-11, properties: ["result": "address":"screen"]} <- new/42 {name: "screen", value: 11, type: 0, properties: ["screen": "type"]}
+run/0: {name: "result", value: 1, type: 2-11, properties: ["result": "address":"screen"]} <- new/43 {name: "screen", value: 11, type: 0, properties: ["screen": "type"]}
 mem/0: new alloc: 1031
 mem/0: storing 1031 in location 1002
 run/0: instruction init-fake-screen/2
@@ -144,7 +144,7 @@ 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-screen/12
-run/0: {name: "buf", value: 7, type: 2-2-5-4, properties: ["buf": "address":"address":"array":"character", "deref": ]} <- new/42 {name: "character", value: 0, type: 0, properties: ["character": "literal"]}, {name: "bufsize", value: 6, type: 1, properties: ["bufsize": "integer"]}
+run/0: {name: "buf", value: 7, type: 2-2-5-4, properties: ["buf": "address":"address":"array":"character", "deref": ]} <- new/43 {name: "character", value: 0, type: 0, properties: ["character": "literal"]}, {name: "bufsize", value: 6, type: 1, properties: ["bufsize": "integer"]}
 mem/0: location 1007 is 6
 mem/0: array size is 6
 mem/0: new alloc: 1036
@@ -154,7 +154,7 @@ run/0: instruction init-fake-screen/13
 run/0: clear-screen/116 {name: "result", value: 1, type: 2-11, properties: ["result": "address":"screen"]}
 mem/0: location 1002 is 1031
 run/0: instruction clear-screen/0
-run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new/42 {name: "location", value: 1, type: 0, properties: ["location": "type"]}, {name: "30", value: 30, type: 0, properties: ["30": "literal"]}
+run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new/43 {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: 1043
 run/0: instruction clear-screen/1
@@ -438,7 +438,7 @@ run/0: instruction run1001/1
 run/0: {name: "1", value: 1, type: 2-11, properties: ["1": "address":"screen"]} <- print-character/117 {name: "1", value: 1, type: 2-11, properties: ["1": "address":"screen"]}, {name: "97", value: 97, type: 0, properties: ["97": "literal"]}
 mem/0: location 1 is 1031
 run/0: instruction print-character/0
-run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new/42 {name: "location", value: 1, type: 0, properties: ["location": "type"]}, {name: "30", value: 30, type: 0, properties: ["30": "literal"]}
+run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new/43 {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: 1074
 run/0: instruction print-character/1
@@ -581,7 +581,7 @@ mem/0: storing 0 in location 7
 mem/0: storing 0 in location 8
 mem/0: storing 0 in location 9
 run/0: instruction print-character-at-top-left/1
-run/0: memory-should-contain/44 {name: "
+run/0: memory-should-contain/45 {name: "
     3 <- 6  # width*height
     4 <- 97  # 'a'
     5 <- 0
diff --git a/cpp/.traces/print-character-at-top-left2 b/cpp/.traces/print-character-at-top-left2
index d92f9676..be8aef91 100644
--- a/cpp/.traces/print-character-at-top-left2
+++ b/cpp/.traces/print-character-at-top-left2
@@ -24,11 +24,11 @@ schedule/0: print-character-at-top-left2
 run/0: instruction print-character-at-top-left2/0
 run/0: {name: "screen", value: 900, type: 2, properties: ["screen": "address"]} <- assume-screen/115 {name: "3", value: 3, type: 0, properties: ["3": "literal", "width": ]}, {name: "2", value: 2, type: 0, properties: ["2": "literal", "height": ]}
 run/0: instruction init-fake-screen/0
-run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new/42 {name: "location", value: 1, type: 0, properties: ["location": "type"]}, {name: "30", value: 30, type: 0, properties: ["30": "literal", "capacity": ]}
+run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new/43 {name: "location", value: 1, type: 0, properties: ["location": "type"]}, {name: "30", value: 30, type: 0, properties: ["30": "literal", "capacity": ]}
 mem/0: array size is 30
 mem/0: new alloc: 1000
 run/0: instruction init-fake-screen/1
-run/0: {name: "result", value: 1, type: 2-11, properties: ["result": "address":"screen"]} <- new/42 {name: "screen", value: 11, type: 0, properties: ["screen": "type"]}
+run/0: {name: "result", value: 1, type: 2-11, properties: ["result": "address":"screen"]} <- new/43 {name: "screen", value: 11, type: 0, properties: ["screen": "type"]}
 mem/0: new alloc: 1031
 mem/0: storing 1031 in location 1002
 run/0: instruction init-fake-screen/2
@@ -103,7 +103,7 @@ 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-screen/12
-run/0: {name: "buf", value: 7, type: 2-2-5-4, properties: ["buf": "address":"address":"array":"character", "deref": ]} <- new/42 {name: "character", value: 0, type: 0, properties: ["character": "literal"]}, {name: "bufsize", value: 6, type: 1, properties: ["bufsize": "integer"]}
+run/0: {name: "buf", value: 7, type: 2-2-5-4, properties: ["buf": "address":"address":"array":"character", "deref": ]} <- new/43 {name: "character", value: 0, type: 0, properties: ["character": "literal"]}, {name: "bufsize", value: 6, type: 1, properties: ["bufsize": "integer"]}
 mem/0: location 1007 is 6
 mem/0: array size is 6
 mem/0: new alloc: 1036
@@ -113,7 +113,7 @@ run/0: instruction init-fake-screen/13
 run/0: clear-screen/116 {name: "result", value: 1, type: 2-11, properties: ["result": "address":"screen"]}
 mem/0: location 1002 is 1031
 run/0: instruction clear-screen/0
-run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new/42 {name: "location", value: 1, type: 0, properties: ["location": "type"]}, {name: "30", value: 30, type: 0, properties: ["30": "literal"]}
+run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new/43 {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: 1043
 run/0: instruction clear-screen/1
@@ -394,7 +394,7 @@ mem/0: location 1002 is 1031
 run/0: result 0 is 1031
 mem/0: storing 1031 in location 900
 run/0: instruction print-character-at-top-left2/1
-run/0: run/43 {name: "
+run/0: run/44 {name: "
     screen:address <- print-character screen:address, 97:literal  # 'a'
   ", value: 0, type: 0, properties: ["
     screen:address <- print-character screen:address, 97:literal  # 'a'
@@ -409,7 +409,7 @@ run/0: instruction run1001/0
 run/0: {name: "screen", value: 900, type: 2, properties: ["screen": "address"]} <- print-character/117 {name: "screen", value: 900, type: 2, properties: ["screen": "address"]}, {name: "97", value: 97, type: 0, properties: ["97": "literal"]}
 mem/0: location 900 is 1031
 run/0: instruction print-character/0
-run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new/42 {name: "location", value: 1, type: 0, properties: ["location": "type"]}, {name: "30", value: 30, type: 0, properties: ["30": "literal"]}
+run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new/43 {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: 1074
 run/0: instruction print-character/1
@@ -524,7 +524,7 @@ mem/0: location 1076 is 1031
 run/0: result 0 is 1031
 mem/0: storing 1031 in location 900
 run/0: instruction print-character-at-top-left2/2
-run/0: screen-should-contain/60 {name: "
+run/0: screen-should-contain/61 {name: "
     .a  .
     .   .
   ", value: 0, type: 0, properties: ["
diff --git a/cpp/.traces/read-key-in-mu b/cpp/.traces/read-key-in-mu
index e07f5a5f..160d5a94 100644
--- a/cpp/.traces/read-key-in-mu
+++ b/cpp/.traces/read-key-in-mu
@@ -41,17 +41,17 @@ 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/42 {name: "abc", value: 0, type: 0, properties: ["abc": "literal-string"]}
+run/0: {name: "keyboard", value: 901, type: 2, properties: ["keyboard": "address"]} <- assume-keyboard/43 {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/42 {name: "location", value: 1, type: 0, properties: ["location": "type"]}, {name: "30", value: 30, type: 0, properties: ["30": "literal"]}
+run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new/43 {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/42 {name: "keyboard", value: 12, type: 0, properties: ["keyboard": "type"]}
+run/0: {name: "result", value: 1, type: 2-12, properties: ["result": "address":"keyboard"]} <- new/43 {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
@@ -86,7 +86,7 @@ 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/43 {name: "
+run/0: run/44 {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
@@ -126,7 +126,7 @@ 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/42 {name: "location", value: 1, type: 0, properties: ["location": "type"]}, {name: "30", value: 30, type: 0, properties: ["30": "literal"]}
+run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new/43 {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
@@ -210,7 +210,7 @@ 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/42 {name: "location", value: 1, type: 0, properties: ["location": "type"]}, {name: "30", value: 30, type: 0, properties: ["30": "literal"]}
+run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new/43 {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
@@ -294,7 +294,7 @@ 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/42 {name: "location", value: 1, type: 0, properties: ["location": "type"]}, {name: "30", value: 30, type: 0, properties: ["30": "literal"]}
+run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new/43 {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
@@ -378,7 +378,7 @@ 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/42 {name: "location", value: 1, type: 0, properties: ["location": "type"]}, {name: "30", value: 30, type: 0, properties: ["30": "literal"]}
+run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new/43 {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
@@ -436,7 +436,7 @@ 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/44 {name: "
+run/0: memory-should-contain/45 {name: "
     1 <- 97  # 'a'
     2 <- 1  # first read-key call found a character
     3 <- 98  # 'b'
diff --git a/cpp/.traces/reply_same_as_ingredient b/cpp/.traces/reply_same_as_ingredient
index 7a2c81bd..8e0fc4d1 100644
--- a/cpp/.traces/reply_same_as_ingredient
+++ b/cpp/.traces/reply_same_as_ingredient
@@ -18,7 +18,7 @@ after-brace/0: reply ...
 new/0: routine allocated memory from 1000 to 101000
 schedule/0: main
 run/0: instruction main/0
-run/0: {name: "1", value: 1, type: 2-1, properties: ["1": "address":"integer"]} <- new/42 {name: "integer", value: 1, type: 0, properties: ["integer": "type"]}
+run/0: {name: "1", value: 1, type: 2-1, properties: ["1": "address":"integer"]} <- new/43 {name: "integer", value: 1, type: 0, properties: ["integer": "type"]}
 mem/0: new alloc: 1000
 mem/0: storing 1000 in location 1
 run/0: instruction main/1
diff --git a/cpp/.traces/routine_state_test b/cpp/.traces/routine_state_test
new file mode 100644
index 00000000..9616c23c
--- /dev/null
+++ b/cpp/.traces/routine_state_test
@@ -0,0 +1,39 @@
+parse/0: instruction: start-running
+parse/0:   ingredient: {name: "f2", value: 0, type: 0, properties: ["f2": "recipe"]}
+parse/0:   product: {name: "1", value: 0, type: 1, properties: ["1": "integer", "child-id": ]}
+parse/0: instruction: copy
+parse/0:   ingredient: {name: "0", value: 0, type: 0, properties: ["0": "literal"]}
+parse/0:   product: {name: "12", value: 0, type: 1, properties: ["12": "integer"]}
+parse/0: instruction: routine-state
+parse/0:   ingredient: {name: "1", value: 0, type: 1, properties: ["1": "integer", "child-id": ]}
+parse/0:   product: {name: "2", value: 0, type: 1, properties: ["2": "integer", "state": ]}
+parse/0: instruction: copy
+parse/0:   ingredient: {name: "0", value: 0, type: 0, properties: ["0": "literal"]}
+parse/0:   product: {name: "12", value: 0, type: 1, properties: ["12": "integer"]}
+after-brace/0: recipe f1
+after-brace/0: start-running ...
+after-brace/0: copy ...
+after-brace/0: routine-state ...
+after-brace/0: recipe f2
+after-brace/0: copy ...
+new/0: routine allocated memory from 1000 to 101000
+schedule/0: f1
+run/0: instruction f1/0
+run/0: {name: "1", value: 1, type: 1, properties: ["1": "integer", "child-id": ]} <- start-running/34 {name: "f2", value: 0, type: 0, properties: ["f2": "recipe"]}
+run/0: ingredient 0 is f2
+new/0: routine allocated memory from 101000 to 201000
+mem/0: storing 2 in location 1
+run/0: instruction f1/1
+run/0: {name: "12", value: 12, type: 1, properties: ["12": "integer"]} <- copy/1 {name: "0", value: 0, type: 0, properties: ["0": "literal"]}
+run/0: ingredient 0 is 0
+mem/0: storing 0 in location 12
+schedule/0: f2
+run/0: instruction f2/0
+run/0: {name: "12", value: 12, type: 1, properties: ["12": "integer"]} <- copy/1 {name: "0", value: 0, type: 0, properties: ["0": "literal"]}
+run/0: ingredient 0 is 0
+mem/0: storing 0 in location 12
+schedule/0: f1
+run/0: instruction f1/2
+run/0: {name: "2", value: 2, type: 1, properties: ["2": "integer", "state": ]} <- routine-state/35 {name: "1", value: 1, type: 1, properties: ["1": "integer", "child-id": ]}
+mem/0: location 1 is 2
+mem/0: storing 1 in location 2
diff --git a/cpp/.traces/run b/cpp/.traces/run
index aa5d941a..e80562bc 100644
--- a/cpp/.traces/run
+++ b/cpp/.traces/run
@@ -9,7 +9,7 @@ after-brace/0: run ...
 new/0: routine allocated memory from 1000 to 101000
 schedule/0: main
 run/0: instruction main/0
-run/0: run/43 {name: "
+run/0: run/44 {name: "
     1:integer <- copy 13:literal
   ", value: 0, type: 0, properties: ["
     1:integer <- copy 13:literal
diff --git a/cpp/.traces/run_multiple b/cpp/.traces/run_multiple
index ca2e9a0e..213256b8 100644
--- a/cpp/.traces/run_multiple
+++ b/cpp/.traces/run_multiple
@@ -16,7 +16,7 @@ after-brace/0: run ...
 new/0: routine allocated memory from 1000 to 101000
 schedule/0: main
 run/0: instruction main/0
-run/0: run/43 {name: "
+run/0: run/44 {name: "
     1:integer <- copy 13:literal
   ", value: 0, type: 0, properties: ["
     1:integer <- copy 13:literal
@@ -31,7 +31,7 @@ run/0: {name: "1", value: 1, type: 1, properties: ["1": "integer"]} <- copy/1 {n
 run/0: ingredient 0 is 13
 mem/0: storing 13 in location 1
 run/0: instruction main/1
-run/0: run/43 {name: "
+run/0: run/44 {name: "
     2:integer <- copy 13:literal
   ", value: 0, type: 0, properties: ["
     2:integer <- copy 13:literal
diff --git a/cpp/.traces/scenario_block b/cpp/.traces/scenario_block
index 270bb7a3..3eac2e26 100644
--- a/cpp/.traces/scenario_block
+++ b/cpp/.traces/scenario_block
@@ -16,7 +16,7 @@ after-brace/0: memory-should-contain ...
 new/0: routine allocated memory from 1000 to 101000
 schedule/0: foo
 run/0: instruction foo/0
-run/0: run/43 {name: "
+run/0: run/44 {name: "
     1:integer <- copy 13:literal
   ", value: 0, type: 0, properties: ["
     1:integer <- copy 13:literal
@@ -31,7 +31,7 @@ run/0: {name: "1", value: 1, type: 1, properties: ["1": "integer"]} <- copy/1 {n
 run/0: ingredient 0 is 13
 mem/0: storing 13 in location 1
 run/0: instruction foo/1
-run/0: memory-should-contain/44 {name: "
+run/0: memory-should-contain/45 {name: "
     1 <- 13
   ", value: 0, type: 0, properties: ["
     1 <- 13
diff --git a/cpp/.traces/scenario_check_memory_and_trace b/cpp/.traces/scenario_check_memory_and_trace
index 4f14246f..27095641 100644
--- a/cpp/.traces/scenario_check_memory_and_trace
+++ b/cpp/.traces/scenario_check_memory_and_trace
@@ -32,7 +32,7 @@ after-brace/0: trace-should-not-contain ...
 new/0: routine allocated memory from 1000 to 101000
 schedule/0: foo
 run/0: instruction foo/0
-run/0: run/43 {name: "
+run/0: run/44 {name: "
     1:integer <- copy 13:literal
     trace [a], [a b c]
   ", value: 0, type: 0, properties: ["
@@ -56,20 +56,20 @@ run/0: instruction run1001/1
 run/0: trace/18 {name: "a", value: 0, type: 0, properties: ["a": "literal-string"]}, {name: "a b c", value: 0, type: 0, properties: ["a b c": "literal-string"]}
 a/0: a b c
 run/0: instruction foo/1
-run/0: memory-should-contain/44 {name: "
+run/0: memory-should-contain/45 {name: "
     1 <- 13
   ", value: 0, type: 0, properties: ["
     1 <- 13
   ": "literal-string"]}
 run/0: checking location 1
 run/0: instruction foo/2
-run/0: trace-should-contain/45 {name: "
+run/0: trace-should-contain/46 {name: "
     a: a b c
   ", value: 0, type: 0, properties: ["
     a: a b c
   ": "literal-string"]}
 run/0: instruction foo/3
-run/0: trace-should-not-contain/46 {name: "
+run/0: trace-should-not-contain/47 {name: "
     a: x y z
   ", value: 0, type: 0, properties: ["
     a: x y z
diff --git a/cpp/.traces/scenario_multiple_blocks b/cpp/.traces/scenario_multiple_blocks
index ff26c7d9..d9fcc5fb 100644
--- a/cpp/.traces/scenario_multiple_blocks
+++ b/cpp/.traces/scenario_multiple_blocks
@@ -32,7 +32,7 @@ after-brace/0: memory-should-contain ...
 new/0: routine allocated memory from 1000 to 101000
 schedule/0: foo
 run/0: instruction foo/0
-run/0: run/43 {name: "
+run/0: run/44 {name: "
     1:integer <- copy 13:literal
   ", value: 0, type: 0, properties: ["
     1:integer <- copy 13:literal
@@ -47,14 +47,14 @@ run/0: {name: "1", value: 1, type: 1, properties: ["1": "integer"]} <- copy/1 {n
 run/0: ingredient 0 is 13
 mem/0: storing 13 in location 1
 run/0: instruction foo/1
-run/0: memory-should-contain/44 {name: "
+run/0: memory-should-contain/45 {name: "
     1 <- 13
   ", value: 0, type: 0, properties: ["
     1 <- 13
   ": "literal-string"]}
 run/0: checking location 1
 run/0: instruction foo/2
-run/0: run/43 {name: "
+run/0: run/44 {name: "
     2:integer <- copy 13:literal
   ", value: 0, type: 0, properties: ["
     2:integer <- copy 13:literal
@@ -69,7 +69,7 @@ run/0: {name: "2", value: 2, type: 1, properties: ["2": "integer"]} <- copy/1 {n
 run/0: ingredient 0 is 13
 mem/0: storing 13 in location 2
 run/0: instruction foo/3
-run/0: memory-should-contain/44 {name: "
+run/0: memory-should-contain/45 {name: "
     1 <- 13
     2 <- 13
   ", value: 0, type: 0, properties: ["
diff --git a/cpp/.traces/scenario_with_comment_in_mu b/cpp/.traces/scenario_with_comment_in_mu
index 7d8aed06..1e8b558a 100644
--- a/cpp/.traces/scenario_with_comment_in_mu
+++ b/cpp/.traces/scenario_with_comment_in_mu
@@ -18,7 +18,7 @@ after-brace/0: memory-should-contain ...
 new/0: routine allocated memory from 1000 to 101000
 schedule/0: scenario_with_comment_in_mu
 run/0: instruction scenario_with_comment_in_mu/0
-run/0: run/43 {name: "
+run/0: run/44 {name: "
     # comment
     1:integer <- add 2:literal, 2:literal
   ", value: 0, type: 0, properties: ["
@@ -38,7 +38,7 @@ run/0: ingredient 1 is 2
 run/0: product 0 is 4
 mem/0: storing 4 in location 1
 run/0: instruction scenario_with_comment_in_mu/1
-run/0: memory-should-contain/44 {name: "
+run/0: memory-should-contain/45 {name: "
     1 <- 4
   ", value: 0, type: 0, properties: ["
     1 <- 4
diff --git a/cpp/.traces/scenario_with_multiple_comments_in_mu b/cpp/.traces/scenario_with_multiple_comments_in_mu
index 21207ace..d19b856e 100644
--- a/cpp/.traces/scenario_with_multiple_comments_in_mu
+++ b/cpp/.traces/scenario_with_multiple_comments_in_mu
@@ -20,7 +20,7 @@ after-brace/0: memory-should-contain ...
 new/0: routine allocated memory from 1000 to 101000
 schedule/0: scenario_with_multiple_comments_in_mu
 run/0: instruction scenario_with_multiple_comments_in_mu/0
-run/0: run/43 {name: "
+run/0: run/44 {name: "
     # comment1
     # comment2
     1:integer <- add 2:literal, 2:literal
@@ -42,7 +42,7 @@ run/0: ingredient 1 is 2
 run/0: product 0 is 4
 mem/0: storing 4 in location 1
 run/0: instruction scenario_with_multiple_comments_in_mu/1
-run/0: memory-should-contain/44 {name: "
+run/0: memory-should-contain/45 {name: "
     1 <- 4
   ", value: 0, type: 0, properties: ["
     1 <- 4
diff --git a/cpp/.traces/screen_in_scenario b/cpp/.traces/screen_in_scenario
index 81511645..c39aa0a1 100644
--- a/cpp/.traces/screen_in_scenario
+++ b/cpp/.traces/screen_in_scenario
@@ -28,11 +28,11 @@ schedule/0: screen-in-scenario
 run/0: instruction screen-in-scenario/0
 run/0: {name: "screen", value: 900, type: 2, properties: ["screen": "address"]} <- assume-screen/115 {name: "5", value: 5, type: 0, properties: ["5": "literal", "width": ]}, {name: "3", value: 3, type: 0, properties: ["3": "literal", "height": ]}
 run/0: instruction init-fake-screen/0
-run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new/42 {name: "location", value: 1, type: 0, properties: ["location": "type"]}, {name: "30", value: 30, type: 0, properties: ["30": "literal", "capacity": ]}
+run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new/43 {name: "location", value: 1, type: 0, properties: ["location": "type"]}, {name: "30", value: 30, type: 0, properties: ["30": "literal", "capacity": ]}
 mem/0: array size is 30
 mem/0: new alloc: 1000
 run/0: instruction init-fake-screen/1
-run/0: {name: "result", value: 1, type: 2-11, properties: ["result": "address":"screen"]} <- new/42 {name: "screen", value: 11, type: 0, properties: ["screen": "type"]}
+run/0: {name: "result", value: 1, type: 2-11, properties: ["result": "address":"screen"]} <- new/43 {name: "screen", value: 11, type: 0, properties: ["screen": "type"]}
 mem/0: new alloc: 1031
 mem/0: storing 1031 in location 1002
 run/0: instruction init-fake-screen/2
@@ -107,7 +107,7 @@ 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-screen/12
-run/0: {name: "buf", value: 7, type: 2-2-5-4, properties: ["buf": "address":"address":"array":"character", "deref": ]} <- new/42 {name: "character", value: 0, type: 0, properties: ["character": "literal"]}, {name: "bufsize", value: 6, type: 1, properties: ["bufsize": "integer"]}
+run/0: {name: "buf", value: 7, type: 2-2-5-4, properties: ["buf": "address":"address":"array":"character", "deref": ]} <- new/43 {name: "character", value: 0, type: 0, properties: ["character": "literal"]}, {name: "bufsize", value: 6, type: 1, properties: ["bufsize": "integer"]}
 mem/0: location 1007 is 15
 mem/0: array size is 15
 mem/0: new alloc: 1036
@@ -117,7 +117,7 @@ run/0: instruction init-fake-screen/13
 run/0: clear-screen/116 {name: "result", value: 1, type: 2-11, properties: ["result": "address":"screen"]}
 mem/0: location 1002 is 1031
 run/0: instruction clear-screen/0
-run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new/42 {name: "location", value: 1, type: 0, properties: ["location": "type"]}, {name: "30", value: 30, type: 0, properties: ["30": "literal"]}
+run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new/43 {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: 1052
 run/0: instruction clear-screen/1
@@ -740,7 +740,7 @@ mem/0: location 1002 is 1031
 run/0: result 0 is 1031
 mem/0: storing 1031 in location 900
 run/0: instruction screen-in-scenario/1
-run/0: run/43 {name: "
+run/0: run/44 {name: "
     screen:address <- print-character screen:address, 97:literal  # 'a'
   ", value: 0, type: 0, properties: ["
     screen:address <- print-character screen:address, 97:literal  # 'a'
@@ -755,7 +755,7 @@ run/0: instruction run1002/0
 run/0: {name: "screen", value: 900, type: 2, properties: ["screen": "address"]} <- print-character/117 {name: "screen", value: 900, type: 2, properties: ["screen": "address"]}, {name: "97", value: 97, type: 0, properties: ["97": "literal"]}
 mem/0: location 900 is 1031
 run/0: instruction print-character/0
-run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new/42 {name: "location", value: 1, type: 0, properties: ["location": "type"]}, {name: "30", value: 30, type: 0, properties: ["30": "literal"]}
+run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new/43 {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: 1083
 run/0: instruction print-character/1
@@ -870,7 +870,7 @@ mem/0: location 1085 is 1031
 run/0: result 0 is 1031
 mem/0: storing 1031 in location 900
 run/0: instruction screen-in-scenario/2
-run/0: screen-should-contain/60 {name: "
+run/0: screen-should-contain/61 {name: "
   #  01234
     .a    .
     .     .
diff --git a/cpp/.traces/screen_in_scenario_error b/cpp/.traces/screen_in_scenario_error
index f1cf680c..c431bd02 100644
--- a/cpp/.traces/screen_in_scenario_error
+++ b/cpp/.traces/screen_in_scenario_error
@@ -28,11 +28,11 @@ schedule/0: screen-in-scenario-error
 run/0: instruction screen-in-scenario-error/0
 run/0: {name: "screen", value: 900, type: 2, properties: ["screen": "address"]} <- assume-screen/115 {name: "5", value: 5, type: 0, properties: ["5": "literal", "width": ]}, {name: "3", value: 3, type: 0, properties: ["3": "literal", "height": ]}
 run/0: instruction init-fake-screen/0
-run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new/42 {name: "location", value: 1, type: 0, properties: ["location": "type"]}, {name: "30", value: 30, type: 0, properties: ["30": "literal", "capacity": ]}
+run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new/43 {name: "location", value: 1, type: 0, properties: ["location": "type"]}, {name: "30", value: 30, type: 0, properties: ["30": "literal", "capacity": ]}
 mem/0: array size is 30
 mem/0: new alloc: 1000
 run/0: instruction init-fake-screen/1
-run/0: {name: "result", value: 1, type: 2-11, properties: ["result": "address":"screen"]} <- new/42 {name: "screen", value: 11, type: 0, properties: ["screen": "type"]}
+run/0: {name: "result", value: 1, type: 2-11, properties: ["result": "address":"screen"]} <- new/43 {name: "screen", value: 11, type: 0, properties: ["screen": "type"]}
 mem/0: new alloc: 1031
 mem/0: storing 1031 in location 1002
 run/0: instruction init-fake-screen/2
@@ -107,7 +107,7 @@ 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-screen/12
-run/0: {name: "buf", value: 7, type: 2-2-5-4, properties: ["buf": "address":"address":"array":"character", "deref": ]} <- new/42 {name: "character", value: 0, type: 0, properties: ["character": "literal"]}, {name: "bufsize", value: 6, type: 1, properties: ["bufsize": "integer"]}
+run/0: {name: "buf", value: 7, type: 2-2-5-4, properties: ["buf": "address":"address":"array":"character", "deref": ]} <- new/43 {name: "character", value: 0, type: 0, properties: ["character": "literal"]}, {name: "bufsize", value: 6, type: 1, properties: ["bufsize": "integer"]}
 mem/0: location 1007 is 15
 mem/0: array size is 15
 mem/0: new alloc: 1036
@@ -117,7 +117,7 @@ run/0: instruction init-fake-screen/13
 run/0: clear-screen/116 {name: "result", value: 1, type: 2-11, properties: ["result": "address":"screen"]}
 mem/0: location 1002 is 1031
 run/0: instruction clear-screen/0
-run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new/42 {name: "location", value: 1, type: 0, properties: ["location": "type"]}, {name: "30", value: 30, type: 0, properties: ["30": "literal"]}
+run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new/43 {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: 1052
 run/0: instruction clear-screen/1
@@ -740,7 +740,7 @@ mem/0: location 1002 is 1031
 run/0: result 0 is 1031
 mem/0: storing 1031 in location 900
 run/0: instruction screen-in-scenario-error/1
-run/0: run/43 {name: "
+run/0: run/44 {name: "
     screen:address <- print-character screen:address, 97:literal  # 'a'
   ", value: 0, type: 0, properties: ["
     screen:address <- print-character screen:address, 97:literal  # 'a'
@@ -755,7 +755,7 @@ run/0: instruction run1001/0
 run/0: {name: "screen", value: 900, type: 2, properties: ["screen": "address"]} <- print-character/117 {name: "screen", value: 900, type: 2, properties: ["screen": "address"]}, {name: "97", value: 97, type: 0, properties: ["97": "literal"]}
 mem/0: location 900 is 1031
 run/0: instruction print-character/0
-run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new/42 {name: "location", value: 1, type: 0, properties: ["location": "type"]}, {name: "30", value: 30, type: 0, properties: ["30": "literal"]}
+run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new/43 {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: 1083
 run/0: instruction print-character/1
@@ -870,7 +870,7 @@ mem/0: location 1085 is 1031
 run/0: result 0 is 1031
 mem/0: storing 1031 in location 900
 run/0: instruction screen-in-scenario-error/2
-run/0: screen-should-contain/60 {name: "
+run/0: screen-should-contain/61 {name: "
   #  01234
     .b    .
     .     .
diff --git a/cpp/.traces/string-append-1 b/cpp/.traces/string-append-1
index f5362cf9..63b44e59 100644
--- a/cpp/.traces/string-append-1
+++ b/cpp/.traces/string-append-1
@@ -22,7 +22,7 @@ after-brace/0: memory-should-contain ...
 new/0: routine allocated memory from 1000 to 101000
 schedule/0: string-append-1
 run/0: instruction string-append-1/0
-run/0: run/43 {name: "
+run/0: run/44 {name: "
     1:address:array:character/raw <- new [hello,]
     2:address:array:character/raw <- new [ world!]
     3:address:array:character/raw <- string-append 1:address:array:character/raw, 2:address:array:character/raw
@@ -54,17 +54,17 @@ after-brace/0: new ...
 after-brace/0: string-append ...
 after-brace/0: copy ...
 run/0: instruction run1001/0
-run/0: {name: "1", value: 1, type: 2-5-4, properties: ["1": "address":"array":"character", "raw": ]} <- new/42 {name: "hello,", value: 0, type: 0, properties: ["hello,": "literal-string"]}
+run/0: {name: "1", value: 1, type: 2-5-4, properties: ["1": "address":"array":"character", "raw": ]} <- new/43 {name: "hello,", value: 0, type: 0, properties: ["hello,": "literal-string"]}
 mem/0: storing 1000 in location 1
 run/0: instruction run1001/1
-run/0: {name: "2", value: 2, type: 2-5-4, properties: ["2": "address":"array":"character", "raw": ]} <- new/42 {name: " world!", value: 0, type: 0, properties: [" world!": "literal-string"]}
+run/0: {name: "2", value: 2, type: 2-5-4, properties: ["2": "address":"array":"character", "raw": ]} <- new/43 {name: " world!", value: 0, type: 0, properties: [" world!": "literal-string"]}
 mem/0: storing 1007 in location 2
 run/0: instruction run1001/2
 run/0: {name: "3", value: 3, type: 2-5-4, properties: ["3": "address":"array":"character", "raw": ]} <- string-append/106 {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 1007
 run/0: instruction string-append/0
-run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new/42 {name: "location", value: 1, type: 0, properties: ["location": "type"]}, {name: "30", value: 30, type: 0, properties: ["30": "literal"]}
+run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new/43 {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: 1015
 run/0: instruction string-append/1
@@ -92,7 +92,7 @@ mem/0: location 1020 is 7
 run/0: product 0 is 13
 mem/0: storing 13 in location 1021
 run/0: instruction string-append/6
-run/0: {name: "result", value: 6, type: 2-5-4, properties: ["result": "address":"array":"character"]} <- new/42 {name: "character", value: 4, type: 0, properties: ["character": "type"]}, {name: "result-len", value: 5, type: 1, properties: ["result-len": "integer"]}
+run/0: {name: "result", value: 6, type: 2-5-4, properties: ["result": "address":"array":"character"]} <- new/43 {name: "character", value: 4, type: 0, properties: ["character": "type"]}, {name: "result-len", value: 5, type: 1, properties: ["result-len": "integer"]}
 mem/0: location 1021 is 13
 mem/0: array size is 13
 mem/0: new alloc: 1046
@@ -916,7 +916,7 @@ mem/0: storing 108 in location 15
 mem/0: storing 100 in location 16
 mem/0: storing 33 in location 17
 run/0: instruction string-append-1/1
-run/0: memory-should-contain/44 {name: "
+run/0: memory-should-contain/45 {name: "
     4:string <- [hello, world!]
   ", value: 0, type: 0, properties: ["
     4:string <- [hello, world!]
diff --git a/cpp/.traces/string-equal-common-lengths-but-distinct b/cpp/.traces/string-equal-common-lengths-but-distinct
index 164277bf..6ed12807 100644
--- a/cpp/.traces/string-equal-common-lengths-but-distinct
+++ b/cpp/.traces/string-equal-common-lengths-but-distinct
@@ -22,7 +22,7 @@ after-brace/0: memory-should-contain ...
 new/0: routine allocated memory from 1000 to 101000
 schedule/0: string-equal-common-lengths-but-distinct
 run/0: instruction string-equal-common-lengths-but-distinct/0
-run/0: run/43 {name: "
+run/0: run/44 {name: "
     default-space:address:array:location <- new location:type, 30:literal
     x:address:array:character <- new [abc]
     y:address:array:character <- new [abd]
@@ -58,21 +58,21 @@ 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/42 {name: "location", value: 1, type: 0, properties: ["location": "type"]}, {name: "30", value: 30, type: 0, properties: ["30": "literal"]}
+run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new/43 {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/42 {name: "abc", value: 0, type: 0, properties: ["abc": "literal-string"]}
+run/0: {name: "x", value: 1, type: 2-5-4, properties: ["x": "address":"array":"character"]} <- new/43 {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/42 {name: "abd", value: 0, type: 0, properties: ["abd": "literal-string"]}
+run/0: {name: "y", value: 2, type: 2-5-4, properties: ["y": "address":"array":"character"]} <- new/43 {name: "abd", value: 0, type: 0, properties: ["abd": "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/42 {name: "location", value: 1, type: 0, properties: ["location": "type"]}, {name: "30", value: 30, type: 0, properties: ["30": "literal"]}
+run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new/43 {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: 1039
 run/0: instruction string-equal/1
@@ -288,7 +288,7 @@ 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-common-lengths-but-distinct/1
-run/0: memory-should-contain/44 {name: "
+run/0: memory-should-contain/45 {name: "
     3 <- 0  # abc != abd
   ", value: 0, type: 0, properties: ["
     3 <- 0  # abc != abd
diff --git a/cpp/.traces/string-equal-distinct-lengths b/cpp/.traces/string-equal-distinct-lengths
index 7a8ac7c6..fe2e7967 100644
--- a/cpp/.traces/string-equal-distinct-lengths
+++ b/cpp/.traces/string-equal-distinct-lengths
@@ -36,7 +36,7 @@ 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/43 {name: "
+run/0: run/44 {name: "
     default-space:address:array:location <- new location:type, 30:literal
     x:address:array:character <- new [abc]
     y:address:array:character <- new [abcd]
@@ -72,21 +72,21 @@ 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/42 {name: "location", value: 1, type: 0, properties: ["location": "type"]}, {name: "30", value: 30, type: 0, properties: ["30": "literal"]}
+run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new/43 {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/42 {name: "abc", value: 0, type: 0, properties: ["abc": "literal-string"]}
+run/0: {name: "x", value: 1, type: 2-5-4, properties: ["x": "address":"array":"character"]} <- new/43 {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/42 {name: "abcd", value: 0, type: 0, properties: ["abcd": "literal-string"]}
+run/0: {name: "y", value: 2, type: 2-5-4, properties: ["y": "address":"array":"character"]} <- new/43 {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/42 {name: "location", value: 1, type: 0, properties: ["location": "type"]}, {name: "30", value: 30, type: 0, properties: ["30": "literal"]}
+run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new/43 {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
@@ -126,20 +126,20 @@ 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/44 {name: "
+run/0: memory-should-contain/45 {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/45 {name: "
+run/0: trace-should-contain/46 {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/46 {name: "
+run/0: trace-should-not-contain/47 {name: "
     string-equal: comparing characters
   ", value: 0, type: 0, properties: ["
     string-equal: comparing characters
diff --git a/cpp/.traces/string-equal-identical b/cpp/.traces/string-equal-identical
index 1bd96899..d100ce6f 100644
--- a/cpp/.traces/string-equal-identical
+++ b/cpp/.traces/string-equal-identical
@@ -22,7 +22,7 @@ after-brace/0: memory-should-contain ...
 new/0: routine allocated memory from 1000 to 101000
 schedule/0: string-equal-identical
 run/0: instruction string-equal-identical/0
-run/0: run/43 {name: "
+run/0: run/44 {name: "
     default-space:address:array:location <- new location:type, 30:literal
     x:address:array:character <- new [abc]
     y:address:array:character <- new [abc]
@@ -58,21 +58,21 @@ 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/42 {name: "location", value: 1, type: 0, properties: ["location": "type"]}, {name: "30", value: 30, type: 0, properties: ["30": "literal"]}
+run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new/43 {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/42 {name: "abc", value: 0, type: 0, properties: ["abc": "literal-string"]}
+run/0: {name: "x", value: 1, type: 2-5-4, properties: ["x": "address":"array":"character"]} <- new/43 {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/42 {name: "abc", value: 0, type: 0, properties: ["abc": "literal-string"]}
+run/0: {name: "y", value: 2, type: 2-5-4, properties: ["y": "address":"array":"character"]} <- new/43 {name: "abc", value: 0, type: 0, properties: ["abc": "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/42 {name: "location", value: 1, type: 0, properties: ["location": "type"]}, {name: "30", value: 30, type: 0, properties: ["30": "literal"]}
+run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new/43 {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: 1039
 run/0: instruction string-equal/1
@@ -314,7 +314,7 @@ run/0: reply/33 {name: "1", value: 1, type: 0, properties: ["1": "literal"]}
 run/0: result 0 is 1
 mem/0: storing 1 in location 3
 run/0: instruction string-equal-identical/1
-run/0: memory-should-contain/44 {name: "
+run/0: memory-should-contain/45 {name: "
     3 <- 1  # abc == abc
   ", value: 0, type: 0, properties: ["
     3 <- 1  # abc == abc
diff --git a/cpp/.traces/string-equal-reflexive b/cpp/.traces/string-equal-reflexive
index 4b440cfe..789febb7 100644
--- a/cpp/.traces/string-equal-reflexive
+++ b/cpp/.traces/string-equal-reflexive
@@ -20,7 +20,7 @@ after-brace/0: memory-should-contain ...
 new/0: routine allocated memory from 1000 to 101000
 schedule/0: string-equal-reflexive
 run/0: instruction string-equal-reflexive/0
-run/0: run/43 {name: "
+run/0: run/44 {name: "
     default-space:address:array:location <- new location:type, 30:literal
     x:address:array:character <- new [abc]
     3:boolean/raw <- string-equal x:address:array:character, x:address:array:character
@@ -48,18 +48,18 @@ 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/42 {name: "location", value: 1, type: 0, properties: ["location": "type"]}, {name: "30", value: 30, type: 0, properties: ["30": "literal"]}
+run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new/43 {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/42 {name: "abc", value: 0, type: 0, properties: ["abc": "literal-string"]}
+run/0: {name: "x", value: 1, type: 2-5-4, properties: ["x": "address":"array":"character"]} <- new/43 {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: "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: "x", value: 1, type: 2-5-4, properties: ["x": "address":"array":"character"]}
 mem/0: location 1002 is 1031
 mem/0: location 1002 is 1031
 run/0: instruction string-equal/0
-run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new/42 {name: "location", value: 1, type: 0, properties: ["location": "type"]}, {name: "30", value: 30, type: 0, properties: ["30": "literal"]}
+run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new/43 {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: 1035
 run/0: instruction string-equal/1
@@ -301,7 +301,7 @@ run/0: reply/33 {name: "1", value: 1, type: 0, properties: ["1": "literal"]}
 run/0: result 0 is 1
 mem/0: storing 1 in location 3
 run/0: instruction string-equal-reflexive/1
-run/0: memory-should-contain/44 {name: "
+run/0: memory-should-contain/45 {name: "
     3 <- 1  # x == x for all x
   ", value: 0, type: 0, properties: ["
     3 <- 1  # x == x for all x
diff --git a/cpp/.traces/string-equal-with-empty b/cpp/.traces/string-equal-with-empty
index 3a924504..22892143 100644
--- a/cpp/.traces/string-equal-with-empty
+++ b/cpp/.traces/string-equal-with-empty
@@ -22,7 +22,7 @@ after-brace/0: memory-should-contain ...
 new/0: routine allocated memory from 1000 to 101000
 schedule/0: string-equal-with-empty
 run/0: instruction string-equal-with-empty/0
-run/0: run/43 {name: "
+run/0: run/44 {name: "
     default-space:address:array:location <- new location:type, 30:literal
     x:address:array:character <- new []
     y:address:array:character <- new [abcd]
@@ -58,21 +58,21 @@ 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/42 {name: "location", value: 1, type: 0, properties: ["location": "type"]}, {name: "30", value: 30, type: 0, properties: ["30": "literal"]}
+run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new/43 {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/42 {name: "", value: 0, type: 0, properties: ["": "literal-string"]}
+run/0: {name: "x", value: 1, type: 2-5-4, properties: ["x": "address":"array":"character"]} <- new/43 {name: "", value: 0, type: 0, properties: ["": "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/42 {name: "abcd", value: 0, type: 0, properties: ["abcd": "literal-string"]}
+run/0: {name: "y", value: 2, type: 2-5-4, properties: ["y": "address":"array":"character"]} <- new/43 {name: "abcd", value: 0, type: 0, properties: ["abcd": "literal-string"]}
 mem/0: storing 1032 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 1032
 run/0: instruction string-equal/0
-run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new/42 {name: "location", value: 1, type: 0, properties: ["location": "type"]}, {name: "30", value: 30, type: 0, properties: ["30": "literal"]}
+run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new/43 {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 string-equal/1
@@ -112,7 +112,7 @@ 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-with-empty/1
-run/0: memory-should-contain/44 {name: "
+run/0: memory-should-contain/45 {name: "
     3 <- 0  # "" != abcd
   ", value: 0, type: 0, properties: ["
     3 <- 0  # "" != abcd
diff --git a/cpp/.traces/trace_check_passes_silently b/cpp/.traces/trace_check_passes_silently
index 687c853e..e535ecb4 100644
--- a/cpp/.traces/trace_check_passes_silently
+++ b/cpp/.traces/trace_check_passes_silently
@@ -16,7 +16,7 @@ after-brace/0: trace-should-contain ...
 new/0: routine allocated memory from 1000 to 101000
 schedule/0: main
 run/0: instruction main/0
-run/0: run/43 {name: "
+run/0: run/44 {name: "
     trace [a], [b]
   ", value: 0, type: 0, properties: ["
     trace [a], [b]
@@ -30,7 +30,7 @@ run/0: instruction run1001/0
 run/0: trace/18 {name: "a", value: 0, type: 0, properties: ["a": "literal-string"]}, {name: "b", value: 0, type: 0, properties: ["b": "literal-string"]}
 a/0: b
 run/0: instruction main/1
-run/0: trace-should-contain/45 {name: "
+run/0: trace-should-contain/46 {name: "
     a: b
   ", value: 0, type: 0, properties: ["
     a: b
diff --git a/cpp/.traces/trace_check_warns_on_failure b/cpp/.traces/trace_check_warns_on_failure
index 121235af..9b508986 100644
--- a/cpp/.traces/trace_check_warns_on_failure
+++ b/cpp/.traces/trace_check_warns_on_failure
@@ -11,7 +11,7 @@ after-brace/0: trace-should-contain ...
 new/0: routine allocated memory from 1000 to 101000
 schedule/0: main
 run/0: instruction main/0
-run/0: trace-should-contain/45 {name: "
+run/0: trace-should-contain/46 {name: "
     a: b
     a: d
   ", value: 0, type: 0, properties: ["
diff --git a/cpp/.traces/trace_check_warns_on_failure_in_later_line b/cpp/.traces/trace_check_warns_on_failure_in_later_line
index 35e575e2..98e79b58 100644
--- a/cpp/.traces/trace_check_warns_on_failure_in_later_line
+++ b/cpp/.traces/trace_check_warns_on_failure_in_later_line
@@ -18,7 +18,7 @@ after-brace/0: trace-should-contain ...
 new/0: routine allocated memory from 1000 to 101000
 schedule/0: main
 run/0: instruction main/0
-run/0: run/43 {name: "
+run/0: run/44 {name: "
     trace [a], [b]
   ", value: 0, type: 0, properties: ["
     trace [a], [b]
@@ -32,7 +32,7 @@ run/0: instruction run1001/0
 run/0: trace/18 {name: "a", value: 0, type: 0, properties: ["a": "literal-string"]}, {name: "b", value: 0, type: 0, properties: ["b": "literal-string"]}
 a/0: b
 run/0: instruction main/1
-run/0: trace-should-contain/45 {name: "
+run/0: trace-should-contain/46 {name: "
     a: b
     a: d
   ", value: 0, type: 0, properties: ["
diff --git a/cpp/.traces/trace_negative_check_passes_silently b/cpp/.traces/trace_negative_check_passes_silently
index fd380182..359c95bb 100644
--- a/cpp/.traces/trace_negative_check_passes_silently
+++ b/cpp/.traces/trace_negative_check_passes_silently
@@ -9,7 +9,7 @@ after-brace/0: trace-should-not-contain ...
 new/0: routine allocated memory from 1000 to 101000
 schedule/0: main
 run/0: instruction main/0
-run/0: trace-should-not-contain/46 {name: "
+run/0: trace-should-not-contain/47 {name: "
     a: b
   ", value: 0, type: 0, properties: ["
     a: b
diff --git a/cpp/.traces/trace_negative_check_warns_on_any_unexpected_line b/cpp/.traces/trace_negative_check_warns_on_any_unexpected_line
index b753bfbc..ed4b2a20 100644
--- a/cpp/.traces/trace_negative_check_warns_on_any_unexpected_line
+++ b/cpp/.traces/trace_negative_check_warns_on_any_unexpected_line
@@ -18,7 +18,7 @@ after-brace/0: trace-should-not-contain ...
 new/0: routine allocated memory from 1000 to 101000
 schedule/0: main
 run/0: instruction main/0
-run/0: run/43 {name: "
+run/0: run/44 {name: "
     trace [a], [d]
   ", value: 0, type: 0, properties: ["
     trace [a], [d]
@@ -32,7 +32,7 @@ run/0: instruction run1001/0
 run/0: trace/18 {name: "a", value: 0, type: 0, properties: ["a": "literal-string"]}, {name: "d", value: 0, type: 0, properties: ["d": "literal-string"]}
 a/0: d
 run/0: instruction main/1
-run/0: trace-should-not-contain/46 {name: "
+run/0: trace-should-not-contain/47 {name: "
     a: b
     a: d
   ", value: 0, type: 0, properties: ["
diff --git a/cpp/.traces/trace_negative_check_warns_on_failure b/cpp/.traces/trace_negative_check_warns_on_failure
index 66f5baed..3e7bfb3d 100644
--- a/cpp/.traces/trace_negative_check_warns_on_failure
+++ b/cpp/.traces/trace_negative_check_warns_on_failure
@@ -16,7 +16,7 @@ after-brace/0: trace-should-not-contain ...
 new/0: routine allocated memory from 1000 to 101000
 schedule/0: main
 run/0: instruction main/0
-run/0: run/43 {name: "
+run/0: run/44 {name: "
     trace [a], [b]
   ", value: 0, type: 0, properties: ["
     trace [a], [b]
@@ -30,7 +30,7 @@ run/0: instruction run1001/0
 run/0: trace/18 {name: "a", value: 0, type: 0, properties: ["a": "literal-string"]}, {name: "b", value: 0, type: 0, properties: ["b": "literal-string"]}
 a/0: b
 run/0: instruction main/1
-run/0: trace-should-not-contain/46 {name: "
+run/0: trace-should-not-contain/47 {name: "
     a: b
   ", value: 0, type: 0, properties: ["
     a: b
diff --git a/cpp/.traces/wait_for_location b/cpp/.traces/wait_for_location
index 44b627c0..bc088b4e 100644
--- a/cpp/.traces/wait_for_location
+++ b/cpp/.traces/wait_for_location
@@ -29,7 +29,7 @@ run/0: start-running/34 {name: "f2", value: 0, type: 0, properties: ["f2": "reci
 run/0: ingredient 0 is f2
 new/0: routine allocated memory from 101000 to 201000
 run/0: instruction f1/2
-run/0: wait-for-location/35 {name: "1", value: 1, type: 1, properties: ["1": "integer"]}
+run/0: wait-for-location/36 {name: "1", value: 1, type: 1, properties: ["1": "integer"]}
 run/0: waiting for 1 to change from 0
 schedule/0: f2
 run/0: instruction f2/0
diff --git a/cpp/038scheduler.cc b/cpp/038scheduler.cc
index dbefe556..d387bae5 100644
--- a/cpp/038scheduler.cc
+++ b/cpp/038scheduler.cc
@@ -195,3 +195,38 @@ recipe f1 [
 ]
 +schedule: f1
 -run: idle
+
+//:: 'routine-state' can tell if a given routine id is running
+
+:(scenario routine_state_test)
+% Scheduling_interval = 2;
+recipe f1 [
+  1:integer/child-id <- start-running f2:recipe
+  12:integer <- copy 0:literal  # race condition since we don't care about location 12
+  # thanks to Scheduling_interval, f2's one instruction runs in between here and completes
+  2:integer/state <- routine-state 1:integer/child-id
+]
+recipe f2 [
+  12:integer <- copy 0:literal
+  # trying to run a second instruction marks routine as completed
+]
+# recipe f2 should be in state COMPLETED
++mem: storing 1 in location 2
+
+:(before "End Primitive Recipe Declarations")
+ROUTINE_STATE,
+:(before "End Primitive Recipe Numbers")
+Recipe_number["routine-state"] = ROUTINE_STATE;
+:(before "End Primitive Recipe Implementations")
+case ROUTINE_STATE: {
+  vector<long long int> result;
+  index_t id = read_memory(current_instruction().ingredients[0])[0];
+  for (index_t i = 0; i < Routines.size(); ++i) {
+    if (Routines[i]->id == id) {
+      result.push_back(Routines[i]->state);
+      write_memory(current_instruction().products[0], result);
+      break;
+    }
+  }
+  break;
+}