<!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>Towards Process Mining for Nets within Nets</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>Heiko Rölke</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>University of Applied Science of the Grisons</institution>
          ,
          <addr-line>Pulvermühlestrasse 57, CH-7000 Chur</addr-line>
        </aff>
      </contrib-group>
      <fpage>81</fpage>
      <lpage>96</lpage>
      <abstract>
        <p>In this paper we investigate process mining for nets-within-nets. Nets-within-nets, also known as nets-as-tokens, describe formalisms, where the tokens of a Petri net are nets again. Therefore, a net is located as a token inside a place and this place acts a local context for this net-token. Regarding process mining this leads to scenarios where we like to mine nested structures. Nested structures arises naturally in many applications, i.e., robots are acting within the context a factory or workflows are processed within an organisation. Unfortunately, existing process mining algorithms generate flat models, which do not express nesting or execution context. Since no mining algorithm especially dedicated to nets-within-nets exists, we try to adapt existing technology as far as possible, as a first step. In this contribution we compare two approaches to design a process mining techniques for nets-within-nets built upon existing algorithms: The first, so-called compositional approach, splits the log file into parts and mines Petri nets independently for each part. The nets-within-nets models is then composed of these separate Petri nets. The second, decompositional approach, is just the other way around. It mines one single flat Petri net model from the whole log and then decomposes the net into sub-nets that constitute the parts of the desired nets-within-nets model.</p>
      </abstract>
      <kwd-group>
        <kwd>eol&gt;Nets-within-Nets</kwd>
        <kwd>Process Mining</kwd>
        <kwd>Self-Adaptive Systems</kwd>
        <kwd>Mobile Agents</kwd>
      </kwd-group>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>1. Mining Nets-within-Nets</title>
      <p>
        Process mining [
        <xref ref-type="bibr" rid="ref1">1</xref>
        ] is – beyond any doubt – a success story, especially in the combination with Petri
nets as a target formalism. It demonstrates the necessity for a good theoretical foundation when solving
realistic problems.
      </p>
      <p>
        In our research on adaptive systems we have experienced the fact that the concept of a context is
extremely useful. However, context is a concept that is very hard to capture with flat net models, like p/t
nets. In process algebra this gave rise to mobility calculi like the Ambient Calculus [
        <xref ref-type="bibr" rid="ref2">2</xref>
        ] or the  -calculus
[
        <xref ref-type="bibr" rid="ref3">3</xref>
        ]. For process mining the target model is usually not process algebra, but a Petri net model. Therefore,
we like to step from flat models towards nested model for process mining.
      </p>
      <p>
        In this paper, we try to extend process mining onto nets-within-nets [
        <xref ref-type="bibr" rid="ref4">4</xref>
        ], i.e. Petri nets where the
tokens of are nets again. This concept directly expresses the notion of context as the firing of a
nettoken’s transition happens within a place of the surrounding system net. For example, the system
might describe some physical entity, like a factory with robots, and the net-tokens workpieces being
process within this factory. Moving net-tokens around expresses mobility of workpieces in a very
natural way [
        <xref ref-type="bibr" rid="ref5">5</xref>
        ]. Another example is an adaptive system executing some process plan and adaptation
is allowed to modify the process plan at run-time, e.g. by following the well-known MAPE-K pattern
[
        <xref ref-type="bibr" rid="ref6">6</xref>
        ] (monitor-analyse-plan-execute with knowledge). For this scenario the system net describes the
MAPE-K loop and the process plan is a net-token being “moved” within the loop (cf. our model in [
        <xref ref-type="bibr" rid="ref7">7</xref>
        ]).
      </p>
      <p>
        Our setting is closely connected to the recent approaches of object-centric process mining [
        <xref ref-type="bibr" rid="ref8">8</xref>
        ] with the
specialty that the in our setting we consider active(!) objects, i.e. objects with its own process thread,
like assumed e.g. for actor programming [
        <xref ref-type="bibr" rid="ref9">9</xref>
        ].
      </p>
      <p>
        To reach our aim, we try to re-use existing process mining technology [
        <xref ref-type="bibr" rid="ref1">1</xref>
        ] to mine nets-within-nets.
In our setting we assume that our event log is generated by a very simple nets-within-nets formalism,
i.e., by an elementary object net system (Eos) [
        <xref ref-type="bibr" rid="ref10">10</xref>
        ]. An Eos consists of a system net (which is a p/t net)
that contains object nets as tokens (which are called net-tokens). The transitions of these two levels are
related by synchronisation.
      </p>
      <p>
        A central question that arises is how the mining process reflects the compositional nesting structure
of nets-within-nets. Here, we study two obvious candidates, which we call compositional and
decompositional. For the compositional approach we filter the log file  into several fragments
 belonging to the system’s parts (like factory and robots), apply processing mining to each 
independently, and finally compose the mined nets into an Eos OS . For the decompositonal approach
we start with the complete log  and apply mining techniques to obtain a Petri net  . In the basic case
the net  generated is a p/t net. We already know from our work on Eos in [
        <xref ref-type="bibr" rid="ref10">10</xref>
        ] that – under certain
