An intensional semantics for a hybrid language

An intensional semantics for a hybrid language

Data & Knowledge Engineering 12 (1994) 31-62 North-Holland 31 DATAK 187 An intensional semantics for a hybrid language* A m e d e o Cappelli* and D...

2MB Sizes 0 Downloads 48 Views

Data & Knowledge Engineering 12 (1994) 31-62 North-Holland

31

DATAK 187

An intensional semantics for a hybrid language* A m e d e o Cappelli* and Daniele Mazzeranghi lstituto di Linguistica Computazionale, Consiglio Nazionale delle Ricerche, Via della Faggiola 32, 56100 Pisa, Italy

Abstract One of the major assumptions in designing knowledge representation formalisms in the KL-One family, was the so-called 'intensional representation'. An intensional representation is required when two descriptions have to be compared, or when they are interpreted by qualitative processes; in other words, many processes can be activated by using the global structure of a concept, and by interpreting its properties and the relationships between these properties. In this perspective, an intensional semantics for a typical terminological language has been designed, which is quite different from the extensional models proposed so far. The semantics of the language is similar to that of data types in programming languages. Primitive concepts are denoted by a set of values. Defined concepts are denoted by their properties. A denotation thus contains the minimum number of properties which are required for an individual to be an instance of a generic concept. More precisely, the denotation is the Cartesian product of the sets denoting the properties of the generic concept (deduced from its syntax). A role is denoted by a function which, given a tuple, returns the values of the property which individuates the role. An individual is created by instantiating the properties of the relative generic concept, used as a guide. As a result, this process creates a tuple whose elements are the instantiating properties. The instantiation chain terminates by instantiating primitive concepts on the basis of their denotation. A deeper integration between the entire system and any programming language can be reached, which implicitly gives rise to an object-oriented system. In other words, it is possible to introduce an individual concept into a programming language, like any other data type. For instance, an individual concept is passed to a function as a parameter; once it has been verified that this individual is an instance of a generic concept, or of one of its subconcepts, the function will be executed. Furthermore, an increase in the expressive power is obtained, since it makes it possible to give a formal meaning to all kinds of recursive definitions of individual and generic concepts

Keywords. Artificial Intelligence; knowledge representation; hybrid systems; intensional semantics

I. Introduction

The aim of this article is to describe an intensional semantics for a knowledge representation language based on terminological logic. This language belongs to the KL-ONE family [38], whose history begins with the implementation of KL-ONE [5], the first language to realize the model of Structured Inheritance Networks (SI-Nets) [4]. KL-ONE exhibited a high terminological power and a lower or null assertional power. Starting from KL-ONE, many hybrid systems have been defined, all of which are * This work was partially supported by Progetto Finalizzato Sistemi lnformatici e Calcolo Parallelo of C.N.R.

* Corresponding author. 0169-023X/94/$07.00 © 1994 - Elsevier Science B.V. All rights reserved SSDI 0169-023X(93)E0020-Z

32

A. Cappelli, D. Mazzeranghi

composed of a terminological component (TBox) and an assertional one (ABox). In general, the TBox contains generic concepts and roles which describe terms of the domain; the ABox contains individuals and assertions about them (KRYPTON [6], KL-TWO [30, 25], BACK [15, 20] and CLASSIC [2]). This architecture makes it possible to specify classical notions such as intension and extension in a new way. In analyzing the semantics of logic languages, Carnap [7] stressed that different types of semantics can be specified for the expressions of a language if an intensional or an extensional point of view is adopted. For instance, given the predicate 'red', its extension is the set of all red things, while its intension corresponds to the property of being red. In specifying knowledge representation languages, the importance of an intensional representation has been stressed by Woods [36], as well as by Bobrow and Winograd [1], who suggest that descriptions of objects have to be intended as intensional representations in order to make it possible to recognize and to match conceptual entities. In defining SI-Net formalism, Brachman [3] suggests that generic and individual concepts are intensional representations of objects (generic or individual) in the world. Maida and Shapiro [16] state that all nodes of a semantic network represent intensions and not extensions. In general, in terminological languages intensions have been realized by the use of intensional concepts "in the sense in which [morning star] and [evening star] are intensionally distinct concepts, while referring to the same extension (the planet Venus)" [37]. The concept is distinct from the predicate in first order logic and from classes. According to Woods [37], "in many semantic networks the notion of a concept is primarily that of a data structure". On the contrary, "in KL-ONE an attempt was made to represent conceptual structure in a way that would reflect the structure of abstract concepts, independent of particular data structures. However, the semantics of these abstract structures was not totally clear". The necessity of clearly defining the meaning of data to represent conceptual facts is thus raised. In general, in defining the semantics of a terminological language an extensional approach has been adopted: in a given domain of objects, generic concepts denote subsets of the domain. This approach is motivated by the fact that concepts are identified with predicates in first order logic with the aim of unifying intension and extension. Classical approaches by Schmolze and Israel [26] and Nebel [21] can be classified into this perspective, as well as Patel-Schneider [22] even if his four-valued logic tends to weaken the subsumption relation in order to achieve an increase in the computational complexity of subsumption. A different approach has been adopted by Guarino [13, 14], where intensional and extensional aspects are closely intertwined. Recently Woods [37], in analyzing different approaches in the specification of formal semantics of terminological languages, highlighted the fact that the adequacy of such a type of language is measured on the basis of the complexity, the clarity of the meaning and the criteria of satisfaction of their data structures. Woods also argues against the oversimplification deriving from the adoption of an extensional viewpoint in specifying the semantics. The specification of a formal semantics of structured objects has been studied in the context of object-oriented systems, for instance by specifying a formal model of the query language [8]. In the context of object-oriented database systems, Urban and Delcambre [29] propose to use unary and binary predicates to represent, respectively, classes and properties. This makes it possible to define several types of relations on system objects by means of inherent and explicit constraints; in particular, inherent constraints describe inheritance relations between classes. Representation of the two types of constraints can be uniformly obtained by transforming them into Horn clause form. Wand [31] uses an ontological model with intensional characteristics to give a formal

An intensional semantics for a hybrid language

33

meaning to the main conceptual aspects of object-oriented systems. In this intensional approach, the notion of a class is specified on the basis of the properties possessed by individuals. In particular, this model is able to take into account constraints on the values of the properties of an individual, composition of individuals, different descriptions of an individual (called frames o f reference) and mechanisms which change the state of an individual. In formal ontology, languages are defined whose data are types of complex structures (substances, accidents) where types of complex operations are specified which clearly manipulate such structures (eidos, subeidos, etc.) [27]. The adoption of a universe made of structured objects makes it possible to realize subsumption in a different way, or to account for satisfaction, a process necessary in the recognition of complex situations, as required in many DB or AI applications. It is worth noticing that the intension of a concept increases by increasing its specificity, while the extension proportionally decreases, in accordance with the ontological principle of the inverse relation between intension and extension [32, 33]. The increase in the expressiveness of intensional denotations can be profitably exploited by the deductive processes which can reason with terminological structures. On the basis of these theoretical assumptions, we aim at specifying an intensional semantics for a terminological language where denotations of concepts represent properties of concepts; in other words, the denotations are complex objects specifying the structure of the representations of concepts. This is quite different from the extensional semantics which aims at specifying what the instances of a concept are. This is similar to the way in which data types are treated in programming languages except that, in our hypothesis, data types are interpreted from a conceptual viewpoint, thus becoming "abstract conceptual entities" composed of "parts that can be analyzed and reasoned with" [37]. To be more precise, a generic concept denotes a set of tuples representing the properties which at least are to be owned by an object in order to be an instance of this concept. In this sense, our approach allows universes which have as elements data structures built up with structured objects. We are confident that, by using this new type of semantics, a higher degree of expressive power of terminological languages can be achieved. In particular, we aim at making it possible for some inferential process, other than subsumption, to be specified by using classical terminological conceptual entities. The semantics of the terminology specified in these terms has important consequences in the specification of the assertional component. This is specified in a functional way, so that it does not directly refer to an assertional knowledge base. In this way, the assertional component can be used more clearly and in a completely controlled way. Furthermore, an increase in the expressive power is obtained, since it makes it possible to give a formal meaning to all kinds of recursive definitions of individual and generic concepts. Formally, recursive definitions are treated by means of the inverse limit construction [24], so that generic concepts denote sets containing both finite and infinite data structures, the latter being represented as infinite sequences of finite data structures which progressively represent more and more accurate approximations. With regard to computational complexity, subsumption in the intensional approach is polynomial, as we will see in Section 2.1.4.1.

