<?xml version="1.0" encoding="UTF-8"?>
<TEI xml:space="preserve" xmlns="http://www.tei-c.org/ns/1.0" 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
xsi:schemaLocation="http://www.tei-c.org/ns/1.0 https://raw.githubusercontent.com/kermitt2/grobid/master/grobid-home/schemas/xsd/Grobid.xsd"
 xmlns:xlink="http://www.w3.org/1999/xlink">
	<teiHeader xml:lang="en">
		<fileDesc>
			<titleStmt>
				<title level="a" type="main">Debugging Non-Determinism: a Petrinets Modelling, Analysis, and Debugging Tool</title>
			</titleStmt>
			<publicationStmt>
				<publisher/>
				<availability status="unknown"><licence/></availability>
			</publicationStmt>
			<sourceDesc>
				<biblStruct>
					<analytic>
						<author role="corresp">
							<persName><forename type="first">Simon</forename><surname>Van Mierlo</surname></persName>
							<email>simon.vanmierlo@uantwerpen.be</email>
						</author>
						<author>
							<persName><forename type="first">Hans</forename><surname>Vangheluwe</surname></persName>
						</author>
						<author>
							<persName><forename type="first">Flanders</forename><surname>Make</surname></persName>
						</author>
						<author>
							<affiliation key="aff0">
								<orgName type="institution">University of Antwerp</orgName>
							</affiliation>
						</author>
						<author>
							<affiliation key="aff1">
								<orgName type="institution">University of Antwerp</orgName>
							</affiliation>
						</author>
						<author>
							<affiliation key="aff2">
								<orgName type="institution">McGill University</orgName>
							</affiliation>
						</author>
						<title level="a" type="main">Debugging Non-Determinism: a Petrinets Modelling, Analysis, and Debugging Tool</title>
					</analytic>
					<monogr>
						<imprint>
							<date/>
						</imprint>
					</monogr>
					<idno type="MD5">9FB2C7309E9F5414FEE41C3DEB455F59</idno>
				</biblStruct>
			</sourceDesc>
		</fileDesc>
		<encodingDesc>
			<appInfo>
				<application version="0.7.2" ident="GROBID" when="2023-03-24T01:16+0000">
					<desc>GROBID - A machine learning software for extracting information from scholarly documents</desc>
					<ref target="https://github.com/kermitt2/grobid"/>
				</application>
			</appInfo>
		</encodingDesc>
		<profileDesc>
			<abstract>