conditions – the behaviour of an Eos OS can be approximated by a p/t net Rn(OS ), called the reference
net. The major task is then to decompose the reference net into its constituting parts, i.e., the system net
and the object nets.
      </p>
      <p>At this very early step of our investigation we will investigate whether one of the two approaches
seems to be more promising than the other.</p>
      <p>The paper has the following structure: Section 2 discusses other approaches to re-construct
hierarchical processes. After that, we start with the foundations of our work. Section 3 introduces the formalism
of Elementary Object Net Systems (Eos). Section 4 explains in more detail the two mining approaches
we identified here: the compositional and the decompositional method, which are based on existing
algorithms. We evaluate our approach in Section 5, where we study some examples. The work ends
with a conclusion.</p>
    </sec>
    <sec id="sec-2">
      <title>2. Related Work</title>
      <p>Mining hierarchical and nested process models has attracted increasing interest in the process mining
community, as many real-world processes exhibit inherent hierarchical structure. Several approaches
have been proposed to extend flat process discovery techniques to support hierarchy.</p>
      <p>
        Xixi Lu et al. introduced Hierarchical Process Trees and techniques to discover them from event
logs [
        <xref ref-type="bibr" rid="ref11">11</xref>
        ]. Their approach recursively detects nested behavior and constructs a tree-based process
model with hierarchical operators. Similarly, Sander Leemans et al. [12] introduced multi-level logs
and generalised hierarchical models to discover simpler models from existing logs. Other work has
addressed modular and multi-level process discovery. Begicheva et al. [13] present an algorithm for
discovering hierarchical process models represented as two-level workflow nets. The algorithm is based
on predefined event clustering.
      </p>
      <p>In the domain of Petri nets, several techniques exist for process discovery, but most generate flat
models. While hierarchical Petri nets and especially object nets provide natural means to represent
nesting, discovery techniques for these extended net types are still in their infancy. Our work builds
upon the developments mentioned above by addressing the challenge of discovering nets-within-nets,
a more expressive hierarchical formalism where nets act as tokens in other nets.</p>
      <p>Compared to existing hierarchical discovery approaches, our contribution specifically targets mining
execution context and nested token dynamics — as required by nets-within-nets — rather than purely
structural hierarchy.</p>
    </sec>
    <sec id="sec-3">
      <title>3. Elementary Object Net Systems (Eos)</title>
      <p>
        In this Section we recall the definition of Eos as presented in the survey [
        <xref ref-type="bibr" rid="ref10">10</xref>
        ]. Let MS () denote
the set of multisets over a set . A p/t net is a tuple  = (, , pre, post), such that  is a set of
places,  is a set of transitions, with  ∩  = ∅, and pre, post :  → MS ( ) are the pre- and
post-condition functions. An elementary object system (Eos) is composed of a system net, which is a
p/t net ̂︀ = (̂︀, ̂︀, pre, post) and a set of object nets  = {1, . . . , }, which are p/t nets given
as  = ( ,  , pre , post ), where  ∈  . In extension we assume that all sets of nodes (places
is mapped to the system net itself since ̂︀ ̸∈  .
and transitions) are pairwise disjoint. Moreover we assume ̂︀ ̸∈  and the existence of the object net
∙ ∈  , which has no places and no transitions and is used to model anonymous, so called black tokens.
      </p>
      <p>The system net places are typed by  : ̂︀ →  with the meaning, that a place ̂︀ ∈ ̂︀ of the system
net with () =  may contain only net-tokens of the object net type  .1 No place of the system net
nested multiset. A marking of an Eos OS is denoted  = ∑︀| |
=1(̂︀, ), where ̂︀ is a place of the
the set of system net places of the type  :
are also denoted as  = ∑︀| |
system net and  is the marking of a net-token with type (̂︀). To emphasise the nesting, markings
markings which are syntactically consistent with the typing  is denoted ℳ, where − 1( ) ⊆ ̂︀ is
=1 ̂︀[]. For example, the marking of Fig. 1 is  = 1[1]. The set of all
̂︀
ℳ := MS
︁( ⋃︁
∈
︀( − 1( ) ×</p>
      <p>MS ( )
︀)
︁)
(1)
We define the partial order
⊑ on nested multisets by setting  1 ⊑  2 if ∃
 :  2 =  1 +  .</p>
      <p>Events</p>
      <p>Analogously to markings, which are nested multisets  , the events of an Eos are also nested.
An Eos allows three diferent kinds of events – as illustrated by the Eos in Fig. 1.</p>
      <p>1. System-autonomous: The system net transition  fires autonomously which moves the net-token
from 1 to 2 without changing its marking.</p>
      <p>2. The object net itself remains at its location 1.
2. Object-autonomous: The object net fires transition 1, which “moves” the black token from 1 to
3. Synchronisation: The system net transition  fires synchronously with 1 in the object net.</p>
      <p>Whenever synchronisation is necessary, autonomous actions are forbidden.</p>
      <p>The set of events is denoted Θ. Events are formalised as a pair  [], where  is either the transition
that fires in the system net or a special “idle” transition
id  (cf. below); and  is a function such that
( ) is the multiset of transitions, which have to fire synchronously with  , (i.e. for each object net
̂︀
̂︀
 ∈  we have ( ) ∈ MS ( )).2
