PNML.jl
Documentation for the GitHub PNML.jl repository. Which defines a Julia module named PNML
. Which handles an XML markup language with the acronym 'PNML' – Petri Net Markup Language.
These docs were generated at 2025-09-14T15:32:40.292 on runnervmf4ws1 using:
- PNML: v0.0.23
julia> versioninfo()
Julia Version 1.12.0-rc2 Commit 72cbf019d04 (2025-09-06 12:00 UTC) Build Info: Official https://julialang.org release Platform Info: OS: Linux (x86_64-linux-gnu) CPU: 4 × AMD EPYC 7763 64-Core Processor WORD_SIZE: 64 LLVM: libLLVM-18.1.7 (ORCJIT, znver3) GC: Built with stock GC Threads: 1 default, 1 interactive, 1 GC (on 4 virtual cores) Environment: JULIA_PKG_SERVER_REGISTRY_PREFERENCE = eager
- has publications and tutorials covering PNML at various points in its evolution.
- has links to a series of ISO/IEC 15909 standards relating to PNML.
- is the cannonical site for the meta-models, RELAX-NG XML schemas that define the grammar of several Petri Net Type Defintions (pntd), including:
- PT Net (Place/Transition Net)
- Symmetric Net
- and more: examples, meta-models in EMF, java-based framework
There are 2 flavors currently covered by PNML meta-models:
- integer-valued, where tokens have collective identities.
- High-level, where tokens have individual identities using a many-sorted algebra.
The people behind PNML, and as stated in 15909-2, are of the Model Driven Software Engineering camp and have chosen Java, Eclipse and its modeling framework (EMF).
See A primer on the Petri Net Markup Language and ISO/IEC 15909-2(pdf) for more details. The rest of this page will hopefully make more sense if you are familiar with the primer's contents. Use the RelaxNG Schema as definitive like the 'primer' counsels.
See Extending PNML Scope: a Framework to Combine Petri Nets Types for concepts relevant to ISO/IEC 15909-3.
Note that the pnml XML file is the working intermediate representation of a suite of tools that use RelaxNG and Schematron for validation of the interchange file's content.
Interoperability
Petri Net Type Definition schema files (pntd) are defined using RELAX-NG XML Schema files (rng). Petri Net Markup Language files (pnml) are intended to be validated against a pntd schema.
For interchange of pnml between toolinfos it should be enough to support the same pntd schema.
Note that ISO released part 3 of the PNML standard covering extensions and structuring mechanisms in 2021. And some http://www.pnml.org files address these extensions. Including Extending PNML Scope: a Framework to Combine Petri Nets Types.
It is possible to create a non-standard pntd. And more will be standardized, either formally or informally. Non-standard mostly means that the interchangibility is restricted.
Since validation is not a goal of PNML.jl the uri is treated as a string. So non-standard pntds can be used for the URI of an XML net
tag's type
attribute. Notably pnmlcore
and nonstandard
are mapped to PnmlCoreNet
.
PnmlCoreNet
is the minimum level of meaning that any pnml file can hold.
Further parsing of labels is specialized upon subtypes of PNML.AbstractPetriNet
. See Traits for more details.
If you want interchangability of pnml models, you will have to stick to the standard pnml pntds. The High Level Petri Net, even when restricted to symmetricnet.pntd, is very expressive. Even the base pnmlcore.pntd is useful.
Why no Schema Verification
Within PNML.jl no schema-level validation is done.
Note that, depending on context, 'PNML' may refer to either the markup language or the Julia code in the following.
In is allowed by the PNML standard to omit validation with the presumption that some specialized, external tool can be applied, thus allowing the file format to be used for inter-tool communication with lower overhead in each tool.
Also omiting pntd validation allows "duck typing" of Petri Nets built upon the PNML intermediate representration.
Of some note it that PNML.jl extends PNML. These, non-standard pntd do not (yet) have a schema written. See ContinuousNet
.
References
L.M. Hillah and E. Kindler and F. Kordon and L. Petrucci and N. Trèves: A primer on the Petri Net Markup Language and ISO/IEC 15909-2 Petri Net Newsletter 76:9–28, October 2009 (originally presented at the 10th International workshop on Practical Use of Colored Petri Nets and the CPN Tools – CPN'09).
ISO High-level Petri nets Standard in multiple parts:
- ISO/IEC 15909-1:2019 — Part 1: Concepts, definitions and graphical notation
- ISO/IEC 15909-2:2011 — Part 2: Transfer format
- ISO/IEC 15909-2:2011/Cor 1:2013 — Part 2: Transfer format — TECHNICAL CORRIGENDUM 1
- ISO/IEC 15909-3:2021 — Part 3: Extensions and structuring mechanisms
Towards a Standard for Modular Petri Nets:A Formalisation expounds on structuring mechanism in 15909-3. From Proc. 30th Int. Conf. Application and Theory of Petri Nets (PetriNets’2009), Paris, France, June 2009, volume 5606 of Lecture Notes in Computer Science. Springer, 2009.
Extending PNML Scope: a Framework to Combine Petri Nets Types L.M. Hillah and F. Kordon and C. Lakos and L. Petrucci, Transactions on Petri Nets and Other Models of Concurrency, Springer 2012, LNCS 7400 (VI), pp.46-70
nLab a wiki for collaborative work on Mathematics, Physics, and Philosophy:
Well-formed Petri nets "...only a limited set of operators are available (identify, broadcast, successor and predecessor functions are allowed on circular finite types)". Restrictions that differentiates SymmetricNet
and HLPNG
.
John Baez, Fabrizio Genovese, Jade Master, Michael Shulman, Categories of Nets, arXiv:2101.04238
R.J. van Glabbeek (2005): The Individual and Collective Token Interpretations of Petri Nets. In M. Abadi & L. de Alfaro, editors: Proceedings 16th International Conference on Concurrency Theory, CONCUR’05, San Francisco, USA, LNCS 3653, Springer, pp. 323-337.
PNML Framework "... a free and open-source prototype implementation of ISO/IEC-15909, International Standard on Petri Nets". The framework is an Eclipse/Java construction using Eclipse Public License 1.0. Uses 'Eclipse` Model-Driven Engineering EMF to provide generated APIs.
github.com/lip6/pnmlframework hosts the source code of PNML Framework. See apidocs and XMLTestFilesRepository.
github.com/loig/pinimili Go language.
github.com/stackdump/gopetri Go language.
Petri net visualisator written in Go. Go language. Non-standard pnml xml syntax.
LTSmin "a full (LTL/CTL/μ-calculus) model checker". C/M4/C++ language.
github.com/daemontus/pnml-parser Rust language.
Browsable PNML Grammar from Grammar Zoo For Symmetric Nets.
Automated Code Optimization with E-Graphs: Alessandro Cheli's Thesis on Metatheory.jl.
ePNK a platform for developing Petri net tools based on the PNML transfer format is another Eclipse/Java EMF thing. Implements more complicated PNML than used in MCC. By some of the creators of PNML. github has the source, documentation, examples.
"The Model Checking Contest (MCC) has two different parts: the Call for Models, which gathers Petri net models proposed by the scientific community, and the Call for Tools, which benchmarks verification tools developed within the scientific community." Each year new models are added to the contest.
Nested-Unit Petri Nets (NUPN) an "extension of P/T nets" used by MCC:
- existence of units has no effect on the transition firing rules
- partitions the set of places
- if a net is unit-safe, units express linear inequality invariants on reachable markings, and tools may take advantage of such invariants to perform logarithmic reductions in the size of marking encodings.
"Petri net model using AlgebraicPetri.jl Micah Halter, 2021-03-26"
C. Gutsche, S. Götz, V. Prokopets and U. Aßmann, "Context-Role Oriented Programming in Julia: Advancing Swarm Programming," 2025 IEEE/ACM 20th Symposium on Software Engineering for Adaptive and Self-Managing Systems (SEAMS), Ottawa, ON, Canada, 2025, pp. 85-95, doi: 10.1109/SEAMS66627.2025.00017. keywords: {Performance evaluation;Surveillance;Collaboration;Programming;Software;Hardware;Multi-robot systems;Drones;Software engineering;Software development management;Roles;Teams;Contexts;Swarms;Drones;SelfAdaptive Systems;Julia},
Contexts.jl is not registered. May not run as I cannot (as of 2025-08-08) find the file "PetriNetTypeDef.jl". They just did a "Big Change" last week. No obvious input file format detected in the code.
DistributedWorkflows.jl Does not use a Petri net input file. Constructs one internally? Uses GPI-Space where Petri nets are represented in a XML format called XPNET that embedds C++ code fragments.
BioSimulator.jl uses a simple internal species-reaction Petri net.
Dialectica Petri nets Finally we would like to investigate whether we could code our nets using Catlab https://github.com/AlgebraicJulia/Catlab.jl. Linear Logic Flavoured Composition of Petri Nets.
- PNML ⇒ QPN, QPNc
- PNML support, except export of QPNc in Snoopy to High-Level Petri Nets in PNML (upcomming)
- place/transition Petri net - QPN
- colored qualitative Petri net - QPNc
- extended Petri net (read / inhibitor / equal / reset / marking-dependent arcs) - XPN