|
@@ -677,7 +677,7 @@ Void function action(host_model : Element, name : String, mapping : Element):
|
|
|
constructor_unmark_place_action = get_constructor(code_unmark_place_action)
|
|
|
|
|
|
self.assertTrue(run_file(all_files,
|
|
|
- ["new", "SimpleClassDiagrams", "PetriNets_runtime",
|
|
|
+ ["new", "SimpleClassDiagrams", "PetriNets_Runtime",
|
|
|
"set_inheritance", "Inheritance",
|
|
|
"instantiate", "Class", "Natural",
|
|
|
"instantiate", "Class", "Boolean",
|
|
@@ -691,7 +691,7 @@ Void function action(host_model : Element, name : String, mapping : Element):
|
|
|
"instantiate", "Association", "T2P", "Transition", "Place",
|
|
|
"attr_def", "T2P", "weight", "Natural",
|
|
|
"exit",
|
|
|
- "new", "PetriNets_runtime", "pn",
|
|
|
+ "new", "PetriNets_Runtime", "pn",
|
|
|
"instantiate", "Place", "p1",
|
|
|
"attr_add", "p1", "tokens", 1,
|
|
|
"attr_add", "p1", "executed", False,
|
|
@@ -705,8 +705,8 @@ Void function action(host_model : Element, name : String, mapping : Element):
|
|
|
"instantiate", "P2T", "p2t2", "p2", "t1",
|
|
|
"attr_add", "p2t2", "weight", 1,
|
|
|
"exit",
|
|
|
- "ramify", "PetriNets_runtime",
|
|
|
- "new", "PetriNets_runtime_SCHEDULE", "pn_simulate",
|
|
|
+ "ramify", "PetriNets_Runtime",
|
|
|
+ "new", "PetriNets_Runtime_SCHEDULE", "pn_simulate",
|
|
|
# Rule 1: mark transition to execute
|
|
|
# LHS
|
|
|
"instantiate", "LHS", "lhs_mark",
|
|
@@ -916,13 +916,13 @@ Void function action(host_model : Element, name : String, mapping : Element):
|
|
|
|
|
|
schedule_model = \
|
|
|
"""
|
|
|
- import models/PetriNets_Runtime_Schedule as PN_Transform
|
|
|
+ import models/PetriNets_Runtime_SCHEDULE as PN_Transform
|
|
|
|
|
|
PN_Transform s {
|
|
|
Composite schedule {
|
|
|
- Failure failure {}
|
|
|
- Success success {}
|
|
|
- Atomic mark {
|
|
|
+ {Contains} Failure failure {}
|
|
|
+ {Contains} Success success {}
|
|
|
+ {Contains} Atomic mark {
|
|
|
LHS {
|
|
|
Pre_Transition {
|
|
|
label = "1"
|
|
@@ -958,7 +958,7 @@ Void function action(host_model : Element, name : String, mapping : Element):
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
- Atomic consume {
|
|
|
+ {Contains} Atomic consume {
|
|
|
LHS {
|
|
|
Pre_Transition {
|
|
|
label = "0"
|
|
@@ -1010,7 +1010,7 @@ Void function action(host_model : Element, name : String, mapping : Element):
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
- Atomic produce {
|
|
|
+ {Contains} Atomic produce {
|
|
|
LHS {
|
|
|
Pre_Transition {
|
|
|
label = "0"
|
|
@@ -1062,7 +1062,7 @@ Void function action(host_model : Element, name : String, mapping : Element):
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
- Atomic unmark_transition {
|
|
|
+ {Contains} Atomic unmark_transition {
|
|
|
LHS {
|
|
|
Pre_Transition {
|
|
|
label = "0"
|
|
@@ -1089,7 +1089,7 @@ Void function action(host_model : Element, name : String, mapping : Element):
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
- Atomic unmark_place {
|
|
|
+ {Contains} Atomic unmark_place {
|
|
|
LHS {
|
|
|
Pre_Place {
|
|
|
label = "0"
|
|
@@ -1116,16 +1116,16 @@ Void function action(host_model : Element, name : String, mapping : Element):
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
- OnSuccess (mark, consume) {}
|
|
|
- OnFailure (mark, failure) {}
|
|
|
- OnSuccess (consume, consume) {}
|
|
|
- OnFailure (consume, produce) {}
|
|
|
- OnSuccess (produce, produce) {}
|
|
|
- OnFailure (produce, unmark_transition) {}
|
|
|
- OnSuccess (unmark_transition, unmark_place) {}
|
|
|
- OnFailure (unmark_transition, failure) {}
|
|
|
- OnSuccess (unmark_place, unmark_place) {}
|
|
|
- OnFailure (unmark_place, success) {}
|
|
|
+ {Contains} OnSuccess (mark, consume) {}
|
|
|
+ {Contains} OnFailure (mark, failure) {}
|
|
|
+ {Contains} OnSuccess (consume, consume) {}
|
|
|
+ {Contains} OnFailure (consume, produce) {}
|
|
|
+ {Contains} OnSuccess (produce, produce) {}
|
|
|
+ {Contains} OnFailure (produce, unmark_transition) {}
|
|
|
+ {Contains} OnSuccess (unmark_transition, unmark_place) {}
|
|
|
+ {Contains} OnFailure (unmark_transition, failure) {}
|
|
|
+ {Contains} OnSuccess (unmark_place, unmark_place) {}
|
|
|
+ {Contains} OnFailure (unmark_place, success) {}
|
|
|
initial = !mark
|
|
|
}
|
|
|
}
|
|
@@ -1136,7 +1136,7 @@ Void function action(host_model : Element, name : String, mapping : Element):
|
|
|
self.assertTrue(run_file(all_files,
|
|
|
get_model_constructor(PN_runtime) + \
|
|
|
get_model_constructor(PN_model) + [
|
|
|
- "ramify", "PetriNets_runtime",
|
|
|
+ "ramify", "PetriNets_Runtime",
|
|
|
] + get_model_constructor(schedule_model) + [
|
|
|
"transform", "pn", "pn_simulate",
|
|
|
"load", "pn",
|