̂︀
̂︀
̂︀</p>
      <p>In general  [] describes a synchronisation, but autonomous events are special subcases: Obviously,
a system-autonomous events is the special case, where  = 0 with 0( ) = 0 for all object nets  . To
formalises object-autonomous firing on the place :
describe an object-autonomous event we assume the set of idle transitions {id ̂︀ | ̂︀ ∈ ̂︀}, where id 
̂︀
1In some sense, net-tokens are object nets with its own marking. However, net-tokens should not be considered as instances
of an object net (as in object-oriented programming), since net-tokens do not have an identity. This is reflected by the fact
that the firing rule joins and distributes the net-tokens’ markings.
 (1) + · · · +  () = ̂︀(̂︀)( ).
2In the graphical representation the events are generated by transition inscriptions. For each object net  ∈  a system net
transition  is labelled with a multiset of channels ̂︀(̂︀)( ) = ch1 + · · ·
̂︀
+ ch, depicted as ⟨ :ch1,  :ch2, . . .⟩. Similarily,
an object net transition  may be labelled with a channel  () = ch – depicted as ⟨:ch⟩ whenver there is such a label.
We obtain an event ̂︀[] by setting ( ) := 1 + · · · +  to be any transition multiset such that the labels match:
̂︀
1. Each idle transition id  has ̂︀ as a side condition: pre(id ) = post(id ) := ̂︀.</p>
      <p>̂︀ ̂︀ ̂︀
2. Each idle transition id  synchronises only with transitions from  = ():</p>
      <p>̂︀ ̂︀</p>
      <sec id="sec-3-1">
        <title>Definition 1.</title>
        <p>An elementary object system (Eos) is a tuple OS = (̂︀ ,  , , Θ,  0), where:
1. ̂︀ is a p/t net, called the system net.
2.  is a finite set of disjoint p/t nets, called object nets.
3.  : ̂︀ →  is the typing of the system net places.
4. Θ is the set of events.</p>
        <p>5.  0 ∈ ℳ is the initial marking.</p>
        <p>Example Figure 2 shows an Eos with the system net ̂︀ and the object nets  = {1, 2}. The system
has four net-tokens: two on place 1 and one on 2 and 3 each. The net-tokens on 1 and 2 share the
̂︀ ̂︀ ̂︀ ̂︀ ̂︀
same net structure, but have independent markings. (Ignore the net-tokens above ̂︀and on the places
4, 5 and 5 at this moment, as they illustrate the firing of ̂︀; they are not part of the marking.)
̂︀ ̂︀ ̂︀
The system net is ̂︀ = (̂︀, ̂︀, pre, post), where ̂︀ = {̂︀1, . . . , ̂︀6} and ̂︀ = {̂︀}.
We have two object nets  = (, , pre, post),  = 1, 2 with 1 = {1, 1}, 1 = {1}, 2 =
{2, 2, 2}, and 2 = {2}.</p>
        <p>The typing is (1) = (2) = (̂︀4) = 1 and (̂︀3) = (̂︀5) = (̂︀6) = 2.</p>
        <p>̂︀ ̂︀
The labelling (not shown in the Figure) generates one event such that ̂︀fires synchronously with 1 and
2, i.e., we have Θ = {̂︀[1 ↦→ 1, 2 ↦→ 2]}.</p>
        <p>The initial marking has two net-tokens on 1, one on ̂︀2, and one on ̂︀3:</p>
        <p>̂︀
 = ̂︀1[1 + 1] + ̂︀1[0] + 2[1] + 3[2 + 2]
̂︀ ̂︀
Note that the structure is the same for the three net-tokens on 1 and 2 but the net-tokens’ markings
̂︀ ̂︀
are diferent.</p>
        <p>Firing Rule The projection Π1 on the first component abstracts from the substructure of all net-tokens
for a marking of an Eos:
Π1 (︁ ∑︁=1 ̂︀[]︁) := ∑︁=1 ̂︀
(2)
81–94
(3)
(4)
net’s transitions on the net-tokens.
4. The firing of ̂︀[] must also obey the object marking distribution condition: ′ =  −
pre (( )) + post (( )), where post (( )) − pre (( )) is the efect of the object
Note that conditions 1. and 2. assure that only net-tokens relevant for the firing are included in 
and  . Conditions 3. and 4. allow for additional tokens in the net-tokens.</p>
        <p>For system-autonomous events ̂︀[0] the enabling predicate  can be simplified further. We have
pre (0( )) = post (0( )) = 0. This ensures Π2 ( ) = Π2 ( ), i.e. the sum of markings in the
copies of a net-token is preserved w.r.t. each type  . This condition ensures the existence of linear
invariance properties</p>
        <p>Analogously, for an object-autonomous event we have an idle-transition ̂︀ = id  for the system net
̂︀
Π1( ) = pre(id ) = ̂︀ = post(id ) = Π1( ). So, there is an
̂︀
and the first and the second conjunct is:
addend  = [ ] in  with (̂︀) =  and  enables (̂︀ ).</p>
        <p>̂︀</p>
      </sec>
      <sec id="sec-3-2">
        <title>Definition 2 (Firing Rule).</title>
        <p>for the mode (,  ) ∈ ℳ2 if  ⊑  ∧ ( [], ,  ) holds.</p>
        <p>̂︀
