formalizing configuration knowledge using rules with choices

10

Upload: independent

Post on 02-Dec-2023

0 views

Category:

Documents


0 download

TRANSCRIPT

Formalizing Con�guration Knowledge Using Rules with ChoicesTimo SoininenHelsinki University of TechnologyTAI Research Center andLab. of Information Processing ScienceP.O.Box 9555, FIN-02015 HUT, [email protected] Ilkka Niemel�aHelsinki University of TechnologyDept. of Computer Science and Eng.Digital Systems LaboratoryP.O.Box 1100, FIN-02015 HUT, [email protected] paper studies the formal underpinningsof the product con�guration problem. Arule-based language is proposed for express-ing typical forms of knowledge interactionsin con�guration models, i.e. choices, depen-dencies between choices, optionality and de-faults. The language is equipped with adeclarative semantics that provides formalde�nitions for the main concepts in productcon�guration, i.e., con�guration model, cus-tomer requirements, satis�ability of require-ments and validity of a con�guration. A keyfeature is that the semantics ensures thatvalid con�gurations are tightly grounded inthe con�guration rules by employing Hornclause derivability but without resorting toan explicit minimality condition on con�gu-rations. This type of groundedness has notbeen considered in previous work on prod-uct con�guration. Avoiding minimality con-ditions has a favorable e�ect on the com-plexity of the con�guration tasks. For exam-ple, the validity of a con�guration as well assatis�ability of requirements can be decidedin polynomial time and also other computa-tional task remain in NP. The semantics ofthe rule-based language is shown to be closelyrelated to the stable model semantics of nor-mal logic programs and the possible model se-mantics of disjunctive programs. It is arguedthat from a knowledge representation point ofview the rule-based language is more attrac-tive for representing con�guration knowledgethan propositional logic or constraints.

1 1IntroductionProduct con�guration has been a fruitful topic of re-search in arti�cial intelligence for the past two decades(see, e.g. [McD82, MF89, CGS+89, HJ91, Kle96]). Inthe last �ve years product con�guration has also be-come a commercially successful and important appli-cation of arti�cial intelligence techniques. Knowledge-based systems (KBS) employing techniques such asconstraint satisfaction [Tsa93] have been successfullyapplied to product con�guration. The reason forthe success of KBSs in this area is that the rel-evant knowledge is usually well-de�ned and com-plete [Kle96]. However, there is no formal modelof product con�guration that covers all the aspectsof the problem. Most of the work in the �eld hasbeen based on informal approaches to knowledge rep-resentation and reasoning with few notable exceptions(e.g. [MF90, HS93, Kle96]). This makes it di�cult tocompare the di�erent approaches, analyze the compu-tational complexity of the related decision problemsand to develop e�cient implementation techniques.In this paper we present a formal model of typicalinteractions in con�guration knowledge. For formal-izing the interactions, techniques developed in non-monotonic reasoning research turn out to be rele-vant. We develop a rule language for representing thecon�guration knowledge and propose a semantics forit. This formalization di�ers from most research onproduct con�guration in that a con�guration must be1LIMITED DISTRIBUTION NOTICE This report hasbeen submitted for publication outside Helsinki Universityof Technology and will probably be copyrighted if acceptedfor publication. It has been issued in the Manuscripts se-ries for early dissemination of its contents and will be dis-tributed outside Helsinki University of Technology priorto publication only for peer review and scienti�c exchangeof information. After publication, only reprints or legallyobtained copies (e.g., after payment of royalties) will bedistributed.

grounded, i.e. everything in a con�guration must havea justi�cation. This could be achieved by requiringthat a con�guration is minimal. However, for practi-cally relevant product con�guration problems the basicdecision problem of deciding if a con�guration is validshould be tractable. Minimization-based approachesoften lead to higher complexity. Instead, we applyderivability from a set of Horn clauses as a weakerform of groundedness. We analyze the complexity ofmain decisions problems for the language and showthat tractability of the basic decision problem is pre-served. The language is argued to be more attractivethan propositional logic or constraints for representingcon�guration knowledge.In Section 2 we de�ne the con�guration problem anddiscuss typical knowledge interactions. We de�ne arule language for representing the knowledge and anon-monotonic semantics for it in Section 3 and giveseveral examples. In Section 4 we discuss the relationsof the proposed semantics to other non-monotonic se-mantics. In Section 5 the computational complexityof the main decision problems for the language is dis-cussed and expressiveness of the language is comparedto that of propositional logic. We compare our formal-ization with previous work on product con�guration inSection 6. In Section 7 we present conclusions and dis-cuss future work in this area.2 Product Con�guration DomainProduct con�guration is roughly de�ned as the prob-lem of producing a speci�cation of a product individualas a collection of prede�ned components. The inputs ofthe problem are a con�guration model, which describesthe components that can be included in the con�gu-ration and the rules on how they can be combined toform a working product, and customer requirementsthat specify some properties that the product individ-ual should have. The output is a con�guration, anaccurate enough description of a product individual tobe manufactured. The con�guration must satisfy thecustomer requirements and be valid in the sense thatit does not break any of the rules in the con�gurationmodel and it consists only of the components groundedin the con�guration model.This de�nition of product con�guration does not ade-quately capture all aspects of con�guration problems.Missing features include representing and reasoningabout attributes, structure and connections of com-ponents, resource production and use by components[MF89, CGS+89, HJ91] and optimality of a con�gura-tion. Our de�nition is a simpli�cation for the purposeof an abstract level analysis. It is intended as the foun-

