This paper was converted on www.awesomepapers.org from LaTeX by an anonymous user.
Want to know more? Visit the Converter page.

Splitting a Hybrid ASP Program

Alex Brik
Google Inc
   USA
Abstract

Hybrid Answer Set Programming (Hybrid ASP) is an extension of Answer Set Programming (ASP) that allows ASP-like rules to interact with outside sources. The Splitting Set Theorem is an important and extensively used result for ASP. The paper introduces the Splitting Set Theorem for Hybrid ASP, which is for Hybrid ASP the equivalent of the Splitting Set Theorem, and shows how it can be applied to simplify computing answer sets for Hybrid ASP programs most relevant for practical applications.


An important result for logic programs is the Splitting Set Theorem [13], which shows how computing an answer set for a program can be broken into several tasks of the same kind for smaller programs. The theorem and its more general variant the Splitting Sequence Theorem are extensively used for proving other theorems, for instance in [2], [10] or [4] among many others. Hybrid Answer Set Programming (Hybrid ASP) [5] is an extension of ASP that allows ASP-like rules to interact with outside sources, which makes Hybrid ASP well suited for practical applications. For instance, recently Hybrid ASP has been used in a system for diagnosing failures of data processing pipelines at Google Inc [9]. The theory of Hybrid ASP, however is not extensively developed. This paper introduces the Splitting Set Theorem for Hybrid ASP and the Splitting Sequence Theorem for Hybrid ASP, which are the equivalents for Hybrid ASP of the similarly named results for ASP, thus making a small step towards developing the theory of Hybrid ASP. The author hopes that the new theorems will have many future applications, in the way analogous to the original Splitting Set Theorem and Splitting Sequence Theorem. The potential of the new theorems to be useful in the future, and the significance of the new results is demonstrated by using them to simplify computation of answer sets for the types of Hybrid ASP programs most relevant for practical applications, i.e. those applications that have answer sets with states having times of the form kΔtk\cdot\Delta t, such as the programs that result from translating descriptions in action languages Hybrid AL [8] and Hybrid ALE [3], or such as the programs used in other applications of Hybrid ASP [7], [6].

The paper is structured as follows. The first section reviews ASP, The Splitting Set Theorem and Hybrid ASP. The paper then presents The Splitting Set Theorem for Hybrid ASP and The Splitting Sequence Theorem for Hybrid ASP. The following section presents an algorithm that simplifies computing answer sets for Hybrid ASP. Finally a short conclusion follows.

1 Review of the Splitting Set Theorem and Hybrid ASP

We will begin with a brief review of ASP. Let AtAt be a nonempty set of symbols called atoms. A block is an expression of the form

b1,,bk,notbk+1,,notbk+mb_{1},...,b_{k},\;not\;b_{k+1},\;...,\;not\;b_{k+m} (1)

where b1,,bk+mb_{1},\;...,\;b_{k+m} are atoms. For a block BB as above, let the set of atoms of BB be defined as At(B){b1,,bk+m}At\left(B\right)\equiv\{b_{1},\;...,\;b_{k+m}\}. B+b1,,bkB^{+}\equiv b_{1},\;...,\;b_{k} is called the positive part of BB, and BB^{-}\equiv notbk+1,,notbk+mnot\;b_{k+1},\;...,\;not\;b_{k+m} is called the negative part of BB. A set operation applied to a block BB will indicate the same set operation applied to At(B)At\left(B\right) with the block being reconstructed from the result of the set operation. For instance b1,b2,notb3,b4\{b1,b4}b_{1},\;b_{2},\;not\;b_{3},\;b_{4}\;\backslash\;\{b_{1},\;b_{4}\} will indicate a block b2,notb3b_{2},\;not\;b_{3}.

A normal propositional logic programming rule is an expression of the form

ra:Br\equiv a:-\;B (2)

where aa is an atom and BB is a block. We define the head of rr as head(r)ahead\left(r\right)\equiv a, and we define the body of rr as body(r)Bbody\left(r\right)\equiv B. We define At(r){a}At(B)At\left(r\right)\equiv\left\{a\right\}\cup At\left(B\right).


Given any set MAtM\subseteq At and a block BB, we say that MM satisfies BB, written MBM\models B, if At(B+)MAt\left(B^{+}\right)\subseteq M and At(B)M=At\left(B^{-}\right)\cap M=\emptyset. For a rule rr, we say that MM satisfies rr, written MrM\models r, if whenever MM satisfies the body of rr, then MM satisfies the head of rr. A normal logic program PP is a set of rules. We say that MAtM\subseteq At is a model of PP, written MPM\models P, if MM satisfies every rule of PP.

A Horn rule is the rule with the empty negative part. A Horn program PP is a set of Horn rules. Each Horn program PP has a least model under inclusion, LMPLM_{P}, which can be defined using the one-step provability operator T[P]T\left[P\right] as follows. For any set AA, let 𝒫(A)\mathcal{P}\left(A\right) denote the set of all subsets of AA. The one-step provability operator T[P]:𝒫(At)𝒫(At)T\left[P\right]:\mathcal{P}\left(At\right)\rightarrow\mathcal{P}\left(At\right) associated with the Horn program PP [11] is defined by setting

T[P](M)=M{a:rP(a=head(r)Mbody(r))}T\left[P\right](M)=M\cup\{a:\exists r\in P\;(a=head(r)\wedge M\models body(r))\}

for any M𝒫(At)M\in\mathcal{P}\left(At\right). We define T[P]n(M)T\left[P\right]^{n}(M) by induction by setting T[P]0(M)=MT\left[P\right]^{0}\left(M\right)=M, T[P]1(M)=T[P](M)T\left[P\right]^{1}(M)=T\left[P\right](M) and T[P]n+1(M)=T[P](T[P]n(M))T\left[P\right]^{n+1}(M)=T\left[P\right](T\left[P\right]^{n}(M)). Then the least model LMPLM_{P} can be computed as LMP=n0T[P]n().LM_{P}=\bigcup_{n\geq 0}T\left[P\right]^{n}(\emptyset).

If PP is a normal logic program and MAtM\subseteq At, then the Gelfond-Lifschitz (GL) reduct of PP with respect to MM [12] is the Horn program PMP^{M} which results by eliminating those rules rr such that M⊧̸body(r)M\not\models body\left(r\right)^{-} and replacing other rules rr by head(r):body(r)+head\left(r\right):-body\left(r\right)^{+}. We then say that MM is a stable model for PP if MM equals the least model of PMP^{M}.

An answer set programming rule is an expression of the form (2) where a,b1,,bk+ma,b_{1},\ldots,b_{k+m} are classical literals, i.e., either positive atoms or atoms preceded by the classical negation sign ¬\lnot. The set of literals of AtAt will be denoted LitAtLit_{At}. Answer sets are defined in analogy to stable models, but taking into account that atoms may be preceded by classical negation and that atoms aa and classically negated atoms ¬a\lnot a are mutually exclusive in answer sets.

We will now follow [13] in review of the Splitting Set Theorem and the Splitting Sequence Theorem. A splitting set for a program PP is any set UAtU\subseteq At such that for every rule rPr\in P if head(r)Uhead\left(r\right)\in U then At(r)UAt\left(r\right)\subseteq U. The set of rules rPr\in P such that At(r)UAt\left(r\right)\subseteq U is called the bottom of PP relative to the splitting set UU and is denoted by bU(P)b_{U}\left(P\right). The set P\bU(P)P\backslash b_{U}\left(P\right) is the top of PP relative to UU.

Consider XAtX\subseteq At. For each rule rPr\in P such that At(body(r)+)UXAt(body\left(r\right)^{+})\cap U\subseteq X and At(body(r))UX=At(body\left(r\right)^{-})\cap U\cap X=\emptyset take the rule rr^{\prime} defined by

head(r):body(r)\Uhead\left(r\right)\;:-\;body\left(r\right)\;\backslash\;U

The program consisting of all rules rr^{\prime} obtained in this way will be denoted by ϵU(P,X)\epsilon_{U}\left(P,X\right).

A solution to PP with respect to UU is a pair (X,Y)\left(X,Y\right) of sets of literals such that

  • XX is an answer set for bU(P)b_{U}\left(P\right)

  • YY is an answer set for ϵU(P\bU(P),X)\epsilon_{U}\left(P\;\backslash\;b_{U}\left(P\right),\;X\right)

  • XYX\cup Y is consistent (a set is consistent if for any atom aa it does not contain both aa and classically negated atom a-a)

Splitting Set Theorem. Let UU be a splitting set for a program PP. A set AA of literals is a consistent answer set for PP if and only if A=XYA=X\cup Y for some solution (X,Y)\left(X,Y\right) to PP with respect to UU.


We will now review extending the definition of a splitting set to a splitting sequence. A sequence is a family whose index set is an initial segment of ordinals, {α:α<μ}\{\alpha:\alpha<\mu\}. The ordinal μ\mu is the length of the sequence. A sequence Uαα<μ\left\langle U_{\alpha}\right\rangle_{\alpha<\mu} of sets is monotone if UαUβU_{\alpha}\subset U_{\beta} whenever α<β\alpha<\beta, and continuous if, for each limit ordinal α<μ\alpha<\mu, Uα=β<αUβU_{\alpha}={\displaystyle\bigcup\limits_{\beta<\alpha}}U_{\beta}.

A splitting sequence for a program PP is a monotone, continuous sequence Uαα<μ\left\langle U_{\alpha}\right\rangle_{\alpha<\mu} of splitting sets for PP such that α<μUα=LitAt{\displaystyle\bigcup\limits_{\alpha<\mu}}U_{\alpha}=Lit_{At}. The definition of a solution with respect to a splitting set is extended to splitting sequence as follows. A solution to PP with respect to Uαα<μ\left\langle U_{\alpha}\right\rangle_{\alpha<\mu} is a sequence Xαα<μ\left\langle X_{\alpha}\right\rangle_{\alpha<\mu} of sets of literals such that

  • X0X_{0} is an answer set for bU0(P)b_{U_{0}}\left(P\right),

  • for any α\alpha such that α+1<μ\alpha+1<\mu, Xα+1X_{\alpha+1} is an answer set for ϵUα(bUα+1(P)\bUα(P),βαXβ)\epsilon_{U_{\alpha}}(b_{U_{\alpha+1}}\left(P\right)\backslash b_{U_{\alpha}}\left(P\right),\;{\displaystyle\bigcup\limits_{\beta\leq\alpha}}X_{\beta}),

  • for any limit ordinal α<μ\alpha<\mu, Xα=X_{\alpha}=\emptyset,

  • α<μXα{\displaystyle\bigcup\limits_{\alpha<\mu}}X_{\alpha} is consistent.

