PNML
PNML.PNML — Module
Petri Net Markup Language, is an XML-based format. PNML.jl reads a pnml model and emits an intermediate representation (IR).
The intermediate representation (IR) represents the XML tree via julia data structures: dictionaries, NamedTuples, strings, numbers, objects, vectors. The exact mixture changes as the project continues.
The tags of the XML are used as keys and names as much as possible.
What is accepted as values is ~~often~~ a superset of what a given pntd schema specifies. This can be thought of as duck-typing. Conforming to the pntd is not the role of the IR.
The pnml standard has layers. This package has layers: PnmlNet, AbstractPetriNet
The core layer is useful and extendable. The standard defines extensions of the core, called meta-models, for
- place-transition petri nets (integers) and
- high-level petri net graphs (many-sorted algebra).
This package family adds non-standard continuous net (float64) support. Note that there is not yet any RelaxNG schema for our extensions.
On top of the concrete PnmlNet of the IR are net adaptions and interpertations. This is the level that Petri Net conformance can be imposed. It is also where other Net constructs can be defined over PnmlNets. Perhaps as new meta-models.
PNML.CONFIG — Constant
See PnmlConfig for default values.
PNML.Maybe — Type
Alias for Union{T, Nothing}.
PNML.AbstractLabel — Type
abstract type AbstractLabelLabels are attached to the Petri Net Graph objects. See AbstractPnmlObject.
Expected interface is for every concrete label to have at least these fields: - text - graphics - toolspecinfos - net
PNML.AbstractOperator — Type
abstract type AbstractOperator <: PNML.AbstractTermOperators are part of the high-level pnml many-sorted algebra.
...can be a built-in constant or a built-in operator, a multiset operator which among others can construct a multiset from an enumeration of its elements, or a tuple operator. Each operator has a sequence of sorts as its input sorts, and exactly one output sort, which defines its signature.
See NamedOperator and ArbitraryOperator.
PNML.AbstractPnmlNet — Type
abstract type AbstractPnmlNetPNML.AbstractPnmlNode — Type
abstract type AbstractPnmlNode <: PNML.AbstractPnmlObjectPetri Net Graph nodes are Place, Transition. They are the source or target of an Arc
PNML.AbstractPnmlObject — Type
abstract type AbstractPnmlObjectObjects of a Petri Net Graph are pages, arcs, nodes.
Expected interface is for every concrete object to have at least these fields: - id - namelabel - graphics - extralabels - toolspecinfos
PNML.AbstractSort — Type
AbstractSortPNML.AbstractTerm — Type
abstract type AbstractTermTerms are part of the multi-sorted algebra that is part of a High-Level Petri Net.
Concrete terms are Variable and Operator found within the <structure> element of a label. They are parsed into PnmlExpr as TermInterface expressions thar are evaluated during the enabling and firing rule.
Notably, a Term is not a PnmlLabel (or a PNML Label).
References
See also Declaration, Labels.SortType, AbstractDeclaration.
A first-order term is recursively constructed from constant symbols, variables and function symbols.
Besides in logic, terms play important roles in universal algebra, and rewriting systems.
more convenient to think of a term as a tree.
A term that doesn't contain any variables is called a ground term
When the domain of discourse contains elements of basically different kinds, it is useful to split the set of all terms accordingly. To this end, a sort (sometimes also called type) is assigned to each variable and each constant symbol, and a declaration...of domain sorts and range sort to each function symbol....
term in logic is recursively defined as a constant symbol, variable, or a function application, where a term is applied to another term
if t is a term of type σ → τ, and s is a term of type σ, then the application of t to s, often written (t s), has type τ.
The term redex, short for reducible expression, refers to subterms that can be reduced by one of the reduction rules.
See Metatheory and SymbolicUtils
PNML.AbstractVariable — Type
abstract type AbstractVariable <: PNML.AbstractTermVariables are part of the high-level pnml many-sorted algebra.
PNML.Annotation — Type
abstract type Annotation <: PNML.AbstractLabelLabel that may be displayed. Differs from an Attribute Label by possibly having a Graphics field. We do not implement a separate Attribute type since graphics is optional.
PNML.AnyElement — Type
struct AnyElement{T}tag::Symbolelements::Any
Hold AbstractDict holding zero or more well-formed XML elments. See also ToolInfo and PnmlLabel.
Creates a tree where the root is tag, leaf node values are Union{String, SubString{String}}, and interior nodes values are Union{XmlDictType, Vector{XmlDictType}}
See XmlDictType.
PNML.Arc — Type
Edge of a Petri Net Markup Language graph that connects place and transition.
mutable struct Arc{T<:PNML.Expressions.PnmlExpr, N<:PNML.AbstractPnmlNet} <: PNML.AbstractPnmlNodeid::Symbolsource::Base.RefValue{Symbol}target::Base.RefValue{Symbol}inscription::PNML.Labels.Inscriptionarctypelabel::PNML.Labels.ArcTypenamelabel::Union{Nothing, PNML.Labels.Name}graphics::Union{Nothing, PNML.Labels.PnmlGraphics.Graphics}toolspecinfos::Union{Nothing, Vector{PNML.Labels.ToolInfo}}extralabels::OrderedCollections.LittleDict{Symbol, Any, KS, VS} where {KS<:Union{Tuple{Vararg{Symbol}}, AbstractVector{Symbol}}, VS<:Union{Tuple, AbstractVector{Any}}}net::PNML.AbstractPnmlNet
PNML.BooleanConstant — Type
BooleanConstant("true"|"false")
BooleanConstant(true|false)A built-in operator constructor (constants are 0-ary operators).
Examples
c = BooleanConstant("true");
c == BooleanConstant(true)
c() == truePNML.BooleanConstant — Method
Create by parsing string s to value of type Bool.
PNML.Coordinate — Type
struct Coordinatex_::Float32y_::Float32
Cartesian Coordinate are positive decimals. Ranges from 0 to 999.9.
PNML.Coordinate — Method
Construct a Coordinate from mixed Int, Float64.
PNML.DeclDict — Type
struct DeclDictvariabledecls::Dict{Symbol, Any}: HoldsVariableDeclaration. AVariableis used to locate the declaration's name and sort.
namedsorts::Dict{Symbol, Any}arbitrarysorts::Dict{Symbol, Any}partitionsorts::Dict{Symbol, Any}multisetsorts::Dict{Symbol, Any}productsorts::Dict{Symbol, Any}namedoperators::Dict{Symbol, Any}arbitraryoperators::Dict{Symbol, Any}partitionops::Dict{Symbol, Any}feconstants::Dict{Symbol, Any}useroperators::Dict{Symbol, Any}
Collection of dictionaries holding various kinds of PNML declarations. Each keyed by REFID symbols.
PNML.DotConstant — Type
The only element of DotSort is DotConstant. This is a 0-arity opertor term that evaluates to 1.
PNML.FEConstant — Type
FEConstantFinite enumeration constant and its containing sort.
"...these FEConstants are part of the declaration of the FiniteEnumeration sort. On the other hand, each of these FEConstants defines a 0-ary operation, i. e. is a declaration of a constant."
Usage
fec = FEConstant(:anID, "somevalue", sortref)
fec() == :anID
fec.name = "somevalue"PNML.FiniteIntRangeConstant — Type
struct FiniteIntRangeConstant{T<:Integer} <: PNML.AbstractOperatorMust refer to a value between the start and end of the respective FiniteIntRangeSort.
PNML.HLAnnotation — Type
abstract type HLAnnotation <: PNML.AbstractLabelAnnotation label that adds <structure>.
PNML.LabelParser — Type
struct LabelParsertag::Symbolfunc::Union{Function, Type}
Maps a Symbol to a callable for parsing an XML label <tag>'s well-formed contents. The parser will be called as func(node, pntd) and return a label object.
See fill_builtin_labelparsers! for some built-in label parsers.
PNML.MalformedException — Type
struct MalformedException <: PNML.PnmlExceptionmsg::String
PNML.MissingIDException — Type
struct MissingIDException <: PNML.PnmlExceptionmsg::String
PNML.NumberConstant — Type
NumberConstant{T<:Number, S}Builtin operator that has arity=0 means the same result every time, a constant. Restricted to NumberSorts, those Sorts whose eltype isa Number.
PNML.Operator — Type
PNML Operator as Functor
tag maps to func, a functor/function Callable. Its arity is same as length of inexprs and insorts
PNML.Page — Type
mutable struct Page{PNTD<:PNML.PnmlTypes.AbstractPnmlType, N<:PNML.AbstractPnmlNet} <: PNML.AbstractPnmlObjectnet::PNML.AbstractPnmlNetpntd::PNML.PnmlTypes.AbstractPnmlTypeid::Symbolnamelabel::Union{Nothing, PNML.Labels.Name}graphics::Union{Nothing, PNML.Labels.PnmlGraphics.Graphics}toolspecinfos::Union{Nothing, Vector{PNML.Labels.ToolInfo}}extralabels::OrderedCollections.LittleDict{Symbol, Any, KS, VS} where {KS<:Union{Tuple{Vararg{Symbol}}, AbstractVector{Symbol}}, VS<:Union{Tuple, AbstractVector{Any}}}netsets::PNML.PnmlNetKeys
Contain all places, transitions & arcs. Pages are for visual presentation. There must be at least 1 Page for a valid pnml model.
PNTD binds the other type parameters together to express a specific PNG. See PnmlNet
PNML.Place — Type
mutable struct Place{N<:PNML.AbstractPnmlNet} <: PNML.AbstractPnmlNodeid::SymbolinitialMarking::PNML.Labels.Markingsorttype::PNML.Labels.SortTypenamelabel::Union{Nothing, PNML.Labels.Name}graphics::Union{Nothing, PNML.Labels.PnmlGraphics.Graphics}toolspecinfos::Union{Nothing, Vector{PNML.Labels.ToolInfo}}extralabels::OrderedCollections.LittleDict{Symbol, Any, KS, VS} where {KS<:Union{Tuple{Vararg{Symbol}}, AbstractVector{Symbol}}, VS<:Union{Tuple, AbstractVector{Any}}}net::PNML.AbstractPnmlNet
Place node of a Petri Net Markup Language graph.
Each place has an initial marking that has a basis matching sorttype. M is a "multiset sort denoting a collection of tokens". A "multiset sort over a basis sort is interpreted as "the set of multisets over the type associated with the basis sort".
PNML.PnmlConfig — Type
Configuration with default values that can be overidden by a LocalPreferences.toml.
Options
indent_width::Int: Indention of nested lines.text_element_optional::Bool: There are pnml files that break the rules & do not have <text> elements.warn_on_fixup::Bool: When an missing value is replaced by a default value, issue a warning.warn_on_namespace::Bool: There are pnml files that break the rules & do not have an xml namespace.warn_on_unclaimed::Bool: Issue warning when PNML label does not have a parser defined. While allowed, there will be code required to do anything useful with the label.warn_on_unimplemented::Bool: Issue warning to highlight something unimplemented. Expect high volume of messages.verbose::Bool: Print information as runs.
PNML.PnmlException — Type
abstract type PnmlException <: ExceptionPNML.PnmlModel — Type
struct PnmlModel{T<:AbstractDict}nets::AbstractDictnamespace::String
One or more Petri Nets.
PNML.PnmlMultiset — Type
pnmlmultiset(basis::SortRef, x::T, multi::Int=1) -> PnmlMultiset{T, N <: APN}Construct as a multiset with one element, x, with default multiplicity of 1.
PnmlMultiset wraps a Multisets.Multiset{T} where T is the basis sort element type.
Some Operatorsand [Variables`](@ref) create/use a multiset. Thre are constants (and 0-arity operators) defined that must be multisets since HL markings are multisets.
See Bag for expression that returns this data structure.
"multix" is text representation of the<numberof>operator that produces a multiset. As does<all>` operator.
PNML.PnmlNet — Type
mutable struct PnmlNet{PNTD<:PNML.PnmlTypes.AbstractPnmlType} <: PNML.AbstractPnmlNetOne Petri Net of a PNML model.
typeididregistry: The meta-model type this net implements.pagedictnetdatapage_idsetddictdeclarationnamelabeltoolspecinfosextralabelslabelparsertoolparser: Collection that associates a tool name & version with a callable parser. The parser turns<toolspecific name="" version="">intoToolInfoobjects.
PNML.PnmlNetData — Type
struct PnmlNetDataplace_dict::OrderedCollections.OrderedDict{Symbol, Any}transition_dict::OrderedCollections.OrderedDict{Symbol, Any}arc_dict::OrderedCollections.OrderedDict{Symbol, Any}refplace_dict::OrderedCollections.OrderedDict{Symbol, Any}reftransition_dict::OrderedCollections.OrderedDict{Symbol, Any}
Collect each of the PnmlNodess & Arcs of a Petri Net Graph into one collection. Accessed via pnml ID key or iterate over values of an OrderedDict.
In the 'pnml' standard there is a Page structure that can be removed by flatten_pages!, removing some display-related information, leaving a functional Petri Net Graph as described in this structure. It is intended to be a per-PnmlNet database that is mutated as each page is parsed.
See PnmlNetKeys for page-level pnml ID of "owners" net data.
PNML.PnmlNetKeys — Type
struct PnmlNetKeyspage_set::OrderedCollections.OrderedSet{Symbol}place_set::OrderedCollections.OrderedSet{Symbol}transition_set::OrderedCollections.OrderedSet{Symbol}arc_set::OrderedCollections.OrderedSet{Symbol}reftransition_set::OrderedCollections.OrderedSet{Symbol}refplace_set::OrderedCollections.OrderedSet{Symbol}
Per-page structure of OrderedSets of pnml IDs for each "owned" Page and other AbstractPnmlObject.
PNML.REFID — Type
Alias for Symbol that refers to something with an ID Symbol.
PNML.RefPlace — Type
Reference Place node of a Petri Net Markup Language graph. For connections between pages.
struct RefPlace{N<:PNML.AbstractPnmlNet} <: PNML.ReferenceNoder
id::Symbolref::Symbolnamelabel::Union{Nothing, PNML.Labels.Name}graphics::Union{Nothing, PNML.Labels.PnmlGraphics.Graphics}toolspecinfos::Union{Nothing, Vector{PNML.Labels.ToolInfo}}extralabels::OrderedCollections.LittleDict{Symbol, Any, KS, VS} where {KS<:Union{Tuple{Vararg{Symbol}}, AbstractVector{Symbol}}, VS<:Union{Tuple, AbstractVector{Any}}}net::PNML.AbstractPnmlNet
PNML.RefTransition — Type
Refrence Transition node of a Petri Net Markup Language graph. For connections between pages.
struct RefTransition{N<:PNML.AbstractPnmlNet} <: PNML.ReferenceNodeid::Symbolref::Symbolnamelabel::Union{Nothing, PNML.Labels.Name}graphics::Union{Nothing, PNML.Labels.PnmlGraphics.Graphics}toolspecinfos::Union{Nothing, Vector{PNML.Labels.ToolInfo}}extralabels::OrderedCollections.LittleDict{Symbol, Any, KS, VS} where {KS<:Union{Tuple{Vararg{Symbol}}, AbstractVector{Symbol}}, VS<:Union{Tuple, AbstractVector{Any}}}net::PNML.AbstractPnmlNet
PNML.ReferenceNode — Type
abstract type ReferenceNode <: PNML.AbstractPnmlObjectFor common behavior shared by RefPlace, RefTransition used to connect Page together.
PNML.SortRef — Type
Alias for SortRefImpl.Type.
PNML.ToolParser — Type
struct ToolParser{T<:Union{Function, Type}}toolname::Stringversion::Stringfunc::Union{Function, Type}
Holds a parser callable for a <toolspecific> tag's well-formed contents.
Will be in an iteratable collection that maps tool name & version to a parser callable. See toolspecific_content_fallback(node, pntd).
PNML.Transition — Type
Transition node of a Petri Net Markup Language graph.
mutable struct Transition{N<:PNML.AbstractPnmlNet} <: PNML.AbstractPnmlNodeid::Symbolcondition::PNML.Labels.Conditionnamelabel::Union{Nothing, PNML.Labels.Name}graphics::Union{Nothing, PNML.Labels.PnmlGraphics.Graphics}toolspecinfos::Union{Nothing, Vector{PNML.Labels.ToolInfo}}extralabels::OrderedCollections.LittleDict{Symbol, Any, KS, VS} where {KS<:Union{Tuple{Vararg{Symbol}}, AbstractVector{Symbol}}, VS<:Union{Tuple, AbstractVector{Any}}}vars::Set{Symbol}varsubs::Vector{NamedTuple}: Cache of variable substitutons for this transitionnet::PNML.AbstractPnmlNet
PNML.UserOperator — Type
struct UserOperator{N<:PNML.AbstractPnmlNet} <: PNML.AbstractOperatordeclaration::Symbolnet::PNML.AbstractPnmlNet
User operator wraps a REFID to a OperatorDeclaration.
PNML.Variable — Type
struct Variable{N<:PNML.AbstractPnmlNet} <: PNML.AbstractVariablerefvariable::Symbolnet::PNML.AbstractPnmlNet
Variable refers to a VariableDeclaration. Example input: <variable refvariable="varx"/>.
#TODO examples of use, modifying and accessing
PNML.XmlDictType — Type
Dictionary passed to XMLDict.xml_dict as dict_type. See xmldict.
PNML._attribute — Method
XMLDict uses symbols as keys for XML attributes. Value returned is a string.
PNML._cvt_inscription_value — Method
Convert inscription value of PT_HLPNG from multiset to cardinality of the multiset.
PNML._op_dictionaries — Method
Return tuple of operator dictionary fields in the Declaration Dictionaries.
PNML._sort_dictionaries — Method
Return tuple of sort dictionary fields in the Declaration Dictionaries.
PNML._sorts — Method
Return iterator over sort dictionaries of Declaration Dictionaries.
PNML.accum_tr_var_binding_set! — Method
Collect/intersect binding of one arc variable binding set for variable v.
PNML.accum_tr_var_binding_sets! — Method
accum_tr_var_binding_sets!(tr_var_binding_set, arc_var_binding_set) -> BoolCollect variable bindings, intersecting among arcs. Return enabled status of false if any variable does not have a substitution.
PNML.adjacent_place — Function
adjacent_place(net::PnmlNet, arc::Arc) -> Place
adjacent_place(netdata::PnmlNetData, source,::Symbol target::Symbol) -> PlaceAdjacent place of an arc is either the source or target.
PNML.all_arcs — Function
PNML.allpages — Method
allpages(net::PnmlNet|dict::OrderedDict) -> IteratorReturn iterator over all pages in the net. Maintains insertion order.
PNML.append_page! — Method
Append selected fields of r to fields of l. Some, like Names and xml, are omitted because they are scalar values, not collections.
pagedict & netdata (holding the arc and pnml nodes) are per-net data that is not modified here. netsets hold pnml IDs "owned"
PNML.arbitraryop — Function
Lookup arbitraryop with id.
PNML.arbitraryops — Function
Return dictionary of ArbitraryOperator
PNML.arbitrarysort — Function
Lookup arbitrarysort with id.
PNML.arbitrarysorts — Function
Return dictionary of ArbitrarySort
PNML.arc_idset — Function
Return iterator over arc ids.
PNML.arctypelabel — Method
arctypelabel(arc::Arc) -> ArcTypeAccess arctype label of arc.
PNML.basis — Function
basis(x, ddict) -> SortRefReturn SortRef referencing a NamedSort, ArbitrarySort or PartitionSort declaration. MultisetSort, Multiset, List have a basis. Default basis is sortof Place marking & sorttype, arc inscriptions have a basis.
PNML.basis — Method
basis(ms::PnmlMultiset) -> SortRefMultiset basis sort is accessed through a SortRef that holds a REFID index into decldict(net). MultisetSorts not allowed here. Nor loops in sort references.
PNML.cardinality — Method
cardinality(ms::PnmlMultiset, x) -> IntegerPNML.condition — Function
Return condition's value of transition.
PNML.condition — Method
condition(::Transition) -> ConditionReturn condition label.
PNML.conditions — Function
conditions(net::PnmlNet) -> IteratorIterate over REFID => condition(transaction) pairs of net. This is the same order as transactions.
PNML.coordinate_type — Function
coordinate_type(x) -> Type(Coordinate)PNML.declarations — Method
declarations(dd::DeclDict) -> IteratorReturn an iterator over all the declaration dictionaries' values.
PNML.decldict — Function
decldict(net::APN) -> DeclDictAccess net-level DeclDict.
PNML.deref! — Method
deref!(net::PnmlNet; trim, verbose)
Remove reference nodes from arcs.
Operates on the PnmlNetData at the net level. Expects that the PnmlNetKeys of the firstpage will have to be cleaned as part of flatten_pages!,
Axioms
- All ids in a network are unique in that they only have one instance in the XML.
- A chain of reference Places (or Transitions) always ends at a Place (or Transition).
- All ids are valid.
- No cycles.
PNML.deref_place — Method
deref_place(net, id[], trim::Bool] ) -> SymbolReturn id of referenced place. If trim is true (default) the reference is removed.
PNML.deref_transition — Method
deref_transition(net, id[, trim::Bool] ) -> SymbolReturn id of referenced transition. If trim is true (default) the reference is removed.
PNML.dict_show — Function
dict_show(io::IO, x)Internal helper for things that contain XmlDictType.
PNML.enabled — Function
enabled(::PnmlNet, marking) -> Vector{Bool}Return vector of booleans where true means the matching transition is enabled at current marking. Has the same order as the transitions dictionary. Used in the firing rule.
Update tr.vars Set and tr.varsubs, NamedTuple.
PNML.feconstant — Function
Lookup feconstant with id.
PNML.feconstants — Function
Return dictionary of FEConstant
PNML.fill_builtin_labelparsers! — Method
fill_builtin_labelparsers!(net::APN) -> Nothing
fill_builtin_labelparsers!(labelparser::AbstractDict) -> NothingFill context with the base built-in label parsers.
PNML.fill_builtin_sorts! — Method
fill_builtin_sorts!(net::APN) -> NothingFill a DeclDict with built-ins and defaults (that may be redefined).
PNML.fill_builtin_toolparsers! — Method
fill_builtin_toolparsers!(net::APN) -> Nothing
fill_builtin_toolparsers!(toolparsers::AbstractDict) -> NothingFill context with the base built-in tool parsers.
PNML.fill_sort_tag! — Method
fill_sort_tag!(net::APN, tag::Symbol, sort, dict) -> SortRefIf not already in the declarations dictionary dict, add sort with key of tag.
Register the tag and create and return an SortRef holding tag.
PNML.fill_toolparsers! — Method
Add parser to dictionary
PNML.find_net — Method
find_net(model, id::Symbol) -> Any
Return PnmlNet having id or nothing.
PNML.find_nets — Function
Return nets matching pntd type given as string, symbol or pnmltype instance.
PNML.find_valuekey — Function
Look for matching value x in dictionary d, return key symbol or nothing.
PNML.firstpage — Method
Usually the only interesting page.
PNML.flatten_pages! — Function
flatten_pages!(net::PnmlNet[; options])Merge page content into the 1st page of the net.
Options
PNML.get_arc_var_binding_set! — Method
get_arc_var_binding_set!(arc_var_binding_set, arc_vars, placesort, mark, net) -> BoolFill arc_var_binding_set with an entry for each key in arc_vars. Return true if no variables are present or all variables have at least 1 substition. Indicates that transition is able to fire (enabled fro selection to fire).
PNML.get_label — Function
get_label(x, tag::Union{Symbol, String, SubString{String}}) -> PnmlLabelReturn first label of x with a matching tagvalue.
PNML.get_label — Method
get_label(x, tag) -> Maybe{AbstractLabel}x is anyting that supports 'labels'. tag is the tag of the xml label element.
PNML.get_variable_substitutions! — Method
Get transition variable substitution from preset arcs. Updte enabled and transition, trvarbinding_set.
PNML.has_arc — Function
Return true if any arc has id.
PNML.has_key — Function
has_key(net::AbstractPnmlnet, dict, key::Symbol) -> BoolWhere dict is the access method for a dictionary in DeclDict.
PNML.has_key — Method
has_key(net::AbstractPnmlnet, dict, key::Symbol) -> BoolWhere dict is the access method for a dictionary in DeclDict.
PNML.has_operator — Function
Does any operator dictionary contain id?
PNML.has_operator — Method
Does any operator dictionary contain id?
PNML.has_operator — Method
Does any operator dictionary contain id?
PNML.has_place — Function
Return true if there is any place with id?
PNML.has_refplace — Function
PNML.has_reftransition — Function
PNML.has_transition — Function
Is there a transition with id?
PNML.inc_indent — Function
Increment the :indent value by inc.
PNML.incidence_matrix — Function
incidence_matrix(petrinet) -> MatrixWhen token identity is collective, marking and inscription values are Numbers and matrix C[arc(transition,place)] = inscription(arc(transition,place)) - inscription(arc(place,transition)) is called the incidence_matrix.
High-level nets have tokens with individual identity, perhaps tuples of them, usually multisets of finite enumerations, can be other sorts including numbers, strings, lists. Symmetric nets are restricted, and thus easier to deal with and reason about.
PNML.indent — Method
Return blank string of current indent size in io.
PNML.initial_marking — Function
Return the initial marking of a place.
PNML.initial_markings — Function
initial_markings(petrinet) -> Tuple{Pair{id(place),value_type(marking(place))}Tuple of Pair(placeid, initialmarking value).
High-level P/T Nets use cardinality of its multiset place marking value. Really, the implementation should be the same as for PTNet.
Other HL Nets use multisets.
PNML.input_matrix — Function
input_matrix(petrinet::AbstractPetriNet) -> Matrix{value_type(Inscription, ::APNTD))}
input_matrix(petrinet::PnmlNet) -> Matrix{value_type(Inscription, ::APNTD)}Create and return a matrix ntransitions x nplaces.
PNML.inscription — Function
Return incription value of arc.
PNML.inscription — Method
inscription(arc::Arc) -> InscriptionAccess inscription label of arc.
PNML.inscription_value — Function
inscription_value(a::Maybe{Arc}, def, varsub) -> T
If a is nothing return def else evaluate inscription expression with varsub, where def is a default value of same sort as adjacent place. and varsub is a possibly empty variable substitution.
Used to create arrays where the default value is used when there is no arc between an place and transition of the net.
PNML.inscriptions — Function
inscriptions(net::PnmlNet) -> IteratorIterate over REFID => inscription(arc) pairs of net. This is the same order as arcs.
PNML.isarbitrarysort — Method
isarbitrarysort(
x::PNML.SortRefImpl.var"typeof(SortRefImpl)"
) -> Bool
Check if a value is an SortRef variant of ArbitrarySortRef.
Arguments
x: Value to check (forSortRefinput returns true ifArbitrarySortRef, for others returns false).
Returns
trueifxis aSortRefwithArbitrarySortRefvariant,falseotherwise.
PNML.isbuiltinoperator — Method
isbuiltinoperator(::Symbol) -> BoolIs tag in builtin_operators()?
PNML.isfiniteoperator — Method
iisfiniteoperator(::Symbol) -> BoolIs tag in finite_operators()?
PNML.ismultisetsort — Method
ismultisetsort(
x::PNML.SortRefImpl.var"typeof(SortRefImpl)"
) -> Bool
Check if a value is an MultisetSortRef variant of SortRef.
Arguments
x: Value to check (forSortRefinput returns true ifMultisetSortRef, for others returns false).
Returns
trueifxis aSortRefwithMultisetSortRefvariant,falseotherwise.
PNML.isnamedsort — Method
isnamedsort(
x::PNML.SortRefImpl.var"typeof(SortRefImpl)"
) -> Bool
Check if a value is an NamedSortRef variant of SortRef.
Arguments
x: Value to check (forSortRefinput returns true ifNamedSortRef, for others returns false).
Returns
trueifxis aSortRefwithNamedSortRefvariant,falseotherwise.
PNML.isoperator — Method
isoperator(tag::Symbol) -> BoolPredicate to identify operators in the high-level pntd's many-sorted algebra abstract syntaxt tree.
Note: It is not the same as Meta.isoperator. Both work on Symbols. Not expecting any conflict.
- integer
- multiset
- boolean
- tuple
- builtin constant
- useroperator
PNML.ispartitionsort — Method
ispartitionsort(
x::PNML.SortRefImpl.var"typeof(SortRefImpl)"
) -> Bool
Check if a value is an PartitionSortRef variant of SortRef.
Arguments
x: Value to check (forSortRefinput returns true ifPartitionSortRef, for others returns false).
Returns
trueifxis aSortRefwithPartitionSortRefvariant,falseotherwise.
PNML.ispid — Method
ispid(x::Symbol)Return function to be used like: any(ispid(:asym), iterablewithpid).
PNML.isproductsort — Method
isproductsort(
x::PNML.SortRefImpl.var"typeof(SortRefImpl)"
) -> Bool
Check if a value is an ProductSortRef variant of SortRef.
Arguments
x: Value to check (forSortRefinput returns true ifProductSortRef, for others returns false).
Returns
trueifxis aSortRefwithProductSortRefvariant,falseotherwise.
PNML.isusersort — Method
isusersort(
x::PNML.SortRefImpl.var"typeof(SortRefImpl)"
) -> Bool
Check if a value is an UserSortRef variant of SortRef.
Arguments
x: Value to check (forSortRefinput returns true ifUserSortRef, for others returns false).
Returns
trueifxis aSortRefwithUserSortRefvariant,falseotherwise.
PNML.labeled_places — Method
labeled_places(net::PnmlNet, marking_vector)Return Vector of placeid=>markingvalue of that pace.
PNML.labels — Function
labels(x) -> IterateableReturn iterator of labels attached to x.
PNML.make_net — Function
Create empty net with builtins installed for use in test scaffolding.
PNML.mcontains — Method
mcontains(a::PnmlMultiset, b::PnmlMultiset) -> BoolForwarded to Multiset.issubset(multiset(b), multiset(a)).
PNML.multiplicity — Method
multiplicity(ms::PnmlMultiset, x) -> Integer
multiplicity(ms::Number, x) -> NumberPNML.multiset — Method
multiset(ms::PnmlMultiset) -> MultisetAccess wrapped multiset.
PNML.multisetsort — Function
Lookup multisetsort with id.
PNML.multisetsorts — Function
Return dictionary of MultisetSort
PNML.namedop — Function
Lookup namedop with id.
PNML.namedoperators — Function
Return dictionary of NamedOperator
PNML.namedsort — Function
Lookup namedsort with id.
PNML.namedsorts — Function
Return dictionary of NamedSort
PNML.netdata — Function
netdata(x) -> PnmlNetDataAccess PnmlNet-level data structure.
PNML.nettype — Function
Return the APNTD subtype representing the flavor (or pntd) of this kind of Petri Net Graph.
See also pnmltype
PNML.null_function — Method
Dummy function
PNML.number_value — Method
number_value(::Type{T}, s) -> TParse string as a type T <: Number.
PNML.operator — Method
Lookup operator with id in DeclDict.::Symbol May be namedop, feconstant, etc
PNML.operator — Method
operator(dd::DeclDict, id::Symbol) -> AbstractOperatorReturn operator TermInterface expression for id. toexpr(::AbstractOpExpr, varsub, ddict) = :(useroperator(ddict, REFID)(varsub))
Operator Declarations include: :namedoperator, :feconstant, :partitionelement, :arbitraryoperator with types NamedOperator, FEConstant, PartitionElement, ArbitraryOperator. These define operators of different types that are placed into separate dictionaries.
#! AbstractDeclarations and AbstractTerms are "parallel" semi-overlapping hierarchies #! in the UML, with AbstractTerms divided into AbstractOperators and AbstractVariables.
#! AbstractTerms overlap with OperatorDeclaration and VariableDeclaration . #! AbstractSorts overlap with SortDeclaration.
#! Consider OperatorDeclaration, SortDeclaration to be generators of concrete subtypes of #! AbstractOperator, AbstractSort. #! Without multiple inheritance, this cannot be expressed in a Julia type hiearchy.
#! What the 'parse_*' of these <declaration> XML elements produce is #! a concrete AbstractOperator, AbstractSort.
#! VariableDeclaration and Variable are not hiearchies. #! A Varaible is a reference to a VariableDeclaration, #! The variable declaration is a id, name, sort triplet. #! Where the sort is a SortRefImpl or a sort declaration.
useroperator(REFID) is used to locate the operator definition, when it is found in feconstants(), is a callable returning a FEConstant literal.
`toexpr(::FEConstantEx, varsub, ddict) = :(useroperator(ddict, REFID)(varsub))`The FEConstant operators defined by the declaration do not have a distinct type name in the standard. Note that a FEConstant's value in the standard is its identity. We could use objectid(::FEConstant), REFID or name for output value. Output sort of op is FEConstant.
Other OperatorDeclaration dictionarys also hold TermInterface expressions accessed by
`toexpr(::PnmlExpr, varsub, ddict) = :(useroperator(ddict, REFID)(varsub))`where PnmlExpr is the TermInterface to match OperatorDeclaration. With output sort to match OperatorDeclaration .
#TODO named operator input variables and their sorts
#TODO partition element
#TODO arbitrary opearator
#TODO built-in operators
PNML.operators — Method
operators(net::APN)-> IteratorIterate over each operator in the operator subset of declaration dictionaries .
PNML.operators — Method
operators(dd::DeclDict)-> IteratorIterate over each operator in the operator subset of declaration dictionaries .
PNML.output_matrix — Function
output_matrix(petrinet::AbstractPetriNet) -> Matrix{value_type(Inscription, ::APNTD)}
output_matrix(petrinet::PnmlNet) -> Matrix{value_type(Inscription, ::APNTD)}Create and return a matrix ntransitions x nplaces.
PNML.pages — Function
pages(net::PnmlLabel|page::Page) -> iteratorReturn iterator of pages directly owned by that object.
See allpages for an iterator over all pages in the PNML network model. When there is only one page in the net, or all pages are owned by the 'net' itself, 'allpages' and 'pages` behave the same.
Maintains order (insertion order).
PNML.pages — Method
Iterator of Pages directly owned by net.
PNML.partitionop — Function
Lookup partitionop with id.
PNML.partitionops — Function
Return dictionary of partitionops (PartitionElement)
PNML.partitionsort — Function
Lookup partitionsort with id.
PNML.partitionsorts — Function
Return dictionary of PartitionSort
PNML.place — Function
Return the place with id.
PNML.place_idset — Function
Return iterator of all place IDs.
PNML.places — Function
Return iterator of all places.
PNML.pnml_hl_operator — Method
pnml_hl_operator(tag::Symbol) -> Callable(::Vector{AbstractTerm})Return callable with a single argument, a vector of inputs.
PNML.pnml_hl_outsort — Method
pnml_hl_outsort(tag::Symbol; insorts::Vector{UserSortRef}) -> SortRefReturn sort that operator tag returns.
PNML.pnmlmultiset — Function
pnmlmultiset(basis::SortRef, x, multi::Int=1; net) -> PnmlMultiset
pnmlmultiset(basis::SortRef, x::Multisets.Multiset; net) -> PnmlMultiset
pnmlmultiset(basis::SortRef; net) -> PnmlMultisetConstructs a PnmlMultiset containing a multiset and a sort from either
- a sortref, one element and a multiplicity, default = 1, denoted "1'x",
- a sortref and
Multiset - or just a sortref (not a multisetsort), uses all sortelements, each with multiplicity 1.
Are mapping to Multisets.jl implementation: Create empty Multiset{T}() then fill. If we have an element we can use typeof(x) to deduce T. If we have a basis sort definition we use eltype(basis) to deduce T.
Usages
- ⟨all⟩ wants all sortelements
- default marking, inscription want one element or zero elements (elements can be tuples),
we always find a sort to use, And use dummy elements for their typeof for empty multisets.
Expect to be called from a @matchable Terminterface, thusly:
eval(toexpr(Bag(basis, x, multi; net), variable_substitutions))eval(toexpr(Bag(basis); net), variable_substitutions))
PNML.post_flatten_verify — Function
Verify a PnmlNet after it has been flattened or is otherwise expected to be a single-page net.
PNML.postset — Method
postset(net, id) -> IteratorIterate ids of output (arc's target) for source transition or place id.
See PNet.out_inscriptions and PNet.transition_function`).
PNML.preset — Method
preset(net, id) -> IteratorIterate ids of input (arc's source) for output transition or place id.
See PNet.in_inscriptions and PNet.transition_function.
PNML.productsort — Function
Lookup productsort with id.
PNML.productsorts — Function
Return dictionary of ProductSort
PNML.rates — Function
rates(net::PnmlNet) -> [id(transition) => rate_value(transition)]Return a vector of transitionid=>ratevalue.
We allow all PNML nets to be stochastic Petri nets. See rate_value.
PNML.refid — Function
refid(x) -> REFIDReturn reference id symbol. Multiple objects may hold the same refid value.
PNML.refplace — Function
Return reference place matching id.
PNML.refplace_idset — Function
refplace_idset(x) -> OrderedSet{Symbol}Return reference place pnml ids.
PNML.refplaces — Function
Return vector of all reference places.
PNML.reftransition — Function
Return reference transition matching id.
PNML.reftransition_idset — Function
reftransition_idset(x) -> OrderedSet{Symbol}Return reference transition pnml ids.
PNML.reftransitions — Function
Return vector of all reference transitions.
PNML.registry_of — Method
Return IDRegistry of a PnmlNet.
PNML.save_config! — Method
save_config!(config::PnmlConfig)Save a configuration to your LocalPreferences.toml file using Preferences.jl. The saved preferences will be automatically loaded next time you do using PNML
Examples
julia> using PNML
julia> PNML.CONFIG[].verbose = true;
julia> PNML.CONFIG[].warn_on_unclaimed = true; # Customize some defaults
julia> PNML.save_config!(PNML.CONFIG[]); # Will be automatically read next time you `using PNML`PNML.sortdefinition — Function
sortdefinition(::NamedSort) -> SortReturn concrete sort attached to a sort declaration object.
Dictionaries in a network-level DeclDict hold, among other things, NamedSort, ArbitrarySort and PartitionSort declarations. These declarations add an ID and name to a concrete sort, with the ID symbol used as the dictionary key.
PNML.sortelements — Function
sortelements(x, net) -> IteratorReturn iterator over elements of the sort of x in net.
PNML.sortelements — Method
sortelements(ms::PnmlMultiset, net::APN) -> iteratorIterates over elements of the basis sort. May not be a finite sort!
PNML.sortof — Function
sortof(x[, net]) -> AbstractSortReturn the sort of an object or type.
Often implemented as sortdefinition(namedsort(net, sortref(x))). Default implementation is identity.
We provide a sort for some Julia types: Integer, Int64, Float64. Used for PTNet.
PNML.sortref — Function
sortref(x) -> SortRefReturn a REFID wrapped in a SortRef ADT.
Things that have a sortref include: Place, Arc, Inscription, Marking, MultisetSort, SortType, NumberConstant, Int64, Integer, Float64, FEConstant, FiniteIntRangeConstant, DotConstant, BooleanConstant, PnmlMultiset, Operator, Variable,
PNML.source — Method
source(arc) -> SymbolReturn identity symbol of source of arc.
PNML.src_arcs — Function
PNML.sufficient_tokens! — Function
sufficient_tokens!(enabled_dict, mark_dict, net::AbstractPnmlNet)Update each enabled transition's state in enabled_dict by testing that all its input places have enough tokens.
PNML.target — Method
target(arc) -> SymbolReturn identity symbol of target of arc.
PNML.text_content — Function
Find first :text and return its :content as string.
PNML.tgt_arcs — Function
PNML.to_sort — Method
to_sort(sortref::SortRef, ddict::DeclDict) -> AbstractSortReturn concrete sort from net using the REFID in sortref,
PNML.transition — Function
PNML.transition_guard! — Function
transition_guard!(enabled_dict, mark_dict, net::AbstractPnmlNet)Update each enabled transition's state in enabled_dict by testing its condition.
PNML.transition_idset — Function
PNML.transitions — Function
Return iterator of all transitions.
PNML.unwrap_namedsort — Method
If a is a NamedSortRef return its sortdefinition, otherwise return a.
PNML.unwrap_pmset — Method
unwrap_pmset(mark) -> MultisetIf marking wraps a PnmlMultiset, extract a singleton.
PNML.useroperator — Function
Lookup useroperator with id.
PNML.useroperators — Function
Return dictionary of UserOperator
PNML.value — Function
value(x)Return value of x. Can be a wrapped value or a derived value. May return an Expr that returns the value when eval'ed.
PNML.value_type — Function
value_type(::Type{<AbstractLabel}, ::APNTD) -> TypeReturn the Type of a label's value.
PNML.variabledecl — Function
Lookup variable with id.
PNML.variabledecls — Function
Return dictionary of VariableDecl
PNML.varsubs — Function
varsubs(transition) -> Vector{NamedTuple}Access the variable substitutions of a transition.
Variable substitutions depend on the current marking. Cache value in transition field as part of enabling rule phase of a Petri net lifecycle.
PNML.verify! — Function
verify!(errors::Vector{String}, x, verbose::Bool, net::APN)PNML.verify — Method
verify(dd::DeclDict, verbose::Bool, net::APN) -> BoolPNML.verify — Method
Error if any diagnostic messages are collected. Especially intended to detect semantc error.
PNML.verify_ids! — Method
verify_ids!(errors, str, iterable, net::APN) -> Vector{String}Iterate over iterable testing that pid is registered in net. str used in message appended to errors vector of strings.
PNML.version — Function
"Version of tool for this tool specific information element and its parser."
PNML.vertex_codes — Method
pnml id symbol mapped to graph vertex code.
PNML.vertex_data! — Method
Fill dictionary where keys are pnml ids, values are tuples of vertex code, place or transition.
PNML.vertex_labels — Method
graph vertex code mapped to pnml id symbol.
PNML.zero_marking — Method
Return zero-valued object with same basis and eltype as place's marking.
Used in enabling and firing rules to deduce type of Arc's adjacent_place.
PNML.SortRefImpl — Module
SortRefImplSortRefImpl is the name of the Module created by Moshi @data to hold an ADT.
Each variant has a REFID Symbol that indexes one of the dictionaries in the network's declaration dictionary collection (DeclDict).
The REFID will be in the network's IDRegistry.
UserSortRef is created from <usersort declaration="id" />.
We use NamedSortRef -> ConcreteSort to add a name and REFID to built-in sorts, thus making them accessable. This extends this decoupling (symbols instead of sorts) to anonymous sorts that are inlined.
PNML.ArcTypeEnum — Module
An EnumX.jl enum used to distinguish arc types.
PNML.PnmlTypes
PNML.PnmlTypes — Module
Petri Net Type Definition (pntd) URI mapped to AbstractPnmlType subtype singleton.
PNML.PnmlTypes.pnmltype_map — Constant
The key Symbols are the supported kinds of PNML Nets (PNTDs). Values are concrete singletons.
PNML.PnmlTypes.pntd_map — Constant
Map from Petri Net Type Definition (pntd) URI to Symbol. Allows multiple strings to map to the same pntd.
There is a companion map pnmltype_map that takes the symbol to a type object.
The URI is a string and may be the full URL of a pntd schema, just the schema file name, or a placeholder for a future schema.
For readability, the 'pntd symbol' should match the name used in the URI with inconvinient characters removed or replaced. For example, '-' is replaced by '_'.
PNML.PnmlTypes.APNTD — Type
Abbreviation for AbstractPnmlType
PNML.PnmlTypes.AbstractContinuousNet — Type
abstract type AbstractContinuousNet <: PNML.PnmlTypes.AbstractPnmlTypeUses floating point numbers for markings, inscriptions. Most of the functionality is shared with AbstractPnmlCore. This seperates the
PNML.PnmlTypes.AbstractHLCore — Type
abstract type AbstractHLCore <: PNML.PnmlTypes.AbstractPnmlTypeBase of High Level Petri Net pntds which add large extensions to PNML core. hlinitialMarking, hlinscription, and defined label structures.
See PnmlTypes.HLCoreNet, PnmlTypes.SymmetricNet, PnmlTypes.PT_HLPNG and others.
PNML.PnmlTypes.AbstractPnmlCore — Type
abstract type AbstractPnmlCore <: PNML.PnmlTypes.AbstractPnmlTypeBase of token/integer-based Petri Net pntds.
See PnmlCoreNet, PTNet and others.
PNML.PnmlTypes.AbstractPnmlType — Type
abstract type AbstractPnmlTypeAbstract root of a dispatch type based on Petri Net Type Definitions (pntd).
Each Petri Net Markup Language (PNML) <net> element will have a single URI as a required 'type' XML attribute. That URI should refer to a RelaxNG schema defining the syntax and semantics of the XML model. See ISO 15909-2, http://www.pnml.org/ for details.
Selected abbreviations and URIs that do not resolve to a valid schema file are suported by this tool. See pntd_map.
Refer to pntd_symbol and pnmltype for how to get from the URI to a singleton.
PNML.PnmlTypes.ContinuousNet — Type
struct ContinuousNet <: PNML.PnmlTypes.AbstractContinuousNetTODO: Continuous Petri Net
PNML.PnmlTypes.HLCoreNet — Type
struct HLCoreNet <: PNML.PnmlTypes.AbstractHLCoreHLCoreNet can be used for generic high-level nets. We try to implement and test all function at `PnmlCoreNet level, but expect to find use for a concrete type at this level for testing high-level extensions.
PNML.PnmlTypes.HLPNG — Type
struct HLPNG <: PNML.PnmlTypes.AbstractHLCoreHigh-Level Petri Net Graphs (HLPNGs) are the most intricate High-Level Petri Net schema. It extends SymmetricNet, including with
- declarations for sorts and functions (ArbitraryDeclarations)
- sorts for Integer, String, and List
PNML.PnmlTypes.PTNet — Type
struct PTNet <: PNML.PnmlTypes.AbstractPnmlCorePlace-Transition Petri Nets add small extensions to core PNML. Integer-valued initialMarking and inscription.
The grammer file is ptnet.pnml so we name it PTNet. Note that 'PT' is often the prefix for XML tags specialized for this net type.
PNML.PnmlTypes.PT_HLPNG — Type
struct PT_HLPNG <: PNML.PnmlTypes.AbstractHLCorePlace-Transition Net in HLCoreNet notation.
PNML.PnmlTypes.PnmlCoreNet — Type
struct PnmlCoreNet <: PNML.PnmlTypes.AbstractPnmlCoreThe most minimal concrete Petri Net.
Used to implement and test the core PNML support. Covers the complete graph infrastructure including labels attached to nodes and arcs.
PNML.PnmlTypes.SymmetricNet — Type
struct SymmetricNet <: PNML.PnmlTypes.AbstractHLCoreSymmetric Petri Net is the best-worked use case in the primer and ISO 15909 standard part 2.
PNML.PnmlTypes.add_nettype! — Method
add_nettype!(
dict::AbstractDict,
s::Symbol,
pntd::PNML.PnmlTypes.AbstractPnmlType
) -> AbstractDict
Add or replace mapping from Symbol s to APNTD singleton pntd.
PNML.PnmlTypes.all_nettypes — Method
all_nettypes([predicate])Return iterator over AbstractPnmlType singletons. Filtered by a predicate p if one is provided.
PNML.PnmlTypes.core_nettypes — Method
Useful for testing the 3 kinds of tokens corresponding to abstract subclasses of APNTD (or AbstractPnmlType) .
PNML.PnmlTypes.iscontinuous — Function
Tokens represented by floating point.
PNML.PnmlTypes.isdiscrete — Function
Tokens represented by integers.
PNML.PnmlTypes.ishighlevel — Function
Tokens represented by multiset (aka bag).
PNML.PnmlTypes.pnmltype — Function
pnmltype(pntd::APNTD) -> pntd
pnmltype(uri::AbstractString) -> APNTD
pnmltype(s::Symbol; pnmltype_map) -> APNTDMap either a text string or a symbol to a dispatch type object.
While that string may be a URI for a pntd, we treat it as a simple string without parsing. The PnmlTypes.pnmltype_map and PnmlTypes.pntd_map are both assumed to be correct here.
Unknown or empty uri will map to symbol :pnmlcore. Unknown symbol throws a DomainError exception.
Examples
jldoctest; setup=:(using PNML; using PNML: pnmltype, pntd_symbol)
julia> pnmltype(PnmlCoreNet())
PnmlCoreNet()
julia> pnmltype("nonstandard")
PnmlCoreNet()
julia> pnmltype(:symmetric)
SymmetricNet()PNML.PnmlTypes.pntd_symbol — Method
pntd_symbol(s::AbstractString) -> Symbol
Map string s to a pntd symbol using pntd_map. Any unknown s is mapped to :pnmlcore. Returned symbol is a key of pnmltype_map.
Examples
julia> PNML.PnmlTypes.pntd_symbol("foo")
:pnmlcorePNML.IDRegistrys
PNML.IDRegistrys — Module
Petri Net Markup Language identifier registry.
PNML.IDRegistrys.DuplicateIDException — Type
struct DuplicateIDException <: Exceptionmsg::String
PNML.IDRegistrys.IDRegistry — Type
Holds a set of PNML ID symbols and, optionally, a lock to allow safe reentrancy.
struct IDRegistryPNML.IDRegistrys.isregistered — Method
isregistered(
registry::PNML.IDRegistrys.IDRegistry,
id::Symbol
) -> Bool
Return true if id is registered in registry.
PNML.IDRegistrys.register_id! — Method
register_id!(
registry::PNML.IDRegistrys.IDRegistry,
id::Symbol
) -> Symbol
Register id symbol and return the symbol.
PNML.IDRegistrys.reset_reg! — Method
reset_reg!(
registry::PNML.IDRegistrys.IDRegistry
) -> PNML.IDRegistrys.IDRegistry
Empty the set of id symbols. Use case is tests.
PNML.Sorts
PNML.Sorts — Module
Part of the high-level pnml many-sorted algebra. See SortType.
NamedSort is a SortDecl (SortDeclaration) that gives a name and id to a Sort.
The pnml standard sometimes uses overlapping language. And explains little, expecting one to be knowledgeable about colored petri nets.
From the 'primer': built-in sorts of Symmetric Nets are the following: booleans, integerrange, finite enumerations, cyclic enumerations, products, dots and partitions.
And more sorts for HLPNG: integer, strings, list
With additions we made: real.
Oh, also ArbitrarySorts.
#! XXX The eltype is expected to be a concrete subtype of Number such as Int, Bool or Float64.
Extras
Notes:
NamedSortis a Declarations.SortDeclarationHLPNGaddsArbitrarySort.PartitionSortis called "Partition" in the standard.SortRefholds the id symbol of a concrete sort.- We use sorts even for non-high-level nets.
- Expect
eltype(::AbstractSort)to return a concrete subtype ofNumber.
PNML.Sorts.BoolSort — Type
Built-in sort whose eltype is Bool
Operators: and, or, not, imply
Functions: equality, inequality
PNML.Sorts.CyclicEnumerationSort — Type
struct CyclicEnumerationSort <: PNML.Sorts.EnumerationSortOrderedcollection of REFIDs into feconstant(net).
Operations differ between EnumerationSorts. All wrap a tuple of symbols and metadata, allowing attachment of Partition/PartitionElement.
See ISO/IEC 15909-2:2011/Cor.1:2013(E) defect 11 power or nth successor/predecessor
MCC2023/SharedMemory-COL-100000 has cyclic enumeration with 100000 <feconstant> elements.
PNML.Sorts.DotSort — Type
DotSortBuilt-in sort whose eltype is Bool, the smallest Integer subtype that can represent one.
PNML.Sorts.EnumerationSort — Type
abstract type EnumerationSort <: PNML.AbstractSortSee FiniteEnumerationSort, CyclicEnumerationSort. Both hold an ordered collection of FEConstant REFIDs.
PNML.Sorts.FiniteEnumerationSort — Type
FiniteEnumerationSort(ntuple) -> FiniteEnumerationSort{M}Wraps a collection of FEConstant REFIDs. Usage: feconstant(net)[refid].
PNML.Sorts.FiniteIntRangeSort — Type
struct FiniteIntRangeSort{T<:Integer} <: PNML.AbstractSortFiniteIntRangeSort(start::T, stop::T) where {T<:Integer}PNML.Sorts.IntegerSort — Type
Built-in sort whose eltype is Int
PNML.Sorts.ListSort — Type
struct ListSort{T<:PNML.SortRefImpl.var"typeof(SortRefImpl)"} <: PNML.AbstractSortPNML.Sorts.MultisetSort — Type
struct MultisetSort <: PNML.AbstractSortWrap a SortRef. Warning: do not cause recursive multiset Sorts.
PNML.Sorts.NaturalSort — Type
Built-in sort whose eltype is Int
PNML.Sorts.NullSort — Type
Built-in sort whose eltype is Nothing
PNML.Sorts.PositiveSort — Type
Built-in sort whose eltype is Int
PNML.Sorts.ProductSort — Type
struct ProductSort{N, P<:PNML.AbstractPnmlNet} <: PNML.AbstractSortAn ordered collection of sorts. The elements of the sort are tuples of elements of each sort.
ISO 15909-1:2019 Concept 14 (color domain) finite cartesian product of color classes. Where sorts are the syntax for color classes and ProductSort is the color domain.
PNML.Sorts.RealSort — Type
Built-in sort whose eltype is Float64
PNML.Sorts.StringSort — Type
struct StringSort <: PNML.AbstractSortPNML.Sorts.builtin_sorts — Method
Set of sort IDs that are considered builtin.
PNML.Sorts.isbuiltinsort — Method
isbuiltinsort(::Symbol) -> BoolIs tag in builtin_sorts().
PNML.Sorts.make_sortref — Function
make_sortref(net, dict, sort, seed, id, name) -> SortRef`dictis a method/callable that returns an AbstractDict a DeclDict attached tonet.sortia a concrete sort that is to be indict.seedis passed togensymifidisnothingand nosortis already indict.idis aSymboland the stringnamearenothingand "" unless there is a wrapper providing such information,
Uses fill_sort_tag!.
Return concrete SortRef matching dict, wrapping id.
PNML.Sorts.refs — Method
refs(sort::EnumerationSort) -> Vector{REFID}Return Vector of FEConstant REFIDs.
PNML.Sorts.sorts — Function
sorts(ps::ProductSort) -> Iterator
sorts(psr::SortRef, net::APN) -> IteratorReturn iterator over SortRefs to sorts in the product of sorts.
PNML.sortelements — Method
Elements of boolean sort
PNML.sortelements — Method
sortelements(sort::EnumerationSort, ::APN) -> IteratorReturn iteratable ordered collection of keys into feconstant(net) dictionary.
PNML.sortelements — Method
Return iterator from start to stop, inclusive.
PNML.Declarations
PNML.Declarations.AbstractDeclaration — Type
abstract type AbstractDeclarationDeclarations define objects/names that are used for high-level terms in conditions, inscriptions, markings. The definitions are attached to PNML nets and/or pages using a PNML Label defined in a <declarations> tag.
- id
- name
- net
PNML.Declarations.ArbitraryOperator — Type
struct ArbitraryOperator{N<:PNML.AbstractPnmlNet} <: PNML.Declarations.OperatorDeclarationid::Symbolname::Union{SubString{String}, String}declaration::Symbolnet::PNML.AbstractPnmlNet
...arbitrary sorts and operators do not come with a definition of the sort or operation;
they just introduce a new symbol.
Like ArbitrarySort, does not have an associated algebra, not usable by SymmetricNet.
PNML.Declarations.ArbitrarySort — Type
struct ArbitrarySort{N<:PNML.AbstractPnmlNet} <: PNML.Declarations.SortDeclarationid::Symbolname::Union{SubString{String}, String}net::PNML.AbstractPnmlNet
Arbitrary sorts that can be used for constructing terms are reserved for/supported by HLPNG in the pnml standard.
...arbitrary sorts and operators do not come with a definition of the sort or operation;
they just introduce a new symbol.
Like ArbitraryOperator, does not have an associated algebra, not usable by SymmetricNet.
PNML.Declarations.NamedOperator — Type
struct NamedOperator{T, N<:PNML.AbstractPnmlNet} <: PNML.Declarations.OperatorDeclarationid::Symbolname::Union{SubString{String}, String}parameter::Vector{PNML.Declarations.VariableDeclaration}def::Anynet::PNML.AbstractPnmlNet
See UserOperator.
Vector of VariableDeclaration for parameters (ordered), and duck-typed AbstractTerm for its body.
PNML.Declarations.NamedSort — Type
struct NamedSort{S<:PNML.AbstractSort, N<:PNML.AbstractPnmlNet} <: PNML.Declarations.SortDeclarationid::Symbolname::Union{SubString{String}, String}def::PNML.AbstractSortnet::PNML.AbstractPnmlNet
Declaration of a NamedSort gives an id and name to a concrete instance of a built-in AbstractSort. The sort defined in the XML file may be shared with other named sorts.
See MultisetSort, PartitionSort, PartitionSort. These are all Declaration subtypes in the UML2/RelaxNG parts of ISO 15909-2:2011 which has a strong Java bias. The text on the standard states they are also sort-like. We use a different type system.
PNML.Declarations.OperatorDeclaration — Type
abstract type OperatorDeclaration <: PNML.AbstractSortNamedOperator. FEConstant, PartitionElement and ArbitraryOperator are all referenced by UserOperator.
UserOperator wraps REFID used to access DeclDict.
PNML.Declarations.PartitionElement — Type
PartitionElement(id::Symbol, name, Vector{IDREF}, REFID)id::Symbolname::Union{SubString{String}, String}terms::Vector{Symbol}partition::Symbol
Establishes an equivalence class over a Declarations.PartitionSort's emumeration. See also FiniteEnumerationSort. Gives a name to an element of a partition. The element is an equivalence class.
PartitionElement is different from FiniteEnumeration, CyclicEnumeration, FiniteIntRangeSort in that it holds UserOperators, not FEConstants. The UserOperator refers to the FEConstants of the sort over which the partition is defined. NB: FEConstants are 0-arity operators. UserOperator is how operation declarations are accessed.
NB: The "PartitionElementOf" operator maps each element of the FiniteEnumeration (referenced by the partition) to the PartitionElement (of the partition) to which it belongs.
PartitionElementOf(partition, feconstant) -> PartitionElement partitionelementof(partition, feconstant) -> PartitionElement
PartitionElementOf is passed a REFID of the partition whose PartitionElement membership is being queried.
Each PartitionElement contains a collection of REFIDs to UserOperators which refer to a finite sort's (FiniteEnumeration, CyclicEnumeration, FiniteIntRangeSort) FEConstant by REFID.
Test for membership by iterating over each partition element, and over each term.
PNML.Declarations.PartitionSort — Type
struct PartitionSort{N<:PNML.AbstractPnmlNet} <: PNML.Declarations.SortDeclarationid::Symbolname::Union{SubString{String}, String}def::PNML.SortRefImpl.var"typeof(SortRefImpl)"elements::Vector{PNML.Declarations.PartitionElement}net::PNML.AbstractPnmlNet
Partition sort declaration is a finite enumeration that is partitioned into sub-ranges of enumerations. Is the sort at the partition or the element level (1 sort or many sorts?)
Like NamedSort, will add an id and name to a sort, may be accessed by UserSortRef indirection.
PNML.Declarations.SortDeclaration — Type
abstract type SortDeclaration <: PNML.AbstractSortSee Declarations.NamedSort, Declarations.PartitionSort and [Declarations.ArbitrarySort] as concrete subtypes.
PNML.Declarations.UnknownDeclaration — Type
struct UnknownDeclaration{N<:PNML.AbstractPnmlNet} <: PNML.Declarations.AbstractDeclarationid::Symbolname::Union{SubString{String}, String}nodename::Union{SubString{String}, String}content::PNML.AnyElementnet::PNML.AbstractPnmlNet
PNML.Declarations.VariableDeclaration — Type
struct VariableDeclaration{N<:PNML.AbstractPnmlNet} <: PNML.Declarations.AbstractDeclarationid::Symbolname::Union{SubString{String}, String}sort::PNML.SortRefImpl.var"typeof(SortRefImpl)"net::PNML.AbstractPnmlNet
Variable declaration <variabledecl> adds a name string and sort to the id shared with <variable> terms in non-ground terms.
EXAMPLE
variabledecls[id] = VariableDeclaration(id, "human name", sort)
PNML.Declarations.contains — Function
Return Bool true if partition contains the FEConstant
PNML.Declarations.element_ids — Method
Iterator over partition element REFIDs of a `PartitionSort
PNML.Declarations.element_names — Method
Iterator over partition element names
PNML.PnmlGraphics
PNML.Labels.PnmlGraphics — Module
PnmlGraphics holds CSS-like data. Can be attached to 'AbstractPnmlObject`s andAnnotation label parts of PnmlNets.
PNML.Labels.PnmlGraphics.Fill — Type
Fill attributes as strings.
struct Fillcolor::Stringimage::Stringgradient_color::Stringgradient_rotation::String
PNML.Labels.PnmlGraphics.Font — Type
Font attributes as strings.
struct Fontfamily::Stringstyle::Stringweight::Stringsize::Stringalign::Stringrotation::Stringdecoration::String
PNML.Labels.PnmlGraphics.Graphics — Type
PNML Graphics can be attached to 'AbstractPnmlObjects andAnnotation` label parts of Pnml models.
struct Graphics{T<:Float32}dimension::PNML.Coordinatefill::PNML.Labels.PnmlGraphics.Fillfont::PNML.Labels.PnmlGraphics.Fontline::PNML.Labels.PnmlGraphics.Lineoffset::PNML.Coordinatepositions::Vector{PNML.Coordinate}
PNML.Labels.PnmlGraphics.Line — Type
Line attributes as strings.
struct Linecolor::Stringshape::Stringstyle::Stringwidth::String
PNML.Labels
PNML.Labels.ArcType — Type
struct ArcType <: PNML.Annotationtext::Stringarctype::PNML.ArcTypeEnum.Tgraphics::Union{Nothing, PNML.Labels.PnmlGraphics.Graphics}toolspecinfos::Union{Nothing, Vector{PNML.Labels.ToolInfo}}
Arc type label.
PNML.Labels.Condition — Type
(c::Condition)(args) -> BoolUse args, a dictionary of variable substitutions into the expression to return a Bool.
PNML.Labels.Condition — Type
struct Condition{T<:PNML.Expressions.PnmlExpr, N<:PNML.AbstractPnmlNet} <: PNML.HLAnnotationtext::Union{Nothing, String}term::PNML.Expressions.PnmlExprgraphics::Union{Nothing, PNML.Labels.PnmlGraphics.Graphics}toolspecinfos::Union{Nothing, Vector{PNML.Labels.ToolInfo}}vars::Vector{Symbol}net::PNML.AbstractPnmlNet
Label a Transition with an boolean expression used to determine when/if the transition fires.
There may be other things evaluating to boolean used to determine transition firing filters, including: priority labels, inhibitor arc, place capacity labels, time/delay labels. ```
PNML.Labels.Declaration — Type
struct Declaration <: PNML.Annotationtext::Union{Nothing, String}ddict::PNML.DeclDictgraphics::Union{Nothing, PNML.Labels.PnmlGraphics.Graphics}toolspecinfos::Union{Nothing, Vector{PNML.Labels.ToolInfo}}
Label of a <net> or <page> that holds zero or more declarations. The declarations are used to define parts of the many-sorted algebra used by High-Level Petri Nets.
All the declarations in the <structure> are placed into a single per-net dictionary collection ddict. The text, graphics, and toolspecinfos fields are expected to be nothing, but are present because, being labels, it is allowed.
PNML.Labels.HLLabel — Type
struct HLLabel{PNTD} <: PNML.HLAnnotationtext::Union{Nothing, String}structure::Union{Nothing, PNML.AnyElement}graphics::Union{Nothing, PNML.Labels.PnmlGraphics.Graphics}toolspecinfos::Union{Nothing, Vector{PNML.Labels.ToolInfo}}
High-level pnml labels are expected to have <text> and <structure> elements. This concrete type is for "unclaimed" labels in a high-level petri net.
PNML.Labels.Inscription — Type
struct Inscription{T<:PNML.Expressions.PnmlExpr, N<:PNML.AbstractPnmlNet} <: PNML.HLAnnotationtext::Union{Nothing, String}term::PNML.Expressions.PnmlExprgraphics::Union{Nothing, PNML.Labels.PnmlGraphics.Graphics}toolspecinfos::Union{Nothing, Vector{PNML.Labels.ToolInfo}}vars::Vector{Symbol}net::PNML.AbstractPnmlNet
Labels an Arc with a expression term .
Inscription(t::PnmlExpr)() is a functor evaluating the expression and returns a value of the eltype of sort of inscription.
PNML.Labels.Marking — Type
struct Marking{T<:PNML.Expressions.PnmlExpr, N<:PNML.AbstractPnmlNet} <: PNML.Annotationterm::PNML.Expressions.PnmlExprtext::Union{Nothing, String}graphics::Union{Nothing, PNML.Labels.PnmlGraphics.Graphics}toolspecinfos::Union{Nothing, Vector{PNML.Labels.ToolInfo}}net::PNML.AbstractPnmlNet
Label of Place.
Is a functor that returns the value. ```
PNML.Labels.Marking — Method
Evaluate Marking instance by evaluating term expression.
Place/Transition Nets (and ContinuousNet) use collective token identity (map to Number). High-level Nets (SymmetricNet, HLPNG) use individual token identity (colored petri nets).
There is a multi-sorted algebra definition mechanism defined for HL Nets. HL Net Marking values are a ground terms of this multi-sorted algebra.
Used to initialize a marking vector that will then be updated by firing a transition.
PNML.Labels.Name — Type
struct Name <: PNML.Annotationtext::Stringgraphics::Union{Nothing, PNML.Labels.PnmlGraphics.Graphics}toolspecinfos::Union{Nothing, Vector{PNML.Labels.ToolInfo}}
Name is for display, possibly in a tool specific way.
PNML.Labels.NupnTool — Type
struct NupnToolnplaces::Int64ntransitions::Int64narcs::Int64nunits::Int64root::Symbolsafe::Boolunits::Vector{PNML.Labels.NupnUnit}
NupnTool is <toolspecific> content. Will be attached to a ToolInfo. Wraps an AnyElement.
PNML.Labels.PnmlLabel — Type
struct PnmlLabel{T, N<:PNML.AbstractPnmlNet} <: PNML.Annotationtag::Union{SubString{String}, String, Symbol}elements::Anynet::PNML.AbstractPnmlNet
Wrap a PNML Label as parsed by XMLDict. Use the XML tag as identifier.
Used for "unclaimed" labels that do not have, or we choose not to use, a dedicated parse method. Claimed labels will have a type/parser defined to make use of the structure defined by the pntd schema.
See also AnyElement which allows any well-formed XML, while PnmlLabel is restricted to PNML Labels.
PNML.Labels.Priority — Type
struct Priority{T<:PNML.Expressions.PnmlExpr, N<:PNML.AbstractPnmlNet} <: PNML.Annotationtext::Union{Nothing, String}term::PNML.Expressions.PnmlExprgraphics::Union{Nothing, PNML.Labels.PnmlGraphics.Graphics}toolspecinfos::Union{Nothing, Vector{PNML.Labels.ToolInfo}}net::PNML.AbstractPnmlNet
Real valued label. An expected use is as a static transition Priority. Expected XML: <priority> <text>0.3</text> </priority>.
Dynamic priority is a function with arguments of net marking and transition.
PNML.Labels.Rate — Type
struct Rate{T<:PNML.Expressions.PnmlExpr, N<:PNML.AbstractPnmlNet} <: PNML.Annotationtext::Union{Nothing, String}term::PNML.Expressions.PnmlExprgraphics::Union{Nothing, PNML.Labels.PnmlGraphics.Graphics}toolspecinfos::Union{Nothing, Vector{PNML.Labels.ToolInfo}}net::PNML.AbstractPnmlNet
Real valued label. An expected use is as a transition rate. Expected XML: <rate> <text>0.3</text> </rate>.
PNML.Labels.SortType — Type
struct SortType{N<:PNML.AbstractPnmlNet} <: PNML.Annotationtext::Union{Nothing, String}sort_::PNML.SortRefImpl.var"typeof(SortRefImpl)"graphics::Union{Nothing, PNML.Labels.PnmlGraphics.Graphics}toolspecinfos::Union{Nothing, Vector{PNML.Labels.ToolInfo}}net::PNML.AbstractPnmlNet
A places's <type> label wraps a UserSortRef that holds a REFID to the sort of a place, hence use of sorttype. It is the type (or set) concept of the many-sorted algebra.
For high-level nets there will be a declaration section with a rich language of sorts using UserSortFRef, NamedSort, PartitionSort or ArbitrarySort defined in the xml input.
For other PnmlNet's they are used internally to allow common implementations.
defines the type by referring to some sort; by the fixed interpretation of built-in sorts,
this sort defines the type of the place.
By the fixed interpretation of sorts, this implicitly refers to a set, which is the type of that place.
"refers to set" excludes multiset (as stated elsewhere in standard)
this is a sort, not a term, so no variables or operators.
The initial marking function M0 is defined by the label Marking of the places. ... this is a ground term of the corresponding multiset sort.
Ground terms have no variables and can be evaluated outside of a transition firing rule.
PNML.Labels.TestTool — Type
struct TestTool{T}info::PNML.AnyElement
TestTool is <toolspecific> content. Will be attached to a ToolInfo. Wraps an AnyElement.
PNML.Labels.Time — Type
struct Time{T<:PNML.Expressions.PnmlExpr, N<:PNML.AbstractPnmlNet} <: PNML.Annotationtext::Union{Nothing, String}term::PNML.Expressions.PnmlExprgraphics::Union{Nothing, PNML.Labels.PnmlGraphics.Graphics}toolspecinfos::Union{Nothing, Vector{PNML.Labels.ToolInfo}}net::PNML.AbstractPnmlNet
Real valued label. An expected use is for a Time Petri net. Expected XML: <time> <text>0.3</text> </time>.
Dynamic time is a function with arguments of net marking and transition.
PNML.Labels.TokenGraphics — Type
struct TokenGraphicspositions::Vector{PNML.Coordinate}
TokenGraphics is <toolspecific> content. Will be attached to a ToolInfo that also holds the tool name and version. Combines the <tokengraphics> and <tokenposition> elements.
PNML.Labels.ToolInfo — Type
struct ToolInfo{T, N<:PNML.AbstractPnmlNet}toolname::Stringversion::Stringinfo::Anynet::PNML.AbstractPnmlNet
A <toolspecific> tag holds well formed XML that is parsed into an AnyElement.
PNML.Labels._ci — Method
Map MathML constant string i to a Number. Supported: infin, infty.
PNML.Labels._match — Function
_match(tx, namerex::Regex, versionrex::Regex) -> BoolReturn true if both toolname and version match. Default is any version. Applies to ToolInfo, ToolParser, and other objects with a name and version method.
PNML.Labels.def_sort_element — Method
def_sort_element(x, net)Return an arbitrary element of sort x. All sorts are expected to be iteratable and non-empty, so we return first. Uses include default inscription value and default initial marking value sorts.
x can be anything with a sortelements(x, net) method that returns an iterator with length. See AbstractSort, SortType.
PNML.Labels.default — Function
default(::Type{T<:AbstractLabel}, pntd::APNTD, net::APN) -> TReturn a default instance of label T for pntd.
PNML.Labels.default — Method
default(
_::Type{<:PNML.Labels.Marking},
pntd::PNML.PnmlTypes.AbstractPnmlType,
placetype::PNML.Labels.SortType,
net::PNML.AbstractPnmlNet
) -> PNML.Labels.Marking{T} where T<:(PNML.Expressions.Bag{_A, Int64} where _A)
Return default marking value based on APNTD. Has meaning of empty, as in zero. For high-level nets, the marking is an empty multiset whose basis matches placetype. Others have a marking that is a Number.
PNML.Labels.default_typesort — Function
Return SortRef for default SortType of a PNTD.
PNML.Labels.delay_content_parser — Method
delay_content_parser(label, value_type) -> TupleSee delay_value
PNML.Labels.delay_value — Method
delay_value(
t;
tag,
valtype,
content_parser,
default_value
) -> Tuple{Any, Float64, Union{Bool, Float64}}
Return transition delay label value as interval tuple: ("closure-string", left, right) Missing delay labels default to ("closed", 0.0, 0.0) a.k.a. zero.
All net types may have a delay. Expected label content copied from MathML. Only non-negative. ℝ⁺ static transition #TODO define term Supports
- ("closed-open", 0.0, ∞) -> [0.0, ∞)
- ("open-closed", 2.0, 6.0 -> (2.0, 6.0]
- ("open", 2.0, 6.0) -> (2.0, 6.0)
- ("closed", 2.0, 6.0) -> [2.0, 6.0]
PNML.Labels.get_toolinfo — Method
get_toolinfo(infos, toolname[, version]) -> Maybe{ToolInfo}Call get_toolinfos.
PNML.Labels.get_toolinfos — Function
get_toolinfos(infos, toolname[, version]) -> Maybe{ToolInfo}Return first toolinfo in iteratable collection infos having a matching toolname and version.
PNML.Labels.get_toolinfos — Method
get_toolinfos(infos, toolname::Regex, version::Regex) -> Iteratorinfos may be a ToolInfo or collection of ToolParser, both have a name and version. Return iterator over infos matching toolname and version regular expressions.
PNML.Labels.info — Method
Content of a ToolInfo.
PNML.Labels.label_value — Method
label_value(n::AbstractPnmlNode, tag::Symbol, type) -> x::typeIf there is a label tag in n.extralabels, return its value, else return a default value of the correct Type type.
PNML.Labels.priority_value — Method
priority_value(t) -> RealReturn value of a Priority label. Missing priority labels are defaulted to one.
Expected label XML: <priority> <text>0.3</text> </priority>
Arguments
`t` is anything that supports `get_label(t, tag)`.PNML.Labels.rate_value — Method
rate_value(t) -> RealReturn value of a Rate label. Missing rate labels are defaulted to zero.
Expected label XML: <rate> <text>0.3</text> </rate>
Arguments
`t` is anything that supports `get_label(t, tag)`.PNML.Labels.text — Method
Return text field. All labels are expected to have one that may be nothing or an empty string.
PNML.Labels.time_value — Method
time_value(t) -> RealReturn value of a Time label. Missing time labels are defaulted to one.
Expected label XML: <time> <text>0.3</text> </time>
Arguments
`t` is anything that supports `get_label(t, tag)`.PNML.Labels.validate_toolinfos — Method
validate_toolinfos(infos, dd) -> BoolValidate each ToolInfo in the iterable infos collection.
Note that each info will contain an AbstractDict representing well-formed XML.
PNML.Parser
PNML.Parser — Module
Parser module of PNML.
See LabelParser, (ToolParser)(@ref).
PNML.Parser.pnml_ns — Constant
Namespace expected for pnml XML.
PNML.Parser.ParseInscriptionTerm — Type
ParseInscriptionTerm( FunctorHolds source & target parameters for parsing an inscription. The sort of the inscription must match the place sorttype. Input arcs (source is a transition) and output arcs (source is a place) called as (pit::ParseInscriptionTerm)(::XMLNode, ::APNTD)
PNML.Parser.ParseMarkingTerm — Type
ParseMarkingTerm(defsort) -> FunctorHolds parameters for parsing when called as (f::T)(::XMLNode, ::APNTD)
PNML.Parser.TermJunk — Type
TermJunkparse_term returns a triple of: PnmlExpr, SortRef, NTuple{N,REFID}
PNML.Parser.XMLNode — Type
Alias for EzXML.Node
PNML.Parser.__parse_page! — Method
__parse_page!(net, page_node, pntd, pageid) -> PageReturn Page. pageid already parsed from page_node.
PNML.Parser.add_label! — Method
add_label!(collection, node, pntd) -> AbstractDictParse and add PnmlLabel to collection, return collection.
See AbstractPnmlObject for those XML entities that have labels. Any "unknown" XML is presumed to be a label.
PNML.Parser.add_toolinfo! — Method
add_toolinfo!(collection, node, pntd, parse_contex) -> collectionParse and add ToolInfo to infos collection, return infos.
The UML from the pnml primer (and schemas) use <toolspecific> as the tag name for instances of the type ToolInfo.
PNML.Parser.add_toolinfo — Method
add_toolinfo(infos::Maybe{collection}, node::XMLNode, pntd, parse_contex) -> collectionAllocate storage for infos on first use. Then add to infos.
PNML.Parser.allchildren — Function
allchildren(node::XMLNode, tag::AbstractString) -> Vector{XMLNode}Return vector of el's immediate children with tag.
PNML.Parser.alldecendents — Function
alldecendents(node::XMLNode, tag::AbstractString) -> Vector{XMLNode}Return vector of node's immediate children and decendents with tag.
PNML.Parser.anyelement — Method
anyelement(tag::Symbol, node::EzXML.Node) -> PNML.AnyElement
Return AnyElement holding a well-formed XML node. See ToolInfo for one intended use-case.
PNML.Parser.attribute — Function
attribute(node::EzXML.Node, key::AbstractString) -> String
attribute(
node::EzXML.Node,
key::AbstractString,
msg::String
) -> String
Return XML attribute value.
PNML.Parser.fill_decl_dict! — Method
fill_decl_dict!(net::APN, node::XMLNode, pntd::APNTD) -> NothingAdd a <declaration><structure><declarations> to DeclDict. <declaration> may be attached to <net> and/or <page> elements. Are network-level values even if attached to pages.
PNML.Parser.find_toolinfos! — Method
find_toolinfos!(toolspecinfos, node, pntd, net) -> toolinfosCalls add_toolinfo(toolspecinfos, info, pntd, net) for each info found. See Labels.get_toolinfos for accessing ToolInfos.
PNML.Parser.firstchild — Function
firstchild(node::XMLNode, tag::AbstractString) -> Maybe{XMLNode}Return first immediate child of el that is a tag or nothing.
PNML.Parser.kw! — Method
Add XMLNode attribute, value pair to dictionary.
PNML.Parser.nupn_content — Method
nupn_content(node::XMLNode, pntd::APNTD) -> NupnToolParse ToolInfo content. Example:
<toolspecific tool="nupn" version="1.1">
<size places="P" transitions="T" arcs="A"/>
<structure units="U" root="R" safe="S">
<unit id="I">
<places>PL</places>
<subunits>UL</subunits>
</unit>
</structure>
</toolspecific>PNML.Parser.parse_arbitrarysort — Method
parse_arbitrarysort(
node::EzXML.Node,
pntd::PNML.PnmlTypes.AbstractPnmlType;
net
)
Returns concrete SortRef wraping the REFID of a ArbitrarySort.
PNML.Parser.parse_arc! — Method
Fill arcset, arcdict.
PNML.Parser.parse_arc — Method
parse_arc(node::XMLNode, pntd::APNTD) -> ArcConstruct an Arc with labels specialized for the APNTD.
PNML.Parser.parse_arctype — Method
parse_arctype(
node::EzXML.Node,
pntd::PNML.PnmlTypes.AbstractPnmlType;
net,
parentid
)
Return ArcType label holding <text> value. With optional <toolspecific> & <graphics> information.
PNML.Parser.parse_condition — Method
parse_condition(::XMLNode, ::APNTD; net::APN) -> ConditionLabel of transition node. Used in the enabling function.
Details
ISO/IEC 15909-1:2019(E) Concept 15 (symmetric net) introduces Φ(transition), a guard or filter function, that is and'ed into the enabling function. 15909-2 maps this to <condition> expressions.
Later concepts add filter functions that are also and'ed into the enabling function.
- Concept 28 (prioritized Petri net enabling rule)
- Concept 31 (time Petri net enabling rule)
We support PTNets having <condition> with same syntax as High-level nets. Condition has <text> and <structure> elements, with all meaning in the <structure> that holds an expression evaluating to a boolean value.
One field of a Condition holds a boolean expression, AbstractBoolExpr. Another field holds information on variables in the expression.
PNML.Parser.parse_condition_term — Method
parse_condition_term(::XMLNode, ::APNTD; net::APN) -> PnmlExpr, SortRef, TupleUsed as termparser by parse_label_content for Condition label of a Transition; will have a structure element containing a term.
PNML.Parser.parse_declaration! — Function
Fill DeclDict from one or more <declaration> labels.
Expected format: <declaration> <structure> <declarations> <namedsort/> <namedsort/> ...
Assume behavior with the meaning in a <structure> for all nets.
Note the use of both declaration and declarations. We allow repeated declaration (without the s) here. All fill the same DeclDict. See fill_decl_dict!
PNML.Parser.parse_feconstants — Method
parse_feconstants(::XMLNode, ::APNTD, ::SortRef; net::APN) -> Vector{Symbol}Place the constants into feconstants(net) dictionary and return vector of finite enumeration constant REFIDs.
Access as 0-ary operator indexed by REFID
PNML.Parser.parse_fifoinitialMarking — Method
parse_fifoinitialMarking(
node::EzXML.Node,
default_sorttype::Union{Nothing, PNML.Labels.SortType},
pntd::PNML.PnmlTypes.AbstractHLCore;
net,
parentid
)
FIFO initial marking labels are expected to have a <structure> child containing ground terms. Sort of marking term must be the same as placetype, the place's SortType.
NB: Will coexist with hlinitialMarkings. See also parse_initialMarking, parse_hlinitialMarking.
PNML.Parser.parse_graphics — Method
parse_graphics(
node,
pntd
) -> PNML.Labels.PnmlGraphics.Graphics{Float32}
Arcs, Annotations and Nodes have different graphics semantics. Return a Graphics holding the union of possibilities.
PNML.Parser.parse_graphics_coordinate — Method
parse_graphics_coordinate(node, pntd) -> PNML.Coordinate
Return Coordinate. Sandard seems to only use integers, we also allow real numbers.
PNML.Parser.parse_graphics_fill — Method
parse_graphics_fill(
node,
pntd
) -> PNML.Labels.PnmlGraphics.Fill
Return Fill
PNML.Parser.parse_graphics_font — Method
parse_graphics_font(
node,
pntd
) -> PNML.Labels.PnmlGraphics.Font
Return Font.
PNML.Parser.parse_graphics_line — Method
parse_graphics_line(
node,
pntd
) -> PNML.Labels.PnmlGraphics.Line
Return Line.
PNML.Parser.parse_hlinitialMarking — Method
parse_hlinitialMarking(
node::EzXML.Node,
default_sorttype::Union{Nothing, PNML.Labels.SortType},
pntd::PNML.PnmlTypes.AbstractHLCore;
net,
parentid
)
High-level initial marking labels are expected to have a <structure> child containing a ground term. Sort of marking term must be the same as placetype, the places SortType.
NB: Used by PTNets that assume placetype is DotSort(). See also parse_initialMarking, parse_fifoinitialMarking.
PNML.Parser.parse_hlinscription — Method
parse_hlinscription(
node::EzXML.Node,
source::Symbol,
target::Symbol,
pntd::PNML.PnmlTypes.AbstractHLCore;
net,
parentid
)
hlinscriptions are expressions.
PNML.Parser.parse_initialMarking — Method
parse_initialMarking(
node::EzXML.Node,
placetype::Union{Nothing, PNML.Labels.SortType},
pntd::PNML.PnmlTypes.AbstractPnmlType;
net,
parentid
)
Non-high-level APNTD initial marking parser. Most things are assumed to be Numbers. See also parse_hlinitialMarking, parse_fifoinitialMarking.
PNML.Parser.parse_inscription — Method
parse_inscription(
node::EzXML.Node,
source::Symbol,
target::Symbol,
pntd::PNML.PnmlTypes.AbstractPnmlType;
net,
parentid
)
Ignore the source & target symbols.
PNML.Parser.parse_label_content — Method
parse_label_content(node::XMLNode, termparser, pntd; net) -> NamedTupleParse top-level label node using a termparser callable applied to a <structure> element Return named tuple of: text, exp, sort, graphics, toolspecinfos, vars
Top-level labels are attached to nodes, such as: marking, inscription, condition. Each having a termparser.
Returns vars, a tuple of PNML variable REFIDs. Used in the muti-sorted algebra of High-level nets.
PNML.Parser.parse_name — Method
parse_name(
node::EzXML.Node,
pntd::PNML.PnmlTypes.AbstractPnmlType;
net,
parentid
)
Return Name label holding <text> value. With optional <toolspecific> & <graphics> information.
PNML.Parser.parse_namedoperator — Method
parse_namedoperator(
node::EzXML.Node,
pntd::PNML.PnmlTypes.AbstractPnmlType;
net
)
Declaration of an operator expression in many-sorted algebra.
An operator of arity 0 is a constant (ground-term, literal). When arity > 0, the parameters are variables, using a NamedTuple for values.
PNML.Parser.parse_namedsort — Method
parse_namedsort(
node::EzXML.Node,
pntd::PNML.PnmlTypes.AbstractPnmlType;
net
)
Declaration that wraps a Sort, adding an ID and name.
PNML.Parser.parse_net — Method
parse_net(node::XMLNode[; options...]) -> PnmlNetPnmlNet created from an <net> XMLNode.
Arguments
- pntd_override::Maybe{AbstractPnmlType}
PNML.Parser.parse_page! — Method
parse_page!(net, page_idset, page_node, pntd) -> NothingCall _parse_page! to create a page with its own netsets. Add created page to parent's page_idset and pagedict(net).
PNML.Parser.parse_partitionelement! — Method
parse_partitionelement!(elements::Vector{PartitionElement}, node::XMLNode rid::REFID; net::APN)Parse a <partitionelement> XML node, add FEConstant refids to the element and append element to the vector.
PNML.Parser.parse_place! — Method
Fill placeset, placedict.
PNML.Parser.parse_place — Method
parse_place(
node::EzXML.Node,
pntd::PNML.PnmlTypes.AbstractPnmlType,
net::PNML.AbstractPnmlNet
) -> Place
PNML.Parser.parse_refPlace! — Method
Fill refplaceset, refplacedict.
PNML.Parser.parse_refPlace — Method
parse_refPlace(
node::EzXML.Node,
pntd::PNML.PnmlTypes.AbstractPnmlType,
net::PNML.AbstractPnmlNet
) -> RefPlace
PNML.Parser.parse_refTransition! — Method
Fill reftransitionset, reftransitiondict.
PNML.Parser.parse_refTransition — Method
parse_refTransition(
node::EzXML.Node,
pntd::PNML.PnmlTypes.AbstractPnmlType,
net::PNML.AbstractPnmlNet
) -> RefTransition
PNML.Parser.parse_sort — Function
parse_sort([:Val{:tag},] node::XMLNode, pntd::APNTD,
id::Maybe{REFID}=nothing, name::String="";
net::APN) -> SortRefWhere tag is the XML element tag name. Used to dispatch to a specialized parser by assuming node is a sort.
#TODO id, name are added by/for declarations, anonymous sorts.
See also parse_sorttype_term, parse_namedsort, parse_variabledecl.
PNML.Parser.parse_sorttype — Method
parse_sorttype(
node::EzXML.Node,
pntd::PNML.PnmlTypes.AbstractPnmlType;
net,
parentid
)
Annotation Label that defines the "sort" of tokens held by the place and semantics of the marking. NB: The "type" of a place from many-sorted algebra is different from the Petri Net "type" of a net or "pntd". Neither is directly a julia type. Nor a pnml sort.
We allow all pntd's places to have a <type> label. Non-high-level net places are expecting a numeric sort: eltype(sort) <: Number.
PNML.Parser.parse_sorttype_term — Method
parse_sorttype_term(::XMLNode, ::APNTD; net::APN) -> PnmlExpr, SortRef, TupleThe PNML <type> of a <place> is a "sort" of the high-level many-sorted algebra. Because we are using the HL implementation with the other meta-models, we support it in all nets.
The term here is a concrete sort. It is possible to have an inlined concrete sort that is anonymous. We place all these concrete sorts in the decldict(net)` and pass around a SortRef.
See parse_sorttype for the rest of the AnnotationLabel structure.
PNML.Parser.parse_structure — Method
parse_structure(
node::EzXML.Node,
pntd::PNML.PnmlTypes.AbstractPnmlType;
net
)
For future support of structure elements in non-High-Level nets.
PNML.Parser.parse_term — Method
parse_term(node::XMLNode, ::APNTD; ddict) -> (PnmlExpr, sort, vars)
parse_term(::Val{:tag}, node::XMLNode, ::APNTD; ddict) -> (PnmlExpr, sort, vars)node is a child of a <structure>, <subterm> or <def> element with a nodename of tag.
All terms have a sort, #TODO ... document this XXX
Will be using TermInterface.jl to build an expression tree (AST) that can contain: operators, constants (as 0-arity operators), and variables.
AST expressions are evaluated for: - place initial marking vector, - enabling rule and - firing rule where condition and inscription expressions may contain non-ground terms (using variables).
PNML.Parser.parse_term — Method
`<gtp>` Partition element greater than.PNML.Parser.parse_text — Method
parse_text(
node::EzXML.Node,
_::PNML.PnmlTypes.AbstractPnmlType
) -> String
Return the stripped string of <text> node's content.
PNML.Parser.parse_tokengraphics — Method
parse_tokengraphics(
node::EzXML.Node,
pntd::PNML.PnmlTypes.AbstractPnmlType
) -> PNML.Labels.TokenGraphics
Parse place-transition net's (PTNet) toolspecific structure defined for token graphics. See Labels.TokenGraphics and parse_tokenposition.
PNML.Parser.parse_tokenposition — Method
parse_tokenposition(node, pntd) -> PNML.Coordinate
Return Cartesian Coordinate relative to containing element.
PNML.Parser.parse_toolspecific — Method
parse_toolspecific(node, pntd; net)
Return ToolInfo with tool & version attributes and content.
The content can be one or more well-formed xml elements.
PNML.Parser.parse_transition! — Method
Fill transitionset, transitiondict.
PNML.Parser.parse_transition — Method
parse_transition(
node::EzXML.Node,
pntd::PNML.PnmlTypes.AbstractPnmlType,
net::PNML.AbstractPnmlNet
) -> Transition
PNML.Parser.parse_unknowndecl — Method
parse_unknowndecl(
node::EzXML.Node,
pntd::PNML.PnmlTypes.AbstractPnmlType;
net
)
PNML.Parser.parse_usersort — Method
parse_usersort(
node::EzXML.Node,
pntd::PNML.PnmlTypes.AbstractPnmlType;
net
)
Return SortRef wraping the REFID of a NamedSort, ArbitrarySort. or PartitionSort declaration.
PNML.Parser.parse_variabledecl — Method
parse_variabledecl(node::XMLNode, pntd::APNTD; net::APN) -> VariableDeclarationVariable declarations associate an id, name and sort. Stored in DeclDict with key of id.
Variable declarationss may appear in the definition of an operator as well as directly in a declaration.
'<variabledecl>s' are referenced by '<variable>s' in terms.
Variables are used during enabling/firing a transition to identify tokens removed from input place markings, added to output place markings.
Variables are used to substitute tokens into expressions when evaluating terms.
PNML.Parser.pnml_namespace — Method
pnml_namespace(
node::EzXML.Node;
missing_ns_fatal,
default_ns
) -> String
Return namespace of node or default value pnml_ns with warning (or error).
PNML.Parser.pnmlmodel — Function
PNML.Parser.register_idof! — Method
register_idof!(
registry::PNML.IDRegistrys.IDRegistry,
node::EzXML.Node
) -> Symbol
Return registered symbol from id attribute of node. See IDRegistry.
PNML.Parser.subterms — Method
subterms(node, pntd; vars) -> Vector{PnmlExpr}, Tuple{REFID}Unwrap each <subterm> and parse into a PnmlExpr term. Collect expressions in a Vector and accumulate variable REFIDs in a Tuple.
PNML.Parser.tokengraphics_content — Method
tokengraphics_content(node::XMLNode, pntd::APNTD) -> TokenGraphicsParse ToolInfo content that is expected to be <tokengraphics>.
PNML.Parser.toolspecific_content_fallback — Method
toolspecific_content_fallback(node::XMLNode, pntd::APNTD) -> AnyElementContent of a <toolspecific>nodeas parsed byxmldict`.
PNML.Parser.unexpected_label! — Method
unexpected_label!(extralabels, child, tag, pntd; net, parentid)Apply a labelparser to child if one matches tag, otherwise call xmldict. Add to extralabels.
PNML.Parser.unwrap_subterm — Method
unwrap_subterm(st::XMLNode) -> XMLNode, SymbolUnwrap a <subterm> by returning tuple of child node and child's tag.
PNML.Parser.xmldict — Method
xmldict(node::XMLNode) -> Union{XmlDictType, String, SubString{String}}Return well formed XML as parsed by XMLDict.xml_dict. Symbols for attribute key, strings for element/child keys and strings for value of leaf.
See: anyelement, AnyElement,PnmlLabel
PNML.Parser.xmlnode — Method
xmlnode(s::AbstractString) -> EzXML.Node
Parse XML string s into a XMLNode.
PNML.Parser.@xml_str — Macro
Parse string into EzXML node.
See xmlnode.
PNML.Expressions
PNML.Expressions — Module
Expressions Module
PNML.Expressions.AbstractBoolExpr — Type
TermInterface boolean expression types.
All boolean expressions have a known sort :bool.
PNML.Expressions.AbstractOpExpr — Type
TermInterface operator expression types.
PNML.Expressions.Bag — Type
Bag: a TermInterface expression calling pnmlmultiset(basis, x, multi) to construct a PnmlMultiset.
PNML.Expressions.BooleanEx — Type
BooleanExTermInterface expression for a BooleanConstant.
PNML.Expressions.DotConstantEx — Type
DotConstantExTermInterface expression for a DotSort element.
PNML.Expressions.LiteralExpr — Type
LiteralExpr(ex)Literally ex, an Expr. toexpr on LiteralExpr recursively calls toexpr on any interpolated symbolic expressions.
PNML.Expressions.NumberEx — Type
NumberEx
TermInterface expression for a `<numberconstant>`.PNML.Expressions.PnmlExpr — Type
TermInterface expression types.
PNML.Expressions.PnmlTupleEx — Type
PnmlTupleEx(args::Vector)PnmlTupleEx TermInterface expression object wraps an ordered collection of PnmlExpr objects. There is a related ProductSort: an ordered collection of sorts. Each tuple element will have the same sort as the corresponding product sort.
NB: ISO 15909 Standard considers Tuple to be an Operator.
PNML.Expressions.expr_sortref — Function
expr_sortref(v::PnmlExpr, net) -> SortRefReturn concrete SortRef of PnmlExpr. Sometimes aliased to basis, sortref.
PNML.Expressions.substitute — Method
substitute(expr, dict)Recursivly substitute a VariableEx with its the value from var. The values in var will be ground terms of a place's sorttype. These values are from the current marking vector. ```
PNML.Expressions.toexpr — Function
toexpr(ex::PnmlExpr, varsubs::NamedTuple{Symbol,Any}, net) -> ExprReturn Expr constructed from ex. Call toexpr on any contained terms. varsubs used to replace variables in expressions.
TermInterface.maketerm — Function
@matchable TermInterface expressions
Index
PNML.ArcTypeEnumPNML.ExpressionsPNML.IDRegistrysPNML.PNMLPNML.ParserPNML.PnmlTypesPNML.SortRefImplPNML.SortsPNML.CONFIGPNML.APNPNML.AbstractLabelPNML.AbstractOperatorPNML.AbstractPnmlNetPNML.AbstractPnmlNodePNML.AbstractPnmlObjectPNML.AbstractSortPNML.AbstractTermPNML.AbstractVariablePNML.AnnotationPNML.AnyElementPNML.ArcPNML.BooleanConstantPNML.BooleanConstantPNML.CoordinatePNML.CoordinatePNML.DeclDictPNML.DotConstantPNML.FEConstantPNML.FiniteIntRangeConstantPNML.HLAnnotationPNML.LabelParserPNML.MalformedExceptionPNML.MaybePNML.MissingIDExceptionPNML.NumberConstantPNML.OperatorPNML.PagePNML.PlacePNML.PnmlConfigPNML.PnmlExceptionPNML.PnmlModelPNML.PnmlMultisetPNML.PnmlNetPNML.PnmlNetDataPNML.PnmlNetKeysPNML.REFIDPNML.RefPlacePNML.RefTransitionPNML.ReferenceNodePNML.SortRefPNML.ToolParserPNML.TransitionPNML.UserOperatorPNML.VariablePNML.XmlDictTypePNML._attributePNML._cvt_inscription_valuePNML._op_dictionariesPNML._opsPNML._sort_dictionariesPNML._sortsPNML.accum_tr_var_binding_set!PNML.accum_tr_var_binding_sets!PNML.adjacent_placePNML.all_arcsPNML.allpagesPNML.append_page!PNML.arbitraryopPNML.arbitraryopsPNML.arbitrarysortPNML.arbitrarysortsPNML.arcPNML.arcPNML.arc_idsetPNML.arcsPNML.arctypelabelPNML.basisPNML.basisPNML.cardinalityPNML.conditionPNML.conditionPNML.conditionsPNML.coordinate_typePNML.declarationsPNML.decldictPNML.deref!PNML.deref_placePNML.deref_transitionPNML.dict_showPNML.enabledPNML.feconstantPNML.feconstantsPNML.fill_builtin_labelparsers!PNML.fill_builtin_sorts!PNML.fill_builtin_toolparsers!PNML.fill_sort_tag!PNML.fill_toolparsers!PNML.find_netPNML.find_netsPNML.find_valuekeyPNML.firePNML.firstpagePNML.flatten_pages!PNML.funcPNML.funcPNML.get_arc_var_binding_set!PNML.get_labelPNML.get_labelPNML.get_variable_substitutions!PNML.has_arcPNML.has_keyPNML.has_keyPNML.has_operatorPNML.has_operatorPNML.has_operatorPNML.has_placePNML.has_refplacePNML.has_reftransitionPNML.has_transitionPNML.inc_indentPNML.incidence_matrixPNML.indentPNML.initial_markingPNML.initial_markingsPNML.input_matrixPNML.inscriptionPNML.inscriptionPNML.inscription_valuePNML.inscriptionsPNML.isarbitrarysortPNML.isbuiltinoperatorPNML.isfiniteoperatorPNML.ismultisetsortPNML.isnamedsortPNML.isoperatorPNML.ispartitionsortPNML.ispidPNML.isproductsortPNML.isusersortPNML.labeled_placesPNML.labelsPNML.make_netPNML.mcontainsPNML.multiplicityPNML.multisetPNML.multisetsortPNML.multisetsortsPNML.namePNML.namePNML.namePNML.namedopPNML.namedoperatorsPNML.namedsortPNML.namedsortsPNML.netdataPNML.netsPNML.nettypePNML.null_functionPNML.number_valuePNML.operatorPNML.operatorPNML.operatorsPNML.operatorsPNML.output_matrixPNML.pagesPNML.pagesPNML.partitionopPNML.partitionopsPNML.partitionsortPNML.partitionsortsPNML.pidPNML.placePNML.place_idsetPNML.placesPNML.pnml_hl_operatorPNML.pnml_hl_outsortPNML.pnmlmultisetPNML.pntdPNML.post_flatten_verifyPNML.postsetPNML.presetPNML.productsortPNML.productsortsPNML.ratesPNML.refidPNML.refplacePNML.refplace_idsetPNML.refplacesPNML.reftransitionPNML.reftransition_idsetPNML.reftransitionsPNML.registry_ofPNML.save_config!PNML.sortdefinitionPNML.sortelementsPNML.sortelementsPNML.sortelementsPNML.sortelementsPNML.sortelementsPNML.sortofPNML.sortrefPNML.sourcePNML.src_arcsPNML.sufficient_tokens!PNML.tagPNML.targetPNML.termPNML.text_contentPNML.tgt_arcsPNML.to_sortPNML.transitionPNML.transition_guard!PNML.transition_idsetPNML.transitionsPNML.unwrap_namedsortPNML.unwrap_pmsetPNML.useroperatorPNML.useroperatorsPNML.valuePNML.value_typePNML.variabledeclPNML.variabledeclsPNML.varsubsPNML.verifyPNML.verifyPNML.verify!PNML.verify_ids!PNML.versionPNML.vertex_codesPNML.vertex_data!PNML.vertex_labelsPNML.zero_markingPNML.PnmlTypes.pnmltype_mapPNML.PnmlTypes.pntd_mapPNML.PnmlTypes.APNTDPNML.PnmlTypes.AbstractContinuousNetPNML.PnmlTypes.AbstractHLCorePNML.PnmlTypes.AbstractPnmlCorePNML.PnmlTypes.AbstractPnmlTypePNML.PnmlTypes.ContinuousNetPNML.PnmlTypes.HLCoreNetPNML.PnmlTypes.HLPNGPNML.PnmlTypes.PTNetPNML.PnmlTypes.PT_HLPNGPNML.PnmlTypes.PnmlCoreNetPNML.PnmlTypes.SymmetricNetPNML.PnmlTypes.add_nettype!PNML.PnmlTypes.all_nettypesPNML.PnmlTypes.core_nettypesPNML.PnmlTypes.iscontinuousPNML.PnmlTypes.isdiscretePNML.PnmlTypes.ishighlevelPNML.PnmlTypes.pnmltypePNML.PnmlTypes.pntd_symbolPNML.IDRegistrys.DuplicateIDExceptionPNML.IDRegistrys.IDRegistryPNML.IDRegistrys.isregisteredPNML.IDRegistrys.register_id!PNML.IDRegistrys.reset_reg!PNML.Sorts.BoolSortPNML.Sorts.CyclicEnumerationSortPNML.Sorts.DotSortPNML.Sorts.EnumerationSortPNML.Sorts.FiniteEnumerationSortPNML.Sorts.FiniteIntRangeSortPNML.Sorts.IntegerSortPNML.Sorts.ListSortPNML.Sorts.MultisetSortPNML.Sorts.NaturalSortPNML.Sorts.NullSortPNML.Sorts.PositiveSortPNML.Sorts.ProductSortPNML.Sorts.RealSortPNML.Sorts.StringSortPNML.Sorts.builtin_sortsPNML.Sorts.isbuiltinsortPNML.Sorts.make_sortrefPNML.Sorts.refsPNML.Sorts.sortsPNML.Declarations.AbstractDeclarationPNML.Declarations.ArbitraryOperatorPNML.Declarations.ArbitrarySortPNML.Declarations.NamedOperatorPNML.Declarations.NamedSortPNML.Declarations.OperatorDeclarationPNML.Declarations.PartitionElementPNML.Declarations.PartitionSortPNML.Declarations.SortDeclarationPNML.Declarations.UnknownDeclarationPNML.Declarations.VariableDeclarationPNML.Declarations.containsPNML.Declarations.element_idsPNML.Declarations.element_namesPNML.Labels.PnmlGraphics.FillPNML.Labels.PnmlGraphics.FontPNML.Labels.PnmlGraphics.GraphicsPNML.Labels.PnmlGraphics.LinePNML.Labels.PnmlGraphicsPNML.Labels.ArcTypePNML.Labels.ConditionPNML.Labels.ConditionPNML.Labels.DeclarationPNML.Labels.HLLabelPNML.Labels.InscriptionPNML.Labels.MarkingPNML.Labels.MarkingPNML.Labels.NamePNML.Labels.NupnToolPNML.Labels.PnmlLabelPNML.Labels.PriorityPNML.Labels.RatePNML.Labels.SortTypePNML.Labels.TestToolPNML.Labels.TimePNML.Labels.TokenGraphicsPNML.Labels.ToolInfoPNML.Labels._ciPNML.Labels._matchPNML.Labels.def_sort_elementPNML.Labels.defaultPNML.Labels.defaultPNML.Labels.default_typesortPNML.Labels.delay_content_parserPNML.Labels.delay_valuePNML.Labels.get_toolinfoPNML.Labels.get_toolinfosPNML.Labels.get_toolinfosPNML.Labels.infoPNML.Labels.label_valuePNML.Labels.priority_valuePNML.Labels.rate_valuePNML.Labels.textPNML.Labels.time_valuePNML.Labels.validate_toolinfosPNML.Parser.pnml_nsPNML.Parser.ParseInscriptionTermPNML.Parser.ParseMarkingTermPNML.Parser.TermJunkPNML.Parser.XMLNodePNML.Parser.__parse_page!PNML.Parser.add_label!PNML.Parser.add_toolinfoPNML.Parser.add_toolinfo!PNML.Parser.allchildrenPNML.Parser.alldecendentsPNML.Parser.anyelementPNML.Parser.attributePNML.Parser.fill_decl_dict!PNML.Parser.find_toolinfos!PNML.Parser.firstchildPNML.Parser.kw!PNML.Parser.nupn_contentPNML.Parser.parse_arbitrarysortPNML.Parser.parse_arcPNML.Parser.parse_arc!PNML.Parser.parse_arctypePNML.Parser.parse_conditionPNML.Parser.parse_condition_termPNML.Parser.parse_declaration!PNML.Parser.parse_feconstantsPNML.Parser.parse_fifoinitialMarkingPNML.Parser.parse_graphicsPNML.Parser.parse_graphics_coordinatePNML.Parser.parse_graphics_fillPNML.Parser.parse_graphics_fontPNML.Parser.parse_graphics_linePNML.Parser.parse_hlinitialMarkingPNML.Parser.parse_hlinscriptionPNML.Parser.parse_initialMarkingPNML.Parser.parse_inscriptionPNML.Parser.parse_label_contentPNML.Parser.parse_namePNML.Parser.parse_namedoperatorPNML.Parser.parse_namedsortPNML.Parser.parse_netPNML.Parser.parse_page!PNML.Parser.parse_partitionelement!PNML.Parser.parse_placePNML.Parser.parse_place!PNML.Parser.parse_refPlacePNML.Parser.parse_refPlace!PNML.Parser.parse_refTransitionPNML.Parser.parse_refTransition!PNML.Parser.parse_sortPNML.Parser.parse_sorttypePNML.Parser.parse_sorttype_termPNML.Parser.parse_structurePNML.Parser.parse_termPNML.Parser.parse_termPNML.Parser.parse_textPNML.Parser.parse_tokengraphicsPNML.Parser.parse_tokenpositionPNML.Parser.parse_toolspecificPNML.Parser.parse_transitionPNML.Parser.parse_transition!PNML.Parser.parse_unknowndeclPNML.Parser.parse_usersortPNML.Parser.parse_variabledeclPNML.Parser.pnml_namespacePNML.Parser.pnmlmodelPNML.Parser.register_idof!PNML.Parser.subtermsPNML.Parser.tokengraphics_contentPNML.Parser.toolspecific_content_fallbackPNML.Parser.unexpected_label!PNML.Parser.unwrap_subtermPNML.Parser.xmldictPNML.Parser.xmlnodePNML.Parser.@xml_strPNML.Expressions.AbstractBoolExprPNML.Expressions.AbstractOpExprPNML.Expressions.BagPNML.Expressions.BooleanExPNML.Expressions.DotConstantExPNML.Expressions.LiteralExprPNML.Expressions.NumberExPNML.Expressions.PnmlExprPNML.Expressions.PnmlTupleExPNML.Expressions.expr_sortrefPNML.Expressions.substitutePNML.Expressions.toexpr