41
Languages of Languages of Updates Updates João Alexandre Leite João Alexandre Leite New University of Lisbon http://centria.di.fct.unl.pt/ ~jleite/ Dagstuhl, 25 November, 2002 Dagstuhl Seminar 02481 Co-authors: José Alferes, Antonio Brogi, Luís Moniz Pereira, Halina Przymusinska and Teodor Przymusinski.

Languages of Updates João Alexandre Leite New University of Lisbon jleite/ Dagstuhl, 25 November, 2002Dagstuhl Seminar 02481

Embed Size (px)

Citation preview

Page 1: Languages of Updates João Alexandre Leite New University of Lisbon jleite/ Dagstuhl, 25 November, 2002Dagstuhl Seminar 02481

Languages of UpdatesLanguages of Updates

João Alexandre LeiteJoão Alexandre Leite

New University of Lisbon

http://centria.di.fct.unl.pt/~jleite/

Dagstuhl, 25 November, 2002Dagstuhl Seminar 02481

Co-authors: José Alferes, Antonio Brogi, Luís Moniz Pereira, Halina Przymusinska and Teodor Przymusinski.

Page 2: Languages of Updates João Alexandre Leite New University of Lisbon jleite/ Dagstuhl, 25 November, 2002Dagstuhl Seminar 02481

25-11-2002 Dagstuhl Seminar 02481 2

Outline Outline

►Logic Program UpdatesLogic Program Updates Dynamic Logic ProgrammingDynamic Logic Programming Other SemanticsOther Semantics

►Languages of UpdatesLanguages of Updates LUPSLUPS EPI and KABULEPI and KABUL

►Evolving Logic Programs: Evolving Logic Programs: EVOLPEVOLP ►DiscussionDiscussion

Page 3: Languages of Updates João Alexandre Leite New University of Lisbon jleite/ Dagstuhl, 25 November, 2002Dagstuhl Seminar 02481

25-11-2002 Dagstuhl Seminar 02481 3

Motivation for LP&NMRMotivation for LP&NMR

►The notion of agency has claimed a The notion of agency has claimed a major role in modern AI researchmajor role in modern AI research

►LP and Non-monotonic Reasoning are LP and Non-monotonic Reasoning are appropriate for rational agents:appropriate for rational agents: Utmost efficiency is not always crucialUtmost efficiency is not always crucial Clear specification and correctness Clear specification and correctness areare

crucialcrucial LP provides a general, encompassing, LP provides a general, encompassing,

rigorous declarative and procedural rigorous declarative and procedural framework for rational functionalitiesframework for rational functionalities

Page 4: Languages of Updates João Alexandre Leite New University of Lisbon jleite/ Dagstuhl, 25 November, 2002Dagstuhl Seminar 02481

25-11-2002 Dagstuhl Seminar 02481 4

Generalized Logic ProgramsGeneralized Logic Programs

►To represent negative info in LP updates, To represent negative info in LP updates,

we need LPs allowing we need LPs allowing notnot in heads in heads

►Programs are sets of generalized LP rules:Programs are sets of generalized LP rules:

A A B B11,…, B,…, Bkk, not C, not C11,…,not C,…,not Cmm

not A not A B B11,…, B,…, Bkk, not C, not C11,…,not C,…,not Cmm

►The semantics is a generalization of SMsThe semantics is a generalization of SMs

Page 5: Languages of Updates João Alexandre Leite New University of Lisbon jleite/ Dagstuhl, 25 November, 2002Dagstuhl Seminar 02481

25-11-2002 Dagstuhl Seminar 02481 5

Dynamic Logic ProgrammingDynamic Logic Programming► DLP was introduced to express LP’s linear DLP was introduced to express LP’s linear

evolution in dynamic environments, via updatesevolution in dynamic environments, via updates► DLP gives semantics to sequences of GLPsDLP gives semantics to sequences of GLPs► Each program represents a distinct state of Each program represents a distinct state of

knowledge, where states may specify:knowledge, where states may specify: different time points, different hierarchical instances, different time points, different hierarchical instances,

different viewpoints, etc.different viewpoints, etc.

► Different states may have mutually Different states may have mutually contradictory or overlapping information, and contradictory or overlapping information, and DLP determines the semantics for each state DLP determines the semantics for each state sequencesequence

Page 6: Languages of Updates João Alexandre Leite New University of Lisbon jleite/ Dagstuhl, 25 November, 2002Dagstuhl Seminar 02481

25-11-2002 Dagstuhl Seminar 02481 6

DLPDLP

► A Dynamic Logic Program, A Dynamic Logic Program, PP, is a , is a sequence of generalized logic programs sequence of generalized logic programs

PP11 P P22 … … P Pnn

