now. It is non-deterministic since it employs the functionsselect demand,
create alternatives, andselect alternative, which heuristically control the search. We elaborate on these functions in the next section. Additionally, we need the help functiontest balancethat takes a demand setDand an item setIas input and returns the set of actually unsatisfied demands.
SATBALANCE
: Demand set
: Item set (initially empty) D I yes no I’ := I M=/ I’ = WHILE 0/ 0/ D = 0/
I’ :=SATBALANCE(D’,I J) J := select_alternative(M) M := M \ J D’:= test_balance(D,I J) := create_alternatives(f,x) M 0/ := I’ (f,x) := select_demand(D) D,I I’ Return Input
Figure 4.4:The basic balance algorithm
Remarks. SATBALANCEcan be modified easily to solve the configuration task “adapting”. Thus, all configuration tasks defined in section 2.3 are solved by the algorithm above.
In order to solve a realistic configuration problem, SATBALANCEmust be extended. E.g., it should be possible to process minimum and maximum restrictions, to define mandatory functionalities, or to define an optimum criterion.
4.3
Improving Performance with Metaknowledge
The efficiency of the algorithm SATBALANCEdepends on the domain heuris- tics operationalized in the functionscreate alternatives,select alternative, andselect demand[36]. Such heuristics are called metaknowledge. Meta- knowledge is knowledge about knowledge and defines how (configura- tion) knowledge is used and which role (configuration) knowledge plays.
In the functions mentioned metaknowledge plays a key role since it controls the configuration process:
• create alternatives,select alternative. Creating alternatives means to form sets of components that satisfy a particular demand; selecting an alternative means to define an order based upon these sets. Meta- knowledge related to both jobs is stated in the form of preferences: Should the alternatives be formed and selected with respect to the component costs, or some kind of indirect cost—caused by the new demands of an alternative, or with respect to an alternative’s number of components? Answers to these questions are founded on experi- ence, on domain-dependent constraints, or on connections found out empirically.
• select demand. Metaknowledge related to this function should an- swer the question, which unsatisfied demand is to be processed next. There exist domainindependent relationships that can be exploited to answer this question. The next subsection shows how information about the demand processing order is deduced from the component descriptions.
The Planner’s View
Property-based configuration problems can be described in terms of plan- ning. The following are given:
1. an initial state, characterized byΠM1,
2. a goal stateC(configuration) that is only described intensionally by the fact thatCfulfills all demands related toΠM1.
What we are looking for is aplan that describes how to get from the initial state to the goal state. Usually, such a plan is a concatenation of a finite number of so-called operators. When dealing with property-based configuration, a plan has to determine which of the unsatisfied demands should be processed next and how the selected demand could be satisfied. Processing such a plan would result in the readily configured system.
Especially the selection of unsatisfied demands plays a crucial role when processing a property-based configuration problem. If the dependencies between the functionalities are considered, a lot of backtracking can be avoided. Hence, we are interested in a plan that defines a sequence by
4.3. IMPROVING PERFORMANCE WITH METAKNOWLEDGE 85 which unsatisfied demands can be processed so that backtracking is min- imized. Before we describe how such a plan is found we introduce the following definitions.
Definition 4.1 (Serializable). LetΠM1be a configuration problem under
model M1.ΠM1is calledserializable, if a permutations= (fs1, fs1, . . . , fsn),
f ∈F,n=|F|, can be determined such that the following holds true: For each demandd = (fsi, x) ∈ D that can be satisfied at all, there exists an item setJwhose objects exclusively demand functionalitiesfsj withj > i. The permutationsshall be called thelinear configuration planofΠM1.
Definition 4.2 (Strongly Serializable). LetΠM1be a configuration problem
under model M1 andsa linear configuration plan ofΠM1. ΠM1is called
strongly serializableif the demands are processed in order ofsand no back- tracking is necessary, regardless of the alternatives chosen to satisfy the demands.
Remarks. In other words, a configuration problemΠM1 is serializable if
there exists a total ordersof F (and hence of D) such that the satisfac- tion of a demand(fsi, x)will never lead to an additional demand(fsk, y), si, sk ∈ s withk < i. Note that despite the existence of a linear config-
uration plan, backtracking might occur during the configuration process due to the following reason: When processing a demandd, usually a lot of alternative component sets are locally suited to satisfy d. Selecting a “wrong” alternative will cause the configuration process to reach a dead end within subsequent configuration steps.
The latter definition describes configuration problems that will be solved by means of a greedy algorithm (if the linear configuration plan guides the configuration process). Typically, very few property-based con- figuration problems are of this type.2
Note that a linear configuration plan can only exist if no circular depen- dencies occur between the functionalities inF.
Theorem 4.3 (Linear Configuration Plan). Let ΠM1 be a configuration
problem under model M1 andnthe number of all components’ supplied and demanded properties, n := o∈O|pS
o|+
o∈O|p D
o|. Then, a linear
2The configuration system R1/XCON[54], [64] deals with strongly serializable problems
only. R1/XCONwas developed by the Carnegie-Mellon University and DECfrom 1978–1980 to perform the configuration of VAXcomputers. It is still maintained and improved today.
configuration plan can be computed within a time complexity ofO(n), if one exists.
Before we prove the theorem we motivate its idea with respect to the component-property graph of figure 4.5.
f o f o "o" supplies "f" "o" demands "f" f6 f1 f3 f2 o2 o1 o3 o4
Figure 4.5:A sample component-property graph
A demandd ∈ D should only be processed, if all components of the system that also need this functionality are already determined. E.g., since component o3 supplies nothing, it should be selected first, and while o1
demands nothing, it should be selected last. Obviously, a component’s number can be determined if its outdegree in the component-property graph is zero (on condition that the components selected and the function- alities processed are deleted in the graph). Note that the sequence of nodes we get by this procedure corresponds to a reversed topological sorting of the graph. The order by which functionalities occur in this sorting defines the optimum configuration plan.
Proof. We need to prove that for an arbitrary component-property graph
g(V, E)a topological sorting can be computed inO(n),n :=o∈O|pS o|+
o∈O|p D
o|. By the construction ofg(V, E)we can see that|V| =|O|and |E|=o∈O|pS
o|+
o∈O|p D
o|. Moreover, all edges ofg are directed since
no functionality is both supplied and demanded by the same component. Becauseg(V, E)might contain cycles, all strongly connected components ofg have to be computed first. According to Aho et al. this computation can be done inO(|E|)for a connected directed graph [1].
When exploiting the information about the strongly connected compo- nents, we are able to construct the condensed graph where each strongly connected component is represented by one node. The condensed graph is computed as follows. All nodes of a strongly connected component are associated with the same number. Then, for each strongly connected com- ponentSa new adjacent list is computed by merging the adjacent lists of
4.4. THE CONFIGURATION SYSTEMMOKON 87