<!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>Discovery of Functional Architectures From Event Logs</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>Jan Martijn E.M. van der Werf</string-name>
          <email>j.m.e.m.vanderwerf@uu.nl</email>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Erwin Kaats</string-name>
          <email>e.j.kaats@students.uu.nl</email>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>Department of Information and Computing Science Utrecht University P.</institution>
          <addr-line>O. Box 80.089, 3508 TB Utrecht</addr-line>
          ,
          <country country="NL">The Netherlands</country>
        </aff>
      </contrib-group>
      <fpage>227</fpage>
      <lpage>244</lpage>
      <abstract>
        <p>The functional architecture focuses on decomposing functionality into modules that offer certain features. These features require interactions in order to complete their functionality. However, functional architectures typically only focus on the static aspects of the system design. Additional modeling techniques, such as message sequence charts are often used in the early phases of software design to indicate how the software should behave. In this paper we investigate the use of process discovery techniques to discover from these scenarios the internal behavior of individual components. Based on event logs, this paper presents an approach (1) to derive the information flows between features, (2) identify the internal behavior of features, and (3) to discover the order between features within a module. The approach results in a sound workflow model for each module. We illustrate the approach using a running example of a payment system.</p>
      </abstract>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>-</title>
      <p>
        One of the principle tasks of a software architect is to design a software
system [
        <xref ref-type="bibr" rid="ref17">17</xref>
        ], i.e., to organize the software elements the system is composed of in
sets of structures, to allow reasoning about the system [
        <xref ref-type="bibr" rid="ref4">4</xref>
        ]. Many different
Architectural Description Languages (ADLs) exist to document software architecture.
However, due to the large competitive market in the software product industry,
architecture is often neglected in software product organizations [
        <xref ref-type="bibr" rid="ref14">14</xref>
        ]. Hence, not
many ADLs are used in practice. As experienced in [
        <xref ref-type="bibr" rid="ref14">14</xref>
        ], in software product
organizations, architects rather use informal architectural models as an instrument
of communication and discussion.
      </p>
      <p>
        An important aspect of software architecture is the functionality it offers.
To decompose and specify the functionality of software, the authors of [
        <xref ref-type="bibr" rid="ref6">6</xref>
        ]
introduced the Functional Architecture Model (FAM), which offers the desired
modeling technique used by many software architects in software product
organizations [
        <xref ref-type="bibr" rid="ref14">14</xref>
        ]. The FAM separates the functionality into so-called features that
are offered by the different modules the system is decomposed into.
      </p>
      <p>
        Features interact with other features via information flows to offer their
functionality. However, FAM only offers a static view on this interaction, i.e., the
information flow only shows possible interactions, but imposes no order on or
dependencies between these flows. Thus, to show how functionality is offered
by the system, the architect requires additional models. One way is to define
scenarios on top of the models, in which the architect can specify which features
interact in which order. These scenario then result in event logs, that can be
analyzed using process mining techniques [
        <xref ref-type="bibr" rid="ref2">2</xref>
        ]. Another source for discovering the
possible interactions between features is the use of system execution data [
        <xref ref-type="bibr" rid="ref21">21</xref>
        ],
mapping events to the (partial) execution of features. In this way, execution data
can be used to reconstruct a software architecture.
      </p>
      <p>
        In software product organizations, time to market is often a more important
priority than having a properly documented software architecture. Consequently,
architecture documentation is often outdated or even missing [
        <xref ref-type="bibr" rid="ref9">9</xref>
        ]. Therefore,
discovering architectural models help such organizations in maintaining their
software products. In this paper, we investigate the possibility to use process mining
techniques to discover, the functional architecture of the system from an event
log. We thereby focus on three basic questions on the functional architecture:
1. Which features interact?
2. What is the internal behavior of features?
3. What is the order in which features are executed within a module?
      </p>
      <p>The first question focuses on the discovery of information flows: given an
event log, is it possible to derive which features interact? Next, we investigate
whether it is possible to derive the internal behavior of features based on event
logs. In other words, we focus on the question how does a feature use its
information flows to complete its functionality. The last question deals with the
high-level view of the functional architecture. To execute the system’s
functionality, the features within a module are called in a certain order. Can process
discovery techniques be used to discover these orders?</p>
      <p>The remainder of this paper is structured as follows. To illustrate the
approach, Sec. 2 presents a running example which we will use throughout the
paper. Next, Sec. 3 presents the basic notions used in the paper. Section 4
introduces the functional architecture model in more detail, after which in Sec. 5
we will focus on solving the three questions posed in the introduction. Section 6
concludes the paper.
2</p>
    </sec>
    <sec id="sec-2">
      <title>Running Example</title>
      <p>
        As an running example, consider the Payment System as introduced in [
        <xref ref-type="bibr" rid="ref10">10</xref>
        ]. The
system consists of three modules, Debtor, Payment and Creditor. The payment
module serves as an intermediate between the Debtor and the Creditor. An
example of such a payment module is the european SEPA standard. The payment
module initiates a transaction, which the debtor needs to accept. If the debtor
accepts, the payment is continued, and the creditor is contacted to start the
transaction. If for some reason the creditor rejects the transaction, the debtor
is notified, and the transaction is terminated. Similarly, if the creditor accepts,
the payment is passed to the debtor, and finally, the creditor receives the final
payment information.
      </p>
      <p>As the software evolved into the current system, no precise model exists that
specifies the behavior of this system. The system only recorded the order in which
the different features of the modules have been called in an event log, as shown
in Tbl. 1. Each pair in the table represents the feature and the module to which
that feature belongs. For readability, the features and modules are abbreviated
in this event log.</p>
      <p>The system is decomposed into three modules: the Debtor module (X), the
