16 lines
No EOL
450 B
Text
16 lines
No EOL
450 B
Text
# A place has a number of tokens, and that's it.
|
|
|
|
PlaceState:Class
|
|
PlaceState_numTokens:AttributeLink (PlaceState -> Integer) {
|
|
name = "numTokens";
|
|
optional = False;
|
|
constraint = `"numTokens cannot be negative" if get_value(get_target(this)) < 0 else None`;
|
|
}
|
|
|
|
of:Association (PlaceState -> Place) {
|
|
# one-to-one
|
|
source_lower_cardinality = 1;
|
|
source_upper_cardinality = 1;
|
|
target_lower_cardinality = 1;
|
|
target_upper_cardinality = 1;
|
|
} |