Splitting Sequence Theorem. Let UUαα<μU\equiv\left\langle U_{\alpha}\right\rangle_{\alpha<\mu} be a splitting sequence for a program PP. A set AA of literals is a consistent answer set for PP if and only if A=α<μXαA={\displaystyle\bigcup\limits_{\alpha<\mu}}X_{\alpha} for some solution Xαα<μ\left\langle X_{\alpha}\right\rangle_{\alpha<\mu} to PP with respect to UU.


We will now proceed with the review of Hybrid ASP. A Hybrid ASP program PP has an underlying parameter space SS. Elements of SS are of the form 𝐩=(t,x1,,xl)\mathbf{p}=(t,x_{1},\ldots,x_{l}) where tt is time and xix_{i} are arbitrary parameter values. We shall let t(𝐩)t(\mathbf{p}) denote tt and xi(𝐩)x_{i}(\mathbf{p}) denote xix_{i} for i=1,,li=1,\ldots,l. We refer to the elements of SS as generalized positions. Let AtAt be a set of atoms of PP. Then the universe of PP is At×SAt\times S. Let BB be a block. We will define

B×𝐩{(x,𝐩):xB}.B\times\mathbf{p}\equiv\{\left(x,\mathbf{p}\right):\;x\in B\}.

If MAt×SM\subseteq At\times S, we let GP(M)={𝐩S:(aAt)((a,𝐩)M)}GP(M)=\{\mathbf{p}\in S:(\exists a\in At)((a,\mathbf{p})\in M)\}. Given an initial condition, defined as a subset ISI\subseteq S let GPI(M)=GP(M)IGP_{I}\left(M\right)=GP\left(M\right)\cup I. Given MAt×SM\subseteq At\times S and 𝐩S\mathbf{p}\in S, we say that MM and initial condition II satisfy a block BB of the form (1) at the generalized position 𝐩\mathbf{p}, written MI(B,𝐩)M\models_{I}\left(B,\mathbf{p}\right), if the following holds:

  • if B+B^{+}\neq\emptyset then B+×𝐩MB^{+}\times\mathbf{p}\subseteq M and B×𝐩𝐌=B^{-}\times\mathbf{p\cap M=\emptyset}

  • if B+=B^{+}=\emptyset then B×𝐩𝐌=B^{-}\times\mathbf{p\cap M=\emptyset} and 𝐩GPI(M)\mathbf{p}\in GP_{I}\left(M\right).

We say that MM satisfies a n-tuple of blocks written as B1;;BnB_{1};\;...;\;B_{n} with the initial condition II at the n-tuple of generalized positions (𝐩1,,𝐩n)(\mathbf{p}_{1},\;...,\;\mathbf{p}_{n}), written MI(B1;;Bn,(𝐩1,,𝐩n))M\models_{I}(B_{1};\;...;B_{n},\;(\mathbf{p}_{1},\;...,\mathbf{p}_{n})), if MI(Bi,𝐩i)M\models_{I}(B_{i},\mathbf{p}_{i}) for i=1,,ni=1,...,n.

There are two types of rules in Hybrid ASP. Advancing rules are of the form

ra:B1;B2;;Bn:A,Or\equiv a:-B_{1};B_{2};\ldots;B_{n}:A,O (3)

where AA is a function returning a set of generalized positions, body(r)B1,,Bnbody\left(r\right)\equiv B_{1},\;...,\;B_{n} are blocks, head(r)ahead\left(r\right)\equiv a is a literal, and OO is a subset of SnS^{n} such that if (𝐩1,,𝐩n)O(\mathbf{p}_{1},\ldots,\mathbf{p}_{n})\in O, then t(𝐩1)<<t(𝐩n)t(\mathbf{p}_{1})<\cdots<t(\mathbf{p}_{n}) and A(𝐩1,,𝐩n)A\left(\mathbf{p}_{1},\ldots,\mathbf{p}_{n}\right) (AA applied to 𝐩1,,𝐩n\mathbf{p}_{1},\ldots,\mathbf{p}_{n}) is a subset of SS such that for all 𝐪A(𝐩1,,𝐩n)\mathbf{q}\in A\left(\mathbf{p}_{1},\ldots,\mathbf{p}_{n}\right), t(𝐪)>t(𝐩n)t(\mathbf{q})>t(\mathbf{p}_{n}). Here and in the next rule, we allow blocks to be empty for any ii. OO is called the constraint set of the rule rr and will be denoted by CS(r)CS(r). AA is called the advancing algorithm of the rule rr and is denoted by Adv(r)\operatorname*{Adv}(r). The arity of rule rr, N(r)N\left(r\right), is equal to nn.

The idea is that if (𝐩1,,𝐩n)O(\mathbf{p}_{1},\ldots,\mathbf{p}_{n})\in O and for each ii, BiB_{i} is satisfied at the generalized position 𝐩i\mathbf{p}_{i}, then the function AA can be applied to (𝐩1,,𝐩n)(\mathbf{p}_{1},\ldots,\mathbf{p}_{n}) to produce a set of generalized positions OO^{\prime} such that if 𝐪O\mathbf{q}\in O^{\prime}, then t(𝐪)>t(𝐩n)t(\mathbf{q})>t(\mathbf{p}_{n}) and (a,𝐪)(a,\mathbf{q}) holds. Thus advancing rules are like input-output devices in that the function AA allows the user to derive possible successor generalized positions as well as certain atoms aa which are to hold at such positions. The advancing algorithm AA can access outside sources quite arbitrarily in that it may involve functions for solving differential or integral equations, solving a set of linear equations or linear programming equations, solving an optimization problem, etc. (as for example in [6]).

Stationary rules are of the form

ra:B1;B2;;Bn:H,Or\equiv a:-B_{1};B_{2};\ldots;B_{n}:H,O (4)

where body(r)B1,,Bnbody\left(r\right)\equiv B_{1},...,B_{n} are blocks, head(r)ahead\left(r\right)\equiv a is a literal, HH is called a boolean algorithm of the rule rr and will be denoted by Bool(r)Bool\left(r\right), and OSkO\subseteq S^{k} is the constraint set of the rule rr denoted CS(r)CS(r). A boolean algorithm is a function returning either true or false. We will sometimes treat a boolean algorithm of the rule as a set. For instance HOH\cap O will indicate all the n-tuples of generalized positions (𝐩1,,𝐩n)(\mathbf{p}_{1},\ldots,\mathbf{p}_{n}) such that H(𝐩1,,𝐩n)H\left(\mathbf{p}_{1},\ldots,\mathbf{p}_{n}\right) is true and (𝐩1,,𝐩n)O(\mathbf{p}_{1},\ldots,\mathbf{p}_{n})\in O. The arity of rule rr, N(r)N\left(r\right), is equal to nn.

Stationary rules are much like normal logic programming rules in that they allow us to derive new atoms at a given generalized position 𝐩n\mathbf{p}_{n}. The idea is that if (𝐩1,,𝐩n)OH(\mathbf{p}_{1},\ldots,\mathbf{p}_{n})\in O\cap H and for each ii, BiB_{i} is satisfied at the generalized position 𝐩i\mathbf{p}_{i}, then (a,𝐩n)(a,\mathbf{p}_{n}) holds. The difference is that a derivation with our stationary rules can depend on what happens in the multiple past time points and the boolean algorithm HH can be any sort of a function which returns either true or false.  

For an advancing rule or a stationary rule rr as above we define the positive part of the body of rr, denoted body(r)+B1+;;Bn+body\left(r\right)^{+}\equiv B_{1}^{+};...;B_{n}^{+} and we define the negative part of the body of rr, denoted body(r)B1;;Bnbody\left(r\right)^{-}\equiv B_{1}^{-};...;B_{n}^{-}. For the rest of the paper, we denote by nn the arity of a hybrid ASP rule when the rule is clear from the context.

A Hybrid ASP program PP is a collection of Hybrid ASP advancing and stationary rules. To define the notion of a stable model of PP, we first must define the notion of a Hybrid ASP Horn program and the one-step provability operator for Hybrid ASP Horn programs.

A Hybrid ASP Horn program is a Hybrid ASP program which does not contain any negated atoms. Let PP be a Horn Hybrid ASP program and ISI\subseteq S be an initial condition. Then the one-step provability operator T[P,I]T\left[P,I\right] is defined so that given MAt×SM\subseteq At\times S, T[P,I](M)T\left[P,I\right](M) consists of MM together with the set of all (a,J)At×S(a,J)\in At\times S such that

  1. 1.

    there exists a stationary rule rr and (𝐩1,,𝐩n)CS(r)Bool(r)(GPI(M))n(\mathbf{p}_{1},\ldots,\mathbf{p}_{n})\in CS\left(r\right)\cap Bool\left(r\right)\cap\left(GP_{I}(M)\right)^{n} such that (head(r),J)=(a,𝐩n)(head\left(r\right),J)=(a,\mathbf{p}_{n}) and M(body(r),(𝐩1,,𝐩n))M\models(body\left(r\right),\;(\mathbf{p}_{1},...,\mathbf{p}_{n})) or

  2. 2.

    there exists an advancing rule rr and (𝐩1,,𝐩n)CS(r)(GPI(M))n(\mathbf{p}_{1},\ldots,\mathbf{p}_{n})\in CS\left(r\right)\cap\left(GP_{I}(M)\right)^{n} such that JAdv(r)(𝐩1,,𝐩n)J\in\operatorname*{Adv}\left(r\right)(\mathbf{p}_{1},\ldots,\mathbf{p}_{n}) and M(body(r),(𝐩1,,𝐩n))M\models(body\left(r\right),\;(\mathbf{p}_{1},...,\mathbf{p}_{n})) and a=head(r)a=head\left(r\right).