dation on which further aspects of product con�gura-tion can be de�ned. Correspondingly, we use the termelement to mean any relevant piece of information ona con�guration. An element can, for example, be acomponent or it may represent other aspects.A product con�gurator is a KBS that is capable ofrepresenting the knowledge included in con�gurationmodels, requirements and con�gurations. In addition,it is capable of (i) checking whether a con�guration isvalid with respect to the con�guration model and sat-is�es a set of requirements and/or (ii) generating oneor all valid con�guration(s) for a con�guration modeland a set of requirements.As an example of a con�gurable product, consider aPC. The components that occur in the con�gurationmodel of a PC include di�erent types of display units,hard disks, CD-ROM drives, oppy drives, extensioncards and so on. These have certain rules on how theycan be combined with each other to form a workingproduct. For example, in a typical con�guration modela PC would be de�ned to have a mass-storage whichmust be chosen from a set of alternatives, e.g. an IDE-hard-disk, SCSI-hard-disk and a oppy drive. A com-puter would also need a keyboard, which could haveeither a Finnish or United Kingdoms layout. Having aSCSI-hard disk in the con�guration of a PC would typ-ically require that an additional SCSI-controller wouldbe included in the con�guration as well. In addition, aPC may optionally have a CD-ROM drive. A con�g-uration model for a PC might also de�ne that unlessotherwise speci�ed, an IDE-hard-disk will be the de-fault choice for mass-storage.The fundamental form of knowledge in a con�gura-tion model is that of a choice. There are basically twotypes of choices. Either at least one or exactly one ofalternative elements must be chosen. Whether a choicemust be made may depend on some set of elements be-ing in the con�guration. Other forms of con�gurationknowledge include the following:� An element is optional. Optional elements can bechosen into a con�guration or they can be left out.� A set of elements in the con�guration requiressome set of elements to be in the con�gurationas well [TSMS96, Kle96].� A set of elements are incompatible with eachother [TSMS96, Kle96].� An element is a default. It is in the con�gurationunless something else has been speci�ed.

The last three types of knowledge de�ne how elementsresulting from choices can be combined.In the following section we introduce a language forrepresenting con�guration knowledge. For simplicity,we have kept the number of primitives in the languagelow. However, it has been widely recognized in con�g-uration research that understandability and maintain-ability are key factors in the success of using a prod-uct con�gurator. In a strictly minimal language someknowledge would have to be encoded through ratherarti�cial constructions that are di�cult to understandand maintain. In the next section we give several ex-amples on how other relevant constructs can be seenas short-hand notation.3 Con�guration Rule LanguageThe con�guration rule language CRL introduced inthis section captures typical knowledge interactions inthe con�guration domain at an abstract level. Theidea is to focus on the interactions of elements and noton the primitives of a particular con�guration knowl-edge modeling language.The basic construction blocks of the language areprimitive propositional atoms, which are combinedthrough a set of connectives into rules. We assumefor simplicity that primitive propositional atoms canbe used to represent elements. We de�ne a con�gu-ration model as a set of CRL rules and customer re-quirements as another set of rules. A con�guration isde�ned as a set of atoms.The syntax of CRL is de�ned as follows. The alpha-bet of CRL consists of the connectives \,", \ ", \j",\not", parentheses and atomic propositions. The con-nectives are read as \and", \requires", \or" and \not",respectively. The rules in CRL are of the forma1 j � � � j al b1; : : : ; bm; not(c1); : : : ; not(cn)where a1,. . . ,al, b1,. . . ,bm and c1,. . . ,cn are atoms, l �0, m � 0, n � 0. For convenience, we refer to thesubset of a set of rules R with exactly one atom in thehead as requires-rules, Rr, rules with more than oneatom in the head as choice-rules, Rc, and rules withno atoms in the head as incompatibility-rules, Ri. Inthe de�nitions we treat requires-rules as a special caseof choice-rules with only one alternative in the head.Example 1 A very simple con�guration model RPCof the PC-example above (without the optional CD-ROM and default mass-storage) could consist of the