<div xmlns="http://www.tei-c.org/ns/1.0"><p>Non-deterministic formalisms are used to model systems whose runtime behaviour is inherently non-deterministic (its runtime execution might be different in consecutive runs, even for the same inputs). To analyse these systems, the full state space is explored to check whether an unwanted state (for example: deadlock, unsafe) can be reached. Debugging support for such formalisms is currently limited. This paper presents a prototype tool which allows to interactively construct the reachability graph (by manually stepping). The construction can be automatically paused at the moment a state of interest is reached (breakpointing). This should lead to earlier detection of errors and easier resolution, since the user can observe and control the reachability analysis.</p></div>
			</abstract>
		</profileDesc>
	</teiHeader>
	<text xml:lang="en">
		<body>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>I. INTRODUCTION</head><p>Non-deterministic formalisms, such as Petrinets <ref type="bibr" target="#b0">[1]</ref> provide abstractions for natively modelling systems whose (inherent) runtime behaviour can differ from one execution to the next, even for the same inputs. Examples include, amongst others, distributed systems, safety-critical embedded systems that can be interrupted by its environment, and programs executing on multiple threads accessing shared resources. By modelling their inherent non-determinism, it becomes possible to exhaustively explore the state space of the system and infer properties concerning its safety and liveness. A full state space exploration might, however, take a long time to complete for non-trivial systems.</p><p>Recently, multiple works have introduced debugging operations for a number of modelling formalisms <ref type="bibr" target="#b1">[2]</ref>, <ref type="bibr" target="#b2">[3]</ref>, <ref type="bibr" target="#b3">[4]</ref>. Often, these techniques deal with deterministic formalisms whose semantics result in an execution trace that evolves the state of the system over time. Common operations, transposed from code debugging, include pausing, stepping (at several levels of granularity), (scaled) real-time simulation and breakpoints (automatic pauses on state conditions).</p><p>Debugging operations for non-deterministic formalisms have not been thoroughly researched. This paper presents a prototype debugging tool for Petrinets, which is a basic, but representative example of a non-deterministic formalism. Usually, to analyse a Petrinets model, its reachability graph is constructed and subsequently queried: if an undesirable state can be reached (for example, a deadlock state), the user needs to manually check how that invalid state was reached. Tools for analysing Petrinet models offer limited debugging capabilities. As an example, TINA <ref type="bibr" target="#b4">[5]</ref> allows to step through a model's firing sequence manually, but does not offer more advanced capabilities such as breakpoints.</p><p>We extend the set of existing analysis operations with interactive debugging operations that allow to steer the reachability analysis in a direction deemed most useful by the modeller. In a sense, we envision to combine the existing formal analysis techniques with debugging operations to get the best of both worlds: the reachability graph is constructed up to a point deemed interesting by the modeller (and paused automatically using a breakpoint), after which they are free to step through the rest of the reachability analysis by hand. While our tool is built for the Petrinets formalism, the techniques are general and can be applied to other non-deterministic formalisms.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>II. TOOL OVERVIEW</head><p>This section describes the Petrinets debugger. We first look at its architecture, which is based on the Modelverse <ref type="bibr" target="#b5">[6]</ref>, our (meta)modelling kernel and repository. Then, we describe the visual interface used for modelling Petrinet models and debugging their reachability graphs.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>A. Architecture</head><p>Our architecture is based on the Modelverse, our modelling framework and repository <ref type="bibr" target="#b5">[6]</ref>. In the Modelverse, we model the abstract syntax of the Petrinets language: a model in the language consists of a number of Places and Transitions. Places can have a number of (initial) tokens (an integer number) and can be connected to transitions; transitions can be connected to places as well.</p><p>The semantics of the language is defined in the Modelverse in the form of an action language model (an analyser). The analyser produces a reachability graph, which consists of a set of reachable markings. A marking contains a number of tokens for each place. These markings are connected: a link denotes that the destination marking can be reached from the source marking when a transition is triggered. A transition can be triggered when all of its input places contain at least one token; it then subtracts one token from all its input places and adds a token in all its output places (resulting in a new reachable marking). Figure <ref type="figure" target="#fig_0">1</ref> visualises the architecture of our solution: the Modelverse provides all modelling operations and allows to define an analyser in action code. It is deployed on a server which provides an API that is called using XMLHTTP requests. For visualization purposes, we implement a Python Tkinter application which allows to visually model Petrinets in one window and analyse/debug them, showing the reachability graph in a separate frame and allowing the user to interact with it. The following subsection explains which debugging operations we added to the reachability graph construction algorithm. Details on the visual modelling and debugging interface are provided in the last subsection.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>B. Debugging Operations</head><p>We define the following debugging operations:</p><p>• Continuous Operation executes the reachability graph construction algorithm until the full reachability graph has been generated (this is equivalent to running the analyser without debugging support). • Step executes one analysis "step": it generates one additional reachable node in the reachability graph. • Manual allows the user to fully control the analyser through the visual interface. The debuggable analyser will expose these phases in the algorithm and allow the user to control them:</p><p>1) The analyser communicates all markings that are "unexplored". An unexplored marking has at least one enabled, non-explored transition. Unexplored markings are highlighted in the interface, and the user can choose on of them.</p><p>2) When the user has chosen one of the unexplored markings, the marking is loaded into the Petrinet model and the analyser communicates which transitions are enabled (and unexplored) in that particular marking. These transitions are highlighted in green and the user can choose one of them by clicking on it.</p><p>3) The analyser executes the transition and updates the reachability graph. This mode is most interesting to go back to a (partially) unexplored node in the reachability graph and continue its construction from that point interactively.</p><p>• Breakpoints allow the user to automatically pause the analysis when a certain condition on the state (i.e., the structure of the reachability graph) is reached. From there, the user can use one of the above operations to resume construction.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>C. Interface</head><p>The visual modelling, analysis, and debugging interface is shown in Figure <ref type="figure">2</ref>. At the top, the modelling interface for Petrinets is shown with a loaded model that describes a producer-consumer system (1). A toolbar allows to edit the model (2). Below, the (partial) reachability graph is shown (3). A toolbar allows the user to control the analysis using the operations defined in the previous subsection (4). In the screenshot, the user is manually controlling the analysis algorithm and has selected the bottom-most marking (highlighted in yellow). In the Petrinets model, the marking is loaded in the places, and the enabled transitions are highlighted in green. By clicking one of them, a new (unexplored) marking will be added to the reachability graph.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>III. CONCLUSION</head><p>This paper presents a prototype visual modelling, analysis and debugging interface for Petrinets, chosen as a representative non-deterministic formalism. The interface allows to model Petrinets and analyse them, visualising its reachability graph as it is constructed. Additional control is given to the user in the form of debugging operations: the user can step through the reachability graph construction and manually control which marking is generated next. This allows users to interactively explore the reachability graph. In future work, these techniques can be used to build debuggers for more advanced non-deterministic formalisms (such as model transformations <ref type="bibr" target="#b6">[7]</ref>, process modelling formalisms, etc.).</p></div><figure xmlns="http://www.tei-c.org/ns/1.0" xml:id="fig_0"><head>Fig. 1 .</head><label>1</label><figDesc>Fig. 1. The architecture of our solution.</figDesc><graphic coords="2,48.96,169.56,250.70,98.70" type="bitmap" /></figure>