The stable model semantics for Hybrid ASP programs is defined as follows. Let MAt×SM\subseteq At\times S and II be an initial condition in SS. An Hybrid ASP rule ra:B1;,Bn:A,Or\equiv a:-B_{1};\ldots,B_{n}:A,O is inapplicable for (M,I)(M,I) if for all (𝐩1,,𝐩n)O(GPI(M))n(\mathbf{p}_{1},\ldots,\mathbf{p}_{n})\in O\cap\left(GP_{I}(M)\right)^{n}, either (i) there is an ii such that M⊧̸(Bi,𝐩i)M\not\models(B_{i}^{-},\mathbf{p}_{i}), (ii) A(𝐩1,,𝐩n)GPI(M)=A\left(\mathbf{p}_{1},\ldots,\mathbf{p}_{n}\right)\cap GP_{I}(M)=\emptyset\, if AA is an advancing algorithm, or (iii) A(𝐩1,,𝐩n)=0A(\mathbf{p}_{1},\ldots,\mathbf{p}_{n})=0 if AA is a boolean algorithm.


If rr is not inapplicable for (M,I)\left(M,I\right) then we define the GL reduct of rr over MM and II, denoted by rM,Ir^{M,I} as follows:

  1. 1.

    If rr is an advancing rule ra:B1;;Bn:A,Or\equiv a:-B_{1};...;B_{n}:A,O then rM,IB1+;,Bn+:AM,I,OM,Ir^{M,I}\equiv B_{1}^{+};\ldots,B_{n}^{+}:A^{M,I},O^{M,I} where OM,IO^{M,I} is equal to the set of (𝐩1,,𝐩n)(\mathbf{p}_{1},\ldots,\mathbf{p}_{n}) in O(GPI(M))nO\cap\left(GP_{I}(M)\right)^{n} such that  MI(body(r),(𝐩1,,𝐩n))M\models_{I}(body\left(r\right)^{-},\;(\mathbf{p}_{1},\ldots,\mathbf{p}_{n})) and A(𝐩1,,𝐩n)GPI(M)A(\mathbf{p}_{1},\ldots,\mathbf{p}_{n})\cap GP_{I}(M)\neq\emptyset, and AM,I(𝐩1,,𝐩n)A(𝐩1,,𝐩n)GPI(M)A^{M,I}(\mathbf{p}_{1},\ldots,\mathbf{p}_{n})\equiv A(\mathbf{p}_{1},\ldots,\mathbf{p}_{n})\cap GP_{I}(M).

  2. 2.

    If rr is a stationary rule ra:B1;;Bn:A,Or\equiv a:-B_{1};...;B_{n}:A,O then rM,Ia:B1+;,Bn+:H|OM,I,OM,Ir^{M,I}\equiv a:-B_{1}^{+};\ldots,B_{n}^{+}:H|_{O^{M,I}},O^{M,I} where OM,IO^{M,I} is equal to the set of all (𝐩1,,𝐩n)(\mathbf{p}_{1},\ldots,\mathbf{p}_{n}) in O(GPI(M))nO\cap\left(GP_{I}(M)\right)^{n} such that MI(body(r),(𝐩1,,𝐩n))\ M\models_{I}(body\left(r\right)^{-},\;(\mathbf{p}_{1},\ldots,\mathbf{p}_{n})) and H(𝐩1,,𝐩n)H(\mathbf{p}_{1},\ldots,\mathbf{p}_{n}) is true.


One note to make about the definition above is that GL reduct cannot derive generalized positions that are not in GPI(M)GP_{I}\left(M\right). This is because the range of AM,IA^{M,I} in the definition is restricted to GPI(M)GP_{I}(M).

We form a GL reduct of PP over MM and II, PM,IP^{M,I} as follows.

  1. 1.

    Eliminate all rules which are inapplicable for (M,I)(M,I).

  2. 2.

    If a rule rPr\in P is not eliminated in step 1, then replace it by the rule rM,Ir^{M,I}.

We then say that MM is a stable model of PP with initial condition II if k=0T[PM,I,I]k()=M.{\displaystyle\bigcup\limits_{k=0}^{\infty}}T\left[P^{M,I},I\right]^{k}\left(\emptyset\right)=M.

Answer sets are defined in analogy to stable models, but taking into account that atoms may be preceded by classical negation and that (a,𝐩)(a,\mathbf{p)} and (a,𝐩)\left(-a,\mathbf{p}\right) are mutually exclusive in answer sets.

2 The Splitting Set Theorem for Hybrid ASP

We will now introduce additional notation that will be used throughout the rest of the paper.

Without loss of generality assume that all advancing rules are of the form

a:B1;;Bn:O,Aa:-B_{1};\;...;\;B_{n}:O,A

and all of stationary rules are of the form

a:B1;;Bn:O,Ha:-B_{1};\;...;\;B_{n}:O,H

where aa is a literal, B1B_{1}, …, BnB_{n} are blocks, OO is a constraint set, AA is an advancing algorithm, and HH is a boolean algorithm.

Let MM be a set of literals and generalized position pairs, and let 𝐩\mathbf{p} be a generalized position. Define

M|𝐩{(a,𝐪)M:𝐪=𝐩}M|_{\mathbf{p}}\equiv\{\left(a,\mathbf{q}\right)\in M\;:\;\mathbf{q=p}\}
At(M){a:(a,𝐩)M}At\left(M\right)\equiv\{a\;:\;\left(a,\mathbf{p}\right)\in M\}

Let ULitAt×SU\subseteq Lit_{At}\times S. We say that UU is a splitting set of PP with initial condition (w.i.c.) JJ if for all rPr\in P

  1. 1.

    if rr is advancing and (𝐩1,,𝐩n)CS(r)(\mathbf{p}_{1},\;...,\;\mathbf{p}_{n})\in CS\left(r\right) and 𝐩Adv(r)(𝐩1,,𝐩n)\mathbf{p}\in Adv\left(r\right)\left(\mathbf{p}_{1},\;...,\;\mathbf{p}_{n}\right) and (a,𝐩)U\left(a,\mathbf{p}\right)\in U then both for i=1,,ni=1,...,n, Bi×𝐩iUB_{i}\times\mathbf{p}_{i}\subseteq U and {𝐩1,,𝐩n}GPJ(U)\{\mathbf{p}_{1},\;...,\;\mathbf{p}_{n}\}\subseteq GP_{J}\left(U\right).

  2. 2.

    if rr is stationary and (𝐩1,,𝐩n)CS(r)(\mathbf{p}_{1},\;...,\;\mathbf{p}_{n})\in CS\left(r\right) and (a,𝐩n)U\left(a,\mathbf{p}_{n}\right)\in U then both for i=1,,ni=1,...,n, Bi×𝐩iUB_{i}\times\mathbf{p}_{i}\subseteq U and {𝐩1,,𝐩n}GPJ(U)\{\mathbf{p}_{1},\;...,\;\mathbf{p}_{n}\}\subseteq GP_{J}\left(U\right).


As in the case of the original splitting set theorem [13] the splitting set UU acts to split Hybrid ASP program PP into the part that can derive UU or one of its subsets, and the remaining part of PP, which can derive At×S\UAt\times S\backslash U or one of its subsets. The difference, however, is that for a given rule the conclusion of the rule may be in UU for some n-tuples of generalized positions (𝐩1,,𝐩n\mathbf{p}_{1},\;...,\;\mathbf{p}_{n}) and not for others. So, the splitting set splits not only the program, but the rules themselves. This will be elaborated below.

As in the case of the original splitting set theorem we identify by bU(P)b_{U}\left(P\right) a set of new rules that capture the rules and generalized positions that may contribute to generating UU.

Define Rulesb(U,P)Rules_{b}\left(U,P\right) as

{rP:if r is advancing and there exists (𝐩1,,𝐩n)CS(r)\{\;r\in P\;:\;\text{if }r\text{ is advancing and there exists }(\mathbf{p}_{1},\;...,\;\mathbf{p}_{n})\in CS\left(r\right)
and 𝐩Adv(r)(𝐩1,,𝐩n) such that (a,𝐩)U\text{and }\mathbf{p}\in Adv\left(r\right)(\mathbf{p}_{1},\;...,\;\mathbf{p}_{n})\text{ such that }\left(a,\mathbf{p}\right)\in U
if r is stationary and there exists (𝐩1,,𝐩n)CS(r)Bool(r)\text{if }r\text{ is stationary and there exists }(\mathbf{p}_{1},\;...,\;\mathbf{p}_{n})\in CS\left(r\right)\cap Bool\left(r\right)
such that (a,𝐩n)U}\text{such that }\left(a,\mathbf{p}_{n}\right)\in U\;\}

In other words, Rulesb(U,P)Rules_{b}\left(U,P\right) is the set of all rules of PP that could contribute to UU for some tuple of generalized positions.

For an advancing rule rr let

CSb(U,r){(𝐩1,,𝐩n)CS(r):CS_{b}\left(U,r\right)\equiv\{\;(\mathbf{p}_{1},\;...,\;\mathbf{p}_{n})\in CS\left(r\right)\;:
there exists pAdv(r)(𝐩1,,𝐩n) such that (a,𝐩)U}\text{there exists }p\in Adv\left(r\right)(\mathbf{p}_{1},\;...,\;\mathbf{p}_{n})\text{ such that }\left(a,\mathbf{p}\right)\in U\;\}

For a stationary rule rr let

CSb(U,r){(𝐩1,,𝐩n)CS(r)Bool(r):(a,𝐩n)U}CS_{b}\left(U,r\right)\equiv\{\;(\mathbf{p}_{1},\;...,\;\mathbf{p}_{n})\in CS\left(r\right)\cap Bool\left(r\right)\;:\;\left(a,\mathbf{p}_{n}\right)\in U\;\}

That is CSb(U,r)CS_{b}\left(U,r\right) are all the generalized position tuples for which rr could contribute to UU.

For an advancing rule rRulesb(U,P)r\in Rules_{b}\left(U,P\right) define Advb(U,r)Adv_{b}\left(U,r\right) by

