Towards an Ontological Modeling with Dependent Types: Application to Part-Whole Relations

35
Towards an Ontological Modeling with Dependent Types: Application to part-whole Relations Richard Dapoigny 1 Patrick Barlatier 1 1 LISTIC/Polytech’Savoie University of Savoie, Annecy, (FRANCE) Cite as: Dapoigny, R., Barlatier, P. Towards an Ontological Modeling with Dependent Types: Application to part-whole Relations. In Laender, A.H.F. et al. Conceptual Modeling - ER 2009. Lecture Notes in Computer Science, Vol. 5829, Springer 2009, pp. 145-158 Dapoigny, Barlatier (University of Savoie) Ontological Modeling in K-DTT 1 / 29

Transcript of Towards an Ontological Modeling with Dependent Types: Application to Part-Whole Relations

Towards an Ontological Modeling with DependentTypes: Application to part-whole Relations

Richard Dapoigny1 Patrick Barlatier1

1LISTIC/Polytech’SavoieUniversity of Savoie, Annecy, (FRANCE)

Cite as: Dapoigny, R., Barlatier, P. Towards an Ontological Modeling with Dependent Types: Application to part-whole Relations.

In Laender, A.H.F. et al. Conceptual Modeling - ER 2009. Lecture Notes in Computer Science, Vol. 5829, Springer 2009, pp.

145-158

Dapoigny, Barlatier (University of Savoie) Ontological Modeling in K-DTT 1 / 29

Contents

1 Motivations

2 Type Theory as a Syntax for Ontologies

3 Part-whole Specifications

4 Conceptual properties of Part-Whole relations

5 Conclusion

Dapoigny, Barlatier (University of Savoie) Ontological Modeling in K-DTT 2 / 29

Motivations

A core problem in Conceptual Modeling

Ontological Foundations of Conceptual ModelingHow conceptual modeling and requirement engineerig languagescan be evaluated on the basis of their ontological adequacy.

First question: What are the (meta) ontological constraints?

Second question: How to satisfy them?

Dapoigny, Barlatier (University of Savoie) Ontological Modeling in K-DTT 3 / 29

Motivations

A core problem in Conceptual Modeling

Ontological Foundations of Conceptual ModelingHow conceptual modeling and requirement engineerig languagescan be evaluated on the basis of their ontological adequacy.

First question: What are the (meta) ontological constraints?

Second question: How to satisfy them?

Dapoigny, Barlatier (University of Savoie) Ontological Modeling in K-DTT 3 / 29

Motivations

A core problem in Conceptual Modeling

Ontological Foundations of Conceptual ModelingHow conceptual modeling and requirement engineerig languagescan be evaluated on the basis of their ontological adequacy.

First question: What are the (meta) ontological constraints?

Second question: How to satisfy them?

Dapoigny, Barlatier (University of Savoie) Ontological Modeling in K-DTT 3 / 29

Type Theory as a Syntax for Ontologies

Ontologies

A formal ontology in cognitive science ≡ a specification of theentities and relations in the model under construction for a domainunder consideration (Gruber).

Here: ontology as a representation of a conceptual system that ischaracterized by specific logical properties.

Question: How types fit into an ontology of abstract entitites?

Dapoigny, Barlatier (University of Savoie) Ontological Modeling in K-DTT 4 / 29

Type Theory as a Syntax for Ontologies Concepts

Why Type Theory

The Fregean view: concepts seen as the result of a functionalmechanism.Example: the meaning of "John collapsed" → represented by afunction expression A(x) where A denotes a function ("collapsed")and x an argument to that function (e.g., "john").

One way to make this syntax computational is by means oflambda notation.Example: λx .A[x ], ([x ] denotes the usual β-conversion).

Enhancing the expressiveness → with types (typed λ-calculus) →better, with dependent types.

Dapoigny, Barlatier (University of Savoie) Ontological Modeling in K-DTT 5 / 29

Type Theory as a Syntax for Ontologies Expressing ontological components

Basis of Type Theory

Figure: Ontology and Type Theory

Dapoigny, Barlatier (University of Savoie) Ontological Modeling in K-DTT 6 / 29

Type Theory as a Syntax for Ontologies Expressing ontological components

Type Theory: what’s for?

What problem type theory is supposed to solve:

Given an ontological assumption, K-DTT can prove thecorrectness of the assumption given the environment in which itresides.

The same proof can be done with meta-assumptions.

What problem type theory is NOT supposed to solve:

Whether a given ontological assumption is semantically correct.

To indicate if meta ontological choices are appropriate w.r.t. themeta knowledge we have.

Dapoigny, Barlatier (University of Savoie) Ontological Modeling in K-DTT 7 / 29