Payment (Y) module, and the Creditor (Z). Based on the event log, the software
architect finds the following features:
– Receive transaction request (A);
– Reject transaction (B);
– Accept transaction (C);
– Cancel transaction (D);
– Initiate payment (E);
– Send payment details (F);
– Archive transaction request (G).
– Send transaction request (H);
– Reject transaction request (I);
– Initiate creditor (J);
– Cancel transaction (K);
– Initiate payment (O);
– Handle payment (M);
– Archive transaction (N).
– Start transaction (Q);
– Handle transaction (S).</p>
      <p>G</p>
      <p>A
B
C
D
E</p>
      <p>F
Debtor</p>
      <p>H
I
J
K
O
M</p>
      <p>N
Payment</p>
      <p>Q</p>
      <p>S
Creditor</p>
      <p>Fig. 1. Initial functional architecture model of the running example
Case Trace
1 (H, Y), (A, X), (B, X), (G, X), (I, Y), (N, Y)
2 (H, Y), (A, X), (B, X), (I, Y), (G, X), N, Y)
3 (H, Y), (A, X), (B, X), (I, Y), (N, Y), (G, X)
4 (H, Y), (A, X), (C, X), (J, Y), (Q, Z), (S, Z), (K, Y), (D, X), (G, X), (N, Y)
5 (H, Y), (A, X), (C, X), (J, Y), (Q, Z), (S, Z), (K, Y), (D, X), (N, Y), (G, X)
6 (H, Y), (A, X), (C, X), (J, Y), (Q, Z), (S, Z), (K, Y), (N, Y), (D, X), (G, X)
7 (H, Y), (A, X), (C, X), (J, Y), (Q, Z), (S, Z),( O, Y), (E, X), (F, X), (G, X), (M, Y), (S, Z), (N, Y)
8 (H, Y), (A, X), (C, X), (J, Y), (Q, Z), (S, Z), (O, Y), (E, X), (F, X), (G, X), (M, Y), (N, Y), (S, Z)
9 (H, Y), (A, X), (C, X), (J, Y), (Q, Z), (S, Z), (O, Y), (E, X), (F, X), (M, Y), (G, X), (S, Z), (N, Y)
10 (H, Y), (A, X), (C, X), (J, Y), (Q, Z), (S, Z), (O, Y), (E, X), (F, X), (M, Y), (G, X), (N, Y), (S, Y)
11 (H, Y), (A, X), (C, X), (J, Y), (Q, Z), (S, Z), (O, Y), (E, X), (F, X), (M, Y), (S, Z), (G, X), (N, Y)
12 (H, Y), (A, X), (C, X), (J, Y), (Q, Z), (S, Z), (O, Y), (E, X), (F, X), (M, Y), (S, Z), (N, Y), (G, X)
13 (H, Y), (A, X), (C, X), (J, Y), (Q, Z), (S, Z), (O, Y), (E, X), (F, X), (M, Y), (N, Y), (G, X), (S, Z)
14 (H, Y), (A, X), (C, X), (J, Y), (Q, Z), (S, Z), (O, Y), (E, X), (F, X), (M, Y), (N, Y), (S, Y), (G, X)</p>
      <p>Based on this information, the architect can draw the modules with their
features, as shown in Fig. 1. In the remainder of this paper, we investigate a
method to use event logs, such as the one shown in Tbl. 1, to complete the
diagram and derive a behavioral specification of the system.
3</p>
    </sec>
    <sec id="sec-3">
      <title>Preliminaries</title>
      <p>Let S be a set. The powerset of S is denoted by PpSq “ tS1 | S1 Ď Su. We use |S|
for the number of elements in S. Two sets U and V are disjoint if U X V “ H.
Some set S with relation ď is a partial order, denoted by pS, ďq, iff ď is reflexive,
i.e. a ď a for all a P S, antisymmetric, i.e. a ď b and b ď a imply a “ b for all
a, b P S, and transitive, i.e. a ď b and b ď c imply a ď c for all a, b, c P S. Given
a relation R Ď S ˆ S for some set S, we denote its transitive closure by R`, and
the transitive and reflexive closure by R˚.</p>
      <p>A bag m over S is a function m : S Ñ IN , where IN “ t0, 1, . . .u denotes the
set of natural numbers. We denote e.g. the bag m with an element a occurring
once, b occurring three times and c occurring twice by m “ ra, b3, c2s. The set
of all bags over S is denoted by IN S . Sets can be seen as a special kind of bag
where all elements occur only once; we interpret sets in this way whenever we
use them in operations on bags. We use ` and ´ for the sum and difference of
two bags, and “, ă, ą, ď, ě for the comparison of two bags, which are defined
in a standard way.</p>
      <p>
        A sequence over S of length n P IN is a function σ : t1, . . . , nu Ñ S. If
