• Aucun résultat trouvé

Combining Rules and Ontologies via Parametrized Logic Programs

N/A
N/A
Protected

Academic year: 2022

Partager "Combining Rules and Ontologies via Parametrized Logic Programs"

Copied!
4
0
0

Texte intégral

(1)

Combining Rules and Ontologies Via Parametrized Logic Programs

Ricardo Gonc¸alves NOVA LINCS

Faculdade de Ciˆencias e Tecnologia Universidade NOVA de Lisboa

Abstract

Parametrized logic programs are very expressive logic programs that generalize normal logic pro- grams under the stable model semantics, by allow- ing complex formulas of a parameter logic to ap- pear in the body and head of rules. In this paper we explore the use of description logics as parameter logics, and show the expressivity of this framework for combining rules and ontologies.

Introduction

Parametrized logic programming [Gonc¸alves and Alferes, 2010] was introduced as an extension of answer set program- ming [Gelfond and Lifschitz, 1988] with the motivation of providing a meaning to theories combining both logic pro- gramming connectives with other logical connectives, and al- lowing complex formulas using these connectives to appear in the head and body of a rule. The main idea is to fix a mono- tonic logicL, called the parameter logic, and build up logic programs using formulas ofLinstead of just atoms. The ob- tained parametrized logic programs have, therefore, the same structure of normal logic programs, being the only difference the fact that atomic symbols are replaced by formulas ofL.

When applying this framework, the choice of the pa- rameter logic depends on the domain of the problem to be modeled. As examples, [Gonc¸alves and Alferes, 2010]

shows how to obtain the answer-set semantics of logic pro- grams with explicit negation, a paraconsistent version of it, and also the semantics of MKNF hybrid knowledge bases [Motik and Rosati, 2010], using an appropriate choice of the parameter logic. In [Gonc¸alves and Alferes, 2012] de- ontic logic programs are introduced using standard deontic logic [von Wright, 1951] as the parameter logic. Moreover, in [Gonc¸alves and Alferes, 2013] the decidability and imple- mentation of parametrized logic was discussed.

Parametrized logic programming can thus be seen as a framework which allows to add non-monotonic rule based reasoning on top of an existing (monotonic) language. This view is quite interesting, in particular in those cases where we already have a monotonic logic to model a problem, but we are still lacking some conditional or non-monotonic rea- soning. In these situations, parametrized logic programming offers a modular framework for adding such conditional and

non-monotonic reasoning, without having to give up of the monotonic logic at hand.

In recent years, there has been a considerable amount of effort devoted to combining Description Logics (DLs) with logic programming non-monotonic rules – see, e.g., related work in [Eiteret al., 2008; Motik and Rosati, 2010].

In this paper we explore precisely the use of description logics as parameter logics, and show the expressivity of the resulting framework for combining rules and ontologies.

Parametrized logic programs

Parametrized logic programs are very expressive logic pro- grams that generalize normal logic programs under the sta- ble model semantics, by allowing complex formulas of a pa- rameter logic to appear in the body and head of rules. In this section we introduce the syntax and semantics of normal parametrized logic programs [Gonc¸alves and Alferes, 2010].

Language

The syntax of a normal parametrized logic program has the same structure of that of a normal logic program. The only difference is that the atomic symbols of a normal parametrized logic program are replaced by formulas of a pa- rameter logic, which is restricted to be a monotonic logic. Let us start by introducing the necessary concepts related with the notion of (monotonic) logic.

Definition 1 A (monotonic) logic is a pair L = hL,`Li where L is a set of formulas and `L is a Tarskian conse- quence relation [W´ojcicki, 1988] over L, i.e., satisfying the following conditions, for everyT ∪Φ∪ {ϕ} ⊆L,

Reflexivity:ifϕ∈T thenT `L ϕ;

Cut:ifT `L ϕfor allϕ∈Φ, andΦ`L ψthenT `Lψ;

Weakening:ifT `L ϕandT ⊆ΦthenΦ`Lϕ.

When clear from the context we write ` instead of `L. LetT h(L)be the set oflogical theories ofL, i.e. the set of subsets ofLclosed under the relation`L. One fundamental characteristic of the above definition of monotonic logic is that it has as a consequence that, for every (monotonic) logic L, the tuple hT h(L),⊆i is a complete lattice with smallest element the setT heo=∅`of theorems ofLand the greatest element the setLof all formulas ofL. Given a subsetAof

