how COnfECt can be combined with the passive
approach Gk-tail (Lorenzoli et al., 2008). We call
the new approach Ck-tail. We show how to ar-
range the steps of Gk-tail and COnfECt to ge-
nerate a system of CEFSMs from the traces of a
black-box system.
The remainder of the paper is organised as fol-
lows: Section 2 presents some related work. Section
3 provides some definitions about the CEFSM model.
The COnfECt method is presented in Section 4. We
finally conclude and give some perspectives for future
work in Section 5.
2 RELATED WORK
We consider in this paper that model learning is de-
fined as a set of methods that infer a specification by
gathering and analysing system executions and con-
cisely summarising the frequent interaction patterns
as state machines that capture the system behaviour
(Ammons et al., 2002). Models can be generated
from different kinds of data samples such as affirma-
tive/negative answers (Angluin, 1987), execution tra-
ces (Krka et al., 2010; Antunes et al., 2011; Durand
and Salva, 2015), or source code (Pradel and Gross,
2009). Two kinds of approaches emerge from the li-
terature: active and passive model learning methods.
Active learning approaches repeatedly query sys-
tems or humans to collect positive or negative obser-
vations, which are studied to build models. Many ex-
isting active techniques have been conceived upon the
L
∗
algorithm (Angluin, 1987). Active learning cannot
be applied on all systems though. For instance, un-
controllable systems cannot be queried easily, or the
use of active testing techniques may lead a system to
abnormal functioning because it has to be reset many
times. The second category includes the techniques
that passively generate models from a given set of
samples, e.g., a set of execution traces. These techni-
ques are said to be passive since there is no interaction
with the system to model. Models are often con-
structed with these passive approaches by represen-
ting sample sets with automata whose equivalent sta-
tes are merged. The state equivalence is usually defi-
ned by means of event sequence abstractions or state
based abstractions. With event sequence abstractions,
the abstraction level of the models is raised by mer-
ging the states having the same event sequences. This
process stands on two main algorithms: kTail (Bier-
mann and Feldman, 1972) and kBehavior (Mariani
and Pezze, 2007). Both algorithms were enhanced to
support events combined with data values (Lorenzoli
et al., 2008; Mariani and Pastore, 2008). In particu-
lar, kTail has been enhanced with Gk-tail to generate
EFSMs (Lorenzoli et al., 2008; Mariani et al., 2017).
The approaches that use state-based abstraction, e.g.,
(Meinke and Sindhu, 2011), adopted the generation
of state-based invariants to define equivalence clas-
ses of states that are combined together to form final
models. The Daikon tool (Ernst et al., 1999) were ori-
ginally proposed to infer invariants composed of data
values and variables found in execution traces.
None of the current model learning approaches
support the generation of models describing the be-
haviours of components of a system under learning.
This work tackles this research problem and proposes
an original method for inferring models as systems
of CEFSMs. Our main contribution is the detection
of component behaviours in an execution trace set by
means of trace analysis, event correlation, model si-
milarity and data clustering.
3 CALLABLE EXTENDED
FINITE STATE MACHINE
We propose in this section a model of components-
based systems called Callable Extended Finite State
Machine (CEFSM), which is a specialised FSM in-
cluding parameters and guards restricting the firing of
transitions. Parameters and symbols are combined to-
gether to constitute events. A CEFSM describes the
behaviours of a component, which interacts with the
external environment, accepting input valued events
(i.e. symbols associated with parameter assignments)
and producing output valued events. In addition,
the CEFSM model is equipped by a special internal
(unobservable) event denoted call(CEFSM) to trigger
the execution of another CEFSM. This event means
that the current CEFSM is being paused while anot-
her CEFSM C
2
starts its execution at its initial state.
Once C
2
reaches a final state, the calling CEFSM re-
sumes its execution after the event call(CEFSM). We
do not consider in this paper that a component is able
to provide results to another one.
Before giving the CEFSM definition, we assume
that there exist a finite set of symbols E, a domain of
values denoted D and a variable set X taking values
in D. The assignment of variables in Y ⊆ X to ele-
ments of D is denoted with a mapping α : Y −→ D. We
denote D
Y
the assignment set over Y . For instance,
α = {x := 1,y := 3} is a variable assignment of D
{x,y}
.
α(x) = {x := 1} is the variable assignment related to
the variable x.
Definition 1 (CEFSM). A Callable Extended Finite
State Machine (CEFSM) is a 5-tuple hS,s0,Σ,P, T i
where :
COnfECt: An Approach to Learn Models of Component-based Systems
265