► An interpretation An interpretation MMss is a stable model of is a stable model of PP at state 1at state 1ss n n iffiff

Ms= least( [Ps – Reject(Ms)] Def (Ms) )

Page 7: Languages of Updates João Alexandre Leite New University of Lisbon jleite/ Dagstuhl, 25 November, 2002Dagstuhl Seminar 02481

25-11-2002 Dagstuhl Seminar 02481 7

DLP - semanticsDLP - semantics

where:where:

Reject(Ms) =

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

body(r’)}

Ms= least( [Ps – Reject(Ms)] Def (Ms) )

Def(Ms) = {not A | r Pj , js, head(r)=A Ms

body(r)}

Page 8: Languages of Updates João Alexandre Leite New University of Lisbon jleite/ Dagstuhl, 25 November, 2002Dagstuhl Seminar 02481

25-11-2002 Dagstuhl Seminar 02481 8

Other Semantics for UpdatesOther Semantics for Updates

►P-Justified UpdatesP-Justified Updates [[Leite and Pereira 97Leite and Pereira 97]]

►Dynamic Stable ModelsDynamic Stable Models [[Alferes, Leite, Alferes, Leite, Pereira, Przymusinska and Przymusinski 98Pereira, Przymusinska and Przymusinski 98]]

►Update Answer-setsUpdate Answer-sets [[Eiter, Fink, Sabbatini Eiter, Fink, Sabbatini and Tompits 01and Tompits 01]]

►U-ModelsU-Models [[Leite 02Leite 02]]

Each semantics is obtained by re-defining the Each semantics is obtained by re-defining the set of rejected rules, and the set of defaults.set of rejected rules, and the set of defaults.

Page 9: Languages of Updates João Alexandre Leite New University of Lisbon jleite/ Dagstuhl, 25 November, 2002Dagstuhl Seminar 02481

25-11-2002 Dagstuhl Seminar 02481 9

A language for updatesA language for updates►Now we know how to give meaning to Now we know how to give meaning to

sequences of updating LPssequences of updating LPs►How do we come up with such LPs?How do we come up with such LPs?

Changes may be additions or retractions Changes may be additions or retractions of rulesof rules

Some rules may represent (persistent) Some rules may represent (persistent) lawslaws

Updates rules may be conditional on Updates rules may be conditional on present statepresent state

►How, from these rule requirements, do How, from these rule requirements, do we build a sequence of LPs?we build a sequence of LPs?

Page 10: Languages of Updates João Alexandre Leite New University of Lisbon jleite/ Dagstuhl, 25 November, 2002Dagstuhl Seminar 02481

25-11-2002 Dagstuhl Seminar 02481 10

Two Options...Two Options...

►Define a set of commands that is Define a set of commands that is manageable and easy to write manageable and easy to write specifications with:specifications with:

LUPS LUPS EPI EPI KABUL KABUL► Identify the minimal set of commands Identify the minimal set of commands

needed, and then add (high level) needed, and then add (high level) macros to allow for easy specifications:macros to allow for easy specifications:

EVOLPEVOLP

Page 11: Languages of Updates João Alexandre Leite New University of Lisbon jleite/ Dagstuhl, 25 November, 2002Dagstuhl Seminar 02481

25-11-2002 Dagstuhl Seminar 02481 11

LUPSLUPS

►LUPS is a language to declaratively LUPS is a language to declaratively specify how knowledge evolvesspecify how knowledge evolves

►LPs specify states, DLPs specify LPs specify states, DLPs specify evolution of statesevolution of states

►LUPS specify rules for state LUPS specify rules for state transitiontransition

►LUPS makes both state and state LUPS makes both state and state transitions declarativetransitions declarative

Page 12: Languages of Updates João Alexandre Leite New University of Lisbon jleite/ Dagstuhl, 25 November, 2002Dagstuhl Seminar 02481

25-11-2002 Dagstuhl Seminar 02481 12

Knowledge state updatingKnowledge state updating

► Consecutive knowledge states are obtained as:Consecutive knowledge states are obtained as:

KSKSnn = KS = KS00[U[U11][U][U22]...[U]...[Unn],],

where Uwhere Unn represents consecutive sets of updates. We represents consecutive sets of updates. We denote this by:denote this by:

KSKSnn =U =U0 0 U U1 1 ... ... U Unn

► Given the Given the current statecurrent state KS, its KS, its successor statesuccessor state KS[U] is KS[U] is produced as a result of a non-empty set U of parallel produced as a result of a non-empty set U of parallel updatesupdates. Each can be viewed as a . Each can be viewed as a (parallel) (parallel) actionaction. .

