Andreas Herzig
email: herzig@irit.fr

Ivan Varzinczak

Metatheory of actions: beyond consistency

Keywords: Reasoning about actions, action theory, modularity, ramifications

HAL is

Introduction

In logic-based approaches to knowledge representation, a given domain is described by a set of logical formulas T , which we call a (non-logical) theory. That is also the case for reasoning about actions, where we are interested in theories describing particular actions (or, more precisely, action types). We call such theories action theories.

A priori consistency is the only criterion that formal logic provides to check the quality of such descriptions. In the present work we go beyond that, and argue that we should require more than the mere existence of a model for a given theory.

Our starting point is the fact that in reasoning about actions one usually distinguishes several kinds of logical formulas. Among these are effect axioms, precondition axioms, and boolean axioms. In order to distinguish such non-logical axioms from logical axioms, we prefer to speak of effect laws, executability laws, and static laws, respectively. Moreover we single out those effect laws whose effect is ⊥, and call them inexecutability laws.

Given these types of laws, suppose the language is powerful enough to state conditional effects of actions. For example, suppose that action a is inexecutable in contexts where ϕ 1 holds, and executable in contexts where ϕ 2 holds. It follows that there can be no context where ϕ 1 ∧ ϕ 2 holds. Now ¬(ϕ 1 ∧ ϕ 2 ) is a static law that does not mention a. It is natural to expect that ¬(ϕ 1 ∧ ϕ 2 ) follows from the static laws alone. By means of examples we show that when this is not the case, then unexpected conclusions might follow from the theory T , even in the case T is logically consistent. This motivates postulates requiring that the different laws of an action theory should be arranged modularly, i.e., in separated components, and in such a way that interactions between them are limited and controlled. In essence, we argue that static laws may entail new effects of actions (that cannot be inferred from the effect laws alone), while effect laws and executability laws should never entail new static laws that do not follow from the set of static laws alone. We here formulate postulates that make these requirements precise. It will turn out that in all existing accounts that allow for these four kinds of laws [START_REF] De Giacomo | PDL-based framework for reasoning about actions[END_REF][START_REF] Lin | Embracing causality in specifying the indirect effects of actions[END_REF][3][START_REF] Thielscher | Computing ramifications by postprocessing[END_REF][START_REF] Castilho | Formalizing action and change in modal logic I: the frame problem[END_REF][START_REF] Zhang | EPDL: A logic for causal reasoning[END_REF], consistent action theories can be written that violate these postulates. In this work we give algorithms that allow one to check whether an action theory satisfies the postulates or not. With such algorithms, the task of correcting flawed action theories can be made easier.

Although we here use the syntax of propositional dynamic logic (PDL) [START_REF] Harel | Dynamic logic[END_REF], all we shall say applies as well to first-order formalisms, in particular to the Situation Calculus [START_REF] Mccarthy | Some philosophical problems from the standpoint of artificial intelligence[END_REF]. All postulates we are going to present can be stated as well for other frameworks, in particular for action languages such as A, AR [START_REF] Gelfond | Representing action and change by logic programs[END_REF][START_REF] Kartha | Actions with indirect effects (preliminary report)[END_REF][START_REF] Giunchiglia | Representing action: indeterminacy and ramifications[END_REF] and others, and for Situation Calculus based approaches. In [START_REF] Herzig | Cohesion, coupling and the meta-theory of actions[END_REF] we have given a Situation Calculus version of our analysis, while in [START_REF] Herzig | A modularity approach for a fragment of ALC[END_REF] we presented a similar notion for ontologies in Description Logics [START_REF]Description Logic Handbook[END_REF]. The present work is the complete version of the one first appeared in [START_REF] Herzig | Domain descriptions should be modular[END_REF]. This text is organized as follows: after some background definitions (Section 2) we state some postulates concerning action theories (Section 3). In Sections 4 and 5, we study the two most important of these postulates, giving algorithmic methods to check whether an action theory satisfies them or not. We then generalize our postulates (Section 6) and discuss possible strengthening of them (Section 7). In Section 8 we show interesting features of modular action theories. Before concluding, we assess related work found in the literature on metatheory of actions (Section 9).

Preliminaries

Dynamic logic

Here we establish an ontology of dynamic domains. As our base formalism we use * -free PDL, i.e., PDL without the iteration operator * . For more details on PDL, see [START_REF] Harel | Dynamic logic[END_REF][START_REF] Harel | Dynamic Logic[END_REF].

Let Act = {a 1 , a 2 , . . .} be the set of all atomic action constants of a given domain. Our running example is in terms of the Walking Turkey Scenario [START_REF] Thielscher | Computing ramifications by postprocessing[END_REF]. There, the atomic actions are load, shoot and tease. We use a as a variable for atomic actions. To each atomic action a there is an associated modal operator [a]. Here we suppose that the underlying multimodal logic is independently axiomatized (i.e., the logic is a fusion and there is no interaction between the modal operators [START_REF] Kracht | Properties of independently axiomatizable bimodal logics[END_REF][START_REF] Kracht | Simulation and transfer results in modal logic: A survey[END_REF]). Prop = {p 1 , p 2 , . . .} denotes the set of all propositional constants, also called fluents or atoms. Examples of those are loaded, alive and walking. We use p as a variable for propositional constants.

We here suppose that both Act and Prop are nonempty and finite.

We use small Greek letters ϕ, ψ, . . . to denote classical formulas, also called boolean formulas. They are recursively defined in the following way:

ϕ ::= p | ⊤ | ⊥ | ¬ϕ | ϕ ∧ ϕ | ϕ ∨ ϕ | ϕ → ϕ | ϕ ↔ ϕ
Fml is the set of all classical formulas.

Examples of classical formulas are walking → alive and ¬(bachelor ∧ married).

A classical formula is classically consistent if there is at least one valuation in classical propositional logic that makes it true. Given ϕ ∈ Fml, valuations(ϕ) denotes the set of all valuations of ϕ. We note |= CPL the logical consequence in classical propositional logic.

The set of all literals is Lit = Prop ∪ {¬p : p ∈ Prop}. Examples of literals are alive and ¬walking. ℓ will be used as a variable for literals. If ℓ = ¬p, then we identify ¬ℓ with p.

A clause χ is a disjunction of literals. We say that a literal ℓ appears in a clause χ, written ℓ ∈ χ, if ℓ is a disjunct of χ.

We denote complex formulas (possibly with modal operators) by capital Greek letters Φ 1 , Φ 2 , . . . They are recursively defined in the following way:

Φ ::= ϕ | [a]Φ | a Φ | ¬Φ | Φ ∧ Φ | Φ ∨ Φ | Φ → Φ | Φ ↔ Φ
where Φ denotes a complex formula. a is the dual operator of [a], defined by: a Φ = def ¬ [a]¬Φ. Sequential composition of actions is defined by the abbreviation [a 1 ; a 2 ]Φ = def [a 1 ][a 2 ]Φ. Examples of complex formulas are loaded → [shoot]¬alive and hasGun → load; shoot (¬alive ∧ ¬loaded).

If T is a set of formulas (modal or classical), atm(T ) returns the set of all atoms occurring in T . For instance, atm({¬¬¬p 1 , [a]

p 2 }) = {p 1 , p 2 }.
For parsimony's sake, whenever there is no confusion we identify a set of formulas with the conjunction of its elements. The semantics is that for multimodal K [START_REF] Popkorn | First Steps in Modal Logic[END_REF][START_REF] Blackburn | Modal Logic[END_REF].

Definition 1 A PDL-model is a tuple M = W, R where W is a set of valuations (alias possible worlds), and R : Act -→ 2 W×W a function mapping action constants a to accessibility relations R a ⊆ W × W.

As an example, for Act = {a 1 , a 2 } and Prop = {p 1 , p 2 }, we have the PDLmodel M = W, R , where

W = {{p 1 , p 2 }, {p 1 , ¬p 2 }, {¬p 1 , p 2 }}, R(a 1 ) =     
({p 1 , p 2 }, {p 1 , ¬p 2 }), ({p 1 , p 2 }, {¬p 1 , p 2 }), ({¬p 1 , p 2 }, {¬p 1 , p 2 }), ({¬p 1 , p 2 }, {p 1 , ¬p 2 })

     , R(a 2 ) = {({p 1 , p 2 }, {p 1 , ¬p 2 }), ({p 1 , ¬p 2 }, {p 1 , ¬p 2 })} Figure 1 gives a graphical representation of M . M : p 1 , p 2 ¬p 1 , p 2 p 1 , ¬p 2 a 1 a 1 a 2 a 1 a 1 a 2 Fig. 1. Example of a PDL-model for Act = {a 1 , a 2 }, and Prop = {p 1 , p 2 }. model M , if |= M T , then |= M Φ. 1
We here suppose that the logic under consideration is compact [START_REF] Fitting | Proof methods for modal and intuitionistic logics[END_REF].

Having established the formal substratum our presentation will rely on, we present in the next section the different types of formulas we use to describe dynamic domains.

Describing action theories in PDL

Before elaborating a theory, we need to specify what we are about to describe, i.e., what the formulas talk about. Following the tradition in the literature, we identify a domain (alias scenario) with the actions we take into account and the fluents they can change. More formally, we have:

Definition 5 A domain signature is a tuple Act, Prop .
An example of a domain is the well-known Yale Shooting Scenario (YSS) [START_REF] Hanks | Default reasoning, nonmonotonic logics, and the frame problem[END_REF], whose signature comprises the actions load, wait and shoot, and fluents loaded and alive.

Given a domain Act, Prop , we are interested in theories whose statements describe the behavior of actions of Act on the fluents of Prop. PDL allows for the representation of such statements, that we here call action laws. We distinguish several types of them. We call effect laws formulas relating an action to its effects. Statements of conditions under which an action cannot be executed are called inexecutability laws. Executability laws in turn stipulate the context where an action is guaranteed to be executable. Finally, static laws are formulas that do not mention actions. They express constraints that must hold in every possible state. These four types of laws are our fundamental entities and we introduce them more formally in the sequel.

Static laws

Frameworks which allow for indirect effects of actions make use of logical formulas that state invariant propositions about the world. Such formulas delimit the set of possible states. They do not refer to actions, and we suppose here that they are expressed as formulas of classical propositional logic.

Definition 6 A static law is a formula ϕ ∈ Fml.

In our running example, the static law walking → alive says that if a turkey is walking, then it must be alive. Another one is saved ↔ (mbox1 ∨ mbox2), which states that an e-mail message is saved if and only if it is in mailbox 1 or in mailbox 2 or both [START_REF] Castilho | It depends on the context! a decidable logic of actions and plans based on a ternary dependence relation[END_REF].

In some action languages, such as AR for example, we would write the statement always alive → walking, and in the Situation Calculus it would be the first-order formula ∀s.(Holds(walking, s) → Holds(alive, s)).

The set of all static laws of a given domain is denoted by S . At first glance, no requirement concerning consistency of S is made. Of course, we want S to be consistent, otherwise the whole theory is inconsistent. As we are going to see in the sequel, however, consistency of S alone is not enough to guarantee the consistency of a theory.

Effect laws

Logical frameworks for reasoning about actions contain expressions linking actions and their effects. We suppose that such effects might be conditional, and thus get a third component of such laws.

In PDL, the formula [a]Φ states that formula Φ is true after every possible execution of action a.

Definition 7 An effect law2 for action a is of the form ϕ → [a]ψ, where ϕ, ψ ∈ Fml, with ψ classically consistent.

The consequent ψ is the effect which obtains when action a is executed in a state where the antecedent ϕ holds. An example of an effect law is loaded → [shoot]¬alive, saying that whenever the gun is loaded, after shooting the turkey is dead. Another one is ⊤ → [tease]walking: in every circumstance, the result of teasing is that the turkey starts walking. For parsimony's sake, the latter effect law will be written [tease]walking.

Note that the consistency requirement for ψ makes sense: if ψ is inconsistent then we have an inexecutability law, that we consider as a separate entity and which we are about to introduce formally in the sequel. On the other hand, if ϕ is inconsistent then the effect law is obviously superfluous.

For the first example above, in action languages one would write the statement

shoot causes ¬alive if loaded,
and in the Situation Calculus formalism one would write the first-order formula ∀s.(Holds(loaded, s) → ¬Holds(alive, do(shoot, s))).

Inexecutability laws

