Upload
others
View
0
Download
0
Embed Size (px)
Citation preview
QSNABROCKER SCHRIFTEN
ZUR MATHEMATIK
Reihe I lnfonnatik Heft 28 1991
A Horn Logtc Approach to Modular! ty In
Knwoledge Based Systems
Grigoris Antoniou Volker Sperschneider
Fachbereich Mathemat1k/ lnfonnat1k Universitat Osnabruck
A Horn Logic Approach to Modularity in
Knowledge Based Systems
G. Antoniou & V. Sperschneider
University of Osnabrilck
Abstract Two of the current trends in knowledge representation are the need of handling big knowledge bases and of using ideas from the specification field . In the present paper we address both aspects by introducing a module concept for logic oriented knowledge bases and discussing complex systems based on our module concept in the spirit of work on algebraic modules. In particular, we introduce the so called module operations of composition, union and actualization, and derive results concerning semantics and correctness of such systems.
Contents ,,,I
I. Introduction 1 ·. •
2. Basic notions of logic programming
3. Intuitive presentation of the module concept
4 . The module concept: formal definition
4.1 Module syntax
4.2 Module semantics and correctness
5. Building modular knowledge bases
5.1 The approach of module operations
5.2 Actualization
5.3 Union
5.4 Actualization
5.5 Some remarks concerning function symbols
6. Conclusion and future work
1 Introduction
Artificial intelligence that has been for some decades only an academic field of research has developed nowadays many methods that are being or will be soon used in practical applications. Expert systems for realistic problems are used for over ten years now, and natural language applications are becoming increasingly popular.
One characteristic of Al programs is that they are getting larger. Whereas the first programs delt with very restricted domains and problems, today interest lies in handling more complex situations. Another aspect is the so called knowledge based approach that has replaced the earlier search based one: It is nowadays accepted that realistic artificial intelligence programs can only work well if they are excessively using backgroung knowledge about the specific problem field. Such programs are usually called knowledge based systems (KBS). Among the most prominent such systems are MYCIN [BS 851 and the CYC project [Len 901 which is based on a huge knowledge base.
In some sense, Al goes through the same evolution steps as conventional computer science some decades ago. At that time, growing programs and problem complexity and the obvious inability of ad hoc methods 10 deal with them led to the development of notions like structuring, abstract data type or module. Today we cannot imagine a programming language not supporting such features (except for some that are still in use because of historical reasons).
We expect the same evolution process for knowledge based systems: In order 10 be able to manage large knowledge bases and 10 model large application domains structuring is needed. In fact, modularization is a general principle not only of programming systems but of every engineering discipline. Programs and factories, phones and TVs are built in a modular way. This means that development of a modularization concept for KBS is essential for a breakthrough of Al techniques in praxis.
Unfortunately, research concerning modularization of knowledge based systems is in the beginnings. Actually, from the two aspects of the growing complexity of KBS, namely quality, i.e. the question of deep knowledge, and quantity, i.e. the sheer amount of knowledge items, only the first one has been addressed by increasingly sophisticated knowledge representation languages. Stated differently , until now focus has been only on knowledge representation in the small. But if realistic and successful Al applications are to be developed in a not so far away future, we should also pay a11en1ion 10 structuring knowledge bases. The resu lt of such effort could be something we would call k11owledge rcprcsc111atio11 ill the large. The present paper is a contribution 10 this goal.
We have oriented ourselves at work in the field of algebraic specification (IBEP 871, [EM 901, [Fey 861) and work on modules with imperative implemcntalion part (IAS 891, [Ant 901, [SA 91 I, [Rei 91 I) . A knowledge based
2
system is thus seen as a collection of independent enlllles interacting with each other via import and export interfaces. This makes our approach different from that of [Wac 89] (see also [Ant 91)) where structuring is realized by a hierarchy of modules, each module inheriting all knowledge items from higher modules. Such systems have only a relative semantics w.r.t. to a current focus.
Let us now briefly describe our module concept. A module in our sense consists of four parts. The export interface describes the knowledge being offered to the public by the ,module, and is modeled as a logic program. The import interface, also a logic program, describes the information needed by the module in order to define its functionality. This is done in the module's body. Finally, import and export interface may be parametrized by a parameter part which is an arbitrary first order specification. The parameter part is freely instantiable and allows development of generic modules.
We have restricted attention to so called definite programs, i.e. Horn logic. The results could though be generalized to arbitrary logic programs (in the sense of [Lio 87)) in a canonical way if stratified programs were used.
Finally we want to point out the difference of our modules to those already existing for Prolog systems (e.g. [Sze 82], [CP 87], [Lin 87) and [Die 89]). The fundamental difference is that all these works treat syntax-oriented approaches that are mainly concerned with name conflicts, whereas here we are rather focusing on formal semantical aspects of modularization, due to the existence . of formal module interfaces. Let us briefly explain why we insist on this point.
It is our belief that the more artificial intelligence finds application in practical problems, the more demands concerning quality will grow. As the history of data processing shows, testing of software is insufficient, since it can only find out errorneous behaviour but can never guarantee error freedom. Therefore verification and validation techniques for Al programs will have to be used. In order to be able to show correctness of KBS and thus of modules, formal models with firm theoretical basis are needed. Our aim is thus to present a module concept with formal semantics and correctness notions. But we ·can only speak of correctness if the desired module behaviour is formally specified. Exactly this is done by the module interfaces. A finitary verification strategy for modules in our sense can be found in [Spe 90].
As we have already pointed out, structured knowledge based systems consist of modules interacting with each other. Following the lines of algebraic specification, we model such systems as results of so called module operations which describe ways of putting modules together. The operations we have considered are
composition
union, and
actualization,
already known from the theory of algebraic modules ((EM 901).
3
The paper is organized as follows . In chapter 2 we give some preliminaries concerning logic ·programming.· In chapter 3 we give ari intuitive introd'uction to our module. concept, w.hile a formal .presentatiori -of -syntax, semantics and correctness of modules i~ our sense is given in chapter 4. In chapter 5 we jntroduce the module operations mentioned above arid 'derive results' concerning the semantics and ·correctness of, lhe· resiiltihg··System~ 'Fhially, in · chapter 6 we discl!~,S what has been, already,. ac:hii:YJ:d -and,,show,·some lines ,for funher re-search. ,,, •:~!; ,rf ,;·,.:'
11 .. • .-- •• •) ., :• , .. . ,, lHjq•>tJ ·,!1 ! !1.~l; '.J ii'.•·j, -· '. · tfi• ; , ,
, r~ :! l I • 1:, ;l •. i!,( 1.; i ,1'! !; I ,, ·:1 ,;111• Lil
2 Basic notions of logi~ prooramming - .. ;, •.: ,·i .. .,: '- ') - • • ; , ,. ;, I .'! f.r,L r,f?. ,·.111·, ,;•~,_.1 !
We11use' here starldard notions artd tlotatibn1for logi'c' pro'grammi ilg 'as ' ca'n be found in [Lio 87] cir' [1SA 9'1). 'ln· j,/irticliliit'H't/r/i}o'tmuias"AYe f&h,fo~s &rbne of
,1, •. Ahefollowingforms;, .,,,, , , , , ,, ., 11;, .. · ,,, ,· · ·: !,,.,,
' :"7'((Bj'A . .. ABrr.'HA), oftelN1t'itte~•a~ · \.\~B ~-. . ,Bm'' )., r'.J,, .. i , .. ·. ·1 ,f l . l 11 . , I. 1 . ·.·,
i•\ .• tll
.:.,, .. •f l;
V(A), also written as A, and
:'ll'{-,J3 1v ... ,){,,..,Btt,), 11lso writti:1;1; :is.k-:·B 1,,,.oB;;; ·t · 1:1,. , _j
with atomic for\'rWl~s ~\ ' B1 , . :: ,e,;. "Fb'frnt1~l •of"th'/iirs1 h~o 'foii°ns iii-'~' called
defi11ite program fomiulas, formulas of the third foml •definiid gonls.1'Program fom:mI~s of the first kind are called rul~f. and !)f the second kip,d/ a~¥- Ip ;i ,definite program formula, A is called its head and B 1, ... ,Bm (if existent) its body.
I\ _ defi11it~ logic program (in Ws paper often ~ led logic progrc_1,m; p)_ea.~e distinguish this noiion from general logic progtan\s in the sense of I Lio 87]) P is a (maybe infinite) set of definite• pr-ogram fommlas .d We say that P defl,tes a predicate p if p occurs in the head of a formula in P, while P uses a predicate p if p occurs in the body of so/ne formula in P." '. t '' ! '. • : ., I " • ' ,
· The least Herbrand model of logic prograrn P is denoted by 1'1-p 'and is' defined
as the set of all ground atoms ' in a giverf•signature :t tHat logi'cally follow from P. There is a well known a,pproximation. <i Mp maki(\g µ~~ of an increasing
union of H~rbrand models 10(P) defined as folloo/s : ,;- ;
T0(P) = 0
In+ 1 (P) = I 0(P) v { Al ' A ' · 0 ground atom, and there is ground
instance At-B 1 .. . .. Bm of a fromula ,in P
such ,hat Bt . .. .. Bmel0 (P)).
/\s a final remark on logic programs note that an arbitti1ry algebra l over signature :t may be interpreted as a set of ground facts in the following way :
4
, '.,'{'.,)p(a1, .. . ,ak) i,,, .P is k-ary predifate in l:1 a1,. ;,,/lk are elements ~(the .
domain of I sucli that p(a1, . ::1llicl is valid in fl. .,. . rl ·
.. , Note that I is a logic pr~gi:arn OV!!r).l:ie signature fu( a I ae dom(/)), i.e. over
I·
I: enriclted by the elemeJJts of,tht;Jiolllaif! oU as new constants . .
When trying to describe sbmc · domain• twith ' logic programs it · is often · necessary to use auxiliary predicates, even though they are not of interesi. ·tn these cases it is usually desirable that the definition of the new predicates does not change the meaning of the old predicates. This idea leads to the concept of con-servative extensions. · 1 •1 ·, · •i ,. .. , .; uq. ltJl' ' l(J ' ) (tlll. , It ~ll{•!11lll ·.u :· •'. ;', !, Let Q be a definite logic program an!i Ma set of predicates. We say that Q is
, ,,qp.ns.<1rvq1i11f. >Yi{_tresper;ti to .t•t.if. Q ,/1P6& ,p,oJ, <:\\:(-\fie p~ii;lclt~ . .(rom ,M. ·.Predi-.,~.~tf.~ of;M Jl)\\n~us be pnly 11~.~in-lht;.~Y.P.fni,le~ .iniQ., I , :;: , ,1 'I ,, ,.,.. ,
Let P and Q be definite logic programs over the same set :of' functidn symbols .
We say that PvQ is a, consw-v(Jl.iv~, iµt/;N_ipn of P i_f Q ~ conservative w.r.t. the set of predicates occurring in P. The following lemma expresses the main propeny of conservative extensions. .,. / . ,. · , '". , '
Lemma Let P and Q be d!!finite , logic programs over .tHt same set of function
sy~?Ol_s -~~ch that~ f,s,a ,consf~~~i,v.e extensiol\ o(P. l;lte,1,1, ,, ,;,.
c·,•• i\fp<.:,QnH(P) = ~P w! !,,,,, ·' · ' ' · ·• I · · 1 · . ; : . . , 1, : , : 1·, . :.. • •
where i'l(P) denotes the set of ground atoms p(t 1, ... ,t1cl wuh predicate p oc-·' - . '. ·.i ' ; .! \ ' , , ' ' •
cumng in P. . . " ,.. . f: ,11, ' . , ; , ,, 1 V '\ 1 t
Proof We ~ust only show . MPuQ"~(P) _i;;;. Mp as the other direction is trivial.
By induction on-n we',show that /n(F\.JQ)(')H(P)'l~Mp, This is trivial for'n=0. • I. .. 'l 1 ,(; I , •••. ; 1 '., 1
1
Suppose that /n(PI.JQ)nH(P) !';;; Mp and.,le\ , AEln+l(PvQ)nH(P). If A is al-
re.a~y in . I n(-P.I.JQ)r,H(P) we · are. done. Otherwise there is a ground instance
Bm-B 1a , .. . ,Bma of a program formula B~B 1, ... ,Bm of PvQ such that A=B<J
and B1a, .... B~ae /n(PvQ). Since A=Bcre H(P) and Q is conservative w.r.t.
the set of predicates in P, Bcr~B 1cr, .. . ,Brno must be a ground. instance of a
rule in P, i.e. B1cr, ... ,BmcreH(P). We know ·thus that
B1a, ... ,Bm<JEln(PI.JQ)nH(P) and conclude by induction hypothesis
B1a, . . . ,Bm<Je Mp, Then, by definition, A=Bcr belongs also to Mp, D
The lemma states thus that conservative extension of P by Q does not affect the semantics of predicates in P .
5
3 . Intuitive presentation of the module concept
From a bird's eye of view a knowledge module looks as follows :
Expon
Param-Body eter
- .,,,
Jmpon
A module consists thus of an export and impon interface that can be parametrized (in order to allow for generic modules) and a module body defining the module's functionality based on the knowledge of the import interface. The
" module communicates with its environment via its interfaces, while the items of its body are hidden from the public.
As a representation language we have chosen here definite logic programs and queries. The reason is that this logic has clear semantics (Herbrand model), efficient proof theory (SLD-resolution) and is broadly used in praxis. Extension to stratified logic programs is straightforward, as for this class there is the canonical model semantics and the proof procedure of SLDNF-resolution ([Lio 87)).
The only part of a module that may go beyond definite programs is the parameter pan that is an arbitrary first order specification . It should be intuitively clear that the parameter pan must be treated in a more liberal way, since parameters are freely instantiable entities. The semantics of the parameter pan will be the collection of all models of the specification.
There may be the objection that our representation language is too simple, for example not including sort hierarchies etc. This is not accidental! We believe that modularity in knowledge based systems is so poorely understood so far that we have first to cope with this fundamental problem. As soon as we have belier understanding of the area, then we can extend the results to more sophisticated representation techniques. At this stage, taking into account many features that are irrelevant for our main task could easily deviate our auention from the main problems (note that predicate logic was first developed in its pure form and was enriched by other features much later, when its basics were clearly understood) . Nevertheless, discussion in 5.5 indicates that for many applications many-sorted logic programs may indeed be appropriate.
Let us now discuss some asper·,~ of our module concept. The t:xport interface
6
describes the knowledge offered by the module to the public. This means that all queries to the module must be formulated in the vocabulary of the export interface. The same restriction applies to the computed answers: A query
?- p(X)
is answered by
X=a
if this answer substitution is calculated in the body using SLD-resolution, and if constant a belongs to the export interface. If on the other hand a is the only possible answer but does not belong to the export interface, then the answer passed back to the user is no.
This treatment may seem somehow too restrictive. One could for example imagine that in the latter case described above the answer is yes but no variable binding is passed back. Note though that then the module ·beha~our would not be completely described by the module interfaces. Such an approach would soon cause confusion about the meaning of modules and would lead to many errors. Therefore we take here the rigorous standpoint t)lat module behaviour must be completely described by its interfaces, which means that all information offered to the public must be visible in the export interface.
As we have already stated, the imported and exported predicate symbols must be also semantically specified by appropriate logic programs. It is well known that this is ,not always possible in terms of the given signature, but rather sometimes auxiliary predicates are needed. Therefore such auxiliary predicates may be included in the module interfaces. But it should be noted that they play only the role of defining imported resp. exported predicates. It is neither admitted to ask a query to the module using an auxiliary predicate of the export interface nor to use an amdliary predicate of the import interface in the module body.
Export operations are defined within the module body in terminis of parameter and imported operations by means of definite logic programs. These may again include au,dliary predicates. But this time they play a role in the module semantics, since they are constituent parts of the defining programs. Of course, they are hidden from the outside since they are not included in the module's interfaces.
The logic programs in the body must have a special form. As the intuitive idea is that export predicates are defined in terms of import and parameter operations, it should not be allowed to change the meaning of imported or parameter predicates in the module body. Therefore the body must be conservative (see chapter 2) with respect to the signature of the import interface and the parameter part, i.e. predicate symbols of these parts must only occur on the right hand side of rules . For the same reasons, the import and export interface must be conservative w.r.t. the parameter part.
Let us now briefly discuss the semantics of such modules. Looking at a mod-
7
ule as described above, there are two points of view concerning its meaning:
What knowledge is the module supposed to bffer to the public?'
What knowledge does the module indeed offer to ,the public?
The .fir.st. point of view is de~ermined, by· the-parameter, pait and the export interface: St~jn,g wi~ta, model ot th
1i;._p,aramrt.~~•Pi1r\ P seen as ;a (usually infi
nite) logic program (see chapter 2), build the least Herbmnd model of the union of P and the export interface. This is the set of ground atoms that should be visible to the outside.
The second view of the module'.s.weani11g ii~•~etennined as ,fo~ws: ·A~ain starting from a model P of the parameter part, build the least Herbrand model H .of the union of P ,and the!impon interface: .ff. ·describes the k'nowledge that is
,.: available in ·order ,lo define ,the ,module:s1f.unctionality. Then we build the least . fle,:,brand model @f th~ unicpn of ,ff, and· the·•tnQdulelbody. Restriction· to ' the, sig
nature of the export interface obtains the knowledge-,acwa.Uy fueing ~ported by the module. . , , , . . , . . 1 \ ~ • ··• ' ~ f •• • • ' "' '- . "~t:1• • 'f l. f ,1 ·1, :q,~•- ,I!. I ..... • • 1\ :/ 1d •
Obvi9usly, , a module is sprrect if thes" two,,aspects of sern\1ptics coincic\e, i.e. i( aie imxluleexporis exaclly' the knowlecig~ ittrris'it is supposed to. , ' . . ..
I" J1, ·\ ! · •l•j :J , !·
-_, '. .- :,
4 The module concept: formal dettnition ·
4.1 Module syntax jl ,H ,:,, : (r,
... , . . A logic module M consists of a set n of function symbols, a parameter part
,,: • • • i. ,,I :t ',ll . . PAR, an export interface EXP, an import interface IMP and an 1mplementallon part BODY. Its components look a's' fo11ows : · '·''
, . · ,JI • '
PAR consists of a set of predicates ~par and a first order axiom set Par
over l:parvn, the co11strain1s o(M. • , t • I J , : > '. •\'I j ':•I[,
EXP consists of a set of predicates l:e,p disjoint from l:113,. and a ?efi-
nite logic prog".lm Exp_ over ;p,ir0rc,,N~, Exp ,,must b,e conserva;ive
w.r.t. l:p-.u-· Certain predicates from l:c,p are called c.\portcd prediqtes
made available to module users, while the remaining are a1trili11rY ,ones.
IMP consists of a set of pred_icates l:imp disjoint from I 11a,vrr,p' and
a definite logic program Imp over r11arvl:impvn. Imp must be conser
vative w.r.t. l:par· Certain predicates from Iimp are called imported
predicntes visible to the outside, while the remaining are cmri/iarr ones.
8
1- ,1;
BQp)'. _ C(lnsist~ :llf a set of auxiliary predicates ~Y disjoint from
Eparur.expur,imp• and a definite logic program ,- Imp/em over
r.paruilv(.exported-,. predicates m • Ee:.plv(imported predicates , in
ri;,,~1 . It is requited'.\h-~t t~f,s prb&i'ah·/_'.{s conserv,~ii~e ~/\ 'tp;uvi;~~:· I-,._ _- ,,.-: "" . ' -- , ' _ _, ,, ,. , . ' CJ-,
_.;:,, \j , , .
4;2 Module semantics and corredness i •,, \ ;;i: '.J'_,
_,, •:L · ,· ,· : F 1i · 1 --:'. t r, \ · ,,,n • , •·11 ! · ,·'iii
Let us now describe the semantics of,,logic •-~u~s':-Fir~ -we1note th'at ' the·• pa•. ,. ran:ieter. part -may .,be freely instantiated •by · any modcLP-•of axiom system- Par. ~, A-s --shown in chapteP !2,·#'·· may,,be ·viewedl 'es, a ,-(,perhaps fufinite) , set· of"ground
facts-, i.e. a.logic.prograll_}., ., • , ,., ,., ,.. .. " .. ,., ,., ,. ,t 1,--,,1 ., ,;, i'
Definition (Algebraic approach to module semantics and correctness)
Lei a module , M '~rid a model P ci Par . be givt;n. Th,e, fol,ip~i~g)qi1cltl ~oiions
must be read w.r.t. the set of functions ilv(domain elements of Pas new constants) . We define
exportM(P) = M PuExp
importM(P) = M Pulmp
implementM(P) = MimportM(P)ulmplem
Hf (
Hereby exportM(P) describes the requirements to module semantics, while
imple·rilentM(P) describes the actual semantics of the module as it is imple-• , , . . . • . , ~ 1 . • . , . , , . ,r ·' , :
mented. The module is thus called_ coµ;~c;.~ if these two views are equivalent. More formally: M is called correct iff for every model P of Par, every exported
predicate q and all ground terms t1, .. . ,tn ' • · ,. q(t 1, ... ,t0 )e exportM(P) ~ q(t 1, ... ,1i,)e implementM(P) □
. . This algebraic approach may be critici_zed as referring to infinite objects at two places: First we could imagine that a. model P of Par is given by a finite logic program P such that Mp=P. Second, the semantics construction contains nest-
ed applii.:a'tion of -the least Herbrand operator:
implemenlM(P) = MM lmplcm• or Pulmpu
implementM(P) = MM u lmplcm· Mpu lmp
This construction of nested M-operators cannot be treated by usual logic programming. The question arises what happens if we flatten the structure above
and consider the logic program Pulmpulmplem. It turns out that for logic mod-
9
ules this approach is equivalent to the algebraic one (But note that this has to do with the specific form of the module implementation part, i.e . the conservativity conditions; in general such an equivalence does not hold). Note though that the new correctness notion still refers to Herbrand algebras that are usually infinite. The reader may find in [Spe 90) a finitary proof strategy for module verification.
Theorem (Rule handling of module semantics and correctness) Let M be a module and Pa logic program such that Mp is a model of Par. De
fine rule_implementM(P) = MPulmpulmplem· Then
r~le_implementM(P) = implementM(Mp),
. ,Proof Follows immediately from the following lemma, noting that Imp is a conservative extension of Mp and Implem is a conservative extension of
·MMpu lmp· □
The following lemma states that when considering conservative extensions of a definite logic program P, it doesn't make any difference whether we use program P directly or all ground atoms that follow from P.
Lemma Let P and Q be definite logic programs over the same set of function
symbols such that PuQ is a conservative extension of P. Then we have
MMpuQ=MPuQ
Proof Note that by the conservaUvlty condition the same ground atoms
p(t 1, ... ,t0
) with t occurring in P follow from Pas from PvQ as from MpUO.- So
we need only prove the claim for ground atoms q(tt, .. . ,t0
) with q not occurring
in P. One direction is nivial since the formulas in Mp follow from P.
By induction on n we shall show that q(t1, ... ,t0)e/
0(PuQ) implies
MpuQ I= q(t1, ... ,10). Nothing is lo be shown for n=O.
Assume that q(t 1, ... ,t0)e/
0+1(PvQ)-/
0(PuQ). Then there is a ground in
stance Bot-B 1o, ... ,Bmo of a program formula Bt-B 1, .. . ,B01 of PvQ such that
q(t 1, ... ,10)=Bo and B1o , ... ,Bmoe/
0(PvQ). As q does not occur in P,
Bt-B 1, ... ,Bm belongs to Q. By induction hypothesis we know that
B1o, ... ,Bmo follow from MpuQ. Then also q(t 1, ... ,10 )=Bo follows from
MpuQ and we are through. □
It should be noted that the above result does not hold without the conserva1iv
i1y condition. Let for example P be the program I p(a), p(X)t-q(X) I and Q be
I()
(q(b)) . Then
Mp= (p(a)}
Mp'JQ= (p(a),q(b))
MMpuQ.= (p(a),q(b))
MPuQ. = (p(a), q(b), p(b)},
i.e. M MpuQ. .< MpuQ_·
5 Building modular knowledge bases
5.1 The approach of module operations
,._1 ;
How can complex knowledge based systems be developed based on modules as discussed so far? Well, all important parts of the system are developed as separate modules, and what has to be done is to put these modules together in such a way that the infonnation needed in some module, i.e. its import interface, is obtained from the knowledge other modules offer to the public, i.e. by their export interfaces. A modular KBS is thus built by putting modules together that are combined by gluing together the module interfaces of several modules. In general, the apporach consists in first solving the problem on a high level of abstraction and then realizing the needed information in form of a hierarchy of modules.
The simplest situation is that the information needed by module Ml is obtained by the export interface of a module M2. In this case there must be some kind of mapping of the import interface of Ml to the export interface of M2. Just as in the theory of algebraic specification there is the concept of 'specification morphism', here we must define the notion of 'logic program morphism' . Our intention is that when having a morphism h:P~Q, then Q restricted to the image of P has the same semantical behaviour as P. Let us now give a formal definition.
Definition Let P and Q be definite logic programs over the same set of func tions, conservative w.r.t. a first order specification Par, their common parameter part. Let h be a mapping from the predicates of P to the predicates of Q such that h(p) has the same arity as p. We call h a logic program morphism if for all predicates pin P, models P of par, and ground terms t1, ... ,t
0
p(t1, .. . ,tn)EMpup ~ h(:•'ft1, ... ,tn)EMpuQ_• D
h is thus a logic program morphism if the least Herbrand of Q united with a
11
model P of Par contains the same ground atoms q(t1, ... ,In) with q in the image
of h as the translated program h(P). Note that in general h will be injective, as is seen by the following simple example. Let P = ( p(a), p(b ), q(a)) and h a mapping with h(p) = h(q) = r. Then there exists ,no logic program Q such that h is a logic program morphism from P,to Q: : Now that we know how we can ~ombine module interfaces in a reasonable way, we come to the pr~blem o( defining th~ semantics and correctness of modular KBS. One possibility' i~. 'of course; tb give new definitions of how these systems are built up, what their meaning ' is, and how modular KBS can be put together to produce more complex ones'. This apporach would thus re-quire several new semantical definitions,;'·; · ,
. j I Following the tradition of. algerbait modules ([e.g. [EM 90]) we have chosen here another way: We define some mod1,4le operations describing ways of putting modules together. The major poi~t \s that the result of such operations is described as a single module. Modeling structured KBS this way brings the following advantages:
• we have already ~ car semantics1 arid c9rrectness notions for modular systems and do not need new ones that wo)ild complicate the situation .
• module opei:3tions inay be combined in ~ compositional way, i.e. the re -sults of some module operations can be used as arguments of another.
Naturally we have to pay a price for these advantages: We must show that our definition of an operation 's result is reasonable, i.e. matches our intuition of the operation considered. The plausibilhy results derived in the following sections for the module operations of composition, union, and actualization are
• compositionality of semantics: The semantics of the result must be nat-. ,; · , : unally expressible in terms of the semantittli of the argument' modules.
and additionally match our intuition of the operatidn-'s meaning.
• modular correctness: Correctness of the result' follows directly from the correctness of the modules used as arguments of the operation.,, .
,,, 1·:,· 11;, )
5.2 Composition
One fundamental way of putting modules together is hierarchical 'combination: The knowledge imported by module MI is exported by module M2. Of course. we could demand equality of the export interface of M2 and the import interface of MI . But in general M2 offers also predicates that are not needed by M2. Therefore the module interfaces are glued together by logic program morphisms as defined in 5.1.
Given are thus modules MI and M2 with disjoint sets of predicates (e.g. names indexed by the module name). as well as a logic program morphism h from the impo11 interface of M 1 to the expo11 interface of M2 . Note that. by def-
12
inition of modules ;ind morphisms, MI and M2 use the same set of functions. Th_e fp,\l9wingfigure illustrates the -situation.
' ·'l ' ,,;. I ; 1·• • •: i •. ; t jt1; 1 · ,,·- i'11
EXP,J . , 11, ,.· ,' 1 :.( 'tl l
I ::: ~ l ~- - · , ' 1 ·,. ·' ,:· , . ,. ,ij:,,;"! I, , I ~:,f t " J
, BODY1
-.~ f-U ·,
,P.AR 1;, M1 -··' ,. i ,:>' .... . , _
.ii{ ,:>·h •:!!
~- \ t , i. ·I i 1, ~•.
,, .. ,, -1:q ,, •• ·•rl
IMPl ,.,• l :· ,11- , , 11,-·. ,,. · -· 1-- , · ;i
Ii ., ,,, , .... . _.!! Jt ,1 •· d ,r,· ... ,;1 ; · ' • t
... ,··· ,,, ·· ···.,·· , ·,·
!· -1,',t·l\ ! ·,;n · ,.
,. ,.,,~ ,,
.· , .. f /
, · 1 ; I ~l
· 11 •1·,J • ,; Lil·· ·.•
,,
· .1 :•t,:.i, I•
EXP2 . _ !1,. !l
:;·.•
'. ·1 1 ·'•
BODY2 I PA~ M2 -
IM~2 , -I•
. Our aim- is to describe this modular system as a single module ,M,3 = (PAR, EXP3, IMP3, BODY3), This is done in the.following way:
• . , The parameter part of M3 is PAR.
The import interface !MP3 of M3 is IMP2. ·
The export interface EXP3 of M3 is EXP!.
The body BODY3 of M3 consists of the auxiliary predicates of BODY!
and BODY2, and of the logic program Implem2v{h(lmpleml)) (with
the reading h(p)=p for all p not in ¾art >·
M3 · hits · thus the sa'me appearence to the outside that we would expect from the compbsition of Ml and M2: The predicates of EXP! are defined based on the knowledge available in IMP2.
According to our approach we must now show that our definiton is meaningful. In particular, we have to show the following :
M3 is inde~d a module, i.e. the conditions concerning disjointness of predicates and conservativity are fulfilled.
13
The semantics of M3 matches our intuition of the composition operation. Note that by 'semantics' we mean here implementM3(P), since
exportM3(P) is already given as exportM 1(P) and this is what we
would expect.
If MI and M2 are correct, then M3 is also correct.
Lemma M3 as introduced above is a well-defined logic module.
ftQQf I. The predicates in !MP3 and EXP3 are disjoint from those in PAR due
to the conditions of modules MI and M2.
2. The programs in IMP3 and EXP3 are conservative w.r.t. Par by definition, since MI and M2 are well defined modules.
3. The auxiliary predicates in BODY3 are disjoint from the siganture of !MP3 and EXP3 by definition.
4. lmplem3 is conservative w.r.t. the predicates of PAR and !MP3: For program formulas in Implem2 this is given from M2. Concerning fonnulas in h(lmpleml), note that only predicates from IMP! are translated into predicates of EXP2 that are disjoint from PAR and IMP2! D
Theorem
a) Let M2 be correct. Then, for all predicates p exported by MI (so also by M3), all models P of Par, and ground terms t1, . .. ,tn
p(t1, .. . ,t11)e implementM3(P) ~ p(t1, ... ,1n)e implementM 1(P)
b) Ml and M2 correct ⇒ M3 correct.
ftQQf a) First we show the direction from the right to the left. We need the following
Lemma
(I)':/ pe l:par p(tt, .. . ,t11)e implementM1(P) ⇒ p(tt, ... ,t11)e implementM3(P).
(2) If M2 is correct, then for all p in l:impl
p( t 1, ... ,t11)e implementM 1 (P) ⇒ h(p )( t 1, ... ,t
11)e implement M) (P).
Proof of the Lemma
(I) Follows from the fac ts that p(t1, .. . ,t11)eimplementM 1(P) ⇒ p(t 1, .. . ,t11)eP
(by the conservativity conditions) and that P is part of implement~13(P).
(2) Because of the conservativity conditions on MI, we know from
p(tt, .. . ,t11)eimplementM 1(P) that p(t1, .. . ,t
11)eM1111pt · By definition of h follows
h(p)(t t , ... ,t0)e M/'u Exp2, i.e . h(p)(t 1 , ... ,t 11)e exportM2(P). As M2 is correct,
14
we conclude h(p)(t1, ... ,t0)e implementM2(P)~implementM3(P). D
Now we are able to prove our claim that for all pe :Ee,p
p(t1, ... ,t0 )e implementM 1(P) implies p(t1, ..• ,t0)e implementM3(P). This is
shown by proving
p(t1, . . . ,t0 )e/0 (Pulmplulmpleml) ⇒ implementM3(P) I= p(t 1, ... ,fo)
using induction on n. Nothing must be shown for n=O. Now let
p(t1, .•• ,t0 )e /n+i(Pulmplulmplem 1).
If p(t1, ... ,t0 )e / 0 (Pulmplulmpleml) we are done by the induction hypothesis.
Else there must be a ground instance Bcrf-B1cr, ... ,Bmcr of a progratn formula
Bf-B 1, . .. ,Bm of Pulmplulmpleml such that
p(t1, .. . ,t0)=Bcr and B1cr, ... ,Bmcre/
0(Pulmplulmpleml) (*)
We know that Bf-B1, .. . ,Bm belongs to lmpleml. Thus Bf-h(B 1), .. . ,h(Bm) be
longs to h(lmpleml )~lmplem3 (with the reading h(q)=q for qec :Eimpt>· Using
the induction hypothesis and the lemma above we may conclude from (*) that
h(B 1cr), .. . ,h(Bmcr)e implementM3(P). It follows then that p(t1, ... ,t0)=h(BCJ)=
Bcre implementM3(P). This completes the proof in one direction.
Let us now show the direction from the left to the right. To do so we need again a
Lemma
(I) '<I pe :Epar p(t1, ... ,t0 )e implementM3(P) ⇒ p(t1, ... ,fo)E implementM 1(P).
(2) If M2 is correct, then for all p in :Eimpl
h(p)(t1 , ••• ,t0)e implementM3(P) ⇒ p(t1, ... ,t
0)e implementM 1 (P) .
Proof of the Lemma
(I) Follows from the conservativity conditions and the fact that P~implementM 1 (P).
(2) Because of the disjointness condition on predicates of MI and M2 (except
for PAR, of course), h(p)(t1, ... ,t0)e implementM3(P) implies
h(p)(t 1, . .. ,t0)eimplementM2(P). As M2 is correct, it follows that
h(p)(t1, .. . ,t11)eexportM2(P). By definition of h follows p(t1, ... ,t 0 )eM,.ulmpl•
so p(t 1, .•• ,t0)eimplementM1(P). D
Now we are able to prove our claim that for all pe :Ec,pl
15
p(t 1, ... ,t0)e implementM3(P) implies p(t1, ... ,t
0)e implementMiff). , This. is
shown by proving using induction on n . ! , , .
p(t1, ... ,t0)e I
0(Pu lmp2ulmplem2uh(lmpleml )) ⇒
. , I
iniplementM 1(P)l=p(tl' ... ,t0 ). ! ' •' 1
Nothing must be ~hown -for n~. Now l~t p(t 1, .. . \)e/0 +1(P'-'.lmp2u lmplem2 . . . . , I . •1 : . .,
uh(lmpl~m 1)). · · If p(l1 / ... ,i0~e /
0(fulmp20 tmpltm2v l'l(lniph:m I)) we are
done by : the ind~ction hypo~esis. Els~ there ~ust be a ~round instance
Bcrf-B 1dp·•· •Bmcr ;or ii ,f!?grain formula i Bf-B 1,. j.,BIJ1 .pf Pu lmp2ulmplem2
uh(lmpleml) such!that i p(t1, ... ,t
0)=Bo-and B;cre/0 (Pulmp2vlmplem2uh(lmpleml)) (* *)
The disjointness of predicates of Ml and M2 implies th~t BE-B, , ... ,Bm be-.d, ,,: , 1 , .
longs to h(lmpleml). Then Bf-h"1(~ lh· ·•~-l,03"1\~elo~~S, .to lmplemL Using
the induction hypothesis and the lemma above we may concluq~: ~Wfll (~*) that
h·1(B 1cr), . .. ,h-1(Bmcr)e implementM 1(Pl;, Then .~(t!'° _- :: tp]=h-_1(Bcr)=
Bcre implementM 1(P). This completes th~1proof in the second dir~pion _and so
the proof of part a) . 1 1
b) For all exported predicates,p an~ ground terms t1, ..• ,t0
p(t 1, . . . • t~)e exponM3(P) <=> ·, (by definition)
p(t1, ... ,fo)EexportMl(P) <=> (because M 1 is correct) ; j!') ",
p(t1, ... ,fo)e implenientM 1(P) <=> (by a)) ;!I ,;
p(t1, ... ,t0)e implementM3(P) b
, .,
5.3 Union .,
It is not reasonable to suppose that the knowledge needed by one module is exported by one other module, as the composition operation suggests. It is rather usual that parts of the knowle.dge are provided by different modules. Therefore we need a possibility to build the union of these modules. Note that having built the union of the modules exporting the desired knowledge, and an ticipating that the result of this operation is described as a single module. we may then use the composition operation from 5.2! This shows once again the advantage of the approach of module operations.
The situation is as follows : Given two modules 1\1 I and M2 over the same set
16
offunctiorts• With common parameter part and the other pans disjoint, we define a module M3 modelling the union of MI and M2.
I''' i '
EXP! EX,P2 .
u: •I• .,
f •: ,; , . i i•
., BQQYJ, , .. j ,J>A.R , ; + j30Q¥2 PAR ~ ,,, ·11•··•;. ., ,.,;,
lMPI IMP2 ·I . ;i:1
"' ' ,, .. M-J ·:, .. ,; ;,, ' -.,., r«z!
ri. .:. -r i r :: •· 't . , :1
M3 is defined as follows: ·•· ' . \
The parameter pan of M3 is PAR.
' . • ' Th~ itri~n interface of M3 is the union of IMP! and IMP2.
• The expon interface of M3 is the union of EXP! and EXP2.
· • The nody of M3 is the uni~n cif auxiliary predicates in BODY2, plus the union of Impleml and Implem2.
Lemma M3 as described above is a well defined module.
BODY! and ·,:1 ,
Proof The required propenies are inherited from modules Ml and M2. D
Theorem
a) implementM3(P) = implementM1(P) u implementi,12(P.}
b) Ml, M2 correct ⇒ M3 correct.
Proof
a) For all ground atoms p(t1, ... ,1i,) we have:
p(t 1, .. . ,1i,)eimplementM3(P) ~
Pulmp3ulmplem3 I= p(t1, ... ,1i,) ~ (by definition)
Pulmplulmplemlulmp2ulmplem21= p(t 1, ... ,tn)~
(disjointness and conservativity conditions w.r.t. Par)
Pulmplulmpleml I= p(t1, ... ,1i,) or Pu lmp2ulmplem2 I= p(t 1, ... ,111
) ~
p(t1, ... ,t11)e implementM 1(P) or p(t1, . .. ,t11)e implementM2(P ) ~
p(t 1 , . . . ,t11)e implementM 1 (P)uimplementM2(P).
17
:.: i
b) For all ground atoms p(t1, ... ,tn) we have:
p(t1, .. ,,t0)e implementM3(P) ~ (by a))
p(t 1, ... ,tn)eimplementM1(P)uimplementM2(P) ~ (Ml, M2 correct)
p(t1, .. . ,t0 )eexponM1(P)vexportM2(P) ~ (by definition)
p(t1 , ...• 1i,)e exponM3(P).
5.4 Actualization
D
Not~ ·1hat in both module operations discussed so far, all modules had the same parameter part. This restriction seems to be reasonable: An application may be parametrized, but there is no need why the single modules building a complex knowledge based system to have different parametrization, Each module must have the application parameters (else the application could not be parametrized this way!), and more parameters play no role . It is, of course, necessary to have some module operation that instantiates the module's parameter pan by some concrete elements and thus serves the purpose of adapting parameter parts and making composition or union applicable. This operation is called actualization.
According to this operation, the parameter pan of a module is partitioned into a parametrized logic program, i.e. some predicates are still free instantiable while others are defined by the least Herbrand model of a logic program. Of course, it is necessary that each model of this parametrized logic program is a model of the original parameter part. Let us formalize this intuitive idea.
Let Ml = (PARI, EXPI , IMPI, BODYI) be a module. Consider a parametrized instantiation (PAR2, COM) of PAR! :
PAR2 consists of a set of predicates I:par2 ~ I:parl and a first order axi
om set Par2 over I:par2 and the set of function s of M.
• COM consists of the set of predicates I:com including I:pa,1-I:par2 and
being disjoint from r.impl• r.e,pl and l:.ixxiyt• and of a logic program Com
conservative w .r.t. I:par2·
• For all models P2 of Par2, M PlvCom is model of Par I .
Module M2 intended to describe the result of the above instantiation to the parameter part of MI is defined as follows:
• The parameter pan of M2 is PAR2.
• The import interface of M2 is IMPl uCOM.
18
The export interface of M2 is EXPI uCOM.
The body of M2 is BODY I .
Lemma M2 is a well-defined module. Proof
Disjointness of predicate sets follows from the condition that :Ecom only
contain predicates from :Epari-:Epar2 or new ones.
Conservativity conditions are inherited from Ml resp. are due to the
conditions on :Ecom· □
Theorem
For all models P2 of Par2:
a) exportM2(P2) = exportM1(M P2uCom)
b) implementM2(P2) = implementM1(M P2uCom)
c) MI correct ⇒ M2 correct.
Proof
a) exportM2(P2) = M P2uComuExpl =
MM uExpl =exportM1(Mp2uCom). P2uCom
b) implementM2(P2) = M P2uComulmpl u lmplcml =
MM u lmpl u lmpleml = implementM2(Pl). P2uCom
c) Follows directly from a) and b). □
Note that in the definition of a parametrized instantiation we have omitted renaming of predicates. This was done in order to keep the techicalities simple. It should be easy to extend the definitions and results to handle renaming as well.
5.5 Some remarks concerning function symbols
We were thus able to derive the desired results concerning modular systems. In this section we want to discuss whether the prerequisites for these results are meaningful. There is indeed one condition that is already present in the definition of modules and is also supposed to hold before the application of any module operation: It is the condition of the same underlying set of function symbols.
19
It may indeed be the case that in some applications we can determine a se t of functions appropriate for that field and handle the .rest through . predicates. In other situations though ·we may need different sets of functions. Even worse,
. one of our aims is to allow for module libraries. In this case it ·is. unreasonable to expec t tha t all ,modules use the same set of functions ,· Let us in the following .. brieny discuss , t~is question ,,,.and t, some ,: possibilitles : for ·avoiding this tindeed. strong) condition. \, ,1, i',,
· 1.•
We S!arl. by looking at single modules. Byqefinitioo; ,the logic pr.ograms .of the import and export interface as well as the body_ run on the same set of function's.' In ' riiaHy situations' it could' 'be re~sonable to'"ti'ave dif(e'reiit" sets. This
,,;, does iioh:aus~ ' ~hy diffiguliies t6r''sfo~te'lnodules: If its 'pari~'\vork ~n dlfferent 's'ets iJr fi.iiidioh:s; ~He~ 'llfe -~oduk c~ii ' ~e C<:JHsiqerk as n!r.ning',o'ri ,a set M of functions , M . b'ei\1-g tlie' C1bmposi'fion ' 'of ' Vie ~ifferent sets . . Corrc;cj'~ess of mod-ules is lheil d'efin~a by ".<l ,, '. .. I ' .. , ;I,
1 .
q(t1, ... ,t0)e exportM(P) ~ q(t 1, .. . ,1n)e implementM(P)
for all models P of Par, every exported predicate q and all ground terms 11, ... ,10
in the signature of the export interface and the parameM'· pal-\• Note· that due to this definition, the functions of the export interface must be included in the function ,se~ of the itnport ·pan or the ·body, else the m'odule cannot be correct.
One step beyond w·buld be to h.av~ an injective mapping fi~r:n)hc; functions of the export to the functions of'the import inte_rface. Ii:i thai case we would have to add a new step into the semantics op'Ji-ator iriiplementM(P) . translating
• • ., , . · ' ' "" 1 1 1· · ;, ·--' -· ' ' " ' fllnctiori symbols back to those of the expon interface. No funher changes are
· needed. ·1 ' • ··.,.,,. ,,. · .. ..
I
We can also imagine generalizing this mappjng as follows: Not only predicates but also functions of the export side ,life _jmple,men~ d ~I). the module body based on the functions of the import side. This 11pproach would fit to current effons to combine logic and functional prograri1ming. We inteni!"io realize this idea in a subsequent paper. ' .. ''" ,, · 1
•· • '' • I , , . .;. •1' I
Now let us come to the module operations, and ~ian with composit.iqn. In order to compose modules over different s"f P. of, fupction symbols we n_rnst map the functions of MI to the functions of M2 ... This can be doll\! , py extenp,i,ng the definition of logic program morphisms by an injective mapping of the function symbols of M 1 (more precisely : of its import interface) to those of l'vl2 (more precisely: of its export interface). The definition of M3 leads then to a module with its parts working on different functions as discussed above . The results presented in 5.2 hold also in this case with the only difference that the translation of functions must be taken into account . i.e.
p(h' 1(1 1) ..... h-1(t0))e implement~13(P) ~ p\1 1 .. ... t
0)e implement~11 (P).
The union operation makes another -- ,. '.em apparent: If MI and l\ 12 work on different sets of functions and are , .. then their union is inn1rrect in gener-
2()
,n,
, ,1 , al! This, fact may seem strange at first sight, but is illustrated by the following , very simple -example. Let the e1tp6n· interface of MI contain the logic program
( p(X), q(a), q(b)) with constants ,a and b . Let the export interface bf M2 con·': rnin the logic program {r(c) ). Therr-after the union of· Ml 'and M2 the .. atom p(c)
also belongs· to ·the, ,least ,·llerbrand I model •of-.t-he export interface; ibudt -'is naturally neither a member of implementM 3(P), as it doesn ' t tielbn'g to •'imple-
•rnent~f!{P), nor-to implememM2(f), owing 10 the disjointness conditiohs. ' ;, ; . .. !' (I(" -: • ; ··i ..,,. 1;-; .i 1,q.-11,:,
. T~e reason, ,that cause_s this p~9.blem)s. obyio1-1stx ,I~~\ the HA~~r.wd un.\yerses of both modules are mixed together instead of 1!1:.ing. disjqintly unit.eel . The situ~li'on ''could be
01
resolv~~. by using , ~ '~y-sort~d tqiiic .. ~ll, thM,.C~S!:1 M,1 -~nd M2 . , .. w_ould have ,,differe~t so~5; , (';xc~pt ,f~r. .t.~~ cci~mon P,iµ-,ame,ter P/Ut) and the
Herbrand bases are not m_ixed. This means that the re.s~lt,t of, ~ec1ion 5) hold again.
; ... ,. ;,!,·
6 Concl~sion and future work
We have presented a logical theory of building .moduladmowledge .based systems. In Q\lr approach we ·restricted our attention to Horn logic because it is a fragment of predicate logic that is well understood, has efficient proof ~heory (SLD-re,solutiori) l\~d _is broadl}'. applied in praxis.
'. • • •• ' j
We gave a m~ule concept with formal interfaces and .discussed !ts semantics and correctness. Further we discussed how modular KBS may be built out of single modules by gluing their interfaces. The module operations of composition, union and actualization have been introduced, and results concerning semantics and correctness of such systems have been derived.
. . . ' . 1!. . . ' · : There remams though much to be done. A first point would be 10 extend the presented theory beyond Heim logic. This could be either done uniformly in all module pans (normal programs, arbitrary logic programs, many-sorted · logic) cir only in the module int~rfaces, i.e. the knowledge base would still consist of definite logic clause's but the interfaces would be first order theories . Indeed, thi's is the· apporach taken ir\ ' the · theory 'of algebraic modules (the implementation part uses initial semantics, whereas all models of interfaces are considered).
Anot,her interesting question is comparison to the modular framework for KBS presented in [Wac 88] and [Ant 91 ]. According to this approach, a structured knowledge base consists of a hierarchy of modules, each one inheriting the knowledge items of all more general modules. There is always exactly one active focu s at a time denoting the most spec ific knowledge available at that time. So, all knowledge items belonging to more general modules as the focus may be used to answer queries . When the system notices that it cannot handle some problems satisfactori ly , then it must change the current focus.
21
One important advantage of this approach is that inconsistent knowledge may be included in the same knowledge base without causing difficulties, since some parts of the base cannot be active at the same time. The major drawback is, of course, that modules in such structured KBS are not entities independent from their environment; to the contrary, their meaning strongly depends on the current focus.
It would be very interesting to find out the relationship between this line of research and the modular framework presented here. Is it perhaps possible to combine both approaches of modularity? If not, which approach is more approproate for practical applications? Or, for which classes of problems is each of the approaches preferable? We shall give answers to these questions in subsequent papers.
Literature [Ant901
[Ant91]
[AS 89]
[BEP 87]
[BS 85]
[CP 871
[Die 891
[EM901
[Fey 861
[Len 901
!Lin 871
Antoniou, G.: Modules and Verification, Proc. IMA-Conference on the Unified Computation Laboratory, Stirling 1990
Antoniou, G. : Modules in Computer Sciece and Artificial Intelligence, OSM Technical Report, Fachbereich 6, University of Osnabriick
Antoniou,G . & Sperschneider,V. : On the Verification of Modules, CSL' 89, LNCS
Blum, E.K., Ehrig, H. and Parisi-Presicce, F.: Algebraic Specification of Modules and Their Basic Interconnec tions , JCSS 34, pp. 293-339, 1987
Buchanan, B.G. and Shortliffe, E.H. (eds.): Rule-Based Expert Systems, Addison Wesley 1985
Chan, Y. C. and Poterie, B. : Modules in Prolog, British Standards Institution - IST/5/15 Prolog, Document PS/185, 1987.
Dietrich, R.: A Preprocessor Based Module System for Prolog, Proc. TAPSOFT 89, 126 - 139, Springer LNCS, 1989
Ehrig, H. and Mahr, B.: Fundamentals of Algebraic Specification Vol . 2, Springer 1990
Fey, W. : Introduction to Algebraic Specification in ACT TWO , Bericht 86- 13, FB 20, TU Berlin, 1986
Lenat, D. et al. : CYC: Towards Programs with Common Sense , CACM 33,8
Lindenberg, N. et al. : KA -Prolog : Spraclulefinitim1, lnterner Ber-
22
[Lio 87)
[Rei 91]
[SA91)
[Spe 90)
[Sze 821
[Wac 88)
icht 5/87 Universitat Karlsruhe 1987
Lloyd, J.W.: Foundations of Logic Programming 2. ed., Springer 1987
Reif, W.: A Logical Theory of Module Correctness, Dissertation, Fakultat fUr lnformatik, Universitat Karlsruhe
Sperschneider, V. and Antoniou, G. : Logic: A Foundation for Computer Science, Addison-Wesley 1991
Sperschneider, V.: Modularity and Verification in Logic Programming, Technical Report P 132, Dep. of Mathematics and Computer Science, Univ. of Osnabriick 1990
Szeredi, P.: Module Concepts for Prolog, Proc. Workshop on Prolog Programming Environments, Linki:iping 1982, 69 - 80
Wachsmuth, I.: Zur intelligenten Organisation von Wissensbasen in kilnstlichen Systemen, Habilitationsschrift, Universiti!t · Osnabriick 1988
23