<!DOCTYPE article PUBLIC "-//NLM//DTD JATS (Z39.96) Journal Archiving and Interchange DTD v1.0 20120330//EN" "JATS-archivearticle1.dtd">
<article xmlns:xlink="http://www.w3.org/1999/xlink">
  <front>
    <journal-meta />
    <article-meta>
      <title-group>
        <article-title>Visualising Data Sets in Structured Occurrence Nets</article-title>
      </title-group>
      <contrib-group>
        <aff id="aff0">
          <label>0</label>
          <institution>Faculty of Computer Science and Engineering, University of Hai'l</institution>
          ,
          <addr-line>Hai'l</addr-line>
          ,
          <country country="SA">Saudi Arabia</country>
        </aff>
        <aff id="aff1">
          <label>1</label>
          <institution>School of Computing, Newcastle University</institution>
          ,
          <addr-line>Newcastle upon Tyne</addr-line>
          ,
          <country country="UK">UK</country>
        </aff>
      </contrib-group>
      <fpage>121</fpage>
      <lpage>132</lpage>
      <abstract>
        <p>Visualization techniques have been used with increasing success to assist users in complex system analyses, providing meaningful insights. Structured Occurrence Nets (SONs) originate from occurrence nets (ONs), which are directed acyclic graphs showing causality and concurrency in system executions. Visualization of SONs in tools such as SonCraft is currently limited, as there is a lack of effective support to visualise complex and large data sets. In this paper, we address challenges resulting from the overlapping and out-of-order placement of ONs, and propose a novel solution to deal with this issue based on a step execution policy. Also, we discuss the development of the resulting algorithm, and SonCraft plug-in implementing it.</p>
      </abstract>
      <kwd-group>
        <kwd>structured occurrence nets</kwd>
        <kwd>maximal concurrency</kwd>
        <kwd>visual- ization</kwd>
      </kwd-group>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>-</title>
      <p>
        Complex and large data sets drive considerable attention from information
science researchers, crime investigators, and decision makers within governments.
Tremendous growth of this kind of data tends to transform its analysis into a
hard process. The existence of such data provides important insights, but also
raises challenges. In particular, visualization techniques have been used with
increasing success to assist users in various analyses, and providing valuable
insights about system structure and behaviour [
        <xref ref-type="bibr" rid="ref12 ref3">3, 12</xref>
        ].
      </p>
      <p>
        Structured occurrence nets (SONs) [
        <xref ref-type="bibr" rid="ref10">10</xref>
        ] originate from occurrence nets (ONs),
which are directed acyclic graphs which show the causality and concurrency
involved in system executions. Although SONs are supported by visualization
in tools such as SonCraft [
        <xref ref-type="bibr" rid="ref6 ref7 ref8">6–8</xref>
        ], there are currently limitations as one cannot
effectively visualise data sets automatically. Our aim is to enhance SonCraft
making it possible to visualise big data sets in an helpful and understandable
way. The approach we propose is to use semantically driven visualization which
adopts maximal concurrency (a step execution policy in the sense of [
        <xref ref-type="bibr" rid="ref1">1</xref>
        ]) to
provide structured displays. As a result, the new approach should lead to effective
display of complex SONs.
      </p>
      <p>The paper is organised as follows. The next section describes the basic
features SONs. Section 3 discusses visualization challenges related to SONs in
SonCraft, and proposes a novel solution to deal with them based on maximal
concurrency. Section 4 describes implementation and results. The last section contains
concluding remarks.
2
2.1</p>
    </sec>
    <sec id="sec-2">
      <title>Background</title>
      <sec id="sec-2-1">
        <title>Structure occurrence nets (SONs)</title>
        <p>
          Ocurrence net is an abstract record of a single execution of some computing
system in which only information about causality and concurrency between events
and visited local states is represented. SONs [
          <xref ref-type="bibr" rid="ref11 ref6">6, 11</xref>
          ] concept is originally grounded
in occurrence nets (ONs), which are directed acyclic graphs which show causality
and concurrency of information concerning a single execution of a system [
          <xref ref-type="bibr" rid="ref11 ref6">6, 11</xref>
          ].
Figure 1 (a) shows an occurrence net (ON). A SON consists of multiple ONs
which are associated with each other through various types of formal
relationships. SONs are used for recording information concerning the actual behavior of
a complex system, and any particular evidence which can be collected in terms
of analyzing its past behavior [
          <xref ref-type="bibr" rid="ref5">5</xref>
          ]. The most useful way to use SONs is within