<figure xmlns="http://www.tei-c.org/ns/1.0"><head></head><label></label><figDesc></figDesc><graphic coords="3,142.24,194.68,327.52,502.11" type="bitmap" /></figure>
		</body>
		<back>

			<div type="acknowledgement">
<div xmlns="http://www.tei-c.org/ns/1.0"><head>ACKNOWLEDGMENT</head><p>This work was funded by Flanders Make vzw, the strategic research centre for the manufacturing industry, and with a PhD fellowship from the Agency for Innovation by Science and Technology in Flanders (IWT). We thank Yentl Van Tendeloo for his support of and with the Modelverse.</p></div>
			</div>

			<div type="references">

				<listBibl>

<biblStruct xml:id="b0">
	<analytic>
		<title level="a" type="main">Petri nets: Properties, analysis and applications</title>
		<author>
			<persName><forename type="first">T</forename><surname>Murata</surname></persName>
		</author>
	</analytic>
	<monogr>
		<title level="m">Proceedings of the IEEE</title>
				<meeting>the IEEE</meeting>
		<imprint>
			<date type="published" when="1989-04">Apr 1989</date>
			<biblScope unit="volume">77</biblScope>
			<biblScope unit="page" from="541" to="580" />
		</imprint>
	</monogr>
</biblStruct>

<biblStruct xml:id="b1">
	<analytic>
		<title level="a" type="main">Supporting efficient and advanced omniscient debugging for xdsmls</title>
		<author>
			<persName><forename type="first">E</forename><surname>Bousse</surname></persName>
		</author>
		<author>
			<persName><forename type="first">J</forename><surname>Corley</surname></persName>
		</author>
		<author>
			<persName><forename type="first">B</forename><surname>Combemale</surname></persName>
		</author>
		<author>
			<persName><forename type="first">J</forename><surname>Gray</surname></persName>
		</author>
		<author>
			<persName><forename type="first">B</forename><surname>Baudry</surname></persName>
		</author>
	</analytic>
	<monogr>
		<title level="m">Proceedings of the 2015 ACM SIGPLAN International Conference on Software Language Engineering, ser. SLE 2015</title>
				<meeting>the 2015 ACM SIGPLAN International Conference on Software Language Engineering, ser. SLE 2015<address><addrLine>New York, NY, USA</addrLine></address></meeting>
		<imprint>
			<publisher>ACM</publisher>
			<date type="published" when="2015">2015</date>
			<biblScope unit="page" from="137" to="148" />
		</imprint>
	</monogr>
</biblStruct>

