about summary refs log tree commit diff stats
path: root/cpp
diff options
context:
space:
mode:
Diffstat (limited to 'cpp')
-rw-r--r--cpp/.traces/add1
-rw-r--r--cpp/.traces/add_literal1
-rw-r--r--cpp/.traces/and1
-rw-r--r--cpp/.traces/array_length1
-rw-r--r--cpp/.traces/brace_conversion2
-rw-r--r--cpp/.traces/brace_conversion_and_run5
-rw-r--r--cpp/.traces/break_cascading4
-rw-r--r--cpp/.traces/break_cascading24
-rw-r--r--cpp/.traces/break_empty_block2
-rw-r--r--cpp/.traces/break_if4
-rw-r--r--cpp/.traces/break_label2
-rw-r--r--cpp/.traces/break_nested2
-rw-r--r--cpp/.traces/break_nested_degenerate2
-rw-r--r--cpp/.traces/break_nested_degenerate22
-rw-r--r--cpp/.traces/break_unless2
-rw-r--r--cpp/.traces/buffer-append-works3
-rw-r--r--cpp/.traces/calling_recipe1
-rw-r--r--cpp/.traces/check_string_in_memory1
-rw-r--r--cpp/.traces/closure7
-rw-r--r--cpp/.traces/convert_names1
-rw-r--r--cpp/.traces/convert_names_passes_default_space1
-rw-r--r--cpp/.traces/convert_names_passes_dummy1
-rw-r--r--cpp/.traces/convert_names_passes_raw1
-rw-r--r--cpp/.traces/convert_names_transforms_container_elements1
-rw-r--r--cpp/.traces/convert_names_warns1
-rw-r--r--cpp/.traces/copy1
-rw-r--r--cpp/.traces/copy_array1
-rw-r--r--cpp/.traces/copy_array_indirect1
-rw-r--r--cpp/.traces/copy_exclusive_container1
-rw-r--r--cpp/.traces/copy_handles_nested_container_elements1
-rw-r--r--cpp/.traces/copy_indirect1
-rw-r--r--cpp/.traces/copy_literal1
-rw-r--r--cpp/.traces/copy_multiple_locations1
-rw-r--r--cpp/.traces/deref_sidesteps_default_space1
-rw-r--r--cpp/.traces/deref_sidesteps_default_space_in_get1
-rw-r--r--cpp/.traces/deref_sidesteps_default_space_in_index1
-rw-r--r--cpp/.traces/divide1
-rw-r--r--cpp/.traces/divide_literal1
-rw-r--r--cpp/.traces/divide_with_remainder1
-rw-r--r--cpp/.traces/divide_with_remainder_literal1
-rw-r--r--cpp/.traces/equal1
-rw-r--r--cpp/.traces/equal21
-rw-r--r--cpp/.traces/first_scenario_checking_trace1
-rw-r--r--cpp/.traces/first_scenario_checking_trace_negative1
-rw-r--r--cpp/.traces/first_scenario_in_mu1
-rw-r--r--cpp/.traces/get1
-rw-r--r--cpp/.traces/get_address1
-rw-r--r--cpp/.traces/get_address_indirect1
-rw-r--r--cpp/.traces/get_default_space1
-rw-r--r--cpp/.traces/get_handles_nested_container_elements1
-rw-r--r--cpp/.traces/get_indirect1
-rw-r--r--cpp/.traces/greater_or_equal1
-rw-r--r--cpp/.traces/greater_or_equal21
-rw-r--r--cpp/.traces/greater_or_equal31
-rw-r--r--cpp/.traces/greater_than1
-rw-r--r--cpp/.traces/greater_than21
-rw-r--r--cpp/.traces/include_nonderef_properties1
-rw-r--r--cpp/.traces/index1
-rw-r--r--cpp/.traces/index_address1
-rw-r--r--cpp/.traces/index_direct_offset1
-rw-r--r--cpp/.traces/index_indirect1
-rw-r--r--cpp/.traces/ingredient1
-rw-r--r--cpp/.traces/integer-to-decimal-digit-negative1
-rw-r--r--cpp/.traces/integer-to-decimal-digit-positive1
-rw-r--r--cpp/.traces/integer-to-decimal-digit-zero1
-rw-r--r--cpp/.traces/interpolate-at-end5
-rw-r--r--cpp/.traces/interpolate-at-start5
-rw-r--r--cpp/.traces/interpolate-works5
-rw-r--r--cpp/.traces/jump_backward1
-rw-r--r--cpp/.traces/jump_can_skip_instructions1
-rw-r--r--cpp/.traces/jump_if1
-rw-r--r--cpp/.traces/jump_if_fallthrough1
-rw-r--r--cpp/.traces/jump_unless1
-rw-r--r--cpp/.traces/jump_unless_fallthrough1
-rw-r--r--cpp/.traces/lesser_or_equal1
-rw-r--r--cpp/.traces/lesser_or_equal21
-rw-r--r--cpp/.traces/lesser_or_equal31
-rw-r--r--cpp/.traces/lesser_than1
-rw-r--r--cpp/.traces/lesser_than21
-rw-r--r--cpp/.traces/loop2
-rw-r--r--cpp/.traces/loop_nested2
-rw-r--r--cpp/.traces/loop_unless2
-rw-r--r--cpp/.traces/maybe_convert1
-rw-r--r--cpp/.traces/maybe_convert_fail1
-rw-r--r--cpp/.traces/maybe_convert_named1
-rw-r--r--cpp/.traces/multiply1
-rw-r--r--cpp/.traces/multiply_literal1
-rw-r--r--cpp/.traces/new5
-rw-r--r--cpp/.traces/new_array5
-rw-r--r--cpp/.traces/new_string3
-rw-r--r--cpp/.traces/next_ingredient1
-rw-r--r--cpp/.traces/next_ingredient_missing1
-rw-r--r--cpp/.traces/not1
-rw-r--r--cpp/.traces/or1
-rw-r--r--cpp/.traces/reply1
-rw-r--r--cpp/.traces/reply_container1
-rw-r--r--cpp/.traces/return_on_fallthrough1
-rw-r--r--cpp/.traces/rewind_ingredients1
-rw-r--r--cpp/.traces/run23
-rw-r--r--cpp/.traces/run_dummy1
-rw-r--r--cpp/.traces/run_label1
-rw-r--r--cpp/.traces/set_default_space1
-rw-r--r--cpp/.traces/store_indirect1
-rw-r--r--cpp/.traces/string-append-15
-rw-r--r--cpp/.traces/string-equal-common-lengths-but-distinct7
-rw-r--r--cpp/.traces/string-equal-distinct-lengths7
-rw-r--r--cpp/.traces/string-equal-identical7
-rw-r--r--cpp/.traces/string-equal-reflexive5
-rw-r--r--cpp/.traces/string-equal-with-empty7
-rw-r--r--cpp/.traces/string_literal2
-rw-r--r--cpp/.traces/string_literal_nested2
-rw-r--r--cpp/.traces/string_literal_with_colons2
-rw-r--r--cpp/.traces/subtract1
-rw-r--r--cpp/.traces/subtract_literal1
-rw-r--r--cpp/.traces/surrounding_space1
-rw-r--r--cpp/.traces/trace1
-rw-r--r--cpp/.traces/trace_in_mu1
-rw-r--r--cpp/038scheduler65
-rw-r--r--cpp/makefile2
119 files changed, 229 insertions, 65 deletions
diff --git a/cpp/.traces/add b/cpp/.traces/add
index 88d06d43..007e9b7b 100644
--- a/cpp/.traces/add
+++ b/cpp/.traces/add
@@ -12,6 +12,7 @@ after-brace/0: recipe main
 after-brace/0: copy ...
 after-brace/0: copy ...
 after-brace/0: add ...
+schedule/0: main
 run/0: instruction main/0
 run/0: ingredient 0 is 23
 mem/0: storing 23 in location 1