a detailed analytical investigation, although there is still a lack of investigation
support systems which rely on SONs. The significance of SONs results from the
fact that their structuring reduces complexity compared to that of any equivalent
representation, and they provide a direct means of modelling evolving systems.
Communication in (SONs) Communication in SONs is of two types:
asynchronous and synchronous [
          <xref ref-type="bibr" rid="ref11 ref5 ref9">5, 9, 11</xref>
          ]. Figure 1 (b) shows a communication
structured occurrence net (C-SON) which consists of two occurrence nets, namely
ON 1 and ON 2. Figure 1 (b) depicts asynchronous communication which is
represented through the dashed arc between two events in different ONs, e.g., (e0)
and (e2). The second type of communication within SONs is synchronous
communication which is represented by the two arcs between events (e1; e3) via the
two arcs via channel place (q1 and q2) [
          <xref ref-type="bibr" rid="ref11 ref5">5, 11</xref>
          ]. Thus, in any execution consistent
with the causal relationships captured by (C-SON), (e0) will never be executed
after (e2), although the two events can be executed simultaneously, whereas (e1)
and (e3) will always be executed simultaneously.
        </p>
        <p>SONs are underpinned by causal structures which extend causal partial
orders with additional ordering, called weak causality. Two events ordered in this
way can be executed in the order given or simultaneously. Moreover, if two
events are weakly ordered in both directions(this means, in particular, that weak
causality is not assumed to be acyclic), then they can only be executed
simultaneously. In SONs, weak causality results from passing tokens through channel
places, whereas the non-channel places introduce the standard causality, as in
ONs. In Figure 1 (b), (e0) weakly causes (e2), and the events (e1) and (e3) form
weak causality cycle.</p>
      </sec>
      <sec id="sec-2-2">
        <title>Behavioural Structured Occurrence Nets (BSONs) Behavioural struc</title>
        <p>
          tured occurrence nets (BSONs) are used [
          <xref ref-type="bibr" rid="ref5">5</xref>
          ] to model the activities of an evolving
system. There are two designated levels which represent the execution history.
The lower level illustrates behavioral details. The upper level illustrates the
evolution of the system [
          <xref ref-type="bibr" rid="ref10 ref5">5, 10</xref>
          ]. Thus, a BSON provides information on the evolution
of a particular individual system. In Figure 2, one level represent what has
occurred in terms of the specific system and its evolution, while the other reveals
the behaviour of the systems [
          <xref ref-type="bibr" rid="ref5">5</xref>
          ].
The current section evaluates SonCraft from the perspective of interaction
techniques, as there are issues to be expected when inputting data to SonCraft,
after allowing the tool to accept data sets automatically. Such issues include the
overlapping of ONs. They can be addressed by using the concept of maximal
concurrency, which is a step execution policy in the sense of [
          <xref ref-type="bibr" rid="ref1">1</xref>
          ]. Concerning the
implementation of new visualization techniques, they deal with the two main
purposes of data analysis, namely understanding and exploration. The aim of
exploration in data analysis is to find a perspective which has not been previously
discovered. A good example is a crime investigator who searches for behavioural
patterns of criminal gangs. As a result, this will allow us to develop SonCraft
so that it will be able to help investigators in detecting subtle patterns (modus
operandi) embedded inside data automatically retrieved by SonCraft. However,
some problems are to be expected, and they are discussed in the next section.
3.1
        </p>
      </sec>
      <sec id="sec-2-3">
        <title>Loading data sets in SonCraft</title>
        <p>Although SonCraft allows visualising data in an attractive way, it does so mainly
when cases are manually modelled. The main issue which users face while
attempting to load data automatically is overlapping and out-of-order placement.
As shown in Figure 3, we should expect both problems after inputting data sets
into SonCraft. Figure 4 shows a better way of presenting the same data which
avoids overlapping, but still places ONs in an unstructured way. The latter
problem will be addressed by applying the idea of maximal concurrency to order the
events, and so also the ONs.</p>
        <p>There are various reasons due to which overlapping occurs. The first one is
due to the fact that although data is loaded automatically when it is retrieved,
it is loaded randomly. The other reason is given by the fact that the current
SonCraft platform is not prepared to deal with data in an automatic way.
3.2</p>
      </sec>
      <sec id="sec-2-4">
        <title>Proposed solution</title>
        <p>
          Our approach to solving visualisation problems related to SONs consists in a
careful consideration of the positioning of the ONs within the workplace area.
The method involves the arrangement of ONs in a particular way so as to prevent
and avoid overlapping and out-of-order placement by using maximal concurrency
(a step execution policy in the sense of [
          <xref ref-type="bibr" rid="ref1">1</xref>
          ]). The novel idea is to allow users