Advb(U,r)(𝐩1,,𝐩n){𝐩:𝐩Adv(r)(𝐩1,,𝐩n)Adv_{b}\left(U,r\right)(\mathbf{p}_{1},\;...,\;\mathbf{p}_{n})\equiv\{\;\mathbf{p}\;:\ \mathbf{p}\in Adv\left(r\right)(\mathbf{p}_{1},\;...,\;\mathbf{p}_{n})
such that (a,𝐩)U if (𝐩1,,𝐩n)CSb(U,r)}\text{such that }\left(a,\mathbf{p}\right)\in U\text{ if }(\mathbf{p}_{1},\;...,\;\mathbf{p}_{n})\in CS_{b}\left(U,r\right)\;\}

Advb(U,r)Adv_{b}\left(U,r\right) is an advancing algorithm that for any tuple of generalized positions will only generate those 𝐩\mathbf{p} that contribute to UU.

For an advancing rule rr let

bU(r)head(r):body(r):CSb(U,r),Advb(U,r)b_{U}\left(r\right)\equiv head\left(r\right):-\;body\left(r\right):CS_{b}\left(U,r\right),\;Adv_{b}\left(U,r\right)

For a stationary rule rr let

bU(r)head(r):body(r):CSb(U,r),Bool(r)b_{U}\left(r\right)\equiv head\left(r\right):-\;body\left(r\right):CS_{b}\left(U,r\right),\;Bool\left(r\right)

Define the bottom of PP with respect to UU, bU(P)b_{U}\left(P\right) as

bU(P){bU(r):rRulesb(U,P)}b_{U}\left(P\right)\equiv\{\;b_{U}\left(r\right)\;:\;r\in Rules_{b}\left(U,P\right)\;\}

The idea is that just like in [13], bU(P)b_{U}\left(P\right) forms only those rules that could contribute to UU, and so XX will be an answer set of bU(P)b_{U}\left(P\right) w.i.c. JJ iff MU=XM\cap U=X for some answer set MM of PP w.i.c. JJ.


We will now proceed to define ϵU(P,X)\epsilon_{U}\left(P,X\right) with the understanding that the same rule may contribute to UU for some generalized position tuples and contribute to LitAt×S\ULit_{At}\times S\;\backslash U for others.

First, we need to identify remainder Rem(U,P)\operatorname*{Rem}\left(U,P\right) of Rulesb(U,P)Rules_{b}\left(U,P\right) not captured by bU(P)b_{U}\left(P\right). That is we need to identify the parts contributing to the complement of UU of those rules that have other parts contributing to UU. This is due to an important difference between Hybrid ASP and ASP. In ASP a rule contributes a single conclusion. Thus if ASP rule contributes to the splitting set then it must be in the bottom of the program. In Hybrid ASP, however, a rule acts more like a collection of rules contributing different conclusions for different generalized position tuples. Consequently, the parts of the rules that contribute to the complement of the splitting set need to be separated from those that contribute to the splitting set itself. We will now proceed with the definition.

For an advancing rule rr define

CSRem(U,r){(𝐩1,,𝐩n)CS(r):CS_{\operatorname*{Rem}}\left(U,r\right)\equiv\{\ (\mathbf{p}_{1},\;...,\;\mathbf{p}_{n})\in CS\left(r\right):
there exists 𝐩Adv(r)(𝐩1,,𝐩n) (a,𝐩)U}\text{there exists }\mathbf{p}\in Adv\left(r\right)(\mathbf{p}_{1},\;...,\;\mathbf{p}_{n})\text{ }\left(a,\mathbf{p}\right)\notin U\;\}

For a stationary rr define

CSRem(U,r){(𝐩1,,𝐩n)CS(r)Bool(r):(a,𝐩n)U}CS_{\operatorname*{Rem}}\left(U,r\right)\equiv\{\;(\mathbf{p}_{1},\;...,\;\mathbf{p}_{n})\in CS\left(r\right)\cap Bool\left(r\right):\;\left(a,\mathbf{p}_{n}\right)\notin U\;\}

That is, CSRem(U,r)CS_{\operatorname*{Rem}}\left(U,r\right) contains those generalized position tuples such that for them the rule rr contributes to the complement of UU.

For an advancing rule rRulesb(U,P)r\in Rules_{b}\left(U,P\right) and (𝐩1,,𝐩n)(\mathbf{p}_{1},\;...,\;\mathbf{p}_{n}) define