► Update actions do Update actions do NOTNOT modify the current or any of the modify the current or any of the previous states. They only affect future states, beginning previous states. They only affect future states, beginning with the successor state KS[U].with the successor state KS[U].

Page 13: Languages of Updates João Alexandre Leite New University of Lisbon jleite/ Dagstuhl, 25 November, 2002Dagstuhl Seminar 02481

25-11-2002 Dagstuhl Seminar 02481 13

LUPS ExampleLUPS Example

The Statement:The Statement:assertassert A A BB11,…, B,…, Bkk, notC, notC11,…,,…,notCnotCmm

whenwhen DD11,…,D,…,Dnn,,notEnotE11,…, notE,…, notEpp

The meaning of the assert statement is that if the preconditionThe meaning of the assert statement is that if the precondition whenwhen DD11,…,D,…,Dnn,,notEnotE11,…, notE,…, notEpp

is true in the current knowledge state then the ruleis true in the current knowledge state then the rule

A A BB11,…, B,…, Bkk, notC, notC11,…,,…,notCnotCmm is true in the next state, and persists from then on byis true in the next state, and persists from then on byinertia, until defeated by some future update or retracted.inertia, until defeated by some future update or retracted.

Page 14: Languages of Updates João Alexandre Leite New University of Lisbon jleite/ Dagstuhl, 25 November, 2002Dagstuhl Seminar 02481

25-11-2002 Dagstuhl Seminar 02481 14

LUPS - SyntaxLUPS - Syntax► LUPS statementsLUPS statements: they cause changes to the current : they cause changes to the current

state, leading to a successor state.state, leading to a successor state.

[[aalwayslways]] assert assert [ [eventevent] Rule ] Rule whenwhen <Conditions> <Conditions>

[[aalwayslways]] retract retract [ [eventevent] Rule ] Rule whenwhen <Conditions> <Conditions>

cancelcancel assert assert Rule Rule whenwhen <Conditions> <Conditions>

cancelcancel retract retract Rule Rule whenwhen <Conditions> <Conditions>

<Conditions> ::= L<Conditions> ::= L11, L, L22, …, L, …, Lnn..

Page 15: Languages of Updates João Alexandre Leite New University of Lisbon jleite/ Dagstuhl, 25 November, 2002Dagstuhl Seminar 02481

25-11-2002 Dagstuhl Seminar 02481 15

LUPS semanticsLUPS semantics► Sequences of commands are translated into Sequences of commands are translated into

Dynamic LPs.Dynamic LPs.► Given Given PP11 P P22 … … P Pii resulting from the resulting from the

translation of translation of UU0 0 U U1 1 ... ... U Uii and and UUi+1i+1, , obtain the new DLP obtain the new DLP PP11 P P22 … … P Pi i P Pi+1i+1..

► The semantics is then given by the The semantics is then given by the semantics of the translated DLP.semantics of the translated DLP.

► This way LUPS programs This way LUPS programs specifyspecify sequences sequences of LPsof LPs

Page 16: Languages of Updates João Alexandre Leite New University of Lisbon jleite/ Dagstuhl, 25 November, 2002Dagstuhl Seminar 02481

25-11-2002 Dagstuhl Seminar 02481 16

Translation exampleTranslation example

► Let Let PP11 P P22 … … P Pii resulting from the resulting from the

translation of translation of UU0 0 U U1 1 ... ... U Uii

► Let Let UUi+1i+1contain: contain: assertassert RuleRule whenwhen CondCond

► If If PP11 P P22 … … P Pii |= |= CondCond then then RuleRule P Pii

► The translation of all commands is rather The translation of all commands is rather extensive.extensive.

Page 17: Languages of Updates João Alexandre Leite New University of Lisbon jleite/ Dagstuhl, 25 November, 2002Dagstuhl Seminar 02481

25-11-2002 Dagstuhl Seminar 02481 17

EPI [Eiter et al.]EPI [Eiter et al.]

►Designed to allow the specification of Designed to allow the specification of KB update policies.KB update policies.

►Extends LUPS with:Extends LUPS with: external observationsexternal observations Commands that depend on the concurrent Commands that depend on the concurrent

execution of other commandsexecution of other commands

Page 18: Languages of Updates João Alexandre Leite New University of Lisbon jleite/ Dagstuhl, 25 November, 2002Dagstuhl Seminar 02481

25-11-2002 Dagstuhl Seminar 02481 18

KABUL – KABUL – KKnowledge nowledge AAnd nd BBehaviour ehaviour UUpdate pdate LLanguageanguage

►Logic Programs in DLP describe Logic Programs in DLP describe knowledgeknowledge at each state; at each state;

►LUPS (and EPI) statements describe LUPS (and EPI) statements describe how to how to updateupdate suchsuch knowledgeknowledge, i.e. , i.e. they describe the they describe the behaviourbehaviour of the KB. of the KB.