to automatically control and retrieve data from SonCraft leading to what one
might call a policy-driven visualization. This approach allows the visualization
of concurrency in display systems which are capable of representing it, such as
SonCraft.
3.3
        </p>
      </sec>
      <sec id="sec-2-5">
        <title>Policy-driven visualization algorithm</title>
        <p>
          We have taken advantage of the well-known algorithms such as topological
sorting and Tarjan algorithm. The idea behind the algorithm is explained and
explanation is supported by clarifying examples. Our consideration to solve the
visualization challenge led us to use topological sorting which treats a directed
graph as a basis of a linear ordering for that graphs vertices [
          <xref ref-type="bibr" rid="ref2">2</xref>
          ]. In order to
identify maximally concurrent events in SONs, we needed to find executable events
and then co-locate all transitions as maximally concurrent subsets in a particular
set X. For example, in Figure 5, there is a maximal concurrency between event
(a) in ON (g0) and event (f ) in ON (g1), so these events are relocated as one
cluster. After placing (a) and (f ) in the same maximal ‘slice’, events (b), (c) and
(g) also represent maximally concurrent execution and, similarly, after placing
them, events (d) and (e).
        </p>
        <p>
          The result of applying visualization based on the maximal concurrency policy
discussed above is illustrated in Figure 5. As shown, all events within the various
ONs are maximal and have been manually clustered. However, our approach is
to allow data sets to be retrieved automatically rather than manually. As such,
several algorithms have been considered to assist us in doing so. As Khan [
          <xref ref-type="bibr" rid="ref2">2</xref>
          ]
emphasizes, the main reasoning behind topological algorithms resides in finding
a list of start nodes which have no incoming edges [
          <xref ref-type="bibr" rid="ref2">2</xref>
          ], and then inserting that
node into a particular set X. After that, the node is deleted from the graph
and further nodes with no incoming arcs are identified. The development of
such an algorithm will help us in finding maximal concurrency events. Thus, our
approach consists of using a topological algorithm with the purpose of finding
any events which are ready to be executed. In order to identify any event with
maximal concurrency, we would need to find an event which has no previous
events connected to it. Although SONs are semantically acyclic graphs (in the
sense of step sequence semantics) and the topological algorithm was working
properly, a challenge arose during the process. It was due to a special kind
of cycle (weak causality cycle) within SONs, which occurs when two or more
different ONs communicate with each other in a synchronous manner, through
channel places. Figure 6 illustrates this situation.
        </p>
        <p>As a result, initially, our algorithm could not handle such a situation, because
if it was to be applied, for instance, in Figure 6, then event (a) had another event
connected with it, i.e., event (d). However, our approach to cope with these
problems in such situations can be solved, should they occur, by using Tarjan
algorithm. This algorithm was adapted so as to allow it to detect this special
kind of cycle (i.e. weak causality cycle). The adaptation implied the ability to
push every event of a particular cycle in one set as maximal concurrency cluster,
should this type of cycle occur. For instance, after applying the algorithm to
the graph in Figure 6, the first cycle between the three existing ONs, namely
(ON 2, ON 3 and ON 4) was detected. This was made via channel places (q0 and
q1) and (q2 and q3). As such, the algorithm will push all events in this cycle,
namely events (a, d and f ), to one set. After that, event (b) is pushed in one set.
Finally, the second cycle between ON 1 and ON 2 is detected via channel places
(q4 and q5) in one set, namely events (g and c). Figure 6 illustrates the result.
The other interesting case that we have discovered during our investigation of
policy-driven visualization in SonCraft is shown in the next example, depicted in
Figure 7 (a). Thus, if we apply our algorithm, that use the topological algorithm,
we will push events (e1 and e3) as a set, and then push event (e2) as a set, and
finally event (e4) as another set. Figure 7 (b) shows the result. Although events
(e2) and (e4) can occur together due to asynchronous communication, this could
not be handled by the standard algorithm, because event (e2) will be treated
before event (e4). A possible solution is given by an updated algorithm where,
after detecting asynchronous communication, one pushes all events within it into
the same set. Figure 7 (c) shows the result obtained after applying this solution</p>
        <p>
          Theoutput
to our example. Note that the algorithm always succeeds when applied to a
well-formed SON thanks to the general properties of SONs established in [
          <xref ref-type="bibr" rid="ref5">5</xref>
          ].
        </p>
        <p>The pseudo-code of our algorithm for policy-driven visualisation of SONs:
4</p>
      </sec>
    </sec>
    <sec id="sec-3">
      <title>Implementation and test results</title>
      <p>
        We have implemented the policy-driven visualization algorithm as a Java
