scieee AI-readable full text Open interactive document viewer

Declarative characterization of a general architecture for constructive geometric constraint solvers

Joan Arinyo, Robert,Soto Riera, Antoni,Vila Marta, Sebastià,Vilaplana Pastó, Josep

Abstract

Geometric constraint solving is a growing field devoted to solve geometric problems defined by relationships, called constraints, established between the geometric elements. There are several techniques to solve geometric constraint problems. In this work we focus on the Constructive technique. Usually, it works in two steps. In a first step, the problem is analyzed symbolically. If the problem is solvable by the technique, the output is the construction plan, that is, a sequence of abstract geometric constructions which defines parametrically the solution to the problem. Then, the construction plan is applied to a set of specific values assigned to the parameters. If no numerical incompatibilities arise, instances of the solution are generated. In this paper we present a general architecture for constructive geometric constraint solvers. The basic components of this architecture are three functional units: the analyzer, the index selector and the constructor. Each functional unit is specified in terms of the entities that manipulates such as geometric constraint problems and construction plans. These relevant entities are declaratively characterized and its precise semantic is stated.

Full text

Declarative Characterization of a General Architecture for Constructive Geometric Constraint Solvers R. Joan-Arinyo, A. Soto-Riera, S. Vila-Marta, J. Vilaplana-Past´o Universitat Polit`ecnica de Catalunya Departament de Llenguatges i Sistemes Inform`atics Av. Diagonal 647, 8a, E–08028 Barcelona [robert,tonis,sebas,josep]@lsi.upc.es Abstract Geometric constraint solving is a growing field devoted to solve geometric problems defined by relationships, called constraints, established between the geometric elements. There are several techniques to solve geometric constraint problems. In this work we focus on the Constructive technique. Usually, it works in two steps. In a first step, the problem is analyzed symbolically. If the problem is solvable by the technique, the output is the construction plan, that is, a sequence of abstract geometric constructions which defines parametrically the solution to the problem. Then, the construction plan is applied to a set of specific values assigned to the parameters. If no numerical incompatibilities arise, instances of the solution are generated. In this paper we present a general architecture for constructive geometric constraint solvers. The basic components of this architecture are three functional units: the analyzer, the index selector and the constructor. Each functional unit is specified in terms of the entities that manipulates such as geometric constraint problems and construction plans. These relevant entities are declaratively characterized and its precise semantic is stated. Keywords Geometric constraints, Constructive geometric constraint solving, Declarative representations. 1 Introduction In two-dimensional constraint-based geometric design, the designer creates a rough sketch of an object made out of simple geometric elements like points, lines, circles and arcs of circle. Then the intended exact shape is specified by annotating the sketch with constraints like distance between two points, distance from a point to a line, angle between two lines, line-circle tangency and so on. A geometric constraint solver then checks whether the set of geometric constraints coherently defines the object and, if so, determines the position of the geometric elements. The designer can now modify the values of constraints or ask the geometric constraint solver for alternative solutions that also satisfy the constraints. Many techniques have been reported in the literature that provide powerful and efficient methods for solving systems of geometric constraints. For example, see [5] and references therein for an extensive analysis of work on constraint solving. Among all the geometric constraint solving techniques, our interest focuses on the one known as constructive, [1, 2, 3, 7, 11, 12, 15]. Constructive solvers have two major components, [7]: the analyzer and the constructor. The analyzer symbolically determines whether a geometric problem defined by constraints is solvable. If the problem is solvable, the output of the analyzer is a sequence of construction steps, known as the construction plan, that places each geometric element in such a way that all constraints are satisfied. After assigning specific values to the parameters, the constructor interprets the construction plan and builds an object instance, provided that no numerical incompatibilities arise. The specific construction plan generated by an analyzer depends on the underlying constructive technique and on how it is implemented. For example, the ruler-and-compass constructive approach is a well-known technique where each constructive step in the plan corresponds to a basic operation solvable with ruler, compass and protractor. In practice, this simple approach solves most useful geometric problems. [8]. Although the constructive geometric constraint solvers proposed in the literature seems to share a common architecture, few efforts have been devoted to characterize it independently of the underlying constraint solving method proposed. In this paper we present a general architecture for constructive geometric constraint solvers. We deliberately avoid focusing on solving methods. First, we identify a set of relevant entities in constructive geometric constraint solving such as abstract geometric constraint problems, abstract construction plans, parameters assignment and index assignment. We present a high level declarative characterization of these entities and their semantics. Next, we identify three functional units in which a geometric constraint solver is structured: the analyzer, the index selector and the constructor. These functional units are specified in terms of the entities that each one manipulates. Lastly, we assemble this functional units in a general architecture for constructive geometric constraint solvers. The outline of the paper is as follows. In Section 2 we present preliminary concepts and definitions. In the following two sections we identify the entities relevant in geometric constraint solving. Geometric constraint problems and parameters assignments are defined in Section 3. Construction plans and index assignments are defined in Section 4. In Section 5 we interpret geometric constraint problems and construction plans in terms of first order logic formulae. In Section 6 we identify three basic functional units in constructive geometric constraint solving, namely the analyzer, the index selector and the constructor. We specify each functional unit in terms of its input, its output and the relationship between them. In particular, we give a definition for correctness and completeness of an analyzer. In Section 7 we give a general architecture for constructive geometric constraint solvers built on the concepts previously introduced. Finally, Section 8 offers a summary. a2a1 l4 l3 h1 l1 l2 d2 p2 d1 p3 p1 p4 onPL(p1,l 1)onPL(p1,l 2) onPL(p2,l 1)onPL(p2,l 3) onPL(p3,l 3)onPL(p3,l 4) onPL(p4,l 2)onPL(p4,l 4) distPP(p2,p 3,d 1)distPP(p3,p 4,d 2) distPL(p1,l 3,h 1)angleLL(l3,l 1,a 2) angleLL(l3,l 4,a 1) Figure 1: Geometric problem defined by constraints. 2 Preliminaries In this section we present concepts and notational conventions that will be used throughout all the manuscript. We assume that a constraint-based design is made of geometric elements like point, lines, circles and arcs of circle. The intended shape is defined by means of constraints like distance between two points, distance from a point to a line, angle between two lines, line-circle tangency and so on. In what follows, the symbols to represent geometric elements will be taken from the set LG={p1,l 1,c 1,p 2,l 2,c 2,... ,p n,l n,c n,...} pidenoting a point, lia straight line and cia circle. We assume that the number of different symbols available is unlimited. Constraints will be represented by predicates relating geometric elements or geometric elements plus a symbolic value called parameter. For example, LR={onPL(p, l), distPP(pi,p j,d), distPL(pi,l j,h), angleLL(li,l j,a),...} Predicate names are self explanatory. The predicate onP L(p, l) specifies that point pmust lie on line l,distP P (pi,p j,d)specifies a point-point distance, distP L(pi,l j,h)defines the perpendicular distance from a point to a straight line and, angleLL(li,l j,a)denotes the angle between two straight lines. The number and syntax of available constraints are fixed. Symbols d,hand aare parameters. The symbols to represent parameters will be taken from the set LP={d1,h 1,a 1,d 2,h 2,a 2,... ,d n,h n,a n,...} didenoting a distance between two points, hia distance between a point and a line and aian angle between two lines. Figure 1 shows an example of a constraint-based design and the set of constraints defined between the geometric elements. This work is centered on constructive geometric constraint solving. Thus, a chief entity is the construction plan. To illustrate the d1 q1 p1 q2 p2 d2 Figure 2: Possible placements of a point. concepts, in what follows, we assume that a constructive ruler-and- compass based solver like that reported in [12] is available. Therefore, according to [8], the basic geometric constructions are LCB={pointXY (x, y), linePP(pi,p f), lineAP(l, a, p), circleCR(p, r), interLL(li,lj), interLC (l, c, s), interCC (ci,c j,s)} The meaning of the basic construction names is the usual: point defined by its coordinates, straight line given by an ordered pair of points, straight line through a point at an angle with respect to another line, circle defined by the center and radius, and intersections between straight lines and circles. The repertoire and syntax of available geometric operations depends on the specific constructive solving approach used and the implementation. However, it is considered fixed. In what follows, we assume that the set of available geometric operations LCconsists of those given in LCBplus some additional simple operations that can be easily expressed as a sequence of operations in LCB, for example lineLD(l, h, s), which defines a straight line parallel to another one at a given signed distance, see [9]. Note that basic intersection operations involving circles may have more that one intersection point. We characterize each intersection point by using an additional sign parameter swith value in {+1,−1}. Therefore, this leads to operations like interLC(l, c, s) and interCC(ci,c j,s). For afulldefinition ofthe semantics of parameter ssee [14]. The symbols to represent sign parameters will be taken from the set LI={s1,s 2,... ,s n,...} Example 2.1 The intersection between circle c1= circleCR(p1,d 1)and circle c2=circleCR(p2,d 2)in Figure 2 are the points {q1,q 2}. According to the semantic of sign parameters defined in [14], q1=interCC (c1,c 2,+1) q2=interCC (c1,c 2,−1) 3 Given a set of symbols Sand a set of values V,atextual substitution αis a total mapping from Sto V. Let Wbe a set of predicates and αa textual substitution, we note by α.W the set of predicates obtained by replacing every occurrence of any symbol s∈Sfound in Wby α(s)∈V. Example 2.2 Let S={a1,h 1}be a set of symbols and V= Ê . Let αa textual substitution from Sto Vdefined as α(a1)=0.57,α(h1)=4.0 and let Wbe a set of predicates in LRwith W={onP L(p1,l 1),angleLL(l1,l 3,a 1), distP L(p1,l 3,h 1)}. Then α.W is α.W ={onP L(p1,l 1),angleLL(l1,l 3,0.57), distP L(p1,l 3,4.0)}. 3 In this paper we will also apply textual substitutions to first order logic formulae and other syntactical descriptions. 3 Geometric Constraint Problems We define and describe declaratively the concepts of abstract geometric constraint problem and of instance of a geometric constraint problem. Abstract entities are exclusively defined in terms of symbols like those in the sets LG,LPand LI. Instance entities are abstract entities where some of the symbols occurring in them have been replaced by values. 3.1 Abstract Problem An abstract geometric constraint problem,orabstract problem in short, is a tuple A=G, C, P where Gis a set of symbols in LGdenoting geometric elements, Cis a set of constraints taken from LRand defined between elements of G, and Pis the set of parameters taken from LP. Example 3.1 Consider the sketch with annotated dimension lines shown in Figure 1. It can be seen as an abstract problem A=G, C, P where the set of geometric elements is G={p1,p 2,p 3,p 4,l 1,l 2,l 3,l 4}, Cis the set of constraints listed in Figure 1 and, the set of parameters is P={d1,d 2,a 1,a 2,h 1}. 3 A convenient way to fully describe an abstract problem is the algorithm-like notation. In this notation, the abstract problem in Example 3.1 can be expressed as gcp A param d1,d 2,a 1,a 2,h 1:real endparam geom p1,p 2,p 3,p 4:point l1,l 2,l 3,l 4:line endgeom onP L(p1,l 1) onP L(p1,l 2) onP L(p2,l 1) onP L(p2,l 3) onP L(p3,l 3) onP L(p3,l 4) onP L(p4,l 4) onP L(p4,l 2) distP P (p2,p 3,d 1) distP P (p3,p 4,d 2) distP L(p1,l 3,h 1) angleLL(l3,l 1,a 2) angleLL(l3,l 4,a 1) endgcp Note that an abstract problem defines a family of geometric constraint solving problems parameterized by the set P. 3.2 Instance Problem Aparameters assignment is a textual substitution αfrom a set of parameters Pto Ê . LetA=G, C, P be an abstract problem and αbe aparameters assignment from P. We say that α.A =G, α.C, P is an instance problem of A. Note that given an abstract problem, each different parameters assignment defines a different instance problem. Example 3.2 Consider the abstract problem A= G, C, P described in the Example 3.1. An example of parameters assigment αis α(a1)=−1.222 α(a2)=1.0472 α(h1) = 160.0 α(d1) = 290.0 α(d2) = 130.0 A description for the instance problem α.A is gcp α.A param d1,d 2,a 1,a 2,h 1:real endparam geom p1,p 2,p 3,p 4:point l1,l 2,l 3,l 4:line endgeom onP L(p1,l 1) onP L(p1,l 2) onP L(p2,l 1) onP L(p2,l 3) onP L(p3,l 3) onP L(p3,l 4) onP L(p4,l 4) onP L(p4,l 2) distP P (p2,p 3,290.0) distP P (p3,p 4,130.0) distP L(p2,l 2,160.0) angleLL(l3,l 1,1.0472) angleLL(l3,l 4,−1.222) endgcp 3 Instance problems are no longer parameterized because the parameters have been replaced by the corresponding actual values. Figure 3 shows a graphical representation for the instance problem α.A given in Example 3.2. Now parameters are no longer symbolic but actual values defined by the assignment α. Figure 3 is a a2=1.0472 a1=−1.222 l4 l1 l2 h1=160.0 l3 d2=130.0 p2 d1= 290.0 p3 p1 p4 Figure 3: Instance problem graphical representation of a declarative description of the geometric elements and constraints and, thus the actual geometry is irrelevant. For instance, the actual values of h1and d2in the figure do not match the values defined by α(h1)and α(d2). Abstract problems precisely describe a set of geometric elements and the constraints that must fulfill, but they do not define how to place the geometric elements to satisfy the constraints. In the next section we will present the construction plan which describes how actually carry out the construction. 4 Construction Plan A construction plan is a procedure that describes how to place the geometric elements with respect to each other. First we formalize the notion of abstract construction plan then we derive the concepts of instance plan and indexed plan. 4.1 Abstract Plan An abstract construction plan,orabstract plan in short, is a tuple S=G, P, L, Iwhere Gis a set of symbolic geometric elements taken from LG,Pis a set of parameters taken from LP, the index Iis a set of sign parameters taken from LI, and Lis a sequence of basic construction operations taken from LCand parameterized by Pand I.Ldefines how to place with respect to each other the elements in G. Example 4.1 If Odenotes a reference point, an example of abstract construction plan that specifies how to build the geometric object given in Figure 1 is cp S param d1,d 2,a 1,a 2,h 1:real endparam index s1,s 2:sign endindex geom p1,p 2,p 3,p 4:point l1,l 2,l 3,l 4:line endgeom p2=pointXY(Ox,O y) p3=pointXY(d1,O y) c1=circleCR(p3,d 2) l3=linePP(p2,p 3) l4=lineAP(l3,a 1,p 3) p4=interCL(l4,c 1,s 1) l1=lineAP(l3,a 2,p 2) l8=lineLD(l3,h 1,s 2) p1=interLL(l1,l 8) l2=linePP(p1,p 4) endcp Note that Lcontains auxiliary symbols, {c1,l 8}, which do not belong to G. These symbols are introduced to increase readability. Nonetheless, these symbols can be replaced by their definitions. For instance, symbol l8is defined as l8=lineLD(l3,h 1,s 2).If we replace l8in the definition of p1we have p1= interLL(l1,lineLD(l3,h 1,s 2)). This procedure can be repeated for every auxiliary symbol occurring in L. p3 d1 p2 d2 c1 l3 l4 a1 p4,+1 p4,−1 l1 a2 l8,+1 h1 h1 p1 (a) (b) p3 d1 p2 d2 c1 l3 a1 p4,−1 p4,+1 l4 l8,−1 Figure 4: Step by step interpretation of the abstract plan given in Example 4.1. Figure 4(a) and Figure 4(b) illustrate step by step how the plan is interpreted. First an arbitrary point Ois chosen to start the construction. This point is labeled p2, see Figure 4(a). Then, point p3whose ycoordinate is coincident with Oyand at a distance d2from p2is created. Next the circle c1, with center on p3and radius d2, the straight line l3, through points p2and p3, and the line l4, through point p3and at angle a1with, l3are created. Finally point p4is defined as the intersection of c1and l4. Note that there are two possible locations for point p4. Every possible location is distinguished with a sign from the set {+1,−1}, following the semantics of signs defined in [14]. Assuming that point p4is located in p4−1, and that the line l8chosen is l8−1, Figure 4(b) shows the interpretation of the rest of the plan. 3 An abstract construction plan is parameterized by two sets: Pand I.In the following sections we present the concepts of instance plan and indexed plan. In an instance plan we fix the values of parameters in Pand in an indexed plan we fix the values of signs in I. 4.2 Instance Plan An abstract plan can be instantiated by applying a parameters assignment in the same way it has been done for abstract problems. Let S=G, P, L, Ibe an abstract plan and αa parameters assignment for P. The instance plan α.S is defined as α.S =G, P, α.L, I. Example 4.2 Applying the parameters assignment given in Example 3.2 to the abstract plan in Example 4.1, yields the instance plan cp α.S param d1,d 2,a 1,a 2,h 1:real endparam index s1,s 2:sign endindex geom p1,p 2,p 3,p 4:point l1,l 2,l 3,l 4:line endgeom p2=pointXY(Ox,O y) p3=pointXY(290.0,O y) c1=circleCR(p3,130.0) l3=linePP(p2,p 3) l4=lineAP(l3,−1.222,p 3) p4=interCL(l4,c 1,s 1) l1=lineAP(l3,1.0472,p 2) l8=lineLD(l3,160.0,s 2) p1=interLL(l1,l 8) l2=linePP(p1,p 4) endcp Figure 5 shows the four possible evaluations of the instance plan in Example 4.2 obtained by changing the values of signs s1and s2.3 4.3 Indexed Plan An index assignment, denoted ι, is a textual substitution from an index Ito the set {+1,−1}. Let S=G, P, L, Ibe an abstract plan and ιan index assignment from I. The indexed plan ι.S is defined as ι.S = G, P, ι.L, I. Example 4.3 Let the index assignment ιbe ι(s1)=−1,ι(s2)=+1. Applying ιto the abstract plan in Example 4.1, yields the indexed plan cp S param d1,d 2,a 1,a 2,h 1:real endparam index s1,s 2:sign endindex geom p1,p 2,p 3,p 4:point l1,l 2,l 3,l 4:line endgeom p2=pointXY(Ox,O y) p3=pointXY(d1,O y) c1=circleCR(p3,d 2) l3=linePP(p2,p 3) l4=lineAP(l3,a 1,p 3) p4=interCL(l4,c 1,−1) l1=lineAP(l3,a 2,p 2) l8=lineLD(l3,h 1,+1) p1=interLL(l1,l 8) l2=linePP(p1,p 4) endcp Figure 6 shows two different objects generated by changing the value of parameter d2in the plan. 3 (b) (a) Figure 6: Distinct constructions encoded into the same abstract plan Note that the application of a parameters assignment αand an index assignment ιto an abstract plan Scommute. That is α.ι.S = ι.α.S. 5 Characteristic Formulae We will interpret geometric constraint problems and construction plans by means of first order logic formulae. This will allow us to precisely characterize the set of placements of the geometric elements for which the set of constraints hold and, the set of placements actually generated by a construction plan. 5.1 Geometric Problems Let A=G, C, P be an abstract geometric constraint problem with C={c1,c 2,... ,c m} (c) (d) (b)(a) Figure 5: The four possible evaluations of the instance plan in Example 4.2 Then the characteristic formula of Ais the first order logic formula, Ψ(A)≡ m  i=1 ci where the geometric elements of Gand the parameters of Poccurring in Ψare interpreted as free variables. Example 5.1 The characteristic formula of the abstract problem Agiven in the Example 3.1 is Ψ(A)≡(onPL(p1,l 1)∧onPL(p1,l 3)∧ onPL(p2,l 1)∧onPL(p2,l 4)∧ onPL(p3,l 3)∧onPL(p3,l 4)∧ onPL(p4,l 2)∧onPL(p4,l 4)∧ distPP(p2,p 3,d 1)∧distPP(p3,p 4,d 2)∧ distPL(p1,l 3,h 1)∧angleLL(l1,l 3,a 2)∧ angleLL(l4,l 3,a 1)) 3 Letαbe a parameters assignment for P, and α.A the corresponding instance problem. Then the first order formula Ψ(α.A)expresses the instance problem. Note that a textual substitution αcan be applied interchangeably to an abstract problem or to a first order logic formula. Therefore the relation Ψ(α.A)=α.Ψ(A)is well defined. Example 5.2 The characteristic formula of the instance problem in Example 3.2 is Ψ(α.A)≡(onPL(p1,l 1)∧onPL(p1,l 3)∧ onPL(p2,l 1)∧onPL(p2,l 4)∧ onPL(p3,l 3)∧onPL(p3,l 4)∧ onPL(p4,l 2)∧onPL(p4,l 4)∧ distPP(p2,p 3,290.0) ∧ distPP(p3,p 4,130.0) ∧ distPL(p1,l 3,160.0) ∧ angleLL(l3,l 1,1.0472) ∧ angleLL(l3,l 4,−1.222)) 3 Ageometry assignment or anchor κis a textual substitution such that assigns an actual geometry to each geometric element in a set of geometry symbols G. Let A=G, C, P be an abstract problem and κan anchor for G. We define κ.A as G, κ.C, P . Example 5.3 If we represent a point by the pair (x, y)∈ Ê 2and a straight line by (a, b, c), the coefficients of the normasl form ax +by +c=0with a2+b2=1, then an example of anchor κis κ(p1)=(92.38,160) κ(p2)=(0,0) κ(p3) = (290,0) κ(p4) = (245.54,122.16) κ(l1)=(−0.87,0.5,0) κ(l2)=(−0.24,−0.97,177.48) κ(l3)=(0,−1,0) κ(l4)=(0.94,0.34,−272.51) The characteristic formula Ψafter applying the anchor κto the instance problem α.A in Example 5.2 is Ψ(κ.α.A) ≡ (onPL((92.38,160),(−0.87,0.5,0)) ∧ onPL((92.38,160),(0,−1,0)) ∧ onPL((0,0),(−0.87,0.5,0)) ∧ onPL((0,0),(0.94,0.34,−272.51)) ∧ onPL((290,0),(0,−1,0)) ∧ onPL((290,0),(0.94,0.34,−272.51)) ∧ onPL((245.54,122.16), (−0.24,−0.97,177.48)) ∧ onPL((245.54,122.16), (0.94,0.34,−272.51)) ∧ distPP((0,0),(290,0),290.0) ∧ distPP((290,0),(245.54,122.16),130.0) ∧ distPL((92.38,160),(0,−1,0),160.0) ∧ angleLL((0,−1,0), (−0.87,0.5,0),1.0472) ∧ angleLL((0,−1,0), (0.94,0.34,−272.51),−1.222)) 3 Note that αand κcommute, that is, κ.α.A =α.κ.A. Let κbe an anchor for G. The set of anchors for which the formula Ψ(κ.α.A)holds V(α.A)={κ|Ψ(κ.α.A)} define the set of anchors which are solution to the instance geometric constraint problem α.A. We refer to the anchors in V(α.A)as realizations of the instance problem α.A. Figure 5 shows a graphical representation of the set of realizations V(α.A)for the instance problem α.A in Example 3.2. 5.2 Construction Plans Let S=G, P, L, Ibe an abstract construction plan with L= {o1,o 2,... ,o n}. The characteristic formula of Sis the first order logic formula, Φ(S)≡ n  i=1 oi where the geometric elements of G, the parameters of Pand signs of Ioccurring in Φare considered free variables. Example 5.4 The characteristic formula of the abstract plan Sgiven in Example 4.1 is Φ(S)≡(p2=pointXY(Ox,O y) ∧p3=pointXY(d1,O y) ∧c1=circleCR(p3,d 2) ∧l3=linePP(p2,p 3) ∧l4=lineAP(l3,a 1,p 3) ∧p4=interCL(l4,c 1,s 1) ∧l1=lineAP(l3,a 2,p 2) ∧l8=lineLD(l3,h 1,s 2) ∧p1=interLL(l1,l 8) ∧l2=linePP(p1,p 4)) 3 Let αbe a parameters assignment for P, and α.S the corresponding instance plan. Then the first order formula Φ(α.S)expresses the instance plan. Note that Φ(α.S)=α.Φ(S)trivially holds. Example 5.5 The characteristic formula of the instance plan in Example 4.2 is Φ(α.S)≡(p2=pointXY(Ox,O y) ∧p3=pointXY(290.0,O y) ∧c1=circleCR(p3,130.0) ∧l3=linePP(p2,p 3) ∧l4=lineAP(l3,−1.222,p 3) ∧p4=interCL(l4,c 1,s 1) ∧l1=lineAP(l3,1.0472,p 2) ∧l8=lineLD(l3,160.0,s 2) ∧p1=interLL(l1,l 8) ∧l2=linePP(p1,p 4)) 3 Let S=G, P, L, Ibe an abstract plan and κan anchor for G. We define κ.S as G, P, κ.L, I. Example 5.6 Let κbe the anchor in Example 5.3 and α.S the instance plan in Example 4.2. The characteristic formula Φafter applying the anchor κto the instance problem α.S is Φ(κ.α.S) ≡ ((0,0) = pointXY(Ox,O y)∧ (290,0) = pointXY(290.0,O y)∧ c1=circleCR((290,0),130.0) ∧ (0,−1,0) = linePP((0,0),(290,0)) ∧ (0.94,0.34,−272.51) = lineAP((0,−1,0),−1.222,(290,0)) ∧ (245.54,122.16) = interCL((0.94,0.34,−272.51),c 1,s 1)∧ (−0.87,0.5,0) = lineAP((0,−1,0),1.0472,(0,0)) ∧ l8=lineLD((0,−1,0),160.0,s 2)∧ (92.38,160) = interLL((−0.87,0.5,0),l 8)∧ (−0.24,−0.97,177.48) = linePP((92.38,160),(245.54,122.16))) 3 Let κbe an anchor for Gand αa parameters assignment for P. The set of anchors for which there is an index assignment ιsuch that the formula Φ(ι.κ.α.S)holds V(α.S)={κ|∃ιΦ(ι.κ.α.S)} define the set of anchors which are computed by the instance plan α.S. We refer to the anchors in V(α.S)as indexed anchors of the instance plan α.S. Figure 5 shows a graphical representation of the set of indexed anchors V(α.S)for the instance plan α.S in Example 4.2. Note that given an index assignment ιand a parameters assignment α, there is at most one anchor κfor which Φ(κ.ι.α.S)holds. 6 Constructive Solvers In the preceding sections we have identified a set of entities relevant in the constructive geometric constraint solving process: abstract problems, parameters assignments, instance problems, abstract plans, instance problems, index assignments and anchors. In this section we advocate an architecture for constructive geometric constraint solvers based on three functional units: the analyzer, the index selector and the constructor. We will specify the functionality of each unit by stating the input, the output and the relationships between them. 6.1 The Analyzer The analyzer is the functional unit that computes an abstract plan S=G, P, L, Ifrom an abstract problem A=G, C, P . The relationship between the abstract problem Aand the abstract plan Sestablished by the definition of analyzer is that the sets Gand P in Aand Sare the same. The set of abstract problems Afor which an analyzer computes a construction plan Sis the analyzer domain. We say that an analyzer is correct if and only if for every abstract problem Ain its domain, and for every parameters assignment α, V(α.S)⊆V(α.A). That is, each anchor for which the construction plan Sis feasible corresponds to one realization of the instance problem A. We say that an analyzer is complete if and only if for every abstract problem Ain its domain, and for every parameters assignment α, The set of anchors computed by the construction plan S and the set of realizations of the instance problems Aare coincident, V(α.S)=V(α.A). Analyzers described in [2, 4, 11, 15] are complete. Example 6.1 Since the abstract plan Sin Example 4.1 has been generated from the abstract problem Ain Example 3.1 by a complete analyzer, the set of indexed anchors of the instance plan α.S in Example 4.2 and the set of realizations of the instance problem α.S in Example 3.2 are the same set. Figure 5 shows this set. 3 6.2 The Index Selector An index selector is a functional unit exclusively characterized by its output which is an index assignment ι. The input to an index selector depends on the selection method it implements. Here we enumerate some methods. 1. A trivial index selector returns an index assignment ιfixed a priori. For instance, ι(s)=+1for all sin I. 2. An index assignment ιfrom I={s1,... ,s n}can be represented by the binary number d1d2...d nwhere di=0if ι(si)=−1and di=1if ι(si)=1. The order relation in binary numbers induces an order in the index assignments. Therefore, we can define a successor (predecessor) index selector to compute the next (previous) index assignment ιfrom a give index assignment ι. 3. An anchor-based index selector computes an index assignment ιfrom an anchor κand an abstract plan S= G, P, L, I. The output is an index such that defines a realization where the placement of geometric elements preserves the orientations defined by the anchor κ, [2, 6, 13]. See [13] for an extensive analysis of methods for implementing index selectors. 6.3 The Constructor The constructor is the functional unit that computes an anchor κ from an abstract plan S, a parameters assignment αand an index assignment ι. The anchor κis a realization in V(α.A)provided that the abstract plan Shas been computed from the abstract problem A by a correct analyzer. 7 Solvers Software Architecture In this section we present a software architecture useful for building a geometric constraint solving tool-box. The aim of such a tool-box is to provide the software engineer with a set of tools to design and implement software applications founded on constraint solving. The architecture has functional units and data entities. The data entities are geometric constraint problems, constructions plans, parameters assignments, geometry assignments and index assignments. The functional units are analyzers, index selectors and constructors. All these components relate each other following the data-flow diagram shown in Figure 7. This architecture exhibits a number of advantages: 1. The architecture is precisely and concisely defined. 2. It is independent of any particular implementation of thefunctional units. All what is needed is to define the specific grammar and semantics of LRand LCgiven in Section 2. 3. The nature of the computations in each step are quite different. The analyzer requires symbolic computation while the constructor only performs numerical computations. 4. Determining whether the problem can be symbolically solved or not is performed in the analysis step and it does not depend neither on the actual parameter values nor on the geometric computations. 5. When computing instances for different parameter values, only the second step needs to be carried out. This allows to skip the analysis step which is computationally the most expensive. 6. Once a construction plan and a parameters assignment is fixed, navigation in the solutions space is governed just by the index selector that computes index assigments which define different realizations. 7. Given an abstract plan, a parameters assignment and and index assignment, an anchor can be computed if there are not numerical impossibilities. 8. The functional units are reusable to solve problems which are not geometric constraint solving problems but are related. For example, in [10] the tool-box is applied to deal with requirements of concurrent engineering applications. Abstract problem SELECTOR ANALYZER Abstract plan Index Assignment Parameter assigment CONSTRUCT Geometry assignment Figure 7: Architecture data-flow diagram. 8 Summary We have presented a general architecture for constructive geometric constraint solvers. The architecture is based on three functional units: the analyzer, the index selector and the constructor. Functional units have been precisely defined in terms of the entities which are their input and output. These entities are: the abstract problem, the abstract construction plan, the parameters assignment and the index assignment. To illustrate the concepts, we have used functional capabilities which are specific to the ruler-and-compass constructive geometric constraint solving technique. But the concepts apply to any constructive approach. All what is needed is to replace the set of geometric elements, the constraints available and the set of basic constructions with those in the constructive approach of interest. Acknowledgements This research has been supported by the CICYT under the project TIC2001-2099-C03-01. References [1] B. Aldefeld. Variation of geometries based on a geometricreasoning method. Computer-Aided Design, 20(3):117–126, April 1988. [2] W. Bouma, I. Fudos, C. Hoffmann, J. Cai, and R. Paige. Geometric constraint solver. Computer-Aided Design, 27(6):487– 501, June 1995. [3] B.D. Br¨uderlin. Symbolic computer geometry for computer aided geometric design. In Advances in Design and Manufacturing Systems, Tempe, AZ, Jan. 8-12 1990. Proceedings NSF Conference. [4] B.D. Br¨uderlin. Using geometric rewrite rules for solving geometric problems symbolically. In Theoretical Computer Science 116, pages 291–303. Elsevier Science Publishers B.V., 1993. [5] C. Durand. Symbolic and Numerical Techniques for Constraint Solving. PhD thesis, Purdue University, Department of Computer Sciences, December 1998. [6] C. Essert-Villard, P. Schreck, and J.-F. Dufourd. Skecth-based pruning of a solution space within a formal geometric constraint solver. Artificial Intelligence, 124:139–159, 2000. [7] I. Fudos and C.M. Hoffmann. A graph-constructive approach to solving systems of geometric constraints. ACM Transactions on Graphics, 16(2):179–216, April 1997. [8] D.J.H. Garling. A course in Galois theory. Cambridge University Press, 1986. [9] R. Joan-Arinyo. Triangles, ruler and compass. Technical Report LSI-95-6-R, Department LiSI, Universitat Polit`ecnica de Catalunya, 1995. [10] R. Joan-Arinyo, A. Soto, S. Vila, and J. Vilaplana. A framework to support multiple views in geometric constrain-b ased models. In E. Dekneuvel, editor, Proceedings of the 8th. IEEE International Conference on Emerging Technologies and Factory Automation ETFA’2001, Antibes-Juan les Pins, France, October 2001. 8th. IEEE. [11] R. Joan-Arinyo and A. Soto-Riera. A correct rule-based geometric constraint solver. Computers & Graphics, 21(5):599– 609, 1997. [12] R. Joan-Arinyo and A. Soto-Riera. Combining constructive and equational geometric constraint solving techniques. ACM Transactions on Graphics, 18(1):35–55, January 1999. [13] M.V. Luz´on. The root identification problem in constructive geometric constraint solving. PhD thesis, Universidade da Vigo, 2001. Writen in spanish. [14] N. Mata. Constructible Geometric Problems with Interval Parameters. PhD thesis, Dept. LSI, Universitat Polit`ecnica de Catalunya, Barcelona, Spain, 2000. [15] J.C. Owen. Algebraic solution for geometry from dimensional constraints. In ACM Symp Foundations of Solid Modeling, pages 397–407, Austin, TX, 1991.