A fully working version of the scheduling language with added examples
This commit is contained in:
parent
ec42f74960
commit
ebfd85a666
126 changed files with 7235 additions and 981 deletions
31
transformation/schedule/Tests/models/mm_petrinet.od
Normal file
31
transformation/schedule/Tests/models/mm_petrinet.od
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
# Places, transitions, arcs (and only one kind of arc)
|
||||
|
||||
PNConnectable:Class { abstract = True; }
|
||||
|
||||
arc:Association (PNConnectable -> PNConnectable)
|
||||
|
||||
PNPlace:Class
|
||||
PNTransition:Class
|
||||
|
||||
# inhibitor arc
|
||||
inh_arc:Association (PNPlace -> PNTransition)
|
||||
|
||||
:Inheritance (PNPlace -> PNConnectable)
|
||||
:Inheritance (PNTransition -> PNConnectable)
|
||||
|
||||
# A place has a number of tokens, and that's it.
|
||||
|
||||
PNPlaceState:Class
|
||||
PNPlaceState_numTokens:AttributeLink (PNPlaceState -> Integer) {
|
||||
name = "numTokens";
|
||||
optional = False;
|
||||
constraint = `"numTokens cannot be negative" if get_value(get_target(this)) < 0 else None`;
|
||||
}
|
||||
|
||||
pn_of:Association (PNPlaceState -> PNPlace) {
|
||||
# one-to-one
|
||||
source_lower_cardinality = 1;
|
||||
source_upper_cardinality = 1;
|
||||
target_lower_cardinality = 1;
|
||||
target_upper_cardinality = 1;
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue