24
Dynamic Logic Programming with Multiple Dimensions João Alexandre Leite José Júlio Alferes Luís Moniz Pereira CENTRIA – Universidade Nova de Lisboa Universidad de la Habana, Cuba, 4 Dec. 20 AGP’2000

Dynamic Logic Programming with Multiple Dimensions João Alexandre Leite José Júlio Alferes Luís Moniz Pereira CENTRIA – Universidade Nova de Lisboa Universidad

Embed Size (px)

Citation preview

Page 1: Dynamic Logic Programming with Multiple Dimensions João Alexandre Leite José Júlio Alferes Luís Moniz Pereira CENTRIA – Universidade Nova de Lisboa Universidad

Dynamic Logic Programming with Multiple Dimensions

João Alexandre Leite

José Júlio Alferes

Luís Moniz Pereira

CENTRIA – Universidade Nova de Lisboa

Universidad de la Habana, Cuba, 4 Dec. 2000AGP’2000

Page 2: Dynamic Logic Programming with Multiple Dimensions João Alexandre Leite José Júlio Alferes Luís Moniz Pereira CENTRIA – Universidade Nova de Lisboa Universidad

Overview

Introduction and Motivation (Overview of Dynamic Logic Programming)Multi-dimensional Dynamic Logic

Programming Framework Semantics Syntactical Transformation

Application to Multi-agent SystemsConclusions and Future Work

Page 3: Dynamic Logic Programming with Multiple Dimensions João Alexandre Leite José Júlio Alferes Luís Moniz Pereira CENTRIA – Universidade Nova de Lisboa Universidad

Motivation

In Dynamic Logic Programming (DLP) knowledge is given by a sequence of Programs

Each program represents a different state of our knowledge, where different states may be: different time points, different hierarchical

instances, different viewpoints, etc.

Different states may have mutually contradictory or overlapping information.

DLP, using the relations between states, determines the semantics at each one.

Page 4: Dynamic Logic Programming with Multiple Dimensions João Alexandre Leite José Júlio Alferes Luís Moniz Pereira CENTRIA – Universidade Nova de Lisboa Universidad

Motivation (2)

LUPS was presented as a language to build DLPs

It can been used to: model evolution of knowledge in time reason about actions reason about hierarchies, …

But how to combine several of these aspects in a single system?

Page 5: Dynamic Logic Programming with Multiple Dimensions João Alexandre Leite José Júlio Alferes Luís Moniz Pereira CENTRIA – Universidade Nova de Lisboa Universidad

Motivation Example

The parliament issues law L1 at time t1. The local authorithy issues law L2 at t2 > t1 Parliament laws override local laws, but not vice-versa.

More recent laws have precendence over older ones

L2 L1

L1 L2

How to combine these two dimension of knowledge precedence?

DLP with Multiple Dimensions (MDLP)

Page 6: Dynamic Logic Programming with Multiple Dimensions João Alexandre Leite José Júlio Alferes Luís Moniz Pereira CENTRIA – Universidade Nova de Lisboa Universidad

DLP with Multiple dimensions

In MDLP knowledge is given by a set of programs

Each program represents a different state of our knowledge.

States are connected by a DAGMDLP, using the relations between states

and their precedence in the DAG, determines the semantics at each state.

Allows for combining knowledge which evolve in various dimensions.

Page 7: Dynamic Logic Programming with Multiple Dimensions João Alexandre Leite José Júlio Alferes Luís Moniz Pereira CENTRIA – Universidade Nova de Lisboa Universidad

2 Dimensional Lattice

d1 d2P 11

P 33

P 23P 32

P 31

P 12

P 22

P 21

P 13

Page 8: Dynamic Logic Programming with Multiple Dimensions João Alexandre Leite José Júlio Alferes Luís Moniz Pereira CENTRIA – Universidade Nova de Lisboa Universidad

Acyclic Digraph (DAG)

P a

P h

P gP i

P c

P e

P d

P b

P f

Page 9: Dynamic Logic Programming with Multiple Dimensions João Alexandre Leite José Júlio Alferes Luís Moniz Pereira CENTRIA – Universidade Nova de Lisboa Universidad

