about summary refs log tree commit diff stats
path: root/cpp/.traces/channel-write-increments-free
diff options
context:
space:
mode:
authorKartik K. Agaram <vc@akkartik.com>2015-05-02 15:52:22 -0700
committerKartik K. Agaram <vc@akkartik.com>2015-05-02 22:56:13 -0700
commit22b3069272c1a177e814a7c4e769e20858e2b368 (patch)
tree761199b26823fe5ba11af66108e95ece1bc4f02c /cpp/.traces/channel-write-increments-free
parenta316f1e4168a98ba8c1bbe7b091f8a7e7b3f03e6 (diff)
downloadmu-22b3069272c1a177e814a7c4e769e20858e2b368.tar.gz
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.
Diffstat (limited to 'cpp/.traces/channel-write-increments-free')
-rw-r--r--cpp/.traces/channel-write-increments-free59
1 files changed, 52 insertions, 7 deletions
diff --git a/cpp/.traces/channel-write-increments-free b/cpp/.traces/channel-write-increments-free
index 397bd2b9..c1a8362d 100644
--- a/cpp/.traces/channel-write-increments-free
+++ b/cpp/.traces/channel-write-increments-free
@@ -1,3 +1,40 @@
+parse/0: instruction: run
+parse/0:   ingredient: {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
+    3:integer <- get 1:address:channel/deref, first-free:offset
+  ", value: 0, type: 0, properties: ["
+    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
+    3:integer <- get 1:address:channel/deref, first-free:offset
+  ": "literal-string"]}
+parse/0: instruction: memory-should-contain
+parse/0:   ingredient: {name: "
+    2 <- 0  # first-full
+    3 <- 1  # first-free
+  ", value: 0, type: 0, properties: ["
+    2 <- 0  # first-full
+    3 <- 1  # first-free
+  ": "literal-string"]}
+after-brace/0: recipe channel-write-increments-free
+after-brace/0: run ...
+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 {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
+    3:integer <- get 1:address:channel/deref, first-free:offset
+  ", value: 0, type: 0, properties: ["
+    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
+    3:integer <- get 1:address:channel/deref, first-free:offset
+  ": "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"]}
@@ -15,14 +52,12 @@ parse/0:   ingredient: {name: "first-free", value: 0, type: 0, properties: ["fir
 parse/0:   product: {name: "3", value: 0, type: 1, properties: ["3": "integer"]}
 name/0: element first-full of type channel is at offset 0
 name/0: element first-free of type channel is at offset 1
-after-brace/0: recipe test-channel-write-increments-free
+after-brace/0: recipe tmp0
 after-brace/0: init-channel ...
 after-brace/0: write ...
 after-brace/0: get ...
 after-brace/0: get ...
-new/0: routine allocated memory from 1000 to 101000
-schedule/0: test-channel-write-increments-free
-run/0: instruction test-channel-write-increments-free/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"]}
@@ -89,7 +124,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-write-increments-free/1
+run/0: instruction tmp0/1
 run/0: {name: "1", value: 1, type: 2-10, properties: ["1": "address":"channel"]} <- write {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
@@ -272,7 +307,7 @@ run/0: reply {name: "chan", value: 1, type: 2-10, properties: ["chan": "address"
 mem/0: location 1041 is 1031
 run/0: result 0 is 1031
 mem/0: storing 1031 in location 1
-run/0: instruction test-channel-write-increments-free/2
+run/0: instruction tmp0/2
 run/0: {name: "2", value: 2, type: 1, properties: ["2": "integer"]} <- get {name: "1", value: 1, type: 2-10, properties: ["1": "address":"channel", "deref": ]}, {name: "first-full", value: 0, type: 0, properties: ["first-full": "offset"]}
 run/0: ingredient 0 is 1
 mem/0: location 1 is 1031
@@ -282,7 +317,7 @@ run/0: its type is 1
 mem/0: location 1031 is 0
 run/0: product 0 is 0
 mem/0: storing 0 in location 2
-run/0: instruction test-channel-write-increments-free/3
+run/0: instruction tmp0/3
 run/0: {name: "3", value: 3, type: 1, properties: ["3": "integer"]} <- get {name: "1", value: 1, type: 2-10, properties: ["1": "address":"channel", "deref": ]}, {name: "first-free", value: 1, type: 0, properties: ["first-free": "offset"]}
 run/0: ingredient 0 is 1
 mem/0: location 1 is 1031
@@ -292,3 +327,13 @@ run/0: its type is 1
 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 {name: "
+    2 <- 0  # first-full
+    3 <- 1  # first-free
+  ", value: 0, type: 0, properties: ["
+    2 <- 0  # first-full
+    3 <- 1  # first-free
+  ": "literal-string"]}
+run/0: checking location 2
+run/0: checking location 3