following rules:computer IDEdisk j SCSIdisk j floppydrive computerF innishlayoutKB j UKlayoutKB computer FinnishlayoutKB;UKlayoutKBSCSIcontroller SCSIdiskNext we de�ne when a con�guration satis�es a set ofrules and is valid with respect to a set of rules. We saythat a con�guration satis�es customer requirements ifit satis�es the corresponding set of rules.De�nition 3.1 A con�guration C satis�es a set ofrules R in CRL, denoted by C j= R, i� the follow-ing two conditions hold:(i) If a1 j � � � j al b1; : : : ; bm; not(c1); : : : ; not(cn) 2Rr [ Rc, fb1; : : : ; bmg � C, and fc1; : : : cng \ C = ;,then there exists an i such that 1 � i � l and ai 2 C.(ii) If b1; : : : ; bm; not(c1); : : : ; not(cn) 2 Ri, then atleast one of the following is true: there exists an i suchthat 1 � i � m and bi 62 C, or, fc1; : : : ; cng \ C 6= ;.In order to de�ne the validity of a con�guration, wede�ne an operator �C(R) that is a transformation ofa set of rules R in CRL.De�nition 3.2 Given a con�guration C and a set ofrules R in CRL, we denote by �C(R) the set of rulesfai b1; : : : ; bm :a1 j � � � j al b1; : : : ; bm; not(c1); : : : ; not(cn) 2 R;ai 2 C; 1 � i � l; fc1; : : : cng \ C = ;gThe result of the transformation is a set of Hornclauses if we interpret the symbols \ \ and \," as clas-sical implication and conjunction, respectively. Un-der this interpretation the reduct has a unique leastmodel.We denote the least model of a set R of Hornclauses by MM(R). Notice that the least model co-incides with the set of atoms logically entailed by theclauses and also with the set of atoms derivable byinterpreting the clauses as inference rules.The intuition behind the transformation is that, givena choice rule, if any of the alternatives in the head ofthe rule are chosen, then the reduct of the transforma-tion includes a rule that can justify the choice (if thebody of the rule can be justi�ed). If some alternativeis not chosen, then there is no need for the choice tobe justi�ed and consequently no corresponding rulesare included. The default negation \not(�)" is handledusing a technique similar to that in the stable modelsemantics of logic programs [GL88].

De�nition 3.3 Given a con�guration C and a set ofrules R in CRL, C is R-valid i� C = MM(�C(R))and C j= R.The intuition behind this de�nition is as follows: the�rst �x-point condition guarantees that a con�gura-tion must be grounded in the rules. All the thingsin the con�guration are derivable from (the reduct of)the con�guration rules. On the other hand, everythingthat can be derived using (the reduct of) the rules mustbe in the con�guration. The second condition ensuresthat all the necessary choices have been made and allthe requires- and incompatibility-rules are respected.Example 2 Consider the con�guration model RPCin Example 1 and the simple set of customer require-ments fFinnishlayoutKB g. The con�gurationC1 = fcomputer; SCSIdisk; UKlayoutKBgdoes not satisfy the con�guration model nor the cus-tomer requirements according to De�nition 3.1 andthus it is not RPC-valid, either. The con�gurationC2 = fcomputer; IDEdisk; F innishlayoutKB;SCSIcontrollergdoes satisfy the con�guration model and the customerrequirements. However, it is not RPC-valid becausethe reduct �C2(RPC) iscomputer IDEdisk computerF innishlayoutKB computerSCSIcontroller SCSIdiskThe minimal model MM(�C2(RPC)) of the reduct doesnot contain the SCSIcontroller and thus it is notequal to C2. Consider now the con�gurationC3 = fcomputer; SCSIdisk; F innishlayoutKB;SCSIcontrollergThis con�guration is RPC -valid and satis�es the cus-tomer requirements.We now present some examples of typical con�gurationknowledge formulated as CRL rules and the corre-sponding con�gurations. These examples give an ideaof how to represent exclusive choice, optional choiceand default alternatives in CRL.Example 3 Consider �rst the set of rules R1 in Fig-ure 1. The valid con�gurations with respect to R1 arefc; ag, fc; bg and fc; a; bg. The reducts of R1 withrespect to these con�gurations are fa c; c g,

R1 :a j b cc R2 :a j b a; b R3 :a j b cc j c0 d c; c0d Figure 1: Examples of rulesfb c; c g and fa c; b c; c g, respectively. Itis easy to see that the minimal models of these reductsare exactly the con�gurations and that the con�gura-tions satisfy the rules in R1. Now, consider the casewhere the latter rule is omitted. In this case, the onlyvalid con�guration is the empty con�guration fg, sincea and b cannot have a justi�cation.The rule set R2 encodes an exclusive choice. The validcon�gurations with respect to R2 are fag and fbg. Onemust choose one of fa; bg to any con�guration, andchoosing either a or b prohibits the other from beingchosen as they are incompatible.The �rst three rules in R3 demonstrate how to repre-sent an optional choice rule whose head consists of theatoms a and b and whose body is d. The valid con�gu-rations with respect to R3 are fc0; dg, fa; c; dg, fb; c; dgand fa; b; c; dg. In this example either c or c0 mustbe in a con�guration. These additional atoms repre-sent the cases where the choice is made and not made,respectively. Now, consider the rule set obtained byadding the rule a not(b); d to R3. The valid con-�gurations are now fc0; a; dg, fc; a; dg, fc; b; dg andfc; a; b; dg. This rule set represents a default choice(a is the default) which is made unless one of the al-ternatives is explicitly chosen.4 Relationship to NonmonotonicSemanticsThe con�guration rule language CRL resembles dis-junctive logic programs and deductive databases. Thesemantics is also similar to logic programming seman-tics. As we pointed out, the default negation is han-dled using a construct closely related to the stablemodel semantics of logic programs [GL88]. In fact,if we limit the language to requires-rules, normal logicprograms with the stable model semantics is obtained:for a set of requires-rules, a set of atoms is a validcon�guration i� it is a stable model of the set of rules.When choice-rules are allowed, our semantics di�ersfrom the usual semantics of disjunctive logic programssuch as the disjunctive stable model semantics [GL91],D-WFS [BD95], and STATIC [Prz95]. The main dif-

ference is that these semantics have subset minimal-ity of the models as a built-in property whereas oursemantics does not imply subset minimality of con�g-urations as can be seen from Example 3. Semanticsthat are close to the disjunctive stable model seman-tics but allow non-minimal models have been proposedby Lifschitz and Woo [LW92] as well as Herre andWagner [HW97]. However, these two approaches dif-fer from ours as they use an exclusive reading of thedisjunction. This means that, for example, a rule ofthe form a j b leads to two models where a and bare true, respectively. On the other hand, in CRL aninclusive interpretation closer to classical disjunctionis employed where a rule a j b yields three con�gu-rations fag, fbg, fa; bg.Notice that our notion of con�gurations is more re-stricted than that of classical models. This means thatcon�guration rules cannot be understood directly as aset of clauses with the classical models of the clausesas the con�gurations: the empty set is the unique validcon�guration for fa bg but seen as a clause it has amodel where both a and b are true. In fact, our notionof a valid con�guration of a set of rules coincides withthe notion of a possible model introduced by Sakamaand Inoue [SI94] for disjunctive programs. There isalso an interesting correspondence to stable modelsof normal (non-disjunctive) programs. We present amapping ofCRL to normal logic programs where validcon�gurations for a set of rules correspond to stablemodels of the resulting logic program.Given a set of rules R in CRL the correspond-ing normal logic program is constructed as follows.The requires-rules Rr are taken as such. Theincompatibility-rules Ri are mapped to logic programrules with the same body but a head f and a new rulef 0 not(f 0); f is included where f; f 0 are new atomsnot appearing in R. For each choice-rulea1 j � � � j al b1; : : : ; bm; not(c1); : : : ; not(cn)in Rc a rule f a1; : : : ; al is included together withthe rules, for all i = 1; : : : ; l,ai not(ai); b1; : : : ; bm; not(c1); : : : ; not(cn)ai not(ai)where a1; : : : ; al are new atoms. Now the stable modelsof the program provide the valid con�gurations for therules. The close correspondence implies that an imple-mentation of the stable model semantics can be usedas an implementation of the con�guration tasks. Thecorrespondence between stable models and con�gura-tions reveals also a close relationship between the pos-sible model semantics of disjunctive programs [SI94]

and the stable model semantics of normal programsindicating, e.g., that this kind of a disjunctive seman-tics can be realized using an implementation of thestable model semantics for non-disjunctive programs.5 Complexity IssuesIn this section we consider the complexity of the keycon�guration tasks and show that from a knowledgerepresentation point of view our con�guration lan-guage is more easily maintainable than propositionallogic. We study the following tasks. By C-SAT wedenote the problem of deciding whether a con�gura-tion satis�es a set of rules, by EXISTS the problem ofdetermining whether there is a valid con�guration fora set of rules and by QUERY the problem of decid-ing whether there is a valid con�guration C for a setof rules satisfying a set of requirements Q (C j= Q).First, we observe that deciding C-SAT can be donein polynomial time. Second, we note that checkingwhether a set of atoms is a valid con�guration for aset of rules can be achieved in polynomial time. Thisis because given a set of rules and a candidate con-�guration, the reduct can be computed in linear timeand, similarly, the unique least model of a set of Hornclauses can be computed in linear time [DG84]. Thisalso implies that the major computational tasks in con-�guration using our semantics are in NP.For EXISTS and QUERY we consider subclasses ofthe con�guration rule language CRL. For example,CRLr is the subset where only requires-rules are al-lowed, CRLrd permits additionally default negationsand CRLrci admits requires-rules, choice-rules andincompatibility-rules.It turns out that we can add incompatibility-rules torequires-rules and still have polynomial algorithms forthe con�guration tasks. This is due to the fact thatthis subclass essentially corresponds to Horn clausesfor which polynomial decision methods exist [DG84].A language containing choice-rules, CRLrc, allowspolynomial algorithms for EXISTS. This can beshown by transforming the disjunctions in the headsof rules to conjunctions. The result of this transforma-tion is e�ectively a set of Horn clauses, whose minimalmodel can be shown to be a valid con�guration of theoriginal rule set. However, QUERY is NP-completefor CRLrc. This can be established using the follow-ing reduction from propositional satis�ability. Propo-sitional clauses are mapped to con�guration rules withnegative literals forming the body of the rule and posi-tive the head. For each clause without positive literals,the same head f is used where f is a new atom. As

Language C-SAT EXISTS QUERYCRLr Poly Poly PolyCRLri Poly Poly PolyCRLrc Poly Poly NP-compl.CRLrd Poly NP-compl. NP-compl.CRLrci Poly NP-compl. NP-compl.CRLrcid Poly NP-compl. NP-compl.Table 1: Complexity results of con�guration tasksthe query, the rule f 0 f is employed where f 0 isyet another new atom. Now it can be shown that theset of clauses has a propositional model i� there is avalid con�guration satisfying the query f 0 f for thecorresponding set of rules.If incompatibility-rules are added to CRLrc, the deci-sion problems EXISTS and QUERY become NP-complete. This is because propositional satis�abil-ity can be reduced to �nding a valid con�gurationby treating propositional clauses as con�guration rules(negative literals form the body of the rule and posi-tive the head). It can be shown that the set of clauseshas a propositional model i� the corresponding set ofrules has a valid con�guration.Adding default negations to CRLr turns the decisionproblems EXISTS and QUERY NP-complete as weessentially then have the stable model semantics ofnormal logic programs. The discussion is summarizedin Table 1. These complexity results can also be es-tablished from the complexity of the possible modelsemantics [SI94, EG95].We end the section with an argument that from aknowledge representation point of view our rule-basedlanguage is more attractive than propositional logic incon�guration applications. We aim to show that con-�guration knowledge expressed by the rule-based lan-guage cannot be captured in an easily maintainableand updatable way using propositional logic.One possibility of representing valid con�gurations fora set of con�guration rules R with propositional logicis to provide a set of propositional formulae T suchthat an R-valid con�guration can be obtained as for-mulae derivable from T . However, there are di�cul-ties because the set of derivable formulae is unique foreach set of premises but a set of rules can have mul-tiple valid con�gurations. This leads to the idea thatcon�gurations can be represented by models of a setof formulae [Kle96]. Interestingly, it turns out thatthis is not possible if we insist that the propositionalrepresentation is easily maintainable. One of the keyproperties of such a representation is its modularity,

meaning that small local changes in the con�gurationmodel lead to small local changes in the correspond-ing set of formulae. For example, a simple update likeadding a new fact into the con�guration model shouldresult in a local change in the propositional representa-tion related to the new fact but not a�ecting the otherparts of the representation of the con�guration model.We can show under mild assumptions on the notion ofmodularity that no such representation exists.We say that con�gurations aremodularly representableby propositional models i� for every set of con�gura-tion rules R there is a set of propositional formulaeT(R) such that for every set of requires-rules F withempty bodies (facts) there is a set of propositional for-mulae T0(F ) such that C is a valid con�guration ofR [ F i� there is a model of T(R) [ T0(F ) agreeingwith C. A propositional modelM is said to agree witha con�guration C i� for each atom a in the con�gu-ration language, a 2 C i� a is true in M . Hence, thecorresponding propositional language can contain ad-ditional atoms but for the atoms in the con�gurationrules, the models should correspond to the con�gura-tions. Our notion of modular representation meansthat con�guration rules can be represented indepen-dent of the basic facts representing, e.g., requirementsso that a change in the facts does not lead to a changein the propositional representation of the con�gurationrules.Theorem 5.1 Con�gurations cannot be modularlyrepresented by propositional models.Proof. This result is due to the di�culties in captur-ing groundedness using propositional models and canbe demonstrated with a very simple counter-example.Consider the set rulesR = fc bg and assume that itscon�gurations can be modularly represented by propo-sitional models. Hence, there is a set of formulae T(R)such that all atoms a in the con�guration language arefalse in every model of T(R) as R has the empty setas its unique valid con�guration. This implies thatfor all such atoms a, :a is a logical consequence ofT(R). Consider now a set of facts F = fb g. Thecon�guration model R [ F has a unique valid con�g-uration fb; cg which contradicts the fact that in allmodels of T(R)[T0(F ), both b and c are false. Thus,valid con�gurations cannot be modularly representedby propositional models.6 Previous Work on ProductCon�gurationSeveral con�gurators and models of product con�gura-tion tasks are based on constraint satisfaction problem

(CSP) solving. A CSP consists of a set of variables,a set of possible values for each variable, called thedomain of the variable, and a set of constraints. Aconstraint speci�es the allowed combinations of valuesfor the variables that the constraint refers to. This isdone by specifying the allowed subset of the cartesianproduct of the domains of the variables. A solution toa CSP is an assignment of values to all variables suchthat the constraints are satis�ed.A CSP can be represented in CRL by mapping it toa set of rules in CRL as follows: introduce for eachpair hvariable; possiblevalueofthevariablei a distinctatom. Each variable and its domain is represented asan exclusive choice whose head consists of all the pos-sible pairs for that variable and whose body is empty.The constraints can be represented using incompati-bility rules to prevent the non-allowed combinationsof values, provided that the domains are �nite. It iseasy to see that each valid con�guration provides asolution to the CSP and vice versa.However, not all constructs of CRL have a convenientCSP-representation. Consider an inclusive choice rulewithout a body, which basically represents choosinga subset of a set of atoms. A straightforward CSP-representation for this would use one distinct vari-able for each alternative atom, each with domainftrue; falseg, and a constraint that not all the vari-ables have the value false. Representing constraintson this type of formulation may be awkward as somevariables represent only parts of one inclusive choicein the original problem while other variables could beused to encode entire (exclusive) choices. This compli-cates the maintenance of knowledge as the connectionbetween the choices and the resulting variables, do-mains, values and constraints is not self-evident.Similarly to the propositional logic, the CSP formal-ism cannot modularly capture groundedness of a con-�guration. This can be shown in the same way as inTheorem 5.1. We use the following notion of mod-ularity. Con�gurations are de�ned to be modularlyrepresentable by solutions to a CSP i� for every setof rules R there is a CSP representation T(R) suchthat for every set of requires-rules F with empty bod-ies (facts) there is a simple update U(T(R); F ) to theCSP representation such that C is a valid con�gura-tion for R [ F i� there is a solution of U(T(R); F )agreeing with C. A simple update is de�ned as oneof the following updates: either add or remove a setof allowed value tuples, either add or remove a set ofconstraints and either add or remove a set of variables.Note that simple updates also allow either adding orremoving sets of values from the domains if these are

interpreted as adding or removing constraints. A so-lution S to a CSP is said to agree with a con�gurationC i� (i) there is a distinct variable with the domainftrue; falseg in S for each propositional atom occur-ring in R and (ii) for each atom a in the con�gurationlanguage, a 2 C i� the variable representing a has thevalue true in S. Note that (i) is merely required forconvenience of interpreting the solution and is not areal restriction, since the representation may addition-ally contain arbitrary variables, values and constraints.This notion of modular representation means that con-�guration rules should be represented as a CSP in-dependent of the basic facts so that a change in thefacts does not lead to a change involving both addi-tions and removals of tuples, constraints, variables orvalues. We note that a rule set can modularly repre-sent the solutions of a CSP. This can be easily seenfrom the translation from CSP to CRL given above.Theorem 6.1 Con�gurations cannot be modularlyrepresented by solutions to CSP.Proof. Consider the set rules R = fc bg and as-sume that its con�gurations can be modularly repre-sented by solutions to a CSP. Hence, there is a CSPT(R) such that in all the solutions of T(R) the vari-ables representing atoms b and c in the con�gurationlanguage have the value false as R has the empty setas its unique valid con�guration. Consider now a setof facts F = fb g. The con�guration model R [ Fhas a unique valid con�guration fb; cg. This meansthat U(T(R); F ) must not have a solution in whichvariables encoding b and c have the value false. Inaddition, U(T(R); F ) must have at least one solutionin which the atoms encoding b and c have the valuetrue. It can be shown that none of the simple up-dates can both add solutions and remove them, whichcontradicts the assumption.The dynamic CSP formalism (DCSP) [MF90] wasde�ned to provide a meta-level representation andreasoning mechanism for expressing conditions underwhich a variable needs to have a value, i.e. conditionson activity of variables. This is achieved by addingactivity constraints to a regular CSP. In contrast toDCSP, we provide a uniform way to represent activityand other constraints and to reason about them. TheDCSP approach does not include activity constraintsthat have a disjunction in the head or negated condi-tions in the body, which is possible in CRL.As shown above, CRL allows representing modularlyand compactly some forms of typical con�gurationknowledge. This is not the case for the other discussedformalisms. Therefore, we consider CRL a poten-

tially more adequate con�guration knowledge repre-sentation formalism from the knowledge managementpoint of view (with the caveat that some constructsnow treated as short-hand notation need to be addedto the basic formalism).The generative CSP (GCSP) [HS93] approach intro-duces �rst-order constraints on activities of variables,on variable values and on resources. Constraints us-ing arithmetic are also included. Resources are ag-gregate functions on intensionally de�ned sets of vari-ables. They may restrict the set of variables active in asolution or generate new variables into a solution, thusproviding a justi�cation for the variables. In addition,a restricted form of DCSP activity constraints is usedto provide justi�cations for activity of variables. Asdiscussed above, CRL allows more expressive activ-ity constraints and a uniform representation of activ-ity and other constraints. However, CRL clearly doesnot allow �rst-order rules, arithmetic or resource func-tions.As a �nal remark, our approach �ts broadlywithin the framework of constructive problem solv-ing (CPS) [Kle96]. In that approach, the con�gura-tions are characterized as (possibly partial) Herbrandmodels of a set of sentences in an appropriate logiclanguage. The CPS approach does not require thata con�guration is grounded. The need for meta-levelminimality criterion is mentioned, though.7 Conclusions and Future WorkWe have presented a formal model of the interactionsof knowledge elements in the con�guration domain. Inour formalization all the elements of a valid con�gura-tion must be grounded in the rules of the con�gurationmodel. This property is an important characteristicwhose formal de�nition has been largely neglected.The formal model is closely related to well-known non-monotonic formalisms such as stable model seman-tics [GL88] and possible model semantics [SI94]. Thesemantics is de�ned using a simple transformation op-erator allowing a straightforward �x-point characteri-zation. We show that valid con�gurations cannot bemodularly represented as models of propositional logicor as solutions to a constraint satisfaction problem.The basic problems of the validity of a con�gurationwith respect to a con�guration model and whether acon�guration satis�es a set of customer requirementsare polynomially decidable. This implies that otherrelevant decision problems are in NP. These resultsare due to the groundedness of a con�guration not be-ing captured by a minimality criterion on the con�gu-

rations but in terms of derivability from a set of Hornclauses. The tractability of the basic decision problemsis important for practical con�guration problems.There are indications that the proposed formal modelprovides a basis for solving practically relevant productcon�guration problems. As shown above, implemen-tations of stable model semantics can be used for thedecision problems of our model. There are e�cientimplementations of stable models semantics capableof handling tens of thousands of ground rules, suchas Smodels [NS96]. Compiling a practically relevantcon�guration model from a high level representationinto ground rules would seem to generate rule sets ofapproximately that size. Furthermore, it may be pos-sible to develop a more e�cient algorithm that avoidsthe overhead incurred by the additional atoms and theloss of information on the structure of the rules result-ing from the translation. Devising such an algorithmis an interesting subject of further work. A practi-cally important task would be to identify additionalsyntactically restricted but still useful subsets of thelanguage that would allow more e�cient computationthan the general cases discussed here.It should be noted that the model does not adequatelycover all the aspects of product con�guration. Furtherwork should include generalizing the rules to the �rst-order case and adding arithmetic operators to the lan-guage. These extensions are needed to convenientlyrepresent resource constraints, attributes, structureand connections of components. Another importantextension would be to de�ne the notion of an opti-mal con�guration (such as subset minimal, cardinal-ity minimal or resource minimal con�guration) and toanalyze the complexity of optimality-related decisionproblems. Interactive product con�guration whereuser makes hard decisions and computer only tractableones would be facilitated by de�ning a polynomiallycomputable approximation semantics whose relationto the semantics presented here would be similar tothat of the well-founded semantics [VGRS91] to thestable model semantics.AcknowledgementsThe work of the �rst author has been supported by theHelsinki Graduate School in Computer Science andEngineering (HeCSE) and the Technology Develop-ment Centre Finland. The work of the second authorhas been supported by the Academy of Finland.

References[BD95] S. Brass and J. Dix. Disjunctive seman-tics based on partial and bottom-up evalu-ation. In Proceedings of the 12th Interna-tional Conference on Logic Programming,pages 199{213, Tokyo, June 1995. The MITPress.[CGS+89] R. Cunis, A. G�unter, I. Syska, H. Pe-ters, and H. Bode. PLAKON|an ap-proach to domain-independent construc-tion. In The Second International Confer-ence on Industrial & Engineering Applica-tions of Arti�cial Intelligence & Expert Sys-tems IEA/AIE-89, volume 2, pages 866{874. ACM, 1989.[DG84] W.F. Dowling and J.H. Gallier. Linear-time algorithms for testing the satis�abilityof propositional Horn formulae. Journal ofLogic Programming, 3:267{284, 1984.[EG95] T. Eiter and G. Gottlob. On the compu-tational cost of disjunctive logic program-ming: Propositional case. Annals of Math-ematics and Arti�cial Intelligence, 15:289{323, 1995.[GL88] M. Gelfond and V. Lifschitz. The stablemodel semantics for logic programming. InProceedings of the 5th International Con-ference on Logic Programming, pages 1070{1080, Seattle, USA, August 1988. The MITPress.[GL91] M. Gelfond and V. Lifschitz. Classicalnegation in logic programs and disjunctivedatabases. New Generation Computing,9:365{385, 1991.[HJ91] M. Heinrich and E.W. Jungst. A resource-based paradigm for the con�guring of tech-nical systems from modular components.In Proceedings of the seventh IEEE confer-ence on Arti�cial Intelligence Applications,pages 257{264, 1991.[HS93] Alois Haselb�ock and Markus Stumptner.An integrated approach for modelling com-plex con�guration domains. In Proceedingsof the 13th International Conference on Ex-pert Systems, AI, and Natural Language,Avignon, May 1993.[HW97] Heinrich Herre and Gerd Wagner. Stablemodels are generated by a stable chain.

Journal of Logic Programming, 30(2):165{177, February 1997.[Kle96] R. Klein. A logic-based description ofcon�guration: the constructive problemsolving approach. In B. Faltings andE. Freuder, editors, Con�guration|Papersfrom the 1996 AAAI Fall Symposium.Technical Report FS-96-03, pages 111{118.AAAI Press, 1996.[LW92] Vladimir. Lifschitz and Thomas Y.C. Woo.Answer sets in general nonmonotonic rea-soning (preliminary report). In Proceed-ings of the 3rd International Conferenceon Principles of Knowledge Representationand Reasoning, pages 603{614, Cambridge,MA, USA, October 1992. Morgan Kauf-mann Publishers.[McD82] J. McDermott. R1: a rule-based con�gurerof computer systems. Arti�cial Intelligence,19(1):39{88, 1982.[MF89] Sanjay Mittal and Felix Frayman. Towardsa generic model of con�guration tasks. InProceedings of IJCAI 89, pages 1395{1401.AAAI, 1989.[MF90] Sanjay Mittal and Brian Falkenhainer. Dy-namic constraint satisfaction problems. InProc. of the Eight National Conferenceon Arti�cial Intelligence (AAAI-90), pages25{32. AAAI, MIT Press, 1990.[NS96] I. Niemel�a and P. Simons. E�cient im-plementation of the well-founded and sta-ble model semantics. In M. Maher, edi-tor, Proceedings of the Joint InternationalConference and Symposium on Logic Pro-gramming, pages 289{303, Bonn, Germany,September 1996. The MIT Press.[Prz95] T.C. Przymusinski. Static semantics fornormal and disjunctive logic programs. An-nals of Mathematics and Arti�cial Intel-ligence, Special Issue on Disjunctive Pro-grams, 14:323{357, 1995.[SI94] C. Sakama and K. Inoue. An alternative ap-proach to the semantics of disjunctive logicprograms and deductive databases. Journalof Automated Reasoning, 13:145{172, 1994.[Tsa93] E. Tsang. Foundations of Constraint Sat-isfaction. Academic Press, London, 1993.

[TSMS96] Juha Tiihonen, Timo Soininen, TomiM�annist�o, and Reijo Sulonen. State-of-the-practice in product con�guration|a sur-vey of 10 cases in the Finnish industry.In T. Tomiyama, M. M�antyl�a, and S. Fin-ger, editors, Knowledge Intensive CAD,volume 1, pages 95{114. Chapman & Hall,1996.[VGRS91] A. Van Gelder, K.A. Ross, and J.S. Schlipf.The well-founded semantics for generallogic programs. Journal of the ACM,38(3):620{650, July 1991.