diff --git a/cpp/.traces/add_literal b/cpp/.traces/add_literal
index 5095f7bf..fc1c3f0a 100644
--- a/cpp/.traces/add_literal
+++ b/cpp/.traces/add_literal
@@ -4,6 +4,7 @@ parse/0:   ingredient: {name: "34", value: 0, type: 0, properties: ["34": "liter
 parse/0:   product: {name: "1", value: 0, type: 1, properties: ["1": "integer"]}
 after-brace/0: recipe main
 after-brace/0: add ...
+schedule/0: main
 run/0: instruction main/0
 run/0: ingredient 0 is 23
 run/0: ingredient 1 is 34
diff --git a/cpp/.traces/and b/cpp/.traces/and
index 19163733..2e5e189b 100644
--- a/cpp/.traces/and
+++ b/cpp/.traces/and
@@ -12,6 +12,7 @@ after-brace/0: recipe main
 after-brace/0: copy ...
 after-brace/0: copy ...
 after-brace/0: and ...
+schedule/0: main
 run/0: instruction main/0
 run/0: ingredient 0 is 1
 mem/0: storing 1 in location 1
diff --git a/cpp/.traces/array_length b/cpp/.traces/array_length
index 5484570d..45c8cd53 100644
--- a/cpp/.traces/array_length
+++ b/cpp/.traces/array_length
@@ -19,6 +19,7 @@ after-brace/0: copy ...
 after-brace/0: copy ...
 after-brace/0: copy ...
 after-brace/0: length ...
+schedule/0: main
 run/0: instruction main/0
 run/0: ingredient 0 is 3
 mem/0: storing 3 in location 1
diff --git a/cpp/.traces/brace_conversion b/cpp/.traces/brace_conversion
index bf7e037a..580f334f 100644
--- a/cpp/.traces/brace_conversion
+++ b/cpp/.traces/brace_conversion
@@ -1,5 +1,5 @@
 parse/0: label: {
-parse/0: instruction: 29
+parse/0: instruction: 30
 parse/0: instruction: 1
 parse/0:   ingredient: {name: "0", value: 0, type: 0, properties: ["0": "literal"]}
 parse/0:   product: {name: "1", value: 0, type: 1, properties: ["1": "integer"]}
diff --git a/cpp/.traces/brace_conversion_and_run b/cpp/.traces/brace_conversion_and_run
index 422c5344..4dd1a2c4 100644
--- a/cpp/.traces/brace_conversion_and_run
+++ b/cpp/.traces/brace_conversion_and_run
@@ -9,7 +9,7 @@ parse/0: instruction: 13
 parse/0:   ingredient: {name: "1", value: 0, type: 1, properties: ["1": "integer"]}
 parse/0:   ingredient: {name: "1", value: 0, type: 0, properties: ["1": "literal"]}
 parse/0:   product: {name: "3", value: 0, type: 3, properties: ["3": "boolean"]}
-parse/0: instruction: 30
+parse/0: instruction: 31
 parse/0:   ingredient: {name: "3", value: 0, type: 3, properties: ["3": "boolean"]}
 parse/0: instruction: 4
 parse/0:   ingredient: {name: "2", value: 0, type: 1, properties: ["2": "integer"]}
@@ -19,7 +19,7 @@ parse/0: instruction: 3
 parse/0:   ingredient: {name: "1", value: 0, type: 1, properties: ["1": "integer"]}
 parse/0:   ingredient: {name: "1", value: 0, type: 0, properties: ["1": "literal"]}
 parse/0:   product: {name: "1", value: 0, type: 1, properties: ["1": "integer"]}
-parse/0: instruction: 32
+parse/0: instruction: 33
 parse/0: label: }
 parse/0: instruction: 1
 parse/0:   ingredient: {name: "2", value: 0, type: 1, properties: ["2": "integer"]}
@@ -37,6 +37,7 @@ after-brace/0: jump -5:offset
 after-brace/0: 7: {name: "", value: -5, type: , properties: ["": ]}
 after-brace/0: 7: {name: "", value: -5, type: , properties: ["": ]}
 after-brace/0: copy ...
+schedule/0: test-factorial
 run/0: instruction test-factorial/0
 run/0: ingredient 0 is 5
 mem/0: storing 5 in location 1
diff --git a/cpp/.traces/break_cascading b/cpp/.traces/break_cascading
index 5dbfdb24..c21cda61 100644
--- a/cpp/.traces/break_cascading
+++ b/cpp/.traces/break_cascading
@@ -2,10 +2,10 @@ parse/0: instruction: 1
 parse/0:   ingredient: {name: "0", value: 0, type: 0, properties: ["0": "literal"]}
 parse/0:   product: {name: "1", value: 0, type: 1, properties: ["1": "integer"]}
 parse/0: label: {
-parse/0: instruction: 29
+parse/0: instruction: 30
 parse/0: label: }
 parse/0: label: {
-parse/0: instruction: 29
+parse/0: instruction: 30
 parse/0: label: }
 brace/0: 1000: push (open, 1)
 brace/0: push (close, 3)
diff --git a/cpp/.traces/break_cascading2 b/cpp/.traces/break_cascading2
index f42aea33..8d0d42b9 100644
--- a/cpp/.traces/break_cascading2
+++ b/cpp/.traces/break_cascading2
@@ -5,13 +5,13 @@ parse/0: instruction: 1
 parse/0:   ingredient: {name: "0", value: 0, type: 0, properties: ["0": "literal"]}
 parse/0:   product: {name: "2", value: 0, type: 1, properties: ["2": "integer"]}
 parse/0: label: {
-parse/0: instruction: 29
+parse/0: instruction: 30
 parse/0: instruction: 1
 parse/0:   ingredient: {name: "0", value: 0, type: 0, properties: ["0": "literal"]}
 parse/0:   product: {name: "3", value: 0, type: 1, properties: ["3": "integer"]}
 parse/0: label: }
 parse/0: label: {
-parse/0: instruction: 29
+parse/0: instruction: 30
 parse/0: label: }
 brace/0: 1000: push (open, 2)
 brace/0: push (close, 5)
diff --git a/cpp/.traces/break_empty_block b/cpp/.traces/break_empty_block
index 4fa219a3..ee11f3e6 100644
--- a/cpp/.traces/break_empty_block
+++ b/cpp/.traces/break_empty_block
@@ -2,7 +2,7 @@ parse/0: instruction: 1
 parse/0:   ingredient: {name: "0", value: 0, type: 0, properties: ["0": "literal"]}
 parse/0:   product: {name: "1", value: 0, type: 1, properties: ["1": "integer"]}
 parse/0: label: {
-parse/0: instruction: 29
+parse/0: instruction: 30
 parse/0: label: }
 brace/0: 1000: push (open, 1)
 brace/0: push (close, 3)
diff --git a/cpp/.traces/break_if b/cpp/.traces/break_if
index cef9f6be..5e379313 100644
--- a/cpp/.traces/break_if
+++ b/cpp/.traces/break_if
@@ -5,14 +5,14 @@ parse/0: instruction: 1
 parse/0:   ingredient: {name: "0", value: 0, type: 0, properties: ["0": "literal"]}
 parse/0:   product: {name: "2", value: 0, type: 1, properties: ["2": "integer"]}
 parse/0: label: {
-parse/0: instruction: 30
+parse/0: instruction: 31
 parse/0:   ingredient: {name: "2", value: 0, type: 1, properties: ["2": "integer"]}
 parse/0: instruction: 1
 parse/0:   ingredient: {name: "0", value: 0, type: 0, properties: ["0": "literal"]}
 parse/0:   product: {name: "3", value: 0, type: 1, properties: ["3": "integer"]}
 parse/0: label: }
 parse/0: label: {
-parse/0: instruction: 29
+parse/0: instruction: 30
 parse/0: label: }
 brace/0: 1000: push (open, 2)
 brace/0: push (close, 5)
diff --git a/cpp/.traces/break_label b/cpp/.traces/break_label
index 85fca7fc..b4e5d5a4 100644
--- a/cpp/.traces/break_label
+++ b/cpp/.traces/break_label
@@ -2,7 +2,7 @@ parse/0: instruction: 1
 parse/0:   ingredient: {name: "0", value: 0, type: 0, properties: ["0": "literal"]}
 parse/0:   product: {name: "1", value: 0, type: 1, properties: ["1": "integer"]}
 parse/0: label: {
-parse/0: instruction: 29
+parse/0: instruction: 30
 parse/0:   ingredient: {name: "+foo", value: 0, type: 0, properties: ["+foo": "offset"]}
 parse/0: label: }
 brace/0: 1000: push (open, 1)
diff --git a/cpp/.traces/break_nested b/cpp/.traces/break_nested
index cf764b7a..2d445d5d 100644
--- a/cpp/.traces/break_nested
+++ b/cpp/.traces/break_nested
@@ -5,7 +5,7 @@ parse/0: label: {
 parse/0: instruction: 1
 parse/0:   ingredient: {name: "0", value: 0, type: 0, properties: ["0": "literal"]}
 parse/0:   product: {name: "2", value: 0, type: 1, properties: ["2": "integer"]}
-parse/0: instruction: 29
+parse/0: instruction: 30
 parse/0: label: {
 parse/0: instruction: 1
 parse/0:   ingredient: {name: "0", value: 0, type: 0, properties: ["0": "literal"]}
diff --git a/cpp/.traces/break_nested_degenerate b/cpp/.traces/break_nested_degenerate
index 5713f0ef..633b6ea0 100644
--- a/cpp/.traces/break_nested_degenerate
+++ b/cpp/.traces/break_nested_degenerate
@@ -5,7 +5,7 @@ parse/0: label: {
 parse/0: instruction: 1
 parse/0:   ingredient: {name: "0", value: 0, type: 0, properties: ["0": "literal"]}
 parse/0:   product: {name: "2", value: 0, type: 1, properties: ["2": "integer"]}
-parse/0: instruction: 29
+parse/0: instruction: 30
 parse/0: label: {
 parse/0: label: }
 parse/0: instruction: 1
diff --git a/cpp/.traces/break_nested_degenerate2 b/cpp/.traces/break_nested_degenerate2
index 4573115e..e32a341f 100644
--- a/cpp/.traces/break_nested_degenerate2
+++ b/cpp/.traces/break_nested_degenerate2
@@ -5,7 +5,7 @@ parse/0: label: {
 parse/0: instruction: 1
 parse/0:   ingredient: {name: "0", value: 0, type: 0, properties: ["0": "literal"]}
 parse/0:   product: {name: "2", value: 0, type: 1, properties: ["2": "integer"]}
-parse/0: instruction: 29
+parse/0: instruction: 30
 parse/0: label: {
 parse/0: label: }
 parse/0: label: }
diff --git a/cpp/.traces/break_unless b/cpp/.traces/break_unless
index 9e2ad94c..16d7f12b 100644
--- a/cpp/.traces/break_unless
+++ b/cpp/.traces/break_unless
@@ -5,7 +5,7 @@ parse/0: instruction: 1
 parse/0:   ingredient: {name: "0", value: 0, type: 0, properties: ["0": "literal"]}
 parse/0:   product: {name: "2", value: 0, type: 1, properties: ["2": "integer"]}
 parse/0: label: {
-parse/0: instruction: 31
+parse/0: instruction: 32
 parse/0:   ingredient: {name: "2", value: 0, type: 1, properties: ["2": "integer"]}
 parse/0: instruction: 1
 parse/0:   ingredient: {name: "0", value: 0, type: 0, properties: ["0": "literal"]}
diff --git a/cpp/.traces/buffer-append-works b/cpp/.traces/buffer-append-works
index 14ec3ad7..f6c308a7 100644
--- a/cpp/.traces/buffer-append-works
+++ b/cpp/.traces/buffer-append-works
@@ -1,4 +1,4 @@
-parse/0: instruction: 35
+parse/0: instruction: 36
 parse/0:   ingredient: {name: "location", value: 0, type: 0, properties: ["location": "type"]}
 parse/0:   ingredient: {name: "30", value: 0, type: 0, properties: ["30": "literal"]}
 parse/0:   product: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]}
@@ -76,6 +76,7 @@ after-brace/0: get ...
 after-brace/0: equal ...
 after-brace/0: get ...
 after-brace/0: copy ...
+schedule/0: test-buffer-append-works
 run/0: instruction test-buffer-append-works/0
 mem/0: new alloc: 1000
 mem/0: array size is 30
diff --git a/cpp/.traces/calling_recipe b/cpp/.traces/calling_recipe
index 763acb53..244d6806 100644
--- a/cpp/.traces/calling_recipe
+++ b/cpp/.traces/calling_recipe
@@ -7,6 +7,7 @@ after-brace/0: recipe main
 after-brace/0: f ...
 after-brace/0: recipe f
 after-brace/0: add ...
+schedule/0: main
 run/0: instruction main/0
 run/0: instruction f/0
 run/0: ingredient 0 is 2
diff --git a/cpp/.traces/check_string_in_memory b/cpp/.traces/check_string_in_memory
index 491c8944..bd5a5bb9 100644
--- a/cpp/.traces/check_string_in_memory
+++ b/cpp/.traces/check_string_in_memory
@@ -15,6 +15,7 @@ after-brace/0: copy ...
 after-brace/0: copy ...
 after-brace/0: copy ...
 after-brace/0: copy ...
+schedule/0: test-check_string_in_memory
 run/0: instruction test-check_string_in_memory/0
 run/0: ingredient 0 is 3
 mem/0: storing 3 in location 1
diff --git a/cpp/.traces/closure b/cpp/.traces/closure
index f8bd5a9a..0017b943 100644
--- a/cpp/.traces/closure
+++ b/cpp/.traces/closure
@@ -1,4 +1,4 @@
-parse/0: instruction: 35
+parse/0: instruction: 36
 parse/0:   ingredient: {name: "location", value: 0, type: 0, properties: ["location": "type"]}
 parse/0:   ingredient: {name: "30", value: 0, type: 0, properties: ["30": "literal"]}
 parse/0:   product: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]}
@@ -10,7 +10,7 @@ parse/0:   product: {name: "2", value: 0, type: 1, properties: ["2": "integer",
 parse/0: instruction: 1002
 parse/0:   ingredient: {name: "1", value: 0, type: 2-5-1, properties: ["1": "address":"array":"location", "names": "init-counter"]}
 parse/0:   product: {name: "3", value: 0, type: 1, properties: ["3": "integer", "raw": ]}
-parse/0: instruction: 35
+parse/0: instruction: 36
 parse/0:   ingredient: {name: "location", value: 0, type: 0, properties: ["location": "type"]}
 parse/0:   ingredient: {name: "30", value: 0, type: 0, properties: ["30": "literal"]}
 parse/0:   product: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]}
@@ -22,7 +22,7 @@ parse/0:   ingredient: {name: "3", value: 0, type: 0, properties: ["3": "literal
 parse/0:   product: {name: "y", value: 0, type: 1, properties: ["y": "integer"]}
 parse/0: instruction: 28
 parse/0:   ingredient: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]}
-parse/0: instruction: 35
+parse/0: instruction: 36
 parse/0:   ingredient: {name: "space", value: 0, type: 0, properties: ["space": "literal"]}
 parse/0:   ingredient: {name: "30", value: 0, type: 0, properties: ["30": "literal"]}
 parse/0:   product: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]}
@@ -60,6 +60,7 @@ after-brace/0: next-ingredient ...
 after-brace/0: add ...
 after-brace/0: copy ...
 after-brace/0: reply ...
+schedule/0: main
 run/0: instruction main/0
 mem/0: new alloc: 1000
 mem/0: array size is 30