We consider effect laws with inconsistent consequents as a particular kind of law which we call inexecutability laws. (Such laws are sometimes called qualifications [START_REF] Mccarthy | Epistemological problems of artificial intelligence[END_REF].) This allows us to avoid mixing things that are conceptually different: for an action a, an effect law mainly associates it with a consequent ψ, while an inexecutability law only associates it with an antecedent ϕ, viz. the context which precludes the execution of a.

Definition 8 An inexecutability law for action a is of the form ϕ → [a]⊥, with ϕ ∈ Fml.

For example ¬hasGun → [shoot]⊥ expresses that shoot cannot be executed if the agent has no gun. Another example is dead → [tease]⊥: a dead turkey cannot be teased.

In AR we would write the statement impossible shoot if ¬hasGun, and in the Situation Calculus our example would be ∀s.(¬Holds(hasGun, s) → ¬Poss(shoot, s)).

Executability laws

With only static and effect laws one cannot guarantee that the action shoot can be executed whenever the agent has a gun. We need thus a way to state such conditions.

In dynamic logic the dual a ϕ, defined as ¬ [a]¬ϕ, can be used to express executability. a ⊤ thus reads "execution of action a is possible".

Definition 9 An executability law for action a is of the form ϕ → a ⊤, where ϕ ∈ Fml.

For instance hasGun → shoot ⊤ says that shooting can be executed whenever the agent has a gun, and ⊤ → tease ⊤, also written tease ⊤, establishes that the turkey can always be teased.

Some approaches (most prominently Reiter's) use biconditionals ϕ ↔ a ⊤, called precondition axioms. This is equivalent to ¬ϕ ↔ [a]⊥, which highlights that they merge information about inexecutability with information about executability. Here we consider these entities to be different and keep them separate.

In action languages such laws are not represented, they are rather implicitly inferred from inexecutability statements (cf. Section 7). In Situation Calculus our example would be stated as ∀s.(Holds(hasGun, s) → Poss(shoot, s)).

Whereas all the extant approaches in the literature that allow for indirect effects of actions contain static and effect laws, and provide a way for representing inexecutabilities (in the form of implicit qualifications [START_REF] Ginsberg | Reasoning about actions II: The qualification problem[END_REF][START_REF] Lin | Embracing causality in specifying the indirect effects of actions[END_REF][START_REF] Thielscher | Computing ramifications by postprocessing[END_REF]), the status of executability laws is less consensual. Some authors [START_REF] Schubert | Monotonic solution of the frame problem in the situation calculus: an efficient method for worlds with fully specified actions[END_REF][START_REF] Doherty | Explaining explanation closure[END_REF]3,[START_REF] Thielscher | Computing ramifications by postprocessing[END_REF] more or less tacitly consider that executability laws should not be made explicit but rather inferred by the reasoning mechanism. Others [START_REF] Lin | Embracing causality in specifying the indirect effects of actions[END_REF][START_REF] De Giacomo | PDL-based framework for reasoning about actions[END_REF][START_REF] Castilho | Formalizing action and change in modal logic I: the frame problem[END_REF][START_REF] Zhang | EPDL: A logic for causal reasoning[END_REF] have executability laws as first class objects one can reason about.

It seems a matter of debate whether one can always do without executabilities.

In principle it seems to be strange to just state information about necessary conditions for action execution (inexecutabilities) without saying anything about its sufficient conditions. The justification is that given an action we have three possible situations: it is known to be executable, known to be inexecutable, and unknown whether executable. This is the reason why we think that we need executability laws. Indeed, in several domains one wants to explicitly state under which conditions a given action is guaranteed to be executable, e.g. that a robot never gets stuck and is always able to execute a move action. And if we have a plan such as load; shoot (load followed by shoot) of which we know that it achieves the goal ¬alive, then we would like to be sure that it is executable in the first place!3 In any case, allowing for executability laws gives us more flexibility and expressive power.

Action theories

Given a domain Act, Prop , for an action a ∈ Act, we define E a as the set of its effect laws, X a the set of its executability laws, and I a that of its inexecutability laws.

Definition 10 An action theory for a is a tuple S , E a , X a , I a .

In our running scenario example, a theory for the action shoot would be

S = {walking → alive}, E shoot = {loaded → [shoot]¬alive}, X shoot = {hasGun → shoot ⊤}, I shoot = {¬hasGun → [shoot]⊥}
Given a dynamic domain we define E = a∈Act E a , X = a∈Act X a , and I = a∈Act I a . All these sets are finite, because Act is finite and each of the E a , X a , I a is finite.

Definition 11 An action theory is a tuple of the form S , E , X , I .

Given an action theory S , E , X , I and a formula Φ, we write S , E , X , I |= PDL Φ instead of S ∪ E ∪ X ∪ I |= PDL Φ.

When formalizing dynamic domains, we face the frame problem [START_REF] Mccarthy | Some philosophical problems from the standpoint of artificial intelligence[END_REF] and the ramification problem [START_REF] Finger | Exploiting constraints in design synthesis[END_REF]. In what follows we formally present the logical framework in which action theories will henceforth be described.

Dynamic logic and the frame problem

As the reader might have already expected, the logical formalism of PDL alone does not solve the frame problem. For instance, if S , E , X , I describes our shooting domain, then

S , E , X , I |= PDL hasGun → [load]hasGun.
The same can be said about the ramification problem in what concerns the derivation of indirect effects not properly caused by the action under consideration. For example, S , E , X , I |= PDL ¬alive → [tease]alive. Thus, given an action theory S , E , X , I , we need a consequence relation powerful enough to deal with the frame and ramification problems. This means that the deductive power of PDL has to be augmented in order to ensure that the only non-effects of actions that follow from the theory are those that are really relevant. The presence of static laws makes that this is a delicate task, and starting with [START_REF] Lin | Embracing causality in specifying the indirect effects of actions[END_REF]3], several authors have argued that some notion of causality is needed. In this work we opt for the dependence-based approach presented in [START_REF] Castilho | Formalizing action and change in modal logic I: the frame problem[END_REF], which has been shown [START_REF] Demolombe | Regression in modal logic[END_REF] to subsume Reiter's solution to the frame problem [START_REF] Reiter | The frame problem in the situation calculus: A simple solution (sometimes) and a completeness result for goal regression[END_REF], and moreover at least partially accounts for the ramification problem [START_REF] Varzinczak | What is a good domain description? evaluating and revising action theories in dynamic logic[END_REF].

In the logical framework developed in [START_REF] Castilho | Formalizing action and change in modal logic I: the frame problem[END_REF], metalogical information, given in the form of a dependence relation, is added to PDL.

Definition 12 (Dependence relation [START_REF] Castilho | Formalizing action and change in modal logic I: the frame problem[END_REF]) A dependence relation is a binary relation ; ⊆ Act × Lit.

The expression a ; ℓ denotes that the execution of action a may make the literal ℓ true. In our example we have

; =      shoot, ¬loaded , shoot, ¬alive , shoot, ¬walking , tease, walking     
, which means that action shoot may make the literals ¬loaded, ¬alive and ¬walking true, and action tease may make walking true.

Semantically, the dependence-based approach relies on the explanation closure assumption [START_REF] Schubert | Monotonic solution of the frame problem in the situation calculus: an efficient method for worlds with fully specified actions[END_REF], and its solution to the frame problem consists in a kind of negation as failure: because load, ¬hasGun / ∈ ;, we have load ; ¬hasGun, i.e., ¬hasGun is never caused by load. Thus, in a context where hasGun is true, after every execution of load, hasGun still remains true. We also have tease ; alive and tease ; ¬alive. The meaning of all these independences is that the frame axioms hasGun → [load]hasGun, ¬alive → [tease]¬alive and alive → [tease]alive hold.

We assume that ; is finite. A dependence relation ; defines a class of possible worlds models: "what counts as a solution to the frame problem [. . .] is a systematic proce-dure for generating, from the effect laws, [. . .] a parsimonious representation for [all] the frame axioms" [START_REF] Reiter | Knowledge in Action: Logical Foundations for Specifying and Implementing Dynamical Systems[END_REF].

Definition 13 A PDL-model M = W, R
We comply with that as we can define a semi-automatic procedure for generating the dependence relation from the set of effect laws [START_REF] Castilho | A dependence-based framework for actions with indeterminate and indirect effects[END_REF]. Moreover, as it has been argued in [START_REF] Castilho | It depends on the context! a decidable logic of actions and plans based on a ternary dependence relation[END_REF][START_REF] Varzinczak | What is a good domain description? evaluating and revising action theories in dynamic logic[END_REF], our approach is in line with the state of the art because none of the existing solutions to the frame and the ramification problems can handle domains with both indeterminate and indirect effects.

In the next section we turn to a metatheoretical analysis of action theories and make a step toward formal criteria for theory evaluation. Before that, we need a definition.

Definition 15 Let S , E a , X a , I a be an action theory for a, and ; a dependence relation. Then M = W, R is the big (alias maximal/standard) model for S , E a , X a , I a and ; if and only if:

• M is a ;-model; • W = valuations(S ) (all valuations of S ); and • R a = {(w, w ′ ) : for all ϕ → [a]ψ ∈ E a ∪ I a , if |= M w ϕ, then |= M w ′ ψ}.
For an example, consider an action theory whose components are given by

S = ∅, E a = {p 1 → [a]¬p 2 }, X a = { a ⊤}, I a = {p 2 → [a]⊥}, and ;= { a, ¬p 1 , a, ¬p 2 }
Figure 3 depicts one of its models and its associated big model. Big models contain all valuations consistent with S . Clearly, for a big model M we have |= M S ∧ E a ∧ I a . Because M maximizes executability, it is only X a which might not be true in M .

M : p 1 , ¬p 2 ¬p 1 , ¬p 2 a a M big : p 1 , ¬p 2 ¬p 1 , ¬p 2 p 1 , p 2 ¬p 1 , p 2 a a a
In the rest of the paper we characterize when an action theory with a dependence relation has a big model.

The postulates

"When does a given action theory have a model?", and, more importantly, "is that model intended?" are questions that naturally arise when we talk about action theories. Here we claim that all the approaches that are put forward in the literature are too liberal in the sense that we can have satisfiable action theories that are intuitively incorrect. We argue that something beyond the consistency notion is required in order to help us in answering these questions.

Our central thesis is that the different types of laws defined in Section 2.2 should be neatly separated in modules. Besides that, we want such laws to interfere only in one sense: static laws together with action laws for a may have consequences that do not follow from the action laws for a alone. The other way round, action laws should not allow to infer new static laws; effect laws should not allow to infer inexecutability laws; action laws for a should not allow to infer action laws for a ′ , etc. This means that our logical modules should be designed in such a way that they are as specialized and as little dependent on others as possible.

A first step in this direction has been the proposed division of our entities into the sets S , E , X and I . In order to accomplish our goal, we have to diminish interaction among such modules, rendering them the least interwoven we can. The rest of the section contains postulates expressing this. We here only state the postulates, and defer explanations and discussions to Sections 4-6.

PC (Logical consistency): S , E a , X a , I a |= ; ⊥
The theory of a given action should be logically consistent.

PS (No implicit static laws):

if S , E a , X a , I a |= ; ϕ, then S |= CPL ϕ If a classical formula can be inferred from the action theory, then it should be inferable from the set of static laws alone. (Note that on the left we use the ;-based consequence, while on the right we use consequence in classical logic: as both S and ϕ are classical, ϕ should be inferable from S in classical logic.)

PI (No implicit inexecutability laws): if S , E a , X a , I a |= ; ϕ → [a]⊥, then S , I a |= PDL ϕ → [a]
⊥ If an inexecutability law for an action a can be inferred from its action theory, then it should be inferable in PDL from the static laws and the inexecutability laws for a alone. Note that we used |= PDL instead of |= ; because we also suppose that neither frame axioms nor indirect effects should be relevant to derive inexecutability laws. The same remark holds for the postulate that follows:

PX (No implicit executability laws): if S , E a , X a , I a |= ; ϕ → a ⊤, then S , X a |= PDL ϕ → a ⊤ If an
executability law for a can be inferred from its action theory, then it should already "be" in X a , in the sense that it should also be inferable in PDL from the set of static and executability laws for a alone.

Postulate PC is obvious, for we are interested in consistent theories. It can be shown that PX is a consequence of PS (see Corollary 41). Thus, while PC is obvious and PX can be ensured by PS, things are less obvious for Postulates PS and PI: it turns out that for all approaches in the literature they are easily violated by action theories that allow to express the four kinds of laws. We therefore study each of these postulates in the subsequent sections by means of examples, give algorithms to decide whether they are satisfied, and discuss about what to do in the case the answer is 'no'.

