|
@@ -200,7 +200,7 @@ class TestPetrinetInterface(unittest.TestCase):
|
|
|
instantiate_node + prompt + \
|
|
|
attr_add + prompt + \
|
|
|
list_model([("p1", "Place")]) + prompt + \
|
|
|
- read_node("p1", "Place", [], [("tokens", "Integer", 5)]) + prompt + \
|
|
|
+ read_node("p1", "Place", [], [("tokens", "Natural", 5)]) + prompt + \
|
|
|
instantiate_node + prompt + \
|
|
|
list_model([("p1", "Place"), ("t1", "Transition")]) + prompt + \
|
|
|
read_node("t1", "Transition", [], []) + prompt,
|
|
@@ -222,11 +222,11 @@ class TestPetrinetInterface(unittest.TestCase):
|
|
|
"read", "t2p",
|
|
|
],
|
|
|
did_instantiate_simple + \
|
|
|
- read_node("p1", "Place", [], [("tokens", "Integer", 5)]) + prompt + \
|
|
|
- read_node("p2", "Place", [], [("tokens", "Integer", 0)]) + prompt + \
|
|
|
+ read_node("p1", "Place", [], [("tokens", "Natural", 5)]) + prompt + \
|
|
|
+ read_node("p2", "Place", [], [("tokens", "Natural", 0)]) + prompt + \
|
|
|
read_node("t1", "Transition", [], []) + prompt + \
|
|
|
- read_edge("p2t", "P2T", "p1", "t1", [], [("weight", "Integer", 2)]) + prompt + \
|
|
|
- read_edge("t2p", "T2P", "t1", "p2", [], [("weight", "Integer", 1)]) + prompt,
|
|
|
+ read_edge("p2t", "P2T", "p1", "t1", [], [("weight", "Natural", 2)]) + prompt + \
|
|
|
+ read_edge("t2p", "T2P", "t1", "p2", [], [("weight", "Natural", 1)]) + prompt,
|
|
|
mode))
|
|
|
|
|
|
def test_po_pn_interface_enabled(self):
|
|
@@ -314,7 +314,7 @@ class TestPetrinetInterface(unittest.TestCase):
|
|
|
def pn_interface_types(self, mode):
|
|
|
self.assertTrue(run_file(all_files,
|
|
|
["new", "PetriNets", "abc", "types"],
|
|
|
- init + new + loaded + list_types([("Place", "Class"), ("Transition", "Class"), ("P2T", "Association"), ("T2P", "Association"), ("Integer", "Class")]),
|
|
|
+ init + new + loaded + list_types([("Place", "Class"), ("Transition", "Class"), ("P2T", "Association"), ("T2P", "Association"), ("Natural", "Class")]),
|
|
|
mode))
|
|
|
|
|
|
def test_po_pn_interface_modify_place(self):
|
|
@@ -331,9 +331,9 @@ class TestPetrinetInterface(unittest.TestCase):
|
|
|
"modify", "p1", "tokens", 1, "read", "p1"],
|
|
|
init + new + loaded + \
|
|
|
instantiate_node + prompt + attr_add + prompt + \
|
|
|
- read_node("p1", "Place", [], [("tokens", "Integer", 5)]) + prompt + \
|
|
|
+ read_node("p1", "Place", [], [("tokens", "Natural", 5)]) + prompt + \
|
|
|
modify + prompt + \
|
|
|
- read_node("p1", "Place", [], [("tokens", "Integer", 1)]) + prompt,
|
|
|
+ read_node("p1", "Place", [], [("tokens", "Natural", 1)]) + prompt,
|
|
|
mode))
|
|
|
|
|
|
def test_po_pn_interface_verify_fail_attr_lower_cardinality(self):
|