2. The knowledge representation language The knowledge representation language belongs to the family of hybrid systems and it is composed of a terminological and an assertional component.

A. Cappelli, D. Mazzeranghi

34

2.1. Terminological component In this section the terminological component is described both from a general viewpoint and by illustrating its syntax and semantics.

2.1.1 Generalities The terminological component contains a set of constructs for the definition of generic concepts and roles. The definition of a generic concept is given by specifying the properties by which it is characterized, in particular by the specification of the types of values (value-restriction) which can be assumed by a property (construct all) and by the possible number (numberrestriction) of these values (constructs atleast and atlnost). Properties can be explicitly declared or inherited from other concepts (construct and). In the case in which a property is both explicitly declared and inherited, the denotation of its relative generic concept will contain only one occurrence of the property and its number-restriction is the intersection of the number-restrictions and its value-restriction the union (in an intensional sense) of the value-restrictions. Primitive generic concepts (defined by the construct primC) are used as an inductive basis in the construction of concepts. The construct thing defines the most general concept which has no properties and denotes the empty set. A role (defined by the construct primR) denotes a function which, given a tuple, selects the suitable component, which represents a given property. The definition of a role also contains the specification of a generic concept: in this way restrictions on the use of the role are imposed. Furthermore, the specification of a name acts as a type constructor. Generic concepts can also be defined recursively, in this sense overcoming the present limits of extensional semantics [21]: in Section 3 a formal semantics of recursive definitions will be shown. Let us imagine that the KB contains, among others, the generic concepts team and football-player linked by the role member; we can now define the concept football-team in the following way:

football-team = (and team (all member football-player) (atleast 11 member)) that is to say, a football-team is a type of team whose members are football-players who are at least 11. The denotation of football-team is the following:

IUfootball-team]

.-

P R. O D. ( t 1([. T 1]min 11 ) . . . . .

t n ([ T n] maXn minn),member([P]l,nil ))

where: • P R O D denotes the Cartesian product, • [A]miax denotes the lists of elements belonging to A, whose length is between min and max (if max = nil then there is no upper bound to the length of the lists), • member, which is the name of the role member, acts as a type constructor, • t, . . . . ,t n are the names of the properties inherited from team, • T I . . . . . Tn are the value-restrictions of the properties inherited from team, m i n , , m a x l , . . . ,minn,max n are the number-restrictions of the properties inherited from •

team, • P is the denotation of football-player. The denotation of football-team is graphically represented in Fig. 1 (where circles represent denotations of generic concepts and squares represent denotations of roles).

An intensional semantics for a hybrid language Tl

35

(minl,maxl)

It l ~

member

P

E (11,nil)

d <

Tn

(minn,maxn)

Fig. 1. Denotation of football-team. As already stated at the beginning of this section, if member were contained in t L. . . . . t n, then the property would have as a value-restriction the union (in an intensional sense) of the value-restrictions and as a number-restriction the intersection of the number-restrictions (see Section 2.1.3.6).

2.1.2 Terminology: syntax T h e syntax of the terminology is shown in Fig. 2.

::= ; ::= ( = )* ::= ( = )*

thingI

::= I ( p r i m C ) I (and )l (all )l (atleast )l (atmost )

::= I ( p r i m R ) ::= string ::= string ::= string ::= non negative integer ::= positive integer Fig. 2. Syntax of the terminology.

36

A. Cappelli, D. Mazzeranghi

2.1.3

Terminology:

semantics

Formally, an intensional semantics consists of a set family P R I M , where every set is the denotation of a primitive concept, and of a set of interpretation functions mapping syntactic categories into a domain. Given a terminology, the corresponding interpretation function returns an environment of type E N V which associates the meaning of the definition to every identifier defined in the terminology (the syntactic domain, corresponding to a syntactic category, will be written in bold type): E N V = (generic identifier) U

(role identifier)

~ STRUCTURE