►How to How to update such behaviourupdate such behaviour??►This is the purpose of:This is the purpose of:

KABUL – Knowledge And Behaviour Update Language

Page 19: Languages of Updates João Alexandre Leite New University of Lisbon jleite/ Dagstuhl, 25 November, 2002Dagstuhl Seminar 02481

25-11-2002 Dagstuhl Seminar 02481 19

KABUL - SyntaxKABUL - Syntax► KABUL statementsKABUL statements::

[[aalways|oncelways|once]] assert assert (Rule|Stat) (Rule|Stat) <Cond> <Cond>

[[aalways|oncelways|once]] retract retract (Rule|Stat) (Rule|Stat) <Cond> <Cond>

[[aalways|oncelways|once]] assert assert [ [eventevent] (Rule) ] (Rule) <Cond> <Cond>

[[aalways|oncelways|once]] retract retract [ [eventevent] (Rule) ] (Rule) <Cond> <Cond>

notnot assert|retract assert|retract [ [eventevent] (Rule|Stat) ] (Rule|Stat) <Cond> <Cond>

► Where <Cond> can include conditions onWhere <Cond> can include conditions on:: literals literals concurrent execution of other commands;concurrent execution of other commands; existence of rule in the KB;existence of rule in the KB; external observationsexternal observations

Page 20: Languages of Updates João Alexandre Leite New University of Lisbon jleite/ Dagstuhl, 25 November, 2002Dagstuhl Seminar 02481

25-11-2002 Dagstuhl Seminar 02481 20

Problems with these Problems with these languageslanguages

Too many commandsToo many commands Far from the spirit of LPFar from the spirit of LP ComplexComplex Difficult to prove propertiesDifficult to prove properties

Fixed set of commandsFixed set of commands Each encodes a high-level behaviourEach encodes a high-level behaviour Are those the only interesting behaviors? Are those the only interesting behaviors?

One could further extend the One could further extend the language. But, where to stop?language. But, where to stop?

Page 21: Languages of Updates João Alexandre Leite New University of Lisbon jleite/ Dagstuhl, 25 November, 2002Dagstuhl Seminar 02481

25-11-2002 Dagstuhl Seminar 02481 21

How to proceed?How to proceed?

Instead of extending with new Instead of extending with new commands…commands…

Minimally add constructs and concepts Minimally add constructs and concepts to LP, to cope with evolution and to LP, to cope with evolution and updating (start from scratch)updating (start from scratch)

►The result, The result, EVOLPEVOLP, provides a simpler, , provides a simpler, closer to traditional LP, and more closer to traditional LP, and more general formulation of LP Updatesgeneral formulation of LP Updates

Page 22: Languages of Updates João Alexandre Leite New University of Lisbon jleite/ Dagstuhl, 25 November, 2002Dagstuhl Seminar 02481

25-11-2002 Dagstuhl Seminar 02481 22

What do we (really) needWhat do we (really) need► Programs must be allowed to evolvePrograms must be allowed to evolve

Meaning of programs should be sequences of Meaning of programs should be sequences of sets of literals, representing evolutionssets of literals, representing evolutions

Need a construct to assert new informationNeed a construct to assert new information? Do we need a construct to retract old Do we need a construct to retract old

information?information?notnots in the heads to allow newer to supervene s in the heads to allow newer to supervene

older rulesolder rules► Program evolution may me influenced by Program evolution may me influenced by

the outsidethe outsideAllow external eventsAllow external events… … written in the language of programswritten in the language of programs

Page 23: Languages of Updates João Alexandre Leite New University of Lisbon jleite/ Dagstuhl, 25 November, 2002Dagstuhl Seminar 02481

25-11-2002 Dagstuhl Seminar 02481 23

Self-evolving LPs - Syntax Self-evolving LPs - Syntax ►EVOLP rules are Generalized LP rules EVOLP rules are Generalized LP rules

(possibly with (possibly with notnots in heads) plus special s in heads) plus special predicate predicate assert/1assert/1

►The argument of The argument of assertassert is an EVOLP rule is an EVOLP rule (i.e. arbitrary nesting of (i.e. arbitrary nesting of assertassert is allowed) is allowed)

►Examples:Examples:assert( a assert( a not b) not b) d, not e d, not enot a not a not assert( assert(a not assert( assert(a b) b) not b), c not b), c

►EVOLP programs are sets of EVOLP rulesEVOLP programs are sets of EVOLP rules

Page 24: Languages of Updates João Alexandre Leite New University of Lisbon jleite/ Dagstuhl, 25 November, 2002Dagstuhl Seminar 02481