̂︀</p>
        <p>An event  [] that is enabled in  for the mode (,  ) can fire: →− − − − −
marking is defined as  ′ =  −  +  .</p>
        <p>Let OS be an Eos and ,  ′ ∈ ℳ markings. The event  [] is enabled in 
̂︀
̂︀
 ∈  , ignoring their local distribution within the system net:</p>
        <p>The projection Π2 on the second component is the sum of all net-token markings  of the type
Π
2 (︁ ∑︁
=1 ̂︀[]︁) := ∑︁
=1 1 (̂︀) · 
a marking of the object net  .
where the indicator function 1 : ̂︀ → {0, 1} is 1 (̂︀) = 1 if (̂︀) =  . Note that Π2 ( ) results in
event replaces a nested multiset  ∈ ℳ that is part of the current marking  , i.e. 
⊑  , by the nested
by the enabling predicate OS (or just  whenever OS is clear from the context):
multiset  . Therefore the successor marking is  ′ := ( −  ) +  . The enabling condition is expressed
(̂︀[], ,  )
⇐⇒
∀ ∈  : Π2 ( ) ≥
Π1( ) = pre(̂︀) ∧ Π1( ) = post(̂︀) ∧</p>
        <p>pre (( )) ∧
∀ ∈  : Π2 ( ) = Π2 ( ) − pre (( )) + post (( ))
predicate  has the following meaning:</p>
        <p>With ̂︁ = Π1( ) and ̂︁′ = Π1( ) as well as  = Π2 ( ) and ′ = Π2 ( ) for all  ∈  the
1. The first conjunct expresses that the system net multiset ̂︁ corresponds to the pre-condition of
the system net transition  , i.e. ̂︁ = pre( ).</p>
        <p>̂︀</p>
        <p>̂︀
(of type  ) enable it, i.e.  ≥</p>
        <p>pre (( )).
2. In turn, a multiset ̂︁′ is produced, that corresponds to the post-set of  .
3. A multi-set ( ) of object net transitions is enabled if the sum  of the net-token markings
̂︀</p>
        <p>Note that the firing rule makes no a-priori assumptions about how to distribute the object net
markings onto the generated net-tokens. Therefore we need the mode (,  ) to formulate the firing of
̂︀
 [] in a functional way.
1, 2 ↦→ 2] in the mode (,  ), where</p>
        <p>
          As for p/t nets the firing rule has several nice properties [
          <xref ref-type="bibr" rid="ref10">10</xref>
          ]: Firing enjoys monotonicity, it is
symmetric when inverting arc directions, and when projecting a firing sequence of an
Eos onto the
system net we obtain a valid firing sequence of the system net considered as a p/t net.
Example Consider the Eos of Figure 2 again. The current marking  of the Eos enables ̂︀[1 ↦→



̂︀
̂︀
        </p>
        <p>̂︀
= 1[1 + 1] + 2[1] + 3[2 + 2]
= ̂︀1[0] + 1[1 + 1] + 2[1] + 3[2 + 2] = ̂︀1[0] +</p>
        <p>̂︀ ̂︀ ̂︀
= 4[1 + 1 + 1] + 5[0] + 6[2]
̂︀</p>
        <p>̂︀
̂︀</p>
        <p>The net-token markings are added by the projections Π2 resulting in the markings Π2 ( ). The
sub-synchronisation generates Π2 ( ). (The results are shown above and below the transition ̂︀.) After
the synchronisation we obtain the successor marking  ′ with net-tokens on ̂︀4, 5, and 6 as shown in
̂︀ ̂︀
 ′ = ( −  ) +  = ̂︀1[0] + 
= 1[0] + 4[1 + 1 + 1] + ̂︀5[0] + 6[2]</p>
        <p>̂︀ ̂︀ ̂︀
Note, that we have only presented one mode (,  ) of the event and that other modes are possible, too.</p>
      </sec>
    </sec>
    <sec id="sec-4">
      <title>4. Mining Approaches for Eos</title>
      <p>
        can be identified with the multiset:
The behaviour of an Eos difers from the system-net (and from the object nets) when considered in
isolation due to the synchronisation; the efect is very similar to modularised p/t nets [ 14]. To express
this relation of surrounding system net and net-tokens we have defined in [
        <xref ref-type="bibr" rid="ref10">10</xref>
        ] the so-called reference
net, which is the p/t net obtained by putting system net and the object nets aside (by a set theoretical
union of places) and use all synchronisations as transistions.
      </p>
      <p>Since the places of all nets in  are disjoint by definition, the projections (Π1( ), (Π2 ( ))∈ )
Rn( ) := Π1( ) + ∑︁ Π2 ( )
∈
The Reference Net</p>
      <p>For each Eos there is an obvious construction of a p/t net, called the reference
net, which is constructed by taking as the set of places the disjoint union of all places and the set of
events as transitions.</p>
      <p>Definition 3. Let OS = (̂︀ ,  , , Θ,  0) be an Eos. The reference net Rn(OS ) is defined as the p/t net:
Rn(OS ) =
︁(
̂︀ ∪
⋃︁
∈</p>
      <p>︁)
 , Θ, preRn, postRn, Rn( 0)
︁)
where preRn (and analogously: postRn) is defined by:
preRn(̂︀[]) = pre(̂︀) + ∑︁
∈
pre (( ))</p>
      <p>
        The net is called reference net because it behaves as if each object net would have been accessed via