No implicit static laws

While executability laws increase expressive power, they might conflict with inexecutability laws. Consider, for example, the following action theory:

S 1 = {walking → alive}, E 1 =      [tease]walking, loaded → [shoot]¬alive      , X 1 = { tease ⊤}, I 1 = {¬alive → [tease]⊥}
and the dependence relation:

; =      shoot, ¬loaded , shoot, ¬alive , shoot, ¬walking , tease, walking     
From this description we have the unintuitive inference X tease 1 , I tease 1 |= PDL alive: the turkey is immortal! This is an implicit static law because alive does not follow from S 1 alone:

S 1 , E tease 1 , X tease 1 , I tease 1 violates Postulate PS.
Implicit static laws are not a drawback of our underlying logical formalism. They also appear in Situation Calculus-based approaches and in causal laws theories. To witness 4 , suppose in Lin's framework we have

Holds(p 1 , s) → Caused(p 2 , true, s) (1)
and

Caused(p 2 , false, s) (2)
Then from (2) we get ¬Holds(p 2 , s)

and then conclude ¬Caused(p 2 , true, s)

Finally, from ( 1) and ( 4) we get

¬Holds(p 1 , s)
which is an implicit static law.

To see how implicit static laws show up in McCain and Turner's causal laws approach [3], let the causal law ϕ ⇒ ψ and T = {¬ψ}. Then ¬ϕ is an implicit static law in such a description.

How can we find out whether an action theory for a with a dependence relation ; satisfies Postulate PS?

Theorem 16 S , E a , X a , I a and ; satisfy Postulate PS if and only if the big model for S , E a , X a , I a and ; is a model of S , E a , X a , I a and ;.

PROOF.

Let M = W, R be the big model of S , E a , X a , I a and ;.

(⇒): As M is a big model of S , E a , X a , I a and ;, we have |= M S ∧E a ∧I a . It remains to show that |= M X a . Let ϕ i → a ⊤ ∈ X a , and let w ∈ W be such that |= M w ϕ i . Therefore, for all ϕ j ∈ Fml such that S , E a , X a , I a |= ; ϕ j → [a]⊥, we must have |= M w ϕ j , because S , E a , X a , I a |= ; ¬(ϕ i ∧ ϕ j )
, and as S , E a , X a , I a and ; satisfy Postulate PS, S |= CPL ¬(ϕ i ∧ ϕ j ), and hence |= M ¬(ϕ i ∧ ϕ j ). 4 The examples are from [START_REF] Schwind | Causality in action theories[END_REF].

Then, by the construction of M , there is some (⇐): Suppose S , E a , X a , I a and ; do not satisfy Postulate PS. Then there must be ϕ ∈ Fml such that S , E a , X a , I a |= ; ϕ and S |= CPL ϕ. This means that there is a valuation val of S that falsifies ϕ. As val ∈ W (because M contains all possible valuations of S ), M is not a model of S , E a , X a , I a and ;.

w ′ ∈ W such that |= M w ′ ψ, for all ϕ → [a]ψ such that S , E a , I a |= ; ϕ → [a]ψ
We shall give an algorithm to find a finite characterization of all 5 implicit static laws of a given action theory S , E a , X a , I a . The idea is as follows: for each executability law ϕ → a ⊤ in the theory, construct from E a , I a and ;

a set of inexecutabilities {ϕ 1 → [a]⊥, . . . , ϕ n → [a]⊥} that potentially conflict with ϕ → a ⊤. For each i, 1 ≤ i ≤ n, if ϕ ∧ ϕ i is satisfiable w.r.t. S , mark
¬(ϕ∧ϕ i ) as an implicit static law. Incrementally repeat this procedure (adding all the implicit ¬(ϕ ∧ ϕ i ) to S ) until no more implicit static law is obtained.

For an example of the execution of the algorithm, consider the action theory S 1 , E tease and ; we try to build an inexecutability for tease. We take [tease]walking and compute then all indirect effects of tease w.r.t. S 1 . From walking → alive, we get that alive is an indirect effect of tease, giving us [tease]alive. But tease, alive / ∈ ;, which means the frame axiom ¬alive → [tease]¬alive holds. Together with [tease]alive, this gives us the inexecutability ¬alive → [tease]⊥. As S 1 ∪ {⊤, ¬alive} is satisfiable (⊤ is the antecedent of the executability tease ⊤), we get ¬alive → ⊥, i.e., the implicit static law alive. For this example no other inexecutability for tease can be derived, so the computation stops.

Before presenting the pseudo-code of the algorithm we need some definitions. • χ is an implicate of ϕ, and 5 Actually what the algorithm does is to find an interpolant of all implicit static laws of the theory.

• for every implicate

χ ′ of ϕ, χ ′ |= CPL χ implies χ |= CPL χ ′ .
The set of all prime implicates of a formula ϕ is denoted PI(ϕ).

For example, the set of prime implicates of p 1 is just {p 1 }, and that of

p 1 ∧ (¬p 1 ∨ p 2 ) ∧ (¬p 1 ∨ p 3 ∨ p 4 ) is {p 1 , p 2 , p 3 ∨ p 4 }.
In our shooting domain, alive is a prime implicate of {walking → alive, walking}. For more on prime implicates, their properties and how to compute them see [START_REF] Marquis | Consequence finding algorithms[END_REF].

Definition 19 Let ϕ, ψ ∈ Fml. Then NewCons(ψ, ϕ) = PI(ϕ ∧ ψ) \ PI(ϕ).
The function NewCons(ψ, ϕ) computes the new consequences of ϕ w.r.t. ψ: the set of strongest clauses that follow from ϕ ∧ ψ, but do not follow from ϕ alone (cf. e.g. [36]). It is computed by subtracting the prime implicates of ϕ from those of ϕ ∧ ψ. For example, NewCons((¬p

1 ∨ p 2 ) ∧ (¬p 1 ∨ p 3 ∨ p 4 ), p 1 ) = {p 2 , p 3 ∨ p 4 }.
And for our scenario, NewCons(walking, walking → alive) = {alive, walking}.

The algorithm below improves the one in [START_REF] Herzig | On the modularity of theories[END_REF] by integrating a solution to the frame problem (via the dependence relation ;). For convenience, we define C a = E a ∪ I a as the set of all formulas expressing the direct consequences of an action a, whether they are consistent or not.

Algorithm 1 (Finding all implicit static laws induced by a) input: S , E a , X a , I a and ; output: S imp* , the set of all implicit static laws of S , E a , X a , I a S imp* := ∅ C a := E a ∪ I a repeat S imp := ∅ for all ϕ → a ⊤ ∈ X a do for all Ĉa ⊆ C a such that Ĉa = ∅ do ϕ Ĉa := {ϕ i :

ϕ i → [a]ψ i ∈ Ĉa } ψ Ĉa := {ψ i : ϕ i → [a]ψ i ∈ Ĉa } for all χ ∈ NewCons(ψ Ĉa , S ) do if S ∪ S imp* ∪ {ϕ, ϕ Ĉa , ¬χ} |= CPL ⊥ and ∀ℓ i ∈ χ, a ; ℓ i then S imp := S imp ∪ {¬(ϕ ∧ ϕ Ĉa ∧ ¬χ)} S imp* := S imp* ∪ S imp until S imp = ∅
This is the key algorithm of the paper. In each step of the algorithm, S ∪ S imp* is the updated set of static laws (the original ones fed with the implicit laws caught up to that point). At the end, S imp* collects all the implicit static laws.

Theorem 20 Algorithm 1 terminates.

PROOF. Let C a = E a ∪ I a . First, the set of candidates to be an implicit static law that might be due to a and that are examined in the repeat-loop is

{¬(ϕ ∧ ϕ Ĉa ∧ ¬χ) : Ĉa ⊆ C a , ϕ → a ⊤ ∈ X a and χ ∈ NewCons(ψ Ĉa , S )}
As E a , I a and X a are finite, this set is finite.

In each step, either the algorithm stops because S imp = ∅, or at least one of the candidates is put into S imp in the outermost for-loop. (This one terminates, because X a , C a and NewCons(.) are finite.) Such a candidate is not going to be put into S imp in future steps of the algorithm, because once added to S ∪ S imp* , it will be in the set of laws S ∪ S imp* of all subsequent executions of the outermost for-loop, falsifying its respective if-test for such a candidate. Hence the repeat-loop is bounded by the number of candidates, and therefore Algorithm 1 terminates.

While terminating, our algorithm comes with considerable computational costs: first, the number of formulas ϕ Ĉa and ψ Ĉa is exponential in the size of C a , and second, the computation of NewCons(ψ Ĉa , S ) might result in exponential growth. While we might expect C a to be reasonably small in practice (because E a and I a are in general small), the size of NewCons(ψ Ĉa , S ) is more difficult to control. The right-to-left direction is straightforward by .

Example 21 For S 1 , E tease 1 , X tease 1 , I tease 1 , Algorithm 1 returns S imp* = {alive}.
What shall we do once we have discovered an implicit static law?

The existence of implicit static laws may indicate too strong executability laws: in Example 21, we wrongly assumed that tease is always executable. Thus one way of 'repairing' our theory would be to consider the weaker executability alive → tease ⊤ instead of tease ⊤ in X tease .

On the other hand, implicit static laws may also indicate that the inexecutability laws are too strong: In Example 25 we discovered that the agent never has a gun. The problem here can be overcome by weakening [shoot]⊥ in I shoot with ¬hasGun → [shoot]⊥. 6We can go further on this reasoning and also argue that the problem may be due to a too strong set of effect laws, or even to too strong frame axioms (i.e., a too weak dependence relation). To witness, for Example 21, if we replace the law [tease]walking by the weaker alive → [tease]walking, the resulting action theory would satisfy Postulate PS. In the same way, stating the (unintuitive) dependence tease ; alive (which means the frame axiom ¬alive → [tease]¬alive is no longer valid) guarantees satisfaction of PS. (Note, however, that this solution becomes intuitive when alive is replaced by awake.)