25-11-2002 Dagstuhl Seminar 02481 24

Meaning of Self-evolving LPsMeaning of Self-evolving LPs► Determined by sequences of sets of literalsDetermined by sequences of sets of literals► Each sequence represents a possible evolutionEach sequence represents a possible evolution► The nThe nthth set in a sequence represents what is set in a sequence represents what is

true/false after n steps in that evolutiontrue/false after n steps in that evolution► The first set in sequences is a SM of the LP, The first set in sequences is a SM of the LP,

where assert/1 literals are viewed as normal where assert/1 literals are viewed as normal onesones

► If If assert(Rule)assert(Rule) belongs to the n belongs to the nthth set, then set, then (n+1)(n+1)thth sets must consider the addition of sets must consider the addition of RuleRule

Page 25: Languages of Updates João Alexandre Leite New University of Lisbon jleite/ Dagstuhl, 25 November, 2002Dagstuhl Seminar 02481

25-11-2002 Dagstuhl Seminar 02481 25

Intuitive exampleIntuitive examplea a assert(b assert(b ) ) assert(c assert(c ) ) b b

► At the beginning At the beginning aa is true, and so is is true, and so is assert(b assert(b ))► Therefore, rule Therefore, rule b b is assertedis asserted► At 2At 2ndnd step, step, bb becomes true, and so does becomes true, and so does assert(c assert(c

) ) ► Therefore, rule Therefore, rule c c is assertedis asserted► At 3At 3rdrd step, step, cc becomes true. becomes true.

<< {a, assert(b {a, assert(b )},)},{a, b, assert(b {a, b, assert(b ), assert(c ), assert(c )},)},{a, b, c, assert(b {a, b, c, assert(b ), assert(c ), assert(c )})} >>

Page 26: Languages of Updates João Alexandre Leite New University of Lisbon jleite/ Dagstuhl, 25 November, 2002Dagstuhl Seminar 02481

25-11-2002 Dagstuhl Seminar 02481 26

Self-evolution definitionsSelf-evolution definitions► An An evolution interpretationevolution interpretation of of PP over over LL is a is a

sequence sequence <I<I11,…,I,…,Inn>> of sets of atoms from of sets of atoms from LLassertassert

► The The evolution traceevolution trace of of <I<I11,…,I,…,Inn>> is is <P<P11,…,P,…,Pnn>>::

PP11 = P = P and and PPii = {R | assert(R) = {R | assert(R) I Ii-1i-1}} (2 ≤ i ≤ n)(2 ≤ i ≤ n)

► Evolution traces contains the programs Evolution traces contains the programs imposed by interpretationsimposed by interpretations

► We have now to check whether each nWe have now to check whether each nthth set set complies with the programs up to n-1complies with the programs up to n-1

Page 27: Languages of Updates João Alexandre Leite New University of Lisbon jleite/ Dagstuhl, 25 November, 2002Dagstuhl Seminar 02481

25-11-2002 Dagstuhl Seminar 02481 27

Evolution Stable ModelsEvolution Stable Models

►<I<I11,…,I,…,Inn>>, with trace , with trace <P<P11,…,P,…,Pnn>>, is an , is an evolution stable modelevolution stable model of of PP, iff, iff

1 ≤ i ≤ n1 ≤ i ≤ n, , IIii is a SM of the DLP: is a SM of the DLP: PP1 1 … … PPii

Page 28: Languages of Updates João Alexandre Leite New University of Lisbon jleite/ Dagstuhl, 25 November, 2002Dagstuhl Seminar 02481

25-11-2002 Dagstuhl Seminar 02481 28

Simple exampleSimple example► Let P be: Let P be: a a

assert(not a assert(not a ) ) b b

assert(b assert(b a) a) not c not c

c c assert(not a assert(not a ))► <{a, assert(b <{a, assert(b a)}, {a, b,c,assert(not a a)}, {a, b,c,assert(not a )}, {assert( b )}, {assert( b a)}> a)}>

is an evolution SM of P.is an evolution SM of P.► The trace is The trace is <P,{b <P,{b a},{not a a},{not a }>}>

a,assert(b a)

assert(b a)a, b, c,

assert(not a )

Page 29: Languages of Updates João Alexandre Leite New University of Lisbon jleite/ Dagstuhl, 25 November, 2002Dagstuhl Seminar 02481

25-11-2002 Dagstuhl Seminar 02481 29

Example with various Example with various evolutionsevolutions

► No matter what, assert No matter what, assert cc; if ; if aa is not going to be asserted, then assert is not going to be asserted, then assert bb; if ; if cc is true, and is true, and bb is not going to be asserted, then assert is not going to be asserted, then assert aa..