Generalized Logic Programs

To represent negative information in LP and their updates, we need LPs with not in heads

Object formulae are generalized LP rules:

A B1,…, Bk, not C1,…,not Cm

not A B1,…, Bk, not C1,…,not Cm

The semantics is a generalization of SMs

Page 10: Dynamic Logic Programming with Multiple Dimensions João Alexandre Leite José Júlio Alferes Luís Moniz Pereira CENTRIA – Universidade Nova de Lisboa Universidad

MDLPs definition

Definition:A Multi-dimensional Dynamic Logic Program, P, is a pair (PD,D) where D=(V,E) is an acyclic digraph and PD={PV : v V} is a set of generalized logic programs indexed by the vertices v V of D.

Page 11: Dynamic Logic Programming with Multiple Dimensions João Alexandre Leite José Júlio Alferes Luís Moniz Pereira CENTRIA – Universidade Nova de Lisboa Universidad

MDLP - Semantics

Definition:Let P=(PD,D) be a Multi-dimensional Dynamic Logic Program, where PD={PV : v V} and D=(V,E). An interpretation Ms is a stable model of the multi-dimensional update at state sV iff:

Ms=least([Ps – Reject(s, Ms)] Defaults (Ps, Ms))

Ps= js Pi

Page 12: Dynamic Logic Programming with Multiple Dimensions João Alexandre Leite José Júlio Alferes Luís Moniz Pereira CENTRIA – Universidade Nova de Lisboa Universidad

MDLP - Semantics

Ms=least([Ps – Reject(s, Ms)] Defaults (Ps, Ms))

where:

Reject(s, Ms)=

{r Pi | r’ Pj , ijs, head(r)=not head(r’) Ms

body(r’)}

Defaults (Ps, Ms)={not A | r Ps : head(r)=A Ms

body(r)}

Page 13: Dynamic Logic Programming with Multiple Dimensions João Alexandre Leite José Júlio Alferes Luís Moniz Pereira CENTRIA – Universidade Nova de Lisboa Universidad

Example 1

Ps1 Ps2

Pr1 Pr2

Psr

{a c}

{b}

{not a c}

{c}

{}Semantics at r1:

M = {b, not a, not c}Reject(r1,M) = {}Default(P,M) = {not a, not c}

Semantics at s1:

M = {not a, not b, not c}Reject(s1,M) = {}Default(P,M) = M

Semantics at sr:

M = {b, not a, c}Reject(sr,M) = {a c}Default(P,M) = {not a}

Page 14: Dynamic Logic Programming with Multiple Dimensions João Alexandre Leite José Júlio Alferes Luís Moniz Pereira CENTRIA – Universidade Nova de Lisboa Universidad

Example 1 (cont)

Ps1 Ps2

Pr1 Pr2

Psr

{a c}

{b}

{not a c}

{c}

{}Semantics at r1:

M = {b, not a, not c}Reject(r1,M) = {}Default(P,M) = {not a, not c}

Semantics at s1:

M = {a, b, c}Reject(s1,M) = {not a c}Default(P,M) = {}

Semantics at sr:

M = {not a, not b, not c}Reject(sr,M) = {}Default(P,M) = M

Page 15: Dynamic Logic Programming with Multiple Dimensions João Alexandre Leite José Júlio Alferes Luís Moniz Pereira CENTRIA – Universidade Nova de Lisboa Universidad

Example 2

Pt1a1{p q}

{q}{not p q}

{}

Semantics at t2a1:

M = {p, q}Reject(t2a1,M) = {}Default(P,M) = {}

Semantics at t1a2:

M = {not p, not q}Reject(t1a2,M) = {}Default(P,M) = M

Semantics at t2a2:

M = {q, not p}Reject(t2a2,M) = {p q}Default(P,M) = {}

Pt1a2

Pt2a2

Pt2a1

Page 16: Dynamic Logic Programming with Multiple Dimensions João Alexandre Leite José Júlio Alferes Luís Moniz Pereira CENTRIA – Universidade Nova de Lisboa Universidad