n ą 0 and σpiq “ ai for i P t1, . . . , nu, we write σ “ xa1, . . . , any. The length
of a sequence is denoted by |σ|. The sequence of length 0 is called the empty
sequence, and is denoted by . The set of all finite sequences over S is denoted
by S˚. We write a P σ if a 1 ď i ď |σ| exists such that σpiq “ a. Concatenation
of two sequences ν, γ P S˚, denoted by σ “ ν; γ, is a sequence defined by σ :
t1, . . . , |ν| ` |γ|u Ñ S, such that σpiq “ νpiq for 1 ď i ď |ν|, and σpiq “ γpi ´ |ν|q
for |ν| ` 1 ď i ď |ν| ` |γ|. A sequence σ can be projected over some set U ,
denoted by σ|U , and is inductively defined by |U “ , pxay; σq|U “ xay; σ|U if
a P U , and pxay; σq|U “ σ|U otherwise.
Petri Nets A Petri net [
        <xref ref-type="bibr" rid="ref16">16</xref>
        ] is a tuple N “ xP, T, F y where (1) P and T are two
disjoint sets of places and transitions respectively; and (2) F Ď pP ˆT qYpT ˆP q
is a flow relation. The elements from the set P Y T are called the nodes of
N . Elements of F are called arcs. Places are depicted as circles, transitions as
squares. For each element pn1, n2q P F , an arc is drawn from n1 to n2.
      </p>
      <p>Let N “ xP, T, F y be a Petri net. Given a node n P pP Y T q, we define
its preset N‚n “ tn1 | pn1, nq P F u, and its postset n‚N “ tn1 | pn, n1q P F u.
We lift the notation of preset and postset to sets. Given a set U Ď pP Y T q,
N‚U “ ŤnPU N‚n and U N‚ “ ŤnPU n‚N . If the context is clear, we omit the N in
the subscript.</p>
      <p>A marking of N is a bag m P IN P , where mppq denotes the number of tokens
in place p P P . If mppq ą 0, place p is called marked in marking m. A Petri net
N with corresponding marking m is written as pN, mq and is called a marked
Petri net. Given a marked Petri net pN, mq, transition t is enabled, denoted by
pN, mqrty, if ‚t ď m. If transition t is enabled in pN, mq, it can fire, resulting in
a new marking m1, denoted by pN, mqrtypN, m1q, such that m1 ` ‚t “ m ` t‚. We
lift the firing of transitions to the firing of sequences in a standard way, i.e., a
sequence σ P T ˚ of length n is enabled in pN, mq if markings m0, . . . , mn exist,
such that m “ m0 and pN, mi´1qrσpiqypN, miq for all 1 ď i ď n. A marking
m1 is reachable from some marking m in N , denoted by pN, mqr˚ypN, m1q, if a
firing sequence σ P T ˚ exists such that pN, mqrσypN, m1q. A marking m1 is a
home marking of pN, mq, if for all markings m2 with pN, mqr˚ypN, m2q, we have
pN, m2qr˚ypN, m1q.</p>
      <p>
        A special class of Petri nets are the workflow nets [
        <xref ref-type="bibr" rid="ref1">1</xref>
        ]. A workflow net is a
tuple xP, T, F, i, f y with xP, T, F y a Petri net, (2) i P P is the only place with no
incoming transitions, (3) f P P is the only place with no outgoing transitions,
i.e., ‚i “ f ‚ “ H, and (4) all transitions have at least one incoming and one
outgoing arc, i.e., ‚t ‰ H ‰ t‚ for all t P T .
      </p>
      <p>
        Open Petri Nets Within a network of asynchronously communicating systems,
messages are passed between the elements within the network. The approach we
follow is based on Open Petri nets [
        <xref ref-type="bibr" rid="ref5">5</xref>
        ]. Communication in an open Petri net
(OPN) is represented by special places, called the interface places. An interface
place is either an input place, receiving messages from the outside, or an output
place that sends messages to the outside of the OPN. An input place is a place
that has only outgoing arcs, and an output place has no incoming arcs.
Definition 1. An Open Petri net is defined as an 7-tuple xP, I, O, T, F, i, Ωy
where (1) xP Y I Y O, T, F y is a Petri net; (2) P is a set of internal places;
(3) I is a set of input places, and ‚I “ H; (4) O is a set of output places,
and O‚ “ H; (5) P , I and O are pairwise disjoint; (6) i P IN P is the initial
marking, and (7) Ω Ď IN P is the set of final markings. We call the set I Y O
the interface places of the OPN. An OPN is called closed if I “ O “ H.
      </p>
      <p>An important behavioral property for OPNs is termination: an OPN should
always have the possibility to terminate properly. We identify two termination
properties: weak termination and soundness.
Definition 2. Let xP, I, O, T, F, i, f y be an OPN. It is weakly terminating, if for
every reachable marking of the marked Petri net pxP Y I Y O, T, F y, iq a marking
f P Ω can be reached.</p>
      <p>It is sound, if for every reachable marking of the marked Petri net pxP, T, F y, iq
a marking f P Ω can be reached.</p>
      <p>Communication between OPNs is done via the interface places. Two OPNs
can only communicate if the input places of the one are the output places of the
other, and vice versa.</p>
      <p>Definition 3. Two OPNs A and B are composable, denoted by A ‘ B, if and
only if pIA X OBq Y pOB X IAq “ pPA Y TA Y IA Y OAq X pPB Y TB Y IB Y OBq.</p>
      <p>If A and B are composable, they can be composed into a new OPN, denoted by
A‘B, with A‘B “ xP, I, O, T, F, i, Ωy where P “ PAYPB YG; I “ pIAYIBqzG;
O “ pOA Y OBqzG; T “ TA Y TB; F “ FA Y FB; i “ iA ` iB; and f “ ΩA Y ΩB
with G “ pIA X OBq Y pOB X IAq.</p>
      <p>
        Event Logs and Behavioral Profiles Although event logs are defined as a
tuple consisting of a set of case identifiers, events, and an attribute mapping [
        <xref ref-type="bibr" rid="ref2">2</xref>
        ],
it is in this paper sufficient to consider an event log, denoted by L, as a set of
sequences over some alphabet T , i.e., L Ď T ˚. Given an event log L, we define
the successor relation [
        <xref ref-type="bibr" rid="ref20">20</xref>
        ] by a ăL b if a sequence σ P L and 1 ď i ď |σ| exist,
such that σpiq “ a and σpi ` 1q “ b. Using the successor relation, we define the
behavioral profile pÑc, kc, `cqL as three relations: (1) the causality relation Ñc
is defined by a Ñc b iff a ăL b and b ­ăL a, (2) the concurrency relation kc, which
is defined by a kc b iff both a ăL b and b ăL a, and (3) the exclusive relation `c
is defined by a `c b iff both a ­ăL b and b ­ăL a [
        <xref ref-type="bibr" rid="ref20">20</xref>
        ]. If the context is clear, we
omit the subscript.
      </p>
      <p>Given a marked Petri net pN, mq with N “ xP, T, F y, an event log L Ď T ˚
is called complete with respect to pN, mq iff traces σ1, σ2 P T ˚ exist such that
pN, mqrσ1; xa, by; σ2ypN,) implies a ăL b for all a, b P T .
4</p>
    </sec>
    <sec id="sec-4">
      <title>Functional Architectures</title>
      <p>
        To model the overview of a system, the modules it consists of, and the features
