Interactive Knowledge Elicitation for Application

0 downloads 0 Views 441KB Size Report
Numero Special, Actes de MICAD '95. ISSN 0298-0924, V. 10, N. 1-2/1995, pp. 71 - 93 ..... For each xi in X, let Pref(xi, X) = x1°…°xi-1 and Suf(xi, X) = xi+1°…°xk.
Revue Internationale de CFAO et d'informatique graphique Numero Special, Actes de MICAD '95 ISSN 0298-0924, V. 10, N. 1-2/1995, pp. 71 - 93, 1995

Interactive Knowledge Elicitation for Application Dependent Feature Evaluation supported by Conditional Attributed Rewriting System F. Mandorli(1), P. Bottoni(2), P. Mussio(3), U. Cugini(1) (1) KAEMaRT Group - Faculty of Engineering, The University of Parma (2) Dep. of Physics, The University of Milan (3) Dep. of Computer Science, University "La Sapienza" of Rome

SUMMARY: According to the general design theory, a design process is a cyclic activity that transfers the model of the design object from the design specification to the design solution. During this activity experts in different phases of the production process (e.g. design, manufacturing, handling, etc.) cooperate to propose, evaluate and adapt, in a stepwise manner, the model to the working environment requirements. This cooperative methodology is general in that it was proved in different fields from aerospatial, to electronic, to mechanical. However each implementation is highly application-dependent. Our approach implements the general design approach allowing the design and implementation of specific support systems, and provides tools to customize the systems with rules and strategies depending on the specific design application. In this work we stress the interaction aspects which allow users to elicit their knowledge and to customize their own design system. The customization is based on the definition of the features that are significant for the specific field. Features for different fields are represented in terms of rewriting rules of a particular kind of conditional attribute rewriting system (CARW). The central components of a prototype implementation, of the proposed interactive system, are introduced and discussed together with examples of interactive rule definitions. KEYWORDS: General Design Theory, Knowledge Elicitation, Visual Interface, Form feature, Rewriting systems

1

Revue Internationale de CFAO et d'informatique graphique Numero Special, Actes de MICAD '95 ISSN 0298-0924, V. 10, N. 1-2/1995, pp. 71 - 93, 1995