AdvRem(U,r)(𝐩1,,𝐩n){{𝐩:𝐩Adv(r)(𝐩1,,𝐩n) s.t. (a,𝐩)U} if (𝐩1,,𝐩n)CSRem(U,r) if (𝐩1,,𝐩n)CSRem(U,r)Adv_{\operatorname*{Rem}}(U,r)(\mathbf{p}_{1},\;...,\;\mathbf{p}_{n})\equiv\left\{\begin{array}[c]{l}\{\mathbf{p}\;:\;\mathbf{p}\in Adv\left(r\right)(\mathbf{p}_{1},\;...,\;\mathbf{p}_{n})\text{ s.t. }\left(a,\mathbf{p}\right)\notin U\;\}\\ \text{ \ \ \ if }(\mathbf{p}_{1},\;...,\;\mathbf{p}_{n})\in CS_{\operatorname*{Rem}}\left(U,r\right)\\ \emptyset\text{ if }(\mathbf{p}_{1},\;...,\;\mathbf{p}_{n})\notin CS_{\operatorname*{Rem}}(U,r)\end{array}\right.

That is AdvRem(U,r)Adv_{\operatorname*{Rem}}(U,r) is a restriction of Adv(r)Adv\left(r\right) to those generalized positions such that for them rr contributes to the complement of UU.

When CSRem(U,r)CS_{\operatorname*{Rem}}\left(U,r\right)\neq\emptyset define

Rem(U,r){head(r):body(r):CSRem(U,r),AdvRem(U,r) if r is advancinghead(r):body(r):CSRem(U,r),Bool(r) if r is stationary\operatorname*{Rem}\left(U,r\right)\equiv\left\{\begin{array}[c]{c}head\left(r\right):-\;body\left(r\right):CS_{\operatorname*{Rem}}\left(U,r\right),\;Adv_{\operatorname*{Rem}}\left(U,r\right)\text{ if }r\text{ is advancing}\\ head\left(r\right):-\;body\left(r\right):CS_{\operatorname*{Rem}}\left(U,r\right),\;Bool\left(r\right)\text{ if }r\text{ is stationary}\end{array}\right.

In other words, Rem(U,r)\operatorname*{Rem}\left(U,r\right) is the part of rr that contributes to the complement of UU.

Define

Rem(U,P){Rem(U,r):rRulesb(U,P) and CSRem(U,r)}\operatorname*{Rem}\left(U,P\right)\equiv\{\;\operatorname*{Rem}\left(U,r\right):\;r\in Rules_{b}\left(U,P\right)\text{ and }CS_{\operatorname*{Rem}}\left(U,r\right)\neq\emptyset\;\}

That is Rem(U,P)\operatorname*{Rem}\left(U,P\right) contain those parts of the rules in Rulesb(U,P)Rules_{b}\left(U,P\right) that contribute to the complement of UU.

Let XUX\subseteq U. For a rule rr define

CSϵ(U,r,X){(𝐩1,,𝐩n)CS(r):CS_{\epsilon}\left(U,r,X\right)\equiv\{\;(\mathbf{p}_{1},\;...,\;\mathbf{p}_{n})\in CS\left(r\right):
for i=1,,n {Bi+×𝐩i}UX and {Bi×𝐩i}X=}\text{for }i=1,\;...,\;n\text{ }\{B_{i}^{+}\times\mathbf{p}_{i}\}\cap U\subseteq X\text{ and }\{B_{i}^{-}\times\mathbf{p}_{i}\}\cap X=\emptyset\;\}

That is CSϵ(U,r,X)CS_{\epsilon}\left(U,r,X\right) is the set of those generalized position tuples such that for them the ”projection” of body(r)body\left(r\right) onto UU is satisfied by XX.

Finally

ϵU(P,X){\epsilon_{U}\left(P,X\right)\equiv\{
ra:B1\At(U|𝐩1);;Bn\At(U|𝐩n):{(𝐩1,,𝐩n)},Q |r^{\prime}\equiv a:-\;B_{1}\backslash At\left(U|_{\mathbf{p}_{1}}\right);\;...;\;B_{n}\backslash At\left(U|_{\mathbf{p}_{n}}\right):\;\{(\mathbf{p}_{1},\;...,\;\mathbf{p}_{n})\},\;Q\text{ }|
ra:B1;;Bn:O,Q{rP:CS(ϵU,r,X)} andr\equiv a:-\;B_{1};\;...;\;B_{n}:O,Q\;\in\;\{\;r\in P:\;CS\left(\epsilon_{U},r,X\right)\neq\emptyset\;\}\text{ and}
(𝐩1,,𝐩n)CSϵ(U,r,X)}(\mathbf{p}_{1},\;...,\;\mathbf{p}_{n})\in CS_{\epsilon}\left(U,r,X\right)\;\}

In other words, for every rule rPr\in P such thatCS(ϵU,r,X)\;CS\left(\epsilon_{U},r,X\right)\neq\emptyset and for every (𝐩1,,𝐩n)CSϵ(U,r,X)(\mathbf{p}_{1},\;...,\;\mathbf{p}_{n})\in CS_{\epsilon}\left(U,r,X\right) where the ”projection” of body(r)body\left(r\right) onto UU is satisfied by XX at (𝐩1,,𝐩n)(\mathbf{p}_{1},\;...,\;\mathbf{p}_{n}), we add to ϵU(P,X)\epsilon_{U}\left(P,X\right) a rule rr^{\prime}, which is a part of rule rr that will be active only for that (𝐩1,,𝐩n)(\mathbf{p}_{1},\;...,\;\mathbf{p}_{n}) with the ”projection” part removed.


Theorem 1. (The Splitting Set Theorem for Hybrid ASP). Let PP be a Hybrid ASP program over LitAt×SLit_{At}\times S. Let ULitAt×SU\subseteq Lit_{At}\times S be a splitting set of PP w.i.c. JSJ\subseteq S. A set MM is a answer set of PP w.i.c. JJ iff XMUX\equiv M\cap U is a answer set of bU(P)b_{U}\left(P\right) w.i.c. JJ and M\UM\backslash U is a answer set of ϵU(P\Rulesb(U,P)Rem(U,P),X)\epsilon_{U}(P\backslash Rules_{b}\left(U,P\right)\cup\operatorname*{Rem}\left(U,P\right),\;X) w.i.c. GPJ(X)GP_{J}\left(X\right).


Sketch of a proof. We first prove that if MM is an answer set of PP w.i.c. JJ then XMUX\equiv M\cap U is an answer set of bU(P)b_{U}\left(P\right) w.i.c. JJ. That is, we want to show that X=k=0T[bU(P)X,J,J]k()X={\displaystyle\bigcup\limits_{k=0}^{\infty}}T\left[b_{U}\left(P\right)^{X,J},J\right]^{k}\left(\emptyset\right). In \supseteq direction we show by induction on kk in one-step provability operator T[bU(P)X,J,J]kT\left[b_{U}\left(P\right)^{X,J},J\right]^{k} that if a rule bU(r)X,Jb_{U}\left(r\right)^{X,J} in bU(P)X,Jb_{U}\left(P\right)^{X,J} derives (a,𝐩)\left(a,\mathbf{p}\right) in T[bU(P)X,J,J]k+1()T\left[b_{U}\left(P\right)^{X,J},J\right]^{k+1}\left(\emptyset\right), then the rule rM,Jr^{M,J} must derive (a,𝐩)\left(a,\mathbf{p}\right) in T[PM,J,J]m+1()T\left[P^{M,J},J\right]^{m+1}\left(\emptyset\right) for some mm. In \subseteq direction we show by induction on kk in T[PM,J,J]k()T\left[P^{M,J},J\right]^{k}\left(\emptyset\right) that if rM,Jr^{M,J} derives (a,𝐩)\left(a,\mathbf{p}\right) in T[PM,J,J]k+1()T\left[P^{M,J},J\right]^{k+1}\left(\emptyset\right) where (a,𝐩)U\left(a,\mathbf{p}\right)\in U, then bU(r)X,Jb_{U}\left(r\right)^{X,J} derives (a,𝐩)\left(a,\mathbf{p}\right) in T[bU(P)X,J,J]m+1()T\left[b_{U}\left(P\right)^{X,J},J\right]^{m+1}\left(\emptyset\right) for some mm.

We then proceed to prove that if MM is an answer set of PP w.i.c. JJ, and YM\UY\equiv M\backslash U then YY is an answer set of QϵU(P\Rulesb(U,P)Rem(U,P),X)Q\equiv\epsilon_{U}(P\backslash Rules_{b}\left(U,P\right)\cup\operatorname*{Rem}\left(U,P\right),X) w.i.c. LGPJ(X)L\equiv GP_{J}\left(X\right). That is, we want to show that Y=k=0T[QY,L,L]k()Y={\displaystyle\bigcup\limits_{k=0}^{\infty}}T\left[Q^{Y,L},L\right]^{k}\left(\emptyset\right). In \supseteq direction we prove by induction that if rY,Lr^{Y,L} derives (a,𝐩)\left(a,\mathbf{p}\right) in T[QY,L,L]k+1()T\left[Q^{Y,L},L\right]^{k+1}\left(\emptyset\right) then there is a corresponding rule qM,Jq^{M,J} in PM,JP^{M,J} that derives (a,𝐩)\left(a,\mathbf{p}\right) in T[PM,J,J]m+1()T\left[P^{M,J},J\right]^{m+1}\left(\emptyset\right) for some mm. In \subseteq direction we prove by induction on kk in T[PM,J,J]k()T\left[P^{M,J},J\right]^{k}\left(\emptyset\right) that if qM,Jq^{M,J} derives (a,𝐩)\left(a,\mathbf{p}\right) in T[PM,J,J]k+1()T\left[P^{M,J},J\right]^{k+1}\left(\emptyset\right) where (a,𝐩)M\U\left(a,\mathbf{p}\right)\in M\backslash U then there is a corresponding rr in QY,LQ^{Y,L} that derives (a,𝐩)\left(a,\mathbf{p}\right) in T[QY,L,L]m+1()T\left[Q^{Y,L},L\right]^{m+1}\left(\emptyset\right) for some mm.

To finish the proof we need to show that if XUX\subseteq U is an answer set of bU(P)b_{U}\left(P\right) w.i.c. JJ and YUCY\subseteq U^{C} is an answer set of QQ w.i.c. LL then MXYM\equiv X\cup Y is an answer set of PP w.i.c. JJ. That is we want to show that M=k=0T[PM,J,J]k()M={\displaystyle\bigcup\limits_{k=0}^{\infty}}T\left[P^{M,J},J\right]^{k}\left(\emptyset\right). We do so by induction in both directions in a manner similar to the previous part of the proof. \square


Similar to the Splitting Sequence Theorem of [13] we also prove the Splitting Sequence Theorem for Hybrid ASP.

Theorem 2. (The Splitting Sequence Theorem for Hybrid ASP). Let Uαα<μ\left\langle U_{\alpha}\right\rangle_{\alpha<\mu} be a monotone continuous sequence of splitting sets for a Hybrid ASP program PP over At×SAt\times S w.i.c. JSJ\subseteq S, and α<μUα=LitAt×S{\displaystyle\bigcup\limits_{\alpha<\mu}}U_{\alpha}=Lit_{At}\times S. MM is an answer set of PP w.i.c. JJ iff M=α<μXαM={\displaystyle\bigcup\limits_{\alpha<\mu}}X_{\alpha} for a sequence Xαα<μ\left\langle X_{\alpha}\right\rangle_{\alpha<\mu} s.t.

  • X0X_{0} is an answer set of bU0(P)b_{U_{0}}\left(P\right) w.i.c. JJ

  • for any α\alpha such that α+1<μ\alpha+1<\mu Xα+1X_{\alpha+1} is an answer set for

    ϵUα(bUα+1(P)\Rulesb(Uα,bUα+1(P))Rem(Uα,bUα+1(P)),βαXβ)\epsilon_{U_{\alpha}}(b_{U_{\alpha+1}}\left(P\right)\;\backslash\;Rules_{b}(U_{\alpha},b_{U_{\alpha+1}}\left(P\right))\cup\operatorname*{Rem}(U_{\alpha},b_{U_{\alpha+1}}\left(P\right)),\;{\displaystyle\bigcup\limits_{\beta\leq\alpha}}X_{\beta}) w.i.c. LαGPJ(βαXβ)L_{\alpha}\equiv GP_{J}({\displaystyle\bigcup\limits_{\beta\leq\alpha}}X_{\beta}) and Xα+1=M(Uα+1\Uα)X_{\alpha+1}=M\cap(U_{\alpha+1}\backslash U_{\alpha}) and βαXβ{\displaystyle\bigcup\limits_{\beta\leq\alpha}}X_{\beta} is an answer set of bUα(P)b_{U_{\alpha}}\left(P\right) w.i.c. JJ.


The proof proceeds by the induction on α\alpha and is a direct application of The Splitting Set Theorem for Hybrid ASP.

In the Splitting Sequence Theorem for Hybrid ASP, bUα+1(P)b_{U_{\alpha+1}}\left(P\right) is a program that derives βα+1Xβ{\displaystyle\bigcup\limits_{\beta\leq\alpha+1}}X_{\beta} as its answer set w.i.c.  JJ. Now, βα+1Xβ{\displaystyle\bigcup\limits_{\beta\leq\alpha+1}}X_{\beta} βα+1Uβ\subseteq{\displaystyle\bigcup\limits_{\beta\leq\alpha+1}}U_{\beta}. So, to derive Xα+1X_{\alpha+1} (i.e. the subset of βα+1Xβ{\displaystyle\bigcup\limits_{\beta\leq\alpha+1}}X_{\beta} that is in Uα+1\UαU_{\alpha+1}\backslash U_{\alpha}) we need to remove from bUα+1(P)b_{U_{\alpha+1}}\left(P\right) the rules that derive βαXβ{\displaystyle\bigcup\limits_{\beta\leq\alpha}}X_{\beta}. That is accomplished by subtracting from bUα+1(P)b_{U_{\alpha+1}}\left(P\right) the rules Rulesb(Uα,bUα+1(P))Rules_{b}(U_{\alpha},b_{U_{\alpha+1}}\left(P\right)). Nevertheless, this subtracts too much as some of the rules in Rulesb(Uα,bUα+1(P))Rules_{b}(U_{\alpha},b_{U_{\alpha+1}}\left(P\right)) contribute to Xα+1X_{\alpha+1} for some generalized position tuples. The parts of those rules that contribute to Xα+1X_{\alpha+1} are Rem(Uα,bUα+1(P))\operatorname*{Rem}(U_{\alpha},b_{U_{\alpha+1}}\left(P\right)), which we then add back. Applying ϵUα\epsilon_{U_{\alpha}} operator to the resulting program (i.e. bUα+1(P)\Rulesb(Uα,bUα+1(P))Rem(Uα,bUα+1(P))b_{U_{\alpha+1}}\left(P\right)\;\backslash\;Rules_{b}(U_{\alpha},b_{U_{\alpha+1}}\left(P\right))\cup\operatorname*{Rem}(U_{\alpha},b_{U_{\alpha+1}}\left(P\right))) then removes the ”useless” part of the rules with respect to βαXβ{\displaystyle\bigcup\limits_{\beta\leq\alpha}}X_{\beta}.


3 An Application: Computing Answer Sets of Hybrid ASP Programs

One of the applications of the Splitting Sequence Theorem for Hybrid ASP is proving the correctness of a certain algorithm for computing answer sets of certain types of Hybrid ASP programs. We will consider only the programs where the set of generalized positions SS is such that if 𝐩S\mathbf{p}\in S then t(𝐩)=kΔtt\left(\mathbf{p}\right)=k\cdot\Delta t where kk\in\mathbb{N}, and for any advancing rule rr of any arity nn, for any (𝐩1,,𝐩n)Sn(\mathbf{p}_{1},\;...,\;\mathbf{p}_{n})\in S^{n} we have that for all 𝐪Adv(r)(𝐩1,,𝐩n)\mathbf{q\in}Adv\left(r\right)(\mathbf{p}_{1},...,\;\mathbf{p}_{n}), t(𝐪)=t(𝐩n)+Δtt\left(\mathbf{q}\right)=t\left(\mathbf{p}_{n}\right)+\Delta t. That is, these are the programs with generalized positions with discrete times of the form kΔtk\Delta t, and whenever an advancing algorithm produces a new generalized position, that generalized position has time larger by Δt\Delta t than the largest time in the input arguments. All applications of Hybrid ASP known to the author are restricted to such programs. This is the case for using Hybrid ASP to diagnose failure of data processing pipelines, as described in [3] and [9]. It is the case for the Hybrid ASP programs that are the result of translation from action languages Hybrid AL [8] and Hybrid ALE [3]. It is also the case for using Hybrid ASP to compute optimal finite horizon policies in dynamic domains [6].

The algorithm.

We will first describe the algorithm informally. We will use some of the new notation which will be defined further below. The algorithm is based on the observation that in Hybrid ASP the facts in the ”future” cannot affect the facts in the ”past”. That is for any two generalized position 𝐩\mathbf{p} and 𝐪\mathbf{q}, if t(𝐩)<t(𝐪)t\left(\mathbf{p}\right)<t\left(\mathbf{q}\right) then the state at 𝐪\mathbf{q} cannot be used to derive the state at 𝐩\mathbf{p} (but the state at 𝐩\mathbf{p} can be used to derive the state at 𝐪\mathbf{q}). Consequently, it should be possible to first derive the states at some minimal time tmint_{\min}, then derive the states at the time tmin+Δtt_{\min}+\Delta t, then derive the states at time tmin+2Δtt_{\min}+2\Delta t and so on.

Without the loss of generality, we will assume that for any initial condition JSJ\subseteq S, there exists 𝐩J\mathbf{p}\in J such that t(𝐩)=0t\left(\mathbf{p}\right)=0. Let PP be a Hybrid ASP program over LitAt×SLit_{At}\times S. Let JSJ\subseteq S be an initial condition. The algorithm will be defined inductively. Suppose the set NN of all the (literal, generalized position) pairs for the generalized positions with time up to kΔtk\cdot\Delta t is derived by the algorithm for some kk. The algorithm will first identify all the advancing rules RulesAdv(P,N,kΔt)Rules_{Adv}\left(P,N,k\Delta t\right) that could derive generalized positions with time (k+1)Δt\left(k+1\right)\cdot\Delta t. These are the advancing rules rr such that NN satisfies their body for some (𝐩1,,𝐩n)CS(r)(\mathbf{p}_{1},...,\;\mathbf{p}_{n})\in CS\left(r\right), where n=arity(r)n=arity\left(r\right) and the time of 𝐩n\mathbf{p}_{n} is kΔtk\cdot\Delta t. The set of the ”next” generalized positions (i.e. the set of generalized positions with time (k+1)Δt\left(k+1\right)\cdot\Delta t) is derived by choosing a subset of the set of all the generalized positions derived by these rules. To formally define such a choice of a subset we introduce a concept of an advancing selector FF, which is a function s.t. for MLitAt×SM\subseteq Lit_{At}\times S and ZSZ\subseteq S, F(M,Z)F\left(M,Z\right) is a subset of ZZ. We will denote the set of ”next” generalized positions derived in this manner by NextGP(P,F,N,kΔt)NextGP\left(P,F,N,k\Delta t\right).

Now, for every ”next” generalized position 𝐪\mathbf{q} in NextGP(P,F,N,kΔt)NextGP\left(P,F,N,k\Delta t\right) derived by an advancing rule rRulesAdv(P,N,kΔt)r\in Rules_{Adv}\left(P,N,k\Delta t\right), it must be that (head(r),𝐪)(head\left(r\right),\;\mathbf{q}) is derived. So, for every 𝐪\mathbf{q} there is a set of literals that will be derived at 𝐪\mathbf{q} by the advancing rules in RulesAdv(P,N,kΔt)Rules_{Adv}\left(P,N,k\Delta t\right). This set of literals will be denoted by HeadAdv(P,N,𝐪)Head_{Adv}(P,N,\mathbf{q}).

Next we turn our attention to the role of the stationary rules in deriving hybrid state at a ”next” generalized position 𝐪\mathbf{q}. There is a set of stationary rules that can contribute to the hybrid state at 𝐪\mathbf{q}. If such a stationary rule rr has nn blocks, then the first n1n-1 blocks are satisfied by NN (at some generalized positions 𝐩1,,𝐩n1\mathbf{p}_{1},\;...,\;\mathbf{p}_{n-1}) and (𝐩1,,𝐩n1,𝐪)(\mathbf{p}_{1},\;...,\;\mathbf{p}_{n-1},\;\mathbf{q}) are in CS(r)Bool(r)CS\left(r\right)\cap Bool\left(r\right). Thus, only the last block, which we will denote by BnB_{n} needs to be evaluated at 𝐪\mathbf{q}. Thus, the relevant part of such a stationary rule rr is a regular ASP rule of the form head(r):Bnhead\left(r\right):-B_{n}. All such regular ASP rules applicable at 𝐪\mathbf{q} will be denoted by RedApp(P,N,𝐪)\operatorname*{Red}\nolimits_{App}(P,\ N,\;\mathbf{q}). A state at 𝐪\mathbf{q} is then an answer set of a regular ASP program RedApp(P,N,𝐪){[h:]:hHeadAdv(P,N,𝐪)}\operatorname*{Red}\nolimits_{App}(P,\ N,\;\mathbf{q})\cup\{[h:-]\;:\;h\in Head_{Adv}(P,N,\mathbf{q})\}. To formally define such a choice we will use a concept of a stationary selector DD, which we will define further below.

We will now define the algorithm formally.

For a set NLitAt×SN\subseteq Lit_{At}\times S and generalized positions 𝐩\mathbf{p} and 𝐪\mathbf{q}, let

RulesAdv(P,N,kΔt){rP:r is an advancing rule and there is Rules_{Adv}\left(P,N,k\Delta t\right)\equiv\{r\in P\;:\;r\text{ is an advancing rule and there is }
 (𝐩1,,𝐩n)GPJ(N)nCS(r) with t(𝐩n)=kΔt and NJ(body(r),(𝐩1,,𝐩n)}\text{ }(\mathbf{p}_{1},\;...,\;\mathbf{p}_{n})\in GP_{J}\left(N\right)^{n}\cap CS\left(r\right)\text{ with }t\left(\mathbf{p}_{n}\right)=k\cdot\Delta t\text{ and }N\models_{J}(body\left(r\right),\;(\mathbf{p}_{1},...,\;\mathbf{p}_{n})\}

Let 𝐩1,,𝐩nGPJ(N)\mathbf{p}_{1},\;...,\;\mathbf{p}_{n}\in GP_{J}\left(N\right). We define the set of advancing rules active at 𝐩1,,𝐩n\mathbf{p}_{1},\;...,\;\mathbf{p}_{n} relative to NN as

RulesAdv(P,N,(𝐩1,,𝐩n)){rRulesAdv(P,N,t(𝐩n)): (𝐩1,,𝐩n)CS(r)}.Rules_{Adv}(P,\;N,\;(\mathbf{p}_{1},\;...,\;\mathbf{p}_{n}))\equiv\{r\in Rules_{Adv}\left(P,\;N,\;t\left(\mathbf{p}_{n}\right)\right)\;:\text{ }(\mathbf{p}_{1},\;...,\;\mathbf{p}_{n})\in CS\left(r\right)\}.

That is, RulesAdv(P,N,(𝐩1,,𝐩n))Rules_{Adv}(P,\;N,\;(\mathbf{p}_{1},\;...,\;\mathbf{p}_{n})) is the set of the advancing rules whose body is satisfied by NN at (𝐩1,,𝐩n)(\mathbf{p}_{1},\;...,\;\mathbf{p}_{n}) and (𝐩1,,𝐩n)CS(r)(\mathbf{p}_{1},\;...,\;\mathbf{p}_{n})\in CS\left(r\right).

We define the set of ”next” generalized positions at 𝐩1,,𝐩n\mathbf{p}_{1},\;...,\;\mathbf{p}_{n} relative to NN as

NextGP(P,N,(𝐩1,,𝐩n))rRulesAdv(P,N,(𝐩1,,𝐩n))Adv(r)(𝐩1,,𝐩n).NextGP(P,N,\;(\mathbf{p}_{1},\;...,\;\mathbf{p}_{n}))\equiv{\displaystyle\bigcup\limits_{r\in Rules_{Adv}(P,\;N,\;(\mathbf{p}_{1},\;...,\;\mathbf{p}_{n}))}}Adv\left(r\right)(\mathbf{p}_{1},\;...,\;\mathbf{p}_{n}).

That is NextGP(P,N,(𝐩1,,𝐩n))NextGP(P,N,\;(\mathbf{p}_{1},\;...,\;\mathbf{p}_{n})) is the set of ”next” generalized positions generated by any advancing rule active at 𝐩1,,𝐩n\mathbf{p}_{1},\;...,\;\mathbf{p}_{n} relative to NN.

For a time kΔtk\cdot\Delta t, we define the set of all the ”next” generalized positions relative to NN, kΔtk\cdot\Delta t and an advancing selector FF as

NextGP(P,F,N,kΔt)F(N,n1𝐩1,,𝐩nGPJ(N)t(𝐩n)=kΔtNextGP(P,N,(𝐩1,,𝐩n))).NextGP(P,F,N,k\Delta t)\equiv F(N,\;{\displaystyle\bigcup\limits_{\begin{subarray}{c}{}_{\begin{subarray}{c}n\geq 1\\ \mathbf{p}_{1},\;...,\;\mathbf{p}_{n}\in GP_{J}\left(N\right)\end{subarray}}\\ t\left(\mathbf{p}_{n}\right)=k\Delta t\end{subarray}}}NextGP(P,N,\;(\mathbf{p}_{1},\;...,\;\mathbf{p}_{n}))\;).

The set of all heads at 𝐪NextGP(P,F,N,kΔt)\mathbf{q}\in NextGP\left(P,F,N,k\Delta t\right) relative to NN is then

HeadAdv(P,N,𝐪){head(r):there exists 𝐩1,,𝐩nGPJ(N) andHead_{Adv}(P,\;N,\;\mathbf{q})\equiv\{\;head\left(r\right)\;:\text{there exists }\mathbf{p}_{1},\;...,\;\mathbf{p}_{n}\in GP_{J}\left(N\right)\text{ and}
 rRulesAdv(P,N,(𝐩1,,𝐩n))\text{ }r\in Rules_{Adv}(P,\;N,\;(\mathbf{p}_{1},\;...,\mathbf{\;p}_{n}))
such that 𝐪Adv(r)(𝐩1,,𝐩n)}.\text{such that }\mathbf{q}\in Adv\left(r\right)(\mathbf{p}_{1},\;...,\;\mathbf{p}_{n})\}\text{.}

Let 𝐩1,,𝐩nGPJ(N)\mathbf{p}_{1},\;...,\;\mathbf{p}_{n}\in GP_{J}\left(N\right). We define the set of stationary rules active at 𝐩1,,𝐩n\mathbf{p}_{1},\;...,\;\mathbf{p}_{n} relative to NN as

RulesStat(P,N,(𝐩1,,𝐩n)){rP:r is stationary andRules_{Stat}(P,\;N,\;(\mathbf{p}_{1},\;...,\;\mathbf{p}_{n}))\equiv\{r\in P\;:r\text{ is stationary and}
 (𝐩1,,𝐩n)CS(r)Bool(r) and for i=1,,n1 NJ(Bi,𝐩i)}.\text{ }(\mathbf{p}_{1},\;...,\;\mathbf{p}_{n})\in CS\left(r\right)\cap Bool\left(r\right)\text{ and for }i=1,\;...,\;n-1\text{ }N\models_{J}(B_{i},\;\mathbf{p}_{i})\;\}\text{.}

That is RulesStat(P,N,(𝐩1,,𝐩n))Rules_{Stat}(P,\;N,\;(\mathbf{p}_{1},\;...,\;\mathbf{p}_{n})) is the set of stationary rules with n1n-1 blocks satisfied by NN at 𝐩1,,𝐩n1\mathbf{p}_{1},\;...,\;\mathbf{p}_{n-1} respectively, and (𝐩1,,𝐩n)CS(r)Bool(r)(\mathbf{p}_{1},\;...,\;\mathbf{p}_{n})\in CS\left(r\right)\cap Bool\left(r\right).

We define a stationary selector DD to be a function such that for MAt×SM\subseteq At\times S for 𝐳S\mathbf{z}\in S for an ASP program UU, D(M,𝐳,U)D(M,\;\mathbf{z},\;U) is an answer set of UU. That is, a stationary selector chooses one of answer sets of a regular ASP programs UU.

For a stationary rule rr of the form a:B1;;Bn:O,Ha:-B_{1};\;...;\;B_{n}:O,H\,, we define an applicable reduct of rr

RedApp(r){a:Bn}.\operatorname*{Red}\nolimits_{App}\left(r\right)\equiv\{a:-\;B_{n}\}\text{.}

For 𝐳NewGP(P,F,N,kΔt)\mathbf{z}\in NewGP(P,F,N,k\Delta t) we define the active reduct of PP at 𝐳\mathbf{z} relative to NN as

RedApp(P,N,𝐳){RedApp(r):there exists n1 and (𝐩1,,𝐩n1)GPJ(N)n1\operatorname*{Red}\nolimits_{App}(P,\;N,\;\mathbf{z})\equiv\{\operatorname*{Red}\nolimits_{App}\left(r\right):\;\text{there exists }n\geq 1\text{ and }(\mathbf{p}_{1},\;...,\;\mathbf{p}_{n-1})\in GP_{J}\left(N\right)^{n-1}
 such that rRulesStat(P,N,(𝐩1,,𝐩n1,𝐳)}\text{ such that }r\in Rules_{Stat}(P,\;N,\;(\mathbf{p}_{1},\;...,\;\mathbf{p}_{n-1},\;\mathbf{z})\;\}

Finally, for NAt×SN\subseteq At\times S and ii\in\mathbb{N} let N[i]{(a,𝐩)N:t(𝐩)=iΔt}N\left[i\right]\equiv\{(a,\;\mathbf{p})\in N:\;t\left(\mathbf{p}\right)=i\cdot\Delta t\}. Similarly for ZSZ\subseteq S, Z[i]{𝐩Z:t(𝐩)=iΔt}Z[i]\equiv\{\mathbf{p}\in Z\;:\;t\left(\mathbf{p}\right)=i\cdot\Delta t\}.

We are now ready to formally specify our algorithm. We define a sequence of sets Yii0\left\langle Y_{i}\right\rangle_{i\geq 0} , Yi(At×S)[i]Y_{i}\subseteq(At\times S)[i] as follows:

Y0𝐳J[0]D(,𝐳,RedApp(P,,𝐳))×𝐳Y_{0}\equiv{\displaystyle\bigcup\limits_{\mathbf{z}\in J\left[0\right]}}D(\emptyset,\;\mathbf{z},\;\operatorname*{Red}\nolimits_{App}(P,\;\emptyset,\;\mathbf{z))\times z}

That is, the state at any generalized position 𝐳J\mathbf{z}\in J with time equal to 0 is determined by taking all the stationary rules rr with one block (i.e. rules of the form a:B:O,Ha:-B:O,H ) such that 𝐳OH\mathbf{z}\in O\cap H, composing a regular ASP program from the reducts of the form a:Ba:-B derived from those rules, and then finding an answer set of that program.

Now, suppose YiY_{i} are defined for 0ik0\leq i\leq k and YkY_{k}\neq\emptyset. Let

Zk+1NextGP(P,F,i=0kYi,kΔt).Z_{k+1}\equiv NextGP(P,F,\;{\displaystyle\bigcup\limits_{i=0}^{k}}Y_{i},\;k\Delta t).

That is Zk+1Z_{k+1} is the set of generalized positions with time (k+1)Δt\left(k+1\right)\Delta t derived by the advancing rules RulesAdv(P,i=0kYi,kΔt)Rules_{Adv}\left(P,\;{\displaystyle\bigcup\limits_{i=0}^{k}}Y_{i},\;k\Delta t\right).

Let

Yk+1𝐳Zk+1D(i=0kYi,𝐳,RedApp(P,i=0kYi,𝐳)Y_{k+1}\equiv{\displaystyle\bigcup\limits_{\mathbf{z}\in Z_{k+1}}}D({\displaystyle\bigcup\limits_{i=0}^{k}}Y_{i},\;\mathbf{z},\;\operatorname*{Red}\nolimits_{App}(P,\;{\displaystyle\bigcup\limits_{i=0}^{k}}Y_{i},\;\mathbf{z})\cup
{[a:]:aHeadAdv(P,i=0kYi,𝐳)})×𝐳\{[a:-]\;:\;a\in Head_{Adv}(P,\;{\displaystyle\bigcup\limits_{i=0}^{k}}Y_{i},\;\mathbf{z})\})\;\times\;\mathbf{z}

if D()D(...)\neq\emptyset and Yk+1Y_{k+1}\equiv\emptyset otherwise.

That is, Yk+1Y_{k+1} is a collection of hybrid states (Yk+1|𝐳,𝐳)\left(Y_{k+1}|_{\mathbf{z}},\mathbf{z}\right) where 𝐳𝐙k+1\mathbf{z\in Z}_{k+1}, and where Yk+1|𝐳Y_{k+1}|_{\mathbf{z}} is an answer set of a regular ASP program composed of the active reducts of the stationary rules that can contribute to 𝐳\mathbf{z} and the heads of the advancing rules that derive 𝐳\mathbf{z}.

Theorem 3. MM is an answer set of PP w.i.c. JJ iff there is advancing selector FF and a stationary selector DD such that i=0Yi=M{\displaystyle\bigcup\limits_{i=0}^{\infty}}Y_{i}=M with FF and DD.


Sketch of a proof. We begin by specifying a sequence of splitting sets Uii=0\left\langle U_{i}\right\rangle_{i=0}^{\infty} defined as

Ui=LitAt×{𝐩:𝐩S and 0t(𝐩)iΔt}U_{i}=Lit_{At}\times\{\mathbf{p}:\;\mathbf{p}\in S\text{ and }0\leq t\left(\mathbf{p}\right)\leq i\Delta t\;\}

We then first show that Y0Y_{0} is an answer set of bU0(P)b_{U_{0}}\left(P\right) w.i.c. JJ. The rules that can contribute to Y0Y_{0} are stationary-1 rules rr such as CS(r)Bool(r)J[0]CS\left(r\right)\cap Bool\left(r\right)\cap J\left[0\right]\neq\emptyset. These rules will contribute regular ASP rules to RedApp(P,,𝐳)\operatorname*{Red}\nolimits_{App}(P,\;\emptyset,\;\mathbf{z}) for every 𝐳J[0]\mathbf{z}\in J\left[0\right]. We then show that D(,𝐳,RedApp(P,,𝐳))D(\emptyset,\;\mathbf{z},\;\operatorname*{Red}\nolimits_{App}(P,\emptyset,\mathbf{z})) is an answer set of RedApp(P,,𝐳)\operatorname*{Red}\nolimits_{App}(P,\emptyset,\mathbf{z}) iff D(,𝐳,RedApp(P,,𝐳))×𝐳D(\emptyset,\;\mathbf{z},\;\operatorname*{Red}\nolimits_{App}(P,\emptyset,\mathbf{z}))\times\mathbf{z} is an answer set of bU0(P)b_{U_{0}}\left(P\right) w.i.c. JJ.

The rest is proven by induction using The Splitting Sequence Theorem. That is M[k+1]M\left[k+1\right] is an answer set of E=ϵUk(bUk+1(P)\Rulesb(Uk,bUk+1(P))Rem(Uk,bUk+1(P)),ikM[i])E=\epsilon_{U_{k}}(b_{U_{k+1}}\left(P\right)\backslash Rules_{b}(U_{k},b_{U_{k+1}}\left(P\right))\cup\operatorname*{Rem}(U_{k},b_{U_{k+1}}\left(P\right)),\;{\displaystyle\bigcup\limits_{i\leq k}}M\left[i\right]) w.i.c. GPJ(L)GP_{J}(L), where L=ikM[i]L={\displaystyle\bigcup\limits_{i\leq k}}M\left[i\right] iff there exists an advancing selector FF and a stationary selector DD such that M[k+1]M\left[k+1\right] is equal to Yk+1Y_{k+1} as defined by the algorithm.


For the forward direction of the inductive step we define F(N,Y)YGP(M)F(N,\;Y)\equiv Y\cap GP\left(M\right). We define

D(N,𝐩,Q){At(N|𝐩) if At(N|𝐩) is an answer set of Q otherwiseD(N,\;\mathbf{p},\;Q)\equiv\left\{\begin{array}[c]{c}At\left(N|_{\mathbf{p}}\right)\text{ if }At\left(N|_{\mathbf{p}}\right)\text{ is an answer set of }Q\\ \emptyset\text{ otherwise}\end{array}\right.

We then show GP(M[k+1])=NextGP(P,F,L,kΔt)GP\left(M\left[k+1\right]\right)=NextGP(P,F,L,k\Delta t). We then use the induction on one-step provability operator T[EM[k+1],GPJ(L),GPJ(L)]jT\left[E^{M\left[k+1\right],\;GP_{J}\left(L\right)},GP_{J}\left(L\right)\right]^{j} to show that if M[k+1]M\left[k+1\right] is an answer set of EE w.i.c. GPJ(L)GP_{J}\left(L\right) then M[k+1]|𝐩=Yk+1|𝐩M\left[k+1\right]|_{\mathbf{p}}=Y_{k+1}|_{\mathbf{p}}. That is we show that if M[k+1]M\left[k+1\right] is an answer set of EE w.i.c. GPJ(L)GP_{J}\left(L\right) then the algorithm derives it as Yk+1Y_{k+1}.

For the reverse direction we first show {(head(r),𝐩):rHeadAdv(P,L,𝐩),𝐩GP(Yk)}T[EYk+1,GPJ(L),GPJ(L)]1()\{(head\left(r\right),\;\mathbf{p}):\;r\in Head_{Adv}(P,\;L,\;\mathbf{p}),\;\mathbf{p}\in GP\left(Y_{k}\right)\}\subseteq T\left[E^{Y_{k+1},GP_{J}\left(L\right)},GP_{J}\left(L\right)\right]^{1}\left(\emptyset\right). That is we show that the literals of HeadAdv(P,L,𝐩)Head_{Adv}(P,\;L,\;\mathbf{p}) are also derived by EE at 𝐩\mathbf{p}. We then use induction on one step provability T[KAt(Yk+1|𝐩)]iT\left[K^{At\left(Y_{k+1}|_{\mathbf{p}}\right)}\right]^{i}, where KRedApp(P,L,𝐩)\ K\equiv\operatorname*{Red}\nolimits_{App}(P,L,\mathbf{p}) to show that for all 𝐩GP(Yk+1)\mathbf{p}\in GP\left(Y_{k+1}\right) it is the case that i0T[KAt(Yk+1|𝐩)]i()×𝐩j0T[EYk+1,GPJ(L),GPJ(L)]j(){\displaystyle\bigcup\limits_{i\geq 0}}T\left[K^{At\left(Y_{k+1}|_{\mathbf{p}}\right)}\right]^{i}\left(\emptyset\right)\times\mathbf{p}\subseteq{\displaystyle\bigcup\limits_{j\geq 0}}T\left[E^{Y_{k+1},GP_{J}\left(L\right)},GP_{J}\left(L\right)\right]^{j}\left(\emptyset\right), for some jj. That is, we show that the literals derived by the regular ASP program RedApp(P,L,𝐩)\operatorname*{Red}\nolimits_{App}(P,L,\mathbf{p}) are also derived by EE at 𝐩\mathbf{p}. But this merely shows that Yi=0YiY\equiv{\displaystyle\bigcup\limits_{i=0}^{\infty}}Y_{i} \subseteq j0T[PY,J,J](){\displaystyle\bigcup\limits_{j\geq 0}}T[P^{Y,J},J]\left(\emptyset\right). We also need to show that j0T[PY,J,J]()Y{\displaystyle\bigcup\limits_{j\geq 0}}T[P^{Y,J},J]\left(\emptyset\right)\subseteq Y.

We do that by using induction on one step provability operator T[EYk+1,GPJ(L),GPJ(L)]jT\left[E^{Y_{k+1},GP_{J}\left(L\right)},GP_{J}\left(L\right)\right]^{j} to show that for all 𝐩GP(Yk+1)\mathbf{p}\in GP\left(Y_{k+1}\right) it is the case that j0T[EYk+1,GPJ(L),GPJ(L)]j(){\displaystyle\bigcup\limits_{j\geq 0}}T\left[E^{Y_{k+1},GP_{J}\left(L\right)},GP_{J}\left(L\right)\right]^{j}\left(\emptyset\right) is a subset of i0T[KAt(Yk+1|𝐩)]i()×𝐩{\displaystyle\bigcup\limits_{i\geq 0}}T\left[K^{At\left(Y_{k+1}|_{\mathbf{p}}\right)}\right]^{i}\left(\emptyset\right)\times\mathbf{p}.

This completes the proof of the theorem. \square


The algorithm computes an answer set of the Hybrid ASP program PP w.i.c. JJ inductively, by computing a subset of the answer set at time 0, then at time Δt\Delta t, and so on through time kΔtk\Delta t. Moreover, the aglorithm reduces the process of computing an answer set of a Hybrid ASP program to the repeated application of two processes: the process of computing the set of ”next” generalized positions, and the process of computing an answer set of a regular ASP program derived from advancing and stationary Hybrid ASP rules applicable at these ”next” generalized positions.

It’s worth noting that the algorithm is a more general form of The Local Algorithm [6], variation of which is also discussed in [3].

4 Conclusion

The paper presents The Splitting Set Theorem for Hybrid ASP, which is the equivalent for Hybrid ASP of the Splitting Set Theorem [13], and the Splitting Sequence Theorem for Hybrid ASP (which is the equivalent for Hybrid ASP of The Splitting Sequence Theorem). The original Splitting Set Theorem proved to be a widely used result. It is the author’s hope that the new theorem will likewise prove to have many applications. The paper discusses one of the applications of the theorems to computing answer sets of Hybrid ASP programs.

Acknowledgements. The author would like to thank Jori Bomanson for insightful comments that helped to enhance the paper.

References

  • [1]
  • [2] Marcello Balduccini & Michael Gelfond (2003): Diagnostic reasoning with A-Prolog. TPLP 3(4-5), pp. 425–461. Available at http://dx.doi.org/10.1017/S1471068403001807.
  • [3] Jori Bomanson & Alex Brik (2019): Diagnosing Data Pipeline Failures Using Action Languages. In Marcello Balduccini, Yuliya Lierler & Stefan Woltran, editors: Logic Programming and Nonmonotonic Reasoning - 15th International Conference, LPNMR 2019, Philadelphia, PA, USA, June 3-7, 2019, Proceedings, Lecture Notes in Computer Science 11481, Springer, pp. 181–194, 10.1007/978-3-030-20528-7_14.
  • [4] Piero A. Bonatti (2008): Erratum to: Reasoning with infinite stable models [Artificial Intelligence 156 (1) (2004) 75-111]. Artif. Intell. 172(15), pp. 1833–1835, 10.1016/j.artint.2008.07.002.
  • [5] Alex Brik & Jeffrey B. Remmel (2011): Hybrid ASP. In John P. Gallagher & Michael Gelfond, editors: ICLP (Technical Communications), LIPIcs 11, Schloss Dagstuhl - Leibniz-Zentrum fuer Informatik, pp. 40–50. Available at http://dx.doi.org/10.4230/LIPIcs.ICLP.2011.40.
  • [6] Alex Brik & Jeffrey B. Remmel (2012): Computing a Finite Horizon Optimal Strategy Using Hybrid ASP. In: 14th International Workshop on Non-Monotonic Reasoning, NMR 2012, Rome, Italy, June 8-10, 2012. Procedings.
  • [7] Alex Brik & Jeffrey B. Remmel (2015): Diagnosing Automatic Whitelisting for Dynamic Remarketing Ads Using Hybrid ASP. In Francesco Calimeri, Giovambattista Ianni & Miroslaw Truszczynski, editors: Logic Programming and Nonmonotonic Reasoning - 13th International Conference, LPNMR 2015, Lexington, KY, USA, September 27-30, 2015. Proceedings, Lecture Notes in Computer Science 9345, Springer, pp. 173–185, 10.1007/978-3-319-23264-5.
  • [8] Alex Brik & Jeffrey B. Remmel (2017): Action Language Hybrid AL. In Marcello Balduccini & Tomi Janhunen, editors: Logic Programming and Nonmonotonic Reasoning - 14th International Conference, LPNMR 2017, Espoo, Finland, July 3-6, 2017, Proceedings, Lecture Notes in Computer Science 10377, Springer, pp. 322–335, 10.1007/978-3-319-61660-5_29.
  • [9] Alex Brik & Jeffrey Xu (2020): Diagnosing Data Pipeline Failures Using Action Languages: A Progress Report. In Ekaterina Komendantskaya & Yanhong Annie Liu, editors: Practical Aspects of Declarative Languages - 22nd International Symposium, PADL 2020, New Orleans, LA, USA, January 20-21, 2020, Proceedings, Lecture Notes in Computer Science 12007, Springer, pp. 73–81, 10.1007/978-3-030-39197-3_5.
  • [10] Steve Dworschak, Susanne Grell, Victoria J. Nikiforova, Torsten Schaub & Joachim Selbig (2008): Modeling Biological Networks by Action Languages via Answer Set Programming. Constraints 13(1-2), pp. 21–65, 10.1007/s10601-007-9031-y.
  • [11] Maarten H. van Emden & Robert A. Kowalski (1976): The Semantics of Predicate Logic as a Programming Language. J. ACM 23(4), pp. 733–742. Available at http://doi.acm.org/10.1145/321978.321991.
  • [12] Michael Gelfond & Vladimir Lifschitz (1988): The Stable Model Semantics for Logic Programming. In: ICLP/SLP, pp. 1070–1080.
  • [13] Vladimir Lifschitz & Hudson Turner (1994): Splitting a Logic Program. In Pascal Van Hentenryck, editor: Logic Programming, Proceedings of the Eleventh International Conference on Logic Programming, Santa Marherita Ligure, Italy, June 13-18, 1994, MIT Press, pp. 23–37.