Type Theory as a Syntax for Ontologies Expressing ontological components

Dependent types

Product-typesThe Π-type or product type: generalizes function spaces.

Allows to infer with types (implication).

Π-types express predicates (functions from Type to Prop).

Example : to represent the fact that MyNokia6125 of type Phoneis able to send calls:

Πx : Phone . sendCalls(x)

with SendCalls : Phone → Prop.

Any proof (object) of x yields a proof for this object to be able tosend calls (universal quantification).

Dapoigny, Barlatier (University of Savoie) Ontological Modeling in K-DTT 8 / 29

Type Theory as a Syntax for Ontologies Expressing ontological components

Dependent types

Sum-typesΣ-types are pairs in which the second component depends on thefirst. They formalize subsets.

Well suited to represent predicates in which a proposition (Prop)depends on variables related to some types (Type).

Representing the property "LowCost" for houses:

Σx : house . LowCost(x)

with a proof 〈MyHouse, p1〉 and p1 = LowCost(MyHouse)

Dapoigny, Barlatier (University of Savoie) Ontological Modeling in K-DTT 9 / 29

Type Theory as a Syntax for Ontologies Expressing Relations

Relations as sum types

Representing relations with n-ary sum-types.

Σx1 : T1 . Σx2 : T2 . . . . Σxn : Tn . R(x1, x2, . . . , xn)

where T1, T2, ... Tn are types.

ExampleΣx : Person . Σy : Good . Σz : Shop . purchaseFrom(x , y , z) with anexample of proofs: 〈John, 〈PartsbySimons, 〈Amazon, p1〉〉〉with: p1 = purchaseFrom(John, PartsbySimons, Amazon)

Dapoigny, Barlatier (University of Savoie) Ontological Modeling in K-DTT 10 / 29

Type Theory as a Syntax for Ontologies Expressing Relations

Expressing (numeric) Constraints

Pre-defined values can be introduced with the (inductive) unit type. Forexample, with a maximum distance value dm that is equal to 3, one candefine:

Computing terms that have a maximum value

σ , Σd : distance .Σdm : distance(3) . LowerThan(d , dm)

which means that dm is a constant type of the type distance andwitnesses for a maximum value set to 3 miles.

Dapoigny, Barlatier (University of Savoie) Ontological Modeling in K-DTT 11 / 29

Type Theory as a Syntax for Ontologies Expressing Relations

Ontologies and types: overview

Ontological component Typed version

Universalsentitiespropertiesroles

ground typesunary Σ-typesbinary Σ-types

Individuals proofsn-ary relations n-ary Σ-types

Mandatory properties Π-types

Dapoigny, Barlatier (University of Savoie) Ontological Modeling in K-DTT 12 / 29

Type Theory as a Syntax for Ontologies Expressing Relations

Overview

Dapoigny, Barlatier (University of Savoie) Ontological Modeling in K-DTT 13 / 29

Part-whole Specifications Requirements

Minimal requirements

A conceptual model should be able to capture the ontological nature ofparts and wholes [Artale96]:

- Explicit introduction of wholes in the model.

- Clear distinction between parts and other attributes of a whole.

- Built-in transitivity of parts.

- Possibility to refer to parts by generic names.

- Ability to express dependence relationships between parts &whole.

Dapoigny, Barlatier (University of Savoie) Ontological Modeling in K-DTT 14 / 29

Part-whole Specifications Specifications

Representing (binary) part − of Relations

Rel , Σx : T1 . Σy : T2 . R(x , y) with R : T1 → T2 → Prop.

Formalizing the binary part-whole relations:

PW , Σx : T1 . Σy : T2 . PartOf (x , y)

invPW , Σx : T1 . Σy : T2 . hasPart(x , y)

Example of such a relation:

Σx : shaftOfFemur . Σy : Femur . PartOf (x , y)

How to formally conceptualize the properties of such a relation(e.g., transitivity) within the theory? Conceptual analysismethodologies should take into account the particular ontologicalnature of part-whole relations.

A solution : specifications.

Dapoigny, Barlatier (University of Savoie) Ontological Modeling in K-DTT 15 / 29

Part-whole Specifications Specifications

What is a specification?

A specification S in K-DTT consists of a pair whose objects are:

- available proofs that realize the specification of a structureStruct[S]

- a predicate Pr [S] over Struc[S] specifying the properties that therealization of the specification should satisfy

S , 〈Struc[S], Pr [S]〉

Struc[S] : Type , Pr : Struc[S] → Prop

Dapoigny, Barlatier (University of Savoie) Ontological Modeling in K-DTT 16 / 29

Part-whole Specifications Specifications