1. INTRODUCTION To realize intelligent CAD systems that can support designers during their activity, it is essential to analyze and formalize the design process in order to identify and to represent the different kinds of knowledge involved in it. Many studies have been carried out in this field of research during past years; in our work we take as reference for the design process representation the theory called General Design Theory (GDT) [YOS '81 - TOM '87 - TAK '90]. Following this theory, the design activity is described as an evolutionary process that step by step transfers the model of the design object from the design specification to the design solution: "... a designer starts with the functional specification of a design object and continues the design process until a design solution is obtained. During this process, the design object model is refined in a stepwise manner ". [TAK '90] To perform this activity, different experts in the different phases in the production process (e.g. design, manufacturing, handling, assembling, process planning, etc.) interact with the common model of the design object (traditionally the technical drawing). The model is step by step evaluated and modified to ensure that the design object satisfy all the conditions that are imposed not only by the design specifications, but also by all the physical, technological, and marketing constraints related with the design object production. In our approach we stress that the model constitutes the declarative knowledge involved in the design process, as the adaptation process is driven by procedural and control knowledge. One of the problems to be solved to automate the design process is how to represent all the different types of knowledge that are involved in the design activity and how to embed such knowledge in the system. To avoid additional complexity related with proper representation of elements (syntax) and of their meaning (semantics) when different forms of knowledge representation are involved, we suggest the use of a homogeneous representation in form of conditional attributed rewriting systems (CARWs) [MAN '93 - BOT '93a]. In the present work the design object (declarative knowledge) is a hybrid Boundary-Feature model, represented in terms of attributed symbols. Design and evaluation rules (procedural knowledge) are represented in terms of attributed conditional rewriting rules. The strategies for model design and evaluation (control knowledge) are represented in terms of meta-rules. Rules and Meta-rules are processed by a common interpreter (inference engine). This approach allows a unified management of a design-related process, based on the concept of features. Within our work we refer to a feature as any named set of structures identified as useful to design object interpretation. In the current work we present a visual interface to define evaluation rules, formalized in terms of conditional attributed rewriting rules of conditional attributed Lindenmayer systems with interaction (CAILs) [MUS '88]. The set of all the strings constituting a rule in such a rewriting system is a context-free language. A formal

2

Revue Internationale de CFAO et d'informatique graphique Numero Special, Actes de MICAD '95 ISSN 0298-0924, V. 10, N. 1-2/1995, pp. 71 - 93, 1995

specification of a context-free grammar generating this language is given. A visual interface exploits this definition to allow experts of different fields to interact with the graphic representation of this specification realizing a knowledge elicitations process. This graphic representation is given in terms of syntactic graphs [SEB '89]. A designer can use the same interface to test the rules and to enrich the system's rule libraries. In Fig. 1 it is shown how different kinds of knowledge are organized and linked together. Procedural Knowledge

Declarative Knowledge

Design Rules Evaluation Rules

Boundary-Feature Model

Rewriti ng Rules

Attributed symbols

Control Knowledge

Inferen ce Engine

Expert System s Therm inology

Design Strategies Evaluation Strategies

Model Manager

CAD Systems Therm inology

Rewriti ng Meta-Rules

Interpreter

Knowledge El icitation Visual Interface Rule Definition Grammar

Rewriti ng Systems Therminol ogy

Figure 1

-

Knowledge Representation

In order to validate our ideas a prototype version of the visual interface has been developed and integrated with an extended version of an interpreter for rules evaluation [MAN '91]. An extension of our LISP data structure has been studied in order to be able to represent non manifold attributed boundary models of 3D solid objects. In the present implementation the object model is created using the solid modeler kernel of ACIS [SPA '91]. ACIS has been chosen because its capability to represent exact geometry and attributes related with solid object models.

2. OVERVIEW ON FEATURE-BASED METHODOLOGIES Traditional CAD systems are able to represent and to manipulate only geometric models. In order to represent also technological and functional information related with a design object, new models and methodologies are required. These new methodologies are called feature-based methodologies. Feature-based methodologies are based on the assumption that technological and functional information can be related with the shape of the part. In other words, following these methodologies, a design object is represented in terms of subparts having a shape with a functional meaning (form feature). In our work we refer to a form feature as "a group of topological and geometric entities which have a functional meaning in a given context" [CUG '88] denoted by

3

Revue Internationale de CFAO et d'informatique graphique Numero Special, Actes de MICAD '95 ISSN 0298-0924, V. 10, N. 1-2/1995, pp. 71 - 93, 1995

a name. This definition points out and links together the double nature of a form feature: its shape, based on geometric and topological aspects and the meaning an observer associates with it in a given context. The concept of form thus subsumes that of shape, in that shape is defined as what emerges from a configuration of entities according to topology and geometry alone, whereas form is to be considered as what emerges from attachment of semantic properties to this configuration as related to the function an entity has to perform in a given context. This description enriches those discussed in [ SHA '88 - BRA '89], and due to the formalism here discussed, allows its specialization to real cases. We can identify two main methodologies dealing with features: design by feature and feature recognition. The intent of design by feature is to provide designers with a set of functional primitives (usually organized into form feature libraries) which can be combined to obtain complex object descriptions [OST '87 - PRA '89 - SHA '89 - ROS '90 - LAA '91a - RAN '93]. The control of the correctness of meaning (semantics) of form features during the design process is one of the crucial points to be solved to successfully utilize this approach. Feature recognition, as well as feature extraction and feature transmutation [PRA '89], are techniques that have been developed in order to perform model evaluation. The aim of the evaluation is the extraction of the implicit information present into the model and its organization in an explicit way that depends on the field in which the evaluation is performed. We will refer to this techniques as model evaluation techniques. Evaluation techniques directly depend upon the representation of the model. Considering here only 3D models, algorithms and rule-based systems exist for a CSG [LEE '87 - PER '90 - WAC '93] as well as for a B-rep [KYP '80 - HEN '84 FAL '89 - SAK '90 - LAA '91b - MAN '91 - COR '91 - CUG '92 - COR '93 - REG '93] model evaluation. A particular example is given in [CUG '91], where the proposed system is able to deal with 2D and 3D models in a homogeneous environment based on CAIL systems.

2.1. THE PROPOSED APPROACH: INTERACTIVE KNOWLEDGE ELICITATION Feature are application dependent, which poses a serious problem for featurebased methodology, when it comes to the general definition of features and design solutions. For different fields and different applications, different feature definitions are required. In an integrated production system, users of to different application fields need to interact with a common design object model, to perform various reasoning tasks depending on their specific field. What is needed, is a system which the user can customize to his/her own field of application, defining the features that are relevant for this reasoning. The system should then provide all the functionality to add/evaluate features

4

Revue Internationale de CFAO et d'informatique graphique Numero Special, Actes de MICAD '95 ISSN 0298-0924, V. 10, N. 1-2/1995, pp. 71 - 93, 1995

to/from the design object model maintaining the model consistence. We propose to adopt an integrated design/evaluation approach based on the notion of feature as introduced in the previous section, and to formally represent the different kinds of knowledge involved in the production process using Conditional Attributed Lindenmayer Systems with Interaction (CAILs), presented in the next section. Design and evaluation functionality are represented in terms of CAIL rules. An internal computerized representation of CAIL rules has been then implemented to embed in the system the formal representation of declarative, procedural and control knowledge. The visual language [BAR '92] of syntactic graphs has been chosen as external representation of the structure of the rules, in order to define a visual interface. A transformation has been defined to map the external representation to the internal one. Using the visual interface experts can easily customize the system defining new features, design/evaluation rules, and meta-rules. Rules and meta-rules can be tested and/or stored into appropriated libraries using the same interface.

3. REWRITING SYSTEMS AS FORMAL DEFINITION OF THE STEPWISE MODEL EVALUATION In our approach we look at the design object as a set of features. Features can be of different types. The set of all the types of features managed in a design process is called T. The set of all the names of features identified in a design process is called Id. These features can be characterized by sets of attributes taking values in welldefined domains. The set of attributes used to characterize features is called ATTR. Definition: A description  of a feature is a triple =, where:nId is the identifier of the described feature and individuates the description uniquely; D={,…,}, aiATTR, ai?ai if i?j, viDai i=1,…,s is the finite set of the descriptors; F is a collection of sets {F1,…,Fr}, FiP(Id-{n}) where P denotes the power set and (i=1,…rFi)D?  contains the identifiers of the features composing the structure identified by n [BOT '93b]. A special attribute in D is 'TYPE'. The domain of 'TYPE' is the set T. The description of an element can also be represented as an attributed symbol. An attributed symbol is an m+1-tuple of elements, where the first element tT is the symbol and the following ones are the properties. The set of attributes D is enriched with the identifier n and a suitable coding of F. The description of a design object can thus be represented as a string of attributed symbols. The interpretation process can thus be modelled as a rewriting process [BOT '92]. At the lowest level symbols (called atomic symbols) are used to represent the

5

Revue Internationale de CFAO et d'informatique graphique Numero Special, Actes de MICAD '95 ISSN 0298-0924, V. 10, N. 1-2/1995, pp. 71 - 93, 1995

boundary features of the object. Attributes are used to express relationships among features as well as their properties. In the atomic symbols the set of sub-descriptionnames is empty. At an higher level symbols are used to represent form features. However, at this level attributes represent properties among form features and their relationships. In other words, at each level symbols represent a syntactic specification of the object, while symbol attributes allow a representation of semantics. The model evaluation can be seen as an activity starting from elementary symbols (in our case the boundary symbols) and continuing until some classification is obtained (which fulfills the goals of the evaluation) or no further improvement can be done. This activity is made recognizing those sets of symbols which form elementary form features, and then grouping these form features into more complex ones. Any step in the evaluation process is regarded as an action leading to the identification of a complex structure denoted by a symbol (feature), starting from string of symbols describing simpler structures. Each grouping action is regarded as a rewriting activity in which a string of attributed symbols is rewritten into a new one. Such an activity can be formalized by the definition of CARWs [BOT '93a]. Definition: A CARW is defined by a semantic domain D = (D, D, D) and a rewriting system RW=(V, F, I). D D D

is a set of sets of values. is a set of functions. is a set of predicates, also comprising the constant predicates true and false.

V F I

is a finite set of symbols called the alphabet. is a finite set of productions. is the interpreter, i.e. the specification of the direct generation relation.

xV, A(x), called set of attributes, A(x), D(x)D which specifies the possible values an attribute  can assume when associated with the symbol x. D(x) is called the domain of the attribute  for the symbol x. Each production p is of the form: , denoting that for  to be rewritten as , it must be embedded in the context represented by 1 and 2. 1=11, …, 1m V* 2=21, …, 2n V*. V+ is called the rewriting part of the antecedent, =1, …, t V* is called the consequent. pF, pD, p:D(1)…Ds(1m)…Dq(2n) {true, false}. p is the condition associated with p.

6

Revue Internationale de CFAO et d'informatique graphique Numero Special, Actes de MICAD '95 ISSN 0298-0924, V. 10, N. 1-2/1995, pp. 71 - 93, 1995

pF, rp which is a finite set of semantic rules of the form: i(j)= fi(1(11)2(11)…s(2n)), where fiD. Semantic rules compute attributes of the consequent as a function of those of the antecedent. The interpreter I specifies how to apply the rules in P to directly generate a string Z from a different one W, both being strings over V (in symbols W  Z). Two main strategies (and hence interpreter types) have been proposed for direct generation: sequential and parallel. In both strategies the first step consists of finding all the occurrences of antecedents in the string to be rewritten. At the end of this step a set of rules, whose antecedents appear in the string, has been selected. The sequential strategy then applies only one of these rules, i.e. only one instance of one antecedent is rewritten as its consequent (this strategy is typical of Grammar-like rewriting systems [SAL '73 - ROS '79]). Instead, the parallel strategy simultaneously substitutes all antecedents of the rule selection by their consequent, thus applying all the rules in the set at the same time. This strategy is typical of Lindenmayer-like systems [LIN '68 - SAL '73 - ROS '79]. In both cases, semantic rules in the set rp are computed when the rule p is applied. We adopt a special kind of CARWs, namely Conditional Attributed Lindenmayer Systems with Interaction (CAIL) [MUS '88]. CAILs are characterized by an interpreter which specifies that direct generation occurs by simultaneous application of rules as follows: Let X = x1°x2°…°xk be a string over V. For each xi in X, let Pref(xi, X) = x1°…°xi-1 and Suf(xi, X) = xi+1°…°xk. Let W and Z be words over V such that W=u1°w1°…°ut°wt°ut+1, Z=u1°z1°…°ut°zt°ut+1 where uiV* for i=1,…,t+1 wi = wi1°…°wim i, i=1,…,t Definition: W directly generates Z (in symbols W  Z) iff: wi pF, s.t. p=, p((i11)…q(i2n)) = true, Pref(wi1, W)= u1°…°i1 and Suf(wim, W)=i2°…°u t+1 This is to say that rewriting occurs by substitution of wi by zi if wi is embedded in the proper context and the associated condition evaluates to true. Conditions of CAILs specify the constraints that a given disposition of symbols has to satisfy in order to constitute a form feature and therefore embed the expert's knowledge into the evaluation rule. CAILs are used to recognize descriptions of form features from descriptions of form features at a lowest level of abstraction. A conditional attributed rewriting system can be converted into a recognition device by specifying a set of words on V, and a set of axioms Ax. The triple can be used as a device to recognize a word y if y can be transformed into an axiom xAx.

7

Revue Internationale de CFAO et d'informatique graphique Numero Special, Actes de MICAD '95 ISSN 0298-0924, V. 10, N. 1-2/1995, pp. 71 - 93, 1995

Definition The language recognized by the CAIL (RW, D) with a set of axioms Ax is: L(RW, D, Ax) = {y | xAx, n , yLn(x)}, where: L0(x) = {x}, Lk+1(x) = {y| z, zLk(x), y  z}. For our purpose, the CAIL alphabet must contain symbols representing the entities in the design object model. The lowest level of the object model representation is given in terms of object's boundary. As consequence, CAIL alphabets are defined to include at least atomic symbols denoting entities at the lowest level of abstraction: V = { FACE, LOOP, EDGE, VERTEX }

For each atomic symbol belonging to V a set of attributes together with their domains has been defined. At this level the attributes are used to represent the topological and geometrical information of the boundary entities represented by symbols. Each instance of a symbol can be identified using his name; the domain of name is the set of possible identifiers. We call VERTEX_ID, EDGE_ID, LOOP_ID, FACE_ID the set of identifiers respectively for the names of the symbols VERTEX, EDGE, LOOP and FACE. Also recognized features have set of identifiers. Here we give as example the set of attributes for the symbol POCKET, whose instances describe a pocket recognized in the object model. A(POCKET) = {IDENTIFIER BASE ENTRANCE LATERALS GEOM_TYPE }

to complete the example we give also the domain of the attributes of the same symbol: DPOCKET(IDENTIFIER) DPOCKET(GEOM_TYPE) DPOCKET(BASE) DPOCKET(ENTRANCE) DPOCKET(LATERALS)

= = = = =

P(POCKET_ID) Subset of the identifiers of the pocket {CYLINDER POLYHEDRON} P(FACE_ID) Subset of the identifiers of the face P(FACE_ID) Subset of the identifiers of the face P(FACE_ID) Subset of the identifiers of the face

Where P(X) represents the powerset of set X. The value of the attributes BASE, ENTRANCE and LATERALS represents pointers to the components of the feature pocket. An informal description of all the atomic symbols belonging to the defined CAIL alphabet can be found in Appendix A.

4. THE RULE DEFINITION GRAMMAR The set of all and only the strings corresponding to CAIL rules, according to the scheme , constitutes a context-free language. Both strings defining rules and strings of attributed symbols describing the model,

8

Revue Internationale de CFAO et d'informatique graphique Numero Special, Actes de MICAD '95 ISSN 0298-0924, V. 10, N. 1-2/1995, pp. 71 - 93, 1995

can be suitably coded and employed in an automatic system for model evaluation. The implementation language adopted to develop our prototype system is LISP. We chose LISP because its similarity with the adopted model formalization based on attributed symbols. In order to maintain compatibility among different dialects of COMMON LISP, the LISP data structure is based on the very basic LISP data, i.e. symbols and lists. No further data types are defined. LISP symbols are named data object [STE '90]. Each LISP symbol has a name, called its print name. Given a symbol, it is possible to obtain its name in form of a string. Conversely, given the name of a symbol as a string, it is possible to obtain the symbol itself. LISP symbols have a component called the property list, or plist. By convention this is always a list whose even-numbered components (calling the first component zero) are property names, and whose odd-numbered components are associated property values. This value can be any LISP data type. Functions are provided for manipulating such property lists. Our formal definition of feature is coded in a LISP symbol as follow: the type of the feature together with an index that univocaly identify the instance of the feature are represented using the print name of a LISP symbol. The print name is compound concatenating a string of chars denoting the type of the feature with a string of digit denoting the index of the feature instance. The set of couples attribute-value are coded using the property list of a LISP symbol: attribute-names are represented by the even-numbered components of the list as attribute-values are represented by odd-numbered components. Descriptions of form features are stored into a data structure from which identified descriptions can be extracted and to which new descriptions, constructed according to the CAIL rules, can be added. In the adopted coding of rules, the defines the conditional actions that select from the data structure all the instances of the symbols specified in the antecedent of the rule. Only those instances that satisfy the non contextual conditions imposed on the symbols in the condition part of the rule are selected. The part define the actions which test the satisfaction of attributes of the selected symbols according to a set of contextual conditions (i.e. conditions that put in relationship the attributes of different symbols). The defines the actions which perform the rewriting and evaluate the semantic rules. A context-free grammar, called rule definition grammar, has been developed to specify the set of sentences constituting a CAIL rule in the proposed coding. In order to implement an interactive interface for CAIL rules definition, two aspects have to be taken into account: the internal and external form of the rules. By internal form we mean the encoding of the rule in an executable language (LISP in our case) as stored within the system; by external form we mean the iconic representation of the rule that is presented to the user through the visual interface. The internal format of a CAIL rule is a nested list in LISP language that describes all the commands that have to be executed when the rule is interpreted. The external format of the rule is given using the visual language of the syntactic graphs, corresponding to the productions of the rule definition grammar, representing a correct CAIL rule. Interacting with the syntactic graphs the user is step by step lead to create a sentence that belongs to the language of correct CAIL's

9

Revue Internationale de CFAO et d'informatique graphique Numero Special, Actes de MICAD '95 ISSN 0298-0924, V. 10, N. 1-2/1995, pp. 71 - 93, 1995

rules. Fig. 2 highlights the role of the rule definition grammar. The user manipulates syntactic graphs to define internal representations, in the form of LISP executable lists, of CAIL rules, according to the productions of the rule definition grammar. For each CAIL rule a univocal internal LISP representation exists. The syntax of the rule definition grammar can be found in Appendix B. CAIL Rule Formal Rule Representation

Rule External Representation

Rule Definitio n Grammar

Syntactic Charts

Rule Internal Representation LISP Data Structure

Figure 2 - The role of the Rule Definition Grammar

5. THE SYSTEM ARCHITECTURE In our implemented prototype system the boundary data structure of design object is imported from a semi-integrated commercially available solid modeler kernel (cf. ACIS, [SPA '91]) and incorporated in our defined object model structure of LISP data. We use ACIS as external design system to create the boundary representation of the object model; the model is then stored in a text file using ACIS predefined format, containing all the topological and geometrical entities of the boundary representation, as well as all the relationships among them. The created models are organized into a model library. A text file containing an object model can be selected from the library and imported into the LISP environment. This operation is performed reading the text file and mapping every topological entity present in it, into LISP symbols and mapping the geometrical information into attributes of the symbols. The visual interface is made by two main modules: the graphic module and the interaction module. The graphic module contains the functions to graphically represented the object model into the graphic area and to perform zoom and translation operation as well as to set the colors for the background, the object model and the features that have been identified using a rule. The interactive module contains all the methods to manage the interaction with the

10

Revue Internationale de CFAO et d'informatique graphique Numero Special, Actes de MICAD '95 ISSN 0298-0924, V. 10, N. 1-2/1995, pp. 71 - 93, 1995

user (i.e. methods to show and hide buttons and to call the right actions associated with a button). Following the productions of the rule definition grammar, the modules for rules and symbols definition select the appropriate syntactic graphs from a predefined library. The selected graph is presented to the user in the area of buttons. The sequence of operations performed by the user interacting with the syntactic graph are mapped into the internal representation of a CAIL rule. New defined rules and symbols can be stored into rule and symbol libraries. The interpreter is used to process rules: the internal representation of the rule is passed to the interpreter that is able to call in the right order and with the right parameters the functions that perform the actions described into the antecedent, condition and consequent part of the rule. The adopted interpreter is an extension of the one presented in [MAN '91]. In Fig. 3 it is possible to see the graphic representation of the mentioned architecture.

Visual Interface Graphic Module

Design System (ACIS)

Object Models

Interpr eter

Object Model (LISP DS)

Interactive Module

Rules Definer Symbols Definer

Libraries

Rules

Symbols

Syntactic Charts

Figure 3 - The System Architecture

6. THE VISUAL INTERFACE The implemented visual interface is illustrated with reference to the hardcopies presented in Fig. 4 Fig. 5 and Fig. 6. The central left part of the interface is dedicated to the graphic area. When an object model is imported into the system, its 3D graphic representation is shown in this area (in the example all three figures present into the graphic area the top view of a microwave filter). When a rule is applied with success, and a feature is

11

Revue Internationale de CFAO et d'informatique graphique Numero Special, Actes de MICAD '95 ISSN 0298-0924, V. 10, N. 1-2/1995, pp. 71 - 93, 1995

recognized, the graphic entities that compound the recognized feature change their color. The bottom part is the area of messages. Looking at this area the user can see the forming of the string denoting a rule during its definition. The right and the top parts of the interface are dedicated to the interaction with the user. All the buttons to perform the user-system interaction will appear into these areas. The visual interface can be used in two different modes: the evaluation mode and the rule definition mode. During the evaluation mode the user selects and fires pre-defined rules, and looks at the graphic representation pf the result of the computation in the graphic area. In this phase the right part of the interface presents buttons to change the point of view on the object (in Fig. 4 it is possible to see buttons for rotation, translation and zoom).

Figure 4 - The visual Interface during the evaluation mode In the rule definition mode the right part of the interface contains the syntactic graph and the selection menus that allow the user to define a new rule. A syntactic graph represents a production of the rule definition grammar. The graphs are presented in the interface according the production allowed at each state of the computation. Each graph is presented as a set of buttons that, depending on the state of the computation, can be available or hidden. When a terminal symbol is needed, it can be directly typed in by the user, or it can be selected from an appropriate pop-up menu, located below the graph, containing a set of predefined names of symbols.

12

Revue Internationale de CFAO et d'informatique graphique Numero Special, Actes de MICAD '95 ISSN 0298-0924, V. 10, N. 1-2/1995, pp. 71 - 93, 1995

Figure 5 - Definition of the antecedent part of a rule

Figure 6 - Definition of the condition part of a rule Fig. 5 shows the visual interface during the definition of the antecedent part of a

13

Revue Internationale de CFAO et d'informatique graphique Numero Special, Actes de MICAD '95 ISSN 0298-0924, V. 10, N. 1-2/1995, pp. 71 - 93, 1995

rule, in which the user has just selected the symbol LOOP from the set of possible terminal symbols defined by the set of productions: < PROP_SH >

::= "VERTEX" | "FACE" | "EDGE" | "LOOP"

Fig. 6 shows the visual interface during the definition of the conditional part of a rule. The possible actions that the user can perform during this phase are the one represented by the production: < CONDITION >

::= < PAR > < GET_PROP > < TEST_C > < PAR >

In the bottom part of the interface the area of messages shows the internal format of the sentence representing the rule that the user is defining.

6.1. EXAMPLES OF INTERACTIVE RULE DEFINITION In this section we give some examples of rule definition. One of the possible ways to find a simply connected pocket in a boundary model is to look for two loops of edges having a common set of adjacent faces; one loop must be external and concave, and the other internal and convex. The antecedent part of this rule must define the actions to retrieve from the data structure the loops that satisfy the condition to be internal and convex and the loops that satisfy the condition to be external and concave. The condition part must define the actions to verify that two loops have an equal set of adjacent faces. The consequent part must define the actions to create the new instance of symbol POCKET and to put it into the data structure with the proper values of the attributes. The next figures show the syntactic graphs and the productions associated with them which lead to the derivation of the string corresponding to the rule for pocket recognition. Due to lack of space the example is limited to the definition of the antecedent part of the rules. First the user interact with the graph in Fig. 7 RULE

ANTECEDENT

CONDITION

CONSEQUENT

Figure 7 - Syntactic graph for the production RULE that corresponds to the set of productions < RULE >

::= < ANTECEDENT >+ < CONDITION >+ < CONSEQUENT >+

that is the only possible production in the initial state.

14

Revue Internationale de CFAO et d'informatique graphique Numero Special, Actes de MICAD '95 ISSN 0298-0924, V. 10, N. 1-2/1995, pp. 71 - 93, 1995

When the user selects the button labeled ANTECEDENT, the graph in Fig. 8 is presented into the visual interface (see also Fig. 5).

PROP_SH

FUNC_P

FEATUR E

FUNC_F

ANTECEDENT

Figure 8 - Syntactic graph for the production ANTECEDENT (see also Fig. 5) This graph corresponds to the set of productions < ANTECEDENT > ::= < PROP_SH> < FUNC_P>* | < FEATURE > < FUNC >*

The user then selects the button labeled PROP_SH to select from a menu of predefined string the value LOOP. This action correspond to the production < PROP_SH >

::= "LOOP"

Prosecuting on the selected branch of the graph, the user selects the button labeled FUNC_P that leads to the graph:

FUNC_S FUNC_P

TEST_P

VAL

PROP

Figure 9 - Syntactic graph for the production FUNC_P corresponding to the set of productions: < FUNC_P >

::= < FUNC_S > | < VAL> | < TEST_P > < VAL> | | < TEST_P > < VAL>

making the appropriated selections, the user can select the following set of

15

Revue Internationale de CFAO et d'informatique graphique Numero Special, Actes de MICAD '95 ISSN 0298-0924, V. 10, N. 1-2/1995, pp. 71 - 93, 1995

productions: < PROP >

::= "INTERN" ::= ""=" ::= "FALSE"

Then the interface go back to the graph presented in Fig. 8 and the user selects again the button FUNC_P to define a new constraint imposed on the loop symbol. The set of productions corresponding to the new constraint are: < FUNC_P > < PROP >

::= ::= ::= ::=

< TEST_P > < VAL> "TYPE" ""=" "CONCAVE"

This set of productions completes the definition of the first antecedent of the rule. The second antecedent can be defined in a similar way, making different selections. Prosecuting in the illustrated way, also the condition and consequent parts of the rule will be defined. The final internal representation of the rule will be: (

(

(LOOP (INTERN = NIL) (TYPE = CONCAVE)) (LOOP (INTERN = T) (TYPE = CONVEX))) (1 ADJ_FACES LIST= 2 ADJ_FACES)) ("POCKET" (BASE 1) (ENTRANCE 2) (LATERALS 1 ADJ_FACES))))

( (

A typical example of rule customization is to change the mentioned rule in order to recognize only cylindrical pockets. This can be done by imposing more constraints to the antecedent parts of the rule. The set of productions representing the new constraints are: < FILTER_S > < PROP >

::= ::= ::= ::=

< TEST_P > < VAL> "LOOP_GEOM" ""=" "CIRCLE"

The new internal representation of the rule becomes: (

( ( (

(LOOP (INTERN = NIL) (TYPE = CONCAVE) (LOOP_GEOM = CIRCLE)) (LOOP (INTERN = T) (TYPE = CONVEX) (LOOP_GEOM = CIRCLE))) (1 ADJ_FACES LIST= 2 ADJ_FACES)) ("CYLINDRICAL-POCKET" (BASE 1) (ENTRANCE 2) (LATERALS 1 ADJ_FACES))))

7. CONCLUSION The major issue addressed in this paper is the development of an interactive system for knowledge elicitation for CAD applications.

16

Revue Internationale de CFAO et d'informatique graphique Numero Special, Actes de MICAD '95 ISSN 0298-0924, V. 10, N. 1-2/1995, pp. 71 - 93, 1995

The proposed approach is based on the basic ideas and results of the general design theory and general feature methodology. In a first phase the different types of knowledge involved in the production processes have been identified and formally defined in terms of rewriting systems working on a string of attributed symbols. The string of attributed symbols is used to represent the object model as well as the rewriting rules represent the object model evaluation. The proposed system architecture is based on an interpreter of rewriting rules integrated with a visual interface for rules definition and a module for object modelization. In order to develop the visual interface a rule definition grammar has been defined, and the visual language of syntactic graphs has been adopted as interaction tools. A prototype version of the proposed interface has been developed and integrated with the rules interpreter. The implemented prototype system demonstrates the possibility to give to different experts a visual interface to embed in the system the knowledge about the different fields involved into the production process.

8. FUTURE WORK A conditional attributed rewriting system can also be converted to a generative device by specifying a set of words on V, the set of axioms Ax. The triple can be used as a device to generate a word y if y can be derived from an axiom xAx. Definition A language can be defined generatively as: L(RW, D, Ax) = {y | xAx, n , yLn(x)}, where L0(x) = {x}, Lk+1(x) = {y| z, zLk(x), z  y}. As direct consequence of that, CAIL can de used also to represent design rules. We are interested in making research in this area and in expanding the rule definition grammar in order to represent CAIL rules for design.

REFERENCES [BAR '92]

Barichella, E., Beretta, M., Dioguardi, N., Mussio, P., Padula, M., Pietrogrande, M., Protti, M., A Visual Environment for Liver Simulation Studies, Visual Languages and Applications, R. Korfage, T. Ichikawa (eds.), Plenum Press, in Press.

[BOT '92]

Bottoni, P., Mussio P. and Protti, M., Metareasoning as a tool for pattern recognition, Proc. 11th IAPR Conf. on Patt. Rec., vol. II, pp. 285-289, 1992

17

Revue Internationale de CFAO et d'informatique graphique Numero Special, Actes de MICAD '95 ISSN 0298-0924, V. 10, N. 1-2/1995, pp. 71 - 93, 1995

[BOT '93a]

Bottoni, P., Mussio, P., Protti, M., Metareasoning in the determination of image interpretation strategies, to appear in Pattern Recognition Letters

[BOT '93b]

Bottoni, P., Mussio P. and Protti, M., A data structure for form feature based image interpretation, to appear in Proc. 7th Int. Conf. on Image Analysis and Processing

[BRA '89]

Braid, I.C., Pratt, M.J., Anderson, J., Current trends in product modeling and design automation, CAM-I & Dorset Institute, Department of Manufacturing, 1989.

[COR '91]

Corney, J. and Clark, D.E.R., A Method for Finding Holes and Pockets which connect Multiple Faces in 2 1/2 D Objects, Computer Aided Design, 23, 10, pp. 658-668, 1991.

[COR '93]

Corney, J. and Clark, D.E.R., Efficient Face-Based Feature Recognition, in: Second ACM/IEEE symposium on solid modeling and applications - Solid Modeling '93, pp. 313 - 322, Montreal, 1993.

[CUG '88]

Cugini, U., Falcidieno, B., Mussio, P., Protti, M., Towards automatic indexing of product models in a CIM environment, Lang. For Automation: Symbiotics And Intel. Rob., 1988

[CUG '91]

Cugini, U., Falcidieno, B., Giannini, F., Mussio, P., Protti, M., Taskdriven description of mechanical parts in a CAD system, in: First International Conference on Artificial Intelligence in Design - AID '91, pp. 407-419, 1991.

[CUG '92]

Cugini, U., Mandorli, F. and Vicini I., Form Features Recognition as a Technique for CAD-CAM Integration, in: Proceeding MICAD ‘92, pp. 115-126, Paris, February 1992.

[FAL '89]

Falcidieno, B. and Giannini, F., Automatic Recognition and Representation of Shape based Features in a Geometric Modelling System, Computer Vision, Graphics and Image Processing, 48, pp. 93-123, 1989.

[HEN '84]

Henderson, M.R. and Anderson, D.C., Computer Recognition and Extraction of Form Features: A CAD/CAM Link, Computers in Industry, 5, pp. 329-339, 1984.

[KYP '80]

Kyprianou, M.R., Shape Classification in Computer Aided Design, Ph.D. Dissertation, University of Cambridge, Cambridge, U.K., 1980.

[LAA ’91a]

Laakko, T. and Mäntylä, M., Feature-Based Modelling of Families of Machined Parts, Report TKO-B71, Department of Computer Science, Helsinki University of Technology, Helsinki, Finland, 1991.

[LAA '91b]

Laakko, T. and Mäntylä, M., A New Form Feature Recognition Algorithm, in Computer Applications in Production and Engineering: Integration Aspects Elsevier Science Publishers B.V. (NorthHolland), IFIP, pp. 369-376, 1991.

18

Revue Internationale de CFAO et d'informatique graphique Numero Special, Actes de MICAD '95 ISSN 0298-0924, V. 10, N. 1-2/1995, pp. 71 - 93, 1995

[LEE '87]

Lee, Y.C.and Fu, K.S., Machine Understanding of CSG: Extraction and Unification of Manufacturing Features, IEEE Computer Graphics & Applications, 7, 11, pp. 20-32, 1987.

[LIN '68]

Lindenmayer, A., Mathematical models for cellular interactions in development, Part I and II, J. Theoret. Biol., vol.18, pp.280-315, 1968.

[MAN '91]

Mandorli, F. and Vicini, I., A form feature automatic recognition system, in: Proceeding ICAR'91, Pisa, pp.1398-1403, 1991.

[MAN '93]

Mandorli, F., Otto, H., E., Kimura, F., A reference kernel model for feature-based CAD systems supported by conditional attributed rewrite systems, in: Second ACM/IEEE symposium on solid modeling and applications - Solid Modeling '93, pp. 343 - 354, Montreal, 1993.

[MUS '88]

Mussio, P., Padula, M., Protti, M., Attributed conditional L-systems: a tool for image description, in: Proc. 9th International Joint Conference on Pattern Recognition, IEEE Computer Society Press, pp. 607-609, 1988.

[OST '87]

Ostrowski, M.C., Feature-based Design using Constructive Solid Geometry, Internal Report, General Electric Corporate Research and Development, March 1987.

[PER '90]

Perng D., Chen Z.and Li, R., Automatic 3D Machining Features Extraction from 3D CSG Solid Input, Computer Aided Design, 22, 5, pp 285-295, 1990.

[PET '81]

Peter, R., Recursive functions in computer theory, Ellis Horwood Limited, 1981.

[PRA '89]

Pratt, M.J., A Hybrid Feature-Based Modelling System, Advanced Geometric Modelling For Engineering Applications Conference, F.-L. Krause and H. Jansen (eds.), Berlin, Germany, pp.177-189, 1989.

[RAN '93]

Ranta, M., Inui, M., Kimura, F., Mantyla, M., Cut and Paste Based Modeling with Boundary Features, in: Second ACM/IEEE symposium on solid modeling and applications - Solid Modeling '93, pp. 303 312, Montreal, 1993.

[REG '93]

Regli, W.C. and Nau, S.D., Building a General Approach to Feature Recognition of Matherial Removal Shape Element Volumes (MRSEVs), in: Second ACM/IEEE symposium on solid modeling and applications - Solid Modeling '93, pp. 293 - 302, Montreal, 1993.

[ROS '79]

Rosenfeld, A., Picture languages, Academic Press, 1979

[ROS '90]

Rossignac, J.R., Issues On Feature-Based Editing And Interrogation Of Solid Models, Computers & Graphics, pp. 149-172, 1990.

[SAK '90]

Sakurai, H.and Gossard D.C, Recognizing Shape Features in Solid Models, IEEE Computer Graphics & Applications, 10, 5, pp. 22-32, 1990.

[SAL '73]

Salomaa, A., Formal languages, New York, Academic Press, 1973

19

Revue Internationale de CFAO et d'informatique graphique Numero Special, Actes de MICAD '95 ISSN 0298-0924, V. 10, N. 1-2/1995, pp. 71 - 93, 1995

[SEB '89]

Sebesta, R.W., Concepts of programming languages, Benjamin Cummings, 1989.

[SHA '88]

Shah, J.J., Sreevalsan, P., Rogers, M.T., Billo, R., Current status of feature technology, Revised Report R-88-GM-04, CAM-I, Arlington, Texas, 1988

[SHA '89]

Shah, J.J. and Rogers, M.T., Feature Based Modeling Shell: Design and Implementation, ASME Computer and Engineering Conference, San Francisco, California, pp. 255-261 , 1989.

[SPA '91]

Spatial Technology, ACIS Interface Guide, Inc., Boulder, Colorado, 1991.

[STE '90]

Steele, G., L., Common LISP The Language, second edition, Digital Press, 1990

[TAK '90]

Takeda, H., Veerkamp, P., Tomiyama, T. and Yoshikawa, H., Modeling Design Processes, AI Magazine, pp.37-48, 1990.

[TOM '87]

Tomiyama, T. and Yoshikawa, H., Extended General Design Theory, in: Design Theory for CAD - Proceedings of the IFIP Working Group 5.2 Working Conference, H. Yoshikawa and E.A. Warman (eds.), pp.95-124, 1987.

[WAC '93]

Waco, D.L., Kim, Y., Geometric Reasonin for Machining Features Using Convex Decomposition, in: Second ACM/IEEE symposium on solid modeling and applications - Solid Modeling '93, pp. 323 - 332, Montreal, 1993.

[YOS '81]

Yoshikawa , H., General Design Theory and a CAD System, in: ManMachine Communication in CAD/CAM - Proceedings of the IFIP Working Group 5.2-5.3 Working Conference, T. Sata and E. A. Warman (eds.) , pp.35-53, 1981.

20

Revue Internationale de CFAO et d'informatique graphique Numero Special, Actes de MICAD '95 ISSN 0298-0924, V. 10, N. 1-2/1995, pp. 71 - 93, 1995

APPENDIX

A

To complete the description of the lowest level of the recognition device, the symbols describing the entities of the boundary model are here presented. For the attributes the domain have been left understood. Symbol Attribute

: :

SHELL NAME VERTEXES_LIST EDGES_LIST LOOPS_LIST FACES_LIST FEATURES_LIST

Symbol Attribute

: :

FACE NAME LOOPS GEOM_TYPE

Name of the symbol List of the vertexes of the object List of the edges of the object List of the loops of the object List of the faces of the object List of the recognized features

Name of the symbol List of the loops of the face Face's geometry type (CYLINDER, CONE, PLANE) Geometric parameters

GEOM_PARAM Symbol Attribute

: :

LOOP NAME EDGES ADJ_FACES FACE N_CONCAVE

Name of the symbol List of the edges of the loop List of the adjacent faces of the loop The face to which the loop belong Numbers of concave edges belonging to the loop Numbers of convex edges belonging th the loop Loop's type (CONCAVE, CONVEX, MIXT) T if the loop is internal, NIL if it is the boundary of the face

N_CONVEX TYPE INTERN

Symbol Attribute

: :

EDGE NAME ADJ_FACE_1 ADJ_FACE_2 VERTEX_1 VERTEX_2 SOLID_ANGLE

GEOM_PARAM

Name of the symbol First face adjacent to the edge Second face adjacent to the edge First vertex of the edge Second vertex of the edge Edge's solid angle type (CONCAVE CONVEX SMOOTH) Edge's geometric type (STRAIGHT, ELLIPSE, CIRCLE) Geometric parameters

VERTEX NAME COORD INC_EDGES

Name of the symbol Point coordinates list (Cx Cy Cz) List of the edges incident into the vertex

GEOM_TYPE

Symbol Attribute

APPENDIX

: :

B

This appendix presents the grammar, expressed in Backus Normal Form [PET '81], defining the

21

Revue Internationale de CFAO et d'informatique graphique Numero Special, Actes de MICAD '95 ISSN 0298-0924, V. 10, N. 1-2/1995, pp. 71 - 93, 1995

context-free language of all and only the strings representing CAIL rules. G= { T, N, P, S } T set of all the terminal symbols. N set of all the non terminal symbols. P set of production rules. S the goal of the grammar. Following we show the sets adopted symbols: T =

{ "A" "B" "C" "D" "E" "F" "G" "H" "I" "J" "K" "L" "M" "N" "O" "P" "Q" "R" "S" "T" "U" "V" "W" "X" "Y" "Z" "a" "b" "c" "d" "e" "f" "g" "h" "i" "j" "k" "l" "m" "n" "o" "p" "q" "r" "s" "t" "u" "v" "w" "x" "y" "z" "0" "1" "2" "3" "4" "5" "6" "7" "8" "9" ">" "=" | "" | "LENGTH=" | "" | "LENGTH" | "LIST

Suggest Documents