assert(b) assert(b) not assert(a) not assert(a).. assert(c) assert(c) assert(a) assert(a) not assert(b), c not assert(b), c

► Paths in the graph below are evolution SMsPaths in the graph below are evolution SMs

ast(b)ast(c)

b,c,ast(b)ast(c)

b,c,ast(a)ast(c)

a,b,c,ast(b)ast(c)

a,b,c,ast(a)ast(c)

Page 30: Languages of Updates João Alexandre Leite New University of Lisbon jleite/ Dagstuhl, 25 November, 2002Dagstuhl Seminar 02481

25-11-2002 Dagstuhl Seminar 02481 30

Event-aware programsEvent-aware programs

►Self-evolving programs are autistic!Self-evolving programs are autistic!►Events may come from the outside:Events may come from the outside:

Observations of facts or rulesObservations of facts or rules Assertion ordersAssertion orders

►Both can be written in EVOLP languageBoth can be written in EVOLP language► Influence from outside should not Influence from outside should not

persist by inertiapersist by inertia

Page 31: Languages of Updates João Alexandre Leite New University of Lisbon jleite/ Dagstuhl, 25 November, 2002Dagstuhl Seminar 02481

25-11-2002 Dagstuhl Seminar 02481 31

Evolution Stable ModelsEvolution Stable Models

►An An event sequenceevent sequence is a sequence of is a sequence of sets of EVOLP rules.sets of EVOLP rules.

►<I<I11,…,I,…,Inn>>, with trace , with trace <P<P11,…,P,…,Pnn>>, is an , is an evolution SMevolution SM of of PP givengiven <E<E11,…,E,…,Ekk>>, iff, iff

1 ≤ i ≤ n1 ≤ i ≤ n, , IIii is a SM of the DLP: is a SM of the DLP:

PP1 1 … … PPi i E Eii))

►Note that, this way, events from the Note that, this way, events from the outside do not persist by inertiaoutside do not persist by inertia

Page 32: Languages of Updates João Alexandre Leite New University of Lisbon jleite/ Dagstuhl, 25 November, 2002Dagstuhl Seminar 02481

25-11-2002 Dagstuhl Seminar 02481 32

Simple exampleSimple example► Program P says that: whenever Program P says that: whenever cc, assert , assert a a b b► The events were: 1The events were: 1stst cc was perceived; 2 was perceived; 2ndnd an an

order to assert order to assert bb; 3; 3rdrd an order to assert an order to assert not anot a

P: assert(a P: assert(a b) b) c c

EventsEvents: <{c : <{c }, {assert(b }, {assert(b )}, {assert(not a )}, {assert(not a )}>)}>

c,assert(a b)

assert(b )b, a,

assert(not a )b

Page 33: Languages of Updates João Alexandre Leite New University of Lisbon jleite/ Dagstuhl, 25 November, 2002Dagstuhl Seminar 02481

25-11-2002 Dagstuhl Seminar 02481 33

LUPS as EVOLPLUPS as EVOLP► The behavior of all LUPS commands can be The behavior of all LUPS commands can be

constructed in EVOLP. Eg:constructed in EVOLP. Eg:► alwaysalways (not a (not a b, not c) b, not c) whenwhen d, not e d, not e

coded as event:coded as event:assert( assert(not a assert( assert(not a b, not c) ← d, not e ) b, not c) ← d, not e )

► always eventalways event (a (a b) b) whenwhen c ccoded as events:coded as events:

assert( assert(a assert( assert(a b, ev(a b, ev(a b)) b)) c ) c )assert( assert(ev(a assert( assert(ev(a b)) b)) c ) c )

plus:plus:assert( not ev(R) ) assert( not ev(R) ) ev(R), not ev(R), not

assert(ev(R))assert(ev(R))

Page 34: Languages of Updates João Alexandre Leite New University of Lisbon jleite/ Dagstuhl, 25 November, 2002Dagstuhl Seminar 02481

25-11-2002 Dagstuhl Seminar 02481 34

EVOLP featuresEVOLP features

► All LUPS and EPI features are EVOLP All LUPS and EPI features are EVOLP features:features: Rule updates; Persistent updates; simultaneous Rule updates; Persistent updates; simultaneous

updates; events; commands dependent on other updates; events; commands dependent on other commands; …commands; …

► Many extra features (some of them in Many extra features (some of them in KABUL) can be KABUL) can be programmedprogrammed:: Commands that span over timeCommands that span over time Updates of persistent lawsUpdates of persistent laws ……

Page 35: Languages of Updates João Alexandre Leite New University of Lisbon jleite/ Dagstuhl, 25 November, 2002Dagstuhl Seminar 02481

25-11-2002 Dagstuhl Seminar 02481 35