Notation

Higher-order logic notation:

> =⇒ true (provable in any valid context)⊥ =⇒ absurdity (has no proof)⊃ =⇒ if P ⊃ Q and P are provable, then so is Q.& =⇒ if P & Q is provable, so are P and Q.∀ =⇒ if P[x ] is provable then ∀x : A.P[x ] is provable.. . . =⇒

Dapoigny, Barlatier (University of Savoie) Ontological Modeling in K-DTT 17 / 29

Part-whole Specifications Specifications

Example of specification: transitive relations

Struc[Tr ] , Tr : Rel

and for any relation r of type Struc[Tr ] (where Tr abbreviates Tr [r ]):

Pr [Tr ] ,

∀u : Tr u′ : Tr(u) . Ru =Prop Ru′ ⊃(Ru(π1u, π1π2u) &Ru′(π1π2π1u′, π1π2u′) ⊃R′

u(π1π1u′, π1π2u′))

Dapoigny, Barlatier (University of Savoie) Ontological Modeling in K-DTT 18 / 29

Part-whole Specifications Specifications

A concrete example

u : Σx : Student . Σy : Lab . PartOf (x , y)u′ : Σx : (Σx : Student . Σy : Lab. PartOf (x , y)) .

Σy : University . PartOf (π1π2x , y)

If we obtain from a database the respective proofs for u, u′:

〈Patrick , 〈LISTIC, p1〉〉

〈〈Patrick , 〈LISTIC, p1〉〉, 〈Univ − Savoie, p2〉〉

with p1 and p2 the respective proofs of partOf (Patrick , LISTIC)and partOf (LISTIC, Univ − Savoie).

We can deduce: partOf (Patrick , Univ − Savoie)

Dapoigny, Barlatier (University of Savoie) Ontological Modeling in K-DTT 19 / 29

Part-whole Specifications Specifications

Example of specification: left-distributive relations

Left- and right-distributing propertiesExample of a right-distributing properties of part −whole relations.

Distributivity means that if the relation holds for a part, it holdsalso for the whole.

Example: the predicateΣx : Fracture . Σy : Condyle . hasLocation(x , y) is distributive overΣx : Femur .Σy : Condyle.hasPart(x , y).

Dapoigny, Barlatier (University of Savoie) Ontological Modeling in K-DTT 20 / 29

Part-whole Specifications Specifications

Example of specification: left-distributive relations

Formalization

Struc[DR, DR′] ,∑

[

DR : Rel , DR′ : invPW]

and for any pair of relations r , r ′ of type Struc[DR, DR′] (whereDR, DR′ abbreviates DR[r ], DR′[r ′]):

Pr [DR, DR′] ,∀u : DR,∀u′ : DR′(u) . (π2π2u =Prop π2π2u′ ⊃ ⊥) ⊃(Ru(π1u, π1π2u) & invPW (π1u′, π1π2u) ⊃Ru(π1u, π1u′))

Dapoigny, Barlatier (University of Savoie) Ontological Modeling in K-DTT 20 / 29

Part-whole Specifications Specifications

A concrete example

u : Σa : Fracture.Σb : Condyle.hasLocation(a, b)

u′ : Σx : Femur . Σu : (Σa : Fracture . Σb : Condyle .

hasLocation(a, b)) . hasPart(π1π2z, y)

Then, assuming the proof checking that the propositions are notidentical (hasLocation =Prop hasPart is an absurd judgment), therespective proofs of propositions Ru and invPW , arehasLocation(F522, Cond522) and hasPart(Fem522, Cond522)

We can deduce: hasLocation(F522, Fem522)

Dapoigny, Barlatier (University of Savoie) Ontological Modeling in K-DTT 21 / 29

Conceptual properties of Part-Whole relations

Dependence

LemmaGiven the part-of structure PW , any proof of a PartOf predicate yieldsthe proofs for the part and the whole.

It follows that if a part-of relation exists, then the part and thewhole are existentially inter-dependent.

However, it does not rule out the possibility of having a partexisting alone.

Dapoigny, Barlatier (University of Savoie) Ontological Modeling in K-DTT 22 / 29

Conceptual properties of Part-Whole relations

Essential part

Definition(Essential part)[Guizz05] An individual x is an essential part of anotherindividual y iff y is existentially dependent on x and x is necessarily apart of y.

Σx : PT . Σy : PT (x) . PartOf (y , x)

For example, a proof of Σx : Person . Σy : Brain(x) . PartOf (y , x)could be 〈Patient135, 〈q1, q2〉〉 with q1 = Brain(Patient135) andq2 = PartOf (q1, Patient135).

