Interface
Being a work in progress, there will be obsolete, optimistic or incoherent bits.
Eventually this section will cover interfaces in a useful way.
The intermediate representation is used to implement networks expressed in a pnml model. The consumer of the IR is a network is most naturally a varity of Petri Net.
We start a description of the net IR here.
Dict Type
DictType
used by:
Top Level: Model, Net, Page
At the top level[layers] a <pnml> model is one or more networks::PnmlNet
, each described by a <net> tag and one or more <page> tags.
Page
is a required element mostly present for visual presentation to humans. It contains AbstractPnmlObject
types that implement the Petri Net Graph (PNG).
While Graphics
is implemented it is not dicussed further (until someone extends/uses it).
ToolInfo
used to attach well-formed XML almost anywhere in the PNG. TODO: Need way to parse <toolspecific> that is flexible/extendable.
Parse pnml for input, worry about writing back out and interchange later (future extensions). Another future extension may be to use pages for distributed computing.
The pnml standard permits that multiple pages canto be flattened (by flatten_pages!
) to a single Page
before use. We do that.
AbstractPetriNet
subtypes wrap and extend PnmlNet
. Note the Pnml to Petri.
PnmlNet
and its contents can be considered an intermediate representation (IR). A concrete AbstractPetriNet
type uses the IR to produce higher-level behavior. This is the level at which flatten_pages!
and deref!
operate.
AbstractPetriNet
is the level of most Petri Net Graph semantics. One example is enforcing integer, non-negative, positive. One mechanism used is type parameters.
Remember, the IR trys to be as promiscuous as possible.
XML <net> tags are parsed by parse_net
into a PnmlNet
.
XML <page> tags are parsed by parse_page!
into a Page
.
Places
Properties that various places may have one or more of:
- discrete
- continuous
- timed
Transitions
Properties that various transitions may have one or more of:
- discrete
- continuous
- hybrid of discrete & continuous subnets
- stochastic
- immediate
- deterministically time delayed
- scheduled
The pnml schemas and primer only try to cover the discrete case as Place-Transition and High-Level Petri Nets.
Extensions to PNML
Continuous Values
Continous support is present where possible. For instance, when a number appers in the XML number_value
is used to parse the string to Int
or Float64
. This is currently (2022) "non-standard" so such pnml files will not be generally interchangable with other tools.
'Discrete, Continuous, and Hybrid Petri Nets' by Rene David and Hassane Alla
See rate_value
for a use of non-standard labels by SimpleNet
. Implements a stochastic petri net as part of the first working use-case. Demonstrates the expressiveness of pnml.
Petri Net Graphs and Networks
There are 3 top-level forms:
AbstractPetriNet
subtypes wraping a singlePnmlNet
.PnmlNet
maybe multiple pages.Page
as the only page of the only net in a Abstractpetrinet.
The simplest arrangement is a pnml model with a single <net> element having a single <page>. Any <net> may be flatten to a single page.
The initial AbstractPetriNet
subtypes are built using the assumption that multiple pages will be flattened to a single page.
Simple Interface Methods
What makes a method simple? No other arguments besides the object it operates upon.
pid(x) - get PNML ID symbol
Many things within a pnml net have unique identifiers, which are used for referring to the object.
# 4 methods for generic function pid from [35mPNML[39m:- pid(o::PNML.AbstractPnmlObject) in PNML at /home/runner/work/PNML.jl/PNML.jl/src/Core/types.jl:74
- pid(decl::PNML.Declarations.AbstractDeclaration) in PNML.Declarations at /home/runner/work/PNML.jl/PNML.jl/src/Declarations/declarations.jl:11
- pid(net::PnmlNet) in PNML at /home/runner/work/PNML.jl/PNML.jl/src/nodes/net.jl:31
- pid(petrinet::PNML.PNet.AbstractPetriNet) in PNML.PNet at /home/runner/work/PNML.jl/PNML.jl/src/PNet/petrinet.jl:67
name(x) - get name
AbstractPnmlObject
s and PnmlNet
s have a name label. PNML.Labels.Declaration
s have a name attribute. ToolInfo
s have a toolname attribute.
- name(::Nothing) in PNML at /home/runner/work/PNML.jl/PNML.jl/src/Core/types.jl:82
- name(ti::PNML.ToolParser) in PNML at /home/runner/work/PNML.jl/PNML.jl/src/Core/toolparser.jl:19
- name(o::PNML.AbstractPnmlObject) in PNML at /home/runner/work/PNML.jl/PNML.jl/src/Core/types.jl:81
- name(decl::PNML.Declarations.AbstractDeclaration) in PNML.Declarations at /home/runner/work/PNML.jl/PNML.jl/src/Declarations/declarations.jl:13
- name(ti::PNML.Labels.ToolInfo) in PNML.Labels at /home/runner/work/PNML.jl/PNML.jl/src/Labels/toolinfos.jl:19
- name(net::PnmlNet) in PNML at /home/runner/work/PNML.jl/PNML.jl/src/nodes/net.jl:86
tag(x) - access XML tag symbol
# 11 methods for generic function tag from [35mPNML[39m:- tag(label::PNML.Labels.PnmlLabel) in PNML.Labels at /home/runner/work/PNML.jl/PNML.jl/src/Labels/labels.jl:126
- tag(op::PNML.Operator) in PNML at /home/runner/work/PNML.jl/PNML.jl/src/terms/operators.jl:47
- tag(a::PNML.AnyElement) in PNML at /home/runner/work/PNML.jl/PNML.jl/src/Core/anyelement.jl:61
- tag(lp::PNML.LabelParser) in PNML at /home/runner/work/PNML.jl/PNML.jl/src/Core/labelparser.jl:15
- tag(s::PNML.Labels.Structure) in PNML.Labels at /home/runner/work/PNML.jl/PNML.jl/src/Labels/structure.jl:26
- tag(::PNML.BooleanConstant) in PNML at /home/runner/work/PNML.jl/PNML.jl/src/terms/constterm.jl:126
- tag(::PNML.Sorts.CyclicEnumerationSort) in PNML.Sorts at /home/runner/work/PNML.jl/PNML.jl/src/Sorts/enumerations.jl:59
- tag(::PNML.Sorts.FiniteEnumerationSort) in PNML.Sorts at /home/runner/work/PNML.jl/PNML.jl/src/Sorts/enumerations.jl:75
- tag(::PNML.FiniteIntRangeConstant) in PNML at /home/runner/work/PNML.jl/PNML.jl/src/terms/constterm.jl:81
- tag(d::OrderedCollections.LittleDict{Union{String, Symbol}, Any, KS, VS} where {KS<:Union{Tuple{Vararg{Union{String, Symbol}}}, AbstractVector{Union{String, Symbol}}}, VS<:Union{Tuple, AbstractVector{Any}}}) in PNML at /home/runner/work/PNML.jl/PNML.jl/src/Core/anyelement.jl:11
- tag(::PNML.Sorts.FiniteIntRangeSort) in PNML.Sorts at /home/runner/work/PNML.jl/PNML.jl/src/Sorts/enumerations.jl:89
nettype(x) - return PnmlType identifying PNTD
# 5 methods for generic function nettype from [35mPNML[39m:- nettype(::Place{T}) where T<:PNML.PnmlTypes.PnmlType in PNML at /home/runner/work/PNML.jl/PNML.jl/src/nodes/nodes.jl:27
- nettype(::Transition{T}) where T<:PNML.PnmlTypes.PnmlType in PNML at /home/runner/work/PNML.jl/PNML.jl/src/nodes/nodes.jl:73
- nettype(::Page{T}) where T<:PNML.PnmlTypes.PnmlType in PNML at /home/runner/work/PNML.jl/PNML.jl/src/nodes/page.jl:24
- nettype(net::PnmlNet) in PNML at /home/runner/work/PNML.jl/PNML.jl/src/nodes/net.jl:29
- nettype(::PNML.PNet.AbstractPetriNet{T}) where T<:PNML.PnmlTypes.PnmlType in PNML.PNet at /home/runner/work/PNML.jl/PNML.jl/src/PNet/petrinet.jl:64
Nodes of Petri Net Graph
Return vector of nodes. Assumes flattened net so that the PnmlNet
and Page
refer to the same net-level AbstractDict
data structure.
places
# 2 methods for generic function places from [35mPNML[39m:- places(page::Page) in PNML at /home/runner/work/PNML.jl/PNML.jl/src/nodes/page.jl:40
- places(net::PnmlNet) in PNML at /home/runner/work/PNML.jl/PNML.jl/src/nodes/net.jl:88
transitions
# 2 methods for generic function transitions from [35mPNML[39m:- transitions(page::Page) in PNML at /home/runner/work/PNML.jl/PNML.jl/src/nodes/page.jl:41
- transitions(net::PnmlNet) in PNML at /home/runner/work/PNML.jl/PNML.jl/src/nodes/net.jl:89
arcs
# 2 methods for generic function arcs from [35mPNML[39m:- arcs(page::Page) in PNML at /home/runner/work/PNML.jl/PNML.jl/src/nodes/page.jl:42
- arcs(net::PnmlNet) in PNML at /home/runner/work/PNML.jl/PNML.jl/src/nodes/net.jl:90
refplaces
# 2 methods for generic function refplaces from [35mPNML[39m:- refplaces(page::Page) in PNML at /home/runner/work/PNML.jl/PNML.jl/src/nodes/page.jl:43
- refplaces(net::PnmlNet) in PNML at /home/runner/work/PNML.jl/PNML.jl/src/nodes/net.jl:91
reftransitions
# 2 methods for generic function reftransitions from [35mPNML[39m:- reftransitions(page::Page) in PNML at /home/runner/work/PNML.jl/PNML.jl/src/nodes/page.jl:44
- reftransitions(net::PnmlNet) in PNML at /home/runner/work/PNML.jl/PNML.jl/src/nodes/net.jl:92
Node Predicates - uses PNML ID
has_place
# 2 methods for generic function has_place from [35mPNML[39m:- has_place(page::Page, id::Symbol) in PNML at /home/runner/work/PNML.jl/PNML.jl/src/nodes/page.jl:54
- has_place(net::PnmlNet, id::Symbol) in PNML at /home/runner/work/PNML.jl/PNML.jl/src/nodes/net.jl:95
has_transition
# 2 methods for generic function has_transition from [35mPNML[39m:- has_transition(page::Page, id::Symbol) in PNML at /home/runner/work/PNML.jl/PNML.jl/src/nodes/page.jl:57
- has_transition(net::PnmlNet, id::Symbol) in PNML at /home/runner/work/PNML.jl/PNML.jl/src/nodes/net.jl:100
has_arc
# 2 methods for generic function has_arc from [35mPNML[39m:- has_arc(page::Page, id::Symbol) in PNML at /home/runner/work/PNML.jl/PNML.jl/src/nodes/page.jl:60
- has_arc(net::PnmlNet, id::Symbol) in PNML at /home/runner/work/PNML.jl/PNML.jl/src/nodes/net.jl:105
has_refplace
# 2 methods for generic function has_refplace from [35mPNML[39m:- has_refplace(page::Page, id::Symbol) in PNML at /home/runner/work/PNML.jl/PNML.jl/src/nodes/page.jl:63
- has_refplace(net::PnmlNet, id::Symbol) in PNML at /home/runner/work/PNML.jl/PNML.jl/src/nodes/net.jl:126
has_reftransition
# 2 methods for generic function has_reftransition from [35mPNML[39m:- has_reftransition(page::Page, id::Symbol) in PNML at /home/runner/work/PNML.jl/PNML.jl/src/nodes/page.jl:66
- has_reftransition(net::PnmlNet, id::Symbol) in PNML at /home/runner/work/PNML.jl/PNML.jl/src/nodes/net.jl:128
Node Access - uses PNML ID
place
# 2 methods for generic function place from [35mPNML[39m:- place(page::Page, id::Symbol) in PNML at /home/runner/work/PNML.jl/PNML.jl/src/nodes/page.jl:53
- place(net::PnmlNet, id::Symbol) in PNML at /home/runner/work/PNML.jl/PNML.jl/src/nodes/net.jl:94
transition
# 2 methods for generic function transition from [35mPNML[39m:- transition(page::Page, id::Symbol) in PNML at /home/runner/work/PNML.jl/PNML.jl/src/nodes/page.jl:56
- transition(net::PnmlNet, id::Symbol) in PNML at /home/runner/work/PNML.jl/PNML.jl/src/nodes/net.jl:99
arc
# 3 methods for generic function arc from [35mPNML[39m:- arc(net, s::Symbol, t::Symbol) in PNML at /home/runner/work/PNML.jl/PNML.jl/src/nodes/net.jl:110
- arc(page::Page, id::Symbol) in PNML at /home/runner/work/PNML.jl/PNML.jl/src/nodes/page.jl:59
- arc(net::PnmlNet, id::Symbol) in PNML at /home/runner/work/PNML.jl/PNML.jl/src/nodes/net.jl:104
refplace
# 2 methods for generic function refplace from [35mPNML[39m:- refplace(page::Page, id::Symbol) in PNML at /home/runner/work/PNML.jl/PNML.jl/src/nodes/page.jl:62
- refplace(net::PnmlNet, id::Symbol) in PNML at /home/runner/work/PNML.jl/PNML.jl/src/nodes/net.jl:127
reftransition
# 2 methods for generic function reftransition from [35mPNML[39m:- reftransition(page::Page, id::Symbol) in PNML at /home/runner/work/PNML.jl/PNML.jl/src/nodes/page.jl:65
- reftransition(net::PnmlNet, id::Symbol) in PNML at /home/runner/work/PNML.jl/PNML.jl/src/nodes/net.jl:129
Node ID Iteratables
Better to iterate than allocate. Using a set abstraction that iterates consistently, perhaps in insertion order.
place_idset
Object | Synopsis | Comment |
---|---|---|
PnmlNet | keys(placedict(net)) | Iterates PnmlNetData OrderedDict keys |
Page | place_idset(netsets(page)) | Iterates PnmlNetKeys OrderedSet |
PnmlNetKeys | OrderedSet | Iterates PnmlNetKeys OrderedSet |
Both iterate over REFIDs that are indices into PnmlNetData., To access a Place
in the PnmlNetData
use place(refid)
.
The contents of PnmlKeySet are indices into PnmlNetData. When there is only one page, the keys of the placedict
and place_set
will be (must be) the same.
For the foreseeable future, there will be little use of multi-page APIs. It is expected that flattened PNML nets will be the fully supported, tested, thought-through API.
The discussion using place_idset also applies to other *_idsets.
# 3 methods for generic function place_idset from [35mPNML[39m:- place_idset(s::PNML.PnmlNetKeys) in PNML at /home/runner/work/PNML.jl/PNML.jl/src/Core/pnmlnetdata.jl:100
- place_idset(page::Page) in PNML at /home/runner/work/PNML.jl/PNML.jl/src/nodes/page.jl:47
- place_idset(n::PnmlNet) in PNML at /home/runner/work/PNML.jl/PNML.jl/src/nodes/net.jl:51
transition_idset
# 3 methods for generic function transition_idset from [35mPNML[39m:- transition_idset(s::PNML.PnmlNetKeys) in PNML at /home/runner/work/PNML.jl/PNML.jl/src/Core/pnmlnetdata.jl:101
- transition_idset(page::Page) in PNML at /home/runner/work/PNML.jl/PNML.jl/src/nodes/page.jl:48
- transition_idset(n::PnmlNet) in PNML at /home/runner/work/PNML.jl/PNML.jl/src/nodes/net.jl:52
arc_idset
# 3 methods for generic function arc_idset from [35mPNML[39m:- arc_idset(s::PNML.PnmlNetKeys) in PNML at /home/runner/work/PNML.jl/PNML.jl/src/Core/pnmlnetdata.jl:102
- arc_idset(page::Page) in PNML at /home/runner/work/PNML.jl/PNML.jl/src/nodes/page.jl:49
- arc_idset(n::PnmlNet) in PNML at /home/runner/work/PNML.jl/PNML.jl/src/nodes/net.jl:53
refplace_idset
# 3 methods for generic function refplace_idset from [35mPNML[39m:- refplace_idset(s::PNML.PnmlNetKeys) in PNML at /home/runner/work/PNML.jl/PNML.jl/src/Core/pnmlnetdata.jl:104
- refplace_idset(page::Page) in PNML at /home/runner/work/PNML.jl/PNML.jl/src/nodes/page.jl:51
- refplace_idset(n::PnmlNet) in PNML at /home/runner/work/PNML.jl/PNML.jl/src/nodes/net.jl:54
reftransition_idset
# 3 methods for generic function reftransition_idset from [35mPNML[39m:- reftransition_idset(s::PNML.PnmlNetKeys) in PNML at /home/runner/work/PNML.jl/PNML.jl/src/Core/pnmlnetdata.jl:103
- reftransition_idset(page::Page) in PNML at /home/runner/work/PNML.jl/PNML.jl/src/nodes/page.jl:50
- reftransition_idset(n::PnmlNet) in PNML at /home/runner/work/PNML.jl/PNML.jl/src/nodes/net.jl:55
Arc Related
all_arcs - source or target is PNML ID
# 1 method for generic function all_arcs from [35mPNML[39m:- all_arcs(net::PnmlNet, id::Symbol) in PNML at /home/runner/work/PNML.jl/PNML.jl/src/nodes/net.jl:116
src_arcs - source is PNML ID
# 1 method for generic function src_arcs from [35mPNML[39m:- src_arcs(net::PnmlNet, id::Symbol) in PNML at /home/runner/work/PNML.jl/PNML.jl/src/nodes/net.jl:118
tgt_arcs - target is PNML ID
# 1 method for generic function tgt_arcs from [35mPNML[39m:- tgt_arcs(net::PnmlNet, id::Symbol) in PNML at /home/runner/work/PNML.jl/PNML.jl/src/nodes/net.jl:120
inscription - evaluate inscription value (or return default)
# 2 methods for generic function inscription from [35mPNML[39m:- inscription(arc::Arc) in PNML at /home/runner/work/PNML.jl/PNML.jl/src/nodes/nodes.jl:130
- inscription(net::PnmlNet, arc_id::Symbol) in PNML at /home/runner/work/PNML.jl/PNML.jl/src/nodes/net.jl:124
deref! - dereference all references of flattened net
# 1 method for generic function deref! from [35mPNML[39m:- deref!(net::PnmlNet; trim, verbose) in PNML at /home/runner/work/PNML.jl/PNML.jl/src/Core/flatten.jl:130
deref_place - dereference one place
# 1 method for generic function deref_place from [35mPNML[39m:- deref_place(net::PnmlNet, id::Symbol; trim, verbose) in PNML at /home/runner/work/PNML.jl/PNML.jl/src/Core/flatten.jl:167
deref_transition - dereference one transition
# 1 method for generic function deref_transition from [35mPNML[39m:- deref_transition(net::PnmlNet, id::Symbol; trim, verbose) in PNML at /home/runner/work/PNML.jl/PNML.jl/src/Core/flatten.jl:191
Place Related
initial_marking - evaluate marking value (or return default)
# 2 methods for generic function initial_marking from [35mPNML[39m:- initial_marking(place::Place) in PNML at /home/runner/work/PNML.jl/PNML.jl/src/nodes/nodes.jl:29
- initial_marking(net::PnmlNet, placeid::Symbol) in PNML at /home/runner/work/PNML.jl/PNML.jl/src/nodes/net.jl:97
initial_markings - return Vector of pairs
# 4 methods for generic function initial_markings from [35mPNML.PNet[39m:- initial_markings(net::PnmlNet{PNML.PnmlTypes.PT_HLPNG}) in PNML.PNet at /home/runner/work/PNML.jl/PNML.jl/src/PNet/petrinet.jl:130
- initial_markings(petrinet::PNML.PNet.AbstractPetriNet) in PNML.PNet at /home/runner/work/PNML.jl/PNML.jl/src/PNet/petrinet.jl:120
- initial_markings(net::PnmlNet{<:PNML.PnmlTypes.AbstractHLCore}) in PNML.PNet at /home/runner/work/PNML.jl/PNML.jl/src/PNet/petrinet.jl:135
- initial_markings(net::PnmlNet) in PNML.PNet at /home/runner/work/PNML.jl/PNML.jl/src/PNet/petrinet.jl:122
Transition Related
conditions - collect evaluated conditions
# 1 method for generic function conditions from [35mPNML[39m:- conditions(net::PnmlNet) in PNML at /home/runner/work/PNML.jl/PNML.jl/src/NetAPI/netutils.jl:47
condition - evaluate condition of one transition
# 2 methods for generic function condition from [35mPNML[39m:- condition(transition::Transition) in PNML at /home/runner/work/PNML.jl/PNML.jl/src/nodes/nodes.jl:93
- condition(net::PnmlNet, trans_id::Symbol) in PNML at /home/runner/work/PNML.jl/PNML.jl/src/nodes/net.jl:102
transition_function - return LVector
of in_out
for all transitions
# 2 methods for generic function transition_function from [35mPNML.PNet[39m:- transition_function(petrinet::PNML.PNet.AbstractPetriNet) in PNML.PNet at /home/runner/work/PNML.jl/PNML.jl/src/PNet/transition_function.jl:15
- transition_function(net::PnmlNet) in PNML.PNet at /home/runner/work/PNML.jl/PNML.jl/src/PNet/transition_function.jl:16
in_out - tuple of ins
, outs
of one transition
# 2 methods for generic function in_out from [35mPNML.PNet[39m:- in_out(petrinet::PNML.PNet.AbstractPetriNet, transition_id) in PNML.PNet at /home/runner/work/PNML.jl/PNML.jl/src/PNet/transition_function.jl:84
- in_out(net::PnmlNet, transition_id) in PNML.PNet at /home/runner/work/PNML.jl/PNML.jl/src/PNet/transition_function.jl:85
ins - LVector
of source arc evaluated inscriptions.
# 1 method for generic function ins from [35mPNML.PNet[39m:- ins(net::PnmlNet, transition_id::Symbol) in PNML.PNet at /home/runner/work/PNML.jl/PNML.jl/src/PNet/transition_function.jl:93
outs - LVector
of target arc evaluated inscriptions.
# 1 method for generic function outs from [35mPNML.PNet[39m:- outs(net::PnmlNet, transition_id::Symbol) in PNML.PNet at /home/runner/work/PNML.jl/PNML.jl/src/PNet/transition_function.jl:100
Labels - Annotation
and HLAnnotation
Both kinds (all labels) have Graphics
and ToolInfo
. Labels.HLAnnotation
adds optional <text>, <structure>.
text
# 3 methods for generic function text from [35mPNML.Labels[39m:- text(::Nothing) in PNML.Labels at /home/runner/work/PNML.jl/PNML.jl/src/Labels/labels.jl:70
- text(t::PNML.Labels.SortType) in PNML.Labels at /home/runner/work/PNML.jl/PNML.jl/src/Labels/sorttype.jl:76
- text(l::PNML.AbstractLabel) in PNML.Labels at /home/runner/work/PNML.jl/PNML.jl/src/Labels/labels.jl:69
value
# 6 methods for generic function value from [35mPNML[39m:- value(bc::PNML.BooleanConstant) in PNML at /home/runner/work/PNML.jl/PNML.jl/src/terms/constterm.jl:131
- value(v::PNML.Variable) in PNML at /home/runner/work/PNML.jl/PNML.jl/src/terms/variables.jl:27
- value(op::PNML.Operator) in PNML at /home/runner/work/PNML.jl/PNML.jl/src/terms/operators.jl:52
- value(nc::PNML.NumberConstant) in PNML at /home/runner/work/PNML.jl/PNML.jl/src/terms/constterm.jl:21
- value(c::PNML.FiniteIntRangeConstant) in PNML at /home/runner/work/PNML.jl/PNML.jl/src/terms/constterm.jl:92
- value(r::PNML.Labels.Rate) in PNML.Labels at /home/runner/work/PNML.jl/PNML.jl/src/Labels/rates.jl:25
has_labels - do any exist
# 3 methods for generic function has_labels from [35mPNML[39m:- has_labels(o::PNML.AbstractPnmlObject) in PNML at /home/runner/work/PNML.jl/PNML.jl/src/Core/types.jl:85
- has_labels(l::PNML.AbstractLabel) in PNML.Labels at /home/runner/work/PNML.jl/PNML.jl/src/Labels/labels.jl:78
- has_labels(net::PnmlNet) in PNML at /home/runner/work/PNML.jl/PNML.jl/src/nodes/net.jl:82
has_label - does a specific label exist
# 2 methods for generic function has_label from [35mPNML[39m:- has_label(o::PNML.AbstractPnmlObject, tag::Union{SubString{String}, String, Symbol}) in PNML at /home/runner/work/PNML.jl/PNML.jl/src/Core/types.jl:95
- has_label(iteratable, tag::Union{SubString{String}, String, Symbol}) in PNML.Labels at /home/runner/work/PNML.jl/PNML.jl/src/Labels/labels.jl:168
get_label - get a specific label
# 2 methods for generic function get_label from [35mPNML[39m:- get_label(o::PNML.AbstractPnmlObject, tag::Union{SubString{String}, String, Symbol}) in PNML at /home/runner/work/PNML.jl/PNML.jl/src/Core/types.jl:100
- get_label(iteratable, tag::Union{SubString{String}, String, Symbol}) in PNML.Labels at /home/runner/work/PNML.jl/PNML.jl/src/Labels/labels.jl:163
ToolInfo
has_toolinfo - does a specific toolinfo exist
# 4 methods for generic function has_toolinfo from [35mPNML.Labels[39m:- has_toolinfo(infos, namerex::Regex) in PNML.Labels at /home/runner/work/PNML.jl/PNML.jl/src/Labels/toolinfos.jl:95
- has_toolinfo(infos, toolname) in PNML.Labels at /home/runner/work/PNML.jl/PNML.jl/src/Labels/toolinfos.jl:87
- has_toolinfo(infos, namerex::Regex, versionrex::Regex) in PNML.Labels at /home/runner/work/PNML.jl/PNML.jl/src/Labels/toolinfos.jl:95
- has_toolinfo(infos, toolname, version) in PNML.Labels at /home/runner/work/PNML.jl/PNML.jl/src/Labels/toolinfos.jl:91
get_toolinfo - get a specific toolinfo exist
# 5 methods for generic function get_toolinfo from [35mPNML.Labels[39m:- get_toolinfo(infos, namerex::Regex) in PNML.Labels at /home/runner/work/PNML.jl/PNML.jl/src/Labels/toolinfos.jl:118
- get_toolinfo(infos, namerex::Regex, versionrex::Regex) in PNML.Labels at /home/runner/work/PNML.jl/PNML.jl/src/Labels/toolinfos.jl:118
- get_toolinfo(infos, name::AbstractString) in PNML.Labels at /home/runner/work/PNML.jl/PNML.jl/src/Labels/toolinfos.jl:111
- get_toolinfo(infos, name::AbstractString, version::AbstractString) in PNML.Labels at /home/runner/work/PNML.jl/PNML.jl/src/Labels/toolinfos.jl:112
- get_toolinfo(infos, name::AbstractString, versionrex::Regex) in PNML.Labels at /home/runner/work/PNML.jl/PNML.jl/src/Labels/toolinfos.jl:115
Type Lookup
Petri Net Graph Object Types are parameterized by Label Types. What labels are "allowed" (syntax vs. semantics vs. schema vs. standard) is parameterized on the PNTD (Petri Net Type Definition).
See PnmlNet
s & AbstractPnmlObject
s, and PnmlTypes
for details of the singleton types used.
page_type(pntd)
PNML.page_type
— Functionpage_type(x) -> Type(<:Page)
PNML.PnmlTypes.PnmlCoreNet() -> Page{PNML.PnmlTypes.PnmlCoreNet}
PNML.PnmlTypes.SymmetricNet() -> Page{PNML.PnmlTypes.SymmetricNet}
PNML.PnmlTypes.PTNet() -> Page{PNML.PnmlTypes.PTNet}
PNML.PnmlTypes.ContinuousNet() -> Page{PNML.PnmlTypes.ContinuousNet}
PNML.PnmlTypes.HLPNG() -> Page{PNML.PnmlTypes.HLPNG}
PNML.PnmlTypes.HLCoreNet() -> Page{PNML.PnmlTypes.HLCoreNet}
PNML.PnmlTypes.PT_HLPNG() -> Page{PNML.PnmlTypes.PT_HLPNG}
# 3 methods for generic function page_type from [35mPNML[39m:- page_type(pntd::PNML.PnmlTypes.PnmlType) in PNML at /home/runner/work/PNML.jl/PNML.jl/src/Core/types.jl:222
- page_type(::Type{T}) where T<:PNML.PnmlTypes.PnmlType in PNML at /home/runner/work/PNML.jl/PNML.jl/src/nodes/net.jl:253
- page_type(::PnmlNet{T}) where T<:PNML.PnmlTypes.PnmlType in PNML at /home/runner/work/PNML.jl/PNML.jl/src/nodes/net.jl:261
place_type(pntd)
PNML.place_type
— Functionplace_type(x) -> Type(<:Place)
PNML.PnmlTypes.PnmlCoreNet() -> Place{PNML.PnmlTypes.PnmlCoreNet, PNML.Labels.Marking}
PNML.PnmlTypes.SymmetricNet() -> Place{PNML.PnmlTypes.SymmetricNet, PNML.Labels.HLMarking}
PNML.PnmlTypes.PTNet() -> Place{PNML.PnmlTypes.PTNet, PNML.Labels.Marking}
PNML.PnmlTypes.ContinuousNet() -> Place{PNML.PnmlTypes.ContinuousNet, PNML.Labels.Marking}
PNML.PnmlTypes.HLPNG() -> Place{PNML.PnmlTypes.HLPNG, PNML.Labels.HLMarking}
PNML.PnmlTypes.HLCoreNet() -> Place{PNML.PnmlTypes.HLCoreNet, PNML.Labels.HLMarking}
PNML.PnmlTypes.PT_HLPNG() -> Place{PNML.PnmlTypes.PT_HLPNG, PNML.Labels.HLMarking}
# 3 methods for generic function place_type from [35mPNML[39m:- place_type(pntd::PNML.PnmlTypes.PnmlType) in PNML at /home/runner/work/PNML.jl/PNML.jl/src/Core/types.jl:224
- place_type(::Type{T}) where T<:PNML.PnmlTypes.PnmlType in PNML at /home/runner/work/PNML.jl/PNML.jl/src/nodes/net.jl:255
- place_type(::PnmlNet{T}) where T<:PNML.PnmlTypes.PnmlType in PNML at /home/runner/work/PNML.jl/PNML.jl/src/nodes/net.jl:263
transition_type(pntd)
PNML.transition_type
— Functiontransition_type(x) -> Type(<:Transition)
PNML.PnmlTypes.PnmlCoreNet() -> Transition{PNML.PnmlTypes.PnmlCoreNet, PNML.Labels.Condition}
PNML.PnmlTypes.SymmetricNet() -> Transition{PNML.PnmlTypes.SymmetricNet, PNML.Labels.Condition}
PNML.PnmlTypes.PTNet() -> Transition{PNML.PnmlTypes.PTNet, PNML.Labels.Condition}
PNML.PnmlTypes.ContinuousNet() -> Transition{PNML.PnmlTypes.ContinuousNet, PNML.Labels.Condition}
PNML.PnmlTypes.HLPNG() -> Transition{PNML.PnmlTypes.HLPNG, PNML.Labels.Condition}
PNML.PnmlTypes.HLCoreNet() -> Transition{PNML.PnmlTypes.HLCoreNet, PNML.Labels.Condition}
PNML.PnmlTypes.PT_HLPNG() -> Transition{PNML.PnmlTypes.PT_HLPNG, PNML.Labels.Condition}
# 3 methods for generic function transition_type from [35mPNML[39m:- transition_type(pntd::PNML.PnmlTypes.PnmlType) in PNML at /home/runner/work/PNML.jl/PNML.jl/src/Core/types.jl:225
- transition_type(::Type{T}) where T<:PNML.PnmlTypes.PnmlType in PNML at /home/runner/work/PNML.jl/PNML.jl/src/nodes/net.jl:256
- transition_type(::PnmlNet{T}) where T<:PNML.PnmlTypes.PnmlType in PNML at /home/runner/work/PNML.jl/PNML.jl/src/nodes/net.jl:264
arc_type(pntd)
PNML.arc_type
— Functionarc_type(pntd) -> Type(<:Arc)
PNML.PnmlTypes.PnmlCoreNet() -> Arc{PNML.Labels.Inscription}
PNML.PnmlTypes.SymmetricNet() -> Arc{PNML.Labels.HLInscription}
PNML.PnmlTypes.PTNet() -> Arc{PNML.Labels.Inscription}
PNML.PnmlTypes.ContinuousNet() -> Arc{PNML.Labels.Inscription}
PNML.PnmlTypes.HLPNG() -> Arc{PNML.Labels.HLInscription}
PNML.PnmlTypes.HLCoreNet() -> Arc{PNML.Labels.HLInscription}
PNML.PnmlTypes.PT_HLPNG() -> Arc{PNML.Labels.HLInscription}
# 3 methods for generic function arc_type from [35mPNML[39m:- arc_type(pntd::PNML.PnmlTypes.PnmlType) in PNML at /home/runner/work/PNML.jl/PNML.jl/src/Core/types.jl:226
- arc_type(::Type{T}) where T<:PNML.PnmlTypes.PnmlType in PNML at /home/runner/work/PNML.jl/PNML.jl/src/nodes/net.jl:257
- arc_type(::PnmlNet{T}) where T<:PNML.PnmlTypes.PnmlType in PNML at /home/runner/work/PNML.jl/PNML.jl/src/nodes/net.jl:265
Label Types
AbstractLabels are parameterized by Value Types.
marking_type(pntd)
PNML.marking_type
— Functionmarking_type(x) -> Type(<:Marking)
PNML.PnmlTypes.PnmlCoreNet() -> PNML.Labels.Marking
PNML.PnmlTypes.SymmetricNet() -> PNML.Labels.HLMarking
PNML.PnmlTypes.PTNet() -> PNML.Labels.Marking
PNML.PnmlTypes.ContinuousNet() -> PNML.Labels.Marking
PNML.PnmlTypes.HLPNG() -> PNML.Labels.HLMarking
PNML.PnmlTypes.HLCoreNet() -> PNML.Labels.HLMarking
PNML.PnmlTypes.PT_HLPNG() -> PNML.Labels.HLMarking
# 4 methods for generic function marking_type from [35mPNML[39m:- marking_type(pntd::PNML.PnmlTypes.PnmlType) in PNML at /home/runner/work/PNML.jl/PNML.jl/src/Core/types.jl:230
- marking_type(::Type{T}) where T<:PNML.PnmlTypes.AbstractHLCore in PNML.Labels at /home/runner/work/PNML.jl/PNML.jl/src/Labels/markings.jl:194
- marking_type(::Type{T}) where T<:PNML.PnmlTypes.PnmlType in PNML.Labels at /home/runner/work/PNML.jl/PNML.jl/src/Labels/markings.jl:193
- marking_type(net::PnmlNet) in PNML at /home/runner/work/PNML.jl/PNML.jl/src/nodes/net.jl:271
condition_type(pntd)
PNML.condition_type
— Functioncondition_type(x) -> Type(<:Condition)
PNML.PnmlTypes.PnmlCoreNet() -> PNML.Labels.Condition
PNML.PnmlTypes.SymmetricNet() -> PNML.Labels.Condition
PNML.PnmlTypes.PTNet() -> PNML.Labels.Condition
PNML.PnmlTypes.ContinuousNet() -> PNML.Labels.Condition
PNML.PnmlTypes.HLPNG() -> PNML.Labels.Condition
PNML.PnmlTypes.HLCoreNet() -> PNML.Labels.Condition
PNML.PnmlTypes.PT_HLPNG() -> PNML.Labels.Condition
# 3 methods for generic function condition_type from [35mPNML[39m:- condition_type(pntd::PNML.PnmlTypes.PnmlType) in PNML at /home/runner/work/PNML.jl/PNML.jl/src/Core/types.jl:231
- condition_type(::Type{<:PNML.PnmlTypes.PnmlType}) in PNML.Labels at /home/runner/work/PNML.jl/PNML.jl/src/Labels/conditions.jl:43
- condition_type(net::PnmlNet) in PNML at /home/runner/work/PNML.jl/PNML.jl/src/nodes/net.jl:269
inscription_type(pntd)
PNML.inscription_type
— Functioninscription_type(x) -> Type(<:Inscription)
PNML.PnmlTypes.PnmlCoreNet() -> PNML.Labels.Inscription
PNML.PnmlTypes.SymmetricNet() -> PNML.Labels.HLInscription
PNML.PnmlTypes.PTNet() -> PNML.Labels.Inscription
PNML.PnmlTypes.ContinuousNet() -> PNML.Labels.Inscription
PNML.PnmlTypes.HLPNG() -> PNML.Labels.HLInscription
PNML.PnmlTypes.HLCoreNet() -> PNML.Labels.HLInscription
PNML.PnmlTypes.PT_HLPNG() -> PNML.Labels.HLInscription
# 4 methods for generic function inscription_type from [35mPNML[39m:- inscription_type(pntd::PNML.PnmlTypes.PnmlType) in PNML at /home/runner/work/PNML.jl/PNML.jl/src/Core/types.jl:232
- inscription_type(::Type{T}) where T<:PNML.PnmlTypes.AbstractHLCore in PNML.Labels at /home/runner/work/PNML.jl/PNML.jl/src/Labels/inscriptions.jl:104
- inscription_type(::Type{T}) where T<:PNML.PnmlTypes.PnmlType in PNML.Labels at /home/runner/work/PNML.jl/PNML.jl/src/Labels/inscriptions.jl:103
- inscription_type(net::PnmlNet) in PNML at /home/runner/work/PNML.jl/PNML.jl/src/nodes/net.jl:270
refplace_type(pntd)
PNML.refplace_type
— Functionrefplace_type(x) -> Type(<:RefPlace)
PNML.PnmlTypes.PnmlCoreNet() -> RefPlace
PNML.PnmlTypes.SymmetricNet() -> RefPlace
PNML.PnmlTypes.PTNet() -> RefPlace
PNML.PnmlTypes.ContinuousNet() -> RefPlace
PNML.PnmlTypes.HLPNG() -> RefPlace
PNML.PnmlTypes.HLCoreNet() -> RefPlace
PNML.PnmlTypes.PT_HLPNG() -> RefPlace
# 3 methods for generic function refplace_type from [35mPNML[39m:- refplace_type(pntd::PNML.PnmlTypes.PnmlType) in PNML at /home/runner/work/PNML.jl/PNML.jl/src/Core/types.jl:227
- refplace_type(::Type{T}) where T<:PNML.PnmlTypes.PnmlType in PNML at /home/runner/work/PNML.jl/PNML.jl/src/nodes/net.jl:258
- refplace_type(::PnmlNet{T}) where T<:PNML.PnmlTypes.PnmlType in PNML at /home/runner/work/PNML.jl/PNML.jl/src/nodes/net.jl:266
reftransition_type(pntd)
PNML.reftransition_type
— Functionreftransition_type(x) -> Type(<:RefTransition)
PNML.PnmlTypes.PnmlCoreNet() -> RefTransition
PNML.PnmlTypes.SymmetricNet() -> RefTransition
PNML.PnmlTypes.PTNet() -> RefTransition
PNML.PnmlTypes.ContinuousNet() -> RefTransition
PNML.PnmlTypes.HLPNG() -> RefTransition
PNML.PnmlTypes.HLCoreNet() -> RefTransition
PNML.PnmlTypes.PT_HLPNG() -> RefTransition
# 3 methods for generic function reftransition_type from [35mPNML[39m:- reftransition_type(pntd::PNML.PnmlTypes.PnmlType) in PNML at /home/runner/work/PNML.jl/PNML.jl/src/Core/types.jl:228
- reftransition_type(::Type{T}) where T<:PNML.PnmlTypes.PnmlType in PNML at /home/runner/work/PNML.jl/PNML.jl/src/nodes/net.jl:259
- reftransition_type(::PnmlNet{T}) where T<:PNML.PnmlTypes.PnmlType in PNML at /home/runner/work/PNML.jl/PNML.jl/src/nodes/net.jl:267
Value Types
TBD
Parser.parse_sorttype
is used to parse an XML <type> element. It is not one of these look-up a type trait methods.
- layers
Page
inside aPnmlNet
inside aAbstractPetriNet
. Where the Petri Net part is expressed as a Petri Net Type Definition XML schema file (.pntd) identified by a URI. Or would if our nonstandard extensions had schemas defined. Someday there will be such schemas.