plugin in the SonCraft toolkit (based on the Workcraft platform). Workcraft is a
platform that provides a framework for the development and analysis of graph
models [
        <xref ref-type="bibr" rid="ref6">6</xref>
        ]. We have created a menu (Retrieve Big Data) that has two features.
As shown in Figure 8, the first submenu a is ‘Import SON data’, and the other
is ‘Maximal ONs events’.
Algorithm 1: Visualize SONs’ events By Maximal Concurrency
end
push temp_maximal_concurrencies to set_of_maximal_concurrencies ;
end
if (node belongs to cycle = false) then
push node to temp_maximal_concurrencies;
delete nodes from ons_nodes;
break;
      </p>
      <p>Fig. 8. Retrieve Big Data menu.</p>
      <p>
        Here is a brief explanation of the functionality of our plug-in. Firstly, our
algorithm finds the starter conditions. These are conditions without pre-events.
For every starter condition, we initialise two arrays. This will track which
conditions will be added or removed for the next loop step. Next, we will find all
cycles in the graph via the Tarjan Algorithm and store them in a list.
Afterwards, we need to find starter events and store them in a list. Starter events
are all events that do not have previous events. Next, we will loop through all
starter conditions. If we catch any starter events (for every event), we will add
them to our temporary array if they have no connections. We will also add them
to our temporary array if they have two connections, and the event does not
follow an existing event in the temporary array. Then we will set the next
condition as a starter and mark it if it is not in a cycle. However, if it is in a cycle,
we will mark the starter condition and treat it separately. Next, we will loop
through all starter conditions again. For every starter condition, we check to see
if the condition is not being marked for removal (the condition has been skipped
because the event following the condition is a part of Trajan’s cycle). If this is
the case, we obtain its post-event and all cycle events. Just after the two loops,
we will decide if a set of maximal concurrency has completed or not. Finally,
after we are sure that there are no more starter conditions, we will display the
maximal concurrency events. [
        <xref ref-type="bibr" rid="ref13">13</xref>
        ] We now discuss the results obtained after the
plugin was developed and implemented. The first test was a scenario of different
ONs with no communication between them. This shows that the plugin works
correctly. For instance, in Figure 9, the first set comprises events (a, c, d, e and
f ). Afterwards, we obtain the next set consisting of two events (b and g). The
last set has one event (h).
      </p>
      <p>Figure 11 shows the last test case. It involves asynchronous communications,
and the algorithm successfully pushes its events into one set, namely (e2 and e4).</p>
      <p>Finally, as displayed in the next figure 12, we provided a figure that shows a
larger example of our plug-in.
In this paper, the problems of ONs overlapping and out-of-order placement have
been looked into, and a novel solution to address them has been proposed. The
design and development of the corresponding algorithm has been discussed. We
provided test examples showing that our algorithm works properly.</p>
      <p>
        In future work we will address the visualization of behavioural abstraction
through maximal concurrency policy. Another direction for future work is to
implement visualization based on local maximal concurrency [
        <xref ref-type="bibr" rid="ref4">4</xref>
        ]. It is a step
execution policy that introduces an extension of the basic model of Petri nets,
namely PT-nets, by adding the notion of located transitions and locally
maximally concurrent executions of co-located transitions in order to represent the
compartmentation of membrane systems [
        <xref ref-type="bibr" rid="ref4">4</xref>
        ]. The main idea depends on
specifying the locality for transitions in PT-nets, each transition belonging to a fixed
unique locality. The precise mechanism to achieve this is to introduce a partition
of the set of all transitions using locality mapping [
        <xref ref-type="bibr" rid="ref1">1</xref>
        ].
      </p>
    </sec>
    <sec id="sec-4">
      <title>Acknowledgements</title>
      <p>The authors acknowledge financial support provided by University of Hai’l. Also,