(2)

L we denote byA`L the smallest logical theory ofL that containsA.A`L is also called the logical theory generated byAinL.

In what follows we consider fixed a (monotonic) logic L=hL,`Li and call it theparameter logic. The formulas ofLare dubbed(parametrized) atomsand a(parametrized) literalis either a parametrized atomϕor its negationnot ϕ, where as usualnot denotes negation as failure. We dubde- fault literalthose of the formnot ϕ.

Definition 2 AnormalLparametrized logic programis a set of rules

ϕ←ψ1, . . . , ψn, not δ1, . . . , not δm (1) whereϕ, ψ1, . . . , ψn, δ1, . . . , δm∈L.

AdefiniteL parametrized logic programis a set of rules without negations as failure, i.e. of the formϕ←ψ1, . . . , ψn whereϕ, ψ1, . . . , ψn∈L.

As usual, the symbol← represents rule implication, the symbol “,” represents conjunction and the symbolnot repre- sents default negation. A rule as (1) has the usual reading that ϕshould hold wheneverψ1, . . . , ψnhold andδ1, . . . , δmare not known to hold. Ifn = 0andm = 0then we just write ϕ←.

Given a rule rof the form (1), we definehead(r) = ϕ, body+(r) = {ψ1, . . . , ψn},body(r) = {δ1, . . . , δm} and body(r) = body+(r) ∪body(r). Given a parametrized logic program P we define f orm(P) to be the set of all formulas of the parameter language Lappearing in P, i.e., f orm(P) = S

r∈P({head(r)} ∪body(r)). We also define the sethead(P) ={head(r) :r∈ P}.

Semantics

Given this general language of parametrized logic programs, we define its stable model semantics, as generalization of the stable model semantics [Gelfond and Lifschitz, 1988] of nor- mal logic programs.

In the traditional approach an interpretation is just a set of atoms. In a parametrized logic program, since we substi- tute atoms by formulas of a parameter logic, the first idea is to take sets of formulas of the parameter logic as interpreta- tions. The problem is that, contrary to the case of atoms, the parametrized atoms are not independent of each other. This interdependence is governed by the consequence relation of the parameter logic. For example, if we take classical propo- sitional logic (CPL) as the parameter logic, we have that if the parametrized atomp∧qis true then so are the parametrized atomspandq. If we take, for example, standard deontic logic SDL [von Wright, 1951] as parameter, we have that, since O(p∨q),O(¬p)`SDL O(q), any SDL logical theory con- taining bothO(p∨q)andO(¬p)also containsO(q).

To account for this interdependence, we use logical the- ories (sets of formulas closed under the consequence of the logic) as the generalization of interpretations, thus capturing the above mentioned interdependence.

Definition 3 A (parametrized) interpretation is a logical the- ory ofL.

Definition 4 An interpretationTsatisfies a rule ϕ←ψ1, . . . , ψn, not δ1, . . . , not δm

ifϕ ∈ T wheneverψi ∈ T for everyi ∈ {1, . . . , n} and δj ∈/ Tfor everyj∈ {1, . . . , m}.

An interpretation is a model of logic programP if it sat- isfies every rule ofP. We denote byM odL(P) the set of models ofP.

The ordering over interpretations is the usual one: If T1

andT2 are two interpretations then we say thatT1 ≤ T2 if T1 ⊆T2. Moreover, given such ordering, minimal and least interpretations may be defined in the usual way.

As in the case of non parametrized programs, we start by assigning semantics to definite parametrized programs.

Recall that the stable model of a definite logic program is its least model. In order to generalize this definition to the parametrized case we need to establish that the least parametrized model exists for every definiteLparametrized logic program.

Theorem 1 Every definiteLparametrized logic program has a least model.

We denote bySPLthe least model of a definite programP.

It is important to note that Theorem 1 holds for every choice of the parameter logicL.

The stable model semantics of a normal L parametrized logic program is defined using a Gelfond-Lifschitz like oper- ator.