these modules offer, we propose the use of the functional architecture model
(FAM). The functional architecture of a system is “an architectural model which
represents at a high level the software products major functions from a usage
perspective, and specifies the interactions of functions, internally between each
other and externally with other products” [
        <xref ref-type="bibr" rid="ref6">6</xref>
        ]. It offers modules containing
features. Features of different modules interact via so-called information flows.
      </p>
      <p>An example is shown in Fig. 2(a). The FAM contains 1 context module, E,
7 modules, A, B, C, D, X, Y and Z. Modules have features, depicted by the
rounded rectangles. For example, module C contains two features, K and L.
Between features of different modules, information flows exist, e.g., the information
flow pF, q, Lq between modules A and C.
(a) Example
Model</p>
      <p>G
A
t
H
B
X
F
s
q
u
v
Z</p>
      <p>K
r
N</p>
      <p>C
D
Y</p>
      <p>L
M</p>
      <p>O
E
– M is a finite set of modules;
– C is a finite set of context modules;
– F is a finite set of features;
– h : M Ñ M is the hierarchy function, such that the transitive closure h˚ is
irreflexive;
– m : F Ñ M Y C is a feature map that maps each feature to a module,
possibly in the context, and this module does not have any children, i.e.
h´1pmpF qq “ H for all F P F;
– Ñ Ď F ˆ Λ ˆ F is the information flow, with Λ the label universe, such
that for pA, l, Bq PÑ we have mpAq ‰ mpBq. The labels for the information
flows are unique per feature, i.e., pA, l, Bq and pA, l, Cq imply B “ C for all
labels l P Λ and pA, l, Bq, pA, l, Cq P Ñ.</p>
      <p>Although the information flows define the possible interactions between
modules, it remains a static overview of the system. Therefore, one can use scenarios
on top of the functional architecture, e.g. by creating an overlay, highlighting the
information flows that are executed and the order in which they should occur.
Formally, we represent a scenario as a partial order.</p>
      <p>Definition 5. Let F “ xM, C, F, h, m, Ñy be a FAM. A scenario of F is a pair
pS, ăq with S ĎÑ, such that pS, ďq with ď “ ă˚ is a partial order.</p>
      <p>An example is shown in Fig. 2(b). The scenario implied by the overlay can
be represented by a partial order induced by pO, p, F q ă pF, q, Lq, pF, q, Lq ă
pK, s, Hq, pF, q, Lq ă pK, r, N q, pK, r, N q ă pN, u, Hq, pK, s, Hq ă pH, t, Gq,
pN, u, Hq ă pH, t, Gq, pK, r, N q ă pM, v, Hq, and pM, v, Hq ă pH, t, Gq.</p>
      <p>However, such scenarios are typically not specified. Another important
drawback of such scenarios is their analyzability. Although each scenario can be
checked, the consistency between the different scenarios remains a difficult task.
Therefore, in the remainder of this paper, we search for a method to derive the
behavioral specification as a network of asynchronously communicating systems,
given the system execution data produced by the actual system in the form of
event logs.
5</p>
    </sec>
    <sec id="sec-5">
      <title>Discovery of a Functional Architecture</title>
      <p>
        In this section, we study the possibilities process mining [
        <xref ref-type="bibr" rid="ref2">2</xref>
        ] offers to generate
Petri nets for each of the different modules a system consists of. Event logs
describe the order in which features of a system have been executed. Such event
logs are system wide. Instead of each module having its own event log, only
global sequences exist, i.e., sequences concatenate the executed features over all
modules. As FAM only allows features to be contained in a single module, we
assume that each feature belongs to exactly one module. Also, FAM prescribes
communication to be one-directional, i.e., given two communicating features A
and B, we assume that either A sends a message to B, or vice versa, that B
sends a message to A, but not both.
      </p>
      <p>The behavioral specification of a system is three-fold: (1) communication
between modules via their features, (2) the internal behavior within each feature,
and (3) the order in which features are called within a module. In this section,
we explore all three types of behavioral specification to come to a composed
system of asynchronously communicating systems.</p>
      <p>In the remainder, let L be an event log over a set of features T , and let
R : T Ñ M , with M the set of modules, be a function that maps each feature
onto the module that contains that feature.
5.1</p>
      <p>Communication between Features
Communication between modules within a system is asynchronous of nature:
messages are sent between features in order to complete their functionality.
Within an event log, we need to consider the order in which events or
features occur. For example, given some trace σ, if the resource is different for two
subsequent events, i.e., Rpσpiqq ‰ Rpσpi ` 1qq, then this might indicate that the
former sends a message to the latter. This is expressed by the communication
successor.</p>
      <p>Definition 6 (Communication successor). Let L Ď T ˚ be an event log.
We define the communication successor relation ÎL Ď T ˆ T by A ÎL B iff
RpAq ‰ RpBq, σpiq “ A, and σpi ` 1q “ B for some σ P L and 1 ď i ă |σ|.</p>
      <p>Although at first sight the communication successors seem to work, we need
to remember the concurrent nature of asynchronous communication. Consider for
example the communication between modules M and N as depicted in Fig. 3, and</p>
      <p>Case Trace
1 A, E, F, G, B, C
2 A, E, F, B, G, C
3 A, E, B, F, G, C
4 A, E, B, F, C, G
5 A, E, F, B, C, G
6 A, B, E, F, G, C
7 A, B, E, F, C, G
the corresponding allowed sequences in Tbl. 4. We have A Î E, which is indeed
the communication as modeled in the composition M ‘ N . However, we also
find G Î B, indicating a possible communication between G and B. Listing all
communication successors, we get A Î E, G Î B, F Î B, B Î G, G Î C, E Î B,
B Î F , F Î C, C Î G, and B Î E. Observe that because of the asynchronous
nature of the communication, features B and E are concurrently enabled in
Fig. 3. Assuming the event log to be complete, this should become visible in the
communication successor relation, as for the normal successor relation on event
logs.
by:
Definition 7 (Communication behavioral profile). Let L Ď T ˚ be an event
log, and ÎL Ď T ˆ T the corresponding communication successor relation.</p>
      <p>The communication behavioral profile is the 3-tuple pÑc, kc, `cqLCom defined
– A Ñc B iff A ÎL B and B Î­L A;
– A kc B iff both A ÎL B and B ÎL A; and
– A `c B iff both A Î­L B and A Î­L B.</p>
      <p>Calculating the behavioral profile of the communicating transitions using