diff --git a/cpp/.traces/convert_names b/cpp/.traces/convert_names
index 94efd274..33f1f764 100644
--- a/cpp/.traces/convert_names
+++ b/cpp/.traces/convert_names
@@ -4,6 +4,7 @@ parse/0:   product: {name: "x", value: 0, type: 1, properties: ["x": "integer"]}
 name/0: assign x 1
 after-brace/0: recipe main
 after-brace/0: copy ...
+schedule/0: main
 run/0: instruction main/0
 run/0: ingredient 0 is 0
 mem/0: storing 0 in location 1
diff --git a/cpp/.traces/convert_names_passes_default_space b/cpp/.traces/convert_names_passes_default_space
index d11e038c..243754bb 100644
--- a/cpp/.traces/convert_names_passes_default_space
+++ b/cpp/.traces/convert_names_passes_default_space
@@ -5,5 +5,6 @@ parse/0:   product: {name: "x", value: 0, type: 1, properties: ["x": "integer"]}
 name/0: assign x 1
 after-brace/0: recipe main
 after-brace/0: copy ...
+schedule/0: main
 run/0: instruction main/0
 run/0: ingredient 0 is 0
diff --git a/cpp/.traces/convert_names_passes_dummy b/cpp/.traces/convert_names_passes_dummy
index 4587e3e0..6b780a48 100644
--- a/cpp/.traces/convert_names_passes_dummy
+++ b/cpp/.traces/convert_names_passes_dummy
@@ -5,5 +5,6 @@ parse/0:   product: {name: "x", value: 0, type: 1, properties: ["x": "integer"]}
 name/0: assign x 1
 after-brace/0: recipe main
 after-brace/0: copy ...
+schedule/0: main
 run/0: instruction main/0
 run/0: ingredient 0 is 0