Definition 5 Let P be a normalL parametrized logic pro- gram andT an interpretation. The GL-transformation ofP moduloT is the program PT obtained from P by performing the following operations:

• remove fromP all rules which contain a literal not ϕ such thatT `L ϕ;

• remove from the remaining rules all default literals.

Since PT is a definite L parametrized program, it has an unique least modelJ. We defineΓ(T) =J.

Stable models of a parametrized logic program are then defined as fixed points of thisΓoperator.

Definition 6 An interpretationT of anLparametrized logic programP is a stable model ofP iffΓ(T) =T. A formulaϕ is true under the stable model semantics, denoted byP SMS

ϕiff it belongs to all stable models ofP.

An important feature of parametrized logic programming is that its stable model semantics is independent of the se- mantics of the parameter logic, since the central concept is the consequence relation of the parameter logic.

Let us now show an example of how parametrized logic programs can be used to combine a monotonic formalism with a non-monotonic one. We choose three different logics over the same propositional language.

Example 1 (Propositional logic programs) Let us now consider a full propositional language L built over a set P of propositional symbols using the usual connectives (¬,∨,∧,⇒). Many consequence relations can be defined

(3)

over this language. We present three interesting exam- ples: classical logic, Belnap’s paraconsistent logic and intuitionistic logic. Consider the following programs:

P1

p← ¬q

p←q P2 { p← ¬q∨q

P3

( q←

(q∨s)⇒p← r←p

P4



 r←

¬p← (p∨q)←r s←q

P5 { p←not q, not¬q P6 { p←not(q∨ ¬q) Let L = hL,`CP Li be Classical Propositional Logic (CPL) over the languageL. Let us study the semantics ofP1. Note that every logical theory ofCP Lthat does not contain neitherpnor¬psatisfiesP1. In particular, the setT autof tautologies of CP Lis a model ofP1. So,SPCP L

1 = T aut.

This means that p,¬p, q,¬q /∈ SPCP L

1 . We also have that SPCP L

2 ={p}`. So, in the case ofP2we have thatp∈SPCP L

2 .

Also, we have thatr∈SPCP L

3 ands∈SCP LP

4 .

In the case ofP5its stable models are the theories ofCP L that containpand do not containqand¬q. Therefore, we can conclude thatp∈SCP LP

5 . In the case ofP6, since(p∨ ¬p)∈ T for every logical theoryT ofCP Lwe can conclude that the only stable model of P6 is the setT heoof theorems of CP L. Thereforep /∈SCP LP

6 .

Consider nowL =hL,`4ithe 4-valued Belnap paracon- sistent logicF our. Consider the programP4. Contrarily to the case of CPL, inF ourit is not the case that¬p,(p∨q)`4

q. Therefore we have thatq, s /∈SPF our

4 .

Let nowL=hL,`IP Libe the propositional intuitionistic logicIP L. It is well-known thatq∨ ¬qis not a theorem of IP L. Therefore, considering programP2 we haveSPIP L

2 =