If the y argument appears to be non dependent, then thesum-type turns into: Σx : Person . Σy : Heart . PartOf (y , x), sincea heart can be transplanted.

Dapoigny, Barlatier (University of Savoie) Ontological Modeling in K-DTT 23 / 29

Conceptual properties of Part-Whole relations

Restricting arguments of Part-Whole relations

Figure: Excerpt from the DOLCE Foundational Ontology.

Dapoigny, Barlatier (University of Savoie) Ontological Modeling in K-DTT 24 / 29

Conceptual properties of Part-Whole relations

Restricting arguments of Part-Whole relations

ExampleThe involved_in relation, relates two perdurants (PD):

Σx : PD . Σy : PD . PartOf (x , y)

Instead of defining PD as a role, define PD as a type within ahierarchy ordered with the subtyping mechanism.

Any involved_in structure (relation) is a specification that inheritsthe properties of the PartOf specification and is restricted to typesthat are higher or equal to PD in the hierarchy.

Example:

Chewing : PD, Eating : PD `

Σx : Chewing . Σy : Eating . involved_in(x , y)

Dapoigny, Barlatier (University of Savoie) Ontological Modeling in K-DTT 24 / 29

Conceptual properties of Part-Whole relations

Selecting argument types

StPartOf , Σx : POB . Σy : POB . PartOf (x , y)

NPhysStPartOf , Σx : NPOB . Σy : NPOB . PartOf (x , y)

These two relations inherit from the PartOf specification.

Valve : POB, CarEngine : POB `

Σx : Valve . Σy : CarEngine . StPartOf (x , y)

Inference : NPOB, Reasoning : NPOB `

Σx : Inference . Σy : Reasoning . NPhysStPartOf (x , y)

Dapoigny, Barlatier (University of Savoie) Ontological Modeling in K-DTT 25 / 29

Conceptual properties of Part-Whole relations

Some problems with aggregation

Let us consider a whole C as the aggregation of parts D, E and F .

Nothing prevents a user to create the following diagram.

The difficulty: any instance of C is made up of a set of instancesof type D and/or a set of instances of type E and/or a set ofinstances of type F resulting in different aggregation types ofparts.

Dapoigny, Barlatier (University of Savoie) Ontological Modeling in K-DTT 26 / 29

Conceptual properties of Part-Whole relations

Some problems with aggregation

Figure: Ambiguities in UML composite aggregation.

Dapoigny, Barlatier (University of Savoie) Ontological Modeling in K-DTT 26 / 29

Conceptual properties of Part-Whole relations

Aggregation with sum types

σ1 , ΣC : Type . ΣD : Type . PartOf (D, C)

σ2 , Σx : σ1 . ΣE : Type . PartOf (E , π1x)

σ3 , Σx : σ2 . ΣF : Type . PartOf (F , π1π1x)

A proof for σ3 could be: 〈〈〈c, 〈d , q1〉〉, 〈e, q2〉〉, 〈f , q3〉〉 with q1, q2

and q3, the respectives proofs for PartOf (d , c), PartOf (e, c) andPartOf (f , c).

Proof objects d , e and f together make up the proof object for thewhole entity c and provide a more precise semantics.

Dapoigny, Barlatier (University of Savoie) Ontological Modeling in K-DTT 27 / 29

Conceptual properties of Part-Whole relations

Temporal part-whole Relations

Figure: Temporal states of a statue.

Dapoigny, Barlatier (University of Savoie) Ontological Modeling in K-DTT 28 / 29

Conceptual properties of Part-Whole relations

Temporal part-whole Relations

σ1 , Σt : time . Σt ′ : time(u) . leq(t , t ′) ×

Σx : statue . Σy : substrate . constituted_of (x , y)

σ2 , Σz : σ1 . Σt ′ : time(t2) . gt(π1z, t ′) ×

Σx : lump . Σy : substrate . constituted_of (x , y) ×

Σx : lump . Σy : statue . PartOf _of (x , y)

σ3 , Σt : time . Σt ′ : time(u) . gt(t , t ′) ×

Σx : lump . Σy : substrate . constituted_of (x , y)

Dapoigny, Barlatier (University of Savoie) Ontological Modeling in K-DTT 28 / 29

Conclusion

Major Benefits

Meta-reasoning is done within a single logic.

Higher expressive power of dependent types.

Computability provided by the functional basis of λ-calculus.

K-DTT supports defining reasoning about time and compositerelationships.

Gives a precise and concise modeling.

Specifications can be seen as modules and are able to beincorporated in ontologies such that the module becomes part ofthe knowledge representation.

Dapoigny, Barlatier (University of Savoie) Ontological Modeling in K-DTT 29 / 29