Towards an implementation of MDLP

How to implement MDLP?Pre-process a MDLP at a state s into

a single generalized program, where the stable models at s are the stable models of the single program.

Query-answering is reduced to that at single programs.

Page 17: Dynamic Logic Programming with Multiple Dimensions João Alexandre Leite José Júlio Alferes Luís Moniz Pereira CENTRIA – Universidade Nova de Lisboa Universidad

MDLP – Syntactical Transformation

Definition:Let P=(PD,D) be a Multi-dimensional Dynamic Logic Program, where PD={PV : v V} and D=(V,E), including a special empty source s0. The dynamic program update over P at the state s S is a logic program s P with:

(RP) Rewritten program

rules

(IR) Inheritance rules

(RR) Rejection Rules

(CRS) Current State Rules

(UR) Update

Rules

(DR) Default

Rules

(GR) Graph Rules

Page 18: Dynamic Logic Programming with Multiple Dimensions João Alexandre Leite José Júlio Alferes Luís Moniz Pereira CENTRIA – Universidade Nova de Lisboa Universidad

Syntactical Transformation

(RP) Rewritten program rules

APv B1 , … , Bm , C’1, … , C’n

A´Pv B1 , … , Bm , C’1, … , C’n

for any rule

A B1 , … , Bm , not C1, … , not Cn

not A B1 , … , Bm , not C1, … , not Cn

in Pv

Page 19: Dynamic Logic Programming with Multiple Dimensions João Alexandre Leite José Júlio Alferes Luís Moniz Pereira CENTRIA – Universidade Nova de Lisboa Universidad

(GR) Graph rules

edge(u,v) (for every u < v E )

path(X,Y) edge(X,Y).

path(X,Y) edge(X,Z), path(Z,Y).

Syntactical Transformation

Page 20: Dynamic Logic Programming with Multiple Dimensions João Alexandre Leite José Júlio Alferes Luís Moniz Pereira CENTRIA – Universidade Nova de Lisboa Universidad

(IR) Inheritance rules

Av Au , not reject(Au), edge(u,v)

A´v A´u , not reject(A´u ), edge(u,v)

(RR) Rejection rules

reject(Au) A´Pu , path(u,v)

reject(A´u) APu , path(u,v)

Syntactical Transformation

Page 21: Dynamic Logic Programming with Multiple Dimensions João Alexandre Leite José Júlio Alferes Luís Moniz Pereira CENTRIA – Universidade Nova de Lisboa Universidad

(UP) Update rulesAv APv A’v A’Pv

(DR) Default rules

A’s0

(CSR) Current state rules

A As not A A’s

Syntactical Transformation

Page 22: Dynamic Logic Programming with Multiple Dimensions João Alexandre Leite José Júlio Alferes Luís Moniz Pereira CENTRIA – Universidade Nova de Lisboa Universidad

MDLP - Results

Theorem:The generalized stable models of the program s P coincide with the generalized stable models of the multi-dimensional update at state s according to the semantical characterization.

Theorem:Multi-dimensional Dynamic Logic Programming generalizes Dynamic Logic Programming.

Page 23: Dynamic Logic Programming with Multiple Dimensions João Alexandre Leite José Júlio Alferes Luís Moniz Pereira CENTRIA – Universidade Nova de Lisboa Universidad

MDLP applications

Combining agents’ knowledge Distributed KBs Program composition

Evolution of hierarchical knowledge Legal reasoning e-commerce policy integration and

evolution Organizational decision making

Multiple inheritanceIndividual agents’ views

Page 24: Dynamic Logic Programming with Multiple Dimensions João Alexandre Leite José Júlio Alferes Luís Moniz Pereira CENTRIA – Universidade Nova de Lisboa Universidad

Future Work

A (LUPS-like) language for building MDLPs allowing updatable DAGs (new edges and nodes) allowing for conditions on new edges

Societies of MDLPs Observation points (public and private) Inter-MDLP updates and communication Integration of MDLPs with common Ps

Hypothetical reasoning over MDLPsRemove the acyclicity condition (??)Applications and relationships