the communication successor relation, results in the communication behavioral
profile as shown in Tbl. 3. It shows that B and E are concurrently enabled.
Following the behavioral profile, we see that the causal relation of the behavioral
profile correctly identifies the feature communication.</p>
      <p>Using the communication behavioral profile, we can construct the
information flows from an event log as follows. If A Ñ B in the communication behavioral</p>
      <p>Debtor Payment Creditor</p>
      <p>A B C D E F G H I J K O M N Q S
profile of the event log, then an information flow pA, x, Bq exists, with x a fresh
label. This results in the following translation:
Definition 8 (Generated FAM). Let L be an event log, and pÑc, kc, `cqLCom
be its communication behavioral profile. Its corresponding functional architecture
model xM, C, F, h, m, Ñy is defined by:
– M “ RpLq;
– C “ H;
– F “ T ;
– h “ H;
– m “ R; and
– Ñ“ tpA, x, Bq | A Ñc B, and x P Λ a fresh labelu.</p>
      <p>After constructing the communication behavioral profile for the running
example, shown in Tbl. 4, we can complete the functional architecture model.
Based on the given system execution data, we see for example that feature H
communicates with feature A, and feature S sends messages to features K and
O, and receives messages from feature M . The complete functional architecture
of the running example is shown in Fig. 4.
5.2</p>
      <p>Internal Behavior of Features
As can be seen in the running example, features can send and receive multiple
messages. For example, feature S sometimes sends a message to feature K and
sometimes to feature O. Therefore, the next step in discovering the functional
C
D
E</p>
      <p>F</p>
      <sec id="sec-5-1">
        <title>Debtor H I J</title>
        <p>K
O
M
N</p>
      </sec>
      <sec id="sec-5-2">
        <title>Payment Q S Creditor</title>
        <p>architecture is to reconstruct the internal behavior of each of the features. For
this, we create for each of the features an event log, containing the features that
it communicates with. We call this the feature log.</p>
        <p>Definition 9 (Feature log). Let L Ď T ˚ be an event log, and let F P T be
some feature. Let pÑc, kc, `cqLCom be the corresponding communication
behavioral profile. The feature log LF is defined by LF “ tσ|CpF q | σ P L, F P σu
where CpF q “ tA | A Ñc F _ F Ñc Au.</p>
        <p>Consider for example feature S in the running example. This feature
communicates with features K, O and M , i.e., CpSq “ tK, O, M u. Its feature log is
the projection of the log on these features, i.e., LS “ txKy, xO, M yu.</p>
        <p>
          On these feature logs, we apply the inductive miner [
          <xref ref-type="bibr" rid="ref13">13</xref>
          ], that always returns
a sound workflow net. Next, we transform the discovered workflow net into an
open Petri net, to visualize the messages sent and received by the feature. This
results in a feature net for each of the features present in the event log.
Definition 10 (Feature Net). Let L Ď T ˚ be an event log, and let F P T
be some feature. Let pÑc, kc, `cqLCom be the corresponding communication
behavioral profile. The Feature net NF is the OPN xP, I, O, T, F, i, Ωy defined by
¯
– P “ P¯, T “ T¯, i “ r ¯i s, Ω “ t r f s u;
– I “ tpA´F | A Ñc F u;
– O “ tpF ´A | F Ñc Au;
– F “ F¯ Ytpt, pF ´Aq | t P T, λptq “ A, F Ñc Au
        </p>
        <p>YtppA´F , tq | t P T, λptq “ A, A Ñc F qu.
where xP¯, T¯, F¯, ¯i, f¯y is the discovered workflow net.</p>
        <p>In our running example, each of the 16 features are transformed into a feature
net. Most of the features are simple, like for feature H and A, consisting of
pM-S</p>
        <p>O
M</p>
        <p>K
pH-A</p>
        <p>A
pH-A</p>
        <p>H
pJ-C
pJ-Q</p>
        <p>C
Q
pS-K
pK-D</p>
        <p>S
D
Feature S</p>
        <p>Feature H</p>
        <p>Feature A</p>
        <p>Feature J</p>
        <p>
          Feature K
a single transition sending a message to A, and receiving a message from H,
respectively. A more complex feature net is the net for feature S, which internally
decides whether it sends a message to K or to O. Figure 5 depicts some of the
feature nets generated using the inductive miner [
          <xref ref-type="bibr" rid="ref13">13</xref>
          ].
Now that each feature has its internal behavior defined by means of a feature
net, the next step is to determine the order in which features are executed within
each of the modules. As for the features, we first create event logs for each of
the modules, by filtering each trace on the features it contains. This results in a
module log for each of the modules.
        </p>
        <p>Definition 11 (Module Log). Let L Ď T ˚ be an event log. Let M P RngpRq
be a module. Let pÑc, kc, `cq be the corresponding communication behavioral
profile. The Module log LM is defined by LM “ tσ|tF |RpF q“Mu | σ P Lu.</p>
        <p>Within the running example, we obtain three module logs, one for each of
the modules. For example, module Debtor, has module log LDebtor “ txA, B, Gy,
xA, C, D, Gy, xA, C, E, F, Gyu, and for Creditor we have LCreditor “ txQ, Sy,</p>
        <p>B</p>
        <p>I</p>
        <p>H
K</p>
        <p>J
N</p>
        <p>O
M</p>
        <p>Q