Example 25 Consider S = ∅, E shoot = {loaded → [shoot]¬alive}, X shoot = {hasGun →
To finish, implicit static laws of course may also indicate that the static laws are too weak:

Example 26 Suppose a computer representation of the line of integers, in which we can be at a strictly positive number, pos, or at a negative one or zero, ¬pos. Let maxInt and minInt, respectively, be the largest and the smallest representable integer number. Action goLeft is the action of moving to the biggest integer strictly smaller than the one at which we are. Consider the following action theory for this scenario (at i means we are at number i):

S = {at i → pos : 0 < i ≤ maxInt} ∪ {at i → ¬pos : minInt ≤ i ≤ 0} E = {at minInt → [goLeft]underflow} ∪ {at i → [goLeft]at i-1 : i > minInt}, X = { goLeft ⊤}, I = ∅
with the dependence relation (minInt ≤ i ≤ maxInt):

; =     
goLeft, at i , goLeft, pos , goLeft, ¬pos , goLeft, underflow

    
Applying Algorithm 1 to this action theory gives us the implicit static law ¬(at 1 ∧ at 2 ), i.e., we cannot be at numbers 1 and 2 at the same time.

To summarize, in order to satisfy Postulate PS, an action theory should contain a complete set of static laws or, alternatively, should not contain too strong action laws.

Remark 27 S ∪ S imp* in general is not intuitive.

Whereas in the latter example the implicit static laws should be added to S , in the others the implicit static laws are unintuitive and due to an (in)executability law that is too strong and should be weakened. Of course, how intuitive the modified action theory will be depends mainly on the knowledge engineer's choice.

To sum it up, eliminating implicit static laws may require revision of S , E a or ;, or completion of X a and I a . Completing I a is the topic we address in the next section.

No implicit inexecutability laws

Let S 2 = S 1 , E 2 = E 1 and X 2 = I 2 = ∅, and let ; be that for S 1 , E 1 , X In the literature, such laws are also known as implicit qualifications [START_REF] Ginsberg | Reasoning about actions II: The qualification problem[END_REF], and it has been often supposed, in a more or less tacit way, that it is a positive feature of frameworks to leave them implicit and provide mechanisms for inferring them [START_REF] Lin | Embracing causality in specifying the indirect effects of actions[END_REF][START_REF] Lin | Embracing causality in specifying the indeterminate effects of actions[END_REF][START_REF] Thielscher | Ramification and causality[END_REF]. The other way round, one might argue as well that implicit qualifications indicate that the domain has not been described in an adequate manner: the form of inexecutability laws is simpler than that of effect laws, and it might be reasonably expected that it is easier to exhaustively describe them. 7 Thus, all inexecutabilities of a given action should be explicitly stated, and this is what Postulate PI says.

How can we check whether PI is violated? We can conceive an algorithm to find implicit inexecutability laws of a given action a. The basic idea is as follows: for every combination of effect laws of the form (ϕ

1 ∧ . . . ∧ ϕ n ) → [a](ψ 1 ∧ . . . ∧ ψ n ), with each ϕ i → [a]ψ i ∈ E a , if ϕ 1 ∧ . . . ∧ ϕ n is consistent w.r.t. to S , ψ 1 ∧ . . . ∧ ψ n inconsistent w.r.t. S , and S , I a |= PDL (ϕ 1 ∧ . . . ∧ ϕ n ) → [a]⊥, then output (ϕ 1 ∧ . . . ∧ ϕ n ) → [a]
⊥ as an implicit inexecutability law. Our algorithm basically does this, and moreover takes into account dependence information.

For an example of the execution of the algorithm, take S 2 , E tease Below is the pseudo-code of the algorithm for that (the reason X a is not used in the computation will be made clear in the sequel):

Algorithm 2 (Finding implicit inexecutability laws for a) input: S , E a , X a , I a and ; output: I a imp , the set of implicit inexecutability laws for a With Algorithm 2, not only do we decide whether Postulate PI is satisfied, but we also get information on how to "repair" the action theory. The set of implicit inexecutabilities so obtained provides logical and metalogical information concerning the correction that must be carried out: in the first case, elements of I a imp can be added to I a ; in the second one, I a imp helps in properly changing E a or ;. For instance, to correct the action theory of our example, the knowledge engineer would have the following options:

I a imp := ∅ for all Êa ⊆ E a do ϕ Êa := {ϕ i : ϕ i → [a]ψ i ∈ Êa } ψ Êa := {ψ i : ϕ i → [a]ψ i ∈ Êa } for all χ ∈ NewCons(ψ Êa , S ) do if ∀ℓ i ∈ χ
(1) Add the qualification ¬alive → [tease]⊥ to I tease

2

; or (2) Add the (unintuitive) dependence tease, alive to ;; or (3) Weaken the effect law [tease]walking to alive → [tease]walking in E tease 2 .

It is easy to see that whatever she opts for, the resulting action theory for tease will satisfy Postulate PI (while still satisfying PS).

Example 32 (Drinking coffee [START_REF] Herzig | Cohesion, coupling and the meta-theory of actions[END_REF]) Suppose a situation in which we reason about the effects of drinking a cup of coffee:

S = ∅, E drink =      sugar → [drink]happy, salt → [drink]¬happy      , X drink = I drink = ∅
and the dependence relation ;= { drink, happy , drink, ¬happy } Observe that S , E drink , X drink , I drink with ; satisfies PS. Then, running Algorithm 2 on this action theory will give us

I drink imp = {(sugar∧salt) → [drink]⊥}.
Remark 33 I a ∪ I a imp is not always intuitive.

Whereas in Example 29 we have got an inexecutability that could be safely added to I tease

2

, in Example 32 we got an inexecutability that is unintuitive (just the presence of sugar and salt in the coffee precludes drinking it). In that case, revision of other parts of the theory should be considered in order to make it intuitive. Anyway, the problem pointed out in the depicted scenario just illustrates that intuition is beyond syntax. The scope of this work relies on the syntactical level. Only the knowledge engineer can judge about how intuitive a formula is.

In what follows we revisit our postulates in order to strengthen them to the case where more than one action is under concern and thus get results that can be applied to whole action theories.

Generalizing the postulates

We have seen the importance that satisfaction of Postulates PC, PS and PI may have in describing the action theory of a particular action a. However, in applications of real interest more than one action is involved, and thus a natural question that could be raised is "can we have similar metatheoretical results for multiple action theories"?

In this section we generalize our set of postulates to action theories as a whole, i.e., considering all actions of a domain, and prove some interesting results that follow from that. As we are going to see, some of these results are straightforward, while others must rely on some additional assumptions in order to hold.

A generalization of Postulate PC is quite easy and has no need for justification: PC* (Logical consistency): S , E , X , I |= ; ⊥ The whole action theory should be logically consistent.

Generalizing Postulate PS will give us the following:

PS* (No implicit static laws): if S , E , X , I |=
; ϕ, then S |= CPL ϕ If a classical formula can be inferred from the whole action theory, then it should be inferable from the set of static laws alone. We have the following results:

Theorem 34 S , E , X , I and ; satisfy PS* if and only if S , E a , X a , I a and ; satisfies PS for all a ∈ Act.

PROOF.

(⇒): Straightforward: Suppose that for some a ∈ Act S , E a , X a , I a does not satisfy PS. Then there is ϕ ∈ Fml such that S , E a , X A more general form of Postulate PI can also be stated:

PI* (No implicit inexecutability laws): if S , E , X , I |= ; ϕ → [a]⊥, then S , I |= PDL ϕ → [a]
⊥ If an inexecutability law can be inferred from the whole action theory, then it should be inferable in PDL from the static and inexecutability laws alone.

Note that having that S , E a , X a , I a with ; satisfies PI for all a ∈ Act is not enough to S , E , X , I with ; satisfy PI* if there are implicit static laws. To witness, let S = E a 1 = ∅, and

X a 1 = { a 1 ⊤}, I a 1 = {ϕ → [a 1 ]⊥}. Let also E a 2 = X a 2 = I a 2 = ∅. Observe that both S , E a 1 , X a 1 , I a 1 and S , E a 2 , X a 2 , I a 2 with ; satisfy PI, but S , E , X , I |= ; ϕ → [a 2 ]⊥ and S , I |= PDL ϕ → [a 2 ]⊥.
Nevertheless, under PS* the result follows:

Theorem 37 Let S , E , X , I with ; satisfy PS*. S , E , X , I with ; satisfies PI* if and only if S , E a , X a , I a and ; satisfy PI for all a ∈ Act.

PROOF. See Appendix C.

In the next section we make a step toward an attempt of amending our modularity criteria by investigating possible extensions of our set of postulates.

7 Can we ask for more? Can we augment our set of postulates to take into account other modules of action theories, or even other metatheoretical issues in reasoning about actions? That is the topic we discuss in what follows.

Postulates about action effects

It seems to be in line with our postulates to require action theories not to allow for the deduction of new effect laws: if an effect law can be inferred from an action theory (and no inexecutability for the same action in the same context can be derived), then it should be inferable from the set of static and effect laws alone. This means we should have:

PE (No implicit effect laws): if S , E , X , I |= ; ϕ → [a]ψ and S , E , X , I |= ; ϕ → [a]⊥, then S , E |= ; ϕ → [a]ψ
But consider the following intuitively correct action theory: Another possibility of improving our modularity criteria could be:

S 3 = ∅, E 3 =      loaded → [shoot]¬alive, (¬loaded ∧ alive) → [shoot]alive      X 3 = {hasGun →
P⊥ (No unattainable effects): if ϕ → [a]ψ ∈ E , then S , E , X , I |= ; ϕ → [a]⊥
This expresses that if we have explicitly stated an effect law for a in some context, then there should be no inexecutability law for the same action in the same context. It is straightforward to design an algorithm which checks whether this postulate is satisfied. We do not investigate this further here, but just observe that the slightly stronger version below leads to unintuitive consequences:

P⊥' (No unattainable effects -strong version):

if S , E |= ; ϕ → [a]ψ, then S , E , X , I |= ; ϕ → [a]
⊥ Indeed, for the above action theory we have

E 3 |= ; (¬hasGun ∧ loaded) → [shoot]¬alive, but S 3 , E 3 , X 3 , I 3 |= ; (¬hasGun ∧ loaded) → [shoot]
⊥. This is certainly too strong. Our example also illustrates that it is sometimes natural to have 'redundancies' or 'overlaps' between E and I . Indeed, as we have pointed out, inexecutability laws are a particular kind of effect laws, and the distinction here made is conventional. The decision of considering them as strictly different entities or not depends mainly on the context. At a representational level we prefer to keep them separated, while in Algorithm 1 we have mixed them together in order to compute the consequences of an action.

In what follows we address the problem of completing the set of executability laws of an action theory.

Maximizing executability

As we have seen, implicit static laws only show up when there are executability laws. So, a question that naturally raises is "which executability laws can be consistently added to a given action theory?".

A hypothesis usually made in the literature is that of maximization of executabilities: in the absence of a proof that an action is inexecutable in a given context, assume its executability for that context. Such a hypothesis is captured by the following postulate that we investigate in this section:

PX + (Maximal executability laws): if S , E a , X a , I a |= ; ϕ → [a]⊥, then S , X a |= PDL ϕ → a ⊤
Such a postulate expresses that if in context ϕ no inexecutability for a can be inferred, then the respective executability should follow in PDL from the executability and static laws.

Postulate PX + generally holds in nonmonotonic frameworks, and can be enforced in monotonic approaches such as ours by maximizing X a . We nevertheless would like to point out that maximizing executability is not always intuitive. To witness, suppose we know that if we have the ignition key, the tank is full, . . ., and the battery tension is beyond 10V, then the car (necessarily) will start. Suppose we also know that if the tension is below 8V, then the car will not start. What should we conclude in situations where we know that the tension is 9V? Maximizing executabilities makes us infer that it will start, but such reasoning is not what we want if we would like to be sure that all possible executions lead to the goal.

Exploiting modularity

In this section we present other properties related to consistency and modularity of action theories, emphasizing the main results that we obtain when Postulate PS* is satisfied. sub-domain for some Prop ′ ⊆ Prop, then S , E a 1 ,...,an , X a 1 ,...,an , I a 1 ,...,an with ; corresponds to the module for {a 1 , . . . , a n }, Prop ′ in Lifschitz and Ren's sense (see the next section).

Related work

Pirri and Reiter have investigated the metatheory of the Situation Calculus [START_REF] Pirri | Some contributions to the metatheory of the situation calculus[END_REF]. In a spirit similar to ours, they use executability laws and effect laws. Contrarily to us, their executability laws are equivalences and are thus at the same time inexecutability laws. As they restrict themselves to domains without ramifications, there are no static laws, i.e., S = ∅. For this setting they give a syntactical condition on effect laws guaranteeing that they do not interact with the executability laws in the sense that they do not entail implicit static laws. Basically, the condition says that when there are effect laws ϕ 1 → [a]ψ and ϕ 2 → [a]¬ψ, then ϕ 1 and ϕ 2 are inconsistent (which essentially amounts to having in their theories a kind of "implicit static law schema" of the form

¬(ϕ 1 ∧ ϕ 2 )).
This then allows them to show that such theories are always consistent. Moreover they thus simplify the entailment problem for this calculus, and show for several problems such as consistency or regression that only some of the modules of an action theory are necessary.

Amir [START_REF] Amir | De)composition of situation calculus theories[END_REF] focuses on design and maintainability of action descriptions applying many of the concepts of the object-oriented paradigm in the Situation Calculus. In that work, guidelines for a partitioned representation of a given theory are presented, with which the inference task can also be optimized, as it is restricted to the part of the theory that is really relevant to a given query. This is observed specially when different agents are involved: the design of an agent's theory can be done with no regard to others', and after the integration of multiple agents, queries about an agent's beliefs do not take into account the belief state of other agents.

In the referred work, executabilities are as in [START_REF] Pirri | Some contributions to the metatheory of the situation calculus[END_REF] and the same condition on effect laws is assumed, which syntactically precludes the existence of implicit static laws. The frame problem is solved using Reiter's solution [START_REF] Reiter | Knowledge in Action: Logical Foundations for Specifying and Implementing Dynamical Systems[END_REF] and then is also restricted to domains without static laws. Ramifications are dealt with by compiling them away à la Reiter and Lin [START_REF] Lin | State constraints revisited[END_REF] based on the method given in [START_REF] Mcilraith | Integrating actions and state constraints: A closed-form solution to the ramification problem (sometimes)[END_REF], which takes into account only some restricted state constraints.

In spite of using many of the object-oriented paradigm tools and techniques, no mention is made to the concepts of cohesion and coupling [START_REF] Sommerville | Software Engineering[END_REF][START_REF] Pressman | Software Engineering: A Practitioner's Approach[END_REF], which are closely related to modularity [START_REF] Herzig | Cohesion, coupling and the meta-theory of actions[END_REF]. In the approach presented in [START_REF] Amir | De)composition of situation calculus theories[END_REF], even if modules are highly cohesive, they are not necessarily lowly coupled, due to the dependence between objects in the reasoning phase. We do not investigate this further here, but conjecture that this could be done there by, during the reasoning process defined for that approach, avoiding passing to a module a formula of a type different from those it contains.

The present work generalizes and extends Pirri and Reiter's result to the case where S = ∅ and both these works where the syntactical restriction on effect laws is not made. This gives us more expressive power, as we can reason about inexecutabilities, and a better modularity in the sense that we do not combine formulas that are conceptually different (viz. executabilities and inexecutabilities). It also constitutes a better approach for domains with ramifications as we do not impose any restriction on the domain laws we can deal with.

Zhang et al. [START_REF] Zhang | Consistency of action descriptions[END_REF] have also proposed an assessment of what a good action theory should look like. They develop the ideas in the framework of EPDL [START_REF] Zhang | EPDL: A logic for causal reasoning[END_REF], an extended version of PDL which allows for propositions as modalities to represent a causal connection between literals. We do not present the details of that, but concentrate on the main meta-theoretical results. Furthermore, two assumptions are made to preclude the existence of implicit qualifications. Satisfaction of such assumptions means the theory under consideration is safe, i.e., it is uniformly consistent. Such a normal form justifies the two assumptions made and on which their notion of good theories relies.

Given this, they propose algorithms to test the different versions of consistency for a theory T that is in normal form. This test essentially amounts to checking whether T is safe, i.e., whether T |= EPDL a ⊤, for every action a. Success of this check should mean that the theory under analysis satisfies the consistency requirements.

Although they are concerned with the same kind of problems that have been discussed in this work, they take an overall view of the subject, in the sense that all problems are dealt with together. This means that in their approach no special attention (in our sense) is given to the different components of the theory, and then every time something is wrong with it this is taken as a global problem inherent to the theory as a whole. Whereas such a "systemic" view of action theories is not necessarily a drawback (we have just seen the strong interaction that exists between the different sets of laws composing an action theory), being modular in our sense allows us to better identify the "problematic" laws and take care of them. Moreover, the advantage of allowing to find the set of laws which must be modified in order to achieve the desired consistency is made evident by the algorithms we have proposed (while their results only allow to decide whether a given theory satisfies some consistency requirement).

Lang et al. [START_REF] Lang | Causal theories of action -a computational core[END_REF] address consistency of action theories in a version of the causal laws approach [3], focusing on the computational aspects.

To solve the frame problem, they suppose an abstract notion of completion. Given a theory T a containing logical information about a's direct effects as well as the indirect effects that may follow (expressed in the form of causal laws), the completion of T a , roughly speaking, is the original theory T a amended of some axioms stating the persistence of all non-affected (directly nor indirectly) literals. (Note that such a notion of completion is close to the underlying semantics of the dependence relation used throughout the present work, which

[drop white ]white, [drop black,white ]black and [drop black,white ]white, where drop black is the action of dropping the coin on a black square (analogously for the others) and drop = drop black ∪ drop white ∪ drop black,white , with "∪" the nondeterministic composition of actions.

essentially amounts to the explanation closure assumption [START_REF] Schubert | Monotonic solution of the frame problem in the situation calculus: an efficient method for worlds with fully specified actions[END_REF].)

