Towards More Relational Feature Models
Arnaud Gotlieb, Dusica Marijan and Sagar Sen
Certus Software V&V Center, Simula Research Laboratory, Lysaker, Norway
Keywords:
Feature Modeling, Variability, Constraint Programming.
Abstract:
Feature modeling is of paramount importance to capture variabilities and commonalities within a software
product line. Nevertheless, current feature modeling notations are limited, representing only propositional for-
mulae over attributed variables. This position paper advocates the extension of feature modeling formalisms
with richer computational domains and relational operations. In particular, it proposes to extend feature mod-
eling with finite and continuous domain variables, with first-order logic quantifiers (,), and with N-ary
relations between features attributes, and with so-called global constraints. In order to extend the expres-
siveness while preserving automated analysis facilities, feature models could be semantically interpreted as
first-order logic formulae (instead of propositional logic formulae), including global and continuous depen-
dency between features. In simpler words, this paper emphasizes the importance of having more relational
feature models and presents next-generation applications.
1 INTRODUCTION
This paper addresses the challenges imposed on Soft-
ware Product Line (SPL) engineering (Birk et al.,
2003)(Pohl et al., 2005) when engineers have to deal
with heterogeneous concerns about modeling, expres-
siveness, documentation and automation. Roughly
speaking, software engineers face a dual challenge:
increase the expressiveness of feature modeling no-
tations to deal with the complexity of product repre-
sentations, while keeping a high degree of automation
in the processing of their models. To illustrate this
dilemma, consider the following scenario:
The Product-line Engineer. Øystein works for a
Norwegian company, called ELB, producing highly-
configurable software control systems for automated
subsea oil&gas exploitation. He works as a product-
line engineer for ELB, meaning that he manages the
variability and commonalities of several similar prod-
ucts for various customers. To facilitate the commu-
nication with customers and product managers, Øys-
tein maintains a feature model (FM) representing all
the configurations of ELB control systems.
The Customer. Following a productive meeting
with Magne, a new customer of ELB working for a fa-
mous shipyard company, Øystein has tried to config-
ure a new variant of the product line. However, dur-
ing this process, he realized that Magne asked him to
consider an intricate situation: if the control system
embeds feature A, and if A is in mode 1, then feature
B needs to be excluded from the final product, while if
A is in mode 2, then feature C needs to be excluded!
This is problematic for Øystein as features in FM can
only be represented as binary-state variables; the no-
tion of multiple modes is not available for features.
Another request by Magne is to configure a product
with no more than 25 features among a set of 57 fea-
tures.
The Product Managers. Later on, Øystein talked
to Kjetil and Hoyvind, both product managers at ELB.
Kjetil said that including feature A in a product, what-
ever be its mode, will automatically exclude similar
mode for feature B or feature C. Hoyvind, meanwhile,
said that, in any case, a product having both features
B and C in the same mode is impossible to develop.
Øystein is now a bit confused on how to capture these
important pieces of information in his FM. In addi-
tion, Hoyvind mentioned that feature E, representing
the voltage at the bounds of a subcomponent of the
control system, continuously depends on feature D,
because this feature is linked to D through a physical
formula. Øystein has absolutely no idea on how to
capture this dependency.
Issues in FM Modeling. Now, Øystein has to
return a call to Magne, the customer, to explain the
impossibility of developing the requested variant, but
he is totally confused. He does not know what are
the remaining options for deriving a feasible variant
381
Gotlieb A., Marijan D. and Sen S..
Towards More Relational Feature Models.
DOI: 10.5220/0005553403810386
In Proceedings of the 10th International Conference on Software Engineering and Applications (ICSOFT-EA-2015), pages 381-386
ISBN: 978-989-758-114-4
Copyright
c
2015 SCITEPRESS (Science and Technology Publications, Lda.)
of the software product line? Are the two distinct
modes of feature A responsible for this impossibility?
Is the continuous dependency in between D and E
the cause of the unrealisable variant? Of course,
due to limited expressiveness of FM in general, the
informations Øystein gathered during the discussions
cannot be encoded in the FM and then it is useless
to answer these questions. Magne, the customer,
starts to be irritated not having clear answers to his
requests. Moreover, Øystein is clueless about incor-
porating the second request of Magne that states that
only 25 features be chosen for a subset of 57 features.
As illustrated by the above scenario, feature mod-
eling is of paramount importance for software prod-
uct configuration (or derivation), product-line knowl-
edge documentation, negotiation among several pro-
fessionals, product design optimization and so on. For
managing these tasks altogether, one of the challenges
in feature modeling is to come up with a formalism
having the appropriate degree of expressiveness. As
the current underlying semantics of FM is based on
propositional logic, several restrictions prevent its us-
age in many realistic contexts. Another important
point to notice is the tremendous importance of au-
tomated support analysis of FM. In our view, this is
a key element for a widespread adoption of feature
modeling.
In this position paper, we address these limita-
tions by proposing a couple of extensions that are
inspired from Constraint Programming (CP) (Rossi
et al., 2006). The CP paradigm has brought con-
straint expressiveness to a higher degree by gather-
ing notions from various domains, including Logic
Programming, Operational Research and Artificial In-
telligence. In CP, finite and continuous domains are
recognized as powerful computational domains, over-
coming limitations stemming from the usage of a
boolean domain. CP is also a convenient tool to ad-
dress complex mathematical and configuration prob-
lems, as a large body of efficient constraint solving
techniques is available. Using CP in the context of
product configuration (Klein, 1996) or feature mod-
eling is not a new idea (Benavides et al., 2005). It
has been successfully applied to solve difficult prod-
uct configuration problems (Gelle and Weigel, 1996)
and also to automatically analyse SPLs (Liang, 2012;
Marijan et al., 2013). However, as already pointed out
by others (Hubaux et al., 2012), CP is not yet fully ex-
ploited in the context of feature modeling. This paper
advocates the extension of FM notations to facilitate
design and automated analysis. In particular, the pa-
per makes the following contributions:
- Several relational extensions of FMs are introduced.
We propose 1) finite domain and continuous domain
variable encoding of features, 2) usage of N-ary and
global constraints, 3) universal quantification over a
feature to increase the expressive power of a FM.
These extensions confer a competitive advantage to
a FM for variability modeling in SPLs;
- Using CP to support the relational FM extensions
allows us to preserve the efficiency of automated FM
analyses. For each proposed extension, we carefully
discuss automated support and constraint solver us-
age. Note however that the paper does neither provide
any concrete syntax for the relational extensions nor
any specific recommendation for selecting constraint
solvers;
- Two next-generation applications of these relational
extensions are discussed, opening perspectives for a
wider adoption of FM.
The paper is organized as follows: Sec.2 recalls
the basic principle of a FM and its semantics. Sec.3
introduces and discusses several relational FM exten-
sions. Finally, Sec.4 presents two next-generation ap-
plications.
2 FEATURE MODELING
Feature Model (FM) is a convenient graphical no-
tation to represent variability in SPLs (Kang et al.,
1990) and highly-configurable software systems
(Czarnecki et al., 2005), (Eriksson M. and K., 2005).
It is used to capture: (i) configurable software pa-
rameters (a.k.a. features) and (ii) dependencies be-
tween the features. The underlying interpretation (or
semantics) of a FM is however based on propositional
logic (Batory, 2005): A Feature Model is a propo-
sitional formula over a set of features; A feature is
a boolean variable that represents a composition el-
ement or a configuration parameter; A product (or
configuration) is a total assignment of features from
a FM. A feature is present within a product or con-
figuration iff its corresponding variable equals to 1 or
True; A valid product is an assignment which satis-
fies the propositional formula of a FM; A constraint
is a relation between two or more features. We dis-
tinguish between two types of constraints: A hier-
archical constraint is a relation among a father fea-
ture and its children features based on the follow-
ing operators AND, OR, XOR, OPT, CARD. A cross-
tree constraint is a binary relation among a pair of
features based on the operators REQUIRES, MUTEX.
Fig.1 represents a FM for Video-Conference Soft-
ware (VCS) products, extracted from a real-world
case study (Marijan et al., 2013). The model spec-
ifies that VCS supports calls, which can be either
ICSOFT-EA2015-10thInternationalConferenceonSoftwareEngineeringandApplications
382
Figure 1: Excerpt of a feature model for a video conferenc-
ing software.
P2P or Multisite calls, i.e., either 3x1024x576 max,
3x720p30 max or 1080p30–720p60 max. Op-
tionally, VCS supports 720p60 or 1080p30 pre-
mium resolution, or both. Configurations with
3x720p30 max or 1080p30–720p60 max resolution
must have Premium resolution feature.
For the FM shown in Fig.1, the set of features
[VCS,Call, Multisite, 3x1024x576 max] is a valid
product, but [VCS,Call, Multisite, 3x720p30 max]
is invalid, because the constraint between
3x720p30 max and Premium resolution features
is not satisfied. Since its introduction in 1990 (Kang
et al., 1990), feature modeling has been adopted in
some industrial sectors, e.g., (Dordowsky and Hipp,
2009), and has been derived into several dialects
(Schobbens et al., 2007).
3 RELATIONAL FEATURE
MODELS
This section introduces several extensions to increase
expressiveness of FMs. Each subsection discusses the
Pros/Cons of a specific extension in terms of com-
plexity and/or degree of automation.
3.1 From Boolean to Finite Domains
In traditional FMs, a feature is associated with a two-
state variable: it can either be present or absent within
a product. This is an over-simplistic view of the re-
ality where features have various (but often discrete)
states. We propose that each feature is associated with
a finite set of possible values, called modes. These
modes can advantageously be encoded using a Fi-
nite Domain (FD) variable A, where A is associated
a domain of possible modes modes(A) = {d
1
, . . . , d
n
}
where d
i
0. Note that, in a product, a feature can
only be assigned to a single mode. For example, mode
d
1
of feature A is used in product P
1
, while mode d
2
of the same feature is used in product P
2
. Thus, cross-
tree constraints can be defined over mode values, e.g.,
A > 1 Requires B 1 meaning that any mode strictly
grater than 1 for A implies either mode 1 for B or
mode 0, interpreted as absence of B. This usage of
FD encoding of features is not really new and has
been reported in the literature, especially when au-
tomated analysis on FM is required (Benavides et al.,
2010). As a concrete example, the Multisite feature
of Fig.1 can be associated with a FD variable, having
mode value 1 equal to 3x1024x576 max, mode value
2 equal to 3x720p30 max, and mode value 3 equal
to 1080p30–720p60 max. Using this representation,
both cross-tree constraints can easily be encoded as
Multisite > 1 Requires Premium resolution = 1. One
could object that FD encoding is already possible in
current purely boolean FM, using a Xor node. How-
ever, using a Xor-node for encoding subtrees with
tens of leafs is not efficient and using a FD variable
can considerably simplify the semantical interpreta-
tion of FMs. Indeed, as the Xor operator is binary
in boolean logic, it is required for any pair of leafs.
Thus, the number of Xor grows quadratically with the
number of leafs in any boolean interpretation of FM.
On the contrary, using FD variables, a single domain
membership constraint is required in the semantical
interpretation, e.g., A Xor(A
1
, A
2
) Xor(A
1
, A
3
)
Xor(A
2
, A
3
) is encoded as A 1 . . . 3.
3.2 Featuring Global Constraints
Cross-tree constraints in FMs include binary con-
straints: (A Requires B) and (A Mutex B). How-
ever, several extensions have already been proposed
such as ternary relations or N-ary relations (Uzun-
caova et al., 2010; Martin Fagereng Johansen and
Fleurey, 2011). For example, in SPLOT (Mendonc¸a
et al., 2009), cross-tree constraints come as ternary
relations over booleans. There is no formal break-
through to switch from ternary to N-ary relations in
boolean algebra. It means that formal reasoning is in-
dependent from the arity of the initial relations. In
fact, this extension comes for free when using an
underlying SAT-solver or CP-solver to reason over
FMs. Nevertheless, we propose to go further by us-
ing non-fixed arity global constraints among finite do-
main variables. Since two decades, researchers of the
CP community have built a rich catalog of global con-
straints to express various and complex relations used
for different applications. The most recent version of
the catalog contains more than 350 global constraints
(Beldiceanu et al., 2007).
Additionally, most CP solvers are incremental,
meaning that adding a constraint provokes constraint
propagation, which is a process that pushes configu-
ration choices throughout the constraint system. If an
TowardsMoreRelationalFeatureModels
383
assignment is (partially) consistent, then other vari-
able domains can be shrunk, while if it is inconsis-
tent, a backtracking process removes it and undoes
all the deductions. Constraint propagation is partic-
ularly useful during interactive product configuration
as it enables early failure detection and backtracking.
When configuring a product, one can easily evaluate
the consequences of a configuration choice for other
features. For example, including features F
1
, F
2
in a
product where Sum ctr([F
1
, F
2
, F
3
], , 2) is enforced,
automatically assigns 0 for F
3
.
3.3 Adding Logical Quantifiers
FMs are interpreted as propositional logic formu-
las: features cannot be quantified. Extending FMs
to first-order logic formulas means that features can
be existentially and universally quantified. Basically,
this extension enables simple expression of complex
relations among feature modes. Feature universal
quantification is interesting to express invariants over
SPLs and has already been drafted in the Clafer lan-
guage (Antkiewicz et al., 2013). For example, ex-
pressing that for each mode value of feature A, there
exists a mode value of feature B that satisfies a spe-
cific property P can easily be formulated as: d
modes(A), t
d
modes(B), such that P holds. Sup-
port for automatic reasoning over first-order formulae
is crucial when enriching the semantics of FMs. Re-
cently, tools, called as QCSP-solvers, have been de-
veloped to support such reasoning in the context of
finite domain constraint solving (Gent et al., 2008). It
becomes possible to solve efficiently constraints such
as xy(x 6= y) = z(z < x) (z < y). For exam-
ple, QeCode is a QCSP-solver available online that
shows reasonable performances, provided that con-
straints stay simple. However, extending FM to high-
order logics, enabling quantification over operations
among the features, would compromise the efficiency
of automated analyses.
3.4 Continuous Domains and
Dependencies
Using continuous variables in product configuration is
well known (Xie et al., 2006). Even if discretization
of continuous variables is often possible (e.g., con-
sidering that a voltage takes a value in only N pos-
sibilities {v
1
, . . . , v
N
}), introducing continuous vari-
able increases the expressive power of a FM. Indeed,
very often, discrete values are not available at prod-
uct configuration time because they depend on other
components, not yet available. In addition, physical
variables in systems are known with tolerance ranges,
coming from the specifications of electronic compo-
nents, that cannot be handled accurately with dis-
cretized values. Finally, configuration variables may
only take values resulting from complex mathemat-
ical computations. As a consequence, these values
cannot be represented using pre-selected discrete val-
ues. For example, consider the relation y
2
x 0
and the value 0.1 for x. The domain of y can only
be represented as a range of possible real values, i.e.,
[0.01, 0.01]. Any discretization of this range would
inaccurately represent the relation. Most of the phys-
ical variables of a system are linked together with
continuous relations (e.g., Ohm law for electronic
components), but representing them with non-discrete
variables in FMs for SPL is questionable. One can ar-
gue that physical entities may not correspond to con-
figurable software parameters. We believe however
that introducing continuous variables for configuring
a product could open FMs to a wider range of appli-
cations. As a simple example, consider the design of
a cylindrical vessel defined by two continuous vari-
ables: height and radius. The volume of the ves-
sel could be maintained in a FM by the constraint
V = π × radius
2
× height. Even if height and radius
are sufficient to configure the vessel and could thus be
discretized, a final user may want to configure the ves-
sel through its volume instead of these two variables.
Usually, physical variables take their values in pre-
defined ranges, for which it is interesting to estimate
the extreme values (e.g., what is the maximal vessel
volume that can be computed). So, capturing the con-
tinuous relation between these variables, that are re-
flected in a FM by feature variables, is interesting for
configuration purposes. This proposition would be
meaningless without the support of operational con-
straint solvers over continuous domains. Fortunately,
solvers such as Interlog (Lhomme et al., 1998), IBM
Ilog-Labs CP-Optimizer or RealPaver (Granvilliers,
2003) are available for that purpose. Note also that re-
cent developments in constraint solving over floating-
point computations have led to the design of specific
solvers that tackle correctly rounding modes and ap-
proximations (Bagnara et al., 2013). It could be cru-
cial for some safety-critical software product lines to
capture accurately relations over floating-point com-
putations, especially if the variability models are used
to select software components in order to integrate a
complete product release.
4 NEXT-GENERATION
APPLICATIONS
Extending feature modeling is interesting iff the evi-
ICSOFT-EA2015-10thInternationalConferenceonSoftwareEngineeringandApplications
384
dences of its benefits can be shown in practice. For
instance, the scenario presented in the introduction is
realistic and corresponds to a situation addressed by
researchers of the Certus center. In this section, we
go a step further and present the application of rela-
tional feature models to some next-generation appli-
cation domains.
4.1 Context-aware Sensor Fusion
Raw data from sensors and user interaction come in
variable frequencies, from finite/continuous domains,
and have different domain types such as strings, re-
als, and integers. A fusion of the signals received at
an instant needs to be modelled and analyzed to accu-
rately define a context. For instance, in (Acher et al.,
2009), FMs are used to represent environmental con-
texts with features such as luminosity. A context con-
figuration is mapped to the configuration of a vision
system. The choice of RGB camera or infra-red cam-
era is based on detected luminosity, which is a vari-
able with a continuous domain. However, a FM is
severely limited by the boolean nature of feature vari-
ables, easily giving a rise to an exponentially growing
context FM. We believe that extending FMs with con-
tinuous domain variables could simplify the modeling
of sensor fusion applications.
4.2 Filtering in Big Data
The explosion of data from business processes, social
networks, and scientific instruments presents both the
boon of data and the bane of processing it. Often big
data contains numerous redundancies or even faulty
data due to measurement errors. Therefore, there is a
necessity to select data records in a controlled man-
ner. Relational FMs can be used to model a filter
for a large number of multivariate data records in a
database. Data records that are a valid configuration
of a relational FM can be selected for further process-
ing. A relational FM can be seen as filter for selecting
correct and representative data records in Big Data. In
(Sen and Gotlieb, 2013), FMs are used to model vari-
ation in data-intensive systems: 160 currencies and
900 different types of taxes are modeled as features.
There are thousands of pairwise interactions between
these two sets of features. Representing such a large
variation of a data field as a set of boolean features
in a graphical FM is highly unreadable. Therefore, a
paradigm shift in the standard for feature modelling is
needed.
5 CONCLUSIONS
Relational FMs are promising for opening new appli-
cations and research directions. For us, CP can drive
such extensions through FD and continuous domains
extensions, global constraints, and logical quantifica-
tion, because they preserve automated analyses capa-
bilities over FMs.
ACKNOWLEDGEMENTS
This work is partially supported by the Research
Council of Norway (RCN) through the Research-
based Innovation Center (SFI Programme) Certus.
REFERENCES
Acher, M., Collet, P., Fleurey, F., Lahire, P., Moisan, S., and
Rigault, J.-P. (2009). Modeling Context and Dynamic
Adaptations with Feature Models. In Proceedings
of the 4th International Workshop Models@run.time,
page 10, United States.
Antkiewicz, M., Bak, K., Murashkin, A., Olaechea, R.,
Liang, J., and Czarnecki, K. (2013). Clafer tools for
product line engineering. In Software Product Line
Conference, Tokyo, Japan.
Bagnara, R., Carlier, M., Gori, R., and Gotlieb, A.
(2013). Symbolic path-oriented test data generation
for floating-point programs. In Proc. of the 6th IEEE
Int. Conf. on Software Testing, Verification and Vali-
dation (ICST’13), Luxembourg.
Batory, D. (2005). Feature models, grammars, and proposi-
tional formula. Software Product Lines, Lecture Notes
in Computer Science, 3714(3):7–20.
Beldiceanu, N., Carlsson, M., Demassey, S., and Petit, T.
(2007). Global constraint catalogue: Past, present and
future. Constraints, 12:21–62.
Benavides, D., Segura, S., and Ruiz-Cort
´
es, A. (2010). Au-
tomated analysis of feature models: A detailed litera-
ture review. Information Systems, (35):615–636.
Benavides, D., Trinidad, P., and Ruiz-Cort
´
es, A. (2005).
Using constraint programming to reason on feature
models. In Seventeenth International Conference on
Software Engineering and Knowledge Engineering
(SEKE’05), Jul. 14-16, 2005, Taipei, Taiwan, Repub-
lic of China, pages 677–682.
Birk, A., Heller, G., John, I., Schmid, K., von der Massen,
T., and Muller, K. (2003). Product line engineering,
the state of the practice. Software, IEEE, 20(6):52–
60.
Czarnecki, K., Helsen, S., and Eisenecker, U. (2005). For-
malizing cardinality-based feature models and their
specialization. Software Process Improvement and
Practice, 10(1):7–29.
TowardsMoreRelationalFeatureModels
385
Dordowsky, F. and Hipp, W. (2009). Adopting software
product line principles to manage software variants in
a complex avionics system. In Proc. of the 13th Int.
Soft. Product Line Conf., SPLC ’09, pages 265–274.
Eriksson M., B. R. J. and K., B. (2005). The pluss ap-
proach domain modeling with features, use cases and
use case realizations. In Software Product Line Con-
ference (SPLC’05), pages 33–44.
Gelle, E. and Weigel, R. (1996). Interactive configura-
tion based on incremental constraint satisfaction. In
Proc. of Practical Application of Constraint Technol-
ogy (PACT’96).
Gent, I., Nightingale, P., Rowley, A., and Stergiou, K.
(2008). Solving quantified constraint satisfaction
problems. Artificial Intelligence, 172:738–771.
Granvilliers, L. (2003). RealPaver User’s Manual : Solv-
ing Nonlinear Constraints by Interval Computations.
University of Nantes, FR. Release 0.3.
Hubaux, A., Jannach, D., Drescher, C., Murta, L., Mn-
nist, T., Czarnecki, K., Heymans, P., Nguyen, T., and
Zanker, M. (2012). Unifying software and product
configuration: A research roadmap. In Proceedings of
Configuration Workshop at ECAI 2012, Montpellier,
France.
Kang, K., Cohen, S., Hess, J., Novak, W., and Peterson, S.
(1990). Feature-Oriented Domain Analysis (FODA)
Feasibility Study. Technical Report CMU/SEI-90-
TR-21, Software Engineering Institute.
Klein, R. (1996). A logic-based description of configu-
ration: The constructive problem solving approach.
pages 1–10. AAAI Press, Menlo Park, CA.
Lhomme, O., Gotlieb, A., and Rueher, M. (1998). Dynamic
optimization of interval narrowing algorithms. Jour-
nal of Logic Programming, 37:164–182.
Liang, J. (2012). Solving clafer models with choco.
(GSDLab-TR 2012-12-30).
Marijan, D., Gotlieb, A., Hervieu, A., and Sen, S. (2013).
Practical pairwise testing for software product lines.
In Software Product Line Conference (SPLC’13), In-
dustrial track, Tokyo, Japan.
Martin Fagereng Johansen, O. H. and Fleurey, F. (2011).
Properties of realistic feature models make combina-
torial testing of product lines feasible. In Conference
on Model Driven Engineering Languages and Systems
(MODELS’11), pages 638–652.
Mendonc¸a, M., Branco, M., and Cowan, D. (2009).
S.p.l.o.t.: software product lines online tools. In OOP-
SLA Companion, pages 761–762.
Pohl, K., B
¨
ockle, G., and Linden, F. J. v. d. (2005). Soft-
ware Product Line Engineering: Foundations, Princi-
ples and Techniques. Springer-Verlag New York, Inc.,
Secaucus, NJ, USA.
Rossi, F., Beek, P. v., and Walsh, T. (2006). Handbook
of Constraint Programming (Foundations of Artificial
Intelligence). Elsevier Science Inc., New York, NY,
USA.
Schobbens, P., Heymans, P., Trigaux, J., and Bontemps, Y.
(2007). Generic semantics of feature diagrams. Com-
puter Networks, 51(2):456–479.
Sen, S. and Gotlieb, A. (2013). Testing a Data-intensive
System with Generated Data Interactions: The Nor-
wegian Customs and Excise Case Study. In 25th In-
ternational Conference on Advanced Information Sys-
tems Engineering (CAISE’13), Valencia, Espagne.
Uzuncaova, E., Khurshid, S., and Batory, D. (2010). In-
cremental test generation for software product lines.
IEEE Trans. Softw. Eng., 36:309–322.
Xie, H., Henderson, P., and Kernahan, M. (2006). A
constraint-based product configurator for mass cus-
tomisation. IJCAT Journal, 26(1/2):91–98.
ICSOFT-EA2015-10thInternationalConferenceonSoftwareEngineeringandApplications
386