O n th e D eterm in istic H o rn F ra g m en t o f T est ...nguyen/nguyen06aiml.pdf · in P D L (0...

22
On the Deterministic Horn Fragment of Test-free PDL Linh Anh Nguyen abstract. We study the deterministic Horn fragment of test-free proposi- tional dynamic logic (PDL (0) ). This fragment adopts the restriction that, in bodies of program clauses and goals, special universal modal operators which are a kind of combination of and are used instead of . The fragment contains deterministic positive logic programs and deterministic negative clauses, whose negations form serial positive formulae. A least Kripke model for a deterministic positive logic program in PDL (0) may not exist, because PDL (0) is a non-serial modal logic. In this work, we present an algorithm that, given a deterministic positive logic program P in PDL (0) , constructs a least pseudo-model of P . A pseudo-model is similar to a Kripke model except that it contains two sets of accessibility relations, one for dealing with existential modal operators and the other for dealing with universal modal operators. A least pseudo-model M of P has the property that, for every serial positive formula ϕ, P | = ϕ iff M | = ϕ. Fur- thermore, checking whether M | = ϕ is solvable in polynomial time in the sizes of M and ϕ. Our algorithm runs in exponential time and returns a pseudo-model with size 2 O(n 2 ) . We give a deterministic positive logic pro- gram in PDL (0) such that every pseudo-model characterizing it must have size 2 Ω(n) . keywords: PDL, finite automata, Horn logic, minimal models 1 Introduction Modal logic programming extends classical logic programming with modali- ties. There are two approaches in modal logic programming: the translation approach [3, 10] and the direct approach [1, 2, 8, 9]. In the translation ap- proach, both the functional translation method of Debart et al. [3] and the semi-functional translation method of Nonnengart [10] assume that the base modal logic is serial, i.e. it contains axiom i for every modal in- dex i. Using the direct approach for modal logic programming, Balbiani et al. [1] considered only serial modal logics, and in our previous works [7, 8, 9], we considered only serial or almost serial modal logics. In [2] Baldoni et al. studied modal logic programming using the direct approach for grammar logics, which are non-serial normal modal logics with axioms of the form [t 1 ] ... [t n ]ϕ [s 1 ] ... [s m ]ϕ. However, they considered only modal logic programs without existential modal operators. Seriality has thus played an important role in the theory of modal logic programming. It is an essential assumption for the functional and semi- functional translation methods. For the direct approach, let us consider the Advances in Modal Logic, Volume 6. c 2006, Linh Anh Nguyen.

Transcript of O n th e D eterm in istic H o rn F ra g m en t o f T est ...nguyen/nguyen06aiml.pdf · in P D L (0...

Page 1: O n th e D eterm in istic H o rn F ra g m en t o f T est ...nguyen/nguyen06aiml.pdf · in P D L (0 ), con stru cts a least p seu d o-m o d el of P . A p seu d o-m o d el is sim ilar

On the Deterministic Horn Fragmentof Test-free PDLLinh Anh Nguyen

abstract. We study the deterministic Horn fragment of test-free proposi-tional dynamic logic (PDL(0)). This fragment adopts the restriction that,in bodies of program clauses and goals, special universal modal operatorswhich are a kind of combination of ! and " are used instead of !. Thefragment contains deterministic positive logic programs and deterministicnegative clauses, whose negations form serial positive formulae. A leastKripke model for a deterministic positive logic program in PDL(0) maynot exist, because PDL(0) is a non-serial modal logic. In this work, wepresent an algorithm that, given a deterministic positive logic program P

in PDL(0), constructs a least pseudo-model of P . A pseudo-model is similarto a Kripke model except that it contains two sets of accessibility relations,one for dealing with existential modal operators and the other for dealingwith universal modal operators. A least pseudo-model M of P has theproperty that, for every serial positive formula !, P |= ! i! M |= !. Fur-thermore, checking whether M |= ! is solvable in polynomial time in thesizes of M and !. Our algorithm runs in exponential time and returns a

pseudo-model with size 2O(n2). We give a deterministic positive logic pro-gram in PDL(0) such that every pseudo-model characterizing it must havesize 2!(n).

keywords: PDL, finite automata, Horn logic, minimal models

1 Introduction

Modal logic programming extends classical logic programming with modali-ties. There are two approaches in modal logic programming: the translationapproach [3, 10] and the direct approach [1, 2, 8, 9]. In the translation ap-proach, both the functional translation method of Debart et al. [3] andthe semi-functional translation method of Nonnengart [10] assume that thebase modal logic is serial, i.e. it contains axiom !i! for every modal in-dex i. Using the direct approach for modal logic programming, Balbiani etal. [1] considered only serial modal logics, and in our previous works [7, 8, 9],we considered only serial or almost serial modal logics. In [2] Baldoni etal. studied modal logic programming using the direct approach for grammarlogics, which are non-serial normal modal logics with axioms of the form[t1] . . . [tn]! " [s1] . . . [sm]!. However, they considered only modal logicprograms without existential modal operators.

Seriality has thus played an important role in the theory of modal logicprogramming. It is an essential assumption for the functional and semi-functional translation methods. For the direct approach, let us consider the

Advances in Modal Logic, Volume 6. c! 2006, Linh Anh Nguyen.

Page 2: O n th e D eterm in istic H o rn F ra g m en t o f T est ...nguyen/nguyen06aiml.pdf · in P D L (0 ), con stru cts a least p seu d o-m o d el of P . A p seu d o-m o d el is sim ilar

378 Linh Anh Nguyen

following program in the modal logic K:

"p #

q # !p

s # "r

The problem is whether there exists a world accessible from the actual world.If there exists then "p implies !p, which then implies q. If there doesnot then "r holds and implies s. The program is thus “nondeterministic”because the accessibility relation is not serial. In the above program, "rdoes not follow from the program, but it may unwantedly become true whenthere are no worlds accessible from the actual world. To overcome thisproblem, instead of the program clause s # "r we can use s # !r, where! has the semantics defined by !! $ ("!%!!) or !! $ ("!%!!). Onecan say that allowing modal operators like ! is not a “solution” for dealingwith non-seriality because ! contains “seriality” itself. Our justificationsfor using modal operators like ! are as follows:

• If the base modal logic is deliberately chosen to be K, then adopting! is an appropriate solution. Note that we will still allow " to appearin contexts and heads of program clauses.

• While seriality is a natural assumption in some applications, e.g. tostate that knowledge and belief are consistent, it cannot be assumedin some cases. For example, if a is an action, we may not want a to bealways admissible. That is, we may not want to adopt axiom &a'!,and in that case [a]! does not imply &a'!.

• Finally, program clauses like s # !r are more acceptable thans # "r. In s # !r, the premise !r guarantees that "r actuallyfollows from the program, while in s # "r, the premise "r may “ac-cidentally” be true.

In this work, we study the deterministic Horn fragment of test-free propo-sitional dynamic logic (PDL(0)), which is a non-serial modal logic and canexpress Kn. This fragment adopts the restrictions that: i) in bodies of pro-gram clauses and goals, modal operators like ! are used instead of universalmodal operators like "; ii) implicit disjunction such as &" ( "!' and &""' isnot allowed in heads of program clauses. The deterministic Horn fragmentof PDL(0) contains deterministic positive logic programs and determinis-tic negative clauses. Negation of a deterministic negative clause is a serialpositive formula. In general, a serial positive formula is a positive formulawhich may contains modal operators like ! but not modal operators like ".

Constructing a least Kripke model for a given positive modal logic pro-gram in a serial propositional modal logic L is a useful starting point fordeveloping semantics for positive modal logic programs in the correspondingfirst-order modal logic L. We have demonstrated this in [7, 8] for the basic

Page 3: O n th e D eterm in istic H o rn F ra g m en t o f T est ...nguyen/nguyen06aiml.pdf · in P D L (0 ), con stru cts a least p seu d o-m o d el of P . A p seu d o-m o d el is sim ilar

On the Deterministic Horn Fragment of Test-free PDL 379

serial monomodal logics KD, T , KDB, B, KD4, S4, KD5, KD45, S5.In [7], we presented algorithms that, given a positive propositional modallogic program P , construct a least L-model of P , where L is one of the listedmodal logics. As a continuation of [7], in [8] we have developed the leastmodel semantics, fixpoint semantics, and SLD-resolution calculi for positivemodal logic programs in the corresponding first-order modal logics L.

In PDL(0), a least Kripke model of a deterministic positive logic programP may not exist.1 However, we can talk about least “pseudo-models” of P .A pseudo-model is similar to a Kripke model except that it contains two setsof accessibility relations, one for dealing with existential modal operatorsand the other for dealing with universal modal operators. Informally, M isa least pseudo-model of P if it satisfies P and for every pseudo-model M !

of P , M is less than or equal to M !. A least pseudo-model M of P hasthe property that, for every serial positive formula !, P |= ! i! M |= !.Furthermore, checking whether M |= ! is solvable in polynomial time inthe sizes of M and !.

In this work, we present an algorithm that, given a deterministic positivelogic program P , constructs a least pseudo-model of P . Our algorithm runsin exponential time and returns a pseudo-model with size 2O(n2). We givea deterministic positive logic program in PDL(0) such that every pseudo-model characterizing it must have size 2!(n).

From the view of the theory of complexity and expressiveness, the de-terministic Horn fragment of PDL(0) does not have interesting properties.However, this fragment and our method for it are useful for the followingreasons:

L1. If a knowledge base is represented by a deterministic positive logicprogram P and the given query is a serial positive formula !, thenhaving a least pseudo-model M of P , checking whether P |= ! canbe reduced to checking whether M |= !. This method is especiallyuseful when the knowledge base rarely changes.

L2. Our method for answering whether P |= ! by constructing a leastpseudo-model of P is bottom-up. It does not create choice points,while the traditional tableaux method for this problem would inten-sively use the “or” splitting rule and we know that a wrong choicewhen exploring tableaux, e.g. one near the root of the search tree,would cost much. Hence, our bottom-up method is more e"cientthan the traditional tableaux method, even though both the methodscan give an algorithm with EXPTIME complexity.

1In [7], we showed that the logic program {!p} does not have any least K-model.This imply that the deterministic positive logic program {["]p} does not have any leastKripke model in PDL(0). The only reason is the non-seriality of PDL(0). It can be shownthat adding the seriality axiom [#]! " ##$! to PDL(0) causes that every positive logicprogram without implicit disjunctions ##! % #!!$ and ##!"$ in heads of program clauseshas a finite least model in the resulting logic.

Page 4: O n th e D eterm in istic H o rn F ra g m en t o f T est ...nguyen/nguyen06aiml.pdf · in P D L (0 ), con stru cts a least p seu d o-m o d el of P . A p seu d o-m o d el is sim ilar

380 Linh Anh Nguyen

L3. The deterministic Horn fragment of PDL(0) eliminates nondetermin-ism (of PDL(0)). How much important is this property? In [6], Hus-tadt et al. proved that the data complexity of query answering inthe Horn fragment Horn-SHIQ of the description logic SHIQ is inPTIME, while in the full description logic SHIQ it is complete incoNP.2 Here, we can also prove that the data complexity of queryanswering in the deterministic Horn fragment of the PDL(0)-like de-scription logic is in PTIME (see Section 6 for more details). This isan interesting property for practical applications. Also note that ourdeterministic Horn fragment of PDL(0) is more relaxed than the Horn-SHIQ fragment in the aspect that the constructor )R.C (a ["]-likeconstructor) is disallowed in bodies of program clauses and queries ofHorn-SHIQ, while we allow ["] in the form ["]# to appear in bodiesof program clauses and queries of the deterministic Horn fragment ofPDL(0).

L4. As mentioned earlier, we can extend the method of this work for deal-ing with logic programming in PDL(0).

Our algorithm uses formulae with automaton-modal operators, which aresimilar to formulae of automaton propositional dynamic logic (APDL) [5].In [4], Gore and Nguyen also used such formulae for developing analytictableau calculi with the superformula property for regular grammar logics.In both [4] and this work, formulae with automaton-modal operators areused to record the potentiality inherited from predecessor worlds, whichguarantees that when a world w is created from u, the content of w can becomputed from the content of u. This technique plays an essential role inconstructing finite models.

The rest of this paper is structured as follows. In Section 2, we definePDL(0), the deterministic Horn fragment of PDL(0), automaton-modal op-erators, pseudo-models, and introduce an ordering of pseudo-models. InSection 3, we present our algorithm. In Section 4, we give characterizationsof least pseudo-models of deterministic positive logic programs in PDL(0).In Section 5, we study the lower bound of sizes of such pseudo-models.Further work and concluding remarks are given in Section 6.

2 Preliminaries

2.1 Test-free Propositional Dynamic Logic

The language of test-free propositional dynamic logic (PDL(0)) is built fromtwo disjoint sets: #0 is a countable set of atomic programs and $0 is acountable set of atomic propositions. We use # to denote an element of #0

and p to denote an element of $0. Programs and formulae are recursively

2When measuring the data complexity, the TBox of the considered knowledge base istreated as the intensional part, while the ABox is treated as the extensional part.

Page 5: O n th e D eterm in istic H o rn F ra g m en t o f T est ...nguyen/nguyen06aiml.pdf · in P D L (0 ), con stru cts a least p seu d o-m o d el of P . A p seu d o-m o d el is sim ilar

On the Deterministic Horn Fragment of Test-free PDL 381

defined using the BNF grammar below:

# * " ::= # | " ( " | ";" | ""

$ * ! ::= ! | p | ¬! | ! % ! | ! + ! | !" ! | ["]! | &"'!

(The version PDL with test contains also the construction !? as a pro-gram.3) We use ", $, % to denote elements of #. A word #1 . . .#k overalphabet #0 will also be treated as the program #1; . . . ;#k. An operator ["]is called a universal modal operator, while &"' is called an existential modaloperator.

A program of PDL(0) is a regular expression over the alphabet #0.Such an expression " generates a regular language L(") specified as fol-lows: L(#) = {#}, L(" ( "!) = L(") ( L("!), L(";"!) = L(").L("!), andL("") = (L("))", where if L and M are sets of words then L.M = {$% |$ , L,% , M} and L" =

!n$0 Ln with L0 = {&} and Ln+1 = L.Ln, where

& denotes the empty word.The semantics of PDL(0) comes from the semantics of modal logic. The

structures over which programs and formulae of PDL(0) are interpreted arecalled Kripke structures. A Kripke structure, also called a (Kripke) model,is a tuple M = &W, ', (R!)!%"0 , h', where W is a set of states, ' , W is thecurrent state, R! for # , #0 is a binary relation on W (representing theset of input/output pairs of states of the program #), and h is a functionmapping states to sets of atomic propositions. For w ,W , the set of atomicpropositions “true” at w is h(w).

Given a Kripke model M = &W, ', (R!)!%"0 , h', define R"&"! = R"(R"! ,R";"! = R"-R"! , R"" = R"

", where R"" =

!n$0 Rn

" with R0" = {(w, w) | w ,

W} and Rn+1" = R"-Rn

" . It is easily seen that for " , #, R" =!

#%L(") R#.Given a Kripke model M = &W, ', (R!)!%"0 , h', a state w , W , and a

formula !, the satisfaction relation M, w |= ! is defined as usual for theclassical connectives and that:

M, w |= p i! p , h(w)

M, w |= ["]! i! )v , W.R"(w, v) implies M, v |= !

M, w |= &"'! i! .v , W.R"(w, v) and M, v |= !

We say that M satisfies ! and ! is true in M , written M |= !, if M, ' |=!. Let % be a formula set. We write M |= % to denote that M |= ! forevery ! , %. If M |= % then we call M a model of % and say that % issatisfiable. We write % |= ! to denote that every model of % satisfies !.

2.2 The Deterministic Horn Fragment of PDL(0)

We extend the primitive language with universal modal operators ["]#,which have the same role as the modal operator ! discussed in the In-troduction. The semantics of ["]# is defined as follows: M, w |= ["]#!

3The semantics of !? w.r.t. a Kripke model M = #W, $, (R!)!#"0 , h$ is specified byR"? = {(w, w) | M, w |= !}.

Page 6: O n th e D eterm in istic H o rn F ra g m en t o f T est ...nguyen/nguyen06aiml.pdf · in P D L (0 ), con stru cts a least p seu d o-m o d el of P . A p seu d o-m o d el is sim ilar

382 Linh Anh Nguyen

i! M, w |= ["]! and for every $,% , #"0, # , #0, if $#% , L(") then

M, w |= [$]&#'!.Note that [#]#! $ [#]! % &#'! like the case of !, but in general we do

not have that ["]#! $ ["]!%&"'!. Informally, &"'! means that there existsa run of " (with the stop property), while the additional condition of ["]#(w.r.t. ["]) means that every partial run of " is not blocked. Also note thatformulae of the form ["]#! are expressible in PDL(0).4

A positive formula is a formula (in the extended language) without theconnectives " and ¬. A serial positive formula is a positive formula whichmay contain modal operators &"' and ["]# but not ["] (and [A] defined laterfor a finite automaton A).

A deterministic Horn formula in PDL(0) is a formula of one of the forms:

• ! or an atomic proposition;

• ¬! or ! " (, where ! is a serial positive formula and ( is a deter-ministic Horn formula;

• ! % (, where ! and ( are deterministic Horn formulae;

• ["]! or ["]#!, where ! is a deterministic Horn formula;

• &"'!, where ! is a deterministic Horn formula and " is a programwithout ( and ".

A deterministic program clause in PDL(0) is a formula of one of the forms:

B1 % . . . %Bn " A

["](B1 % . . . %Bn " A)

and a deterministic negative clause in PDL(0) is a formula of one of theforms:

B1 % . . . %Bn " /

["](B1 % . . . %Bn " /)

where n 0 0, B1, . . . , Bn are formulae of the form p, [$]#p, [$]#!, &$'p,or &$'!, A is a formula of the form p, [$]p, &%'p, or &%'!, where % is aprogram without ( and ", and / denotes ¬!.

A deterministic Horn clause in PDL(0) is either a deterministic programclause or a deterministic negative clause. (This notion is used for Proposi-tion 1 and Corollary 2 given below.)

A deterministic positive logic program in PDL(0) is a finite set of deter-ministic program clauses.

4Let A = #"0, Q, qI , %, F $ be a deterministic finite automaton equivalent to #. LetS & Q'"0 be the set of pairs (q, ") such that %(q, ") is productive in A. For (q, ") ( S,let #q,! be the regular expression equivalent to the automaton #"0, Q, qI , %, {q}$. Then[#]$! is expressible in PDL(0) as [#]! )

V

(q,!)#S[#q,!]#"$*.

Page 7: O n th e D eterm in istic H o rn F ra g m en t o f T est ...nguyen/nguyen06aiml.pdf · in P D L (0 ), con stru cts a least p seu d o-m o d el of P . A p seu d o-m o d el is sim ilar

On the Deterministic Horn Fragment of Test-free PDL 383

PROPOSITION 1. Every set of deterministic Horn formulae can be trans-formed into a set of deterministic Horn clauses preserving satisfiability.

Sketch of the proof Apply the technique of [7], which is based on replacinga complex formula by a fresh atomic proposition and adding a formuladefining that atomic proposition. For example, ["](["!]#! " (), where! is not ! or an atomic proposition, is replaced by ["](["!]#p " () and[";"!](!" p), where p is a fresh atom proposition. !

COROLLARY 2. Every finite set % of deterministic Horn formulae canbe transformed into a deterministic positive logic program P and a serialpositive formula ! such that % is unsatisfiable i! P |= !.

For the proof, just note that ["](B1 % . . .%Bn " /) $ ¬&"'(B1 % . . .%Bn).

2.3 Automaton-Modal Operators

Recall that a finite automaton A is a tuple &&, Q, I, ), F ', where & is thealphabet, Q is a finite set of states, I 1 Q is the set of initial states, ) 1Q2&2Q is the transition relation, and F 1 Q is the set of accepting states.A run of A on a word #1 . . .#k is a finite sequence of states q0, q1, . . . , qk

such that q0 , I and )(qi'1,#i, qi) holds for every 1 3 i 3 k. It is anaccepting run if qk , F . We say that A accepts word w if there exists anaccepting run of A on w. The set of all words accepted/recognized by A isdenoted by L(A).

If A is a finite automaton then we call [A] a (universal) automaton-modaloperator. If A is a finite automaton and ! is a formula in the primitivelanguage, i.e. ! , $, then we call [A]! a formula in the extended language.

The semantics of formulae with automaton-modal operators are de-fined as follows: M, w0 |= [A]! if M, wk |= ! for every pathw0R!1w1 . . . wk'1R!k

wk with k 0 0 and #1 . . .#k , L(A).It is well known that every regular expression " is equivalent to a finite

automaton A (with the same alphabet) in the sense that L(") = L(A). Itis easy to see that if " is equivalent to A then M, w |= ["]! i! M, w |= [A]!.For every regular expression ", let A" = &#0, Q", I", )", F"' be a fixed finiteautomaton equivalent to ". A" can be constructed from " in linear time.We assume that every state of Q" is reachable from some state of I" via apath using the transition relation )".

If A is a finite automaton and Q is a subset of the states of A, thenby (A, Q) we denote the finite automaton obtained from A by using Q asthe set of initial states, and we will write [A, Q] for the automaton-modaloperator [(A, Q)].

For a finite automaton A = &#0, QA, IA, )A, FA' and $ , #"0, define

)A(Q,#) = {q! | .q , Q.(q,#, q!) , )A},

")A(Q, &) = Q,

")A(Q,$#) = )A(")A(Q,$),#).

Page 8: O n th e D eterm in istic H o rn F ra g m en t o f T est ...nguyen/nguyen06aiml.pdf · in P D L (0 ), con stru cts a least p seu d o-m o d el of P . A p seu d o-m o d el is sim ilar

384 Linh Anh Nguyen

We have that M, w0 |= [A, Q]! i! M, wk |= ! for every path

w0R!1w1 . . . wk'1R!kwk with k 0 0 and ")A(Q,#1 . . .#k) 4 FA 5= 6.

2.4 Pseudo-models for Dealing with Non-seriality

A pseudo-model is a tuple M = &W, ', (R!)!%"0 , (S!)!%"0 , h', which is sim-ilar to a model except that for every # , #0, there are two accessibilityrelations R! and S!. We require that R! 1 S! for every # , #0. Theaccessibility relations R!, resp. S!, are used to deal with existential, resp.universal, modal operators.

Given a pseudo-model M = &W, ', (R!)!%"0 , (S!)!%"0 , h', for " , #,define S" analogously as for R"; and for w ,W , define the relation M, w |=! in the usual way for classical connectives and:

• M, w |= &"'! i! there exists v ,W such that R"(w, v) and M, v |= !;

• M, w |= ["]! i! for every v , W , S"(w, v) implies M, v |= !;

• M, w |= ["]#! i! M, w |= ["]! and for every $,% , #"0, # , #0, if

$#% , L(") then M, w |= [$]&#'!;

• M, w |= [A]! i! M, wk |= ! for every path w0S!1w1 . . . wk'1S!kwk

with k 0 0 and #1 . . .#k , L(A).

Other related definitions remain unchanged.If M |= % then we say that M is a pseudo-model of %.Every model is also a pseudo-model, with S! = R! for every # , #0.

PROPOSITION 3. The problem of checking M |= ! for a given pseudo-model M and a given formula ! is solvable in polynomial time in the sizesof M and !.

This proposition can be proved by induction on the construction of !.To deal with modal operators, we can run corresponding automata alongpaths in M .

2.5 Ordering Pseudo-models

In [7] we introduced an ordering between Kripke models. In this subsection,we provide an analogue for ordering pseudo-models. A pseudo-model M issaid to be less than or equal to a pseudo-model M !, write M 3 M !, if forevery positive formula ! (in the extended language with ["]# and [A]), ifM |= ! then M ! |= !. This relation 3 is a pre-order.5 We write M $ M !

to denote that M 3M ! and M ! 3 M .A pseudo-model M is a least pseudo-model of a deterministic positive

logic program P if M |= P and M 3 M ! for every pseudo-model M ! of P .Let M = &W, ', (R!)!%"0 , (S!)!%"0 , h' and M ! = &W !, ' !, (R!

!)!%"0 ,(S!

!)!%"0 , h!' be pseudo-models. We say that M is less than or equal to M !

w.r.t. a binary relation r 1 W 2W !, and write M 3r M !, if the followingconditions hold:

5i.e. a reflexive and transitive binary relation

Page 9: O n th e D eterm in istic H o rn F ra g m en t o f T est ...nguyen/nguyen06aiml.pdf · in P D L (0 ), con stru cts a least p seu d o-m o d el of P . A p seu d o-m o d el is sim ilar

On the Deterministic Horn Fragment of Test-free PDL 385

L1. r(', ' !)

L2. )# , #0 )x, x!, y R!(x, y) % r(x, x!)" .y! R!!(x!, y!) % r(y, y!)

L3. )# , #0 )x, x!, y! S!!(x!, y!) % r(x, x!) " .y S!(x, y) % r(y, y!)

L4. )x, x! r(x, x!)" h(x) 1 h(x!)

In the above definition, the first three conditions state that r is a forward-backward bisimulation of the frames of M and M !.6 Intuitively, r(x, x!)states that the state x is less than or equal to x!.

LEMMA 4. If M 3r M ! then M 3 M !.

Proof. Let M = &W, ', (R!)!%"0 , (S!)!%"0 , h' and M ! = &W !, ' !,(R!

!)!%"0 , (S!!)!%"0 , h!' be pseudo-models and suppose that M 3r M !. We

prove that for every positive formula ! and every u, u! such that r(u, u!), ifM, u |= ! then M !, u! |= !. We do this by induction on the construction of!. Suppose that r(u, u!) holds and M, u |= !.

The cases when ! = p or ! = ( % * or ! = ( + * are trivial.Case ! = &"'(: Since M, u |= &"'(, there exists v ,W such that R"(u, v)

holds and M, v |= (. There exist #1, . . . ,#k , #0 such that #1 . . .#k , L(")and R!1;...;!k

(u, v) holds. Let u0 = u, u1, . . . , uk'1, uk = v be states suchthat R!i(ui'1, ui) holds for 1 3 i 3 k. Let u!

0 = u!. For every 1 3 i 3 k, bythe condition L2, there exists a state u!

i , W ! such that R!!i

(u!i'1, u

!i) and

r(ui, u!i) hold. Hence, R!

"(u!, v!) and r(v, v!) hold for v = u!k. Since r(v, v!)

holds and M, v |= (, by the inductive assumption, M !, v! |= (. HenceM !, u! |= &"'(.

Case ! = ["](: Let v! be an arbitrary state of W ! such that S!"(u!, v!)

holds. There exist #1, . . . ,#k , #0 such that #1 . . .#k , L(") andS!

!1;...;!k(u!, v!) holds. Let u!

0 = u!, u!1, . . . , u!

k'1, u!k = v! be states such

that S!!i

(u!i'1, u

!i) holds for 1 3 i 3 k. Let u0 = u. For every 1 3 i 3 k, by

the condition L3, there exists a state ui , W such that S!i(ui'1, ui) andr(ui, u!

i) hold. Hence, S"(u, v) and r(v, v!) hold for v = uk. Since S"(u, v)holds and M, u |= ["](, we have that M, v |= (. Since r(v, v!) holds andM, v |= (, by the inductive assumption, M !, v! |= (. Hence M !, u! |= ["](.

The case ! = [A]( is similar to the case ! = ["](.The proof for the case ! = ["]#( is a combination of the proofs of the

case ! = ["]( and the case ! = &"'(. !

3 Constructing Finite Least Pseudo-models

In this section, we present an algorithm that, given a deterministic positivelogic program P in PDL(0), constructs a finite least pseudo-model of P .

Let X be a set of formulae, which may contain modal operators of theform ["]# or [A, Q]. The saturation of X , denoted by Sat(X), is defined tobe the least extension of X such that:

6The condition L2 corresponds to the forward direction, while the condition L3 cor-responds to the backward direction.

Page 10: O n th e D eterm in istic H o rn F ra g m en t o f T est ...nguyen/nguyen06aiml.pdf · in P D L (0 ), con stru cts a least p seu d o-m o d el of P . A p seu d o-m o d el is sim ilar

386 Linh Anh Nguyen

• ! , Sat(X),

• if &";"!'! , Sat(X) then &"'&"!'! , Sat(X),

• if ["]! , Sat(X) then [A", I"]! , Sat(X),

• if [A", Q]! , Sat(X) and Q 4 F" 5= 6 then ! , Sat(X).

The transfer of X through &#', where # , #0, is defined as follows:

Trans(X,#) = Sat({[A", )"(Q,#)]! | [A", Q]! , X}).

The compact form CF(X) of X is the least set of formulae obtained asfollows:

• if ! , X and ! is not of the form [A", Q]! then ! , CF(X),

• if [A", Q]! , X and Q1, . . . , Qk are all the sets such that [A" , Qi]! ,X for 1 3 i 3 k, then [A", Q1 ( . . . (Qk]! , CF(X).

We use the following data structures:

• W : a set of states, where ' ,W is the current state.

• H : for every w , W , H(w) is a set of formulae called the contentof w.

• Next : W 2 {&#'! | # , #0, ! , $} " W , a partial function inter-preted as follows: Next(u, &#'!) = v means &#'! , H(u), ! , H(v),and &#'! is “realized” at u by going to v via R!.

• NextS : W 2#0 "W , where NextS(u,#) = v implies S!(u, v).

Using the above data structures, we define:

• h to be the restriction of H such that h(u) = H(u) 4 $0 for u ,W ;

• R!, for # , #0, to be {(u, v) | Next(u, &#'!) = v for some !};

• S!, for # , #0, to be R! ( {(u, v) | NextS(u,#) = v};

• M = &W, ', (R!)!%"0 , (S!)!%"0 , h'.

In the algorithm given below, we use the function Find(X) defined asfollows: if there exists a state u , W with H(u) = X then return u, elseadd a new state u to W with H(u) = X and return u.

A pseudo-model of P is constructed by building a “pseudo-model graph”for P . At the beginning the pseudo-model graph contains only one statewith content P . Then for every state u and every formula ! belonging tothe content of u, if ! is not true at u then the algorithm makes a change tosatisfy it. There are three main forms for !: [A", Q](, (B1% . . .%Bk " A),and &#'( (the form ["]( is reduced to [A" , I"](, and the form &"'( isreduced to &#'(!). For the case when ! is of the form [A", Q](, for every

Page 11: O n th e D eterm in istic H o rn F ra g m en t o f T est ...nguyen/nguyen06aiml.pdf · in P D L (0 ), con stru cts a least p seu d o-m o d el of P . A p seu d o-m o d el is sim ilar

On the Deterministic Horn Fragment of Test-free PDL 387

# , #0, we would like to add [A", )"(Q,#)]( to the content of every statew accessible from u via S!. But such an action may a!ect other statesinvolved with w. So, instead of adding the formula to the content of w, wediscard the connection S!(u, w) and connect u via S! (in an appropriateway using Next or NextS) to a state w" with an appropriate content, whichis created if necessary. That is we use w" to replace the role of w. For thecase of (B1 % . . .%Bk " A), if all B1, . . . , Bk are “certainly” true at u (thetruth of ["]#p at u is checked in a special way) then we would like to addA to the content of u. But analogously as for the previous case, insteadof modifying the content of u, we just redirect connections appropriately.States are cached and never deleted. For the case when ! is of the form&#'(, to satisfy ! at u, we connect u via R! to the state with contentconsisting of ( and the formulae “inherited” from u via R!. To guaranteethe constructed pseudo-model to be smallest, for every u ,W and # , #0,we connect u via S! using NextS to the state with content inherited from uvia S!. Such connections are also useful for checking the truth of formulaeof the form ["]#p in a state.

ALGORITHM 5.Input: A deterministic positive logic program P in PDL(0).Output: M = &W, ', (R!)!%"0 , (S!)!%"0 , h' :

a finite least pseudo-model of P .

L1. W := {'}; H(') := CF(Sat(P ));

L2. for every u ,W and every ! , H(u)

(a) case ! = [A", Q]( :for every w , W and # , #0 such that S!(u, w) holds:

i. w" := Find(CF(H(w) ( Trans({!},#)));

ii. for every + , $,if Next(u, &#'+) = w then Next(u, &#'+) := w";

iii. if NextS(u,#) = w then NextS(u,#) := w";

(b) case ! = (B1 % . . . %Bk " A) :if

for every 1 3 i 3 k, M, u |= Bi and if Bi = ["]#p then forevery w , W and # , #0, if S#(u, w) holds and $#% , L(")for some $,% , #"

0, then NextS(w,#) is defined,

then

i. u" := Find(CF(H(u) ( Sat({A})));

ii. for every v , W , # , #0, and ( , $,if Next(v, &#'() = u then Next(v, &#'() := u";

iii. for every v , W and # , #0,if NextS(v,#) = u then NextS(v,#) := u";

iv. if ' = u then ' := u";

Page 12: O n th e D eterm in istic H o rn F ra g m en t o f T est ...nguyen/nguyen06aiml.pdf · in P D L (0 ), con stru cts a least p seu d o-m o d el of P . A p seu d o-m o d el is sim ilar

388 Linh Anh Nguyen

(c) case ! = &#'( :if Next(u, &#'() is not defined then

Next(u, &#'() := Find(CF(Trans(H(u),#) ( Sat({(})));

L3. for every u ,W and every # , #0,if NextS(u,#) is not defined then

NextS(u,#) := Find(CF(Trans(H(u),#)));

L4. while some change occurred, go to step L2.

PROPOSITION 6. Algorithm 5 terminates in 2O(n2) steps and returns apseudo-model with 2O(n2) states, where n is the size of P (i.e. the sum ofthe lengths of the clauses of P ).

Proof. For each u , W and ! , H(u), there are three cases: i) ! is asubformula of a clause of P , ii) ! is a formula of the form [A", Q]( with["]( being a subformula of a clause of P , iii) ! is a formula of the form &"'(,where ( is a subformula of a clause of P and " is a subprogram occurringin P . There are less than n possible values for ( and ", and less than 2n

possible values for Q. Hence, due to the compact form, there are no morethan 2O(n2) possible values for H(u). Since the states of W have di!erent

contents, the size of W is 2O(n2).The if condition of the step L2b can be checked in 2O(n2) steps.The steps L2c and L3 make a change no more than 2O(n2).n.n = 2O(n2)

times. For the steps L2a and L2b, note that the content of u" (resp. w")is “bigger” than the content of u (resp. w). Hence Next and NextS are

modified by the steps L2a or L2b no more than 2O(n2).n.n.2O(n2) = 2O(n2)

times, and ' is modified no more than 2O(n2) times.Therefore, Algorithm 5 terminates in 2O(n2) steps and returns a pseudo-

model with 2O(n2) states, where each state is of size O(n). !

LEMMA 7. Let P be a deterministic positive logic program in PDL(0) andM the pseudo-model constructed by Algorithm 5 for P . Then M |= P .

Proof. We will refer to the data structures used in Algorithm 5.For u, u! , W , we write H(u) 3 H(u!) to denote that, for every ! , H(u),

either ! , H(u!) or ! = [A" , Q]( and there exists [A" , Q!]( , H(u!) withQ! 7 Q. Observe that, for every v,#,(, if Next(v, &#'() or NextS(v,#)changes its current value from u to u! then H(u) 3 H(u!).

To prove that M |= P , we show that for every u , W reachable from 'via a path using the accessibility relations (S!)!%"0 and for every formula! , H(u) without automaton-modal operators, M, u |= !. We prove thisby induction on the structure of !.

Consider the case when ! = ["](. Suppose that S"(u, w) holds. By theinductive assumption, it is su"cient to show that ( , H(w). There existw0, . . . , wk in W with w0 = u, wk = w, and #1, . . . ,#k , #0 such that#1 . . .#k , L(") and S!i(wi'1, wi) holds for 1 3 i 3 k. Since ["]( , H(w0),

Page 13: O n th e D eterm in istic H o rn F ra g m en t o f T est ...nguyen/nguyen06aiml.pdf · in P D L (0 ), con stru cts a least p seu d o-m o d el of P . A p seu d o-m o d el is sim ilar

On the Deterministic Horn Fragment of Test-free PDL 389

we have [A" , Q]( , H(w0) for some Q 7 I" . Hence, for every 1 3 i 3 k,

there exists [A" , Qi]( , H(wi) with Qi 7 #)"(I" ,#1 . . .#i). Since #1 . . .#k ,L("), #)"(I" ,#1 . . .#k) 4 F" 5= 6, and hence Qk 4 F" 5= 6 and ( , H(w).

Consider the case when ! = (B1 % . . . % Bk " A) and the steps L2(b)ii,L2(b)iii, L2(b)iv are executed. As no changes occur (at the end) and u isreachable from ' via a path using the accessibility relations (S!)!%"0 , wehave that u" = u. Thus, by the inductive assumption, M, u |= A, and henceM, u |= !.

The case ! = &"'( is reduced to the case ! = &#'(!, which is trivial. !

LEMMA 8. Let P be a deterministic positive logic program in PDL(0) andM ! = &W !, ' !, (R!

!)!%"0 , (S!!)!%"0 , h

!' be an arbitrary pseudo-model of P .Consider a moment after executing a numerated step in an execution ofAlgorithm 5 for P . Let r = {(x, x!) , W 2W ! | M !, x! |= H(x)}. Then thefollowing conditions hold:

• r(', ' !)

• )x, y, x!, y!,#,(r(x, x!)%(Next(x, &#'() = y)%R!

!(x!, y!)%(M !, y! |= () " r(y, y!)

• )x, y, x!, y!,# r(x, x!) % (NextS(x,#) = y) % S!!(x!, y!) " r(y, y!)

Proof. By induction on the number of executed steps.The base case occurs after executing step L1 and the assertions clearly

hold. Consider some latter step of the algorithm. As induction hypothesis,assume that the assertions hold before executing that step. Suppose thatafter executing the step we have r2, W2, H2, Next2, NextS2, R2,!, S2,! (for# , #0), and M2 in the places of r, W , H , Next, NextS , R!, S!, and M .We prove that:

• r2(', ' !)

• )x, y, x!, y!,#,(r2(x, x!) % (Next2(x, &#'() = y) %R!

!(x!, y!) % (M !, y! |= ()"r2(y, y!)

• )x, y, x!, y!,# r2(x, x!) % (NextS2(x,#) = y) % S!!(x!, y!) " r2(y, y!)

It su"ces to consider steps L2(a)ii, L2(a)iii, L2(b)ii-L2(b)iv, L2c, and L3.Consider the step L2(a)ii. It su"ces to show that if r(u, u!) %

(Next(u, &#'() = w) % R!!(u!, w!) % (M !, w! |= () then M !, w! |= H(w").

Suppose that the premise holds. By the inductive assumption, r(w, w!)holds and M !, w! |= H(w). Since r(u, u!) holds and [A", Q]( , H(u),we have that M !, u! |= [A" , Q](. Hence M !, w! |= [A" , )"(Q,#)]( (sinceR!

!(u!, w!) holds). Hence M !, w! |= H(w").Consider the step L2(a)iii. It su"ces to show that if r(u, u!) %

(NextS(u,#) = w) % S!!(u!, w!) holds then M !, w! |= H(w"). This can

be proved analogously as for the step L2(a)ii.

Page 14: O n th e D eterm in istic H o rn F ra g m en t o f T est ...nguyen/nguyen06aiml.pdf · in P D L (0 ), con stru cts a least p seu d o-m o d el of P . A p seu d o-m o d el is sim ilar

390 Linh Anh Nguyen

Consider the steps L2(b)ii-L2(b)iv. Let u! be a state of W ! such thatr(u, u!) holds. It is su"cient to show that r2(u", u!) holds. We need only toshow that M !, u! |= A. Since r(u, u!) holds, M !, u! |= (B1 % . . . %Bk " A).Hence, it is su"cient to show that M !, u! |= Bi for every 1 3 i 3 k. Fixsuch an index i. There are three cases to consider:

• Case Bi = p : Since M, u |= Bi, we have that p , H(u). Since r(u, u!)holds, it follows that M !, u! |= Bi.

• Case Bi = &"'p : There exists w , W such that R"(u, w) holds andp , H(w). Thus, there exist w0, . . . , wk in W with w0 = u, wk = w,and #1, . . . ,#k , #0 such that #1 . . .#k , L(") and R!i(wi'1, wi)holds for 1 3 i 3 k. Let (1, . . . ,(k be formulae such thatNext(wi'1, &#i'(i) = wi for 1 3 i 3 k. Let w!

0 = u. Since r(w0, w!0)

holds and &#1'(1 , H(w0), we have that M !, w!0 |= &#1'(1. Hence,

there exists w!1 , W ! such that R!

!1(w!

0, w!1) holds and M !, w!

1 |= (1.By the inductive assumption, r(w1, w!

1) holds. Analogously, there ex-ist w!

2, . . . , w!k , W ! such that R!

!i(w!

i'1, w!i) and r(wi, w!

i) hold for ev-ery 1 3 i 3 k. Thus R!

"(w!0, w

!k) holds. Since p , H(w), w = wk, and

r(wk, w!k) holds, we have M !, w!

k |= p. It follows that M !, w!0 |= &"'p,

which means M !, u! |= Bi.

• Case Bi = ["]#p :

– We first show that M !, u! |= ["]p. Suppose that S!"(u!, w!) holds.

There exist #1, . . . ,#k , #0 and w!0 = u!, w!

1, . . . , w!k , W ! such

that #1 . . .#k , L(") and S!!i

(w!i'1, w

!i) holds for every 1 3 i 3 k.

Let w0 = u and wi = NextS(wi'1,#i) for 1 3 i 3 k. The “if”condition of step L2b guarantees the existence of the states wi.By the inductive assumption, r(wi, w!

i) holds for 1 3 i 3 k. SinceM, u |= ["]#p, we have that p , H(wk). Since r(wk, w!

k) holds, itfollows that M !, w!

k |= p, which means M !, w! |= p. This impliesthat M !, u! |= ["]p.

– Suppose that $#% , L(") and S!#(u!, w!) holds, where $,% , #"

0

and # , #0. We show that M !, w! |= &#'!. Let $ = #1 . . .#k.There exist w!

0, . . . , w!k such that w!

0 = u!, w!k = w!, S!

!i(w!

i'1, w!i)

holds for every 1 3 i 3 k. Let w0 = u and wi = NextS(wi'1,#i)for 1 3 i 3 k. The “if” condition of step L2b guarantees theexistence of the states wi. By the inductive assumption, r(wi, w!

i)holds for 1 3 i 3 k. Since M, u |= ["]#p, we have that M, wk |=&#'!. Hence there exists v , W such that R!(wk, v) holds.Thus v = Next(wk, &#'*) for some *, and &#'* , H(wk). Sincer(wk , w!

k) holds, by the definition of r, M !, w!k |= &#'*. Hence

M !, w! |= &#'!.

Consider the step L2c. Let w denote the state Find(CF(Trans(H(u),#) (Sat({(}))). Suppose that r(u, u!) and R!

!(u!, w!) hold and M !, w! |= (. Itsu"ces to show that M !, w! |= H2(w). Since r(u, u!) holds, M !, u! |= H(u).

Page 15: O n th e D eterm in istic H o rn F ra g m en t o f T est ...nguyen/nguyen06aiml.pdf · in P D L (0 ), con stru cts a least p seu d o-m o d el of P . A p seu d o-m o d el is sim ilar

On the Deterministic Horn Fragment of Test-free PDL 391

It follows that M !, w! |= Trans(H(u),#) (since R!!(u!, w!) holds). Hence

M !, w! |= H2(w).Consider the step L3. Let w denote the state Find(CF(Trans(H(u),#))).

Suppose that r(u, u!) and S!!(u!, w!) hold. It su"ces to show that M !, w! |=

H2(w). Since r(u, u!) holds, M !, u! |= H(u). It follows that M !, w! |=Trans(H(u),#) (since S!

!(u!, w!) holds). Hence M !, w! |= H2(w). !

LEMMA 9. Let P be a deterministic positive logic program in PDL(0), Mbe the pseudo-model constructed by Algorithm 5 for P , and M ! = &W !, ' !,(R!

!)!%"0 , (S!!)!%"0 , h!' be an arbitrary pseudo-model of P . Then M 3M !.

In particular, if r is the relation defined as in Lemma 8, then M 3r M !.

Proof. We will refer to the data structures used in Algorithm 5. Let r bethe relation specified in Lemma 8 for the end of an execution of Algorithm 5for P . By definition, )x, x! r(x, x!) " h(x) 1 h(x!) is true. By Lemma 8,r(', ' !) holds.

We prove that )#, x, x!, y R!(x, y) % r(x, x!) " .y! R!!(x!, y!) % r(y, y!).

Suppose that R!(x, y) and r(x, x!) hold. There exists * such that y =Next(x, &#'*). We have that &#'* , H(x). Since r(x, x!) holds, M !, x! |=&#'*. There thus exists y! , W ! such that R!

!(x!, y!) holds and M !, y! |= *.By Lemma 8, r(y, y!) holds.

We now prove that )#, x, x!, y! S!!(x!, y!)%r(x, x!)" .y S!(x, y)%r(y, y!).

Suppose that S!!(x!, y!) and r(x, x!) hold. Let y = NextS(x,#). By

Lemma 8, r(y, y!) holds.We have prove that M 3r M !. Therefore M 3M !. !

THEOREM 10. Let P be a deterministic positive logic program in PDL(0).The pseudo-model M constructed by Algorithm 5 for P is a least pseudo-model of P .

This theorem follows from Lemmas 7 and 9.

4 Characterizations of Least Pseudo-models

In classical propositional logic, if M is the least model of a positive logicprogram P then for every positive formula !, P |= ! i! M |= !. Similarly,in a basic serial monomodal logic L, if M is a least L-model of a positivemodal logic program P then for every positive (modal) formula !, P |=L !i! M |= ! (see [7]). In this section, we extend such an assertion for thedeterministic Horn fragment of PDL(0). The main result says that if P is adeterministic positive logic program in PDL(0), M is a least pseudo-modelof P , and ! is a serial positive formula, then P |= ! i! M |= !.

Given a pseudo-model M = &W, ', (R!)!%"0 , (S!)!%"0 , h', let M ! = &W ,' , (R!

!)!%"0 , (S!!)!%"0 , h' be the pseudo-model specified as follows:

R!! = R! ( {(u, w) | S!(u, w) and R!(u, w!) hold for some w!},

S!! = S! \ {(u, w) | w ,W and R!(u, w!) does not hold for any w!}.

Page 16: O n th e D eterm in istic H o rn F ra g m en t o f T est ...nguyen/nguyen06aiml.pdf · in P D L (0 ), con stru cts a least p seu d o-m o d el of P . A p seu d o-m o d el is sim ilar

392 Linh Anh Nguyen

Thus, R!! = S!

! for every # , #0, and M ! can be treated as a Kripke model.We call M ! the model corresponding to M .

LEMMA 11. Let P be a deterministic positive logic program in PDL(0), Mthe pseudo-model constructed by Algorithm 5 for P , M ! the model corre-sponding to M , and ! a serial positive formula. If M ! |= ! then M |= !.

Proof. We will refer to the data structures used by Algorithm 5 for P andM . Let r = {(x, x!) , W 2W | M, x! |= H(x)}. By Lemma 8, we havethat:

(i) r(', ')

(ii) )x, y, x!, y!,#,(r(x, x!)%(Next(x, &#'() = y)%R!(x!, y!)%(M, y! |= () " r(y, y!)

(iii) )x, y, x!, y!,# r(x, x!) % (NextS(x,#) = y) % S!(x!, y!) " r(y, y!)

and by Lemma 9, M 3r M .Let M ! = &W , ' , (R!

!)!%"0 , (S!!)!%"0 , h'. It su"ces to prove by induc-

tion on the construction of ! that, for every x, x! ,W , if r(x, x!) holds andM !, x |= ! then M, x! |= !. Suppose that r(x, x!) holds and M !, x |= !.

• Case ! = p : Since M !, x |= !, we have that p , h(x). Since M 3r Mand r(x, x!) holds, we derive that p , h(x!). Hence M, x! |= p.

• Case ! = ( + * or ! = ( % * is trivial.

• Case ! = ["]#( : Since M !, x |= ["]#(, for every $,% , #"0, # , #0, if

$#% , L(") and S!#(x, y) holds, then R!

!(y, z!) holds for some z!, andhence R!(y, z) holds for some z. It follows that, for every $,% , #"

0

and # , #0, if $#% , L(") and S#(x, y) holds, then R!(y, z) holdsfor some z and {z | S!

!(y, z)} = {z | S!(y, z)}. This together withM !, x |= ["]#( implies that M, x |= ["]#(. Since M 3r M and r(x, x!)holds, it follows that M, x! |= ["]#(.

• Case ! = &"'( : There exist #1, . . . ,#k , #0 and x0 = x, x1, . . . , xk ,W such that #1 . . .#k , L("), R!

!i(xi'1, xi) holds for 1 3 i 3 k, and

M !, xk |= (. Let x!0 = x!. For 1 3 i 3 k, choose x!

i as follows:

– Case R!i(xi'1, xi) holds and xi = Next(xi'1, &#i'*i) : We havethat &#i'*i , H(xi'1). By the proof of Lemma 7, M, xi'1 |=&#i'*i. Since M 3r M and r(xi'1, x!

i'1) holds, it follows thatM, x!

i'1 |= &#i'*i. Let x!i be a state such that R!i(x

!i'1, x

!i) holds

and M, x!i |= *i. Thus, by (ii), r(xi, x!

i) holds.

– Case R!i(xi'1, xi) does not hold and xi = NextS(xi'1,#i): There must exist *i such that Next(xi'1, &#i'*i) is defined.Choose x!

i as in the above subcase. Thus R!i(x!i'1, x

!i) holds. By

(iii), it follows that r(xi, x!i) holds.

Page 17: O n th e D eterm in istic H o rn F ra g m en t o f T est ...nguyen/nguyen06aiml.pdf · in P D L (0 ), con stru cts a least p seu d o-m o d el of P . A p seu d o-m o d el is sim ilar

On the Deterministic Horn Fragment of Test-free PDL 393

Since r(xk, x!k) holds and M !, xk |= (, by the inductive assumption,

M, x!k |= (. Since R!i(x

!i'1, x

!i) holds for every 1 3 i 3 k, it follows

that M, x!0 |= &"'(, which means M, x! |= !.

!

THEOREM 12. Let P be a deterministic positive logic program in PDL(0),M a least pseudo-model of P , and ! a serial positive formula. Then P |= !i! M |= !.

Proof. Consider the “if” direction. Suppose that M |= !. Let M ! be anarbitrary Kripke model of P . As M ! is also a pseudo-model, we have thatM 3M !. Hence M ! |= !. Therefore P |= !.

Now consider the “only if” direction. Suppose that P |= !.We can assume that M = &W, ', (R!)!%"0 , (S!)!%"0 , h' is the

pseudo-model constructed by Algorithm 5 for P . Let M ! =&W, ', (R!

!)!%"0 , (S!!)!%"0 , h' be the model corresponding to M . It is suf-

ficient to show that M ! |= P , because this implies that M ! |= !, and byLemma 11, M |= !.

Let H be the data structure of Algorithm 5 which specifies the contentsof states of M . To show that M ! |= P , we prove by induction on theconstruction of ! that if ! , H(u) then M !, u |= !. Suppose that ! , H(u).By the proof of Lemma 7, M, u |= !. Using this, the only non-trivial case iswhen ! is of the form B1%. . .%Bk " A. Suppose that M !, u |= B1%. . .%Bk.By Lemma 11, M, u |= B1 % . . . % Bk. Since M, u |= !, it follows thatM, u |= A. This implies that M !, u |= A (because R! 1 R!

! and S!! 1 S!

for every # , #0). Therefore M !, u |= !. This completes the proof. !

COROLLARY 13. Let P be a deterministic positive logic program inPDL(0), M ! the model corresponding to the pseudo-model constructed by Al-gorithm 5 for P , and ! a serial positive formula. Then P |= ! i! M ! |= !.

Proof. By the proof of the above theorem, M ! |= P . Hence, P |= ! impliesM ! |= !. For the conversion, suppose that M ! |= !. Let M be the pseudo-model constructed by Algorithm 5 for P . By Lemma 11, M |= !. Let M !!

be an arbitrary model of P . Since M is a least pseudo-model of P , we havethat M 3M !!, which implies M !! |= !. Hence P |= !. !

5 Lower Bound

Proposition 6 states that, given a deterministic positive logic program P inPDL(0), a finite least pseudo-model of P can be constructed in exponentialtime and it has an exponential size (in the worst case). In this section, wegive an example showing that, in general, this estimation is tight.

Let M and M ! be pseudo-models. Define that M 3# M ! if for everyserial positive formula !, M |= ! implies M ! |= !. Define that M $# M ! ifM 3# M ! and M ! 3# M .

Page 18: O n th e D eterm in istic H o rn F ra g m en t o f T est ...nguyen/nguyen06aiml.pdf · in P D L (0 ), con stru cts a least p seu d o-m o d el of P . A p seu d o-m o d el is sim ilar

394 Linh Anh Nguyen

LEMMA 14. Let M = &W, ', (R!)!%"0 , (S!)!%"0 , h' be a finite pseudo-model such that, for every # , #0, R! is a function, i.e. )x.!yR!(x, y).Let M ! = &W !, ' !, (R!

!)!%"0 , (S!!)!%"0 , h

!' be a finite pseudo-model suchthat M ! $# M . Then for every w , W reachable from ' via a path using(R!)!%"0 there exists w! , W ! such that (M, w) $# (M !, w!).

Proof. We first show that, for every # , #0,

)x, x!, y R!(x, y) % ((M, x) 3# (M !, x!))"

.y! R!!(x!, y!) % ((M, y) 3# (M !, y!))

Suppose that R!(x, y) and (M, x) 3# (M !, x!). We show that there existsy! , W ! such that R!

!(x!, y!) and (M, y) 3# (M !, y!). Suppose oppositelythat for every y! , W ! such that R!

!(x!, y!), (M, y) 3# (M !, y!) does nothold, i.e. there exists a serial positive formula !y! such that M, y |= !y!

but M !, y! ! !y! . Let ! be the conjunction of all such !y! . We haveM, x |= &#'!, while M !, x! ! &#'!, which contradicts the assumption that(M, x) 3# (M !, x!).

Similarly, we also have that, for every # , #0,

)x!, y!, x R!!(x!, y!) % ((M !, x!) 3# (M, x)) "

.y R!(x, y) % ((M !, y!) 3# (M, y))

We now prove the claim of the lemma. It su"ces to prove by induc-tion on k that if R!1...!k

(', wk) holds then there exists w!k , W ! such that

(M, wk) $# (M !, w!k). The base case k = 0 holds for w!

0 = ' !. For the in-duction step, suppose that the hypothesis holds for k, and R!k+1(wk, wk+1)holds for some #k+1 , #0. We show that there exists w!

k+1 ,W ! such that(M, wk+1) $# (M !, w!

k+1). Since (M, wk) 3# (M !, w!k) and R!k+1(wk, wk+1)

holds, by (i), there exists w!k+1 , W ! such that R!

!k+1(w!

k, w!k+1) holds and

(M, wk+1) 3# (M !, w!k+1). On the other hand, since (M !, w!

k) 3# (M, wk)and R!

!k+1(w!

k, w!k+1) holds, by (ii), there exists w!!

k+1 , W such thatR!k+1(wk, w!!

k+1) holds and (M !, w!k+1) 3# (M, w!!

k+1). Since R!k+1 is afunction, w!!

k+1 = wk+1, and hence (M, wk+1) $# (M !, w!k+1). !

PROPOSITION 15. Let #0 = {a, b} and P = {[(a ( b)"; a; (a ( b)(n'1)]p,[(a ( b)"]&a'!, [(a ( b)"]&b'!}. If M ! is a pseudo-model characterizing Pw.r.t. serial positive formulae (i.e. for every serial positive formula !, P |=! i! M ! |= !), then M ! has size 2!(n).

Proof. Let M = &W, ', (R!)!%"0 , (S!)!%"0 , h' be the pseudo-model con-structed by Algorithm 5 for P . It is easy to see that M satisfies the condi-tions stated in Lemma 14.

Let " = (a ( b)"; a; (a ( b)(n'1). For $,% , #"0, define that $ 8 % if

for every , , #"0, $, , L(") i! %, , L("). The equivalence relation 8

has exactly 2n abstract classes. Let $,% , &" and $ " %. There exist w#

Page 19: O n th e D eterm in istic H o rn F ra g m en t o f T est ...nguyen/nguyen06aiml.pdf · in P D L (0 ), con stru cts a least p seu d o-m o d el of P . A p seu d o-m o d el is sim ilar

On the Deterministic Horn Fragment of Test-free PDL 395

and w$ such that R#(', w#) and R$(', w$) hold. Since $ " %, there exists, , #"

0 such that exactly one of $, and %, belongs to L("). Thus, [,]#p istrue at exactly one of the worlds w# and w$ . Hence (M, w#) $#/ (M, w$).This implies that M contains at least 2n states, which are reachable from '(via paths using (R!)!%"0) and not equivalent to each other. By Lemma 14,it follows that M ! has at least 2n states. !

6 Further Work and Conclusions

Recall that if L is one of the basic propositional serial monomodal logicsand P is a positive logic program in L then there exists a finite least L-model of P [7]. To obtain a similar result for PDL(0), we have restricted tothe deterministic Horn fragment and used pseudo-models. The restrictionis necessary to overcome the problem of nondeterminism caused by non-seriality, and pseudo-models are needed because that deterministic positivelogic programs in PDL(0), e.g. {[#]p}, do not always have least Kripke mod-els. Pseudo-models satisfy the following expectations:

• A least pseudo-model M of a deterministic positive logic program Phas the property that for every serial positive formula !, P |= ! i!M |= !.

• Every deterministic positive logic program has a finite least pseudo-model.

• Given a pseudo-model M and a formula !, the problem of checkingM |= ! is solvable in polynomial time in the sizes of M and !.

The model M ! corresponding to the least pseudo-model M constructed byAlgorithm 5 for a deterministic positive logic program P also characterizesP w.r.t. serial positive formulae. However, M is more useful then M ! in theaspect that, for every positive formula !, M |= ! implies P |= ! (becauseM is less than or equal to every (pseudo-)model of P ), while M ! does nothave such a property.

Our Algorithm 5 runs in exponential time and returns a pseudo-modelwith size 2O(n2). We have given a deterministic positive logic programsuch that every pseudo-model characterizing it w.r.t. serial positive formu-lae must have an exponential size. This does not imply that the (com-bined) complexity of checking satisfiability of deterministic Horn formulaeis EXPTIME-complete. It is an open problem.

In the PDL(0)-like description logic (PDL(0)-Desc), programs of PDL(0)

are used as role constructors. A TBox of that logic is a finite set of formulaeof PDL(0), which are treated as global assumptions for all the states (butnot as local assumptions of the current state '). Apart from the TBox,a knowledge base in a description logic contains also an ABox, which is aset of facts of the form p(a) or R(a, b), where p is a “concept”, a and bare “objects”, and R is a “role name”. In the terminology of PDL, p isan atomic proposition, a and b are states, and R can be assumed to be

Page 20: O n th e D eterm in istic H o rn F ra g m en t o f T est ...nguyen/nguyen06aiml.pdf · in P D L (0 ), con stru cts a least p seu d o-m o d el of P . A p seu d o-m o d el is sim ilar

396 Linh Anh Nguyen

an atomic program. Note that objects in description logics correspond tostates in PDL (and possible worlds in modal logics). The instance checkingproblem in PDL(0)-Desc is stated as follows: given a TBox T and an ABox Aof PDL(0)-Desc, a concept C, and an object a, check whether a is an instanceof C in every model of T (A (i.e. whether T (A |= C(a), where |= reflects“global semantic consequence” in PDL(0)-Desc). The data complexity ofthat problem is measured w.r.t. the size of A, while assuming that T , C,and a are fixed. Our claim is that if T is a deterministic positive logicprogram in PDL(0) then the data complexity of that problem is in PTIME.A formal proof of this will appear in an extension of this paper. The sketchis as follows:

• We construct a finite least pseudo-model M for the ABox A and theglobal assumptions T by starting with the graph corresponding to Aand proceeding in a similar way as Algorithm 5, except that T is addedto the content of every state.

• Then T (A |= C(a) i! M, a |= C.

• Since T is fixed, the size of M and the complexity of constructing Mare bounded by a polynomial in the size of A.

Additionally, similarly to the extension [8] of [7], our method can beextended to develop declarative and procedural semantics for deterministicpositive logic programs in first-order dynamic logic, which will be usefulfor logic programming about actions, time, belief, and knowledge. Goals tosuch programs are deterministic negative clauses. This is a line to combinemodal and temporal logic programming and remains as a future work.

Acknowledgements

I would like to thank the anonymous reviewers for useful comments.

BIBLIOGRAPHY[1] Ph. Balbiani, L. Farinas del Cerro, and A. Herzig. Declarative semantics for modal

logic programs. In Proceedings of the 1988 International Conference on Fifth Gener-ation Computer Systems, pages 507–514. ICOT, 1988.

[2] M. Baldoni, L. Giordano, and A. Martelli. A framework for a modal logic program-ming. In Joint International Conference and Symposium on Logic Programming,pages 52–66. MIT Press, 1996.

[3] F. Debart, P. Enjalbert, and M. Lescot. Multimodal logic programming using equa-tional and order-sorted logic. Theoretical Comp. Science, 105:141–166, 1992.

[4] R. Gore and L.A. Nguyen. A tableau system with automaton-labelled formulae forregular grammar logics. In B. Beckert, editor, Proceedings of TABLEAUX 2005,LNAI 3702, pages 138–152. Springer-Verlag, 2005.

[5] D. Harel, D. Kozen, and J. Tiuryn. Dynamic Logic. MIT Press, 2000.[6] U. Hustadt, B. Motik, and U. Sattler. Data complexity of reasoning in very expressive

description logics. In L.P. Kaelbling and A. Sa#otti, editors, IJCAI, pages 466–471.Professional Book Center, 2005.

[7] L.A. Nguyen. Constructing the least models for positive modal logic programs. Fun-damenta Informaticae, 42(1):29–60, 2000.

Page 21: O n th e D eterm in istic H o rn F ra g m en t o f T est ...nguyen/nguyen06aiml.pdf · in P D L (0 ), con stru cts a least p seu d o-m o d el of P . A p seu d o-m o d el is sim ilar

On the Deterministic Horn Fragment of Test-free PDL 397

[8] L.A. Nguyen. A fixpoint semantics and an SLD-resolution calculus for modal logicprograms. Fundamenta Informaticae, 55(1):63–100, 2003.

[9] L.A. Nguyen. Multimodal logic programming. To appear in TCS, 2006.[10] A. Nonnengart. How to use modalities and sorts in Prolog. In C. MacNish, D. Pearce,

and L.M. Pereira, editors, Proceedings of JELIA’94, LNCS 838, pages 365–378.Springer, 1994.

Linh Anh Nguyen

Institute of Informatics, University of Warsawul. Banacha 2, 02-097 Warsaw, Poland

[email protected]

Page 22: O n th e D eterm in istic H o rn F ra g m en t o f T est ...nguyen/nguyen06aiml.pdf · in P D L (0 ), con stru cts a least p seu d o-m o d el of P . A p seu d o-m o d el is sim ilar