Their executability problem is to check whether action a is executable in all possible initial states (Zhang et al.'s safety property). This amounts to testing whether every possible state w has a successor w ′ reachable by a such that w and w ′ both satisfy the completion of T a . For the Walking Turkey Scenario, the formalization of action tease with causal laws is given by:

T tease =      ⊤ tease ⇒ walking, ¬alive ⇒ ¬walking     
where the first formula is a conditional effect law for tease, and the latter a causal law in McCain and Turner's sense. We will not dive in the technical details, and just note that the executability check will return "no" for this example as tease cannot be executed in a state satisfying ¬alive.

In the mentioned work, the authors are more concerned with the complexity analysis of the problem of doing such a consistency test and no algorithm for performing it is given, however. Despite the fact their motivation is the same as ours, again what is presented is a kind of "yes-no tool" which can help in doing a meta-theoretical analysis of a given action theory, and many of the comments concerning Zhang et al.'s approach could be repeated here.

Another criticism that could be made about both these approaches concerns the assumption of full executability they rely on. We find it too strong to require all actions to be always executable (cf. Section 7), and to reject as bad an action theory admitting situations where some action cannot be executed at all. As an example, consider a very simple action theory S , E , X , I , where S = {walking → alive}, E = {[tease]walking}, X = { tease ⊤}, and I = ∅, with a dependence relation given by ;= { tease, walking }. Observe that, with our approach, it suffices to derive the implicit inexecutability law ¬alive → [tease]⊥, change I , and the system will properly run in situations where ¬alive is the case.

On the other hand, if we consider the equivalent representation of such an action theory in the approach of Lang et al., after computing the completion of T tease , if we test its executability, we will get the answer "no", the reason being that tease is not executable in the possible state where ¬alive holds. Such an answer is correct, but note that with only this as guideline we have no idea about where a possible modification in the action theory should be carried out in order to achieve full executability for tease. The same observation holds for Zhang et al.'s proposal.

Just to see how things can be even worse, let the same action theory as above, but with X = {alive → tease ⊤}, obtained by its correction with the algorithms we proposed. Observe that the resulting theory satisfies all our postulates. It is not hard to see, however, that the representation of such an action theory in the above frameworks, when checked by their respective consistency tests, is still considered to have a problem.

This problem arises because Lang et al.'s proposal do not allow for executability laws, thus one cannot make the distinction between X = { tease ⊤}, X = {alive → tease ⊤} and X = ∅. By their turn, Zhang et al.'s allows for specifying executabilities, however their consistency definitions do not distinguish the cases alive → tease ⊤ and tease ⊤.

A concept similar to that of implicit static laws was firstly addressed, as far as we are concerned, in the realm of regulation consistency with deontic logic [START_REF] Cholvy | Checking regulation consistency by using SOL-resolution[END_REF]. Indeed, the notions of regulation consistency given in the mentioned work and that of modularity presented in [START_REF] Herzig | On the modularity of theories[END_REF] and refined here can be proved to be equivalent. The main difference between the mentioned work and the approach in [START_REF] Herzig | On the modularity of theories[END_REF] relies on the fact that in [START_REF] Cholvy | Checking regulation consistency by using SOL-resolution[END_REF] some syntactical restrictions on the formulas have to be made in order to make the algorithm to work.

Lifschitz and Ren [START_REF] Lifschitz | Towards a modular action description language[END_REF] propose an action description language derived from C+ [START_REF] Giunchiglia | Nonmonotonic causal theories[END_REF] in which domain descriptions can also be decomposed in modules. Contrarily to our setting, in theirs a module is not a set of formulas for given action a, but rather a description of a subsystem of the theory, i.e., each module describes a set of interrelated fluents and actions. As an example, a module describing Lin's suitcase [START_REF] Lin | Embracing causality in specifying the indirect effects of actions[END_REF] should contain all causal laws in the sense of C+ that are relevant to the scenario. Actions or fluents having nothing to do, neither directly nor indirectly, with the suitcase should be described in different modules. This feature makes such a decomposition somewhat domaindependent, while here we have proposed a type-oriented modularization of the formulas, which does not depend on the domain.

In the referred work, modules can be defined in order to specialize other modules. This is done by making the new module to inherit and then specialize other modules' components. This is an important feature when elaborations are involved. In the suitcase example, adding a new action relevant to the suitcase description can be achieved by defining a new module inheriting all properties of the old one and containing the causal laws needed for the new action. Such ideas are interesting from the standpoint of software and knowledge engineer: reusability is an intrinsic property of the framework, and easy scalability promotes elaboration tolerance.

Consistency of a given theory and how to prevent conflicts between modules (independent or inherited) however is not addressed.

In this work we have illustrated by some examples what we can do in order to make a theory intuitive. This involves theory modification. Action theory change has been addressed in the recent literature on revision and update [START_REF] Li | What is believed is what is explained[END_REF][START_REF] Liberatore | A framework for belief update[END_REF][START_REF] Eiter | Updating action domain descriptions[END_REF]. In [START_REF] Herzig | Elaborating domain descriptions[END_REF] we have investigated this issue and shown the importance that modularity has in such a task.

Conclusion

Our contribution is twofold: general, as we presented postulates that apply to all reasoning about actions formalisms; and specific, as we proposed algorithms for a dependence-based solution to the frame problem.

We have defined here the concept of modularity of an action theory and pointed out some of the problems that arise if it is not satisfied. In particular we have argued that the non-dynamic part of action theories could influence but should not be influenced by the dynamic one. 9We have put forward some postulates, and in particular tried to demonstrate that when there are implicit static and inexecutability laws then one has slipped up in designing the action theory in question. As shown, a possible solution comes into its own with Algorithms 1 and 2, which can give us some guidelines in correcting an action theory if needed. By means of examples we have seen that there are several alternatives of correction, and choosing the right module to be modified as well as providing the intuitive information that must be supplied is up to the knowledge engineer.

Given the difficulty of exhaustively enumerating all the preconditions under which a given action is executable (and also those under which such an action cannot be executed), it is reasonable to expect that there is always going to be some executability precondition ϕ 1 and some inexecutability precondition ϕ 2 that together lead to a contradiction, forcing, thus, an implicit static law ¬(ϕ 1 ∧ ϕ 2 ). This is the reason we propose to state some information about both executabilities and inexecutabilities, and then run the algorithms in order to improve the description.

It could be argued that unintuitive consequences in action theories are mainly due to badly written axioms and not to the lack of modularity. True enough, but what we have presented here is the case that making a domain description modular gives us a tool to detect at least some of such problems and correct it.

(But note that we do not claim to correct badly written axioms automatically and once for all.) Besides this, having separate entities in the ontology and controlling their interaction help us to localize where the problems are, which can be crucial for real world applications.

In this work we have illustrated by some examples what we can do in order to make a theory intuitive. This involves theory modification. In [START_REF] Varzinczak | What is a good domain description? evaluating and revising action theories in dynamic logic[END_REF] we have presented a general method for changing a domain description given a formula we want to contract. Their we have defined a semantics for theory contraction and also presented its syntactical counterpart through contraction operators.

Soundness and completeness of such operators with respect to the semantics have been established. In that work we have also shown that modularity is a sufficient condition for contraction to be successful. This gives further evidence that the notion of modularity is fruitful.

Our postulates can be formulated in any reasoning about actions framework, but the algorithms require a decidable logic (in particular Algorithm 2). PDL is one candidate for that, as we have seen along the paper. For first-order-based frameworks the consistency checks of Algorithms 1 and 2 are undecidable. We can get rid of this by assuming that there is no function symbol in the language. In this way, the result of NewCons(.) is finite and the algorithm terminates. Hence another candidate for our ideas would have been the Situation Calculus fragment with only propositional fluents.

The present paper is also a step toward a solution to the problem of indirect dependences: indeed, if the implicit dependence shoot ; ¬walking is not in ;, then after running Algorithm 2 we get an indirect inexecutability (loaded ∧ walking) → [shoot]⊥, i.e., shoot cannot be executed if loaded ∧ walking holds. Such an unintuitive inexecutability is not in I and thus indicates the missing indirect dependence.

The general case is nevertheless more complex, and it seems that such indirect dependences cannot be computed automatically in the case of indeterminate effects (cf. the example in [START_REF] Castilho | It depends on the context! a decidable logic of actions and plans based on a ternary dependence relation[END_REF]). We are currently investigating this issue.

The first work on formalizing modularity in logical systems in general is due to Garson [START_REF] Garson | Modularity and relevant logic[END_REF]. Modularity of theories in reasoning about actions was originally defined in [START_REF] Herzig | Domain descriptions should be modular[END_REF]. Modularization of ontologies in description logics is addressed in [START_REF] Grau | Modularity and web ontologies[END_REF]. A different viewpoint of the work we presented here can be found in [START_REF] Herzig | Cohesion, coupling and the meta-theory of actions[END_REF], where modularity of action theories is assessed from a software engineering perspective. A modularity-based approach for narrative reasoning about actions is given in [START_REF] Kakas | Modular-E: an elaboration tolerant approach to the ramification and qualification problems[END_REF]. In [START_REF] Herzig | A modularity approach for a fragment of ALC[END_REF] we show that our modularity notion can also be extended to ontologies in the description logic ALC.

Our postulates do not take into account causality statements linking propositions such as those defined in [START_REF] Lin | Embracing causality in specifying the indirect effects of actions[END_REF]3,[START_REF] Gustafsson | Embracing occlusion in specifying the indirect effects of actions[END_REF][START_REF] Thielscher | Ramification and causality[END_REF]. This could be a topic for further investigation.

Let S , E a , X a , I a with ; be an action theory for a, and let ϕ → a ⊤ ∈ X a , C a = E a ∪ I a , and Ĉa ⊆ C a . We define: If χ = ⊥, the result is trivial. Otherwise, we have the following cases:

ϕ Ĉa = {ϕ i : ϕ i → [a]ψ i ∈ Ĉa } ψ Ĉa = {ψ i : ϕ i → [a]ψ i ∈ Ĉa } Moreover,
• If atm(χ) ⊂ atm(indep ′ a )
, then the premise is false (and the lemma trivially holds).

• If atm(χ) = atm(indep ′ a ), the lemma holds. We have that M is a ;-model, by the definition of R a . By the definition of W, M is a model of S . We have that M is a model of E a and I a , too: for every

ϕ i → [a]ψ i ∈ C a and every world w ∈ W, if |= M w ϕ i , then, by the definition of R a , |= M w ′ ψ i for all w ′ ∈ W such that wR a w ′ . Moreover, M is also a model of X a : for every ϕ i → a ⊤ ∈ X a and every world w ∈ W, if |= M w ϕ i , then E a (w) = {ϕ i → [a]ψ i ∈ E a : |= M w ϕ i }, and indep a (w) = {¬ℓ : a ; ℓ and |= M w ¬ℓ} are such that S ∪ {ϕ i , ϕ E a (w) } ∪ indep a (w) |= CPL ⊥, where ϕ E a (w) = {ϕ i : ϕ i → [a]ψ i ∈ E a (w)}

Fig. 3 .

 3 Fig. 3. A model of an action theory and its big model M big .

  and |= M w ϕ, and wR a w ′ . Hence, |= M w ϕ i → a ⊤, and thus M is a model of S , E a , X a , I a and ;.

1 , X tease 1 ,

 11 I tease 1 with ; as above. For the action tease, we have the executability tease ⊤. Now, from E tease 1 , I tease

1

 1

Definition 17

 17 Let ϕ ∈ Fml and χ a clause. χ is an implicate of ϕ if and only if ϕ |= CPL χ. In our running example, walking ∨ alive and ¬walking ∨ alive are implicates of the set of formulas {walking → alive, walking}. Definition 18 Let ϕ ∈ Fml and χ a clause. χ is a prime implicate of ϕ if and only if

  shoot ⊤} and I shoot = {[shoot]⊥}, with the dependence relation ;= { shoot, ¬alive , shoot, ¬walking . For this theory Algorithm 1 returns S imp* = {¬hasGun}.

2 , X tease 2 , I tease 2 with

 222 ; as given above. From E tease 2 we get the law ⊤ → [tease]walking, whose antecedent is consistent with S . As long as |= ; ¬alive → [tease]¬alive and S ∪ {walking} |= CPL alive, and because S , I tease 2|= PDL (⊤ ∧ ¬alive) → [tease]⊥, we caught an implicit inexecutability. As there is no other combination of effect laws for tease, we end the simulation here.

From

  this and (A.2), we have S ∪ {ψ E a (w) } ∪ indep a (w) |= CPL ⊥, whereψ E a (w) = {ψ i : ϕ i → [a]ψ i ∈ E a (w)} As W is maximal, there exists w ′ such that |= M w ′ ψ E a (w) ∧ indep a (w). AsR a is maximal by definition, we have wR a w ′ . Hence there exists at least one w ′ such that wR a w ′ , and |= M w a ⊤.

(B. 4 )

 4 Suppose S , I a |= PDL ϕ → [a]⊥ for some ϕ ∈ Fml. Then there exists a PDLmodel M = W, R a such that |= M S ∧ I a and |= M ϕ → [a]⊥. This means that there is a possible world v ∈ W such that |= M v ϕ and |= M v [a]⊥.(We are going to build a ;-model of S , E a , X a , I a , and hence conclude that S , E a , X a ,I a |= ; ϕ → [a]⊥.)For given w ∈ W, we define:I a (w) = {ϕ i → [a]⊥ ∈ I a : |= M w ϕ i }Because S , E a , X a , I a with ; satisfies Postulate PS, we can extend M to a big model M ′ = W ′ , R ′ a such that W = valuations(S ), and R ′ a is defined such that for all w, w ′ ∈ W ′ , wR ′ a w ′ if and only if• |= M ′w ′ ¬ℓ for all ℓ such that a ; ℓ and |=M ′ w ¬ℓ; • |= M ′ w ′ ψ i for every ϕ i → [a]ψ i ∈ E a such that |= M ′ w ϕ i ; and • I a (w) = ∅.By definition, M ′ is a ;-model. We also have |=M ′ S , by the definition of W ′ . M ′ is a model of E a , too: for every ϕ i → [a]ψ i ∈ E a and every w ∈ W ′ , if |= M ′ w ϕ i , then |= M ′ w ′ ψ i for all w ′ ∈ W ′ such that wR ′ a w ′ . Clearly M ′ is also a model of I a : for every ϕ i → [a]⊥ ∈ I a and every w ∈ W ′ , if |= M ′ w ϕ i , then I a (w) = ∅ and R ′ a (w) = ∅. M ′ is a model of X a , too: for every ϕ i → a ⊤ ∈ X a and every w ∈ W ′ , if |= M ′ w ϕ i , then E a (w) = {ϕ i → [a]ψ i ∈ E a : |= M w ϕ i } and indep a (w) = {¬ℓ : a ; ℓ and |= M w ¬ℓ} are such that S , I a |= PDL (ϕ E a (w) ∧ indep a (w)) → [a]⊥, where ϕ E a (w) = {ϕ i : ϕ i → [a]ψ i ∈ E a (w)} The justification is that S , I a |= PDL (ϕ E a (w) ∧ indep a (w)) → [a]⊥ would imply S , E a , X a , I a |= ; (ϕ E a (w) ∧indep a (w)) → [a]⊥, and as long asϕ i → a ⊤ ∈ X a , S , E a , X a , I a |= ; ¬(ϕ i ∧ ϕ E a (w) ∧ indep a (w)).As by hypothesis S , E a , X a , I a satisfies PS, S |= CPL ¬(ϕ i ∧ ϕ E a (w) ∧ indep a (w)), and then w / ∈ W ′ .Hence, from S ,I a |= PDL (ϕ E a (w) ∧ indep a (w)) → [a]⊥ and (B.4), it follows that S ∪ {ψ E a (w) } ∪ indep a (w) |= CPL ⊥,whereψ E a (w) = {ψ i : ϕ i → [a]ψ i ∈ E a (w)} As W ′ is maximal, there exists w ′ such that |= M ′ w ′ ψ E a (w) ∧ indep a (w). As R ′ ais maximal by definition, we have wR ′ a w ′ . Hence there exists at least one w ′ such that wR ′ a w ′ , and then |=M ′ w ′ a ⊤.Therefore, M ′ is a model of S , E a , X a , I a and ;.Looking at v ∈ W ′ , we must have S ,I a |= PDL (ϕ E a (v) ∧ indep a (v)) → [a]⊥, because otherwise R a (v) = ∅,against the hypothesis that |= M v [a]⊥. Hence, from (B.4) it follows that S ∪ {ψ E a (v) } ∪ indep a (v) |= CPL ⊥, and then there exists at least one v ′ such that vR ′ a v ′ , and then |= M ′ v ′ a ⊤. From this it follows that S , E a , X a , I a |= ; ϕ → [a]⊥. Therefore S , E a , X a , I a and ; satisfy Postulate PI. C Proof of Theorem 37 Let S , E , X , I with ; satisfy PS*. S , E , X , I with ; satisfies PI* if and only if S , E a , X a , I a and ; satisfy PI for all a ∈ Act. (⇒): Suppose that S , E a , X a , I a |= ; ϕ → [a]⊥. By monotonicity, S , E , X , I |= ; ϕ → [a]⊥, too. Now suppose that S , I a |= PDL ϕ → [a]⊥. Then there exists a possible worlds model M = W, R a such that |= M S ∧ I a and there is a pos-By definition, M ′ is a model of the dependence relation ;. Because, by hypothesis, S , E , X , I satisfies PS*, there is no implicit static law, i.e., for every a i ∈ Act and every w∈ W ′ , if X a i (w) = ∅, then I a i (w) = ∅. Then, as W ′ = valuations(S ), M ′ is a model of S . We have that M ′ is a model of E , too: it is a model of E a , and given a ′ = a, for every ϕ i → [a ′ ]ψ i ∈ E and every w ∈ W ′ , if |= M ′ w ϕ i , then |= M ′w ′ ψ i for all w ′ ∈ W ′ such that wR a ′ w ′ . Clearly M ′ is also a model of I : it is a model of I a , and given a ′ = a, for every ϕ i → [a ′ ]⊥ ∈ I and every w ∈ W ′ , if |= M ′ w ϕ i , then I a ′ (w) = ∅ and R a ′ (w) = ∅. M ′ is a model of X , too: besides being a model of X a , for every

  is a ;-model if and only if whenever wR a w ′ then:

	• if a ; p, then |= M w p implies |= M w ′ p; and • if a ; ¬p, then |= M w p implies |= M w ′ p.
	Figure 2 depicts the dependence-based condition on models.
			. . . , ¬p, . . .
	a			a
	M : . . . , ¬p, . . .	a	. . . , ¬p, . . .	. . . , p, . . .
			a	a
			. . . , ¬p, . . .
	Fig. 2. Dependence-based condition: preservation of literal ¬p under hypothesis
	a ; p.
	Given a ;-model M , Φ and T , |= M Φ and |= M T are defined as in Definition 3.
	Definition 14 A formula Φ is a ;-based consequence of the set of global
	axioms T in the class of all ;-models (noted T |= ; Φ) if and only if for every ;-model M , if |= M T , then |= M Φ.
	In our example it thus holds
	S , E , X , I |= ; hasGun → [load]hasGun
	and
	S , E , X , I |= ; ¬alive → [tease]¬alive.
	In this way, the dependence-based approach solves the frame problem. How-
	ever, it does not entirely solve the ramification problem: while indirect effects
	such as loaded → [shoot]¬walking can be deduced with |= ; without explicitly stating that in the set of effect laws for shoot, we nevertheless still have to
	state indirect dependences such as shoot ; ¬walking. However, according to
	Reiter's view:

  Theorem 22 Let S imp* be the output of Algorithm 1 on input S , E a , X a , I a and ;. Then S , E a , X a , I a with ; satisfies Postulate PS if and only if S imp* = ∅.Theorem 23 Let S imp* be the output of Algorithm 1 on input S , E a , X a , I a and ;. Then (1) S ∪ S imp* , E a , X a , I a with ; satisfies PS (has no implicit static law).(2) S , E a , X a , I a |= PROOF. Item (1) is straightforward from the termination of Algorithm 1 and Theorem 22. Item (2) follows from the fact that by the if-test in Algorithm 1, the only formulas that are put in S imp* at each execution of the repeatloop are exactly those that are implicit static laws of the current theory, and therefore of the original theory, too.Corollary 24 For all ϕ ∈ Fml, S , E a , X a , I a |= ; ϕ if and only if S ∪ S imp* |= CPL ϕ. PROOF. For the left-to-right direction, let S , E a , X a , I a |= ; ϕ, for given ϕ ∈ Fml. Then S ∪ S imp* , E a , X a , I a |= ; ϕ, by monotonicity. By Theorem 23-(1), S ∪ S imp* , E a , X a , I a has no implicit static law, hence S ∪ S imp* |= CPL ϕ.

	PROOF. See Appendix A.

; S imp* .

  1 , I 1 . Note that S 2 , E 2 , X 2 , I 2 and ; satisfy Postulate PS. From [tease]walking it follows with S 2 that [tease]alive, i.e., in every situation, after teasing the turkey, it is alive: S 2 , E tease 2 |= PDL [tease]alive. Now as tease ; alive, the status of alive is not modified by tease, and we have S 2 , E tease |= ; ¬alive → [tease]⊥, i.e., an inexecutability law stating that a dead turkey cannot be teased. But S 2 , I tease 2 |= PDL ¬alive → [tease]⊥, hence Postulate PI is violated. Here the formula ¬alive → [tease]⊥ is an example of what we call an implicit inexecutability law.

	From the above, it follows
	S 2 , E tease 2	, X tease 2	, I tease 2
			2	|= ; ¬alive → [tease]¬alive.

  , a ; ℓ i and S , I a |= PDL (ϕ Êa ∧ ¬χ) → [a]⊥ then I a imp := I a imp ∪ {(ϕ Êa ∧ ¬χ) → [a]⊥} Theorem 28 Algorithm 2 terminates. PROOF. Straightforward, as we have assumed S , E , I and ; finite, and NewCons(.) is finite (because S and ψ Êa are finite). Theorem 31 Let I a imp be the output of Algorithm 2 on input S , E a , X a , I a and ;. If S , E a , X a , I a with ; satisfies Postulate PS, then it satisfies Postulate PI if and only if I a imp = ∅.

	Example 29 Consider S 2 , E tease 2 Algorithm 2 returns I tease imp = {¬alive → [tease]⊥}. , X tease 2 , I tease and ; as given above. Then 2

Nevertheless, applying Algorithm 2 is not enough to guarantee Postulate PI, as illustrated by the following example:

Example 30 (Incompleteness of Algorithm 2 without PS) Let S = ∅, E a = {p 1 → [a]p 2 }, X a = { a ⊤}, I a = {p 2 → [a]⊥}, and ;= ∅. Then we have S , E a , X a , I a |= ; p 1 → [a]⊥, but running Algorithm 2 on S , E a , X a , I a we get S , I a imp |= PDL p 1 → [a]⊥.

Example 30 shows that the presence of implicit static laws (induced by executabilities) implies the existence of implicit inexecutabilities that are not caught by Algorithm 2. One way of getting rid of this is requiring S , E a , X a , I a and ; to satisfy Postulate PS prior to running Algorithm 2. This gives us the following result:

PROOF. See Appendix B.

  ⇐): Suppose S , E , X , I with ; does not satisfy PS*. Then there is ϕ ∈ Fml such that S , E , X , I |= ; ϕ and S |= CPL ϕ. ϕ is equivalent to ϕ 1 ∧ . . . ∧ ϕ n , with ϕ 1 , . . . , ϕ n ∈ Fml and such that there is at least one ϕ i such that S |= CPL ϕ i (otherwise S |= CPL ϕ). Because the logic is independently axiomatized, there must be some a ∈ Act such that S , E a , X a , I a |= ; ϕ i . From this and S |= CPL ϕ i it follows that S , E a , X a , I a and with ; do not satisfy PS. Corollary 35 S , E , X , I and ; satisfy Postulate PS* if and only if the big model for S , E , X , I and ; is a model of S , E , X , I . PROOF. The proof follows from Theorems 16 and 34.Theorem 36 If S , E , X , I with ; satisfies PS*, then S , E , X , I with ; satisfies PC* if and only if S , E a , X a , I a and ; satisfy PC for all a ∈ Act.PROOF. Let S , E , X , I and ; satisfy PS*.(⇒): Suppose that S , E a , X a , I a with ; does not satisfy PC, for some a ∈ Act. Because S , E , X , I and ; satisfy PS*, S , E a , X a , I a and ; satisfy Postulate PS (Theorem 34), and then S |= CPL ⊥. From this it follows that S , E , X , I does not satisfy Postulate PC*.(⇐): Suppose S , E , X , I and ; do not satisfy PC*. Then S , E , X , I |= ; ⊥. Because S , E , X , I with ; satisfies Postulate PS*, S |= CPL ⊥. Since Act = ∅, there is some a ∈ Act such that S , E a , X a , I a |=