`IP L. So, contrarily to the case ofCP L, we have thatp /∈ SPIP L

2 . Using the same idea for programP6we can conclude, contrarily to the case ofCP L, thatp∈SPIP L

6 .

Combining rules and ontologies

In this section we discuss the use of description logics as parameter logic in the framework of parametrized logic pro- gramming. We will then illustrate the expressivity of the re- sulting framework to combine non-monotonic rules and on- tologies.

In what follows, and for simplicity, we use description logicALC [Schmidt-Schaubß and Smolka, 1991]. We start by briefly recalling the syntax and semantics ofALC. For a more general and thorough introduction to DLs we refer to [Baaderet al., 2010]. The language ofALC is defined over countably infinite sets ofconcept namesNC,role namesNR, andindividual namesNIas shown in the upper part of Table 1.

Building on these, complex concepts are introduced in the middle part of Table 1, which, together with atomic concepts, form the set ofconcepts. We conveniently denote individuals byaandb, (atomic) roles byRandS, atomic concepts byA andB, and concepts byCandD. All expressions in the lower

Table 1: Syntax and semantics ofALC.

Syntax Semantics

atomic concept A∈NC AI⊆∆I atomic role R∈NR RI ⊆∆I×∆I

individual a∈NI aI∈∆I

top > ∆I

bottom ⊥ ∅

conjunction CuD CI∩DI

disjunction CtD CI∪DI

complement ¬C ∆I\CI

existential ∃R.C {x∈∆I| ∃y∈∆I : restriction (x, y)∈RI∧y∈CI} universal ∀R.C {x∈∆I| ∀y∈∆I :

restriction (x, y)∈RI⇒y∈CI} concept inclusion CvD CI⊆DI concept assertion C(a) aI∈CI role assertion R(a, b) (aI, bI)∈RI

part of Table 1 areaxioms. Aconcept equivalenceC≡Dis an abbreviation forCvDandDvC. Concept and role as- sertions areABox axiomsand all other axiomsTBox axioms, and anontologyis a finite set of axioms.

The semantics of ALC is defined in terms ofinterpreta- tionsI = (∆I, I), which consist of a non-empty domain

I and an interpretation function I. The latter is defined for (arbitrary) concepts, roles, and individuals as in Table 1.

Moreover, an interpretation I satisfies an axiom α, written I |=α, if the corresponding condition in Table 1 holds. IfI satisfies all axioms in an ontologyO, thenIis amodelofO, writtenI |=O. IfOhas at least one model, then it is called consistent, otherwiseinconsistent. Also,Oentailsaxiomα, writtenO |=α, if every model ofOsatisfiesα.

Given the consequence relation ofALCwe can now illus- trate howALCcan be used as parameter logic.

Example 2 The following program (P1) is an adaptation of an example taken from [Motik and Rosati, 2007], which uses MKNF knowledge bases to combine rules and ontologies.

The scenario is about determining the car insurance premium based on various information about the driver.

N otM arried≡ ¬M arried← N otM arriedvHighRisk←

∃Spouse.> vM arried←

N otM arried(x)←p(x), not M arried(x) Discount(x)←Spouse(x, y), p(x), p(y)

p(J onh)←

(4)

Note that in parametrized logic programming the combi- nation of an ontology with a rule system can be done in a natural way, simply by adding the ontology elements as facts of the rule system. As usual in logic programming, variables in rules stand for all their possible instantiations by individ- uals appearing in the program.

ProgramP1 can be rewritten in order to remove its first rule, which is nothing but an artificial tool to overcome the impossibility of having complex DL formulas in the head of MKNF rules (in this case, having the classical negation of an atom in a head). Moreover, we may also add bodies to the facts coming from the ontology. E.g. we can add a non- monotonic condition to the second statement ofP1above, to state that non married are only considered high-risk in non exceptional periods, obtainingP2:

¬M arriedvHighRisk ←not exceptionalP eriod

∃Spouse.> vM arried←

¬M arried(x)←p(x), not M arried(x) Discount(x)←Spouse(x, y), p(x), p(y)

p(J onh)←

Let us now study the stable model semantics of this pro- gram. We should again stress that such stable model seman- tics does not depend on the semantics ofALC, but only on its consequence relation. If Iis a 2-valued interpretation such thatI(M arried(J onh)) = 1thenΓ(I)is the least model of the following program PI2:

¬M arriedvHighRisk ←

∃Spouse.> vM arried←

Discount(x)←Spouse(x, y), p(x), p(y) p(J onh)←

It is clear that the smallest model of PI2 does not con- tainM arried(J onh), and so, such interpretationI cannot be a stable model. Therefore, every stable model must satisfy

¬M arried(J onh)and consequentlyHighRisk(J onh).

Consider now program P3 obtained by adding to P2

the following facts: p(Bill) ←, ∃Spouse.>(Bill) ←, and exceptionalP eriod ←. Note that, although ev- ery stable model now contains ¬M arried(J ohn), we no longer conclude HighRisk(J onh) since we have exceptionalP eriod. Every stable model of P3 contains M arried(Bill). So, the Stable Model Semantics ofP3does not entail¬M arried(Bill)norHighRisk(Bill).

Consider now programP4 obtained by adding toP2 the facts:Spouse(Bob, Ann) ←,p(Bob) ←, andp(Ann) ←.

Every stable model ofP4containsDiscount(Bob), and so it entailsDiscount(Bob).

Conclusions

In this paper we have discussed the use of the frame- work of parametrized logic programming for combining non- monotonic rules and ontologies. This approach is quite ex- pressive since it allows complex DL axioms to appear both in the body and in the head of non-monotonic rules.

In [Gonc¸alves and Alferes, 2010] the authors show how parametrized logic programming can capture the semantics of MKNF hybrid knowledge bases [Motik and Rosati, 2010]

by an appropriate choice of the parameter logic. As future work we aim to study the relation between parametrized logic programs and other frameworks for combining rules and on- tologies, e.g., the DL-programs of [Eiteret al., 2008].

Aknowledgments

Ricardo Gonc¸alves was supported by FCT under project ERRO (PTDC/EIA-CCO/121823/2010).

References

[Baaderet al., 2010] Franz Baader, Diego Calvanese, Deb- orah L. McGuinness, Daniele Nardi, and Peter F. Patel- Schneider. The description logic handbook, theory, im- plementation, and applications (2nd edition). Cambridge University Press, 2010.

[Eiteret al., 2008] Thomas Eiter, Giovambattista Ianni, Thomas Lukasiewicz, Roman Schindlauer, and Hans Tompits. Combining answer set programming with description logics for the semantic web. Artif. Intell., 172(12-13):1495–1539, 2008.

[Gelfond and Lifschitz, 1988] Michael Gelfond and Vladimir Lifschitz. The stable model semantics for logic programming. pages 1070–1080. MIT Press, 1988.

[Gonc¸alves and Alferes, 2013] Ricardo Gonc¸alves and Jos´e J´ulio Alferes. Decidability and implementation of parametrized logic programs. In Pedro Cabalar and Tran Cao Son, editors, LPNMR, volume 8148 of LNCS, pages 361–373. Springer, 2013.

[Gonc¸alves and Alferes, 2010] R. Gonc¸alves and J. J.

Alferes. Parametrized logic programming. In T. Janhunen and I. Niemel¨a, editors, JELIA, volume 6341 of LNCS, pages 182–194. Springer, 2010.

[Gonc¸alves and Alferes, 2012] Ricardo Gonc¸alves and Jos´e J´ulio Alferes. An embedding of input-output logic in deontic logic programs. In Thomas ˚Agotnes, Jan Broersen, and Dag Elgesem, editors,DEON, volume 7393 ofLNCS, pages 61–75. Springer, 2012.

[Motik and Rosati, 2007] Boris Motik and Riccardo Rosati.

A faithful integration of description logics with logic pro- gramming. InIJCAI, pages 477–482, 2007.

[Motik and Rosati, 2010] B. Motik and R. Rosati. Reconcil- ing description logics and rules.J. ACM, 57(5), 2010.

[Schmidt-Schaubß and Smolka, 1991] Manfred Schmidt- Schaubß and Gert Smolka. Attributive concept de- scriptions with complements. Artif. Intell., 48(1):1–26, 1991.

[von Wright, 1951] G. H. von Wright. Deontic logic. Mind, 60:1–15, 1951.

[W´ojcicki, 1988] R. W´ojcicki. Theory of Logical Calculi.

Synthese Library. Kluwer Academic Publishers, 1988.

Références

Documents relatifs

When compared to pure reference silica aerogel, the average particle concentration went down significantly for the EP-M 95 hybrid aerogels with increasing concentrations..

It is assumed that, before argumentation scheme recognition using the rules given in the previous section begins, current biomedical/biological natural language

We introduce the language LP MLN that extends logic programs under the stable model semantics to al- low weighted rules similar to the way Markov Logic considers weighted formulas..

– We presented an argumentation semantics of defeasible logic programs, based on conflict resolution strategies within assumption-based frameworks, whose semantics satisfies

By using these more powerful definition and folding rules, we extend the specialization-based verification method in the following two directions: (i) we verify programs with respect

Cette micrographie nous permet de constater l’état poreux de l’échantillon avec la présence de grains ayant une forme particulière et qui rappellent la rosace ou plutôt une

When termination and non-termination analysis produce complementary results for a logic procedure, then with respect to the leftmost selection rule and the language used to

stead of diretly desribing the syntax of language via a formal grammar, the.. linguist speies the strutures of this formal grammar using a