From d9a7e6abc7dba8e84a5e80a6593145f1aaeb6f6c Mon Sep 17 00:00:00 2001 From: "Kartik K. Agaram" Date: Sat, 2 May 2015 11:49:11 -0700 Subject: 1239 - scheduler bugfix In the process, some extra unit tests as well. The final scenario is newly fixed. Between the earlier support for '%' escaping C code inside scenarios, and the previous commit, we now actually have the ability to setup the Routines data structure just so to simulate different situations. One unanticipated but happy consequence of ignoring run(""): I can interleave '+' lines with '-' lines to avoid making any ordering assertions between '+' lines. So the '+' lines here are checked in order: +layer1: a +layer3: c But here they will pass even if present out of order: +layer1: a -layer2: b +layer3: c This might be too confusing. In general, relying on run("") is just a temporary hack. It might well have even worse counter-intuitive effects. At least I'm not seeing any string-escaping issues so far. --- cpp/.traces/scheduler_skips_completed_routines | 28 ++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 cpp/.traces/scheduler_skips_completed_routines (limited to 'cpp/.traces/scheduler_skips_completed_routines') diff --git a/cpp/.traces/scheduler_skips_completed_routines b/cpp/.traces/scheduler_skips_completed_routines new file mode 100644 index 00000000..9e609d02 --- /dev/null +++ b/cpp/.traces/scheduler_skips_completed_routines @@ -0,0 +1,28 @@ +parse/0: instruction: copy +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: instruction: copy +parse/0: ingredient: {name: "0", value: 0, type: 0, properties: ["0": "literal"]} +parse/0: product: {name: "2", value: 0, type: 1, properties: ["2": "integer"]} +new/0: routine allocated memory from 1000 to 101000 +new/0: routine allocated memory from 101000 to 201000 +parse/0: instruction: copy +parse/0: ingredient: {name: "0", value: 0, type: 0, properties: ["0": "literal"]} +parse/0: product: {name: "3", value: 0, type: 1, properties: ["3": "integer"]} +after-brace/0: recipe f1 +after-brace/0: copy ... +after-brace/0: recipe f2 +after-brace/0: copy ... +after-brace/0: recipe f3 +after-brace/0: copy ... +new/0: routine allocated memory from 201000 to 301000 +schedule/0: f3 +run/0: instruction f3/0 +run/0: {name: "3", value: 3, type: 1, properties: ["3": "integer"]} <- copy {name: "0", value: 0, type: 0, properties: ["0": "literal"]} +run/0: ingredient 0 is 0 +mem/0: storing 0 in location 3 +schedule/0: f1 +run/0: instruction f1/0 +run/0: {name: "1", value: 1, type: 1, properties: ["1": "integer"]} <- copy {name: "0", value: 0, type: 0, properties: ["0": "literal"]} +run/0: ingredient 0 is 0 +mem/0: storing 0 in location 1 -- cgit 1.4.1-2-gfad0