where S T R U C T U R E represents possible denotations of syntactic objects: • S T R U+ ~C T U R E = 2 c + R (interpretation structures) +~ • C = + P R O D ( n a m e l ( [ C ] mmi nalx) !. . . . ,name,([C]mi," m a X n )) + ( n + I P R I M , ) (generic concepts) n=l

=

• R = C ~ [C] (roles) and where, given a generic set A, A i is the ith element of A and ' + ' represents disjoint union. 2 c is the domain of generic concepts and it is represented as sets of tuples, which constitute the m i n i m u m set of properties a concept is required to have in order to be an instance: it is quite different from the extensional viewpoint in which the denotation of a concept contains a l l its instances. In particular, in the domain C of tuples, the n a m e i max, represents the names of the properties which act as type constructors, while [C]min i represents the values which can be assumed by such properties, which in turn are represented as lists of tuples whose length is between min i and maxi. The meaning of the recursive definition of C will be formally defined in Section 3. Thus the family of primitive concepts will be used as an inductive basis in the construction of tuples. R is the domain of roles each of which denotes a function which, given a tuple, selects the right c o m p o n e n t which consists of a list of tuples. In the following, the formal meaning of certain notations so far used is presented: • n a m e ( T ) = {(name, l) I t E T} (constructor of a new type) •

max

max [C]min =

-[n



IC] nil

t--.mi.

{[C 1 .....

=min

Cn]]Ci ~ C) (list with a n u m b e r n of elements of C, where min -< n -< max)

+~ =

q'-

([Cl,"""

,Cn][Ci ~ C}

=min (list with a n u m b e r n of elements of C, where min -< n) • P R O D ( T 1 , . . . , T , ) = T 1 x . . . x T, = ( ( t l . . . . . t , ) l t i E T~} (Cartesian product) T h e interpretation functions have the following form: n

(terminology) ~ E N V IGD: (generic declarations) ~ E N V IRD: (role declarations) ~ E N V I : (generic) U (role) ~ S T R U C T U R E Ir :

We assume that a sequence of declarations does not contain cycles. We can thus assume that the identifiers on the right side of the declaration have been ' e x p a n d e d ' by their definitions. T h e meaning of the interpretation functions is shown in F i g . 31. 1In the following, quantifiers will be used only when strictly necessary; for instance the following formula: f(x) = . . . y . . .

z

where 3 y 3 z : x = ( y , z )

will be written as: f(x) = . . .

y ... z

where x = (y, z)

An intensional semantics for a hybrid language

37

ITI]GD;RD] =IGDI]GD] O IRDI~RD] IGDll idl=C1...idn=CnN = e where e(idi) = INCiN

for each i~ { l,..,n}

IRDNidl=R1...idn=Rn]] = e where e(idi) = INCi]

for each i~ { 1,..,n }

I[Ithingll

= {}

IN(primC i)N = PRIM i Ill(and C 1 C2)]I =UNION(I[IC1],II[C2]) Ill(all R C)I] =PROD(cons([UNION(C',INCN)] 0 ) where RANGE(IIIR] ) = C' CONSTRUCTOR(IN R] ) = cons II[(atleast N R)] = PROD(cons([C]N ~) where RANGE(II[Rll) = C CONSTRUCTOR(I] R N) = cons IU(atmost N R)N = PROD(cons([C]oN)) where RANGE(IN RN ) = C CONSTRUCTOR(I] R N) = cons I ] ( p r i m R C name)N = f where f(x) = ~

Ti

t ERROR

if (1) else

(1) ¢:~ 3i : name = namei and SATISFY(Ti,[II~CN]o l)~i x = Ri = namei(Ti) Fig. 3. Meaning of the terminologyinterpretation functions.

In the following sections, the meaning of some constructs and the definition of some functions will be discussed in detail by using drawings (for the definition of the function SATISFY, see Section 2.2.3.2); we shall refer to the example of the concept f o o t b a l l - t e a m , defined in Section 2.1.1, supposing that: • m e m b e r = (primR h u m a n - b e i n g m e m b e r ) • I~human-being~ = H • t, = m e m b e r all Given a role R and a generic concept C, the denotation of (all R C) contains only one property whose value-restriction is the result of the union (in an intensional sense) of the denotation of C and of the range of the function denoted by R, the number-restriction is (0,nil) and the type constructor is obtained from the denotation of R (see Fig. 4):

2.1.3.1

/]](all R C)]] = P R O D ( c o n s ( [ U N I O N ( C ' , I ~ C ] ) ] o i t ) ) where RANGE(I[[R~)= C' C O N S T R U C T O R ( I ~ R ~ ) = cons

A. Cappelli, D. Mazzeranghi

38

C'

cons

I[R]

©

cons

I](all R C)]

(O,nil)

UNION(C',I [ C] )

Fig. 4. Denotation of

(all R C).

H

member

I[ member]

IHC]

I[football-player ]

I"l

© I[ (all member

member

E (0,nil)

UNION(H,I [football-player ] )

football-player )] Fig. 5. Denotation of

(all member football-player).

In the example in Fig. 5, member is a role, football-player is a generic concept, I~footballplayer] is the denotation of football-player, H is the range of I~member~ (denotation of member) and member is the type constructor.

2.1.3.2 atleast Given a non-negative integer N and a role R, the denotation of (atleast R C) contains only a property whose value-restriction is the range of the function denoted by R, the number-restriction is (N,nil) and the type constructor is obtained from the denotation of R (Fig. 6):

II[(atleast N R)]] = PROD(cons([ C] N')) where R A N G E ( I ~ R D = C CONSTRUCTOR(IIR]]) = cons In the example shown in Fig. 7, 11 is an integer, member is a role, H is the range of lq[member] (denotation of member) and member is the type constructor.

2.1.3.3 primR Given a generic concept C and a name 'name', the denotation of

39

An intensional semantics for a hybrid language

I[[ R]

consul...]

C

cons

©

D

I[[(atleast N R)]

(N,nil)

Fig. 6. Denotation of (atleast N R).

I[[member]

member

H

member

(3

D

Ill (atleast 11 member)] (11,nil) Fig. 7. Denotation of (atleast 11 member).

(primR C name) is a function (see Fig. 8) which, given a tuple, selects the right component (according to 'name'), by controlling that the elements belonging to the component are instances of the denotation of C (so I[[C] is the range of the function): I~(primR C name)B = f Ti if (1) where f ( x ) = E R R O R else (1) ¢:> 3i: name = n a m e / a n d SATISFY(T/,[I[[C~]o" ) x = ( R 1 , . . . ,R,) R i = namei(Ti)

In the example in Fig. 9, I~memberll is the function which denotes the role member, H is the range of the function and member is a name which behaves as a type constructor. 2.1.3.4 R A N G E Given a function f denoting a role, R A N G E returns the range of f (Fig. 10):

f

name

I~C]

Fig. 8. Denotation of (primR C name).

A. Cappelli, D. Mazzeranghi

40

member

16 member]

P,

Fig. 9. Denotation of member.

name

D

C



Fig. 10. Denotation of a role.

RANGE(f)

= C

T~ if (1) where f ( x ) = ERROR else (1)¢~3i: name = name/and

SATISFY(T~,[C]o" )

x=(R,,...,R~) R i = namei(Ti). A n e x a m p l e is shown in Fig. 9.

2.1.3.5 C O N S T R U C T O R G i v e n a function f denoting a role, C O N S T R U C T O R returns the type constructor (corresponding to the n a m e of the role) which is in the definition of f (see Fig. 10): CONSTRUCTOR(f)

= name if (1) Ti w h e r e f(x) = ] , E R R O R else (1) ¢:>::1i: n a m e = n a m e / a n d x=(RI,...,R,) R i = namei(Ti) .

f

S A T I S F Y ( T i , [C]0" )

A n e x a m p l e is shown in Fig. 9.

2.1.3.6 U N I O N G i v e n the d e n o t a t i o n C 1 and C 2 of two generic concepts, U N I O N returns C~ if C 2 is the e m p t y set or if C~ and C 2 belong to P R I M and are equal; U N I O N returns C 2 if C 1 is the e m p t y set; finally, if C~ and C 2 are denotations of non-primitive concepts, then U N I O N ( C 1 , C 2 ) contains all the properties of C 1 and of C 2, except in the case in which two p r o p e r t i e s having the s a m e n a m e a p p e a r in C~ and C2: in this case, there will be only o n e o c c u r r e n c e of the p r o p e r t y and its number-restriction is the intersection of the n u m b e r restrictions and its value-restriction the union (in an intensional sense) of the valuerestrictions (Fig. 11 ):

UNION(C1, C 2) =

C 1 if C 2 = ( } o r ::li: C 1 = C z = P R I M / C2 if C1 = { } P R O D ( A , . . . . . A . , B 1. . . . . Bm) if (1) ERROR else

An intensional semantics for a hybrid language

41

)

RI

T1

0 ~

Cl

I~

name

D

0

(minl,maxl)

T1

-O

nalTle

0

D R2

, T2

0

D

(min2,max2)

C2

T2

UNION(T1 ,T2)

()

name E

()

Ri

)

(MIN(max 1,max2), MAX(minl,min2))

E

UNION(C l, C 2)

T1

R2

--O i

T2

Fig. 11. Application of UNION to C~ and C2. where (1) ¢:> the minimum value of the resulting number-restrictions is less than or equal to the maximum value C, = PROD(R11 . . . . . R',,,) C 2 = PROD(R21 . . . . . R~

R~ 2)

~,, ~1 ....

= namei t l ~ i lmi.~ ) 2

2 max2

R j2 = nam%([Tj]m~d ) T2. ]MiN(max~,max2) -~

Ai=

{n I

name~ ([UNION(T~,,j,,MAX(mi,~.min2)) Ri

. . . . .

if 3j: name~ = name~ else

Bm} = {R~ [not 3i: name~ = name]}.

In the example in Fig. 12, I[team] and /[(and (all member football-player) (atleast 11 member))] are denotations of non-primitive generic concepts, having in common the property whose name is member.

2.1.4 SUBSUMES We can now define subsumption from an intensional viewpoint. Intuitively, a generic concept C~ subsumes another generic concept C 2 iff the denotation of C 2 contains at least all

A. Cappelli, D. Mazzeranghi

42

T1

(minl,maxl)

member oeo

G

(minn,maxO

Tn

-@

(minn_~,maxn.1 ) Tn-1

Ilk(and (all member football-player) (atleast 11 member)) ]

UNION(H, I~football-player ~ ) member

D

k_)

(11,nil)

-@

UNION(T n,UNION(H,I~football-player]))

() member

TI

(MIN(maxn,nil), MAX(minn, 11))

tl (rain 1,max J)

D

tn.|

(min n.1,maxn.l )

0

D

Tn-I

---O

UNION(I ] team] ,I[ (and (all member football-player) (atleast 11 member)) ] ) Fig. 12. Application of UNION to l~team~ and /[[(and (all member football-player) (atleast 11 member))~.

the properties of the denotation of C 1, even if more specific; a property P~ is more specific than a property/)2, which has the same name as P~, if its number-restriction is contained in the number-restriction o f / ' 2 and if its value-restriction is subsumed by the value-restriction of P2. Formally (see Fig. 13): C~ subsumes C 2 ¢:~ SUBSUMES(IIC~B,IUC2~)

An intensional semantics for a hybrid language

C1 n~e

43

Tl ~'~"-O

(min 1,maxl ) name' , T2

(min2,max2)

name

0

(min2,max2)

C2

SUBSUMES(CI,C2)

"0 T2

¢:~

min 1 -< min2, max 1 > max 2 , SUBSUMES(TI,T2) Fig. 13. Application of SUBSUMES to Ct and C2.

where f TRUE if C l = { } or 3i: C l = C 2 ~ - P R I M , o r (1) else [ FALSE 1 2 1 2 w h e r e (1) ¢:~VR i 3 R j: S U B S U M E S ( C i , C j), 2 • I J • 2 1 __ 2 1 min i ~ m i n i , m a x i ~ m a x j, n a m e i = n a m e j 1 1 C 1 = PROD(R1, . . . ,R, ) 2 2I C 2 = P R O D ( R 1 , . . . , R , 2) R] = n a m e ~ ,([Tllmax~ L i Jmin~ )

S U B S U M E S ( C 1, C 2) =

2

Rj

2tr ~21max

----

2 x

namej[lijlmin~ ).

In the e x a m p l e shown in Fig. 14, /[[(and (all member football-player) (atleast 11 member))] and I~team] are d e n o t a t i o n s of non-primitive generic concepts, which have in c o m m o n the p r o p e r t y whose n a m e is member.

2.1.4.1 Computational complexity It is possible to specify an algorithm of p o l y n o m i a l c o m p l e x i t y for the c o m p u t a t i o n of the intensional s u b s u m p t i o n , involving also recursive definitions and constructs such as or, vr, compose and sd [17]. Such an algorithm can be specified by following the structure of the intensional formulas, which is quite different f r o m the extensional a p p r o a c h , w h e r e semantic f o r m u l a s are used only for verifying the correctness and c o m p l e t e n e s s of the s u b s u m p t i o n algorithm. It is worth noticing that, regarding c o m p u t a t i o n a l complexity, it is not possible to c o m p a r e intensional and extensional s e m a n tics, since, in certain cases, such as, for instance, structural descriptions and recursive definitions, the two a p p r o a c h e s are substantially different.

2.2. Assertional component In this section the assertional c o m p o n e n t will be described b o t h f r o m a general viewpoint and by defining its syntax and semantics.

A. Cappelli, D. Mazzeranghi

44

UNION(H,

member I~football-player ] ) I[~(and (all member football-player) (atleast 11 member)) ] T1

D (11,nil)

<)

(mini ,maxl )

member

D

e e e

(min.,maxn) Tn_l

T,

<2)

(minn-1 ,maxnq )

SUBSUMES( IU (and (all member football-player) (atleast 11 member))U, I1[team I1)

¢:~

1 1 < minn, nil > maxn, SUBSUMES(UNION(H,I[football-player]),Tn) Fig. 14. Application of SUBSUMES to l~(and (all member football-player) (atleast 11 member))B and l~team].

2.2.1 Generalities In general, in any hybrid system, the assertional c o m p o n e n t allows a user to m a k e assertions of the following types: • an individual is an instance of a generic concept; • an individual is linked to another individual by a role; • the n u m b e r of individuals linked to another individual must be greater than or equal to a certain value; • the n u m b e r of individuals linked to another individual must be less than or equal to a certain value; where generic concepts and roles refer to a previously defined terminology. In this way, the assertional c o m p o n e n t is procedural; every assertion updates the assertional knowledge base, which initially is empty. This approach has certain consequences, such as for instance that a user has to know the entire history of the KB, since any individual is characterized by the entire sequence of declarations, and no constraints exist in order to control the use of the KB, so that the probability for a KB to become inconsistent increases with its dimension. Different results can be achieved if a functional approach is adopted. An individual is created by instantiating the properties of the relative generic concept (by using the construct individual). As a result, this process creates a tuple whose elements are the instantiating properties. It is worth noting that, in order to individuate a generic, an individual must have at least the properties of the generic. The instantiation chain terminates by instantiating primitive concepts (by using the construct primI). The select construct makes it possible to select a property value of an individual of a defined concept. The index construct selects the index of an individual of a primitive concept, is-instance and is-a correspond to the classical notions of individuation and subsumption.

45

An intensional semantics for a hybrid language

For instance, once the individual concepts Gullit and Baresi are defined, the individual concept Milan can be defined in the following way: Milan = (individual football-team m e m b e r : [ Gullit, Baresi . . . . ] . . .)

that it to say, Milan is a football-team whose members are: Gullit, B a r e s i , . . . The denotation of Milan is thus the following: A~Milan]e = ( . . . . m e m b e r ( [ A~Gullit]e,A~Baresi]e, . . .1) . . . . )

where: • angled brackets denote tuples, • square brackets denote lists, • m e m b e r is a type constructor, • e is the environment obtained by interpreting the terminology (see Section 2.2.3). The denotation of Milan is graphically represented in Fig. 15. 2.2.2

Assertional component: syntax The syntax of the assertional component is shown in Fig. 16. The syntax of the construct individual is more simple than that used in the example of the previous section, since the association between the properties and their values is implicit in the order in which the properties appear in the denotation of the generic concept and in the order in which the values are specified inside the construct. Consequently, the definition of the semantics of individual will be simplified (see next section). 2.2.3

Assertional component: semantics The semantics of the constructs of the assertional component is given by the interpretation function A, which refers to the environment 'e' obtained from the interpretation, through I t , of the terminology 't' which appears in the assertion. Interpretation functions have the

A[ GullitB e

member A~ Milan]

A [ Baresi ] e I

Fig. 15. Denotation of Milan.

46

A. Cappelli, D. Mazzeranghi

::= : ( I I ) ::= (primI ) I

(individual + ) ::= [] I (select ) ::= (is-instance ) I (is-a ) ::= positive integer expression I (index ) Fig. 16. Syntax of the assertional component.

following form:

AA~ (assertion) --~ C + [C] + { T R U E , F A L S E } A: ((individual) t.j (individual list) t_J (test) t_J (index

expression)) × E N V C + [C] + { T R U E , F A L S E } + Z + where Z + are positive integers belonging to the syntactic category (index expression), (for C and E N V see definitions in Section 2.1.3)

T h e meaning of the interpretation functions is presented in Fig. 17.

AA[It : a] = Al[a](IT[It]]) AH ( p r i m I idc i)]l e = (e(idc))AlI i]e

AlI(individual id C I1...In)l]e =



t

if (1)

ERROR else T maxl T maxn where (1) ¢:~ SATISFY(AIII l ]e,[ 1]minI ) ..... SATISFY(AI[I, ]e,[ n]min ) e(idc ) = PROD(R! ..... Rn) max.

R i = namei([Ti]min ') i

A[I[I l ..... Ikl]e = [A[[II] e ..... All Ik]] e] A[~(index I)]e = /

L

i ERROR

if A[~I]e = C i else

All (select idR I)]e = (e(idR))(AllIl]e) A[I (is-instance I idc)]] e = SATISHES(A[I I]e,e(idc )) All (is-a idl id2)]] e = SUBSUMES(e(idz),e(idl)) Fig. 17. Meaning of the assertional interpretation functions.

An intensional semantics for a hybrid language

47

The semantics of the construct individual and the definition of the function SATISFY will be described in the next sections 2.

2.2.3.1 individual Given an identifier id c of a generic concept defined in the terminology and n lists I, . . . . . I n of individual concepts, the denotation of (individual id c 11 ...In) is a tuple whose ith element contains the denotation of I i and the type constructor of the ith property of the generic concept denotation (see Fig. 18); furthermore, the following conditions are verified: (i) the denotations of the elements of li are to be instances of the value-restriction of the ith property, (ii) their number has to be in accordance with the number-restriction: (namel(A~I1]]e),... ,name,(A~I,]e)) if (1) All(individual id c I , . . . I n)]e = L E R R O R else where (1) ¢:> SATISFY( A~II]e, [ T,]m~x~),... ,SATISFY( A~In]e,[ Tn]max~ ) e(idc) = P R O D ( R , . . . . . R n) _

max

i

R i - namei([Ti]mini )

A~[ I, . . . . . 1kite = [A~Ii]e . . . . ,A~Ik]e ] In the example in Fig. 19, l~football-team] is the denotation of a generic concept, A~Gullit]e and A~Baresi]e are the denotations of individual concepts of one of the lists, I~footballplayer] is the value-restriction of one of the properties and (ll,nil) is the corresponding number-restriction.

T1

name 1 (mini ,maxt)

e(idc)

name2 (min~,max~)

T2

[2 1

tl

A

| [] v

I1

m

,q, All(individual idc 11 I2)]e

l

!

A~I,]e = [It] Fig. 18. Denotation of

2 In the following examples, we will a s s u m e that:

• UNION(H,I[football-player~) = I~football-player] • UNION(Tn,l~football-player~) = l~football-player] •

m i n . ~< 11, maxn = nil

A~I2]e= [I2,12'] (individual id c 1, •2).

v

W 12 I!

48

A.

Cappelli,

D. Mazzeranghi

tl

T1

(minl,maxl)

.team ]]

member

(11,nil)

II[football-player ]

A~Gullit]e

tile

A[[ Baresi ] e

Fig. 19. Denotation of Milan = (individual football-team.., member: [Gullit,Baresi . . . . ]...).

2.2.3.2 S A T I S F Y T h e formal m e a n i n g of the function S A T I S F Y can now be given: it specifies w h e t h e r the denotations of certain individual concepts in a given list are instances of a given generic concept: SATISFY(/,L) = ,[TRUE if (1) L F A L S E else w h e r e (1) ¢:> min ~< k ~ m a x , S A T I S F I E S ( / I , C) . . . . . I = [Il . . . . . Ik] L

S A T I S F I E S ( / h , C)

max

-- [C]mm

G i v e n the d e n o t a t i o n I of an individual concept and the d e n o t a t i o n C of a generic concept, S A T I S F I E S verifies if I is an instance of C, by controlling if I has (instantiated) at least all the p r o p e r t i e s of C and by controlling if the e l e m e n t s belonging to a generic c o m p o n e n t of I follow the n u m b e r - r e s t r i c t i o n and the value-restriction of the c o r r e s p o n d i n g p r o p e r t y of C (Fig. 20): ,[TRUE if C = { } or (1) o r 3 @ I = ( P R I M , ) j , C = P R I M i = [ FALSE else w h e r e (1) ,¢:~VRi3Rj: 1 2 S A T I S F Y ( [ f l, • " " ' I,Kt } I '•[ • ~l (i ? .lmin~" . . . ~'x) , n a m e i C = n a m e j/ C : P R O D ( R c . . . . . R c) I = (Rll . . . . . R / ) RC c, • ~ C 1 max,: x = name~ t l t ~ ] m i n ~ ' ) 1 I 1 " / R i = namej([l I.....

S A T I S F I E S ( / , C)

I~]).

In the e x a m p l e in Fig. 21, /[[(and (all member football-player) (atleast 11 member))D is the

An intensionalsemanticsfor a hybrid language C

0

~m

I

name

49 T

D

(min,max)

name

11

-

I2 SATISFIES(I,C)

~ ) ¢:~ SATISFY([ I 1,I2], [ T ]max.

Fig. 20. Application of SATISFIES to 1 and C.

member I[football-player ] Ill (and (all member football-player) [ ' ~ (atleast 11 member)) ]

(11,nil)

A[ Gullit] e

member

A[ Baresi ] e

SATISFIES(All Milan] e,II[ (and (all member football-player) (atleast 11 member)) ]) ¢m

SATISFY([A~ Gullit]e,A~Baresi ]e,...], [l~football-player]]lll ) Fig. 21. Application of SATISFIES to A~Milan~e and l[(and (all member football-player) (atleast 11 members)~.

A. Cappelli, D. Mazzeranghi

50

denotation of a generic concept, A~Milan]e is the denotation of an individual concept, A~Gullit]e and A~Baresi]e are elements of the component whose name is member, I~football-player] and ( l l , n i l ) are, respectively, the value-restriction and the number-restriction of the corresponding property of the generic concept.

3. Recursive definitions In defining the semantics, we assumed that cycles were not present in concept or role declarations. However, in knowledge representation, many concepts are more naturally defined in terms of recursion, such as, for instance, a binary tree, defined as follows:

binary-tree = (and (all number positive-integer) (atmost 2 branches)) positive-integer = (primC 1) number = (primR thing number) branches = (primR binary-tree branches) or, by using an indirect recursion, the concepts of husband and wife are defined as follows, in a monogamic society:

husband = (and human-being (atleast 1 has-wife) (atmost 1 has-wife)) wife = (and human-being (atleast 1 has-husband) (atmost 1 has-husband)) has-wife = (primR wife has-wife) has-husband = (primR husband has-husband) human-being = . . . (characterized by the properties whose names are P l , . . .

,Pn)

An assertion can be thus expressed as:

John = (individual husband pl: 1 1 . . . p,: I n has-wife: Mary) Mary = (individual wife Pl: I ~ . . . Pn: I'~ has-husband: John) I1 In = . . . I; =. . . . . . I" = . . . : .

.

.

.

.

.

Recursive definitions are made possible only when an intensional semantics has been adopted, while the problem has only partly been solved by using extensional semantics [21]. In order to solve this problem, the first step is to add infinite data structures to the denotation of concepts, which makes it possible to express the definition of binary trees with infinite paths, in the following way:

Infinite- Tree = (individual binary-tree number: [One] branches: [Infinite- Tree,Infinite- Tree]) One = (primI positive-integer 1) whose meaning, not entirely specified, is

An intensional semantics for a hybrid language

51

( number([ A]One]e]), branches([ ( number([ A~ One]e]),branches(. . .) ) , ( number([ A~ One]e]),branches(. . .) ) ]) ) where e is the environment obtained by the interpretation of the terminology (see Section 2.1.3). Infinite data structures make it possible to represent circular declarations, as in the following example (properties pl(I1) . . . . ,pn(I,) and p l ( I ~ ) , . . . ,pn(I',) are respectively represented as p(I) and p ( l ' ) ) :

John = ( p(l),has-wife([ ( p(I'),has-husband([ ( p(I), . . .1) ) ]) ) Mary = ( p(I'),has-husband([ ( p(I),has-wife([ ( p(I), . . .]) ) ]) ) 3.1. Formal solution The process of introducing infiniteness into data structures is known as inverse limit construction and consists in representing a generic data structure as an infinite sequence of finite approximations. In the case of a finite data structure, there exists a stabilization point, in other words, there exists an approximation equal to the data structure and to every following approximation. In the case of an infinite data structure, the sequence never stabilizes [24]. In the following, only the case of direct recursion will be discussed, as a sequence of indirect recursive definitions, such as: . . . ,Xn)...

X 1 = fl(Xl,

X n = fn(Xl ....

,Xn)

can be reduced to direct recursion by using the following transformation: ( X 1. . . .

,Xn> = < f l ( X l

.....

Xn),.

. . ,L(x1,...

,Xn)>

A n y generic concept declaration such as

id = C without recursion, is solved by associating the identifier id to the semantic interpretation of C in the environment e:

e(id) = I~C] This is obtained by extending the definition of I:

I~id]= id With reference to partial order theory, the inverse limit construction is applied when the following two conditions hold: • D o m a i n constructors in/[[C]], return pointed cpo when applied to pointed cpo; • The sets denoted by primitive concepts are pointed cpo. Regarding the former, it is sufficient to rewrite domain constructors by ' × ' and ' + ' , which satisfy this condition (see [24] chapter 6): • P R O D ( T 1. . . . . T n) = T 1 x . . . x T n • n a m e ( T ) = (name) x T

A. Cappelli, D. Mazzeranghi

52



max [ T]min =



[• -T1 nil -Jmin

:

max -[n=min +~ -[n=min

Tn

T"

With regard to the latter, it is sufficient to add the element ± to the denotation A of a primitive concept and choose the following partial order: x <~ y C:~ x = ± o__~rx = y .

Thus it is possible to associate to i d the domain id~ obtained by the inverse limit construction in the environment e: e( i d ) = i d a .

This domain is a pointed cpo (see [24] chapter 11), due to the completion provided by infinite data structures. Recursive declarations of individuals can now be analyzed. Any recursive declaration id = I

is transformed into the equation id = A~l~e

by using the following extension of A: A~id]e = id

where e is the environment resulting from the interpretation of the terminology. The solution of the equation is fix(f), where fix returns the least fixed point of the function f defined in the following way: f(id) = A[l]e.

Given that

A: ((individual) U (individual list) U (test) U (index expression ) ) x E N V C + [C] + {TRUE,FALSE} + Z + then f:

C~C

(in this case A can only return elements of C). C is a recursively defined domain whose solution is Ca, as in the declaration of generic concepts. To be more precise, the function f is of the type C~---, C~ .

f is composed of continuous functions, since they are the operations associated with domain constructors (see the transformation by ' × ' and ' + ' and chapter 6 in [24]). Given that C~ is a

An intensional semantics for a hybrid language

53

pointed cpo and f is continuous, the least fixed point of f, fix(f), exists and is defined as follows: fix(f) = s u p { f i ( ± ) l i >! O} (see Theorem 6.11 in [24]). It is worth noting that C~ is not fully exploited by the construct for the creation of individuals, since only periodic infinite data structures can be defined. Non-periodic data structures are obtained only when individuals are defined in a parametric way. For instance, an individual of binary-tree containing all the even positive integers in each path, can be defined as follows: Tree-of-even = Tree-of-positives(2) Tree-of-positives(n) = (individual binary-tree number: [(primI positive-integer n)] branches: [ Tree-of-positives(n + 2), Tree-of-positives(n + 2)]) A parameter has to be an element of the syntactic category (index expression), in order to make it possible to create individuals of primitive concepts, such as

(primI positive-integer

n)

in the declaration of Tree-of-positives(n). Let us consider a recursive parametric declaration id(n) = I from which id(n) = A~I]e can be obtained, hoping that its solution is also given by fix(f) where

f: By defining in Z + the partial order x<~ yC:>x = y Z ÷ is a cpo (even if not pointed), so Z+--> C~ is a pointed cpo, since the codomain C~ is a pointed cpo (see Corollary 6.23 in [24]). At this point, we only need to demonstrate that f is continuous, or, to be more precise, that functions relative to (index expression) are continuous. Since we choose that specific partial order in Z ÷, every function i: Z+--~ Z ÷ is continuous (see Proposition 6.13 in [24]).

A. Cappelli, D. Mazzeranghi

54

4. An example In this section an e x a m p l e of the use of the terminological and the assertional c o m p o n e n t s will be p r e s e n t e d . With reference to the e x a m p l e shown in Section 2.1.1, the following t e r m i n o l o g y can be defined3:

team =

(and (exactly 1 name) (atleast 2 member)) football-team = (and team

(all member football-player) (atleast 11 member)) human-being = (and (exactly 1 name) (exactly 1 age)) football-player = (and human-being (exactly 1 has-role) (exactly 1 number-of-scored-goals) (atleast 1 athletic-capabilities) (atleast 1 technical-capabilities)) positive-integer = ( p r i m C 1) string = ( p r i m C 2) capability-level = ( p r i m C 3) role = ( p r i m C 4)

name = ( p r i m R string name) member = ( p r i m R human-being member) age = ( p r i m R positive-integer age) has-role = ( p r i m R role has-role) number-of-scored-goals = ( p r i m R non-negative-integer number-of-scored-goals) athletic-capabilities = ( p r i m R capability-level athletic-capabilities) technical-capabilities = ( p r i m R capability-level technical-capabilities) w h o s e semantics is the following:

I~team] = PROD(name([PRIM e ]11), member([ l[[human-being]] ~il)) l~football-team] = PROD(name([PRIMe]11),member([ I[football-player]]1i1~)) l~human-being] = PROD(name([PRIM2]~ ),age([PRIM1]I )) I~football-player] = P R O D ( n a m e ( [ P R I M 2 ] l ) , a g e ( [ P R I M 1 ] l ) , h a s - r o l e ( [ P R I M number-of -scored-goals( [PRIM1111), athletic-capabilities([PRIM 3]lil), technical-capabilities([PRIM 3] iil)) I[positive-integer] = P R I M 1 I[string] = P R I M 2 3 In the following, the expression

(exactly N R) has to be interpreted as shorthand for (and (atleast N R)

(atmost N R))

4]~),

55

A n intensional semantics f o r a hybrid language

l[capability-level]l = P R I M 3 l~role] = P R I M 4 I~name] = f

(1)

Ti

where f ( x ) = { E R R O R ifelse (1) ¢:~ 3i: n a m e = namei and SATISFY(T~,[PRIM21o il) x = (R 1. . . . . Rn) R i = namei(Ti) I[Imemberl] = f Ti

where f ( x ) = I.[ERROR ifelse(1) (1) <=>3i: m e m b e r = namei and S A T I S F Y ( T ~ , [ I [ [ h u m a n - b e m g ] ] o x : ( R , . . . . ,Rn) •

nil

)

R i : namei(Ti)

I[[agel] = f

if (1) f Ti where f ( x ) = ,~.]E°ROR else (1) ¢:> 3i: ag___e_e= name i and SATISFY(T/,[PRIM1]0 il) x= (R1,. . . ,Rn) R i = namei(Ti)

l[has-role] = f

T~ (1) where f ( x ) = { E R R O R ifelse (1)¢:>::1i: has-role = name i and SATISFY(Ti,[PRIM4]o" )

x = ( R1, . . . , R n ) R e = namei(Ti) I[number-of-scored-goals~ = f

{T~ if (1) where f i x ) = E R R O R else (1) <==>3i: n u m b e r - o f - s c o r e d - g o a l s = n a m e / a n d

SATISFY(T i ,[PRIMI]onil ) X= (R1,... ,nn) R i = namei(Ti) I~athletic-capabilities] = f Ti

where f ( x ) = (~'ERROR if (1) else (1) <=>3i: athletic-capabilities = name i and SATISFY(T~,[PRIM3]0 il) x = ( R , . . . . . R~) R i = namei(Ti) I~ technical-capabilities] = f

f T,

if

(1)

where f ( x ) = _ v / E-_ R R O R else (1) <=>3i: technical-capabilities = namei and SATISFY( Ti, [PRIM 3] Oil ) x= (Rx,...,Ro) R i = namei(Ti)

On the basis of the terminology so far defined (whose interpretation gives, as a result, the environment e), the following individual concepts can be defined: Milan = (individual f o o t b a l l - t e a m n a m e : [ A . C.Milan] m e m b e r : [ Gullit, Baresi . . . . ])

56

A. Cappelli, D. Mazzeranghi Gullit = (individual football-player name: [Ruud-Gullit] age: [ Twenty-seven] has-role: [Forward] number-of-scored-goals: [Ninety-two] athletic-capabilities: [Excellent-Sprinter,High-Physical-power] technical-capabilities: [ Quite-good-In-assist, Good-In-header, Excellent-Dribbler]) Baresi = (individual football-player name: [Franco-Baresi] age: [ Thirty-two] has-role: [Defender] number-of-scored-goals: [Twelve] athletic-capabilities: [Excellent-Sense-of-timing, Good-Sprinter, Low-Physical-power] [Excellent-In-assist, Very-good-In-stop [) technical-capabilities: A. C. Milan = ( p r i m I string 1) Ruud-Gullit = ( p r i m I string 2) Franco-Baresi = ( p r i m I string 3) Twelve = ( p r i m I positive-integer 12) Twenty-seven = ( p r i m I positive-integer 27) Thirty-two = ( p r i m I positive-integer 32) Ninety-two = ( p r i m I positive-integer 92) Excellent-Sprinter = ( p r i m I capability-level 1) High-Physical-power = ( p r i m l capability-level 2) Excellent-Sense-of-timing = ( p r i m I capability-level 3) Good-Sprinter = ( p r i m I capability-level 4) Low-Physical-power = ( p r i m I capability-level 5) Quite-good-In-assist = ( p r i m I capability-level 6) Good-In-header = ( p r i m I capability-level 7) Excellent-Dribbler = ( p r i m I capability-level 8) Excellent-In-assist = ( p r i m I capability-level 9) Very-good-In-stop = ( p r i m I capability-level 10) Forward = ( p r i m I role 1) Defender = ( p r i m I role 2)

w h o s e semantics is s h o w n in the following:

A~Milan~e = (name([(PRIM2)l]),member([ A~Gullit~e,A~Baresi]e, . . .]) ) A ~Gullit] e = ( name( [ ( P R I M 2 ) z ] ), age( [ ( P R I M a ) 27] ), has-role( [( P R I M 4 )1 ] ) , number-of-scored-goals([(PRIM 1)92]) , athletic-capabilities( [( P R I M 3 )1, ( P R I M 3 ) 2] ) , technical-capabilities( [( PRIM3 ) 6,( P RIM3 )7 ,( PRIM3 )s]) ) A~Baresi~e = (name([(PRIM2)3]),age([(PRIMl)32]),has-role([PRIM4)2]), number-of-scored-goals([ ( P RIM1) 12]), athletic-capabilities([(PRIM3)3,(PRIM3)4, ( P R I M 3 ) 5 ] ) , technical-capabilities([(PRIM 3)9, ( P R I M 3 ) 10]) ) A~A. C. Milan]e = ( P R I M 2)~ A~Ruud-Gullit]e = ( P R I M 2 ) 2 A~Franco-Baresi]e = ( P R I M 2 ) 3

An intensional semantics for a hybrid language

57

A~ Twelve~e = ( P R I M 1) 12 A~ Twenty-seven]e = ( P R I M 1) 27 A~Thirty-two]e = ( P R I M 1)32 A~Ninety-two]e = ( P R I M t)92 A~Excellent-Sprinter]e = (PRIM3) 1 A~High-Physical-power]e = (PRIM3) 2 A~Excellent-Sense-of-timing]e = (PRIM3) 3 A~Good-Sprinter~e = (PRIM3) 4 A~Low-Physical-power]e = (PRIM3) 5 A~Quite-good-ln-assist]e = (PRIM3) 6 A~Good-ln-header]e = (PRIM3) 7 A~Excellent-Dribbler~e = (PRIM3) s A~Excellent-In-assist~e = (PRIM3) 9 A~Very-good-ln-stop~e = (PRIM3)10 A~Forward~e = (PRIMa) 1 A~Defender~e = (PRIM4) 2 We can now introduce some examples of the evaluation of assertions. The subsumption test behaves as follows: A~(is-a football-team team)]e = SUBSUMES( e(team ),e( football-team )) -= T R U E since

SUBS UMES( e( team ) ,e( football-team )) ¢:> • nil SUBSUMES(PROD(name([PRIM2]l,member([I[human-bemg]]z )) 1

PROD(name( [PRIM2] 11),member( [I~ f ootball-player]] ?i1'))) ¢~ 2 ~< 11, nil >I nil, SUBSUMES(I~human-being],I[football-player]) and the individuation test:

A~(is-instance Milan football-team )]e = SA TISFIES( A~M ilan]e ,e( football-team )) = TRUE since

SATISFIES( A~Milan]e,e( football-team)) 4=> SATISFY([(PRIM2) ,],[PRIM2]',) , SATISFY([A[[Gullit]e,A[Baresi~e,...],[l~[football-player~]~il' ) <:~ SATISFIES((PRIM2)I ,PRIM2 ) ,

S A TISFIES( A~ Gullit]e,I~ football-playerD, S A TISFIES( A~ Baresi]e,I[ f ootball-player D <:v SATISFY([(PRIM2) 1],[PRIM2] lz) , SATI SFY([(PRIM, ) 27 ], [PRIM1 ]11) , SATI SFY([(PRIM 1) 92], [PRIM1 ]11)SATISFY([(PRIM1 )92] ,[PRIMd11), SATISFY( [(PRIM 3)1, ( PRIM3 )2 ], [PRIM3 l~'il), SATISFY([(PRIM3) 6,(PRIM3) 7,(PRIM3)8],[PRIM3]?il), S A T I S F Y ( [ ( P R I M 2)31,[PRIM2111),

A. Cappelli, D. Mazzeranghi

58

SATISFY([(PRIM1 )32],[PRIM, ]1), SATISFY( [(PRIM4)2] ,[PRIM4]I), SATISFY([(PRIM1) 12],[PRIM 1]11), SATISFY([(PRIM3) 3,(PRIM3)4,(PRIM3)5],[PRIM3]~"), SATISFY([(PRIM3) 9,(PRIM3) lO],[PRIM3]lil) . The selection of a part of an individual of a non-primitive concept can be performed in the following way: All(select n a m e Milan)]e = [A ~ A . C.Milan]e] = [(PRIM2)1] and the selection of the index of an individual of a primitive concept: A~(index A . C.Milan)~e = 1 since A ~ A . C.Milan~e = (PRIM2) , .

5. Comments The fundamental aspect of intensional semantics is that it represents a formal tool which makes it possible to account for the different type of subsumption and also for types of inference other than subsumption. 5.1. Intensional subsumption

The principles, on the basis of which the intensional semantics is designed, are similar to those followed by Woods [37], even if the author accounts for a different type of terminological language. For instance, on the basis of the same principles adopted for the definition of the function SUBSUMES, Woods deduces that: • [a person whose sons are doctors] subsumes [a person whose sons are doctors and who enjoys driving], since the second concept has one property more than the first one, but the rest is equal; • [a person whose sons are doctors] subsumes [a w o m a n whose sons are doctors], since the concept person subsumes the concept w o m a n , while the property sons is the same in the two concepts; • [a person whose sons are professionals] subsumes [a person whose sons are doctors], since the property sons in the second concept has a value-restriction which is more specific than that of the first one; • [a person with at least two children] subsumes [a person with at least three children] and [a person with at most f o u r children] subsumes [a person with at most three children], since the two last concepts in the pairs have number-restrictions more specific than the first two. It is worth noticing that, by definition, for each generic concept C, SUBSUMES(I~C~,I~C~) holds.

An intensional semanticsfor a hybrid language

59

5.2. New types of inference Let us suppose, for example, that we want to define an inference process able to specify what properties are common to two generic concepts such as student and worker. In this case, an extensional approach would require a very complex and conceptually unclear formulation, since it would be necessary to take into account all roles defined in the terminology and to select those whose denotation domain contains the extension of the generic concept possessing the properties we are looking for. An intensional approach is thus more adequate, since it makes it possible to access a property directly without searching through the extensions. Let us clarify this point by introducing examples of rules which manipulate the structure of the intensional denotation of a concept, in order to create new concepts and new portions of network [28]. The following rules are intensional 'in nature' and can be handled in a very difficult manner, if approached from an extensional viewpoint: (1) Specialization rule: for instance, it is possible to deduce the concept football-team from the concept team by specialization of the value-restriction of the property whose name is member; it is also possible to deduce the concept father from the concept man by specialization of the number-restriction of the property whose name is son (from (0,nil) to (1,nil)). (2) Generalization rule: see inverse of the examples shown in 1. (3) Inductive rule: for instance, the creation of a taxonomy of generic concepts able to classify a given set of individual concepts (the so-called conceptual clustering [19]) or the creation of a generic concept able to describe a given set of individual concepts (this is an example of concept acquisition [9, 18]). Analogously, it is not reasonable to approach the following rule from an extensional viewpoint; besides, for its realization, syntactic and semantic extensions are also required; the former in order to determine the applicability of a concept, and the latter in order to denote the result of the application: (4) Application rule: when a concept is generated by application of a concept to another concept, such as for instance when piece-of-rock is obtained by the application of the concept piece to the concept rock; it is worth noticing that piece-of-rock is not equivalent to (and piece rock), seen both from an extensional and an intensional viewpoint.

5.3. Intensional semantics and ontological adequacy Several criticisms have been made of the expressive power of terminological languages and improvements have been proposed [10]. In our opinion, representational tools have to exhibit a more 'ontological' adequacy, in the sense that they have to account for the intrinsic nature of the objects and the modalities of their applications in any domain [34]. Ontological aspects of conceptual objects have effects both on inheritance chains and on role relations. Let us briefly discuss the latter. Roles are not capable of accounting for distinctions between attribution and part-whole relations [23,35, 12]. Fahlman [11] suggests the distinction between properties describing parts of a concept and properties describing other characteristics of a concept. The author thus suggests distinguishing roles between IN and OF, in the sense that, for instance, in the concept table the property whose name is table-top would be of type IN, while height of type OF.

A. Cappelli, D. Mazzeranghi

60

To sum up, a role is a powerful data structure which can represent a large variety of aggregation processes, but leaves other relevant processes unspecified. By using an intensional approach, extensions which account for the types of phenomena so far discussed can be facilitated. However, this is difficult or even impossible when an extensional viewpoint is adopted.

6. Conclusions In an intensional approach, the denotations of generic concepts are sets of structured tuples which make it possible to account for a different type of subsumption and also for new types of inference. This is the basis for creating more expressive representational tools. To sum up, we can say that the intensional semantics represents the theoretic core of a system capable of accounting for rules 1-4 discussed in Section 5.2; in other words, the intensional semantics behaves as a tool which makes it possible to realize a sort of inferential engine of an expert system, whose basic processes are, among others, the rules 1-4. This is also the basis for reaching a deeper integration between the entire system and any programming language, which implicitly gives rise to an object-oriented system. In previous hybrid systems, the integration consisted in using functions whose syntax was compatible with the programming language used for the implementation of the system. In our system, given that individual concepts denote structured objects, it is possible to introduce an individual concept into a programming language, like any other data type. For instance, an individual concept is passed to a function as a parameter; once it has been verified that this individual is an instance of a generic concept, or of one of its subconcepts, the function will be executed. Let us introduce an example of integration between our hybrid language and P R O L O G [17]. Let us imagine a terminology containing the generic concept human-being, characterized, among others, by a birthday-date (whose value restriction is date) which is characterized by year (whose value restriction is positive-integer), month and day. We can thus define a predicate age which, having as its arguments a human-being H and Today-date, returns the age of H, by using the predicate subtraction which computes the difference between a couple of positive-integer:

age(H: human-being, Today-date: date, Sub):subtraction( (select year Today-date), (select year (select birthday-date H)), Sub). subtraction(N: positive-integer, M: positive-integer, (primI positive-integer ((index N)-(index M)))). Obviously, the first clause can be also applied to the subconcepts of human-being, such as student, football-player, etc., realizing in this way the inheritance of the clause through generic concepts of the terminology.

References [1] D.G. Bobrow and T. Winograd, An overview of KRL, a Knowledge Representation Language, Cognitive Sci. 1 (1977) 3-46.

[2] A. Borgida, R.J. Brachman, D.L. McGuinness and L.A. Resnick, CLASSIC: A structural data model for objects, in: Proc. 1989 ACM SIG-

An intensional semantics for a hybrid language MOND Internat. Conf. on Management of Data, Portland, OR (1989) 59-67. [3] R.J. Brachman, What's in a concept: structural foundations for semantic networks, Internat. J. Man-Machine Studies 9 (1977) 127-152. [4] R.J. Brachman, A structural paradigm for representing knowledge, BBN Report 3605, Cambridge, MA, 1978. [5] R.J. Brachman and J.G. Schmolze, An overview of the KL-ONE knowledge representation system, Cognitive Sci. 9 (1985) 171-216. [6] R.J. Brachman, R.E. Fikes and H.J. Levesque, KRYPTON: A functional approach to knowledge representation, in: R.J. Brachman and H.J. Levesque, eds., Readings in Knowledge Representation (Kaufmann, Los Altos, 1985) 411-429. [7] R. Carnap, Meaning and Necessity (University of Chicago Press, Chicago, 1947). [8] K. Davis and L.M.L. Delcambre, Foundations for object-oriented query processing, Computer Standards & Interfaces 13(1-3) (1991) 207-212. [9] T.G Dietterich and R.S. Michalski, A comparative review of selected methods for learning from examples, in: R.S. Michalski, J.G. Carbonell and T.M. Mitchell, eds., Machine Learning: An Artificial Intelligence Approach (Morgan Kaufmann, Los Altos, 1983). [10] J. Doyle and R.S. Patil, Two dogmas of knowledge representation: Language restrictions, taxonomic classification, and the utility of representation services, MIT/LCS/TM-387.b, Laboratory for Computer Science, Massachusetts Institute of Technology, Cambridge, MA, 1989. [11] S. Fahlman, NETL: A System for Representing and Using Real-World Knowledge (MIT Press, Cambridge, 1979). [12] R.E. Frederking and M. Gehrke, Resolving anaphoric references in a DRT-based dialogue system, in: H. Trost, ed., 4. Osterreichische Art# ficial-lnteUigence-Tagung (Springer, Berlin, 1988) 94-103. [13] N. Guarino, What's in a role: towards an ontological foundation for terminological logics, LADSEB Int. Rep. 06/90, Istituto per Ricerche di Dinamica dei Sistemi e di Bioingegneria, C.N.R., Padova, Italy, 1990. [14] N. Guarino, A concise presentation of ITL, LADSEB Int. Rep. 13/90, Istituto per Ricerche di Dinamica dei Sistemi e di Bioingegneria, C.N.R., Padova (Italy), 1990. Presented at A A A I Spring Syrup. on Implemented Knowledge Representation and Reasoning Systems, Stanford, CA (1991). [15] K. von Luck, B. Nebel, C. Peltason and A. Schmiedel, The anatomy of the BACK-System, KIT Report 41, Department of Computer Science, Technische Universitat, Berlin, 1987. [16] A.S. Maida and S.C. Shapiro, Intensional concepts in propositional semantic networks, Cognitive Sci. 6 (1982) 291-330.

61

[17] D. Mazzeranghi, Una semantica intensionale per un linguaggio di rappresentazione della conoscenza, ILC-KRS-1991-3, Istituto di Linguistica Computazionale, C.N.R., Pisa, Italy, 1991. [18] R.S. Michalski, A theory and methodology of inductive learning, in: R.S. Michalski, J.G. Carbonell and T.M. Mitchell, eds., Machine Learning: An Artificial Intelligence Approach (Morgan Kaufmann, Los Altos, 1983). [19] R.S. Michalski and R.E. Stepp, Learning from observation: conceptual clustering, in: R.S. Michalski, J.G. Carbonell and T.M. Mitchell, eds., Machine Learning: An Artificial Intelligence Approach (Morgan Kaufmann, Los Altos, 1983). [20] B. Nebel, Computational complexity of terminological reasoning in BACK, Artificial Intelligence 34 (1988) 371-383. [21] B. Nebel, Reasoning and Revision in Hybrid Representation Systems (Springer, Berlin, 1990). [22] P.F. Patel-Schneider, Decidable, logic-based knowledge representation, PhD thesis, University of Toronto, Toronto, Ont., 1987. [23] P. Schefe, On definitional processes in knowledge reconstruction systems, in: Proc. lOth Internat. Joint Conf. on Artificial Intelligence, Milano, Italy (1987) 509-511. [24] D.A. Schmidt, Denotational Semantics (Springer, Berlin, 1985). [25] J.G. Schmolze, The language and semantics of NIKL, Technical Report 89-4, Department of Computer Science, Tufts University, Medford, MA (1989). [26] J.G. Schmolze and D. Israel, KL-ONE: semantics and classification, in: Research in knowledge representation for natural language understanding, BBN Report 5421, Cambridge, MA, 1983. [27] P. Simons, A Lesniewskian language for the nominalistic theory of substance and accident, Topoi 2 (1983) 99-109. [28] R.H. Thomason and D.S. Touretzky, Inheritance theory and networks with roles, CMU-CS-90-139, Department of Computer Science, Carnegie Mellon University, Pittsburgh, PA, 1990. [29] S.D. Urban and L.M.L. Delcambre, Constraint analysis: A design process for specifying operations on objects, IEEE Trans. Knowledge Data Engrg. 2(4) (1990) 391-400. [30] M. Vilain, The restricted language architecture of a hybrid representation system, in: Proc. 9th lnternat. Joint Conf. on Artificial Intelligence (Kaufmann, Los Angeles, 1985) 547-551. [31] Y. Wand, A proposal for a formal model of objects, in: W. Kim and F.H. Lochowsky, eds., Object-Oriented Concepts, Databases, and Applications (Addison-Wesley, Reading, MA, 1989) 537-559. [32] P. Weingartner, A predicate calculus for intensional logic, J. Philosophical Logic (1973) 220303. [33] P. Weingartner, On the characterization of en-

62

[34] [35]

[36]

[37]

[38]

A. Cappelli, D. Mazzeranghi tities by means of individuals and properties, J. Philosophical Logic 3 (1974) 323-336. D. Wiggins, Sameness and Substance (Oxford, 1967). M.E. Winston, R. Chaffin and D. Herrmann, A taxonomy of part-whole relations, Cognitive Sci. 11 (1987) 417-444. W.A. Woods, What's in a link: Foundations for semantic networks, in: D.G. Bobrow and A.M. Collins, eds., Representation and Understanding: Studies in Cognitive Science (Academic Press, New York, 1975) 35-82. W.A. Woods, Understanding subsumption and taxonomy: A framework for progress, TR-19-90, Aiken Computational Laboratory, Center for Research in Computing Technology, Harvard University, Cambridge, MA, 1990. Also published in J. Sowa, ed., Principles of Semantic Networks: Explorations in the Representation of Knowledge (Morgan Kaufmann, Los Altos, CA, 1990). W.A, Woods and J.G. Schmolze, The KL-ONE family, Comput. Math. Appl. (Special Issue on Semantic Networks in Artificial Intelligence) 23(2-5) (1992).

Amedeo Cappelli is a Senior Researcher at the Institute of Computational Linguistics of the Italian National Research Council in Pisa (Italy). His research interests include natural language processing, artificial intelligence, and logic programming. In particular, he was involved in the design of knowledge representation languages in the KL-ONE paradigm, since 1980. He is responsible for Italian and European Projects on natural language processing and knowledge representation. Daniele Mazzeranghi received his Master's degree in computer science from the University of Pisa (Italy) in 1991. He is currently involved in the development of the KL-Magma 2 knowledge representation language at the Institute of Computational Linguistic of the National Research Council in Pisa. His research interests include hybrid systems, object-oriented systems and logic programming.