pointers and not like a value: A black token on a system net place  is interpreted as a pointer to the
object  = (̂︀), where each object net has exactly one instance but several pointers referring to it.
̂︀
Theorem 1 ([
        <xref ref-type="bibr" rid="ref10">10</xref>
        ], Thm. 6.1). Every event  [] that is activated in OS for (,  ) is so in Rn(OS ):
→− − − − −
̂︀
net, too, but not vice versa – the  -centauri example serves as a counter example for the latter [
        <xref ref-type="bibr" rid="ref10">10</xref>
        ].
The main reason is that the system net places of an Eos act as a context for the object-nets. So, the
reference net is a kind of behavioral over-approximation of an Eos and among the set of all p/t nets
it is the best approximation. However, in the mining context this theoretical significant diference is
of less importance, since we only consider event logs and in logs we can only observe possible Eos
sequences which are also present in the over-approximation. Therefore since we already know that the
sequence has been possible in the Eos it is suficient to mine this reference net. A major plus point is
that we can re-use existing process mining algorithms. To conclude: The reference net is suficient to
reconstruct the Eos as long as we have the additional information, which places belong to the system
net and which to the object nets.
Compositional vs. Decompositional Approaches We like to avoid to develop an Eos-specific
process mining algorithm. Instead, we are interested in re-using existing, well-optimised process mining
algorithms. However, it is not clear which kind of pre-processing of our logs is needed and which
post-processing steps are needed to generate an Eos from the mined nets. We see two alternative
approaches to mine Eos, which difer in the order of mining and (de)composition:
1. (Composition) If we identify from the log the parts belonging to specific object nets , we can
iflter the log for each and generate several object nets; analogously for the system net.
      </p>
      <p>Log →−−
iflter</p>
      <p>Logs →−−−
mine</p>
      <p>Nets →−−− − − integrate Eos OS
However, it is subtle how this integration (or: synchronisation) is carried out in detail, as we have
a many-to-many synchronisation for Eos.
2. (Decomposition) In the second case, we obtain the following tool chain. From the log we mine
a p/t net, which is expected to be the reference net of the generating Eos. By using additional
information which places belong to the surrounding system and which to the nested net-tokens
we decompose the reference net into system- and object-net, i.e., an Eos:</p>
      <p>Log − →−mine Net  ≃ Reference-Net Rn(O→S−− )−− − − decompose Eos OS
On the pro side we have the whole log information during the mining; on the contrary, we have
to decompose and it is not clear which places belong to which part.</p>
      <p>
        In the following we evaluate both approaches studying a scenario of a mobile robot.
5. Comparative Evaluation of the two Approaches
To evaluate the two approaches to mining nets-within-nets, we use a simple scenario, introduced in the
following section. Afterwards, both approaches are tested and compared.
5.1. Scenario: A Cofee Serving Robot
We study a simplified variant of the mobile household robot [
        <xref ref-type="bibr" rid="ref5">5</xref>
        ]. Imagine a typical day of a university
professor. When working, the professor can write papers or give lessons. Thanks to modern
communication techniques, he or she does not have to leave the comfort of the ofice for these tasks. Every once
a while, the professor needs cofee - other duties certainly have to wait then. To spend leftover funding,
the department our example professor works in has purchased a cofee delivering robot system. The
professor just has to order an cofee and wait for it. The cofee robot does all the work.
      </p>
      <p>Figure 3 shows the object net specifying the professor. Note that this and the other nets shown in
this section are in principal executable reference nets in Renew format, but certain details have been
left out to avoid visual clutter (e.g., net inscriptions for logging or type definitions).</p>
      <p>Some remarks on the Prof net: Inscriptions in bold font are names or explanations. Arcs are inscribed
with variables packed in tuples - these tuples are the markings in Renew reference nets. Transition
inscription starting with a colon, like :new(...) are synchronous channels, linking this net to other nets.</p>
      <p>We can easily see that our Prof net is a net-token of another net. This would be the system net,
controlling the overall system behaviour. Let’s have a look at the system net.
ifles like the one in the example, we can try to reconstruct the overall net system, as outlined in the
previous section.
5.2. Decompositional Approach
An obvious and very simple approach is to dump the complete log file into an existing mining algorithm
and see what happens. That is the idea behind the decompositional approach: mine the entire log file
and decompose the mined net into the nets that generated the log. Ideally, there should be a loose
coupling between these subnets, so that there are identifiable cuts.</p>
      <p>A little bit of thinking reveals that this cannot always be the case, as it is easy to construct
netswithin-nets with intertwined control flow handed over from net to net. However, let’s have a look at
the mining results of our example.</p>
      <p>For the mining, we use the PM4Py framework.4 For importing the log data, the only necessary
