Consistency-based Merging of Variability Models
Mathias Uta, Alexander Felfernig, Gottfried Schenner, Johannes Spoecklberger
aa r X i v : . [ c s . A I] F e b Consistency-based Merging of Variability Models
Mathias Uta and Alexander Felfernig and Gottfried Schenner and Johannes Sp ¨ocklberger Abstract.
Globally operating enterprises selling large and complexproducts and services often have to deal with situations where vari-ability models are locally developed to take into account the require-ments of local markets. For example, cars sold on the U.S. marketare represented by variability models in some or many aspects differ-ent from European ones. In order to support global variability man-agement processes, variability models and the underlying knowledgebases often need to be integrated. This is a challenging task since anintegrated knowledge base should not produce results which are dif-ferent from those produced by the individual knowledge bases. Inthis paper, we introduce an approach to variability model integrationthat is based on the concepts of contextual modeling and conflictdetection. We present the underlying concepts and the results of acorresponding performance analysis.
Configuration [7, 14] is one of the most successful applications of Ar-tificial Intelligence technologies applied in domains such as telecom-munication switches, financial services, furniture, and software com-ponents. In many cases, configuration knowledge bases are repre-sented in terms of variability models such as feature models that pro-vide an intuitive way of representing variability properties of com-plex systems [10, 4]. Starting with rule-based approaches, formaliza-tions of variability models have been transformed into model-basedknowledge representations which are more applicable for the han-dling of large and complex knowledge bases, for example, in termsof knowledge base maintainability and expressivity of complex con-straints [2, 7]. Examples of model-based knowledge representationsare constraint-based representations [15], description logic and an-swer set programming (ASP) [7]. Besides variability reasoning forsingle users, latest research also shows how to deal with scenarioswhere groups of users are completing a configuration task [6]. In thispaper, we focus on single user scenarios where variability models arerepresented as a constraint satisfaction problem (CSP) [3, 15].There exist a couple of approaches dealing with the issue of in-tegrating knowledge bases. First, knowledge base alignment is theprocess of identifying relationships between concepts in differentknowledge bases, for example, classes describe the same conceptbut have different class names (and/or attribute names). Approachessupporting the alignment of knowledge bases are relevant in scenar-ios where numerous and large knowledge bases have to be integrated(see, for example, [9]). Ardissono et al. [1] introduce an approachto distributed configuration where individual knowledge bases are Siemens Erlangen, Germany, email: [email protected] Graz University of Technology, Austria, email: [email protected], [email protected] Siemens AG, Austria, email: [email protected] integrated into a distributed configuration process in which individ-ual configurators are responsible for configuring individual parts of acomplex product or service. The underlying assumption is that indi-vidual knowledge bases are consistent and that there are no (or onlya low number of) dependencies between the given knowledge bases.The merging of knowledge bases is related to the task of exploitingvarious merging operators to different belief sets [5, 11]. For exam-ple, Delgrande and Schaub [5] introduce a consistency-based merg-ing approach where the result of a merging process is a maximumconsistent set of logical formulas representing the union of the in-dividual knowledge bases. In the line of existing consistency-basedanalysis approaches, the resulting knowledge bases represent a logi-cal union of the original knowledge bases that omits minimal sets oflogical sentences inducing an inconsistency [12].
Contextual model-ing [8] is related to the task of decentralizing variability knowledgerelated development and maintenance tasks.Approaches to merging feature models represented on a graph-ical level on the basis of merging rules have been introduced, forexample, in [16, 13]. In this context, feature models including spe-cific constraint types such as requires and excludes , are merged in asemantics-preserving fashion. Compared to our approach, the merg-ing of variability models introduced in [16, 13] is restricted to spe-cific constraint types and does not take into account redundancy.Our approach provides a generalization to existing approaches es-pecially due to the generalization to arbitrary constraint types andredundancy-free knowledge bases as a result of the merge operation.We propose an approach to the merging of variability models (repre-sented as constraint satisfaction problems) which guarantees seman-tics preservation, i.e., the union of the solutions determined by indi-vidual constraint solvers (configurators) is equivalent to the solutionspace of the integrated variability model (knowledge base). In thiscontext, we assume that the knowledge bases to be integrated (1) areconsistent and (2) use the same variable names for representing indi-vidual item properties (knowledge base alignment issues are beyondthe scope of this paper).The contributions of this paper are the following. (1) We providea short analysis of existing approaches to knowledge base integra-tion and point out specific properties of variability model integrationscenarios that require alternative approaches. (2) We introduce a newapproach to variability knowledge integration which is based on theconcepts of contextualization and conflict detection. (3) We show theapplicability of a our approach on the basis of a performance analy-sis.The remainder of this paper is organized as follows. First, we in-troduce a working example from the automotive domain (see Section2). On the basis of this example, we introduce our approach to vari-ability model integration (merging) in Section 3. In Section 4, wepresent a performance evaluation. Section 5 includes a discussion ofhreats to validity of the presented merging approach. The paper isconcluded in Section 6 with a discussion of issues for future work.
In the following, we introduce a working example which will serveas a basis for the discussion of our approach to knowledge integration(Section 3). Let us assume the existence of two different variabilitymodels. For the purpose of our example, we introduce two car con-figuration knowledge bases represented as a constraint satisfactionproblem. One car configuration knowledge base is assumed to bedefined for the U.S. market and one for the German market. For sim-plicity, we assume that (1) both knowledge bases are represented asa constraint satisfaction problem (CSP) [15] and (2) that both knowl-edge bases operate on the same set of variables and correspondingdomain definitions. Our two knowledge bases consisting of variabledefinitions and corresponding constraints { CKB us , CKB ger } arethe following. • CKB us : { country(US), type(combi, limo, city, suv), color(white,black), engine(1l, 1.5l, 2l), couplingdev(yes,no), fuel(electro,diesel, gas, hybrid), service(15k, 20k, 25k), c us : fuel = hybrid , c us : fuel = electro → coupling − dev = no , c us : fuel = diesel → color = black }• CKB ger : { country(GER), type(combi, limo, city, suv),color(white, black), engine(1l, 1.5l, 2l), couplingdev(yes,no),fuel(electro, diesel, gas, hybrid), service(15k, 20k, 25k), c ger : fuel = gas , c ger : fuel = electro → couplingdev = no , c ger : fuel = diesel → type = city } In these knowledge bases, we denote the variable country as con-textual variable since it is used to specify the country a configurationbelongs to but is not directly associated with a specific component ofthe car. Table 1 shows a summary of the solution spaces (in termsof the number of potential solutions) that are associated with thecountry-specific knowledge bases
CKB us and CKB ger . For sim-plicity, we kept the number of constraints the same in both knowl-edge bases, however, the integration concepts introduced in Section3 are also applicable to knowledge bases with differing numbers ofconstraints. [!ht]
Table 1.
Solution spaces of individual knowledge bases.Knowledge base
CKB us CKB ger
In this section, we introduce our approach to merge variability mod-els represented as constraint satisfaction problems (CSPs) [15]. Ourapproach is based on the assumption that the constraints of the twooriginal knowledge bases
CKB and CKB are contextualized,i.e., each constraint of knowledge base CKB gets contextualizedon the basis of predefined contextualization variables. For example:assuming a context variable country (US,GER), each constraint c [ i ] us of the US knowledge base is contextualized with (transformed into) We are aware of the fact that this assumption does not hold for real-worldscenarios in general. However, we consider tasks of concept matching asan upstream task we do not take into account when integrating knowledgebases on a formal level. country = US → ( c [ i ] us ) . Constraint c us : fuel = hybrid would be translated into c us ′ : country = US → ( fuel = hybrid ) . CKB us and CKB ger have been transformed into theircontextualized variants
CKB ′ us and CKB ′ ger where CKB ′ us ∪ CKB ′ ger = CKB ′ . • CKB ′ us : { country(US), type(combi, limo, city, suv), color(white,black), engine(1l, 1.5l, 2l), couplingdev(yes,no), fuel(electro,diesel, gas, hybrid), service(15k, 20k, 25k), c ′ us : country = US → ( fuel = hybrid ), c ′ us : country = US → ( fuel = electro → couplingdev = no ), c us : country = US → ( fuel = diesel → color = black ) }• CKB ′ ger : { country(GER), type(combi, limo, city, suv),color(white, black), engine(1l, 1.5l, 2l), couplingdev(yes,no),fuel(electro, diesel, gas, hybrid), service(15k, 20k, 25k), c ′ ger : country = GER → ( fuel = gas ), c ′ ger : country = GER → ( fuel = electro → couplingdev = no ), c ′ ger : country = GER → ( fuel = diesel → type = city ) } The solution spaces of the contextualized knowledge bases
CKB ′ us and CKB ′ ger are shown in Table 2. They have the samesolution spaces as CKB us and CKB ger . [!ht] Table 2.
Solution spaces when merging knowledge bases.Knowledge base
CKB ′ us CKB ′ ger CKB ′ = CKB ′ us ∪ CKB ′ ger CKB ′ us ∩ CKB ′ ger On the basis of such a contextualization, we are able to preservethe consistency and semantics of the two original knowledge basesin the sense that (1) the solution space (
CKB ) is equivalent to thesolution space ( CKB ′ ), (2) the solution space ( CKB ) is equivalentto the solution space ( CKB ′ ), and (3) the solution space ( CKB ) ∪ solution space ( CKB ) is equivalent to the solution space ( CKB ′ ∪ CKB ′ = CKB ′ ).Based on this representation, we are able to (1) get rid of contex-tualizations (see line of Algorithm 1) that are not needed in theintegrated version of the two original configuration knowledge basesand (2) delete redundant constraints (see line 15 of Algorithm 1). InLine it is checked whether a contextualization is needed for theconstraint c ( c is the decontextualized version of c ′ ). If the negationof c is consistent with the union of the contextualized knowledgebases, solutions exist that support ¬ c . Consequently, c must remaincontextualized. Otherwise, the contextualization is not needed and c is added to the resulting knowledge base – with this, it replaces c ′ ,i.e., the corresponding contextualized constraint.Each constraint in the resulting knowledge base CKB (the de-contextualized knowledge base) is thereafter checked with regard toredundancy (see Line ). A constraint c is regarded as redundant if CKB − { c } is inconsistent with ¬ c . In this case, c does not reducethe search space and thus can be deleted from CKB – it is redundantwith regard to
CKB .The knowledge base
CKB resulting from applying Algorithm 1to the individual knowledge bases
CKB ′ us and CKB ′ ger looks likeas follows. In CKB , constraint c ′ us is represented in a decontextu-alized fashion since the context information is not needed. Further-more, constraint c ′ ger has been deleted since it is redundant. lgorithm 1 CKB-M
ERGE ( CKB ′ , CKB ′ ) : CKB { CKB ′ , ′ : two contextualized and consistent configurationknowledge bases } { c ′ : a contextualized version of constraint c } { CKB : knowledge base resulting from merge operation } CKB ← ∅ ;5:
CKB ′ ← CKB ′ ∪ CKB ′ ;6: for all c ′ ∈ CKB ′ do if inconsistent ( {¬ c } ∪ CKB ′ ∪ CKB ) then CKB ← CKB ∪ { c } ; else CKB ← CKB ∪ { c ′ } ; end if CKB ′ ← CKB ′ − { c ′ } ; end for for all c ∈ CKB do if inconsistent (( CKB − { c } ) ∪ {¬ c } ) then CKB ← CKB − { c } ; end if end for return CKB ; • CKB : { country(US, GER), type(combi, limo, city, suv),color(white, black), engine(1l, 1.5l, 2l), couplingdev(yes,no),fuel(electro, diesel, gas, hybrid), service(15k, 20k, 25k), c ′ us : country = US → ( fuel = hybrid ), c us : fuel = electro → couplingdev = no , c ′ us : country = US → ( fuel = diesel → color = black ), c ′ ger : country = GER → ( fuel = gas ), c ′ ger : country = GER → ( fuel = diesel → type = city ) } In this section, we discuss the results of an initial analysis we haveconducted to evaluate CKB-M
ERGE (Algorithm 1). For this anal-ysis, we applied 10 different synthesized variability models
CKB ′ ( CKB ′ = CKB ′ ∪ CKB ′ ) represented as constraint satisfactionproblems [15]) that differ individually in terms of the number of con-straints ( CKB ′ were ordered ran-domly.The number of consistency checks needed for decontextualiza-tion is linear in terms of the number of constraints in CKB ′ . Aperformance evaluation of CKB-M ERGE with different knowledgebase sizes and degrees of contextualized constraints in
CKB is de-picted in Table 3. In CKB-M
ERGE , the runtime (measured in termsof milliseconds needed by the constraint solver to find a solution) in-creases with the number of constraints in CKB ′ and decreases withthe number of contextualized constraints in CKB . The increase inefficiency can be explained by the fact that a higher degree of contex-tualization includes more situations where the inconsistency check inLine 7 (Algorithm 1) terminates earlier (a solution has been found)compared to situations where no solution could be found. In addi-tion, Table 4 indicates that the performance of solution search does For the purposes of our evaluation we generated variability models rep-resented as constraint satisfaction problems formulated using the C
HOCO not differ depending on the degree of contextualization in the result-ing knowledge base
CKB .Consequently, integrating individual variability models can trig-ger the following improvements. (1) De-contextualization in
CKB can lead to less cognitive efforts when adapting / extending knowl-edge bases (due to a potentially lower number of constraints and alower degree of contextualization). (2) Reducing the overall numberof constraints in
CKB can also improve runtime performance of theresulting integrated knowledge base.
Table 3.
Avg. runtime ( msec ) of CKB-M
ERGE measured with different knowledge base sizes ( CKB ′ ) and shares of contextualized constraints in CKB (10-50% contextualization).
CKB ′ Table 4.
Avg. runtime ( msec ) of the merged configuration knowledge bases(CKB) measured with different knowledge base sizes ( CKB ′ ) and shares ofcontextualized constraints in CKB (10-50% contextualization).
CKB ′ The main threat to (external) validity is the overall representativenessof the knowledge bases used for evaluating the performance of CKB-M
ERGE . The current evaluation is based on a set of synthesizedknowledge bases which do not directly reflect real-world variabil-ity models. We want to point out that the major focus of our work isto provide an algorithmic solution that allows semantics-preservingknowledge integration which is a new approach and regarded as themajor contribution of our work. The application of CKB-M
ERGE to real-world variability models, i.e., not synthesized ones, is in thefocus of our future work.
In this paper, we have introduced an approach to the consistency-based merging of variability models represented as constraint satis-faction problems. The approach helps to build semantics-preservingknowledge bases in the sense that the solution space of the result-ing knowledge base (result of the merging process) corresponds tohe union of the solution spaces of the original knowledge bases. Be-sides the preservation of the original semantics, our approach alsohelps to make the resulting knowledge base compact in the sense ofdeleting redundant constraints and not needed contextual informa-tion. The performance of our approach is shown on the basis of afirst performance analysis with synthesized configuration knowledgebases. Future work will include the evaluation of our concepts withmore complex knowledge bases and the development of alternativemerge algorithms with the goal to further improve runtime perfor-mance.
REFERENCES [1] L. Ardissono, A. Felfernig, G. Friedrich, A. Goy, D. Jannach,G. Petrone, R. Schaefer, and M. Zanker, ‘A framework for the devel-opment of personalized, distributed web-based configuration systems’,
AI Magazine , (3), 93–110, (2003).[2] D. Benavides, S. Segura, and A. Ruiz-Cortes, ‘Automated analysis offeature models 20 years later: A literature review’, Information Systems , (6), 615–636, (2010).[3] D. Benavides, P. Trinidad, and A. Ruiz-Cortes, ‘Using constraintprogramming to reason on feature models’, in , pp. 677–682, Taipei, Taiwan, (2005).[4] K. Czarnecki, S. Helsen, and U. Eisenecker, ‘Formalizing cardinality-based feature models and their specialization’, SoftwareProcess: Im-provement and Practice , (1), 7–29, (2005).[5] J. Delgrande and T. Schaub, ‘A consistency-based framework for merg-ing knowledge bases’, Journal of Applied Logic , (3), 459–477, (2007).[6] A. Felfernig, L. Boratto, M. Stettinger, and M. Tkalcic, Group Recom-mender Systems – An Introduction , Springer, 2018.[7] A. Felfernig, L. Hotz, C. Bagley, and J. Tiihonen,
Knowledge-basedConfiguration: From Research to Business Cases , Morgan KaufmannPublishers, 1st edn., 2014.[8] A. Felfernig, D. Jannach, and M. Zanker, ‘Contextual diagrams asstructuring mechanisms for designing configuration knowledge basesin uml’, in , volume 1939 of
Lecture Notes in Computer Sci-ence , pp. 240–254, York, UK, (2000). Springer.[9] L. Galarraga, N. Preda, and F. Suchanek, ‘Mining rules to align knowl-edge bases’, in
Proceedings of the 2013 Workshop on AutomatedKnowledge Base Construction , pp. 43–48, San Francisco, CA, (2013).[10] K. Kang, S. Cohen, J. Hess, W. Novak, and S. Peterson, ‘Feature-oriented domain analysis feasibility study (foda)’,
Technical Report,CMU/SEI-90-TR-021 , (1990).[11] P. Liberatore and M. Schaerf, ‘Arbitraton (or how to merge knowl-edge bases)’,
IEEE Transactions on Knowledge and Data Engineering , (1), 76–90, (1998).[12] R. Reiter, ‘A theory of diagnosis from first principles’, AI Journal , (1), 57–95, (1987).[13] S. Segura, D. Benavides, A. Ruiz-Cortes, and P. Trinidad, ‘Automatedmerging of feature models using graph transformations’, in Genera-tive and Transformational Techniques in Software Engineering , num-ber 5235 in Springer Lecture Notes in Computer Science, pp. 489–505,(2007).[14] M. Stumptner, ‘An overview of knowledge-based configuration’,
AICommunications , (2), 111–125, (1997).[15] E. Tsang, Foundations of Constraint Satisfaction , Academic Press,London, 1993.[16] P. van den Broek, I. Galvao, and J. Noppen, ‘Merging feature models’,in15th International Software Product Line Conference