Skip to content

Commit ce825c9

Browse files
committed
Rename nets and transitions for clarity. #176
1 parent 952f7a2 commit ce825c9

File tree

1 file changed

+12
-12
lines changed

1 file changed

+12
-12
lines changed

stbx-core/test/Statebox/Core/Execution.purs

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -29,39 +29,39 @@ suite = do
2929
-- |
3030
-- | = [],[1],[1],[]. { [] encodes empty sets of pre- and post places }
3131
-- | \____/ \____/
32-
-- | x y
32+
-- | t u
3333
-- | _ _
34-
-- | = [_]->(1)->[_] { x,y are transitions labeled by the 'names' field }
35-
-- | x y
34+
-- | = [_]->(1)->[_] { t,u are transitions labeled by the 'names' field }
35+
-- | t u
3636
-- | ```
3737
-- |
38-
-- | We label this net as 's' and 't', and glue it together into s&t:
38+
-- | We label this net as 'n' and 'm', and glue it together into n&m:
3939
-- |
4040
-- | ```
41-
-- | s = t =
41+
-- | n = m =
4242
-- | _ _ _ _
4343
-- | |_|-(1)-|_| |_|-(1)-|_|
44-
-- | x y x y
44+
-- | t u t u
4545
-- |
4646
-- | | | \_______/ | |
4747
-- | | | | | |
4848
-- | V V V V V
4949
-- | _ _________ _
5050
-- | |_|-(1)-|_________|-(1)-|_|
51-
-- | s.x s.1 x&y t.1 t.y
51+
-- | n.t n.1 u&t m.1 m.u
5252
-- | ```
5353
wiring :: Wiring
5454
wiring =
5555
{ nets: [ { name: "a"
5656
, partition: [0,1,0,1,0,0]
57-
, names: ["x","y"]
57+
, names: ["t","u"]
5858
-- , placeNames: Nothing
5959
}
6060
]
6161
, diagrams: [ { name: "z"
6262
, width: 1
6363
, pixels: [1,2]
64-
, names: ["s","t"]
64+
, names: ["m","n"]
6565
}
6666
]
6767
, labels: [0,0]
@@ -91,9 +91,9 @@ suite = do
9191
firing1 = spy "firing 1" $ fromGluedTransition2JS <$> Stbx.getFiring s0 (GluedTransitionId 1)
9292
firing2 = spy "firing 2" $ fromGluedTransition2JS <$> Stbx.getFiring s0 (GluedTransitionId 2)
9393

94-
firing2 `shouldEqual` Just { pre: [ [ 1 ], [] ], post: "y" }
95-
firing1 `shouldEqual` Just { pre: [ [ 1 ], [ 1 ] ], post: "y&x" }
96-
firing0 `shouldEqual` Just { pre: [ [] , [ 1 ] ], post: "x" }
94+
firing2 `shouldEqual` Just { pre: [ [ 1 ], [] ], post: "u" }
95+
firing1 `shouldEqual` Just { pre: [ [ 1 ], [ 1 ] ], post: "u&t" }
96+
firing0 `shouldEqual` Just { pre: [ [] , [ 1 ] ], post: "t" }
9797

9898
it "should be well-behaved at non-existing transitions" do
9999
let

0 commit comments

Comments
 (0)