EVOLP possible applicationsEVOLP possible applications

►Dynamic Knowledge RepresentationDynamic Knowledge Representation►Evolving Knowledge BasesEvolving Knowledge Bases

Legal ReasoningLegal Reasoning User ProfilingUser Profiling

►Evolving systems, with external Evolving systems, with external controlcontrol

►Reasoning about actionsReasoning about actions►Active Data (and Knowledge) BasesActive Data (and Knowledge) Bases

Page 36: Languages of Updates João Alexandre Leite New University of Lisbon jleite/ Dagstuhl, 25 November, 2002Dagstuhl Seminar 02481

25-11-2002 Dagstuhl Seminar 02481 36

… … and alsoand also► EVOLP is a EVOLP is a conciseconcise, , simplesimple and quite and quite powerfulpowerful

language to reason about KB evolutionlanguage to reason about KB evolution PowerfulPowerful: it can do everything other update : it can do everything other update

languages can.languages can. Simple and conciseSimple and concise: much better to use for : much better to use for proving proving

propertiesproperties of KB evolution. of KB evolution.

► EVOLP: a firm formal basis in which to express, EVOLP: a firm formal basis in which to express, implement, and reason about dynamic KBimplement, and reason about dynamic KB

► Opens up a number of research topicsOpens up a number of research topics Much remains do be done…Much remains do be done…

Page 37: Languages of Updates João Alexandre Leite New University of Lisbon jleite/ Dagstuhl, 25 November, 2002Dagstuhl Seminar 02481

25-11-2002 Dagstuhl Seminar 02481 37

ConclusionsConclusions

►Orthogonal in several respects:Orthogonal in several respects: Can be used in several LP based agent Can be used in several LP based agent

architectures;architectures; Several semantics for sequences of LPs Several semantics for sequences of LPs

can be used;can be used;

Page 38: Languages of Updates João Alexandre Leite New University of Lisbon jleite/ Dagstuhl, 25 November, 2002Dagstuhl Seminar 02481

25-11-2002 Dagstuhl Seminar 02481 38

Open IssuesOpen Issues

►Well Founded Semantics;Well Founded Semantics;►Prune particular evolutions;Prune particular evolutions;

Page 39: Languages of Updates João Alexandre Leite New University of Lisbon jleite/ Dagstuhl, 25 November, 2002Dagstuhl Seminar 02481

25-11-2002 Dagstuhl Seminar 02481 39

ImplementationsImplementations

►There are public available There are public available implementations of several update implementations of several update frameworks (DLP, MDLP, LUPS and frameworks (DLP, MDLP, LUPS and EVOLP) at:EVOLP) at:

http://centria.di.fct.unl.pt/~jja/updateshttp://centria.di.fct.unl.pt/~jja/updates

Page 40: Languages of Updates João Alexandre Leite New University of Lisbon jleite/ Dagstuhl, 25 November, 2002Dagstuhl Seminar 02481

25-11-2002 Dagstuhl Seminar 02481 40

References (1)References (1)► J. A. Leite, J. A. Leite, Evolving Knowledge BasesEvolving Knowledge Bases, ,

vol 81 of Frontiers of Artificial Intelligence and Applicationsvol 81 of Frontiers of Artificial Intelligence and Applications, IOS Press, pp , IOS Press, pp xviii + 307, ISBN: 1 58603 278 X, 2003.xviii + 307, ISBN: 1 58603 278 X, 2003.

► J. J. Alferes, A. Brogi, J. A. Leite and L. M. Pereira, J. J. Alferes, A. Brogi, J. A. Leite and L. M. Pereira, Evolving Logic Evolving Logic ProgramsPrograms, In S. Flesca, S. Greco, N. Leone, G. Ianni (eds.), Proceedings , In S. Flesca, S. Greco, N. Leone, G. Ianni (eds.), Proceedings of the 8th European Conference on Logics in Artificial Intelligence of the 8th European Conference on Logics in Artificial Intelligence (JELIA'02), pages 50-61, Springer-Verlag, LNCS 2424, 2002. (JELIA'02), pages 50-61, Springer-Verlag, LNCS 2424, 2002.

► J. J. Alferes, L. M. Pereira, H. Przymusinska and T. C. Przymusinski, J. J. Alferes, L. M. Pereira, H. Przymusinska and T. C. Przymusinski, LUPS LUPS - a language for updating logic programs- a language for updating logic programs. Artificial Intelligence . Artificial Intelligence 138(1-2), 2002. 138(1-2), 2002.