preprocessing step was to describe the date format, so that it can be properly included to a pandas5
dataframe. Note that the log we used here was the result of a longer run of the example net system and
included several profs and robots acting in parallel. Figure 6 shows the net mined.</p>
      <p>We tried several mining algorithms, the inductive miner produced the most meaningful results.
However, the mining results are unsatisfactory. The mined net allows processes that are not possible in
the original net and vice versa. One example: new prof → start working → deactivate, without a robot
being created before. In addition, all elements of the system are intertwined and hard to disentangle.
We have no idea how to split the mined flat net into the object nets without heavily relying on domain
knowledge. If this is not possible for a rather simple net system of three object nets, we do not have
much hope for the general case. Therefore, the decompositional approach cannot be used for our
purposes.
5.3. Compositional Approach
The log data in Table 1 contains the net instance name (system, robot, prof) in the last column. It is
straightforward to separate the log file to object net logs, consisting only of the events of the respective
object net.</p>
      <p>Doing so, we can follow the compositional approach and mine the object nets separately. An
interesting fact is that for the separate object nets, the alpha plus miner sometimes works better than
the inductive miner, while it more or less failed for the mining of the complete log.</p>
      <p>Figure 7 shows the system net mined, relying on the alpha plus miner for this task. The system net is
quite similar to the net we defined, as can be seen by comparing Figure 7 to Figure 4. An important
diference is that the order cofee transition is unconnected in the mined net. The rest is not too bad
and more or less resembles the original behavior.</p>
      <p>Please note that we did several runs of the robot-prof system leading to log files of various sizes.
Mining these logs led to subtle diferences in the mined nets. All mined nets showed one or more
deviations from the original net system, similar to the problem described above (order cofee). We only
show one result here. The shortcomings of this example are similar to those of all the other outcomes.</p>
      <p>Let us have a look at the other object nets. Figure 8 shows the object net mined for the professor.
The professor described by the mined net seems to be more of a cafeine-addict than our original one.
Without cofee, no work (writing papers, giving lessons) is done, making the mined professor maybe
even a bit more real. Beside this diference and some not really necessary silent transitions, the professor
net can be counted a success. The professor net was mined using the inductive miner, as the alpha plus
miner produced a professor that can only drink cofee and is never working.</p>
      <p>Figure 9 shows the mined net for the robot, using the inductive miner. On first sight, this net looks
even better than professor net, as it is more compact. However, on closer inspection one can see that
the mined robot can be deactivated while still carrying a cofee. That would be a pity and can lead to
a deadlock in the overall system, as the professor would wait forever for the cofee without getting
anything done. Another notable diference is that the robot can serve one cofee several times. It is
important to know, that this is not due to shortcomings in the log file.</p>
      <p>It is interesting that the alpha plus miner produced better results for the robot, as can be seen in
Figure 10: Cofee has to be served before deactivating, and the robot can move at any time. So far, we
cannot give a universal rule which mining algorithm produces better results for our purposes.</p>
      <p>The results of the experiments with the compositional approach shown above are more promising
than those of the decompositional approach. While it is not surprising that we get separate object nets,
these nets more or less resemble the object nets designed by us and can serve as a starting point for
the composition step. The composition itself is straightforward, but we do not have an implemented
algorithm for it. The nets produced by the miner (shown above) have to be inscribed with synchronous
4see https://pypi.org/project/pm4py/
5see https://pandas.pydata.org/
channels at those transitions that should occur simultaneously (synchronized transitions). The object
nets have to be instantiated (special channel new) in the system net and the arcs of the system net have
to be inscribed with identifier variables for the object nets. Doing so by hand revealed some minor
issues but produced an executable net system that can be simulated using the Renew software.</p>
      <p>One minor issue is that the mining algorithms produce a marked starting place for each net, while
this is only necessary for the system net and potentially produces a deadlock in the object nets. Another
issue we discovered was due to some sloppiness in our logging: we sometimes used the names of the
transitions as log entries instead of the channel inscriptions - if available. This has to be stratified when
automating our approach in the future.</p>
      <p>Besides these small shortcomings the compositional approach can be counted a success.
5.4. Discussion and Next Steps
In the experiments described above, we tried out both the decompositional approach and the
compositional approach. The decompositional approach – using the entire log file of the net system as the
source for the mining and decomposing the mined net afterwards – did not produce any meaningful
results. The compositional approach, i.e. splitting or filtering the log file according to the separate
subnets, mining those logs separately and composing the mined nets afterwards, seems to be a possible
approach for going further.</p>
      <p>During the experiments we discovered an additional problem, namely the usage of the "right" mining
algorithm. We have to carry out additional experiments in this direction. Hopefully, we can find a
suitable way or at least some best practice.</p>
      <p>An important next step is to automate the parts of our experiment that we did manually, like the
net composition. We are optimistic that this can be done, but additional problems might occur when
generalizing the findings of the small case study presented here.</p>
      <p>Other steps to be done:
• Automating the logging in Renew
• Deciding about the best mining algorithm
• Possibly integrating the mining into the Renew tool for convenience
• Automating the net composition</p>
      <p>We will tackle these steps in the near future, as we do not expect bigger problems here. When done,