a , I a |= ; ϕ and S |= CPL ϕ. Of course S , E , X , I |= ; ϕ, by monotonicity, but still S |= CPL ϕ. Hence S , E , X , I does not satisfy PS*. (; ⊥.

  [shoot]¬alive So, Postulate PE would not help us to deliver the goods.

shoot ⊤}, I 3 = {¬hasGun → [shoot]⊥} together with the dependence shoot ; ¬alive. It satisfies Postulates PS* and PI*, but does not satisfy PE. Indeed: S 3 , E 3 , X 3 , I 3 |= ; ¬hasGun ∨ loaded → [shoot]¬alive and S 3 , E 3 , X 3 , I 3 |= ; ¬hasGun ∨ loaded → [shoot]⊥, but S 3 , E 3 |= ; ¬hasGun ∨ loaded →

  This theorem says that if there are no implicit static laws, then consistency of an action theory can be checked by just checking consistency of S . ; a n ψ if and only if S , E a 1 ,...,an , X a 1 ,...,an , I a 1 ,...,an |= Corollary 46 Let S , E , X , I and ; satisfy Postulate PS*. Then we have S , E , X , I |= ; ϕ → a 1 ; . . . ; a n ⊤ if and only if S , E a 1 ,...,an , X a 1 ,...,an , I a 1 ,...,an |= PROOF. Straightforward, as a special case of Theorem 45. Theorems 43 and 45 together with Corollaries 44 and 46 suggest that we can simulate modularization by sub-domains [40]: If {a 1 , . . . , a n }, Prop ′ is a

	PROOF. See Appendix G.
	And as a consequence, we also optimize testing executability of a plan:

