From 22b3069272c1a177e814a7c4e769e20858e2b368 Mon Sep 17 00:00:00 2001 From: "Kartik K. Agaram" Date: Sat, 2 May 2015 15:52:22 -0700 Subject: 1242 - simpler implementation for 'scenario' Also now has the side effect that scenarios can have any number of 'run' or check or any future blocks, in any order. --- cpp/.traces/channel-new-empty-not-full | 53 ++++++++++++++++++++++++++++++---- 1 file changed, 47 insertions(+), 6 deletions(-) (limited to 'cpp/.traces/channel-new-empty-not-full') diff --git a/cpp/.traces/channel-new-empty-not-full b/cpp/.traces/channel-new-empty-not-full index 74584d36..b852e4f6 100644 --- a/cpp/.traces/channel-new-empty-not-full +++ b/cpp/.traces/channel-new-empty-not-full @@ -1,3 +1,36 @@ +parse/0: instruction: run +parse/0: ingredient: {name: " + 1:address:channel <- init-channel 3:literal/capacity + 2:integer <- channel-empty? 1:address:channel + 3:integer <- channel-full? 1:address:channel + ", value: 0, type: 0, properties: [" + 1:address:channel <- init-channel 3:literal/capacity + 2:integer <- channel-empty? 1:address:channel + 3:integer <- channel-full? 1:address:channel + ": "literal-string"]} +parse/0: instruction: memory-should-contain +parse/0: ingredient: {name: " + 2 <- 1 # empty? + 3 <- 0 # full? + ", value: 0, type: 0, properties: [" + 2 <- 1 # empty? + 3 <- 0 # full? + ": "literal-string"]} +after-brace/0: recipe channel-new-empty-not-full +after-brace/0: run ... +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 {name: " + 1:address:channel <- init-channel 3:literal/capacity + 2:integer <- channel-empty? 1:address:channel + 3:integer <- channel-full? 1:address:channel + ", value: 0, type: 0, properties: [" + 1:address:channel <- init-channel 3:literal/capacity + 2:integer <- channel-empty? 1:address:channel + 3:integer <- channel-full? 1:address:channel + ": "literal-string"]} parse/0: instruction: init-channel parse/0: ingredient: {name: "3", value: 0, type: 0, properties: ["3": "literal", "capacity": ]} parse/0: product: {name: "1", value: 0, type: 2-10, properties: ["1": "address":"channel"]} @@ -7,13 +40,11 @@ parse/0: product: {name: "2", value: 0, type: 1, properties: ["2": "integer"]} parse/0: instruction: channel-full? parse/0: ingredient: {name: "1", value: 0, type: 2-10, properties: ["1": "address":"channel"]} parse/0: product: {name: "3", value: 0, type: 1, properties: ["3": "integer"]} -after-brace/0: recipe test-channel-new-empty-not-full +after-brace/0: recipe tmp0 after-brace/0: init-channel ... after-brace/0: channel-empty? ... after-brace/0: channel-full? ... -new/0: routine allocated memory from 1000 to 101000 -schedule/0: test-channel-new-empty-not-full -run/0: instruction test-channel-new-empty-not-full/0 +run/0: instruction tmp0/0 run/0: {name: "1", value: 1, type: 2-10, properties: ["1": "address":"channel"]} <- init-channel {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 {name: "location", value: 1, type: 0, properties: ["location": "type"]}, {name: "30", value: 30, type: 0, properties: ["30": "literal"]} @@ -80,7 +111,7 @@ run/0: reply {name: "result", value: 1, type: 2-10, properties: ["result": "addr mem/0: location 1002 is 1031 run/0: result 0 is 1031 mem/0: storing 1031 in location 1 -run/0: instruction test-channel-new-empty-not-full/1 +run/0: instruction tmp0/1 run/0: {name: "2", value: 2, type: 1, properties: ["2": "integer"]} <- channel-empty? {name: "1", value: 1, type: 2-10, properties: ["1": "address":"channel"]} mem/0: location 1 is 1031 run/0: instruction channel-empty?/0 @@ -124,7 +155,7 @@ run/0: reply {name: "result", value: 4, type: 3, properties: ["result": "boolean mem/0: location 1044 is 1 run/0: result 0 is 1 mem/0: storing 1 in location 2 -run/0: instruction test-channel-new-empty-not-full/2 +run/0: instruction tmp0/2 run/0: {name: "3", value: 3, type: 1, properties: ["3": "integer"]} <- channel-full? {name: "1", value: 1, type: 2-10, properties: ["1": "address":"channel"]} mem/0: location 1 is 1031 run/0: instruction channel-full?/0 @@ -219,3 +250,13 @@ run/0: reply {name: "result", value: 6, type: 3, properties: ["result": "boolean 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 {name: " + 2 <- 1 # empty? + 3 <- 0 # full? + ", value: 0, type: 0, properties: [" + 2 <- 1 # empty? + 3 <- 0 # full? + ": "literal-string"]} +run/0: checking location 2 +run/0: checking location 3 -- cgit 1.4.1-2-gfad0