we have achieved a round-trip mining of nets-within-nets. We will base further research on these
achievements, as the more general goal is to be able to mine net systems without the exact knowledge
about the subnets.</p>
    </sec>
    <sec id="sec-5">
      <title>6. Conclusion and Outlook</title>
      <p>In this paper we extended Petri net based process mining to nets-within-nets, i.e., nets where the
tokens are Petri nets again. This is useful especially for scenarios where events are contextualised,
either because they happen within some physical location or within some abstract context like an outer
self-adaption loop, like in the MAPE-K pattern.</p>
      <p>To capture the structure of nets-within-nets, i.e., the nesting structure of nets and their vertical
synchronisation, during the mining process we made experiments with two alternative candidates,
which we call the compositional and the decompositional approach. The compositional approach
integrates the nets  that are mined for the log files  filtered w.r.t. diferent aspects of the system,
while the decompositional approach mines the reference net Rn(OS ) and tries to decompose it into the
Eos OS .</p>
      <p>We observed from our experiments that the decompositional approach seems to be less promising
than the compositional one. The compositional approach in its present state still needs some additional
work, as outlined in the section above.</p>
      <p>We plan the following research threads for future research: Firstly, we like to extend our work mine
probabilistic Nets-within-Nets [15]. This extension seems to be straightforward since the log files
contains the event frequencies anyway. Secondly, we plan to investigate the mining of net systems
without knowing the exact subnets that produced the log file.</p>
      <p>Thirdly, we would like to go beyond Eos. A major extension is to allow algebraic expressions for arcs
with the meaning that the topology of net-tokens is modified during firing. This aspect is covered by
eHornets [16]. In this case we are faced with a new challenge whenever mining the structure of objects
nets: Since firing modifies the net-tokens, the order (or time stamps) of events becomes important,
since a dependency present in an early part of the log might be no longer valid in a later part. So we
either have to separate the log whenever a system net transition modifies the net-tokens topology or
we introduce some ‘aging’ mechanism into the mining algorithm such that older events are given less
confidence than more recent ones.</p>
      <p>Acknowledgment The author wishes to thank Michael Köhler-Bussmeier for his help on previous
version of this paper, especially in the sections defining the Eos.</p>
    </sec>
    <sec id="sec-6">
      <title>Declaration on Generative AI</title>
      <p>The author(s) have not employed any Generative AI tools.