we would like to thank the reviewers for their insightful comments on the paper.</p>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          1.
          <string-name>
            <surname>Darondeau</surname>
            ,
            <given-names>P.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Koutny</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Pietkiewicz-Koutny</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Yakovlev</surname>
            ,
            <given-names>A.</given-names>
          </string-name>
          :
          <article-title>Synthesis of Nets with Step Firing Policies</article-title>
          .
          <source>Fundam. Inform</source>
          .
          <volume>94</volume>
          (
          <issue>3-4</issue>
          ),
          <fpage>275</fpage>
          -
          <lpage>303</lpage>
          (
          <year>2009</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          2.
          <string-name>
            <surname>Kahn</surname>
            ,
            <given-names>A.B.</given-names>
          </string-name>
          :
          <article-title>Topological sorting of large networks</article-title>
          .
          <source>Communications of the ACM 5.11</source>
          ,
          <fpage>558</fpage>
          -
          <lpage>562</lpage>
          (
          <year>1962</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          3.
          <string-name>
            <surname>Keim</surname>
            ,
            <given-names>D.A.</given-names>
          </string-name>
          :
          <article-title>Information visualization and visual data mining</article-title>
          .
          <source>IEEE Transactions on Visualization and Computer Graphics 8.1</source>
          ,
          <issue>1</issue>
          -
          <fpage>8</fpage>
          (
          <year>2002</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          4.
          <string-name>
            <surname>Kleijn</surname>
            ,
            <given-names>J.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Koutny</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Rozenberg</surname>
          </string-name>
          , G.:
          <article-title>Towards a Petri net semantics for membrane systems</article-title>
          .
          <source>International Workshop on Membrane Computing</source>
          . Springer, Berlin, Heidelberg (
          <year>2005</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          5.
          <string-name>
            <surname>Koutny</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Randell</surname>
            ,
            <given-names>B.</given-names>
          </string-name>
          :
          <article-title>Structured occurrence nets: A formalism for aiding system failure prevention and analysis techniques</article-title>
          .
          <source>Fundamenta Informaticae</source>
          <volume>97</volume>
          ,
          <fpage>41</fpage>
          -
          <lpage>91</lpage>
          (
          <year>2009</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref6">
        <mixed-citation>
          6.
          <string-name>
            <surname>Li</surname>
            ,
            <given-names>B.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Koutny</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Randell</surname>
            ,
            <given-names>B.</given-names>
          </string-name>
          :
          <article-title>SonCraft: A tool for construction, simulation and verification of structured occurrence nets</article-title>
          .
          <source>Tech. Rep. CS-TR-1493</source>
          , School of Computing Science, Newcastle University (
          <year>2016</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref7">
        <mixed-citation>
          7.
          <string-name>
            <surname>Li</surname>
            ,
            <given-names>B.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Randell</surname>
            ,
            <given-names>B.</given-names>
          </string-name>
          :
          <article-title>SonCraft user manual</article-title>
          .
          <source>Tech. Rep. CS-TR-1448</source>
          , School of Computing Science, Newcastle University (
          <year>2015</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref8">
        <mixed-citation>
          8.
          <string-name>
            <surname>Li</surname>
            ,
            <given-names>B.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Koutny</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Randell</surname>
            ,
            <given-names>B.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Bhattacharyya</surname>
            ,
            <given-names>A.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Alharbi</surname>
          </string-name>
          , T.:
          <article-title>SonCraft: A Tool for Construction, Simulation and Analysis of Structured Occurrence Nets</article-title>
          . to appear
          <source>in proceedings of ACSD</source>
          (
          <year>2018</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref9">
        <mixed-citation>
          9.
          <string-name>
            <surname>Randell</surname>
            ,
            <given-names>B.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Koutny</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          :
          <article-title>Structured Occurrence Nets: Incomplete, contradictory and uncertain failure evidence</article-title>
          .
          <source>School of Computing Science Technical Report Series</source>
          (
          <year>2009</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref10">
        <mixed-citation>
          10.
          <string-name>
            <surname>Randell</surname>
            ,
            <given-names>B.</given-names>
          </string-name>
          :
          <article-title>Occurrence nets then and now: the path to structured occurrence nets</article-title>
          .
          <source>International Conference on Application and Theory of Petri Nets and Concurrency</source>
          . Springer, Berlin, Heidelberg (
          <year>2011</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref11">
        <mixed-citation>
          11.
          <string-name>
            <surname>Randell</surname>
            ,
            <given-names>B.</given-names>
          </string-name>
          :
          <article-title>Incremental construction of structured occurrence nets</article-title>
          .
          <source>Computing Science</source>
          , Newcastle University (
          <year>2013</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref12">
        <mixed-citation>
          12.
          <string-name>
            <surname>Shneiderman</surname>
            ,
            <given-names>B.</given-names>
          </string-name>
          :
          <article-title>Inventing discovery tools: combining information visualization with data mining</article-title>
          .
          <source>The Craft of Information Visualization</source>
          ,
          <fpage>378</fpage>
          -
          <lpage>385</lpage>
          (
          <year>2003</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref13">
        <mixed-citation>
          13.
          <string-name>
            <surname>Li</surname>
            <given-names>B.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Koutny</surname>
            <given-names>M.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Randell</surname>
            <given-names>B.</given-names>
          </string-name>
          : Workcraft. https://workcraft.org (
          <year>2015</year>
          )
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>