S
Module Debtor</p>
        <p>Module Payment</p>
        <p>Module Creditor
xQ, S, Syu. Again applying the inductive miner results in the three workflow
nets as depicted in Fig. 7. Notice that, although feature S occurs twice in one
of the sequences, the algorithm only adds a single feature S in the resulting
workflow model.</p>
        <p>Composition of Feature Nets and Module Nets
Last step in the process is to combine the feature nets generated for each of the
features with the generated module nets. This results in an open Petri net for
each of the modules, defining the interaction between the different modules.</p>
        <p>In the module net, each feature is represented by a single transition. Next
step is to refine each feature by its feature net. For this, we first define the
refinement of a transition by a workflow model on open Petri nets, as shown in
Fig. 6. This refinement connect each input place of the refined transition with
each of the transitions in the postset of the initial place of the workflow, and
similarly each output place of the refined transition with each of the transitions
in the preset of the final place of the refining workflow. It is straight-forward
to prove that if (1) the initial net is sound, (2) each input place of the refined
transition is 1-bounded, i.e., it can contain at most one token, and (3) workflow
net W is sound, then the refinement yields a sound result.</p>
        <p>H
I
J
K
O
M
pH-A
pB-I
pC-J
pK-D
pO-E
pF-M
pJ-Q
pS-K
pS-O
pM-S</p>
        <p>Q
S
pJ-Q
pS-K
pS-Q
pM-S
G</p>
        <p>The result of refining each feature by its feature net is shown in Fig. 8. As
features G and N have no feature net defining communication, these transitions
are not refined.</p>
        <p>To verify whether the resulting open Petri nets are a true representation of
the system, one can compose the nets into a single Petri net, and execute each
of the sequences of the event log of Tbl. 1 on the resulting model, which in
this example is possible. Further analyzing the resulting model shows that its
only deadlocks are desirable markings: either all modules reach their final place,
without any pending tokens, or the Creditor module remains untouched, while
the Debtor and Payment module reach their final place.
6</p>
      </sec>
    </sec>
    <sec id="sec-6">
      <title>Conclusions</title>
      <p>Within this paper, we discussed a method to automatically generate a functional
architecture model from an event log together with a mapping of each feature to
the module that offers that functionality. We showed how the information flows
can be derived from the communication behavioral profile. This profile not only
identifies the information flow for the static structure of the functional
architecture, but additionally offers sufficient information to construct the internal
behavior for each of the features, and between the features within a module.
Lastly, we showed how to compose feature and module nets into an open Petri
net.</p>
      <p>
        Discovering the interaction between different modules is not new. Tchniques
like service mining [
        <xref ref-type="bibr" rid="ref3">3</xref>
        ], apply process mining on event logs to discover a process
model of how the services are orchestrated. In the approach presented in this
paper, we focus on the discovery of the behavior of each of the modules, rather
than a complete orchestration.
      </p>
      <p>
        In [
        <xref ref-type="bibr" rid="ref15">15</xref>
        ], the authors discover the internal behavior of services based on the
interaction between two services, guaranteeing deadlock freedom of the
discovered service. In the setting of this paper, the exact interaction between modules
is unknown, and needs to be discovered first.
      </p>
      <p>
        The core idea of this paper is twofold: firstly to derive the information flows
for a Functional Architecture Model, and secondly to derive the internal behavior
for each of the modules within the architecture. Within software architecture,
this is called Software Architecture Reconstruction [
        <xref ref-type="bibr" rid="ref12">12</xref>
        ]. Although some
techniques take the dynamic aspects of the software operation into account, most
techniques only focus on the static aspects of software architecture models,
using solely the available source code [
        <xref ref-type="bibr" rid="ref8">8</xref>
        ]. For example, system execution data is
used to enrich architectures with performance data [
        <xref ref-type="bibr" rid="ref11">11</xref>
        ] or to visualize traces on
how the software is used [
        <xref ref-type="bibr" rid="ref19">19</xref>
        ]. In this paper, we propose a method to not only
visualize software usage, but to discover module communication and to generate
the internal behavior of modules within a software architecture.
      </p>
      <p>Although the approach presented in this paper shows an application of the
behavioral profile to discover feature interaction, additional research is required.
First, the current approach requires the event log to be complete, i.e., if the log
grows, the successor relation should not change. Further, for the generation of
the internal feature behavior, we assume that if the sending feature is present
in the event log, it enables all possible events, which is possibly a too strict
assumption that deserves further investigation.</p>
      <p>
        The approach in this paper is very flexible, as we derive individual models
for the features and modules. For this, we apply standard process discovery
algorithms returning sound workflow models. However, their composition in general
does not result in a sound system of asynchronously communicating systems.
Further research is required to study the conditions under which this can be
guaranteed. For this, we want to identify conditions which on the one hand
result in correct models, and on the other hand have a positive effect on model
quality as described by [
        <xref ref-type="bibr" rid="ref7">7</xref>
        ].
      </p>
      <p>
        Not only does this approach provide useful insights for the software architect,
we expect the approach applicable to business process management as well, as
for the discovery of separate business processes, the Business Process Modelling
and Notation offers the swimlane notion. Therefore, we plan to implement the
approach in the Process Mining toolkit ProM [
        <xref ref-type="bibr" rid="ref18">18</xref>
        ] to experiment and apply the
approach on real-life examples.
      </p>
      <p>Acknowledgements The authors would like to thank the anonymous reviewers