Theorem 38 If S , E , X , I with ; satisfies PS*, then S , E , X , I |= ; ⊥ if and only if S |= CPL ⊥. Theorem 39 If S , E , X , I and ; satisfy Postulate PS*, then S , E , X , I |= ; ϕ → [a]ψ if and only if S , E a , I a |= ; ϕ → [a]ψ. PROOF. See Appendix D. This means that under PS* we have modularity inside E , too: when deducing the effects of a we need not consider the action laws for other actions. Versions for executability and inexecutability can be stated as well: Theorem 40 If S , E , X , I and ; satisfy Postulate PS*, then S , E , X , I |= ; ϕ → a ⊤ if and only if S , X a |= ; ϕ → a ⊤. PROOF. See Appendix E. Theorem 45 Let S , E , X , I and ; satisfy Postulate PS*. Then we have S , E , X , I |= ; ϕ → a 1 ; . . . ; ϕ → a 1 ; . . . ; a n ψ. ; ϕ → a 1 ; . . . ; a n ⊤.

  Zhang et al. propose a normal form for describing action theories, 8 and in-vestigate three levels of consistency. Roughly speaking, a set of laws T is uniformly consistent if it is globally consistent (i.e., T |= EPDL ⊥); a formula Φ is T -consistent if T |= EPDL ¬Φ, for T a uniformly consistent theory; T is universally consistent if (in our terms) every logically possible world is accessible.

  let indep a = {¬ℓ : a ; ℓ}. Lemma 47 Let indep ′ a ⊆ indep a . S ∪ {ψ Ĉa } ∪ indep ′ a |= CPL ⊥ if and only if S ∪ NewCons(ψ Ĉa , S ) ∪ indep ′ a |= CPL ⊥. Ĉa , S ) ∪ indep ′ a |= CPL ⊥, then there exists χ ∈ NewCons(ψ Ĉa , S ) such that S ∪ {χ} ∪ indep ′ a |= CPL ⊥. ∪ {ψ Ĉa }) |= CPL ¬ {¬ℓ i : ¬ℓ i ∈ indep ′ a } if and only if PI(S ∪ {ψ Ĉa }) |= CPL {ℓ i : ¬ℓ i ∈ indep ′ a } if and only if there exists χ ∈ PI(S ∪ {ψ Ĉa }) such that χ |= CPL {ℓ i : ¬ℓ i ∈ indep ′ a } (by Property 4) Lemma 49 Let indep ′ a ⊆ indep a . If we have S ∪ {ϕ, ϕ Ĉa } ∪ indep ′ a |= CPL ⊥ and S ∪ NewCons(ψ Ĉa , S ) ∪ indep ′ a |= CPL ⊥, then there exists χ ∈ NewCons(ψ Ĉa , S ) such that S ∪ {χ} ∪ indep ′ a |= CPL ⊥. PROOF. By Lemma 48 and classical logic. Lemma 50 Let indep ′ a ⊆ indep a . If we have S ∪ {ϕ, ϕ Ĉa } ∪ indep ′ a |= CPL ⊥ and S ∪ NewCons(ψ Ĉa , S ) ∪ indep ′ a |= CPL ⊥, then there exists χ ∈ NewCons(ψ Ĉa , S ) such that both S ∪ {ϕ, ϕ Ĉa } ∪ indep ′ a |= CPL ⊥ and S ∪ {χ} ∪ indep ′ a |= CPL ⊥. Ĉa }∪indep ′ a |= CPL ⊥ and S ∪{χ}∪indep ′ a |= CPL ⊥, then both S ∪{ϕ, ϕ Ĉa }∪ {¬ℓ i : ℓ i ∈ χ and a ; ℓ i } |= CPL ⊥ and S ∪ {χ} ∪ {¬ℓ i : ℓ i ∈ χ and a ; ℓ i } |= CPL ⊥. PROOF. Let S ∪ {ϕ, ϕ Ĉa } ∪ indep ′ a |= CPL ⊥ and χ ∈ NewCons(ψ Ĉa , S ) be such that S ∪ {χ} ∪ indep ′ a |= CPL ⊥.

	PROOF. if and only if PROOF. if and only if PI(S ) ∪ NewCons(ψ Ĉa , S ) ∪ indep ′ S ∪ {ψ Ĉa } ∪ indep ′ a |= CPL ⊥ PI(S ∪ {ψ Ĉa }) ∪ indep ′ S ∪ NewCons(ψ Ĉa , S ) ∪ indep ′ a |= CPL ⊥ a |= CPL ⊥ (by Property 1) if and only if PI(S ∪ {ψ Ĉa }) ∪ indep ′ a |= CPL ⊥ (by Property 2) if and only if {χ} ∪ indep ′ a |= CPL ⊥ if and only if PI(S if and only if S ∪ {χ} ∪ indep ′ a |= CPL ⊥.

a |= CPL ⊥ (by Property 1) if and only if PI(S ) ∪ NewCons(ψ Ĉa , S ) ∪ indep ′ a |= CPL ⊥ (by Property 2) if and only if S ∪ NewCons(ψ Ĉa , S ) ∪ indep ′ a |= CPL ⊥ (by Property 1). Lemma 48 Let indep ′ a ⊆ indep a . If S ∪ NewCons(ψ PROOF. Trivially, by Lemma 49. Lemma 51 Let indep ′ a ⊆ indep a . If χ ∈ NewCons(ψ Ĉa , S ) is such that S ∪ {ϕ, ϕ

  Ĉa } ∪ {¬ℓ i : ℓ i ∈ χ and a ; ℓ i } |= CPL ⊥.Lemma 52 If χ ∈ NewCons(ψ Ĉa , S ) is such that both S ∪ {ϕ, ϕ Ĉa } ∪ {¬ℓ i : ℓ i ∈ χ and a ; ℓ i } |= CPL ⊥ and S ∪ {χ} ∪ {¬ℓ i : ℓ i ∈ χ and a ; ℓ i } |= CPL ⊥, then S ∪ {ϕ, ϕ Ĉa , ¬χ} |= CPL ⊥ and for all ℓ i ∈ χ, a ; ℓ i . Then, the propositional valuation in which χ ℓ←true satisfies S ∪ {χ} ∪ {¬ℓ i : ℓ i ∈ χ and a ; ℓ i }, and then S ∪ {χ} ∪ {¬ℓ i : ℓ i ∈ χ and a ; ℓ i } |= CPL ⊥.Hence there cannot be such a literal, and then for all ℓ i ∈ χ, a ; ℓ i . Now, from a ; ℓ i for all ℓ i ∈ χ, we have |= CPL {¬ℓ i : ℓ i ∈ χ and a ; ℓ i } ↔Now, suppose S |= CPL ϕ for some propositional ϕ. We will build a model M such that M is a ;-model for S , E a , X a , I a that does not satisfy ϕ.Let M = W, R a be such that W = valuations(S ), and R a be such that for all w, w ′ ∈ W, wR a w ′ if and only if • |= M w ′ ψ i for every ϕ i → [a]ψ i ∈ C a such that |= ′ ¬ℓ for all ℓ such that a ; ℓ and |=

	it follows
	S ∪ {ϕ, ϕ From
		S ∪ {χ} ∪ indep ′ a |= CPL ⊥ (hypothesis)
	and because it follows M • |= w	S ∪ indep ′ a |= CPL ⊥, S ∪ {χ} ∪ {¬ℓ M w ϕ i ; and
	• Let atm(χ) ⊂ atm(indep ′ a ). Then, from
		S ∪ {ϕ, ϕ Ĉa } ∪ indep ′ a |= CPL ⊥ (the hypothesis)

i : ℓ i ∈ χ and a ; ℓ i } |= CPL ⊥. PROOF. From S ∪ {ϕ, ϕ Ĉa } ∪ {¬ℓ i : ℓ i ∈ χ and a ; ℓ i } |= CPL ⊥ we conclude S ∪ {¬ℓ i : ℓ i ∈ χ and a ; ℓ i } |= CPL ⊥. From this and the hypothesis S ∪ {χ} ∪ {¬ℓ i : ℓ i ∈ χ and a ; ℓ i } |= CPL ⊥, it follows S ∪ {¬ℓ i : ℓ i ∈ χ and a ; ℓ i } |= CPL ¬χ. If S |= CPL ¬χ, then S ∪ {ψ Ĉa } |= CPL ¬χ, and because χ ∈ NewCons(ψ Ĉa , S ), we have χ |= CPL ¬χ, a contradiction. Hence S ∪ {χ} |= CPL ⊥. Suppose now there is a literal ℓ ∈ χ such that ¬ℓ / ∈ {¬ℓ i : ℓ i ∈ χ and a ; ℓ i }. M w ¬ℓ.

  Hence, M is a model of S , E a , X a , I a and ;. Clearly |= M ϕ, by the definition of W. Hence S , E a , X a , I a |= ; ϕ. Therefore S , E a , X a , I a with ; satisfies Postulate PS.B Proof of Theorem 31Let I a imp be the output of Algorithm 2 on input S , E a , X a , I a and ;. If S , E a , X a , I a with ; satisfies Postulate PS, then it satisfies Postulate PI if and only if I a imp = ∅.Let S , E a , X a , I a be an action theory for a with a dependence relation ;.For every Êa ⊆ E a we define:ϕ Êa = {ϕ i : ϕ i → [a]ψ i ∈ Êa } ψ Êa = {ψ i : ϕ i → [a]ψ i ∈ Êa } Moreover, let indep a = {¬ℓ : a ; ℓ}. Lemma 53 If S , I a |= PDL (ϕ Êa ∧ indep ′ a ) → [a]⊥ and S ∪ {ψ Êa } ∪ indep ′ a |= CPL ⊥, then there is χ ∈ NewCons(ψ Êa , S ) such that S , I a |= PDL (ϕ Êa ∧ ¬χ) → [a]⊥ and a ; ℓ i for all ℓ i ∈ χ. PROOF. Let S , I a |= PDL (ϕ Êa ∧ indep ′ a ) → [a]⊥. Then there is a PDL-model M = W, R a such that |= M S ∧Ia and |= M (ϕ Êa ∧indep ′ a ) → [a]⊥. This means that there is a possible world v ∈ W such that |= Êa ∧ indep ′ a , it follows S ∪ {ϕ Êa } ∪ indep ′ a |= CPL ⊥ (B.1) From hypothesis S ∪ {ψ Êa } ∪ indep ′ a |= CPL ⊥ and Lemma 47, we get S ∪ NewCons(ψ Êa , S ) ∪ indep ′ a |= CPL ⊥ and from this and Lemma 48 we have that there is χ ∈ NewCons(ψ Êa , S ) such that S ∪ {χ} ∪ indep ′ a |= CPL ⊥ (B.2) From (B.1), (B.2) and classical logic, there is χ ∈ NewCons(ψ Êa , S ) such that S ∪ {ϕ Êa } ∪ indep ′ a |= CPL ⊥ and S ∪ {χ} ∪ indep ′ a |= CPL ⊥ From this and Lemma 51 it follows that there is χ ∈ NewCons(ψ Êa , S ) such that S ∪ {ϕ, ϕ Êa } ∪ {¬ℓ i : ℓ i ∈ χ and a ; ℓ i } |= CPL ⊥ and S ∪ {χ} ∪ {¬ℓ i : ℓ i ∈ χ and a ; ℓ i } |= CPL ⊥ This and Lemma 52 gives us that for all ℓ i ∈ χ, a ; ℓ i . Now, because M above is such that |= M v ϕ Êa ∧ indep ′ a , from this and S ∪ {χ} ∪ indep ′ a |= CPL ⊥, we have that |= M v ϕ Êa ∧ ¬χ. Because |= M v [a]⊥, we therefore have S , I a |= PDL (ϕ Êa ∧ ¬χ) → [a]⊥. We are about to prove that if S , E a , X a , I a with ; satisfies Postulate PS, then it satisfies Postulate PI if and only if I a imp = ∅. (⇒): Straightforward, as every time S , E a , X a , I a |= ; ϕ → [a]⊥, we have S , I a |= PDL ϕ → [a]⊥, and then I a imp never changes. (⇐): Suppose that I a imp = ∅. Therefore for all subsets Êa ⊆ E a , we have that for all χ ∈ NewCons(ψ Êa , S ), if S , I a |= PDL (ϕ Êa ∧ ¬χ) → [a]⊥, then there exists ℓ i ∈ χ such that a ; ℓ i (B.3) From (B.3) and Lemma 53, it follows that for all Êa ⊆ E a , if S , I a |= PDL (ϕ Êa ∧ indep ′ a ) → [a]⊥, then S ∪ {ψ Êa } ∪ indep ′ a |= CPL ⊥.

	Proof of Theorem 31
	M v ϕ Êa ∧ indep a and |= M v [a]⊥.
	From |=

M v ϕ

Instead of global consequence, in[START_REF] Castilho | Formalizing action and change in modal logic I: the frame problem[END_REF] local consequence is considered. For that reason, a further modal operator

had to be introduced, giving a logic that is multimodal K plus monomodal S4 for 2, and where axiom schema 2Φ → [a]Φ holds.

Effect laws are often called action laws, but we prefer not to use that term here because it would also apply to executability laws that are to be introduced in the sequel.

Of course this would require a solution to the qualification problem[START_REF] Mccarthy | Epistemological problems of artificial intelligence[END_REF].

Regarding Examples 21 and 25, one might argue that in practice such silly errors will never be made. Nevertheless, the examples here given are quite simplistic, and for applications of real interest, whose complexity will be much higher, we simply cannot rely on the designer's knowledge about all side effects the stated formulas can have.

Note that this concerns the necessary conditions for executability, and thus it is not related to the qualification problem, which basically says that it is difficult to state all the sufficient conditions for executability.

But not as expressive as one might think: For instance, in modeling the nondeterministic action of dropping a coin on a chessboard, we are not able to state [drop](black ∨ white). Instead, we should write something like [drop black ]black,

It might be objected that it is only by doing experiments that one learns the static laws that govern the universe. But note that this involves learning, whereas hereas always done in the reasoning about actions field -the static laws are known once forever, and do not evolve.

Acknowledgments

The authors are grateful to the anonymous referees for useful comments on an earlier version of this paper.

Ivan Varzinczak has been supported by a fellowship from the government of the Federative Republic of Brazil. Grant: CAPES BEX 1389/01-7.

In Theorems 40 and 42, modularity guarantees moreover that no dependence is needed to derive, respectively, executabilities and inexecutabilities.

Let E a 1 ,...,an = 1≤i≤n E a i , X a 1 ,...,an = 1≤i≤n X a i , and I a 1 ,...,an = 1≤i≤n I a i . Under Postulate PS*, deduction of an effect of a sequence of actions a 1 ; . . . ; a n (prediction) needs neither the effect and inexecutability laws for actions other than a 1 , . . . , a n , nor the executability laws of the domain: The next theorem shows that our notion of modularity is also fruitful in plan validation:

¬χ. From this and the hypothesis

Proof of Theorem 22

We are about to prove that S , E a , X a , I a with ; satisfies Postulate PS if and only if S imp* = ∅.

(⇒): Suppose S imp* = ∅. Then at the first step of the algorithm there has been some ϕ → a ⊤ ∈ X a and some Ĉa ⊆ C a such that for some χ ∈ NewCons(ψ Ĉa , S ), S , E a , X

This means that there is a possible world

(We extend M to all other actions S , E , X , I speaks of and obtain a ;model of S , E , X , I .) Given w ∈ W, for each a i ∈ Act we define:

, where for each a ′ = a and every w, w ′ ∈ W ′ , wR a ′ w ′ if and only if

By definition, M ′ is a model of the dependence relation ;. Because, by hypothesis, S , E , X , I with ; satisfies PS*, there is no implicit static law, i.e., for every a i ∈ Act and every w ∈ W ′ , if

a model of X , too: besides being a model of X a , for every a ′ = a and all worlds w ∈ W ′ such that X a ′ (w) = ∅ there is a world accessible by R a ′ , because R a ′ (w) = ∅ in this case would preclude X a ′ (w) = ∅, and otherwise w / ∈ W ′ , which is impossible as long as PS* is satisfied. Thus |=

⊥. (End of the proof of the claim.)

a ′ = a and all worlds w ∈ W ′ such that X a ′ (w) = ∅ there is a world accessible by R a ′ , because R a ′ (w) = ∅ in this case would preclude X a ′ (w) = ∅, and otherwise w / ∈ W ′ , which is impossible as long as PS* is satisfied. Hence |= we have |= M S ∧E a 1 ,...,an ∧X a 1 ,...,an ∧I a 1 ,...,an , and then |= M S ∧E a 1 ,...,an ∧I a 1 ,...,an .

Hence S , E a 1 ,...,an , I (We extend M to build a model of S , E , X , I and then conclude that S , E , X , I |= ; ϕ → a ψ.) Given w ∈ W, for each a i ∈ Act we define:

we extend M to all other actions S , E , X , I speaks of), where for each a ′ = a and every w, w ′ ∈ W ′ , wR a ′ w ′ if and only if

By definition, M ′ is a model of the dependence relation ;. Because, by hypothesis, S , E , X , I satisfies PS*, there is no implicit static law, i.e., for every a i ∈ Act and every w ∈ W ′ , if X a i (w) = ∅, then I a i (w) = ∅. Then, as W ′ = valuations(S ), M ′ is a model of S . We have that M ′ is a model of E , too: it is a model of E a , and given a ′ = a, for every

Clearly M ′ is also a model of I : it is a model of I a , and given a ′ = a, for every ϕ i → [a ′ ]⊥ ∈ I and every w ∈ W ′ , if |= M ′ w ϕ i , then I a ′ (w) = ∅ and R a ′ (w) = ∅. M ′ is a model of X , too: besides being a model of X a , for every a ′ = a and all worlds w ∈ W ′ such that X a ′ (w) = ∅ there is a world accessible by R a ′ , because R a ′ (w) = ∅ in this case would preclude X a ′ (w) = ∅, and otherwise w / ∈ W ′ , which is impossible as long as PS* is satisfied. Hence |= ; ϕ ′′ → a n ψ, for some ϕ ′′ ∈ Fml.

Proof of Theorem 45

(⇒): The proof is by induction on the number of action operators.

Base: n = 1. As S , E , X , I satisfies Postulate PS*, the result follows from Lemma 55.

Induction hypothesis: for any k < n, if S , E , X , I |= ; ϕ → a 1 ; . . . ; a k ψ, then S , E a 1 ,...,a k , X a 1 ,...,a k , I a 1 ,...,a k |= ; ϕ → a 1 ; . . . ; a k ψ.

Step: let S , E , X , I |= ; ϕ → a 1 ; . . . ; a n ψ. By Lemma 56, there is ϕ ′ ∈ Fml such that S , E , X , I |= ; ϕ → a 1 ; . . . ; a n-1 ϕ ′ and S , E , X , I |= ; ϕ ′ → a n ψ. By the induction hypothesis, we have S , E a 1 ,...,a n-1 , X a 1 ,...,a n-1 , I a 1 ,...,a n-1 |= ; ϕ → a 1 ; . . . ; a n-1 ϕ ′ and also S , E an , X an , I an |= ; ϕ ′ → a n ψ. Then, this gives us S , E a 1 ,...,an , X a 1 ,...,an , I a 1 ,.

|=

M S ∧E a 1 ,...,an ∧X a 1 ,...,an ∧I a 1 ,...,an , and hence S , E a 1 ,...,an , X a 1 ,...,an , I a 1 ,...,an |= ; ϕ → a 1 ; . . . ; a n ψ.