<biblStruct xml:id="b2">
	<analytic>
		<title level="a" type="main">Practical domainspecific debuggers using the moldable debugger framework</title>
		<author>
			<persName><forename type="first">A</forename><surname>Chis</surname></persName>
		</author>
		<author>
			<persName><forename type="first">¸</forename></persName>
		</author>
		<author>
			<persName><forename type="first">M</forename><surname>Denker</surname></persName>
		</author>
		<author>
			<persName><forename type="first">T</forename><surname>Gîrba</surname></persName>
		</author>
		<author>
			<persName><forename type="first">O</forename><surname>Nierstrasz</surname></persName>
		</author>
	</analytic>
	<monogr>
		<title level="j">Comput. Lang. Syst. Struct</title>
		<imprint>
			<biblScope unit="volume">44</biblScope>
			<biblScope unit="page" from="89" to="113" />
			<date type="published" when="2015-12">Dec. 2015</date>
		</imprint>
	</monogr>
</biblStruct>

<biblStruct xml:id="b3">
	<analytic>
		<title level="a" type="main">Debugging Parallel DEVS</title>
		<author>
			<persName><forename type="first">S</forename><surname>Van Mierlo</surname></persName>
		</author>
		<author>
			<persName><forename type="first">Y</forename><surname>Van Tendeloo</surname></persName>
		</author>
		<author>
			<persName><forename type="first">H</forename><surname>Vangheluwe</surname></persName>
		</author>
		<idno type="DOI">10.1177/0037549716658360</idno>
		<ptr target="http://dx.doi.org/10.1177/0037549716658360" />
	</analytic>
	<monogr>
		<title level="j">SIMULATION</title>
		<imprint>
			<biblScope unit="volume">93</biblScope>
			<biblScope unit="issue">4</biblScope>
			<biblScope unit="page" from="285" to="306" />
			<date type="published" when="2017">2017</date>
		</imprint>
	</monogr>
</biblStruct>

<biblStruct xml:id="b4">
	<analytic>
		<title level="a" type="main">Time petri nets analysis with tina</title>
		<author>
			<persName><forename type="first">B</forename><surname>Berthomieu</surname></persName>
		</author>
		<author>
			<persName><forename type="first">F</forename><surname>Vernadat</surname></persName>
		</author>
		<idno type="DOI">10.1109/QEST.2006.56</idno>
		<ptr target="http://dx.doi.org/10.1109/QEST.2006.56" />
	</analytic>
	<monogr>
		<title level="m">Proceedings of the 3rd International Conference on the Quantitative Evaluation of Systems, ser. QEST &apos;06</title>
				<meeting>the 3rd International Conference on the Quantitative Evaluation of Systems, ser. QEST &apos;06<address><addrLine>Washington, DC, USA</addrLine></address></meeting>
		<imprint>
			<publisher>IEEE Computer Society</publisher>
			<date type="published" when="2006">2006</date>
			<biblScope unit="page" from="123" to="124" />
		</imprint>
	</monogr>
</biblStruct>

<biblStruct xml:id="b5">
	<analytic>
		<title level="a" type="main">Foundations of a multi-paradigm modelling tool</title>
		<author>
			<persName><forename type="first">Y</forename><surname>Van Tendeloo</surname></persName>
		</author>
	</analytic>
	<monogr>
		<title level="m">MoDELS ACM Student Research Competition</title>
				<imprint>
			<date type="published" when="2015">2015</date>
			<biblScope unit="page" from="52" to="57" />
		</imprint>
	</monogr>
</biblStruct>

<biblStruct xml:id="b6">
	<analytic>
		<title level="a" type="main">Efficient and scalable omniscient debugging for model transformations</title>
		<author>
			<persName><forename type="first">J</forename><surname>Corley</surname></persName>
		</author>
		<author>
			<persName><forename type="first">B</forename><forename type="middle">P</forename><surname>Eddy</surname></persName>
		</author>
		<author>
			<persName><forename type="first">E</forename><surname>Syriani</surname></persName>
		</author>
		<author>
			<persName><forename type="first">J</forename><surname>Gray</surname></persName>
		</author>
	</analytic>
	<monogr>
		<title level="j">Software Quality Journal</title>
		<imprint>
			<biblScope unit="page" from="1" to="42" />
			<date type="published" when="2016">2016</date>
		</imprint>
	</monogr>
</biblStruct>

<biblStruct xml:id="b7">
	<monogr>
		<title level="m" type="main">The visual modelling and debugging interface</title>
		<author>
			<persName><surname>Fig</surname></persName>
		</author>
		<imprint/>
	</monogr>
</biblStruct>

				</listBibl>
			</div>
		</back>
	</text>
</TEI>
