PNML 2 dot converter

This application converts Petri net models from the PNML format into dot graphs. You can use it as a dependency in your application, run it on the command line, or launch it as a server to which you can connect to.

Execution modes


PNML 2 dot can be simply run on the command line and returns immediately. You must simply provide a list of PNML documents to convert. You can provide a single document. The path and names of the dot files will be deduced from what you provide for the PNML documents.


This application can also be run in a server mode, by default on port 10005.

As a server, it provides a one-shot (synchronous) service, meaning:

  • open a connection to the server;
  • send your PNML document;
  • get the result of the service;
  • close the connection. That's it.

    The result is composed of:

    • a HTTP status code; the list of the codes used is provided on the usage page;
    • a message explaining the result of the service;
    • a delimiter to help identify the beginning of the dot graph if the service was successful; this delimiter is provided on the usage page;
    • the dot graph.

Supported standard types

In this version, the Core Model, P/T Nets and Symmetric Nets are supported. To improve the presentation of the net graph using dot, we now hide the annotations in comments in the dot file. Visually you will thus get for example a Core Model without annotations, a P/T net with places markings and arcs annotations (when greater than, resp. 0 and 1), a Symmetric net without annotations.

As for Symmetric Nets, if their annotations are presented as texts in the PNML document (not structured as ASTs), then we export them as comments in the dot file. We don't export their structured annotations into dot. This is planned for a next release.