diff --git a/cpp/.traces/convert_names_passes_raw b/cpp/.traces/convert_names_passes_raw
index 58b83277..7f4db28a 100644
--- a/cpp/.traces/convert_names_passes_raw
+++ b/cpp/.traces/convert_names_passes_raw
@@ -3,6 +3,7 @@ parse/0:   ingredient: {name: "0", value: 0, type: 0, properties: ["0": "literal
 parse/0:   product: {name: "x", value: 0, type: 1, properties: ["x": "integer", "raw": ]}
 after-brace/0: recipe main
 after-brace/0: copy ...
+schedule/0: main
 run/0: instruction main/0
 run/0: ingredient 0 is 0
 mem/0: storing 0 in location 0
diff --git a/cpp/.traces/convert_names_transforms_container_elements b/cpp/.traces/convert_names_transforms_container_elements
index c86b6d2d..6e7f7b91 100644
--- a/cpp/.traces/convert_names_transforms_container_elements
+++ b/cpp/.traces/convert_names_transforms_container_elements
@@ -13,6 +13,7 @@ name/0: assign b 2
 after-brace/0: recipe main
 after-brace/0: get ...
 after-brace/0: get ...
+schedule/0: main
 run/0: instruction main/0
 run/0: ingredient 0 is 0
 run/0: ingredient 1 is y
diff --git a/cpp/.traces/convert_names_warns b/cpp/.traces/convert_names_warns
index 11614845..33269c70 100644
--- a/cpp/.traces/convert_names_warns
+++ b/cpp/.traces/convert_names_warns
@@ -6,6 +6,7 @@ warn/0: name not found: y
 name/0: assign x 1
 after-brace/0: recipe main
 after-brace/0: copy ...
+schedule/0: main
 run/0: instruction main/0
 run/0: ingredient 0 is y
 mem/0: location 0 is 0
diff --git a/cpp/.traces/copy b/cpp/.traces/copy
index acaa8bf0..4b1d20e7 100644
--- a/cpp/.traces/copy
+++ b/cpp/.traces/copy
@@ -7,6 +7,7 @@ parse/0:   product: {name: "2", value: 0, type: 1, properties: ["2": "integer"]}
 after-brace/0: recipe main
 after-brace/0: copy ...
 after-brace/0: copy ...
+schedule/0: main
 run/0: instruction main/0
 run/0: ingredient 0 is 23
 mem/0: storing 23 in location 1
diff --git a/cpp/.traces/copy_array b/cpp/.traces/copy_array
index 57491c4c..2f6ab020 100644
--- a/cpp/.traces/copy_array
+++ b/cpp/.traces/copy_array
@@ -19,6 +19,7 @@ after-brace/0: copy ...
 after-brace/0: copy ...
 after-brace/0: copy ...
 after-brace/0: copy ...
+schedule/0: main
 run/0: instruction main/0
 run/0: ingredient 0 is 3
 mem/0: storing 3 in location 1
diff --git a/cpp/.traces/copy_array_indirect b/cpp/.traces/copy_array_indirect
index 79abdaf3..8bc2a803 100644
--- a/cpp/.traces/copy_array_indirect
+++ b/cpp/.traces/copy_array_indirect
@@ -23,6 +23,7 @@ after-brace/0: copy ...
 after-brace/0: copy ...
 after-brace/0: copy ...
 after-brace/0: copy ...
+schedule/0: main
 run/0: instruction main/0
 run/0: ingredient 0 is 3
 mem/0: storing 3 in location 1
diff --git a/cpp/.traces/copy_exclusive_container b/cpp/.traces/copy_exclusive_container
index 289f2442..9b74f45f 100644
--- a/cpp/.traces/copy_exclusive_container
+++ b/cpp/.traces/copy_exclusive_container
@@ -15,6 +15,7 @@ after-brace/0: copy ...
 after-brace/0: copy ...
 after-brace/0: copy ...
 after-brace/0: copy ...
+schedule/0: main
 run/0: instruction main/0
 run/0: ingredient 0 is 1
 mem/0: storing 1 in location 1
diff --git a/cpp/.traces/copy_handles_nested_container_elements b/cpp/.traces/copy_handles_nested_container_elements
index 8ca9a547..1136dbf1 100644
--- a/cpp/.traces/copy_handles_nested_container_elements
+++ b/cpp/.traces/copy_handles_nested_container_elements
@@ -15,6 +15,7 @@ after-brace/0: copy ...
 after-brace/0: copy ...
 after-brace/0: copy ...
 after-brace/0: copy ...
+schedule/0: main
 run/0: instruction main/0
 run/0: ingredient 0 is 34
 mem/0: storing 34 in location 12
diff --git a/cpp/.traces/copy_indirect b/cpp/.traces/copy_indirect
index e2bb8bdd..37cc8a85 100644
--- a/cpp/.traces/copy_indirect
+++ b/cpp/.traces/copy_indirect
@@ -11,6 +11,7 @@ after-brace/0: recipe main
 after-brace/0: copy ...
 after-brace/0: copy ...
 after-brace/0: copy ...
+schedule/0: main
 run/0: instruction main/0
 run/0: ingredient 0 is 2
 mem/0: storing 2 in location 1
diff --git a/cpp/.traces/copy_literal b/cpp/.traces/copy_literal
index c587d0f7..da98f43c 100644
--- a/cpp/.traces/copy_literal
+++ b/cpp/.traces/copy_literal
@@ -3,6 +3,7 @@ parse/0:   ingredient: {name: "23", value: 0, type: 0, properties: ["23": "liter
 parse/0:   product: {name: "1", value: 0, type: 1, properties: ["1": "integer"]}
 after-brace/0: recipe main
 after-brace/0: copy ...
+schedule/0: main
 run/0: instruction main/0
 run/0: ingredient 0 is 23
 mem/0: storing 23 in location 1
diff --git a/cpp/.traces/copy_multiple_locations b/cpp/.traces/copy_multiple_locations
index 0633b157..882c274b 100644
--- a/cpp/.traces/copy_multiple_locations
+++ b/cpp/.traces/copy_multiple_locations
@@ -11,6 +11,7 @@ after-brace/0: recipe main
 after-brace/0: copy ...
 after-brace/0: copy ...
 after-brace/0: copy ...
+schedule/0: main
 run/0: instruction main/0
 run/0: ingredient 0 is 34
 mem/0: storing 34 in location 1
diff --git a/cpp/.traces/deref_sidesteps_default_space b/cpp/.traces/deref_sidesteps_default_space
index 649911a1..0319ca84 100644
--- a/cpp/.traces/deref_sidesteps_default_space
+++ b/cpp/.traces/deref_sidesteps_default_space
@@ -19,6 +19,7 @@ after-brace/0: copy ...
 after-brace/0: copy ...
 after-brace/0: copy ...
 after-brace/0: copy ...
+schedule/0: main
 run/0: instruction main/0
 run/0: ingredient 0 is 34
 mem/0: storing 34 in location 3
diff --git a/cpp/.traces/deref_sidesteps_default_space_in_get b/cpp/.traces/deref_sidesteps_default_space_in_get
index b30aab53..2bb5e940 100644
--- a/cpp/.traces/deref_sidesteps_default_space_in_get
+++ b/cpp/.traces/deref_sidesteps_default_space_in_get
@@ -24,6 +24,7 @@ after-brace/0: copy ...
 after-brace/0: copy ...
 after-brace/0: copy ...
 after-brace/0: get ...
+schedule/0: main
 run/0: instruction main/0
 run/0: ingredient 0 is 34
 mem/0: storing 34 in location 12
diff --git a/cpp/.traces/deref_sidesteps_default_space_in_index b/cpp/.traces/deref_sidesteps_default_space_in_index
index 17477059..cce12001 100644
--- a/cpp/.traces/deref_sidesteps_default_space_in_index
+++ b/cpp/.traces/deref_sidesteps_default_space_in_index
@@ -28,6 +28,7 @@ after-brace/0: copy ...
 after-brace/0: copy ...
 after-brace/0: copy ...
 after-brace/0: index ...
+schedule/0: main
 run/0: instruction main/0
 run/0: ingredient 0 is 2
 mem/0: storing 2 in location 12
diff --git a/cpp/.traces/divide b/cpp/.traces/divide
index 2bb1f5b0..8a712e42 100644
--- a/cpp/.traces/divide
+++ b/cpp/.traces/divide
@@ -12,6 +12,7 @@ after-brace/0: recipe main
 after-brace/0: copy ...
 after-brace/0: copy ...
 after-brace/0: divide ...
+schedule/0: main
 run/0: instruction main/0
 run/0: ingredient 0 is 27
 mem/0: storing 27 in location 1
diff --git a/cpp/.traces/divide_literal b/cpp/.traces/divide_literal
index deba8b6a..964fd6ef 100644
--- a/cpp/.traces/divide_literal
+++ b/cpp/.traces/divide_literal
@@ -4,6 +4,7 @@ parse/0:   ingredient: {name: "2", value: 0, type: 0, properties: ["2": "literal
 parse/0:   product: {name: "1", value: 0, type: 1, properties: ["1": "integer"]}
 after-brace/0: recipe main
 after-brace/0: divide ...
+schedule/0: main
 run/0: instruction main/0
 run/0: ingredient 0 is 8
 run/0: ingredient 1 is 2
diff --git a/cpp/.traces/divide_with_remainder b/cpp/.traces/divide_with_remainder
index d8989d9c..e09727b7 100644
--- a/cpp/.traces/divide_with_remainder
+++ b/cpp/.traces/divide_with_remainder
@@ -13,6 +13,7 @@ after-brace/0: recipe main
 after-brace/0: copy ...
 after-brace/0: copy ...
 after-brace/0: divide-with-remainder ...
+schedule/0: main
 run/0: instruction main/0
 run/0: ingredient 0 is 27
 mem/0: storing 27 in location 1
diff --git a/cpp/.traces/divide_with_remainder_literal b/cpp/.traces/divide_with_remainder_literal
index 05bde8a9..69b4451e 100644
--- a/cpp/.traces/divide_with_remainder_literal
+++ b/cpp/.traces/divide_with_remainder_literal
@@ -5,6 +5,7 @@ parse/0:   product: {name: "1", value: 0, type: 1, properties: ["1": "integer"]}
 parse/0:   product: {name: "2", value: 0, type: 1, properties: ["2": "integer"]}
 after-brace/0: recipe main
 after-brace/0: divide-with-remainder ...
+schedule/0: main
 run/0: instruction main/0
 run/0: ingredient 0 is 9
 run/0: ingredient 1 is 2
diff --git a/cpp/.traces/equal b/cpp/.traces/equal
index 87960ead..440bbb42 100644
--- a/cpp/.traces/equal
+++ b/cpp/.traces/equal
@@ -12,6 +12,7 @@ after-brace/0: recipe main
 after-brace/0: copy ...
 after-brace/0: copy ...
 after-brace/0: equal ...
+schedule/0: main
 run/0: instruction main/0
 run/0: ingredient 0 is 34
 mem/0: storing 34 in location 1
diff --git a/cpp/.traces/equal2 b/cpp/.traces/equal2
index 90eada03..f1ce2af8 100644
--- a/cpp/.traces/equal2
+++ b/cpp/.traces/equal2
@@ -12,6 +12,7 @@ after-brace/0: recipe main
 after-brace/0: copy ...
 after-brace/0: copy ...
 after-brace/0: equal ...
+schedule/0: main
 run/0: instruction main/0
 run/0: ingredient 0 is 34
 mem/0: storing 34 in location 1
diff --git a/cpp/.traces/first_scenario_checking_trace b/cpp/.traces/first_scenario_checking_trace
index 8ea5d60b..85e56d11 100644
--- a/cpp/.traces/first_scenario_checking_trace
+++ b/cpp/.traces/first_scenario_checking_trace
@@ -4,6 +4,7 @@ parse/0:   ingredient: {name: "2", value: 0, type: 0, properties: ["2": "literal
 parse/0:   product: {name: "1", value: 0, type: 1, properties: ["1": "integer"]}
 after-brace/0: recipe test-first_scenario_checking_trace
 after-brace/0: add ...
+schedule/0: test-first_scenario_checking_trace
 run/0: instruction test-first_scenario_checking_trace/0
 run/0: ingredient 0 is 2
 run/0: ingredient 1 is 2
diff --git a/cpp/.traces/first_scenario_checking_trace_negative b/cpp/.traces/first_scenario_checking_trace_negative
index e80d680f..168a8b50 100644
--- a/cpp/.traces/first_scenario_checking_trace_negative
+++ b/cpp/.traces/first_scenario_checking_trace_negative
@@ -4,6 +4,7 @@ parse/0:   ingredient: {name: "2", value: 0, type: 0, properties: ["2": "literal
 parse/0:   product: {name: "1", value: 0, type: 1, properties: ["1": "integer"]}
 after-brace/0: recipe test-first_scenario_checking_trace_negative
 after-brace/0: add ...
+schedule/0: test-first_scenario_checking_trace_negative
 run/0: instruction test-first_scenario_checking_trace_negative/0
 run/0: ingredient 0 is 2
 run/0: ingredient 1 is 2
diff --git a/cpp/.traces/first_scenario_in_mu b/cpp/.traces/first_scenario_in_mu
index 3b12bb71..6f6cb1d9 100644
--- a/cpp/.traces/first_scenario_in_mu
+++ b/cpp/.traces/first_scenario_in_mu
@@ -4,6 +4,7 @@ parse/0:   ingredient: {name: "2", value: 0, type: 0, properties: ["2": "literal
 parse/0:   product: {name: "1", value: 0, type: 1, properties: ["1": "integer"]}
 after-brace/0: recipe test-first_scenario_in_mu
 after-brace/0: add ...
+schedule/0: test-first_scenario_in_mu
 run/0: instruction test-first_scenario_in_mu/0
 run/0: ingredient 0 is 2
 run/0: ingredient 1 is 2
diff --git a/cpp/.traces/get b/cpp/.traces/get
index 60d738da..236ce74d 100644
--- a/cpp/.traces/get
+++ b/cpp/.traces/get
@@ -12,6 +12,7 @@ after-brace/0: recipe main
 after-brace/0: copy ...
 after-brace/0: copy ...
 after-brace/0: get ...
+schedule/0: main
 run/0: instruction main/0
 run/0: ingredient 0 is 34
 mem/0: storing 34 in location 12
diff --git a/cpp/.traces/get_address b/cpp/.traces/get_address
index f36d4b05..4b791ec5 100644
--- a/cpp/.traces/get_address
+++ b/cpp/.traces/get_address
@@ -12,6 +12,7 @@ after-brace/0: recipe main
 after-brace/0: copy ...
 after-brace/0: copy ...
 after-brace/0: get-address ...
+schedule/0: main
 run/0: instruction main/0
 run/0: ingredient 0 is 34
 mem/0: storing 34 in location 12
diff --git a/cpp/.traces/get_address_indirect b/cpp/.traces/get_address_indirect
index bb74ab61..84177a6f 100644
--- a/cpp/.traces/get_address_indirect
+++ b/cpp/.traces/get_address_indirect
@@ -16,6 +16,7 @@ after-brace/0: copy ...
 after-brace/0: copy ...
 after-brace/0: copy ...
 after-brace/0: get-address ...
+schedule/0: main
 run/0: instruction main/0
 run/0: ingredient 0 is 2
 mem/0: storing 2 in location 1
diff --git a/cpp/.traces/get_default_space b/cpp/.traces/get_default_space
index 7b76e379..34d51fb1 100644
--- a/cpp/.traces/get_default_space
+++ b/cpp/.traces/get_default_space
@@ -7,6 +7,7 @@ parse/0:   product: {name: "1", value: 0, type: 1, properties: ["1": "integer",
 after-brace/0: recipe main
 after-brace/0: copy ...
 after-brace/0: copy ...
+schedule/0: main
 run/0: instruction main/0
 run/0: ingredient 0 is 10
 run/0: instruction main/1
diff --git a/cpp/.traces/get_handles_nested_container_elements b/cpp/.traces/get_handles_nested_container_elements
index 5997b167..014083a7 100644
--- a/cpp/.traces/get_handles_nested_container_elements
+++ b/cpp/.traces/get_handles_nested_container_elements
@@ -16,6 +16,7 @@ after-brace/0: copy ...
 after-brace/0: copy ...
 after-brace/0: copy ...
 after-brace/0: get ...
+schedule/0: main
 run/0: instruction main/0
 run/0: ingredient 0 is 34
 mem/0: storing 34 in location 12
diff --git a/cpp/.traces/get_indirect b/cpp/.traces/get_indirect
index b9328f71..80acbdce 100644
--- a/cpp/.traces/get_indirect
+++ b/cpp/.traces/get_indirect
@@ -16,6 +16,7 @@ after-brace/0: copy ...
 after-brace/0: copy ...
 after-brace/0: copy ...
 after-brace/0: get ...
+schedule/0: main
 run/0: instruction main/0
 run/0: ingredient 0 is 2
 mem/0: storing 2 in location 1
diff --git a/cpp/.traces/greater_or_equal b/cpp/.traces/greater_or_equal
index eb2a71a3..08e96536 100644
--- a/cpp/.traces/greater_or_equal
+++ b/cpp/.traces/greater_or_equal
@@ -12,6 +12,7 @@ after-brace/0: recipe main
 after-brace/0: copy ...
 after-brace/0: copy ...
 after-brace/0: greater-or-equal ...
+schedule/0: main
 run/0: instruction main/0
 run/0: ingredient 0 is 34
 mem/0: storing 34 in location 1
diff --git a/cpp/.traces/greater_or_equal2 b/cpp/.traces/greater_or_equal2
index 048630c8..1b3da12e 100644
--- a/cpp/.traces/greater_or_equal2
+++ b/cpp/.traces/greater_or_equal2
@@ -12,6 +12,7 @@ after-brace/0: recipe main
 after-brace/0: copy ...
 after-brace/0: copy ...
 after-brace/0: greater-or-equal ...
+schedule/0: main
 run/0: instruction main/0
 run/0: ingredient 0 is 34
 mem/0: storing 34 in location 1
diff --git a/cpp/.traces/greater_or_equal3 b/cpp/.traces/greater_or_equal3
index 8aa418bc..4a5e4322 100644
--- a/cpp/.traces/greater_or_equal3
+++ b/cpp/.traces/greater_or_equal3
@@ -12,6 +12,7 @@ after-brace/0: recipe main
 after-brace/0: copy ...
 after-brace/0: copy ...
 after-brace/0: greater-or-equal ...
+schedule/0: main
 run/0: instruction main/0
 run/0: ingredient 0 is 34
 mem/0: storing 34 in location 1
diff --git a/cpp/.traces/greater_than b/cpp/.traces/greater_than
index 54d309f7..b4ce6eb1 100644
--- a/cpp/.traces/greater_than
+++ b/cpp/.traces/greater_than
@@ -12,6 +12,7 @@ after-brace/0: recipe main
 after-brace/0: copy ...
 after-brace/0: copy ...
 after-brace/0: greater-than ...
+schedule/0: main
 run/0: instruction main/0
 run/0: ingredient 0 is 34
 mem/0: storing 34 in location 1
diff --git a/cpp/.traces/greater_than2 b/cpp/.traces/greater_than2
index bd2f6b9f..cdb2f6d4 100644
--- a/cpp/.traces/greater_than2
+++ b/cpp/.traces/greater_than2
@@ -12,6 +12,7 @@ after-brace/0: recipe main
 after-brace/0: copy ...
 after-brace/0: copy ...
 after-brace/0: greater-than ...
+schedule/0: main
 run/0: instruction main/0
 run/0: ingredient 0 is 34
 mem/0: storing 34 in location 1
diff --git a/cpp/.traces/include_nonderef_properties b/cpp/.traces/include_nonderef_properties
index b7f103fc..662a8ced 100644
--- a/cpp/.traces/include_nonderef_properties
+++ b/cpp/.traces/include_nonderef_properties
@@ -16,6 +16,7 @@ after-brace/0: copy ...
 after-brace/0: copy ...
 after-brace/0: copy ...
 after-brace/0: get ...
+schedule/0: main
 run/0: instruction main/0
 run/0: ingredient 0 is 2
 mem/0: storing 2 in location 1
diff --git a/cpp/.traces/index b/cpp/.traces/index
index c5114af2..149b5d91 100644
--- a/cpp/.traces/index
+++ b/cpp/.traces/index
@@ -20,6 +20,7 @@ after-brace/0: copy ...
 after-brace/0: copy ...
 after-brace/0: copy ...
 after-brace/0: index ...
+schedule/0: main
 run/0: instruction main/0
 run/0: ingredient 0 is 3
 mem/0: storing 3 in location 1
diff --git a/cpp/.traces/index_address b/cpp/.traces/index_address
index 464a4565..ecde8143 100644
--- a/cpp/.traces/index_address
+++ b/cpp/.traces/index_address
@@ -20,6 +20,7 @@ after-brace/0: copy ...
 after-brace/0: copy ...
 after-brace/0: copy ...
 after-brace/0: index-address ...
+schedule/0: main
 run/0: instruction main/0
 run/0: ingredient 0 is 3
 mem/0: storing 3 in location 1
diff --git a/cpp/.traces/index_direct_offset b/cpp/.traces/index_direct_offset
index 021f8452..be7307a2 100644
--- a/cpp/.traces/index_direct_offset
+++ b/cpp/.traces/index_direct_offset
@@ -24,6 +24,7 @@ after-brace/0: copy ...
 after-brace/0: copy ...
 after-brace/0: copy ...
 after-brace/0: index ...
+schedule/0: main
 run/0: instruction main/0
 run/0: ingredient 0 is 3
 mem/0: storing 3 in location 1
diff --git a/cpp/.traces/index_indirect b/cpp/.traces/index_indirect
index e1f6c191..9ba78065 100644
--- a/cpp/.traces/index_indirect
+++ b/cpp/.traces/index_indirect
@@ -24,6 +24,7 @@ after-brace/0: copy ...
 after-brace/0: copy ...
 after-brace/0: copy ...
 after-brace/0: index ...
+schedule/0: main
 run/0: instruction main/0
 run/0: ingredient 0 is 3
 mem/0: storing 3 in location 1
diff --git a/cpp/.traces/ingredient b/cpp/.traces/ingredient
index 0d8fbf96..4214c38d 100644
--- a/cpp/.traces/ingredient
+++ b/cpp/.traces/ingredient
@@ -12,6 +12,7 @@ after-brace/0: f ...
 after-brace/0: recipe f
 after-brace/0: ingredient ...
 after-brace/0: next-ingredient ...
+schedule/0: main
 run/0: instruction main/0
 run/0: instruction f/0
 run/0: product 0 is 2
diff --git a/cpp/.traces/integer-to-decimal-digit-negative b/cpp/.traces/integer-to-decimal-digit-negative
index 2922c22b..c085c7df 100644
--- a/cpp/.traces/integer-to-decimal-digit-negative
+++ b/cpp/.traces/integer-to-decimal-digit-negative
@@ -7,6 +7,7 @@ parse/0:   product: {name: "2", value: 0, type: 5-4, properties: ["2": "array":"
 after-brace/0: recipe test-integer-to-decimal-digit-negative
 after-brace/0: integer-to-decimal-string ...
 after-brace/0: copy ...
+schedule/0: test-integer-to-decimal-digit-negative
 run/0: instruction test-integer-to-decimal-digit-negative/0
 run/0: instruction integer-to-decimal-string/0
 mem/0: new alloc: 1000
diff --git a/cpp/.traces/integer-to-decimal-digit-positive b/cpp/.traces/integer-to-decimal-digit-positive
index f5a8ebb7..1e3be0e1 100644
--- a/cpp/.traces/integer-to-decimal-digit-positive
+++ b/cpp/.traces/integer-to-decimal-digit-positive
@@ -7,6 +7,7 @@ parse/0:   product: {name: "2", value: 0, type: 5-4, properties: ["2": "array":"
 after-brace/0: recipe test-integer-to-decimal-digit-positive
 after-brace/0: integer-to-decimal-string ...
 after-brace/0: copy ...
+schedule/0: test-integer-to-decimal-digit-positive
 run/0: instruction test-integer-to-decimal-digit-positive/0
 run/0: instruction integer-to-decimal-string/0
 mem/0: new alloc: 1000
diff --git a/cpp/.traces/integer-to-decimal-digit-zero b/cpp/.traces/integer-to-decimal-digit-zero
index 39d858e2..c5d4df99 100644
--- a/cpp/.traces/integer-to-decimal-digit-zero
+++ b/cpp/.traces/integer-to-decimal-digit-zero
@@ -7,6 +7,7 @@ parse/0:   product: {name: "2", value: 0, type: 5-4, properties: ["2": "array":"
 after-brace/0: recipe test-integer-to-decimal-digit-zero
 after-brace/0: integer-to-decimal-string ...
 after-brace/0: copy ...
+schedule/0: test-integer-to-decimal-digit-zero
 run/0: instruction test-integer-to-decimal-digit-zero/0
 run/0: instruction integer-to-decimal-string/0
 mem/0: new alloc: 1000
diff --git a/cpp/.traces/interpolate-at-end b/cpp/.traces/interpolate-at-end
index a972b50f..e9c08184 100644
--- a/cpp/.traces/interpolate-at-end
+++ b/cpp/.traces/interpolate-at-end
@@ -1,7 +1,7 @@
-parse/0: instruction: 35
+parse/0: instruction: 36
 parse/0:   ingredient: {name: "hello, _", value: 0, type: 0, properties: ["hello, _": "literal-string"]}
 parse/0:   product: {name: "1", value: 0, type: 2-5-4, properties: ["1": "address":"array":"character", "raw": ]}
-parse/0: instruction: 35
+parse/0: instruction: 36
 parse/0:   ingredient: {name: "abc", value: 0, type: 0, properties: ["abc": "literal-string"]}
 parse/0:   product: {name: "2", value: 0, type: 2-5-4, properties: ["2": "address":"array":"character", "raw": ]}
 parse/0: instruction: 107
@@ -18,6 +18,7 @@ after-brace/0: new ...
 after-brace/0: new ...
 after-brace/0: interpolate ...
 after-brace/0: copy ...
+schedule/0: test-interpolate-at-end
 run/0: instruction test-interpolate-at-end/0
 mem/0: storing 1000 in location 1
 run/0: instruction test-interpolate-at-end/1
diff --git a/cpp/.traces/interpolate-at-start b/cpp/.traces/interpolate-at-start
index e220bb4f..7c09ee1c 100644
--- a/cpp/.traces/interpolate-at-start
+++ b/cpp/.traces/interpolate-at-start
@@ -1,7 +1,7 @@
-parse/0: instruction: 35
+parse/0: instruction: 36
 parse/0:   ingredient: {name: "_, hello!", value: 0, type: 0, properties: ["_, hello!": "literal-string"]}
 parse/0:   product: {name: "1", value: 0, type: 2-5-4, properties: ["1": "address":"array":"character", "raw": ]}
-parse/0: instruction: 35
+parse/0: instruction: 36
 parse/0:   ingredient: {name: "abc", value: 0, type: 0, properties: ["abc": "literal-string"]}
 parse/0:   product: {name: "2", value: 0, type: 2-5-4, properties: ["2": "address":"array":"character", "raw": ]}
 parse/0: instruction: 107
@@ -18,6 +18,7 @@ after-brace/0: new ...
 after-brace/0: new ...
 after-brace/0: interpolate ...
 after-brace/0: copy ...
+schedule/0: test-interpolate-at-start
 run/0: instruction test-interpolate-at-start/0
 mem/0: storing 1000 in location 1
 run/0: instruction test-interpolate-at-start/1
diff --git a/cpp/.traces/interpolate-works b/cpp/.traces/interpolate-works
index 3858438e..917885b6 100644
--- a/cpp/.traces/interpolate-works
+++ b/cpp/.traces/interpolate-works
@@ -1,7 +1,7 @@
-parse/0: instruction: 35
+parse/0: instruction: 36
 parse/0:   ingredient: {name: "abc _", value: 0, type: 0, properties: ["abc _": "literal-string"]}
 parse/0:   product: {name: "1", value: 0, type: 2-5-4, properties: ["1": "address":"array":"character", "raw": ]}
-parse/0: instruction: 35
+parse/0: instruction: 36
 parse/0:   ingredient: {name: "def", value: 0, type: 0, properties: ["def": "literal-string"]}
 parse/0:   product: {name: "2", value: 0, type: 2-5-4, properties: ["2": "address":"array":"character", "raw": ]}
 parse/0: instruction: 107
@@ -18,6 +18,7 @@ after-brace/0: new ...
 after-brace/0: new ...
 after-brace/0: interpolate ...
 after-brace/0: copy ...
+schedule/0: test-interpolate-works
 run/0: instruction test-interpolate-works/0
 mem/0: storing 1000 in location 1
 run/0: instruction test-interpolate-works/1
diff --git a/cpp/.traces/jump_backward b/cpp/.traces/jump_backward
index 02679f2e..4753bde6 100644
--- a/cpp/.traces/jump_backward
+++ b/cpp/.traces/jump_backward
@@ -8,6 +8,7 @@ after-brace/0: recipe main
 after-brace/0: jump ...
 after-brace/0: jump ...
 after-brace/0: jump ...
+schedule/0: main
 run/0: instruction main/0
 run/0: ingredient 0 is 1
 run/0: jumping to instruction 2
diff --git a/cpp/.traces/jump_can_skip_instructions b/cpp/.traces/jump_can_skip_instructions
index 6fa4d89f..8eeb9f28 100644
--- a/cpp/.traces/jump_can_skip_instructions
+++ b/cpp/.traces/jump_can_skip_instructions
@@ -6,6 +6,7 @@ parse/0:   product: {name: "1", value: 0, type: 1, properties: ["1": "integer"]}
 after-brace/0: recipe main
 after-brace/0: jump ...
 after-brace/0: copy ...
+schedule/0: main
 run/0: instruction main/0
 run/0: ingredient 0 is 1
 run/0: jumping to instruction 2
diff --git a/cpp/.traces/jump_if b/cpp/.traces/jump_if
index 328e74c7..1dcd490a 100644
--- a/cpp/.traces/jump_if
+++ b/cpp/.traces/jump_if
@@ -7,6 +7,7 @@ parse/0:   product: {name: "1", value: 0, type: 1, properties: ["1": "integer"]}
 after-brace/0: recipe main
 after-brace/0: jump-if ...
 after-brace/0: copy ...
+schedule/0: main
 run/0: instruction main/0
 run/0: ingredient 0 is 999
 run/0: ingredient 1 is 1
diff --git a/cpp/.traces/jump_if_fallthrough b/cpp/.traces/jump_if_fallthrough
index 1c4753d1..58c52e3a 100644
--- a/cpp/.traces/jump_if_fallthrough
+++ b/cpp/.traces/jump_if_fallthrough
@@ -7,6 +7,7 @@ parse/0:   product: {name: "123", value: 0, type: 1, properties: ["123": "intege
 after-brace/0: recipe main
 after-brace/0: jump-if ...
 after-brace/0: copy ...
+schedule/0: main
 run/0: instruction main/0
 run/0: ingredient 0 is 0
 run/0: jump-if fell through
diff --git a/cpp/.traces/jump_unless b/cpp/.traces/jump_unless
index fc794cd2..bb4ab68f 100644
--- a/cpp/.traces/jump_unless
+++ b/cpp/.traces/jump_unless
@@ -7,6 +7,7 @@ parse/0:   product: {name: "1", value: 0, type: 1, properties: ["1": "integer"]}
 after-brace/0: recipe main
 after-brace/0: jump-unless ...
 after-brace/0: copy ...
+schedule/0: main
 run/0: instruction main/0
 run/0: ingredient 0 is 0
 run/0: ingredient 1 is 1
diff --git a/cpp/.traces/jump_unless_fallthrough b/cpp/.traces/jump_unless_fallthrough
index 7ab74af2..693d1b3c 100644
--- a/cpp/.traces/jump_unless_fallthrough
+++ b/cpp/.traces/jump_unless_fallthrough
@@ -7,6 +7,7 @@ parse/0:   product: {name: "123", value: 0, type: 1, properties: ["123": "intege
 after-brace/0: recipe main
 after-brace/0: jump-unless ...
 after-brace/0: copy ...
+schedule/0: main
 run/0: instruction main/0
 run/0: ingredient 0 is 999
 run/0: jump-unless fell through
diff --git a/cpp/.traces/lesser_or_equal b/cpp/.traces/lesser_or_equal
index c82f7c7f..3672dcbe 100644
--- a/cpp/.traces/lesser_or_equal
+++ b/cpp/.traces/lesser_or_equal
@@ -12,6 +12,7 @@ after-brace/0: recipe main
 after-brace/0: copy ...
 after-brace/0: copy ...
 after-brace/0: lesser-or-equal ...
+schedule/0: main
 run/0: instruction main/0
 run/0: ingredient 0 is 32
 mem/0: storing 32 in location 1
diff --git a/cpp/.traces/lesser_or_equal2 b/cpp/.traces/lesser_or_equal2
index 74dac1f6..8a9c3f7b 100644
--- a/cpp/.traces/lesser_or_equal2
+++ b/cpp/.traces/lesser_or_equal2
@@ -12,6 +12,7 @@ after-brace/0: recipe main
 after-brace/0: copy ...
 after-brace/0: copy ...
 after-brace/0: lesser-or-equal ...
+schedule/0: main
 run/0: instruction main/0
 run/0: ingredient 0 is 33
 mem/0: storing 33 in location 1
diff --git a/cpp/.traces/lesser_or_equal3 b/cpp/.traces/lesser_or_equal3
index 1becdf6a..c6667886 100644
--- a/cpp/.traces/lesser_or_equal3
+++ b/cpp/.traces/lesser_or_equal3
@@ -12,6 +12,7 @@ after-brace/0: recipe main
 after-brace/0: copy ...
 after-brace/0: copy ...
 after-brace/0: lesser-or-equal ...
+schedule/0: main
 run/0: instruction main/0
 run/0: ingredient 0 is 34
 mem/0: storing 34 in location 1
diff --git a/cpp/.traces/lesser_than b/cpp/.traces/lesser_than
index 9628c081..8dca4431 100644
--- a/cpp/.traces/lesser_than
+++ b/cpp/.traces/lesser_than
@@ -12,6 +12,7 @@ after-brace/0: recipe main
 after-brace/0: copy ...
 after-brace/0: copy ...
 after-brace/0: lesser-than ...
+schedule/0: main
 run/0: instruction main/0
 run/0: ingredient 0 is 32
 mem/0: storing 32 in location 1
diff --git a/cpp/.traces/lesser_than2 b/cpp/.traces/lesser_than2
index dc373a53..a894969e 100644
--- a/cpp/.traces/lesser_than2
+++ b/cpp/.traces/lesser_than2
@@ -12,6 +12,7 @@ after-brace/0: recipe main
 after-brace/0: copy ...
 after-brace/0: copy ...
 after-brace/0: lesser-than ...
+schedule/0: main
 run/0: instruction main/0
 run/0: ingredient 0 is 34
 mem/0: storing 34 in location 1
diff --git a/cpp/.traces/loop b/cpp/.traces/loop
index 5e08df9b..4cfc2250 100644
--- a/cpp/.traces/loop
+++ b/cpp/.traces/loop
@@ -8,7 +8,7 @@ parse/0: label: {
 parse/0: instruction: 1
 parse/0:   ingredient: {name: "0", value: 0, type: 0, properties: ["0": "literal"]}
 parse/0:   product: {name: "3", value: 0, type: 1, properties: ["3": "integer"]}
-parse/0: instruction: 32
+parse/0: instruction: 33
 parse/0: label: }
 brace/0: 1000: push (open, 2)
 brace/0: push (close, 5)
diff --git a/cpp/.traces/loop_nested b/cpp/.traces/loop_nested
index e31766d2..b707de42 100644
--- a/cpp/.traces/loop_nested
+++ b/cpp/.traces/loop_nested
@@ -10,7 +10,7 @@ parse/0: instruction: 1
 parse/0:   ingredient: {name: "0", value: 0, type: 0, properties: ["0": "literal"]}
 parse/0:   product: {name: "3", value: 0, type: 1, properties: ["3": "integer"]}
 parse/0: label: }
-parse/0: instruction: 33
+parse/0: instruction: 34
 parse/0:   ingredient: {name: "4", value: 0, type: 3, properties: ["4": "boolean"]}
 parse/0: instruction: 1
 parse/0:   ingredient: {name: "0", value: 0, type: 0, properties: ["0": "literal"]}
diff --git a/cpp/.traces/loop_unless b/cpp/.traces/loop_unless
index b4678763..fe50d87e 100644
--- a/cpp/.traces/loop_unless
+++ b/cpp/.traces/loop_unless
@@ -5,7 +5,7 @@ parse/0: instruction: 1
 parse/0:   ingredient: {name: "0", value: 0, type: 0, properties: ["0": "literal"]}
 parse/0:   product: {name: "2", value: 0, type: 1, properties: ["2": "integer"]}
 parse/0: label: {
-parse/0: instruction: 34
+parse/0: instruction: 35
 parse/0:   ingredient: {name: "2", value: 0, type: 1, properties: ["2": "integer"]}
 parse/0: instruction: 1
 parse/0:   ingredient: {name: "0", value: 0, type: 0, properties: ["0": "literal"]}
diff --git a/cpp/.traces/maybe_convert b/cpp/.traces/maybe_convert
index c87f4aec..d3713988 100644
--- a/cpp/.traces/maybe_convert
+++ b/cpp/.traces/maybe_convert
@@ -16,6 +16,7 @@ after-brace/0: copy ...
 after-brace/0: copy ...
 after-brace/0: copy ...
 after-brace/0: maybe-convert ...
+schedule/0: main
 run/0: instruction main/0
 run/0: ingredient 0 is 1
 mem/0: storing 1 in location 12
diff --git a/cpp/.traces/maybe_convert_fail b/cpp/.traces/maybe_convert_fail
index 33666c95..32add5a2 100644
--- a/cpp/.traces/maybe_convert_fail
+++ b/cpp/.traces/maybe_convert_fail
@@ -16,6 +16,7 @@ after-brace/0: copy ...
 after-brace/0: copy ...
 after-brace/0: copy ...
 after-brace/0: maybe-convert ...
+schedule/0: main
 run/0: instruction main/0
 run/0: ingredient 0 is 1
 mem/0: storing 1 in location 12
diff --git a/cpp/.traces/maybe_convert_named b/cpp/.traces/maybe_convert_named
index eba8aa6a..4212bee1 100644
--- a/cpp/.traces/maybe_convert_named
+++ b/cpp/.traces/maybe_convert_named
@@ -17,6 +17,7 @@ after-brace/0: copy ...
 after-brace/0: copy ...
 after-brace/0: copy ...
 after-brace/0: maybe-convert ...
+schedule/0: main
 run/0: instruction main/0
 run/0: ingredient 0 is 1
 mem/0: storing 1 in location 12
diff --git a/cpp/.traces/multiply b/cpp/.traces/multiply
index 438ec231..0fb8fcad 100644
--- a/cpp/.traces/multiply
+++ b/cpp/.traces/multiply
@@ -12,6 +12,7 @@ after-brace/0: recipe main
 after-brace/0: copy ...
 after-brace/0: copy ...
 after-brace/0: multiply ...
+schedule/0: main
 run/0: instruction main/0
 run/0: ingredient 0 is 4
 mem/0: storing 4 in location 1
diff --git a/cpp/.traces/multiply_literal b/cpp/.traces/multiply_literal
index 7bbcfb3a..cd8dab52 100644
--- a/cpp/.traces/multiply_literal
+++ b/cpp/.traces/multiply_literal
@@ -4,6 +4,7 @@ parse/0:   ingredient: {name: "3", value: 0, type: 0, properties: ["3": "literal
 parse/0:   product: {name: "1", value: 0, type: 1, properties: ["1": "integer"]}
 after-brace/0: recipe main
 after-brace/0: multiply ...
+schedule/0: main
 run/0: instruction main/0
 run/0: ingredient 0 is 2
 run/0: ingredient 1 is 3
diff --git a/cpp/.traces/new b/cpp/.traces/new
index 3f16daba..74456706 100644
--- a/cpp/.traces/new
+++ b/cpp/.traces/new
@@ -1,7 +1,7 @@
-parse/0: instruction: 35
+parse/0: instruction: 36
 parse/0:   ingredient: {name: "integer", value: 0, type: 0, properties: ["integer": "type"]}
 parse/0:   product: {name: "1", value: 0, type: 2-1, properties: ["1": "address":"integer", "raw": ]}
-parse/0: instruction: 35
+parse/0: instruction: 36
 parse/0:   ingredient: {name: "integer", value: 0, type: 0, properties: ["integer": "type"]}
 parse/0:   product: {name: "2", value: 0, type: 2-1, properties: ["2": "address":"integer", "raw": ]}
 parse/0: instruction: 13
@@ -14,6 +14,7 @@ after-brace/0: recipe main
 after-brace/0: new ...
 after-brace/0: new ...
 after-brace/0: equal ...
+schedule/0: main
 run/0: instruction main/0
 mem/0: new alloc: 1000
 mem/0: storing 1000 in location 1
diff --git a/cpp/.traces/new_array b/cpp/.traces/new_array
index 6f818ed7..42cd5b71 100644
--- a/cpp/.traces/new_array
+++ b/cpp/.traces/new_array
@@ -1,8 +1,8 @@
-parse/0: instruction: 35
+parse/0: instruction: 36
 parse/0:   ingredient: {name: "integer", value: 0, type: 0, properties: ["integer": "type"]}
 parse/0:   ingredient: {name: "5", value: 0, type: 0, properties: ["5": "literal"]}
 parse/0:   product: {name: "1", value: 0, type: 2-5-1, properties: ["1": "address":"array":"integer", "raw": ]}
-parse/0: instruction: 35
+parse/0: instruction: 36
 parse/0:   ingredient: {name: "integer", value: 0, type: 0, properties: ["integer": "type"]}
 parse/0:   product: {name: "2", value: 0, type: 2-1, properties: ["2": "address":"integer", "raw": ]}
 parse/0: instruction: 3
@@ -15,6 +15,7 @@ after-brace/0: recipe main
 after-brace/0: new ...
 after-brace/0: new ...
 after-brace/0: subtract ...
+schedule/0: main
 run/0: instruction main/0
 mem/0: new alloc: 1000
 mem/0: storing 1000 in location 1
diff --git a/cpp/.traces/new_string b/cpp/.traces/new_string
index aa944a2c..7cfe2807 100644
--- a/cpp/.traces/new_string
+++ b/cpp/.traces/new_string
@@ -1,4 +1,4 @@
-parse/0: instruction: 35
+parse/0: instruction: 36
 parse/0:   ingredient: {name: "abc def", value: 0, type: 0, properties: ["abc def": "literal-string"]}
 parse/0:   product: {name: "1", value: 0, type: 2-5-4, properties: ["1": "address":"array":"character"]}
 parse/0: instruction: 21
@@ -9,6 +9,7 @@ new/0: abc def -> 0
 after-brace/0: recipe main
 after-brace/0: new ...
 after-brace/0: index ...
+schedule/0: main
 run/0: instruction main/0
 mem/0: storing 1000 in location 1
 run/0: instruction main/1
diff --git a/cpp/.traces/next_ingredient b/cpp/.traces/next_ingredient
index 0d6c4bb8..bc373bc9 100644
--- a/cpp/.traces/next_ingredient
+++ b/cpp/.traces/next_ingredient
@@ -11,6 +11,7 @@ after-brace/0: f ...
 after-brace/0: recipe f
 after-brace/0: next-ingredient ...
 after-brace/0: add ...
+schedule/0: main
 run/0: instruction main/0
 run/0: instruction f/0
 run/0: product 0 is 2
diff --git a/cpp/.traces/next_ingredient_missing b/cpp/.traces/next_ingredient_missing
index 385f047b..f6c2c373 100644
--- a/cpp/.traces/next_ingredient_missing
+++ b/cpp/.traces/next_ingredient_missing
@@ -6,6 +6,7 @@ after-brace/0: recipe main
 after-brace/0: f ...
 after-brace/0: recipe f
 after-brace/0: next-ingredient ...
+schedule/0: main
 run/0: instruction main/0
 run/0: instruction f/0
 mem/0: storing 0 in location 12
diff --git a/cpp/.traces/not b/cpp/.traces/not
index ed2222e6..102532be 100644
--- a/cpp/.traces/not
+++ b/cpp/.traces/not
@@ -7,6 +7,7 @@ parse/0:   product: {name: "2", value: 0, type: 1, properties: ["2": "integer"]}
 after-brace/0: recipe main
 after-brace/0: copy ...
 after-brace/0: not ...
+schedule/0: main
 run/0: instruction main/0
 run/0: ingredient 0 is 1
 mem/0: storing 1 in location 1
diff --git a/cpp/.traces/or b/cpp/.traces/or
index c11ba07a..3f1141ad 100644
--- a/cpp/.traces/or
+++ b/cpp/.traces/or
@@ -12,6 +12,7 @@ after-brace/0: recipe main
 after-brace/0: copy ...
 after-brace/0: copy ...
 after-brace/0: or ...
+schedule/0: main
 run/0: instruction main/0
 run/0: ingredient 0 is 1
 mem/0: storing 1 in location 1
diff --git a/cpp/.traces/reply b/cpp/.traces/reply
index 566299b7..031ad1d9 100644
--- a/cpp/.traces/reply
+++ b/cpp/.traces/reply
@@ -17,6 +17,7 @@ after-brace/0: recipe f
 after-brace/0: next-ingredient ...
 after-brace/0: add ...
 after-brace/0: reply ...
+schedule/0: main
 run/0: instruction main/0
 run/0: instruction f/0
 run/0: product 0 is 2
diff --git a/cpp/.traces/reply_container b/cpp/.traces/reply_container
index 10cc9548..9da05c78 100644
--- a/cpp/.traces/reply_container
+++ b/cpp/.traces/reply_container
@@ -14,6 +14,7 @@ after-brace/0: recipe f
 after-brace/0: next-ingredient ...
 after-brace/0: copy ...
 after-brace/0: reply ...
+schedule/0: main
 run/0: instruction main/0
 run/0: instruction f/0
 run/0: product 0 is 2
diff --git a/cpp/.traces/return_on_fallthrough b/cpp/.traces/return_on_fallthrough
index d7ac00e1..86885f52 100644
--- a/cpp/.traces/return_on_fallthrough
+++ b/cpp/.traces/return_on_fallthrough
@@ -22,6 +22,7 @@ after-brace/0: copy ...
 after-brace/0: recipe f
 after-brace/0: copy ...
 after-brace/0: copy ...
+schedule/0: main
 run/0: instruction main/0
 run/0: instruction f/0
 run/0: ingredient 0 is 34
diff --git a/cpp/.traces/rewind_ingredients b/cpp/.traces/rewind_ingredients
index ed1bff38..c3ba2764 100644
--- a/cpp/.traces/rewind_ingredients
+++ b/cpp/.traces/rewind_ingredients
@@ -16,6 +16,7 @@ after-brace/0: next-ingredient ...
 after-brace/0: next-ingredient ...
 after-brace/0: rewind-ingredients ...
 after-brace/0: next-ingredient ...
+schedule/0: main
 run/0: instruction main/0
 run/0: instruction f/0
 run/0: product 0 is 2
diff --git a/cpp/.traces/run b/cpp/.traces/run
new file mode 100644
index 00000000..314de883
--- /dev/null
+++ b/cpp/.traces/run
@@ -0,0 +1,23 @@
+parse/0: instruction: 29
+parse/0:   ingredient: {name: "f2", value: 0, type: 0, properties: ["f2": "recipe"]}
+parse/0: instruction: 1
+parse/0:   ingredient: {name: "3", value: 0, type: 0, properties: ["3": "literal"]}
+parse/0:   product: {name: "1", value: 0, type: 1, properties: ["1": "integer"]}
+parse/0: instruction: 1
+parse/0:   ingredient: {name: "4", value: 0, type: 0, properties: ["4": "literal"]}
+parse/0:   product: {name: "2", value: 0, type: 1, properties: ["2": "integer"]}
+after-brace/0: recipe f1
+after-brace/0: run ...
+after-brace/0: copy ...
+after-brace/0: recipe f2
+after-brace/0: copy ...
+schedule/0: f1
+run/0: instruction f1/0
+run/0: ingredient 0 is f2
+run/0: instruction f1/1
+run/0: ingredient 0 is 3
+mem/0: storing 3 in location 1
+schedule/0: f2
+run/0: instruction f2/0
+run/0: ingredient 0 is 4
+mem/0: storing 4 in location 2
diff --git a/cpp/.traces/run_dummy b/cpp/.traces/run_dummy
index a64f4467..2d0d0ed4 100644
--- a/cpp/.traces/run_dummy
+++ b/cpp/.traces/run_dummy
@@ -3,5 +3,6 @@ parse/0:   ingredient: {name: "0", value: 0, type: 0, properties: ["0": "literal
 parse/0:   product: {name: "_", value: 0, type: 0, properties: ["_": "dummy"]}
 after-brace/0: recipe main
 after-brace/0: copy ...
+schedule/0: main
 run/0: instruction main/0
 run/0: ingredient 0 is 0
diff --git a/cpp/.traces/run_label b/cpp/.traces/run_label
index 0b2103ad..2db7f731 100644
--- a/cpp/.traces/run_label
+++ b/cpp/.traces/run_label
@@ -8,6 +8,7 @@ parse/0:   product: {name: "2", value: 0, type: 1, properties: ["2": "integer"]}
 after-brace/0: recipe main
 after-brace/0: copy ...
 after-brace/0: copy ...
+schedule/0: main
 run/0: instruction main/1
 run/0: ingredient 0 is 23
 mem/0: storing 23 in location 1
diff --git a/cpp/.traces/set_default_space b/cpp/.traces/set_default_space
index d1369f9e..aa54db6c 100644
--- a/cpp/.traces/set_default_space
+++ b/cpp/.traces/set_default_space
@@ -11,6 +11,7 @@ after-brace/0: recipe main
 after-brace/0: copy ...
 after-brace/0: copy ...
 after-brace/0: copy ...
+schedule/0: main
 run/0: instruction main/0
 run/0: ingredient 0 is 5
 mem/0: storing 5 in location 10
diff --git a/cpp/.traces/store_indirect b/cpp/.traces/store_indirect
index 546ad01f..f33b6b3b 100644
--- a/cpp/.traces/store_indirect
+++ b/cpp/.traces/store_indirect
@@ -7,6 +7,7 @@ parse/0:   product: {name: "1", value: 0, type: 2-1, properties: ["1": "address"
 after-brace/0: recipe main
 after-brace/0: copy ...
 after-brace/0: copy ...
+schedule/0: main
 run/0: instruction main/0
 run/0: ingredient 0 is 2
 mem/0: storing 2 in location 1
diff --git a/cpp/.traces/string-append-1 b/cpp/.traces/string-append-1
index a9e62305..f8da656b 100644
--- a/cpp/.traces/string-append-1
+++ b/cpp/.traces/string-append-1
@@ -1,7 +1,7 @@
-parse/0: instruction: 35
+parse/0: instruction: 36
 parse/0:   ingredient: {name: "hello,", value: 0, type: 0, properties: ["hello,": "literal-string"]}
 parse/0:   product: {name: "1", value: 0, type: 2-5-4, properties: ["1": "address":"array":"character", "raw": ]}
-parse/0: instruction: 35
+parse/0: instruction: 36
 parse/0:   ingredient: {name: " world!", value: 0, type: 0, properties: [" world!": "literal-string"]}
 parse/0:   product: {name: "2", value: 0, type: 2-5-4, properties: ["2": "address":"array":"character", "raw": ]}
 parse/0: instruction: 106
@@ -18,6 +18,7 @@ after-brace/0: new ...
 after-brace/0: new ...
 after-brace/0: string-append ...
 after-brace/0: copy ...
+schedule/0: test-string-append-1
 run/0: instruction test-string-append-1/0
 mem/0: storing 1000 in location 1
 run/0: instruction test-string-append-1/1
diff --git a/cpp/.traces/string-equal-common-lengths-but-distinct b/cpp/.traces/string-equal-common-lengths-but-distinct
index e6d5ecc9..a236c928 100644
--- a/cpp/.traces/string-equal-common-lengths-but-distinct
+++ b/cpp/.traces/string-equal-common-lengths-but-distinct
@@ -1,11 +1,11 @@
-parse/0: instruction: 35
+parse/0: instruction: 36
 parse/0:   ingredient: {name: "location", value: 0, type: 0, properties: ["location": "type"]}
 parse/0:   ingredient: {name: "30", value: 0, type: 0, properties: ["30": "literal"]}
 parse/0:   product: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]}
-parse/0: instruction: 35
+parse/0: instruction: 36
 parse/0:   ingredient: {name: "abc", value: 0, type: 0, properties: ["abc": "literal-string"]}
 parse/0:   product: {name: "x", value: 0, type: 2-5-4, properties: ["x": "address":"array":"character"]}
-parse/0: instruction: 35
+parse/0: instruction: 36
 parse/0:   ingredient: {name: "abd", value: 0, type: 0, properties: ["abd": "literal-string"]}
 parse/0:   product: {name: "y", value: 0, type: 2-5-4, properties: ["y": "address":"array":"character"]}
 parse/0: instruction: 100
@@ -22,6 +22,7 @@ after-brace/0: new ...
 after-brace/0: new ...
 after-brace/0: new ...
 after-brace/0: string-equal ...
+schedule/0: test-string-equal-common-lengths-but-distinct
 run/0: instruction test-string-equal-common-lengths-but-distinct/0
 mem/0: new alloc: 1000
 mem/0: array size is 30
diff --git a/cpp/.traces/string-equal-distinct-lengths b/cpp/.traces/string-equal-distinct-lengths
index 0d8e4a43..38c09b9e 100644
--- a/cpp/.traces/string-equal-distinct-lengths
+++ b/cpp/.traces/string-equal-distinct-lengths
@@ -1,11 +1,11 @@
-parse/0: instruction: 35
+parse/0: instruction: 36
 parse/0:   ingredient: {name: "location", value: 0, type: 0, properties: ["location": "type"]}
 parse/0:   ingredient: {name: "30", value: 0, type: 0, properties: ["30": "literal"]}
 parse/0:   product: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]}
-parse/0: instruction: 35
+parse/0: instruction: 36
 parse/0:   ingredient: {name: "abc", value: 0, type: 0, properties: ["abc": "literal-string"]}
 parse/0:   product: {name: "x", value: 0, type: 2-5-4, properties: ["x": "address":"array":"character"]}
-parse/0: instruction: 35
+parse/0: instruction: 36
 parse/0:   ingredient: {name: "abcd", value: 0, type: 0, properties: ["abcd": "literal-string"]}
 parse/0:   product: {name: "y", value: 0, type: 2-5-4, properties: ["y": "address":"array":"character"]}
 parse/0: instruction: 100
@@ -22,6 +22,7 @@ after-brace/0: new ...
 after-brace/0: new ...
 after-brace/0: new ...
 after-brace/0: string-equal ...
+schedule/0: test-string-equal-distinct-lengths
 run/0: instruction test-string-equal-distinct-lengths/0
 mem/0: new alloc: 1000
 mem/0: array size is 30
diff --git a/cpp/.traces/string-equal-identical b/cpp/.traces/string-equal-identical
index 1466e0d2..a392ec0c 100644
--- a/cpp/.traces/string-equal-identical
+++ b/cpp/.traces/string-equal-identical
@@ -1,11 +1,11 @@
-parse/0: instruction: 35
+parse/0: instruction: 36
 parse/0:   ingredient: {name: "location", value: 0, type: 0, properties: ["location": "type"]}
 parse/0:   ingredient: {name: "30", value: 0, type: 0, properties: ["30": "literal"]}
 parse/0:   product: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]}
-parse/0: instruction: 35
+parse/0: instruction: 36
 parse/0:   ingredient: {name: "abc", value: 0, type: 0, properties: ["abc": "literal-string"]}
 parse/0:   product: {name: "x", value: 0, type: 2-5-4, properties: ["x": "address":"array":"character"]}
-parse/0: instruction: 35
+parse/0: instruction: 36
 parse/0:   ingredient: {name: "abc", value: 0, type: 0, properties: ["abc": "literal-string"]}
 parse/0:   product: {name: "y", value: 0, type: 2-5-4, properties: ["y": "address":"array":"character"]}
 parse/0: instruction: 100
@@ -22,6 +22,7 @@ after-brace/0: new ...
 after-brace/0: new ...
 after-brace/0: new ...
 after-brace/0: string-equal ...
+schedule/0: test-string-equal-identical
 run/0: instruction test-string-equal-identical/0
 mem/0: new alloc: 1000
 mem/0: array size is 30
diff --git a/cpp/.traces/string-equal-reflexive b/cpp/.traces/string-equal-reflexive
index b4334fef..86f4ac0e 100644
--- a/cpp/.traces/string-equal-reflexive
+++ b/cpp/.traces/string-equal-reflexive
@@ -1,8 +1,8 @@
-parse/0: instruction: 35
+parse/0: instruction: 36
 parse/0:   ingredient: {name: "location", value: 0, type: 0, properties: ["location": "type"]}
 parse/0:   ingredient: {name: "30", value: 0, type: 0, properties: ["30": "literal"]}
 parse/0:   product: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]}
-parse/0: instruction: 35
+parse/0: instruction: 36
 parse/0:   ingredient: {name: "abc", value: 0, type: 0, properties: ["abc": "literal-string"]}
 parse/0:   product: {name: "x", value: 0, type: 2-5-4, properties: ["x": "address":"array":"character"]}
 parse/0: instruction: 100
@@ -16,6 +16,7 @@ after-brace/0: recipe test-string-equal-reflexive
 after-brace/0: new ...
 after-brace/0: new ...
 after-brace/0: string-equal ...
+schedule/0: test-string-equal-reflexive
 run/0: instruction test-string-equal-reflexive/0
 mem/0: new alloc: 1000
 mem/0: array size is 30
diff --git a/cpp/.traces/string-equal-with-empty b/cpp/.traces/string-equal-with-empty
index dd3fe782..1a0e4a44 100644
--- a/cpp/.traces/string-equal-with-empty
+++ b/cpp/.traces/string-equal-with-empty
@@ -1,11 +1,11 @@
-parse/0: instruction: 35
+parse/0: instruction: 36
 parse/0:   ingredient: {name: "location", value: 0, type: 0, properties: ["location": "type"]}
 parse/0:   ingredient: {name: "30", value: 0, type: 0, properties: ["30": "literal"]}
 parse/0:   product: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]}
-parse/0: instruction: 35
+parse/0: instruction: 36
 parse/0:   ingredient: {name: "", value: 0, type: 0, properties: ["": "literal-string"]}
 parse/0:   product: {name: "x", value: 0, type: 2-5-4, properties: ["x": "address":"array":"character"]}
-parse/0: instruction: 35
+parse/0: instruction: 36
 parse/0:   ingredient: {name: "abcd", value: 0, type: 0, properties: ["abcd": "literal-string"]}
 parse/0:   product: {name: "y", value: 0, type: 2-5-4, properties: ["y": "address":"array":"character"]}
 parse/0: instruction: 100
@@ -22,6 +22,7 @@ after-brace/0: new ...
 after-brace/0: new ...
 after-brace/0: new ...
 after-brace/0: string-equal ...
+schedule/0: test-string-equal-with-empty
 run/0: instruction test-string-equal-with-empty/0
 mem/0: new alloc: 1000
 mem/0: array size is 30
diff --git a/cpp/.traces/string_literal b/cpp/.traces/string_literal
index 47954e92..be063bc6 100644
--- a/cpp/.traces/string_literal
+++ b/cpp/.traces/string_literal
@@ -1,3 +1,3 @@
-parse/0: instruction: 35
+parse/0: instruction: 36
 parse/0:   ingredient: {name: "abc def", value: 0, type: 0, properties: ["abc def": "literal-string"]}
 parse/0:   product: {name: "1", value: 0, type: 2-5-4, properties: ["1": "address":"array":"character"]}
diff --git a/cpp/.traces/string_literal_nested b/cpp/.traces/string_literal_nested
index 3609140b..3b22a0d6 100644
--- a/cpp/.traces/string_literal_nested
+++ b/cpp/.traces/string_literal_nested
@@ -1,3 +1,3 @@
-parse/0: instruction: 35
+parse/0: instruction: 36
 parse/0:   ingredient: {name: "abc [def]", value: 0, type: 0, properties: ["abc [def]": "literal-string"]}
 parse/0:   product: {name: "1", value: 0, type: 2-5-4, properties: ["1": "address":"array":"character"]}
diff --git a/cpp/.traces/string_literal_with_colons b/cpp/.traces/string_literal_with_colons
index 520ccf74..95200b73 100644
--- a/cpp/.traces/string_literal_with_colons
+++ b/cpp/.traces/string_literal_with_colons
@@ -1,3 +1,3 @@
-parse/0: instruction: 35
+parse/0: instruction: 36
 parse/0:   ingredient: {name: "abc:def/ghi", value: 0, type: 0, properties: ["abc:def/ghi": "literal-string"]}
 parse/0:   product: {name: "1", value: 0, type: 2-5-4, properties: ["1": "address":"array":"character"]}
diff --git a/cpp/.traces/subtract b/cpp/.traces/subtract
index 2342365e..b02919f8 100644
--- a/cpp/.traces/subtract
+++ b/cpp/.traces/subtract
@@ -12,6 +12,7 @@ after-brace/0: recipe main
 after-brace/0: copy ...
 after-brace/0: copy ...
 after-brace/0: subtract ...
+schedule/0: main
 run/0: instruction main/0
 run/0: ingredient 0 is 23
 mem/0: storing 23 in location 1
diff --git a/cpp/.traces/subtract_literal b/cpp/.traces/subtract_literal
index a1a10250..eef67a32 100644
--- a/cpp/.traces/subtract_literal
+++ b/cpp/.traces/subtract_literal
@@ -4,6 +4,7 @@ parse/0:   ingredient: {name: "2", value: 0, type: 0, properties: ["2": "literal
 parse/0:   product: {name: "1", value: 0, type: 1, properties: ["1": "integer"]}
 after-brace/0: recipe main
 after-brace/0: subtract ...
+schedule/0: main
 run/0: instruction main/0
 run/0: ingredient 0 is 5
 run/0: ingredient 1 is 2
diff --git a/cpp/.traces/surrounding_space b/cpp/.traces/surrounding_space
index 3ff1b951..35991e57 100644
--- a/cpp/.traces/surrounding_space
+++ b/cpp/.traces/surrounding_space
@@ -24,6 +24,7 @@ after-brace/0: copy ...
 after-brace/0: copy ...
 after-brace/0: copy ...
 after-brace/0: copy ...
+schedule/0: main
 run/0: instruction main/0
 run/0: ingredient 0 is 5
 mem/0: storing 5 in location 10
diff --git a/cpp/.traces/trace b/cpp/.traces/trace
index 2ef6ce77..0112ed74 100644
--- a/cpp/.traces/trace
+++ b/cpp/.traces/trace
@@ -3,5 +3,6 @@ parse/0:   ingredient: {name: "foo", value: 0, type: 0, properties: ["foo": "lit
 parse/0:   ingredient: {name: "this is a trace in mu", value: 0, type: 0, properties: ["this is a trace in mu": "literal-string"]}
 after-brace/0: recipe main
 after-brace/0: trace ...
+schedule/0: main
 run/0: instruction main/0
 foo/0: this is a trace in mu
diff --git a/cpp/.traces/trace_in_mu b/cpp/.traces/trace_in_mu
index 1d0be2b2..af8557de 100644
--- a/cpp/.traces/trace_in_mu
+++ b/cpp/.traces/trace_in_mu
@@ -3,5 +3,6 @@ parse/0:   ingredient: {name: "foo", value: 0, type: 0, properties: ["foo": "lit
 parse/0:   ingredient: {name: "aaa", value: 0, type: 0, properties: ["aaa": "literal-string"]}
 after-brace/0: recipe test-trace_in_mu
 after-brace/0: trace ...
+schedule/0: test-trace_in_mu
 run/0: instruction test-trace_in_mu/0
 foo/0: aaa
diff --git a/cpp/038scheduler b/cpp/038scheduler
index 08be7821..7645a315 100644
--- a/cpp/038scheduler
+++ b/cpp/038scheduler
@@ -1,17 +1,19 @@
-//: Run multiple routines concurrently, without any guarantees on how the
-//: operations in each are interleaved with each other.
+//: Run a second routine concurrently using fork, without any guarantees on
+//: how the operations in each are interleaved with each other.
 
-:(before "End Globals")
-size_t Scheduling_interval = 500;
+:(scenario run)
+recipe f1 [
+  run f2:recipe
+  1:integer <- copy 3:literal
+]
+recipe f2 [
+  2:integer <- copy 4:literal
+]
++schedule: f1
++schedule: f2
 
-//: first, add a deadline to run()
-//: todo: these changes are ugly and brittle
-:(replace{} "void run(recipe_number r)")
-void run(recipe_number r) {
-  routine rr(r);
-  Current_routine = &rr;
-  run_current_routine(Scheduling_interval);
-}
+//: first, add a deadline to run(routine)
+//: these changes are ugly and brittle; just close your nose and get through the next few lines
 :(replace "void run_current_routine()")
 void run_current_routine(size_t time_slice)
 :(replace "while (!Current_routine->completed())" following "void run_current_routine(size_t time_slice)")
@@ -19,3 +21,42 @@ size_t ninstrs = 0;
 while (!Current_routine->completed() && ninstrs < time_slice)
 :(after "Running One Instruction")
 ninstrs++;
+
+//: now the rest of the scheduler is clean
+:(before "End Globals")
+list<routine*> Running_routines, Completed_routines;
+size_t Scheduling_interval = 500;
+:(replace{} "void run(recipe_number r)")
+void run(recipe_number r) {
+  Running_routines.push_back(new routine(r));
+  while (!Running_routines.empty()) {
+    Current_routine = Running_routines.front();
+    Running_routines.pop_front();
+    trace("schedule") << current_recipe_name();
+    run_current_routine(Scheduling_interval);
+    if (Current_routine->calls.empty())
+      Completed_routines.push_back(Current_routine);
+    else
+      Running_routines.push_back(Current_routine);
+  }
+}
+
+:(before "End Teardown")
+for (list<routine*>::iterator p = Running_routines.begin(); p != Running_routines.end(); ++p)
+  delete *p;
+Running_routines.clear();
+for (list<routine*>::iterator p = Completed_routines.begin(); p != Completed_routines.end(); ++p)
+  delete *p;
+Completed_routines.clear();
+
+:(before "End Primitive Recipe Declarations")
+RUN,
+:(before "End Primitive Recipe Numbers")
+Recipe_number["run"] = RUN;
+:(before "End Primitive Recipe Implementations")
+case RUN: {
+  trace("run") << "ingredient 0 is " << current_instruction().ingredients[0].name;
+  assert(!current_instruction().ingredients[0].initialized);
+  Running_routines.push_back(new routine(Recipe_number[current_instruction().ingredients[0].name]));
+  break;
+}
diff --git a/cpp/makefile b/cpp/makefile
index aa72de17..d3a64f8d 100644
--- a/cpp/makefile
+++ b/cpp/makefile
@@ -23,7 +23,7 @@ test: mu
 	./mu test
 
 valgrind: mu
-	valgrind -q --leak-check=yes ./mu test
+	valgrind --leak-check=yes -q --error-exitcode=1 ./mu test
 
 # auto-generated files; by convention they end in '_list'.
 autogenerated_lists: mu.cc function_list test_list