Scheduler petrinet example
This commit is contained in:
parent
2c64ebda67
commit
87fc7362db
9 changed files with 139 additions and 6 deletions
|
|
@ -0,0 +1,13 @@
|
|||
# A place with no tokens:
|
||||
|
||||
p:RAM_PNPlace
|
||||
ps:RAM_PNPlaceState {
|
||||
RAM_numTokens = `get_value(this) == 0`;
|
||||
}
|
||||
:RAM_pn_of (ps -> p)
|
||||
|
||||
# An incoming arc from that place to our transition:
|
||||
|
||||
t:RAM_PNTransition
|
||||
|
||||
:RAM_arc (p -> t)
|
||||
13
examples/petrinet/operational_semantics/all_inputs.od
Normal file
13
examples/petrinet/operational_semantics/all_inputs.od
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
# A place with no tokens:
|
||||
|
||||
p:RAM_PNPlace
|
||||
ps:RAM_PNPlaceState {
|
||||
RAM_numTokens = `True`;
|
||||
}
|
||||
:RAM_pn_of (ps -> p)
|
||||
|
||||
# An incoming arc from that place to our transition:
|
||||
|
||||
t:RAM_PNTransition
|
||||
|
||||
:RAM_arc (p -> t)
|
||||
13
examples/petrinet/operational_semantics/all_output_places.od
Normal file
13
examples/petrinet/operational_semantics/all_output_places.od
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
# A place with no tokens:
|
||||
|
||||
p:RAM_PNPlace
|
||||
ps:RAM_PNPlaceState {
|
||||
RAM_numTokens = `True`;
|
||||
}
|
||||
:RAM_pn_of (ps -> p)
|
||||
|
||||
# An incoming arc from that place to our transition:
|
||||
|
||||
t:RAM_PNTransition
|
||||
|
||||
:RAM_arc (t -> p)
|
||||
|
|
@ -0,0 +1,13 @@
|
|||
# A place with no tokens:
|
||||
|
||||
p:RAM_PNPlace
|
||||
ps:RAM_PNPlaceState {
|
||||
RAM_numTokens = `set_value(this, get_value(this) + 1)`;
|
||||
}
|
||||
:RAM_pn_of (ps -> p)
|
||||
|
||||
# An incoming arc from that place to our transition:
|
||||
|
||||
t:RAM_PNTransition
|
||||
|
||||
:RAM_arc (t -> p)
|
||||
0
examples/petrinet/operational_semantics/delete_all.od
Normal file
0
examples/petrinet/operational_semantics/delete_all.od
Normal file
|
|
@ -1 +1 @@
|
|||
t:RAM_PNTransition
|
||||
t:RAM_PNTransition
|
||||
|
|
|
|||
1
examples/petrinet/operational_semantics/transition.od
Normal file
1
examples/petrinet/operational_semantics/transition.od
Normal file
|
|
@ -0,0 +1 @@
|
|||
tr:RAM_PNTransition
|
||||
Loading…
Add table
Add a link
Reference in a new issue