On the re-use of complex systems
Submitted to the Tools Europe 93 conference; rejected by the program committee.
----------------------------------------------------------------------------------Nicolas Revault LAFORIA, Boite 169, Tour 46, 2e ét., Universite Paris VI, 4, Place Jussieu F-75252 PARIS Cedex 05 France
E-mail:
[email protected] Phone: (33-1) 44 27 70 10 Fax: (33-1) 44 27 70 00
-----------------------------------------------------------------------------------
Position on November, 2000 (since September 1998) : Théma Univ. Cergy-Pontoise 33 bd du Port 95011 Cergy-Pontoise cedex … but also affiliated member of LIP6 :
[email protected]
Submission to Tools Europe 93
1.
N. Revault
Keywords:
Object oriented design, object oriented programming, software re-use, pluggability, semantic networks, database relations, database schema, relational model, normalization, prototype, meta-modelling, inference mechanism, production rules, expert system, Smalltalk. 2.
Introduction
Nowadays, the application of computers for industrial purpose is generalized to less and less formalized and predictable activities. So, the mastering of the corresponding engineering is getting more and more complex. The developments of systems in the field of artificial intelligence (A.I.) have been copping with this kind of difficulties for many years. Indeed, these systems allow representations of complex universes as well as specifications of non trivial transformation processes on such representations. These developments have shown that the tools to be elaborated must be more and more complex and powerful. It is now well known that object oriented programming (O.O.P.) is the good way for mastering this kind of tools. Many experimentations have shown that O.O.P. increases productivity through the re-use of elementary software components [Karlsson &al 92], [Ye 91]. However, like in mechanical engineering [Cox 86], applications that have first been built on the bases of single re-usable components, are now to be constructed by combination of large sets of such components, each already defining itself a part of application. We call pluggable this kind of re-usable programs. The notion of pluggability lets one think that different programs can be developed independently by different people, and then be put together to constitute a complex software organization [IEEE 86]. For these reasons, it seems that object oriented programming is a good way to focus on the problems of software organization over and above on the development of each individual program. In this paper, we describe an experimentation of this approach. We describe how we managed to plug two large applications. The first is a specification software environment that generates an object class structure to implement a model of any domain. The second application is a general inference mechanism that allows to express a reasoning on any independent class structure. This way, we build a coherent tool that transforms semantic networks to normal form database relations. Our work is inspired on a commercial product called SECSI1 (Expert System on Information System Design). The purpose of this product is to define a software environment for building a database schema2 from a "natural" specification given by an user. It presents a semantic representation model, called MORSE, that allows to represent complex data structures in the form of semantic networks. He also describes a transformation process to go from such a semantic net to an equivalent data representation consisting on normal form relations composing a database schema of the relational model. This transformation process is expressed in the form of an expert system. SECSI is based on the work of a Paris 6 university thesis [Bouzeghoub 86]. To realize our project, we used two different industrial software environments embedded in Smalltalk 80 (release 2.5). These have no connection at all and were developed by different programmers that have quite nothing in common except their use of the Smalltalk system. The first software is AckPro, an environment that has been developed at ACKIA 3 in collaboration with members of LAFORIA. It consists of a specification tool for the design and prototype of computer applications. It is based on graph manipulations. It allows to define a framework composed of generic concepts of a certain domain that are linked in an entityrelationship way. The specification of the concepts and their relationship define something like a 1 2
3
SECSI is commercialized by INFOSYS, France. In all this document, we use the word "schema" to indicate the named set of relations in a relational database [Codd 70]. ACKIA, 47 rue de Bellevue, F-92100 Boulogne, France.
On the re-use of complex systems
2
Submission to Tools Europe 93
N. Revault
"representational theory" of the domain modelled. It can be compiled to an "implementational theory" of the domain in the form of Smalltalk classes. These classes are then used to create instances of concepts in a domain specific editor. NéOpus system. It is an inference The second development tool we used is the mechanism integrated in the Smalltalk 80 environment. It combines first-order production rules in forward-chaining with Smalltalk objects. It is pluggable to any Smalltalk class structure modelling a certain domain, what can be illustrated by our work. It has been developed at LAFORIA during an university thesis [Pachet 92], and is now commercialized by HumanWare 4. In a way to emulate SECSI, it was obvious we could implement MORSE with AckPro, and then use NéOpus for implementing the transformation process of SECSI. Finally, we think this work illustrates in a good way how object oriented programming, and particularly Smalltalk, contributes to deal with complexity of A.I. software applications. It shows a way to implement a solution of a non trivial problem by using existing tools, and without the need of very much work. To present our work in detail, we will first describe the problem more precisely. We will specify the representation model of the MORSE semantic nets, recall some necessary facts about the relational model and the normal form relations, and then make explicit the transformation process of SECSI, introducing the SECSI rules. In the second part, we will propose our solution. We will describe the implementation of the MORSE semantic nets using AckPro, and then the implementation of the SECSI rules with NéOpus. Finally, we will try to evaluate the pros and cons of our construction. 3.
The Problem
The problem we propose to solve is to realize an application that transforms MORSE semantic nets to normal form relations. Each of these two kinds of objects yields a certain data representation. [Bouzeghoub 86] has shown that a data representation expressed in one of these two forms has an equivalent expression in the other form. The transformation process defined in SECSI does express this equivalency. This is done by intermediate of the production rules representing the transformation expertise. In order to implement the two kinds of data representations, we had to study the representation model for each of them: MORSE for MORSE semantic nets, and the relational model for the normal form relations. As we will see, there exists a relation between these two models. Once this context is defined we can describe the effective transformation process. Henceforth, we will indifferently use the MSN abbreviation for 'MORSE semantic nets', NFR for 'normal form relations', RM for 'relational model' and TP for 'transformation process'. 3.1.
MORSE: the representation model for the MSN
MORSE defines a framework for building semantic nets. On the one hand, it can be presented as a formal language [Bouzeghoub 84, 86] [Métais 88] including different types of objects and different types of possible links between objects, and on the other hand it can be considered as a graphical specification language for semantic networks. 3.1.1.
Terms of the language
In MORSE, one can distinguish several types of objects, or several concepts. There are atomic objects representing "leaf nodes" of networks; there are data-types specifying a domain for atomic objects; there are molecular objects aggregating atomic objects and representing "nonleaf nodes" of networks; there are also roles, qualifying molecular objects. Concerning the links that objects can entertain with each other in MORSE, there is the notion of atomic aggregation, that allows to constitute a molecular object from atomic objects; there is a link of molecular aggregation, for building a molecular object from other molecular 4
HumanWare, 66 avenue des Champs-Elysées, F-75008 Paris, France.
On the re-use of complex systems
3
Submission to Tools Europe 93
N. Revault
objects; there is a generalization link that gives possibility of refining a specification of molecular object by an inheritance protocol of atomic objects; there is also a domain link between atomic objects and data-types; finally, there is a link of functional dependency between atomic objects. 3.1.2.
An interpretation of MORSE
One can consider MORSE as an object oriented model to describe the structure of the real world objects that are to be represented in a database. Indeed, the notion of molecular object can be viewed, in terms of structure, as analogous to a notion of class in Smalltalk for example. A class inheritance hierarchy is in some sense matched by the hierarchy created by generalization links. The aggregation links can be considered as equivalent to a composition link of an object oriented paradigm. 3.1.3.
Graphical notations
The next figure shows an example of a graphic representation for a MSN. To limit the complexity of the example, we did not represent the data-types of atomic objects, and of course, neither the domain links. Rectangle representations are for atomic objects and ellipses are for molecular objects. The labels on the links express their types: 'p' is for atomic aggregations, 'o' for molecular aggregations, 'g' for generalization links, and 'df' for functional dependency links.
Figure 1: an example of MSN This example models a simple data structure for a vehicle supplier. CLIENTS (cli) and 5 AGENTS (agt) are two kinds of PERSONS (pers) to be represented. An ORDER (cmd ) is binding VEHICLES (vehi) to clients and a FOLLOW UP (suivi) is binding agents to orders. An agent is characterized by something like his localization, composed of a TELEPHONE NUMBER (tel) and an ADDRESS (adr) in functional dependency. 3.1.4.
Constraints
As we have just seen, MORSE gives the possibility to build data representations in the form of a network of inter-linked objects -i.e. MSN. In addition, it allows to expressed some constraints on a MSN. These constraints relate either to links or to objects. First, the links of atomic aggregation and of molecular aggregation are valued by cardinality constraints, like in the entity-relationship model [Chen 76]. To illustrate these constraints, let us come back to figure 1. In the simple data structure it represents, the notion of VEHICLE is aggregating the notion of NUMBER in a one to one link. That is to say that a VEHICLE has exactly one NUMBER, and that a NUMBER is the one of exactly one VEHICLE. Although these values are not visible on the graph, they are characteristics of the 'p' link between the two objects. 5
We are sorry the example we show (from screendumps) was first written in french, so, the abbreviations could appear quite strange...
On the re-use of complex systems
4
Submission to Tools Europe 93
N. Revault
Then, an atomic aggregation can be conditioned according to the value of a role of the molecular object it goes out of. We will illustrate this kind of constraint when commenting figure 3. Concerning objects, the main constraint is one about atomic objects. An atomic object -or a combination of some atomic objects- can be considered as a primary key6 of the molecular object it contributes to compose. We can give an idea of this constraint by the VEHICLE/NUMBER link of figure 1 described above. It is clear on this example that its NUMBER is a key for a VEHICLE. 3.2.
RM: the representation model for the NFR
In SECSI, the goal is to transform a MORSE semantic net into normal form relations (NFR). These NFR in turn yield directly the schema of a database of the relational model (RM). So the relational model constitute the representation model for the normal form relations. The relational model (RM) is due to [Codd 70]. It was introduced to palliate the inadequacies of the old models of non inferential, formatted data systems. It consists on a "model based on n-ary relations, where a normal form for data base relations, and a concept of a universal data sub-language are introduced". According to Codd, a database schema is in a normal form if each of its composing relations is "defined on simple domains -domains whose elements are atomic (non-decomposable) values". In the RM terminology, NFR are constituted with named attributes, each of certain domain. This is indeed the theoric specification of the physical implementation of a database: tables, composed of fields, each of a certain data-type. 3.3.
Relation between MORSE and RM
For our work, it is important to observe that the RM is indeed a sub-model of MORSE. As a matter of fact, the MORSE formalism -and also its graphical notation- is well suited for representing NFR. The notion of data-types in MORSE exactly matches the one of simple domain described by [Codd 70]. So if we consider a molecular object just bound to some atomic objects, each of it being linked to a certain data-type, one can think of it as representing a NFR, the attributes of which are represented by the atomic objects. The next figure illustrates what we mean: the left part of it shows a MORSE molecular object representing a vehicle. This one aggregates atomic objects that are each linked to a certain data-type (represented by left-pointing pentagons). The right part of the figure shows a textual description of a relation called "vehicle" composed of named attributes with their domain. It seems to be clear that the two parts of the figure represent the same data structure...
vehi p
num
p
tdm
p
p
type d
d
p
d String
col
pow
d d
Vehicle =
Integer
Figure 2: equivalence between MORSE molecular objects and RM relations. Finally, it is possible to establish equivalencies between some of the MORSE concepts and some of the RM concepts: the notion of data-type is equivalent to the notion of domain, the 6
The term "key" is here to be understood in the sense of the rel ational model [Codd] (i.e. that allows to uniquely identify the molecular object).
On the re-use of complex systems
5
Submission to Tools Europe 93
N. Revault
notion of atomic object to the one of attribute, the notion of molecular object only aggregating atomic objects to the one of relation. To illustrate the possibility MORSE offers to represent NFR, the next figure shows the result of the transformation of the MSN shown in figure 1. This is the equivalent NFR data representation of the one of that first figure. We can see that all the objects represented are molecular objects only aggregating atomic objects. The 'cli' labelled lozenge stands for a role of the 'cli' molecular object that represents a CLIENT. It is linked to two values (the right-pointing pentagons). These represent the fact that a CLIENT can be either a LICENCE-HOLDER (ccss) or a PRIVATE PERSON (part). A notion of TURNOVER is represented by the 'ca' atomic object. This was linked to the LICENCE-HOLDER ('ccss' molecular object) on figure 1. It is now related to the notion of CLIENT. The CLIENT/TURN-OVER 'p' link is conditioned by the value of 'cli' role. This illustrates the second constraint on links we described in 3.1.4.
Figure 3: NFR represented in MORSE graphical notations, Equivalent data representation of the MSN of the figure 1 3.4.
Principle of TP
The principle of the transformation process (TP) from MORSE semantic nets (MSN) to normal form relations (NFR) is described by Bouzeghoub in the form of an expert system [Bouzeghoub & al 85], [Bouzeghoub 86]. As illustrated in SECSI, this is of course composed of production rules that can be organized in different types according to their aim. Each rule is responsible of an elementary -or local- transformation of a MSN. This expert system is also controlled with a certain strategy. 3.4.1.
The types of rules
[Bouzeghoub 86] distinguishes between four types of rules in its TP. The first type is said " of simplification". The rules of this kind are aimed to eliminate redundancy in a MSN, that is for instance the case for a simple rule supposed to cut a cycle of functional dependency links between atomic objects (cf. figure 4). The second type of rules is said " intermediate". These rules are dedicated to reduce a MSN structure. Especially, they are responsible for the suppression in a MSN of all the MORSE concepts that have no direct equivalent in the RM. That is the case for generalization links between molecular objects, which can be eliminated by two different methods: either by moving component atomic objects from a general molecular object to a more specialized one (cf. figure 5), or by constraining some atomic aggregation links according to a role value of a general molecular object (cf. comments on figure 3).
On the re-use of complex systems
6
Submission to Tools Europe 93
N. Revault
The third type of rules is called " direct". These rules are concerned with expressing the equivalencies between MORSE objects and those of the RM. Except for a rule that suppresses molecular aggregation links, the direct rules are not effective in our work because we do not change the representation formalism between an initial MSN and the result of its transformation, some NFR. The fourth and last type of rules is the one called " of normalization". The rules of this kind are supposed to ensure that the final result of TP is composed of fifth normal form relations [Codd 72]. 3.4.2.
Examples of rules
As we said, each rule of each type is responsible of a local and elementary transformation of a network. Following figure shows an example of the local transformation due to a simplification rule that cuts a cycle of functional dependency links by removing a redundant edge of a network graph (i.e. a 'df' link). m
m p
p
p
p
p
p A2
A2 df A1
df
df A3
df
df
A1
A3
Figure 4: Illustration of simplification rule Next figure illustrates the first kind of suppression of generalization links described above. m2 m1
p
p g
A1 A1
m1 Figure 5: An intermediate rule 3.4.3.
The control
3.4.3.1.
The problem of control
Reasoning methods in forward chaining rapidly raise some problems about control. These problems are inherent to the mechanism itself: at a certain time of the inference cycle, several rules can be applied, and the choice of one of them conditions all the following reasoning. Most of the existing systems use a procedural control mode, that is to say described by the implementation of the inference engine. The problem of control is still not only limited to rule-base systems. It is common to a lot of A.I. systems. [Hayes-Roth 85] defines it in a general way by "which of its potential actions should an A.I. system perform at each point in the problem solving process".
On the re-use of complex systems
7
Submission to Tools Europe 93
3.4.3.2.
N. Revault
Recent works on the problem
Recently, it has been agreed that the control of a rule base is a crucial, and non-trivial process. It can need both general knowledge (general strategy for the choice of a rule) and domain specific one (e.g.. the notion of goal in OPS5). The idea that the evaluation of a rule-base is in itself a knowledge-based (or a meta-knowledge-based) process has led to find declarative manners to represent control. Some research works just express the need to dispose of declarative means of control [Batali 88], [Clancey 83], [Pitrat 90]. Others propose general representation frameworks like the blackboards [Engelmore & al. 88], [Hayes-Roth 85], [Bachimont 90]. But the problem of the representation of declarative control is still young in A.I. Nevertheless, is seems to be accepted that control have to be explicit. 3.4.3.3.
A classical solution to the control problem
[Bouzeghoub 86], who was not aware of the recent works on explicit control, uses a classical method for the application of his transformation rules. This constitutes the control of the transformation process he presents. This method is using the notion of packages of rules. Each package corresponds to a step in the general TP. Each step is dedicated to a certain task of the TP and obeys a particular strategy. For instance, the generalization hierarchy is suppressed in a MSN thanks to rules written to ensure it is done with a deep-first method. Such a suppression defines one of the steps of the transformation process.
In summary, the MORSE semantic nets to normal form relations transformation process, defined by [Bouzeghoub 86], consist of modifying an initial network to an equivalent set of connected components. The semantic richness of the initial representation model (MORSE) being greater than the one of the final model (relational model), the equivalency is expressed in terms of data representation. 4.
Our Solution
The concepts defined by MORSE consist of nodes and links like for any semantic net framework. The step of our solution is then to define an object oriented -e.g. Smalltalk 80implementation of these concepts, on which to specify some production rules for representing the transformation process. The solution we have chosen for implementing the MORSE semantic nets (MSN) and their transformation process (TP) uses two different programming tools. The first one, AckPro, is dedicated to implement a computer representation of the MSN. The second one, NéOpus, allows to express on this implementation, the "reasoning" process associated to their transformation. 4.1.
The MSN implementation
To get a computer representation of the MORSE semantic nets, we used AckPro. AckPro consists of a tool for the design and prototype of computer applications. It is based on graph manipulations. 4.1.1.
Description of AckPro
Through a main editor, AckPro allows to compose a framework from generic concepts -entities- of a certain domain connect ed in an entity-relationship way [Chen 76]. In its terminology, such a framework is called a meta-model. This is in fact a specification of some concepts and their relationship. It defines something like a "representational theory" of the domain modelled. A meta-model, in the AckPro environment, is to be compiled to an "implementational theory" of the domain in the form of Smalltalk classes. Some so generated classes are specializations of a certain abstract class that effectively defines the general characteristics of the "implementational theory".
On the re-use of complex systems
8
Submission to Tools Europe 93
N. Revault
The generated classes can then be used to create instances of concepts in a domain specific editor -or model editor. A set of instances so created constitutes what is called a model7 in AckPro8. The model editor is composed of both a textual and a graphical view. The characteristics of the graphical view are specified through another editor of AckPro: a graphical meta-editor, the functions of which we will not describe. 4.1.2.
Our use of AckPro
Now, how is this environment used in our work? The models we want to edit are the MORSE semantic nets, like in the example of figure 1. So the domain for which we have to specify a meta-model is MORSE itself. That is to say, the entities we have to define in the main editor of AckPro, are nothing else than the concepts MORSE introduces: the different kinds of nodes and links of the semantic nets. The next figure shows the simple meta-model we have build for MORSE. We note on this figure that all the MORSE concepts we have presented in the first section are represented as entities. We can see that there are cardinality constraints on each relation that consist of a description of a certain MORSE type of link. Something is still not very explicit on the figure: it is the fact that each of the entities and relations is characterized with fields. However, this can be guessed thanks to the textual browser on the right part of the figure.
Figure 6.a: graphical view Figure 6.b: textual view Figure 6: the meta-model for the MORSE semantic nets or the model for MORSE We can note that, like we said when describing MORSE, the same formalism is enough for the initial networks and the result of their transformation. So a graphical view of a network in its initial state can also serve for representing its final state and all its intermediate states. The view can be kept open during the transformation process, what could result on its animation without a lot of work. Finally, it is worth saying that AckPro is here used only for a small number of its functionalities. It has already been plugged with different model interpreters, such as the MPvC system described in [Krief 90]. 7
8
It is important to note that the word "model" is used here in an other sense than in the first (problem) section. There, it is mostly used in the expression "representation model". This is certainly ambiguous, but it is the exact terminology defined by AckPro. The use of the word "model" in AckPro, to denote a set of instances, justify the one of the word "meta-model", to denote the specification of some classes (cf. the class/meta-class paradigm in Smalltalk -for instance!).
On the re-use of complex systems
9
Submission to Tools Europe 93
4.2.
N. Revault
The TP implementation
The Smalltalk classes generated by AckPro is our implementation basis for the MORSE semantic nets. They are to be instantiated (through a model editor) for creating a network. So for implementing the transformation process (TP) in the form of an expert system, we had to express production rules on this class structure. 4.2.1.
NéOpus
To do that, we used NéOpus [Pachet 91a, 91b, 91c, 92]. It is an environment that combines first-order production rules in forward-chaining with Smalltalk objects. 4.2.1.1.
Rules in NéOpus
In this environment, production rules are integrated in the Smalltalk language in a very natural way. The language is used for expressing rules condition and action parts. Conditions may be any Boolean Smalltalk expression (i.e. yielding a Boolean result), and actions any Smalltalk expression, usually leading to side-effects on objects. In this context, the notion of fact, traditionally used in rule-based languages disappears, as well as the notion of fact-base. The object-oriented rule-based programming, defined by NéOpus, is exclusively based on the notion of side-effects. An action part of a rule does not assert new fact, but modifies some objects by sending them messages. 4.2.1.2.
Control in NéOpus
In NéOpus, the problem of control can be treated in two different ways. One way is to do nothing, that is to say to use the implicit control protocol the engine furnishes, but that is quite always insufficient. The best way to do is to use rule bases for the control itself. This has been initiated by [Pachet 91a, 91b, 92], according to the recent research works on the control problem, because of considering the control as a process that generally needs some expertise. Such rule bases are called meta-bases and their rules, meta-rules [Pachet&Dojat 92]. NéOpus environment includes a certain number of meta-bases for standard. For information, in order to have a correct control implementation, NéOpus meta-bases use some explicit control objects as described in [Pachet 92] and [Pachet&Dojat 92]. 4.2.2.
Our use of NéOpus
To present how we managed to implement the MORSE transformation process, we will first describe in details some rules of our rule-base and then we will make explicit the control strategy we have adapted from what [Bouzeghoub 86] describes. 4.2.2.1.
Rules in detail
To give an idea of how NéOpus allows to express production rules on a class structure, we will now present few lines of code. Rules in NéOpus consist in a declaration part where variables are declared according to their class, followed by conditions and action part. Next figure shows the text of an example of a NéOpus rule. It corresponds to implementation of the rule of figure 4. "ATO" is the name of the class AckPro has generated, according to the description of atomic objects, when compiling the MORSE meta-model. We can note on this example how NéOpus allows to intervene on our implementation of a MORSE network. The conditions recognize a local net configuration to modify. The action part is operating the effective transformation by modifying objects hold by the variables that have been matched when firing the rule. The objects are modified by sending them appropriate messages. The last line of the action part are dedicated to inform the inference mechanism (based on a RETE network) that an object has been modified.
On the re-use of complex systems
10
Submission to Tools Europe 93
N. Revault
!MorseToRelational methodsFor: 'STEP0'! eliminateDf | ATO a1 a2 a3. Global GraphicalController | a3 linkedInDfTo: a2. a2 linkedInDfTo: a1. a3 linkedInDfTo: a1. actions Transcript show: 'eliminateDf'; cr. "update the structure through the model editor" GraphicalController getRidOfLink: #ATF from: a3 to: a1. "update the RETE network of NéOpus" a1 modifiedFor: selfBase.! !
Figure 7: Smalltalk code for the rule of figure 4 The next example (figure 8) shows a more complicated rule, corresponding to figure 5. "MOL" is the name of the class AckPro has generated, according to the descriptions of molecular objects, when compiling the MORSE meta-model. !MorseToRelational methodsFor: 'STEP1'! trans6 " suppression of the generic molecular objects: deporting of atomic constituants " | MOL x . Global GraphicalController | "rem: a molecular object must have at least one atomic object in a MORSE net". x hasSubMOL. "ie. generalizes some molecular objects" x isNotAggregated. "... it only be aggregated by other m olecular objects" x isNotAggregatingMoleculs. "... it can also aggregate atomic objects"
On the re-use of complex systems
11
Submission to Tools Europe 93
N. Revault
actions | xSubMOLs | Transcript show: 'trans6 => MOP: ', x printString, '\' withCRs. xSubMOLs := x subMOLs. x hasATO ifTrue: "this should be the case but... " [xSubMOLs do: [:sm | | xAtomsAndCards atoms atoNum | xAtomsAndCards := x atomsAndCardsCopy. "this method returns an association the key of which is a list of atoms, and the value, a list of cardinality values" "modification of the network str ucture" sm graftAtoms: (atoms := xAtomsAndCards key) cards: (xAtomsAndCards value). "explicit update of the graphical view, for relative placement" 1 to: (atoNum := atoms size) do: [:ii | | anAto | GraphicalController placeRepresentationOf: (anAto := atoms at: ii) offset: ii@atoNum from: (GraphicalController viewPositionOf: sm). GraphicalController placeRepresentationOfLink: #ATO between: sm and: anAto. "update of the RETE network" anAto goFor: selfBase]]. "both structure and grapical update, through the model editor" x atoms do: [: a | GraphicalController getRidOfNode: a]] . GraphicalController getRidOfNode: x. "update of the RETE network" x removeFor: selfBase.! !
Figure 8: Smalltalk code for the rule of figure 5 In the action part of each previous example rule, a global variable of the rule base, named "Controller", is used. This is for updating the graphical view (in the sense of the MVC paradigm [Goldberg 84], [Krasner&Pope 88]) of the MORSE network model editor. This should not be necessary when using a more recent version of the AckPro environment. Therefore, this allows us to express explicitly the place in the view, where to see a modified or created object. This expression is done thanks to some primitive messages that allow relative placement of objects in the view. 4.2.2.2.
The control strategy
The control we used for implementing our transformation process of MORSE nets is a NéOpus standard one, using the notion of agenda. It is based on rule packages that initialize an agenda (a kind of collection of rule packages). It implements a simple sequential strategy where rules are applied by packages. Each rule package we defined is corresponding to a certain step of the transformation process described by [Bouzeghoub 86]. 5.
Conclusion
As a conclusion, we try to evaluate the pros and cons of our construction. We first consider the methodology of each software tool we used, and then talk about the use of pluggability and of object oriented programming. In each case, we try to discern the aspects our work reveals, and we raise questions and perspectives that seem relevant to us. On the re-use of complex systems
12
Submission to Tools Europe 93
N. Revault
AckPro is a tool for meta-modeling. Although it has functionally been described in 4.1.1, one could have guessed it can be dedicated to more general specification work than ours. Our use of it still reveals its main characteristics: it allows to focus on the problems of representing a particular domain, in opposition to the problems of implementing it. Indeed, the implementation is automatically generated from a specification. That is very nice principle, for getting a static representation structure. But what happens if one wants to make it dynamic? We answered this question for a part, in our work: one just have to look at the generated implementation, like we have done when writing our transformation rules. But then, what is the gain of AckPro, except for giving a standard implementation manner and some graphical possibilities around it? One could answer that is enough. But we think it would be more interesting to define a generic interpretation level for AckPro models. NéOpus is an object-oriented rule-based system. That is to say it combines objects and production rules. It is a powerful tool for knowledge representation. It allows to define efficient rule bases for the modification of object structures, as we have illustrated it. It also give the possibility to define a rule base control explicitly. That was helpful in our work, even if we had some difficulties to model it because of the lack of precise informations on the control of SECSI. It is still difficult to have a precise idea of how a NéOpus rule base is easy to build if the class structure is more complicated than ours. Would it be necessary to create new classes of objects to make a correct reasoning in this case? Especially if we want to express knowledge on existing objects? Pachet gives some elements of answer, introducing his notion of "aspets" [Pachet92]. The notion of pluggability we introduced as an extension of the classical notion of software re-use is practiced in our work. It seems particularly well illustrated in our construction that combines two large applications, one of representation and one of reasoning on that construction. But may be that is related to the fact that the reasoning on objects that NéOpus allows is by principle pluggable: it can only be expressed if there exist objects! We think it would be interesting to try this principle on other kind of construction, that have no inherently pluggable part. Finally, the idea of object oriented programming to serve as a good mean for software organization through pluggability seems quite obvious for us. The MORSE representation in AckPro not only accesses to some objects, but also creates them (whatever it is, a class or an instance); the MorseToRelational rule base also accesses some objects of the same type. This could be generalized saying that in an object oriented paradigm, such as Smalltalk, the structure of all objects can be in some sense shared by all potential applications. So clearly object oriented programming facilitates the cooperation of different applications towards a same general and complex software goal: there is no need to change any representation between applications, they can operate on the same objects.
Bibliography [Bachimont 90] Bachimont B. "Cohérence et convergence dans un tableau noir: organisation, formalisation et sémantique de l'architecture de controle ABACAB". Thèse de l'Université Paris VI. Paris, Décembre 1990. [Batali 88] Batali J. "Reasoning about self-control". In meta-level Architectures and Reflection. P. Maes et D. Nardi eds. North Holland, 1988.
On the re-use of complex systems
13
Submission to Tools Europe 93
N. Revault
[Bouzeghoub 84] Bouzeghoub M. "MORSE: A functional query language and its semantic data model". INRIA RR270 and proceed of 84 trends and application conf on databases. IEEE-NBS Gaithersburg (USA), 1984. [Bouzeghoub & al 85] Bouzeghoub M., Gardarin G., Métais E. "Database design tools: an expert system approach". VLDB conf. Stockholm, 1985. [Bouzeghoub 86] Bouzeghoub M. "SECSI: un système expert en conception de systèmes d'informations". Thèse de l'Université Paris VI. Paris, 1986. [Chen 76] Chen P.P. "The entity relationship model -Toward a unified view of data". ACM TODS V1, N1. March 1976. [Clancey 83] Clancey W. "The advantages of abstract control knowledge in expert system design". Report n° STAN-CS-83-993. Stanford university, 1983. [Codd 70] Codd E.F. "A relational model of data for large shared data banks". Communications of ACM, vol 13, nb 6. 1970. [Codd 72] Codd E.F. "Further normalization of the database relation model". In Database system, Rustin ed., Prentice Hall Englewood Cliffs 1972. [Cox 86] Codd E.F. "Object oriented programming: an evolutionary approach". Addison Wesley publishing company, 1986. [Engelmore & al. 88] R. Englenore, T. Morgan. "Blackboard systems". Addison-Wesley Publishing Company, 1988. [Goldberg&Robson 83] Goldberg A. & Robson D. "Smalltalk 80: the language and its implementation". AddisonWesley, 1983. [Goldberg 84] Goldberg A. "Smalltalk 80: the interactive programming environment". Addison-Wesley, 1984. [Hayes-Roth 85] Hayes-Roth B. "A blackboard architecture for control". Artificial Intelligence N° 26, pp. 251-321, 1985. [IEEE 86] "New paradigms for software development". IEEE computer society, #707. 1986 [Karlsson &al 92] Karlsson E.A., Sorumgard S., Tryggeseth E. "Classification of object-oriented components for re-use". TOOLS 7 pp 21-31. Dortmund, Germany, 1992. [Krasner&Pope 88] Krasner G.E., POPE S.T. "A cookbook for using the Model-View-Controller User Interface Paradigm in Smalltalk 80". ParcPlace Systems, 1988.
On the re-use of complex systems
14
Submission to Tools Europe 93
N. Revault
[Krief 90] Krief Ph. "M.Pv.C - Un système intéractif de construction d'environnements de prototypage de multiples outils d'interprétation de modèles de représentation". Thèse de l'Université Paris VIII. Paris, 1990. [Métais 88] Métais E. "Les mécanismes d'inférence et l'explication du raisonnement dans le système expert SECSI". Thèse de l'Université Paris VI. Paris, 1988. [Pachet 91a] Pachet F. "NéOpus mode d'emploi". Rapport LAFORIA n°14/91. Paris 1991. [Pachet 91b] Pachet F. "Du bon usage des méta-règles en NéOpus". Rapport LAFORIA n°16/91. Paris 1991. [Pachet 91c] Pachet F. "Reasoning with objects: The NéOpus environment". EastEurOOpe. Bratislava, 1991. [Pachet 92] Pachet F. "Représentation de connaissances par objets et règles". Thèse de l'Université Paris VI. Paris, 1992. [Pachet&Dojat 92] Pachet F & Dojat M. "Representation of a medical expertise using the Smalltalk environment". TOOLS 7 pp 379-389. Dortmund, Germany, 1992. [Pitrat 90] Pitrat J. "Métaconnaissances". Hermes. Paris 1990. [Ye 91] Ye W. "SCT: a sequence charts tool for reusing requirements in telecommunication domain". TOOLS 4 pp 227-235. Dortmund, Germany, 1992.
On the re-use of complex systems
15