[12] S. J. Leemans, K. Goel, S. J. van Zelst, Using multi-level information in hierarchical process mining:
Balancing behavioural quality and model complexity, in: 2020 2nd International Conference on
Process Mining (ICPM), 2020, pp. 137–144. doi:10.1109/ICPM49681.2020.00029.
[13] A. Begicheva, I. Lomazova, R. Nesterov, Discovering hierarchical process models: an approach
based on events partitioning, Modeling and Analysis of Information Systems 31 (2024) 294–315.
doi:10.18255/1818-1015-2024-3-294-315.
[14] S. Christensen, L. Petrucci, Modular state space analysis of coloured Petri nets, in: Proceeding of
the 16th International Conference on Application and Theory of Petri Nets, 1995, pp. 201–217.
[15] M. Köhler-Bußmeier, L. Capra, Analysing probabilistic Hornets, in: E. Amparore, Łukasz Mikulski
(Eds.), Proceedings of Application and Theory of Petri Nets and Concurrency 2025, 2025.
[16] M. Köhler-Bußmeier, Restricting Hornets to support adaptive systems, in: W. van der Aalst, E. Best
(Eds.), PETRI NETS 2017, Lecture Notes in Computer Science, Springer-Verlag, 2017.</p>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          [1]
          <string-name>
            <surname>W. M. P. van der Aalst</surname>
          </string-name>
          ,
          <source>Process Mining: Data Science in Action</source>
          , 2 ed., Springer, Heidelberg,
          <year>2016</year>
          . doi:
          <volume>10</volume>
          .1007/978-3-
          <fpage>662</fpage>
          -49851-4.
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          [2]
          <string-name>
            <given-names>L.</given-names>
            <surname>Cardelli</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A. D.</given-names>
            <surname>Gordon</surname>
          </string-name>
          , G. Ghelli,
          <article-title>Mobility types for mobile ambients</article-title>
          ,
          <source>in: Proceedings of the Conference on Automata, Languages, and Programming (ICALP'99)</source>
          , volume
          <volume>1644</volume>
          of Lecture Notes in Computer Science, Springer-Verlag,
          <year>1999</year>
          , pp.
          <fpage>230</fpage>
          -
          <lpage>239</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          [3]
          <string-name>
            <given-names>R.</given-names>
            <surname>Milner</surname>
          </string-name>
          ,
          <string-name>
            <given-names>J.</given-names>
            <surname>Parrow</surname>
          </string-name>
          ,
          <string-name>
            <given-names>D.</given-names>
            <surname>Walker</surname>
          </string-name>
          ,
          <article-title>A calculus of mobile processes, parts 1-2</article-title>
          , Information and computation
          <volume>100</volume>
          (
          <year>1992</year>
          )
          <fpage>1</fpage>
          -
          <lpage>77</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          [4]
          <string-name>
            <given-names>R.</given-names>
            <surname>Valk</surname>
          </string-name>
          ,
          <article-title>Object Petri nets: Using the nets-within-nets paradigm</article-title>
          , in: J.
          <string-name>
            <surname>Desel</surname>
            ,
            <given-names>W.</given-names>
          </string-name>
          <string-name>
            <surname>Reisig</surname>
          </string-name>
          , G. Rozenberg (Eds.),
          <source>Advanced Course on Petri Nets</source>
          <year>2003</year>
          , volume
          <volume>3098</volume>
          of Lecture Notes in Computer Science, Springer-Verlag,
          <year>2003</year>
          , pp.
          <fpage>819</fpage>
          -
          <lpage>848</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          [5]
          <string-name>
            <given-names>M.</given-names>
            <surname>Köhler</surname>
          </string-name>
          ,
          <string-name>
            <given-names>D.</given-names>
            <surname>Moldt</surname>
          </string-name>
          ,
          <string-name>
            <given-names>H.</given-names>
            <surname>Rölke</surname>
          </string-name>
          ,
          <article-title>Modelling mobility and mobile agents using nets within nets</article-title>
          , in: W. v. d. Aalst, E. Best (Eds.),
          <source>International Conference on Application and Theory of Petri Nets</source>
          <year>2003</year>
          , volume
          <volume>2679</volume>
          of Lecture Notes in Computer Science, Springer-Verlag,
          <year>2003</year>
          , pp.
          <fpage>121</fpage>
          -
          <lpage>140</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref6">
        <mixed-citation>
          [6]
          <string-name>
            <given-names>D.</given-names>
            <surname>Weyns</surname>
          </string-name>
          ,
          <article-title>An Introduction to Self-Adaptive Systems: A Contemporary Software Engineering Perspective</article-title>
          , John Wiley &amp; Sons Ltd,
          <year>2020</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref7">
        <mixed-citation>
          [7]
          <string-name>
            <given-names>M.</given-names>
            <surname>Köhler-Bußmeier</surname>
          </string-name>
          ,
          <string-name>
            <given-names>J.</given-names>
            <surname>Sudeikat</surname>
          </string-name>
          ,
          <article-title>Studying the micro-macro-dynamics in MAPE-like adaption processes</article-title>
          ,
          <source>in: Intelligent Distributed Computing XVI. IDC</source>
          <year>2023</year>
          , volume
          <volume>1138</volume>
          <source>of Studies in Computational Intelligence</source>
          , Springer-Verlag,
          <year>2024</year>
          . doi:
          <volume>10</volume>
          .1007/978-3-
          <fpage>031</fpage>
          -60023-4_
          <fpage>24</fpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref8">
        <mixed-citation>
          [8]
          <string-name>
            <surname>W. van der Aalst</surname>
          </string-name>
          ,
          <article-title>Object-centric process mining: Dealing with divergence and convergence in event data</article-title>
          , in: P. C. Ölveczky, G. Salaün (Eds.),
          <source>Software Engineering and Formal Methods (SEFM</source>
          <year>2019</year>
          ), volume
          <volume>11724</volume>
          of Lecture Notes in Computer Science, Springer-Verlag,
          <year>2019</year>
          , pp.
          <fpage>3</fpage>
          -
          <lpage>25</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref9">
        <mixed-citation>
          [9]
          <string-name>
            <given-names>G.</given-names>
            <surname>Agha</surname>
          </string-name>
          , I. Mansons,
          <string-name>
            <given-names>S.</given-names>
            <surname>Smith</surname>
          </string-name>
          ,
          <string-name>
            <given-names>C.</given-names>
            <surname>Talcott</surname>
          </string-name>
          ,
          <article-title>Towards a theory of actor computation</article-title>
          , in: W. R. Cleaveland (Ed.),
          <source>Third international conference on concurrency theory (CONCUR 92)</source>
          , volume
          <volume>630</volume>
          of Lecture Notes in Computer Science, Springer-Verlag,
          <year>1992</year>
          , pp.
          <fpage>565</fpage>
          -
          <lpage>579</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref10">
        <mixed-citation>
          [10]
          <string-name>
            <given-names>M.</given-names>
            <surname>Köhler-Bußmeier</surname>
          </string-name>
          ,
          <article-title>A survey on decidability results for elementary object systems</article-title>
          ,
          <source>Fundamenta Informaticae</source>
          <volume>130</volume>
          (
          <year>2014</year>
          )
          <fpage>99</fpage>
          -
          <lpage>123</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref11">
        <mixed-citation>
          [11]
          <string-name>
            <given-names>X.</given-names>
            <surname>Lu</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A.</given-names>
            <surname>Gal</surname>
          </string-name>
          ,
          <string-name>
            <given-names>H. A.</given-names>
            <surname>Reijers</surname>
          </string-name>
          ,
          <article-title>Discovering hierarchical processes using flexible activity trees for event abstraction</article-title>
          ,
          <source>in: 2020 2nd International Conference on Process Mining (ICPM)</source>
          ,
          <year>2020</year>
          , pp.
          <fpage>145</fpage>
          -
          <lpage>152</lpage>
          . doi:
          <volume>10</volume>
          .1109/ICPM49681.
          <year>2020</year>
          .
          <volume>00030</volume>
          .
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>