Overview of some type hierarchies.
AbstractPnmlType - Petri Net Type Definition (PNTD)
See PnmlTypes module page.
There are levels: Core (Place-Transition), Continuous and High-Level PNG (HLPNG).
PnmlCoreNet is a concrete subtype of AbstractPnmlType. PnmlCoreNet is used by some PNet.AbstractPetriNet concrete types (PNet.SimpleNet).
ContinuousNet is a concrete type of AbstractContinuousNet. ContinuousNet uses floating point marking and inscriptions. It is a nonstandard extension to the ISO standard.
HLCoreNet is a concrete subtype of AbstractHLCore. HLCoreNet is used by some PNet.AbstractPetriNet concrete types (PNet.HLPetriNet). Think of it as a testable implementation of AbstractHLCore.
Tries to represent the model (all models) at a structural level. Tries to avoid imposing semantics. It is a toolkit with a wide range of behavior. Those semantics should be part of PNet.AbstractPetriNet. Yes, the AbstractPnmlType in use selects some semantics and affects the toolkit.
AbstractPnmlType
├─ AbstractContinuousNet
│ └─ ContinuousNet
├─ AbstractHLCore
│ ├─ HLCoreNet
│ ├─ HLPNG
│ ├─ PT_HLPNG
│ └─ SymmetricNet
└─ AbstractPnmlCore
├─ PTNet
└─ PnmlCoreNet| PnmlType | Description |
|---|---|
| PnmlCoreNet | Core structure. Only defined label is <name>. |
| PTNet | Using <initialMarking>, <inscription> labels that have a <text> containing a number. |
| HLCoreNet | HL Petri Net Graphs structure. Using <hlinitialMarking>, <hlinscription> labels with <structure>. Multisorted algebra. |
| PT-HLPNG | Restrict sort to dot, condition always true. |
| SymmetricNet | Restrict sorts to finite, annotations have <structure>. |
| HLNet | Unrestricted, Arbitrary Sorts, Operators, Lists, Strings. |
| Stochastic | Extended PNML. Use <rate> label |
| Timed | Extended PNML. |
| Open | Extended PNML . |
Todo: Continuous Petri Net
PNet.AbstractPetriNet
PNet.AbstractPetriNet uses the Intermediate Representation's PnmlNet and AbstractPnmlType to implement a Petri Net Graph (PNG).
AbstractPnmlObject
Page, Arc, Place, Transition define the graph of a PnmlNet.
AbstractPnmlObject
├─ AbstractPnmlNode
│ ├─ Arc
│ ├─ Place
│ └─ Transition
├─ ReferenceNode
│ ├─ RefPlace
│ └─ RefTransition
└─ PageStructure
Fields expected of every subtype of AbstractPnmlObject:
| Name | Description |
|---|---|
| id | Symbol, see 'REFID |
| pntd | <: AbstractPnmlType identifies the meta-model of a net. |
| name | Optional Name label. |
| labels | Optional PnmlLabel collection of unclaimed labels. |
| toolspecinfos | Optional ToolInfo collection of tool specific content. |
Note that subtypes may have additional fields. For example, Page has a subpages field.
ADT
using Moshi.Data: @data
@data NetNode{PNTD,} begin
Arc
Place
Transition
RefPlace
RefTransition
Page
endAbstractLabel
AbstractLabels are attached to AbstractPnmlObjects. Kinds of label include: marking, inscription, condition and declarations, sort, and ad-hoc. Ad-hoc is where we assume any undefined element attached to a AbstractPnmlObject instance is a label and add it to a collection of 'other labels'. Some 'other labels' can be accessed using: rate_value, delay_value.
Some Labels of Interest
| Full Name | Node | Label Description |
|---|---|---|
| Marking | Place | Value is a number or ground term. |
| Inscription | Arc | Value is a number or ground term. |
| Condition | Transition | Value is a boolean term. |
| Rate | Transition | Value is a floating point number. |
| Priority | Transition | Firing order of enabled transitions. |
| Weight | Transition | Firing tiebreaker. |
Note that Rate, Priority and Weight are not part of base standard. See Unclaimed Labels
AbstractLabel
├─ Annotation
│ ├─ ArcType
│ ├─ Declaration
│ ├─ Marking
│ ├─ Name
│ ├─ PnmlLabel
│ ├─ Priority
│ ├─ Rate
│ ├─ SortType
│ └─ Time
└─ HLAnnotation
├─ Condition
├─ HLLabel
└─ Inscription- Objects have ids and
Names. - Labels are attached to Objects.
- Some Labels (attributes) do not have
Graphics. - Labels are extendable.
- Labels are named by the xml tag. Any "unknown" tag of an Object is presumed to be a label.
PnmlException
PnmlException
├─ MalformedException
└─ MissingIDExceptionMany-sorted Algebra Concepts
The PNML Standard builds the High-level Petri Net Graph as a layer using a Core layer (PnmlCore). The main feature of the HL layer (HLCore) is to require all annotation labels to have <text> and <structure> elements. All meaning is required to reside in a single child of <structure>. With the <text> for human/documentation use.
Implemented so that it is mostly part of the PnmlCore implementation. At which level, both <text> and <structure> are optional.
The <type> label of a Place is meant to be a sort of a many-sorted algebra. We call it sorttype to reduce the confusion.
PNML.jl allows/requires all net type's places to have sorttype objects. Only high-level PNML input is expected to contain a <type> tag. For other nets we interpret the SortType to be IntegerSort or RealSort based on PNTD. And Marking values of non-high-level nets are interpreted as multisets with airity of 1. This allows more common implementation in the core layer.
For high-level nets the sorttype object is an SortType HLAnnotation subtype containing an AbstractSort.
AbstractDeclaration
Labels attached to PnmlNet and/or Page. The Declarations contained in a <declarations> apply to the whole net even when attached to a Page.
AbstractDeclaration
├─ UnknownDeclaration
└─ VariableDeclarationAbstractSort
Each Place has a sorttype containing an AbstractSort.
AbstractSort
├─ OperatorDeclaration
│ ├─ ArbitraryOperator
│ ├─ NamedOperator
│ └─ PartitionElement
├─ SortDeclaration
│ ├─ ArbitrarySort
│ ├─ NamedSort
│ └─ PartitionSort
├─ BoolSort
├─ DotSort
├─ EnumerationSort
│ ├─ CyclicEnumerationSort
│ └─ FiniteEnumerationSort
├─ FiniteIntRangeSort
├─ ListSort
├─ MultisetSort
├─ NumberSort
│ ├─ IntegerSort
│ ├─ NaturalSort
│ ├─ NullSort
│ ├─ PositiveSort
│ └─ RealSort
├─ ProductSort
└─ StringSortAbstractTerm
Part of the many-sorted algebra of a High-level net. See AbstractOperator. Variable
AbstractTerm
├─ AbstractOperator
│ ├─ BooleanConstant
│ ├─ DotConstant
│ ├─ FEConstant
│ ├─ FiniteIntRangeConstant
│ ├─ NumberConstant
│ ├─ Operator
│ └─ UserOperator
└─ AbstractVariable
└─ VariablePnmlExpr
Expressions of the many-sorted algebra are part of a petri net's dynamic behavior. PnmlExpr are TermInterface compatible. Used to do variable substitution before evaluation of mutisorted algebra expressions in enabling and firing rules. Ground terms contain no variables and therefore do not depend on the current marking of the net.
PnmlExpr
├─ AbstractBoolExpr
│ ├─ And
│ ├─ BooleanEx
│ ├─ Contains
│ ├─ Equality
│ ├─ GreaterThan
│ ├─ GreaterThanOrEqual
│ ├─ Imply
│ ├─ Inequality
│ ├─ LessThan
│ ├─ LessThanOrEqual
│ ├─ Not
│ ├─ Or
│ ├─ PartitionGreaterThan
│ ├─ PartitionLessThan
│ ├─ StringGreaterThan
│ ├─ StringGreaterThanOrEqual
│ ├─ StringLessThan
│ └─ StringLessThanOrEqual
├─ AbstractOpExpr
│ ├─ NamedOperatorEx
│ ├─ PartitionElementOp
│ └─ UserOperatorEx
├─ Add
├─ Addition
├─ Append
├─ Bag
├─ Cardinality
├─ CardinalityOf
├─ Concatenation
├─ Division
├─ DotConstantEx
├─ ListAppend
├─ ListConcatenation
├─ ListEx
├─ ListLength
├─ MemberAtIndex
├─ Modulo
├─ Multiplication
├─ NumberEx
├─ PartitionElementOf
├─ PnmlTupleEx
├─ Predecessor
├─ ScalarProduct
├─ StringLength
├─ Sublist
├─ SubstringEx
├─ Subtract
├─ Subtraction
├─ Successor
└─ VariableEx