► J. A. Leite, J. A. Leite, A Modified Semantics for LUPSA Modified Semantics for LUPS, In P. Brazdil and A. Jorge , In P. Brazdil and A. Jorge (eds.), Progress in Artificial Intelligence, 10th Portuguese International (eds.), Progress in Artificial Intelligence, 10th Portuguese International Conference on Artificial Intelligence (EPIA'01), pages 261-275, Springer-Conference on Artificial Intelligence (EPIA'01), pages 261-275, Springer-Verlag, LNAI 2258, December 2001. Verlag, LNAI 2258, December 2001.

► J. J. Alferes, J. A. Leite, L. M. Pereira, H. Przymusinska and T. C. J. J. Alferes, J. A. Leite, L. M. Pereira, H. Przymusinska and T. C. Przymusinski, Przymusinski, Dynamic Updates of Non-Monotonic Knowledge Dynamic Updates of Non-Monotonic Knowledge BasesBases, The Journal of Logic Programming 45(1-3): 43-70, , The Journal of Logic Programming 45(1-3): 43-70, September/October 2000. September/October 2000.

► Thomas Eiter, Michael Fink, Giuliana Sabbatini, Hans Tompits: Thomas Eiter, Michael Fink, Giuliana Sabbatini, Hans Tompits: On On Properties of Update Sequences Based on Causal RejectionProperties of Update Sequences Based on Causal Rejection . TPLP . TPLP 2(6): 711-767 (2002) 2(6): 711-767 (2002)

Page 41: Languages of Updates João Alexandre Leite New University of Lisbon jleite/ Dagstuhl, 25 November, 2002Dagstuhl Seminar 02481

25-11-2002 Dagstuhl Seminar 02481 41

References (1)References (1)► J. J. Alferes, J. A. Leite , L. M. Pereira, H. Przymusinska and T. C. J. J. Alferes, J. A. Leite , L. M. Pereira, H. Przymusinska and T. C.

Przymusinski, Przymusinski, Dynamic Logic ProgrammingDynamic Logic Programming, In A. Cohn, L. Schubert and , In A. Cohn, L. Schubert and S. Shapiro (eds.), Procs. of the Sixth International Conference on Principles S. Shapiro (eds.), Procs. of the Sixth International Conference on Principles of Knowledge Representation and Reasoning (KR'98), Trento, Italy, pages of Knowledge Representation and Reasoning (KR'98), Trento, Italy, pages 98-109, Morgan Kaufmann, June 1998. 98-109, Morgan Kaufmann, June 1998.

► J. A. Leite, J. J. Alferes and L. M. Pereira, J. A. Leite, J. J. Alferes and L. M. Pereira, Multi-dimensional Dynamic Multi-dimensional Dynamic Knowledge RepresentationKnowledge Representation, In T. Eiter, W. Faber and M. Truszczynski, , In T. Eiter, W. Faber and M. Truszczynski, Procs. of the Sixth International Conference on Logic Programming and Procs. of the Sixth International Conference on Logic Programming and Nonmonotonic Reasoning (LPNMR'01), pages 365-378, Springer-Verlag, Nonmonotonic Reasoning (LPNMR'01), pages 365-378, Springer-Verlag, LNAI 2173, 2001. LNAI 2173, 2001.

► J. A. Leite, J. J. Alferes and L. M. Pereira, J. A. Leite, J. J. Alferes and L. M. Pereira, On the Use of Multi-dimensional On the Use of Multi-dimensional Dynamic Logic Programming to Represent Societal Agents' Dynamic Logic Programming to Represent Societal Agents' ViewpointsViewpoints, In P. Brazdil and A. Jorge (eds.), Progress in Artificial , In P. Brazdil and A. Jorge (eds.), Progress in Artificial Intelligence, 10th Portuguese International Conference on Artificial Intelligence, 10th Portuguese International Conference on Artificial Intelligence (EPIA'01), pages 276-289, Springer-Verlag, LNAI 2258, Intelligence (EPIA'01), pages 276-289, Springer-Verlag, LNAI 2258, December 2001. December 2001.

► J. A. Leite, J. J. Alferes and L. M. Pereira, H. Przymusinska and T. C. J. A. Leite, J. J. Alferes and L. M. Pereira, H. Przymusinska and T. C. Przymusinski, Przymusinski, A Language for Multi-dimensional UpdatesA Language for Multi-dimensional Updates, In J. Dix, J. , In J. Dix, J. A. Leite and K. Satoh (eds.), Proceedings of the 3rd International Workshop A. Leite and K. Satoh (eds.), Proceedings of the 3rd International Workshop on Computational Logic in Multi-Agent Systems, (CLIMA'02), in on Computational Logic in Multi-Agent Systems, (CLIMA'02), in Electronic Notes in Theoretical Computer Science 70(5)Electronic Notes in Theoretical Computer Science 70(5), 2002. , 2002.