for their valuable feedback, and Sjaak Brinkkemper, Fabiano Dalpiaz, Garm
Lucassen, Leo Pruijt and Erik Jagroep for the fruitfull discussions and valuable
input on architecture and software products.</p>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          1.
          <string-name>
            <surname>W.M.P. van der Aalst</surname>
          </string-name>
          .
          <article-title>Verification of workflow nets</article-title>
          .
          <source>In Application and Theory of Petri Nets</source>
          <year>1997</year>
          , volume
          <volume>1248</volume>
          of Lecture Notes in Computer Science, pages
          <fpage>407</fpage>
          -
          <lpage>426</lpage>
          . Springer, Berlin,
          <year>1997</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          2.
          <string-name>
            <surname>W.M.P. van der Aalst</surname>
          </string-name>
          .
          <source>Process Mining: Discovery, Conformance and Enhancement of Business Processes</source>
          . Springer, Berlin,
          <year>2011</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          3.
          <string-name>
            <surname>W.M.P. van der Aalst.</surname>
          </string-name>
          <article-title>Challenges in service mining: Record, check, discover</article-title>
          . In Web Engineering, volume
          <volume>7977</volume>
          of Lecture Notes in Computer Science, pages
          <fpage>1</fpage>
          -
          <lpage>4</lpage>
          . Springer, Berlin,
          <year>2013</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          4.
          <string-name>
            <given-names>L.</given-names>
            <surname>Bass</surname>
          </string-name>
          ,
          <string-name>
            <given-names>P.</given-names>
            <surname>Clements</surname>
          </string-name>
          , and
          <string-name>
            <given-names>R.</given-names>
            <surname>Kazman</surname>
          </string-name>
          .
          <source>Software Architecture in Practice. Series in Software Engineering. Addison Wesley</source>
          , Reading, MA, USA,
          <year>2012</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          5.
          <string-name>
            <given-names>D.</given-names>
            <surname>Bera</surname>
          </string-name>
          ,
          <string-name>
            <surname>K. M. van Hee</surname>
          </string-name>
          , and
          <string-name>
            <surname>J.M.E.M. van der Werf</surname>
          </string-name>
          .
          <article-title>Designing weakly terminating ros systems</article-title>
          .
          <source>In Applications and Theory of Petri Nets, (33th International Conference, Petri Nets</source>
          <year>2012</year>
          ), volume
          <volume>7347</volume>
          of Lecture Notes in Computer Science, pages
          <fpage>328</fpage>
          -
          <lpage>347</lpage>
          . Springer, Berlin,
          <year>2012</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref6">
        <mixed-citation>
          6.
          <string-name>
            <given-names>S.</given-names>
            <surname>Brinkkemper</surname>
          </string-name>
          and
          <string-name>
            <given-names>S.</given-names>
            <surname>Pachidi</surname>
          </string-name>
          .
          <article-title>Functional architecture modeling for the software product industry</article-title>
          .
          <source>In ECSA</source>
          <year>2010</year>
          , volume
          <volume>6285</volume>
          of Lecture Notes in Computer Science, pages
          <fpage>198</fpage>
          -
          <lpage>213</lpage>
          . Springer, Berlin,
          <year>2010</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref7">
        <mixed-citation>
          7.
          <string-name>
            <surname>J.C.A.M. Buijs</surname>
            ,
            <given-names>B.F. van Dongen</given-names>
          </string-name>
          , and
          <string-name>
            <given-names>W.M.P. van der</given-names>
            <surname>Aalst</surname>
          </string-name>
          .
          <article-title>On the role of fitness, precision, generalization and simplicity in process discovery</article-title>
          .
          <source>In On the Move to Meaningful Internet Systems: OTM</source>
          <year>2012</year>
          , volume
          <volume>7565</volume>
          of Lecture Notes in Computer Science, pages
          <fpage>305</fpage>
          -
          <lpage>322</lpage>
          . Springer, Berlin,
          <year>2012</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref8">
        <mixed-citation>
          8.
          <string-name>
            <given-names>S.</given-names>
            <surname>Ducasse</surname>
          </string-name>
          and
          <string-name>
            <given-names>D.</given-names>
            <surname>Pollet</surname>
          </string-name>
          .
          <article-title>Software architecture reconstruction: A process-oriented taxonomy</article-title>
          .
          <source>Software Engineering</source>
          , IEEE Transactions on,
          <volume>35</volume>
          (
          <issue>4</issue>
          ):
          <fpage>573</fpage>
          -
          <lpage>591</lpage>
          ,
          <year>July 2009</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref9">
        <mixed-citation>
          9.
          <string-name>
            <given-names>S.A.</given-names>
            <surname>Fricker</surname>
          </string-name>
          .
          <article-title>Software product management</article-title>
          .
          <source>In Software for People</source>
          ,
          <source>Management for Professionals</source>
          , pages
          <fpage>53</fpage>
          -
          <lpage>81</lpage>
          . Springer,
          <year>2012</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref10">
        <mixed-citation>
          10.
          <string-name>
            <surname>K.M. van Hee</surname>
            ,
            <given-names>N.</given-names>
          </string-name>
          <string-name>
            <surname>Sidorova</surname>
          </string-name>
          , and
          <string-name>
            <surname>J.M.E.M. van der Werf</surname>
          </string-name>
          .
          <article-title>When can we trust a third party? In Transactions on Petri Nets and Other Models of Concurrency VIII</article-title>
          , volume
          <volume>8100</volume>
          of Lecture Notes in Computer Science, pages
          <fpage>106</fpage>
          -
          <lpage>122</lpage>
          . Springer, Berlin,
          <year>2013</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref11">
        <mixed-citation>
          11. T. Israr,
          <string-name>
            <given-names>M.</given-names>
            <surname>Woodside</surname>
          </string-name>
          , and
          <string-name>
            <given-names>G.</given-names>
            <surname>Franks</surname>
          </string-name>
          .
          <article-title>Interaction tree algorithms to extract effective architecture and layered performance models from traces</article-title>
          .
          <source>Journal of Systems and Software</source>
          ,
          <volume>80</volume>
          (
          <issue>4</issue>
          ):
          <fpage>474</fpage>
          -
          <lpage>492</lpage>
          ,
          <year>2007</year>
          .
          <source>Software Performance 5th International Workshop on Software and Performance.</source>
        </mixed-citation>
      </ref>
      <ref id="ref12">
        <mixed-citation>
          12.
          <string-name>
            <given-names>R.L.</given-names>
            <surname>Krikhaar</surname>
          </string-name>
          .
          <article-title>Software Architecture Reconstruction</article-title>
          .
          <source>PhD thesis</source>
          , VU Amsterdam,
          <year>1999</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref13">
        <mixed-citation>
          13.
          <string-name>
            <given-names>S.J.J.</given-names>
            <surname>Leemans</surname>
          </string-name>
          ,
          <string-name>
            <given-names>D.</given-names>
            <surname>Fahland</surname>
          </string-name>
          , and
          <string-name>
            <surname>W.M.P. van der Aalst.</surname>
          </string-name>
          <article-title>Discovering blockstructured process models from event logs - a constructive approach</article-title>
          .
          <source>In Application and Theory of Petri Nets and Concurrency</source>
          , volume
          <volume>7927</volume>
          of Lecture Notes in Computer Science, pages
          <fpage>311</fpage>
          -
          <lpage>329</lpage>
          . Springer, Berlin,
          <year>2013</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref14">
        <mixed-citation>
          14. G. Lucassen,
          <string-name>
            <surname>J.M.E.M. van der Werf</surname>
            , and
            <given-names>S.</given-names>
          </string-name>
          <string-name>
            <surname>Brinkkemper</surname>
          </string-name>
          .
          <article-title>Alignment of software product management and software architecture with discussion models</article-title>
          .
          <source>In IWSPM 2014</source>
          , pages
          <fpage>21</fpage>
          -
          <lpage>30</lpage>
          . IEEE,
          <year>Aug 2014</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref15">
        <mixed-citation>
          15. R. Mu¨ller, C. Stahl,
          <string-name>
            <surname>W.M.P. van der Aalst</surname>
            , and
            <given-names>M</given-names>
          </string-name>
          <string-name>
            <surname>Westergaard</surname>
          </string-name>
          .
          <article-title>Service discovery from observed behavior while guaranteeing deadlock freedom in collaborations</article-title>
          .
          <source>In Service-Oriented Computing</source>
          , volume
          <volume>8274</volume>
          of Lecture Notes in Computer Science, pages
          <fpage>358</fpage>
          -
          <lpage>373</lpage>
          . Springer, Berlin,
          <year>2013</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref16">
        <mixed-citation>
          16.
          <string-name>
            <given-names>W.</given-names>
            <surname>Reisig</surname>
          </string-name>
          .
          <source>Petri Nets: An Introduction</source>
          , volume
          <volume>4</volume>
          of Monographs in
          <source>Theoretical Computer Science: An EATCS Series</source>
          . Springer, Berlin,
          <year>1985</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref17">
        <mixed-citation>
          17.
          <string-name>
            <given-names>R.N.</given-names>
            <surname>Taylor</surname>
          </string-name>
          , N. Medvidovic, and
          <string-name>
            <given-names>E.M.</given-names>
            <surname>Dashofy</surname>
          </string-name>
          .
          <source>Software Architecture: Foundations, Theory, and Practice</source>
          . John Wiley &amp; Sons,
          <year>2010</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref18">
        <mixed-citation>
          18.
          <string-name>
            <surname>H.M.W. Verbeek</surname>
            ,
            <given-names>J.C.A.M.</given-names>
          </string-name>
          <string-name>
            <surname>Buijs</surname>
            ,
            <given-names>B.F. van Dongen</given-names>
          </string-name>
          , and
          <string-name>
            <surname>W.M.P. van der Aalst. XES</surname>
          </string-name>
          , XESame, and
          <article-title>ProM 6</article-title>
          .
          <source>In Information System Evolution</source>
          , volume
          <volume>72</volume>
          <source>of Lecture Notes in Business Information Processing</source>
          , pages
          <fpage>60</fpage>
          -
          <lpage>75</lpage>
          . Springer, Berlin,
          <year>2011</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref19">
        <mixed-citation>
          19.
          <string-name>
            <surname>R.J. Walker</surname>
            ,
            <given-names>G.C.</given-names>
          </string-name>
          <string-name>
            <surname>Murphy</surname>
            ,
            <given-names>J.</given-names>
          </string-name>
          <string-name>
            <surname>Steinbok</surname>
            , and
            <given-names>M.P.</given-names>
          </string-name>
          <string-name>
            <surname>Robillard</surname>
          </string-name>
          .
          <article-title>Efficient mapping of software system traces to architectural views</article-title>
          .
          <source>In Proceedings of the 2000 Conference of the Centre for Advanced Studies on Collaborative Research</source>
          , CASCON '
          <volume>00</volume>
          , pages
          <fpage>12</fpage>
          -. IBM Press,
          <year>2000</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref20">
        <mixed-citation>
          20.
          <string-name>
            <given-names>M.</given-names>
            <surname>Weidlich</surname>
          </string-name>
          and
          <string-name>
            <surname>J.M.E.M. van der Werf</surname>
          </string-name>
          .
          <article-title>On profiles and footprints - relational semantics for petri nets</article-title>
          .
          <source>In Applications and Theory of Petri Nets (ICATPN</source>
          <year>2012</year>
          ), volume
          <volume>7347</volume>
          of Lecture Notes in Computer Science, pages
          <fpage>148</fpage>
          -
          <lpage>167</lpage>
          . Springer, Berlin,
          <year>2012</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref21">
        <mixed-citation>
          21.
          <string-name>
            <surname>J.M.E.M. van der Werf</surname>
            and
            <given-names>H.M.W.</given-names>
          </string-name>
          <string-name>
            <surname>Verbeek</surname>
          </string-name>
          .
          <article-title>Online compliance monitoring of service landscapes</article-title>
          .
          <source>In BPM 2014 International Workshops</source>
          , volume
          <volume>202</volume>
          <source>of Lecture Notes in Business Information Processing</source>
          , pages
          <fpage>89</fpage>
          -
          <lpage>95</lpage>
          . Springer, Berlin,
          <year>2015</year>
          .
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>