Omission-Based Abstraction for Answer Set Programs

Abstract Abstraction is a well-known approach to simplify a complex problem by over-approximating it with a deliberate loss of information. It was not considered so far in Answer Set Programming (ASP), a convenient tool for problem solving. We introduce a method to automatically abstract ASP programs that preserves their structure by reducing the vocabulary while ensuring an over-approximation (i.e., each original answer set maps to some abstract answer set). This allows for generating partial answer set candidates that can help with approximation of reasoning. Computing the abstract answer sets is intuitively easier due to a smaller search space, at the cost of encountering spurious answer sets. Faithful (non-spurious) abstractions may be used to represent projected answer sets and to guide solvers in answer set construction. For dealing with spurious answer sets, we employ an ASP debugging approach to help with abstraction refinement, which determines atoms as badly omitted and adds them back in the abstraction. As a show case, we apply abstraction to explain unsatisfiability of ASP programs in terms of blocker sets, which are the sets of atoms such that abstraction to them preserves unsatisfiability. Their usefulness is demonstrated by experimental results.


Introduction
Abstraction is an approach that is widely used in Computer Science and AI in order to simplify problems (cf. Clarke et al . 1994;Kouvaros and Lomuscio 2015;Banihashemi et al . 2017;Giunchiglia and Walsh 1992;Geißer et al . 2016). When computing solutions for difficult problems, abstraction allows to omit details and reduce the scenarios to ones that are easier to deal with and to understand. Such an approximation results in 146 Z. G. Saribatur and T. Eiter achieving a smaller or simpler state space, at the price of introducing spurious solutions. The well-known counterexample guided abstraction and refinement (CEGAR) approach (Clarke et al . 2003) is based on starting with an initial abstraction on a given program and checking the desired property over the abstract program. Upon encountering spurious solutions, the abstraction is refined by removing the spurious transitions observed through the solution so that the spurious solution is eliminated from the abstraction. This iteration continues until a concrete solution is found.
Surprisingly, abstraction has not been considered much in the context of non-monotonic knowledge representation and reasoning, and specifically not in Answer Set Programming (ASP) (Brewka et al . 2011). Simplification methods such as equivalence-based rewriting Pearce 2004), partial evaluation (Brass and Dix 1997;Janhunen et al . 2006), or forgetting (see Leite (2017) for a recent survey) have been extensively studied. However, these methods strive for preserving the semantics of a program, while abstraction may change the latter and lead to an over-approximation of the models (answer sets) of a program, in a modified language.
In this paper, we make the first step toward employing the concept of abstraction in ASP. We are focused on abstraction by omitting atoms from the program and constructing an abstract program with the smaller vocabulary, by ensuring that the original program is over-approximated, that is, every original answer set can be mapped to some abstract answer set. Due to the decreased size of the search space, finding an answer set in the abstract program is easier, while one needs to check whether the found abstract answer set is concrete. As spurious answer sets can be introduced, one may need to go over all abstract answer sets until a concrete one is found. If the original program has no answer set, all encountered abstract answer sets will be spurious. To eliminate spurious answer sets, we use a CEGAR inspired approach, by finding a cause of the spuriousness with ASP debugging (Brain et al . 2007) and refining the abstraction by adding back some atoms that are deemed to be "badly-omitted." An interesting application area for such an omission-based abstraction in ASP is finding an explanation for unsatisfiability of programs. Toward this problem, debugging inconsistent ASP programs has been investigated, for instance, in Brain et al . (2007), , Oetsch et al . (2010), and Dodaro et al . (2015), based on providing the reason for why an answer set expected by the user is missed. However, these methods do not address the question why the program has no answer set. We approach the unsatisfiability of an ASP program differently, with the aim to obtain a projection of the program that shows the cause of the unsatisfiability, without an initial idea on expected solutions. For example, consider the graphs shown in Figure 1. The one in Figure 1(a) is not 2colorable due to the subgraph induced by the nodes 1-2-3, while the one in Figure 1(b) is not 3-colorable due to the subgraph of the nodes 1-2-3-4. From the original programs that encode this problem, abstracting away the rules that assigns colors to the nodes not involved in these subgraphs should still keep the unsatisfiability, thus showing the actual reason of non-colorability of the graphs. This is related to the well-known notion of minimal unsatisfiable subsets (unsatisfiable cores) (Liffiton and Sakallah 2008;Lynce and Silva 2004) that has been investigated in the ASP context (Alviano and Dodaro 2016;Andres et al . 2012), but is less sensitive to the issue of foundedness as it arises from rule dependencies (for further discussion, see Section 8). Our contributions in this paper are briefly summarized as follows.
• We introduce a method to abstract ASP programs Π by omitting atoms in order to obtain an over-approximation of the answer sets of Π. That is, a program Π is constructed such that each answer set I of Π is abstracted to some answer set I of Π . While this abstraction is many to one, spurious answer sets of Π may exist that do not correspond to any answer set of Π. • We present a refinement method inspired by ASP debugging approaches to catch the badly omitted atoms through the encountered spurious answer sets. • We introduce the notion of blocker sets as sets of atoms such that abstraction to them preserves unsatisfiability of a program. A minimal program to the minimal cause of unsatisfiability. • We derive complexity results for the notions, such as for checking for spurious answer sets, for finding minimal sets of atoms to put back in the refinement to eliminate a spurious solution and for computing a minimal blocker for a program.
In particular, we characterize the complexity of these problems in terms of suitable complexity classes, which unsurprisingly are intractable in general. • We report about experiments focusing on unsatisfiable programs and investigate computing minimal blockers of programs. We compare the results of the abstraction and refinement approach starting with an initial abstraction (bottom-up) with a naive top-down approach that omits atoms one-by-one if their omission preserves unsatisfiability, and observe that the bottom-up approach can obtain smaller sized blockers.
Overall, abstraction by omission appears to be of interest for ASP, which besides explaining unsatisfiability can be utilized, among other applications, to over-approximate reasoning and to represent projected answer sets.
Organization. The remainder of this article is organized as follows. After recalling in the next section some necessary concepts and fixing the notation, we introduce in Section 3 program abstraction by atom omission and consider some of its basic semantics properties. In Section 4, we study computational complexity issues for relevant reasoning tasks around omission, while in Section 5, we turn to the question of abstraction refinement. 148 Z. G. Saribatur and T. Eiter As an application of abstraction, we show in Section 6 how it can be used to find reasons for unsatisfiability of programs and present results obtained by an experimental prototype implementation. The subsequent Section 7 discusses some extensions and possible optimizations, while in Section 8, we address related work. The final Section 9 gives a short summary and concludes with an outlook on future research.
This article revises and extends the paper presented at KR 2018 in the following respects. First, full proofs of the technical results are provided, and formal notions needed in this context have been detailed. Second, further properties have been established (e.g., Propositions 5,9,16,18,and 20,Theorems 17 and 19), and third, new experimental results are reported, which also include new benchmarks problems (Disjunctive Scheduling, 15-Puzzle, as well as Graph 3-Coloring). Fourth, the discussion and related work sections have been significantly extended, by providing more detail and/or considering further related notions such as relaxation-and equivalence-based rewriting and forgetting from logic programs. In addition, more examples and explanations have been added, and the presentation has been restructured.

Preliminaries
We consider logic programs Π with rules r of the form where each α i is a first-order atom 1 and not is default negation; r is a constraint if α 0 is falsity (⊥, then omitted) and a fact if n = 0. We also write r as α 0 ← B(r), where H(r) = α 0 is the head of r, or as H(r) ← B + (r), not B − (r), where B + (r) = {α 1 , . . . , α m } is the positive body and B − (r) = {α m+1 , . . . , α n } is the negative body of r, respectively; furthermore, we let B ± (r) = B + (r) ∪ B − (r). We occasionally omit r from B ± (r), B(r), etc. if r is understood. To group the rules with the same head α, we use def (α, Π) = {r ∈ Π | H(r) = α}. As a common syntactic extension, we also consider choice rules of the form {α} ← B, which stands for the rules α ← B, not α and α ← B, not α, where α is a new atom. 2 Semantically, Π induces a set of answer sets (Gelfond and Lifschitz 1991), which are Herbrand models of Π that are justified by the rules. For a ground (variable-free) program Π, its answer sets are the Herbrand interpretations, that is, subsets I ⊆ A of the ground atoms A of Π, such that I is a minimal model of f Π I = {r ∈ Π | I |= B(r)} (Faber et al . 2004). 3 The answer sets of a non-ground program Π are the ones of its grounding grd(Π) = r∈Π grd(r), where grd(r) is the set of all instantiations of r over the Herbrand universe of Π (the set of ground terms constructible from the alphabet of Π). The set of answer sets of a program Π is denoted as AS (Π). A program Π is unsatisfiable, if AS(Π) = ∅. Throughout this paper, unless stated otherwise, we consider ground (propositional) programs, that is, Π = grd(Π) holds. 150 Z. G. Saribatur and T. Eiter Definition 2 Given a set A ⊆ A of atoms, an omission (abstraction) mapping is m A : A → A ∪ { } such that m A (α) = if α ∈ A and m A (α) = α otherwise.
An omission mapping removes the set A of atoms from the vocabulary and keeps the rest. We refer to A as the omitted atoms.
Example 2 Consider the below programs Π 1 , Π 2 , and Π 3 and let the set A of atoms to be omitted to be {b}. AS {c, a}, {d, b} {c, a}, {d}, {c} {c, a}, {d}, {a} Observe that for I 1 = {m A (c), m A (a)} = {c, a}, we have I 1 ∈ AS(Π 2 ) and I 1 ∈ AS(Π 3 ) and for I 2 = {m A (d), m A (b)} = {d}, we have I 2 ∈ AS(Π 2 ) and I 2 ∈ AS(Π 3 ). Thus, according to Definition 1, both of the programs Π 2 and Π 3 are an abstraction of Π 1 . Moreover, they are over-approximations, as they have answer sets {c} and {a}, respectively, which cannot be mapped back to the answer sets of Π 1 .
Although both Π 2 and Π 3 are abstractions, notice that the structure of Π 2 is more similar to Π 1 , while Π 3 has an entirely different structure of rules.
Next, we show a systematic way of building, given an ASP program and a set A of atoms, an abstraction of Π by omitting the atoms in A that we denote by omit(Π, A). The aim is to ensure that every original answer set of Π is mapped to some abstract answer set of omit(Π, A), while (unavoidably) some spurious abstract answer sets may be introduced. Thus, an over-approximation of the original program Π is achieved.

Program abstraction
The basic method is to project the rules to the non-omitted atoms and introduce choice when an atom is omitted from a rule body, in order to make sure that the behavior of the original rule is preserved.
We build from Π an abstract program omit(Π, A) according to the abstraction m A . For every rule, r : α ← B(r) in Π, In (o1), we keep the rule as it is, if it does not contain any omitted atom. Item (o2) is for the case when the rule is not a constraint and the rule head is not in A. Then, the body of the rule is projected onto the remaining atoms, and a choice is introduced to the head. Note that we treat default negated atoms, B − (r), similarly, that is, if some α ∈ B − (r) ∩ A, then we omit not α from B(r). As for the remaining cases (either the rule head is in A or the rule is a constraint containing some atom from A), the rule is omitted by item (o3). We use as a symbol for picking no rule.
We sometimes denote omit(Π, A) as Π A , where A = A \ A, to emphasize that it is an abstract program constructed with the remaining atoms A. For an interpretation I and a set S of atoms, I| A and S| A denote the projection to the atoms in A. For a rule r, we use m A (B(r)) as a shorthand for B(omit(r, A)) to emphasize that the mapping m A is applied to each atom in the body. Also, the notation B(r) \ A is used as a shorthand for Example 3 Consider a program Π and its abstraction Π A for A = {b, d}, according to the above steps. AS {c, a}, {d, b} {}, {c}, {c, a} For Thus, every answer set of Π can be mapped to some answer set of Π A , when the omitted atoms are projected away, that is, Notice that in Π A , constraints are omitted if the body contains an omitted atom (item (o3)). If instead the constraint gets shrunk by just omitting the atom from the body, then for some interpretationÎ, the body may be satisfied, causingÎ / ∈ AS( Π A ), while this was not the case in Π for any I ∈ AS(Π) with I| A =Î. Thus, I cannot be mapped to an abstract answer set of Π A , that is, Π A is not an over-approximation of Π. The next example illustrates this.
Example 4 (Example 3 continued ) Consider an additional rule {⊥ ← c, b.} in Π, which does not change its answer sets. If however in the abstraction Π A this constraint only gets shrunk to {⊥ ← c.}, by omitting b from its body, we get AS( Π A ) = {∅}. This causes Π A to have no abstract answer set to which the original answer set {c, a} can be mapped to. Omitting the constraint from Π A as described above avoids such cases of losing the original answer sets in the abstraction.
Abstracting choice rules. We focused above on rules of the form α ← B only. However, the same principle is applicable to choice rules r : {α} ← B(r). When building omit(r, A), item (o1) keeps the rule as it is, item (o2) removes the omitted atom from B(r) and keeps the choice in the head, and item (o3) omits the rule. This would be syntactically different from considering the expanded version (1) α ← B(r), not α. (2) α ← B(r), not α. where α is an auxiliary atom. If α is omitted, the rule (2) turns into a guessing rule, but it is irrelevant as α occurs nowhere else. If α is not omitted but some atom in B, both rules are turned into guessing rules and the same answer set combinations are achieved as with keeping r as a choice rule in item (o2). However, the number of auxiliary atoms would increase, in contrast to treating choice rules r genuinely.

Over-approximation
The following result shows that omit(Π, A) can be seen as an over-approximation of Π.

Theorem 1
For every answer set I ∈ AS(Π) and atoms A ⊆ A, it holds that I| A ∈ AS(omit(Π, A)).

Proof
Toward a contradiction, assume I is an answer set of Π, but I| A is not an answer set of omit (Π, A). This can occur because either (i) The rule r can either be (a) a rule which is not changed for Π , (b) a rule that was changed to {α} ← B in Π , or (c) a rule that was omitted, that is, α ∈ A. In each case (a)-(c), we arrive at a contradiction: (a) Since r ∈ Π I and r involves no atom in A, we have r ∈ Π . As I| A |= r and J| A coincides with I | A , we have that J| A |= r, and thus J |= r; this contradicts J α. (b) By definition of J, we have α ∈ I| A \ I . Since J |= B(r), it follows that J| A |= B and since I = J| A that I |= B. As I is a model of Π , we have that I satisfies the choice atom {α} in the head of the rewritten rule, that is, either (1) α ∈ I or (2) α / ∈ I ; but (1) contradicts α ∈ I| A \ I , while (2) means that I is not a smaller model of Π than I| A , as then α ∈ I \ I| A would hold, which is again a contradiction. (c) As r is in Π I , we have I |= B(r) and since I is an answer set of Π, that I |= α. As α / ∈ J, by construction of J, it follows that α / ∈ I, which contradicts I |= α.
By introducing choice rules for any rule that contains an omitted atom, all possible cases that would be achieved by having the omitted atom in the rule are covered. Thus, the abstract answer sets cover the original answer sets. On the other hand, not every abstract answer set may cover some original answer set, which motivates the following notion.

Definition 3
Given a program Π and a set A of atoms, an answer setÎ of omit(Π, A) is concrete, if I ∈ AS(Π)| A holds, and spurious otherwise.
In other words, a spurious abstract answer setÎ cannot be completed to any original answer set, that is, no extension I =Î ∪ X ofÎ to all atoms (where X ⊆ A) is an answer set of Π. This can be alternatively defined in the following way. We introduce the following set of constraints for A andÎ: Informally, Q Â I is a query for an answer set that concides on the non-omitted atoms witĥ I. The following is then easy to see.

Proposition 2
For any program Π and set A of atoms, an abstract answer setÎ ∈ AS(omit(Π, A)) is spurious iff Π ∪ Q Â I is unsatisfiable.
c} has the answer sets AS( Π A )={{}, {c}, {c, a}}. The abstract answer setsÎ 1 = {} andÎ 2 = {c, a} are concrete since they can be extended to the answers sets I 1 = {d, b} and I 2 = {c, a} of Π, as I 1 | A =Î 1 and I 2 | A =Î 2 , respectively. On the other hand, the abstract answer setÎ = {c} is spurious: the program Π ∪ Q Â I , where Q Â I = {⊥ ← not c.; ⊥ ← a.} is unsatisfiable, since the constraints in Q Â I require that c is true and a is false, which in turn affects that b and d must be false in Π as well; this however violates rule a ← not b, c. in Π.

Refining abstractions
Upon encountering a spurious answer set, one can either continue checking other abstract answer sets until a concrete one is found or refine the abstraction in order to reach an abstract program with less spurious answer sets. Formally, refinements are defined as follows.

Definition 4 Given a omission mapping m
Intuitively, a refinement is made by adding some of the omitted atoms back.
Example 6 (Example 3 continued ) A mapping that omits the set A = {b} is a refinement of the mapping that omits A = {b, d}, as d is added back. This affects that in the abstraction program, the choice rule {c}. is turned back to c ← not d. and the rule d ← not c. is undeleted, that is, has the abstract answer setŝ J 1 = {d},Ĵ 2 = {c, a} andĴ 3 = {c}. Note that whileĴ 1 andĴ 2 are concrete,Ĵ 3 is spurious; intuitively, adding d back does not eliminate the spurious answer set {c} of omit(Π, A).
The previous example motivates us to introduce a notion for a set of omitted atoms that needs to be added back in order to get rid of a spurious answer set.

Definition 5
LetÎ ∈ AS(omit(Π, A)) be any spurious abstract answer set of a program Π for omitted atoms A. A put-back set forÎ is any set P B ⊆ A of atoms such that no abstract answer setĴ of omit(Π, A ) where A = A \ P B exists withĴ| A =Î.

Z. G. Saribatur and T. Eiter
That is, re-introducing the put-back atoms in the abstraction, the spurious answer set I is eliminated in the modified abstract program. Notice that multiple put-back sets (even incomparable ones) are possible, and the existence of some put-back set is guaranteed, as putting all atoms back, that is, setting P B = A, eliminates the spurious answer set.

Example 7 (Example 3 continued )
The discussion in Example 6 shows that {d} is not a put-back set, for the spurious answer setÎ = {c} ∈ Π A , and neither {b} is a put-back set: the abstract program for In practice, small put-back sets are intuitively preferable to large ones as they keep higher abstraction; we shall consider such preference in Section 4.

Properties of omission abstraction
We now consider some basic but useful semantic properties of our formulation of program abstraction. Notably, it amounts to the original program in the extreme case and reflects the inconsistency of it in properties of spurious answer sets.

Proposition 3
For any program Π, (iv) If AS(Π) = ∅, then noÎ ∈ AS(omit(Π, A)) for any A ⊆ A can be extended to an answer set of Π; thus, all abstract answer sets of omit(Π, A) are spurious. This in turn trivially implies that omit(Π, A) has for some A ⊆ A only spurious answer sets. Finally, assume the latter holds but AS(Π) = ∅; then Π has some answer set I, and by Theorem 1, I| A ∈ AS(omit(Π, A)), which would contradict that omit(Π, A) has only spurious answer sets.
The abstract program is built by a syntactic transformation, given the set A of atoms to be omitted. It turns out that we can omit the atoms sequentially, and the order does not matter.

Proof
The rules of Π that do not contain a 1 or a 2 remain unchanged, and the rules that contain one of a 1 or a 2 will be updated at the respective abstraction steps. The rules that contain both a 1 and a 2 are treated as follows: • Consider a rule a 1 ← B with a 2 ∈ B ± (wlog). Omitting first a 2 from the rule causes to have {a 1 } ← B \ {a 2 }, and omitting then a 1 results in omission of the rule. Omitting first a 1 from the rule causes the omission of the rule at the first abstraction step. • Consider a rule α ← B, with a 1 , a 2 ∈ B ± and α = a 1 , a 2 . Omitting first a 2 from the rule causes to have {a} ← B \ {a 2 }, and omitting then a 1 causes to have {a} ← B \ {a 1 , a 2 }. The same rule is obtained when omitting first a 1 and then a 2 .
An easy induction argument shows then the property mentioned above.
Thus, the abstraction can be done one atom at a time.
Omitting atoms in a program means projecting them away from the answer sets. Thus, for a mapping m A , the concrete answer sets in omit(Π, A) always have corresponding answer sets in the programs computed for refinements of m A .

Proposition 6
SupposeÎ is a concrete answer set of omit(Π, A) for a program Π and a set A of atoms. Then, for every A ⊆ A, some answer setÎ ∈ AS(omit(Π, A )) exists such thatÎ | A =Î.

Proof
By Definition 3,Î ∈ AS(Π)| A , that is there exists some I ∈ AS(Π) s.t. I| A =Î. By Theorem 1, for every B ⊆ A, I| B ∈ AS(omit(Π, B)) holds, and in particular for B ⊆ A; we thus obtain ( The next property is convexity of spurious answer sets.

Proof
We first note thatÎ is spurious as well: if not, some I ∈ AS(Π) exists such that I| A =Î ; but then I| A = (I| A )| A =Î | A =Î, which contradicts thatÎ is spurious. Applying Theorem 1 to omit(Π, A ) and A , we obtain that I | A is an answer set of 156 Z. G. Saribatur and T. Eiter omit(omit(Π, A ), A ), which by Proposition 5 coincides with omit(Π, A ). Moreover, I | A is spurious, since otherwiseÎ would not be spurious either, which would be a contradiction.
The next proposition intuitively shows that once a spurious answer set is eliminated by adding back some of the omitted atoms, no extension of this answer set will show up when further omitted atoms are added back.

Proposition 8
Suppose thatÎ ∈ AS(omit(Π, A)) is a spurious answer set and P B ⊆ A is a put-back set forÎ. Then, for every A ⊆ A \ P B and answer setÎ ∈ AS(omit(Π, A \ (P B ∪ A )), it holds thatÎ | A =Î.

Proof
Toward a contradiction, assume that for some A ⊆ A \ P B and answer setÎ ∈ AS(omit(Π, A \ (P B ∪ A )), it holds thatÎ | A =Î. By Proposition 7, we obtain thatÎ is spurious and moreover thatÎ | A\P B ∈ AS(omit(Π, A \ P B) is spurious. However, as (Î | A\P B )| A =Î | A =Î, this contradicts that P B is a put-back set forÎ.

Faithful abstractions
Ideally, abstraction simplifies a program but does not change its semantics. Our next notion serves to describe such abstractions.

Definition 6
An abstraction omit(Π, A) is faithful if it has no spurious answer sets.
Faithful abstractions are a syntactic representation of projected answer sets, that is, AS(omit(Π, A)) = AS(Π)| A . They fully preserve the information contained in the answer sets and allow for reasoning (both brave and cautious) that is sound and complete over the projected answer sets.
Example 8 (Example 3 continued ) Consider omitting the set A = {a, c} from Π. The resulting Π A is faithful, since its answer sets {{}, {b, d}} are the ones obtained from projecting {a, c} away from AS(Π). AS {c, a}, {d, b} {}, {d, b} However, while an abstraction may be faithful, by adding back omitted atoms the faithfulness might get lost. In particular, if the program Π is satisfiable, then A = A is a faithful abstraction; by adding back atoms, spurious answer sets might arise. This motivates the following notion.

Definition 7
A faithful abstraction omit(Π, A) is refinement-safe if for all A ⊆ A, omit(Π, A ) has no spurious answer sets.
In a sense, a refinement-safe faithful abstraction allows us to zoom in details without losing already established relationships between atoms, as they appear in the abstract answer sets, and no spuriousness check is needed. In particular, this applies to programs that are unsatisfiable. By Proposition 3-(iii), unsatisfiability of an abstraction omit(Π, A) implies that the original program is unsatisfiable, and hence the abstraction is faithful. Moreover, we obtain:

Proposition 9
Given Π and A, if omit(Π, A) is unsatisfiable, then it is refinement-safe faithful.

Proof
Assume that A is refined to some A ⊂ A, where some atoms are added back in the abstraction, and the constructed omit(Π, A ) is not unsatisfiable, that is, AS(omit(Π, A )) = ∅. By Theorem 1, it must hold that AS(omit(Π, A ))| A ⊆ AS(omit(Π, A)), which contradicts to the fact that omit(Π, A) is unsatisfiable.

Computational complexity
In this section, we turn to the computational complexity of reasoning tasks that are associated with program abstraction. We start with noting that constructing the abstract program and model checking on it is tractable.

Lemma 10
Given Π and A, (i) the program omit(Π, A) is constructible in logarithmic space, and (ii) checking whether I ∈ AS(omit(Π, A)) holds for a given I is feasible in polynomial time.
As for item (i), the abstract program omit(Π, A) is easily constructed in a linear scan of the rules in Π; item (ii) reduces then to answer set checking of an ordinary normal logic program, which is well-known to be feasible in polynomial time (and in fact P-complete).
However, tractability of abstract answer set checking is lost if we ask in addition for concreteness or spuriousness.

Proposition 11
Given a program Π, a set A of atoms, and an interpretation I, deciding whether I| A , is a concrete (resp., spurious) abstract answer set of omit(Π, A) is NP-complete (resp., coNP-complete).

Proof
Indeed, we can guess an interpretation J of Π such that (a) J A = I A , (b) J A ∈ AS(omit(Π, A)), and (c) J ∈ AS(Π). By Lemma 10, (b) and (c) are feasible in polynomial time, and thus deciding whether I A is a concrete abstract answer set is in NP. Similarly, I A is not a spurious abstract answer set iff for some J condition (a) holds and either (b) fails or (c) holds; this implies coNP membership.
The NP-hardness (resp., coNP-hardness) is immediate from Proposition 3 and the NP-completeness of deciding answer set existence.
Thus, determining whether a particular abstract answer set causes a loss of information is intractable in general. If we do not have a candidate answer set at hand, but want to Z. G. Saribatur and T. Eiter know whether the abstraction causes a loss of information with respect to all answer sets of the original program, then the complexity increases.

Theorem 12
Given a program Π and a set A of atoms, deciding whether someÎ ∈ AS(omit(Π, A)) exists that is spurious is Σ p 2 -complete.

Proof
As for membership in Σ p 2 , some answer setÎ ∈ omit(Π, A) that is spurious can be guessed and checked by Proposition 11 with a coNP oracle in polynomial time. The Σ p 2 -hardness is shown by a reduction from evaluating a QBF ∃X∀Y We construct a program Π as follows: where X = {x 1 , . . . , x n } and Y = {y 1 , . . . , y m } are sets of fresh atoms and for each atom Intuitively, the answer setsÎ of omit(Π, A), which consists of all rules (3) and (4), correspond 1-1 to the truth assignments σ of X.
is spurious, iff it cannot be extended after putting back all omitted atoms to an answer set J of Π. Any such J must not include sat, as otherwise the rules (5) and (6) would not be applicable w.r.t. J, which means that all y j and Y j would be false in J; but then sat could not be derived from Π and J, as no rule (7) is applicable w.r.t. J by the assumption on the D i . Now ifÎ σ is not spurious, then some answer set J of Π as described exists. As sat / ∈ J, the rules (5) and (6) imply that exactly one of y j and y j is in J, for each y j , and thus J induces an assignment μ to Y . As no rule (7) is applicable w.r.t. J, it follows that E(σ(X), μ(Y )) evaluates to false, and thus ∀Y E(σ(X), Y ) does not evaluate to true. Conversely, if ∀Y E(σ(X), Y ) does not evaluate to true, then some answer set J of Π that coincides withÎ σ on X ∪ X exists, and henceÎ σ is not spurious. In conclusion, it follows that omit(Π, A) has some spurious answer set iff ∃X∀Y E(X, Y ) evaluates to true.
An immediate consequence of the previous theorem is that checking whether an abstraction omit(Π, A) is faithful has complementary complexity.

Corollary 13
Given a program Π and a set A ⊆ A of atoms, deciding whether omit(Π, A) is faithful is Π p 2 -complete. We next consider the computation of put-back sets, which is needed for the elimination of spurious answer sets. To describe the complexity, we use some complexity classes for search problems, which generalize decision problems in that for a given input, some (possibly different or none) output values (or solutions) might be computed. Specifically, FP NP consists of the search problems for which a solution can be computed in polynomial time with an NP oracle, and FP NP is analogous but under the restriction that all oracle calls have to be made at once in parallel. The class FP Σ P k [log, wit], for k ≥ 1, contains all search problems that can be solved in polynomial time with a witness oracle for Σ p k (Buss et al . 1993); a witness oracle for Σ p k returns in case of a yes-answer to an instance a polynomial size witness string that can be checked with a Σ p k−1 oracle in polynomial time. In particular, for k = 1, that is, for FP NP [log, wit], one can use a SAT oracle and the witness is a satisfying assignment to a given SAT instance (cf. Janota and Marques-Silva 2016).
While an arbitrary put-back set P B ⊆ A can be trivially obtained (just set P B = A), computing a minimal put-back set is more involved. Specifically, we have:

Theorem 14
Given a program Π, a set A of atoms, and a spurious answer setÎ of omit(Π, A), computing (i) some ⊆-minimal put-back set P B resp. (ii) some smallest size put-back set P B forÎ is in case (i) feasible in FP NP and FP NP -hard resp. is in case Note that few FP Σ P 2 [log, wit]-complete problems are known. The notions of hardness and completeness are here with respect to a natural polynomial-time reduction between two problems P 1 and P 2 : there are polynomial-time functions f 1 and f 2 such that (i) for every instance x 1 of P 1 , x 2 = f 1 (x 1 ) is an instance of P 2 , such that x 2 has solutions iff x 1 has, and (ii) from every solution s 2 of x 2 , some solution s 1 = f 2 (x 1 , s 2 ) is obtainable; note that x 1 is here an input parameter to have access to the original input.
Here, we give a proof sketch for Theorem 14. The detailed proof is moved to the Online Appendix for readability of the paper.

Proof Sketch for Theorem 14
As for (i), we can compute such a set S by an elimination procedure: starting with A = ∅, we repeatedly pick some atom α ∈ A \ A and test (+) whether for A = A ∪ {α}, the program omit(Π, A \ A ) has no answer set I such that I | A = I; if yes, we set A := A and make the next pick from A . Upon termination, S = A is a minimal put-back set. The test (+) can be done with an NP oracle. The hardness for FP NP is shown by a reduction from computing, given programs P 1 , . . . , P n , the answers q 1 , . . . , q n to whether P i has some answer set.
The membership in case (ii) can be established by a binary search over put-back sets of bounded size using a Σ p 2 witness oracle. The FP Σ P 2 [log, wit] hardness is shown by a reduction from the following problem: given a QBF Φ = ∃X∀Y E(X, Y ), compute a smallest size assignment σ to X such that ∀Y E(σ(X), Y ) evaluates to true, knowing that some σ exists, where the size of σ is the number of atoms set to true. The core idea is similar to the one in the proof of Theorem 12, but the construction is much more involved and needs significant modifications and extensions.
We remark that the problem is solvable in polynomial time, if the smallest put-back set P B has a size bounded by a constant k. Indeed, in this case, we can explore all P B of that size and find some answer set I of omit(Π, A \ P B) that coincide with I on A in polynomial time.
We finally consider the problem of computing some refinement-safe abstraction that does not remove a given set A 0 of atoms.

Theorem 15
Proof (i) One sets A := ∅ and S := A \ A 0 initially and then picks an atom α from S and sets S := S \ {α}. One tests whether (*) omitting A ∪ {α}, for every subset A ⊆ A, is a faithful abstraction; if so, then one sets A := A ∪ {α}. Then, a next atom α is picked from S etc. When this process terminates, we have a largest set A such that omitting A from Π is a faithful abstraction. Indeed, by construction, the final set A fulfills that for each A ⊆ A, omit(Π, A ) is faithful, and thus A is refinement-safe; furthermore A is maximal: if a larger set A ⊃ A would exist, then at the point when α ∈ A \ A was considered in constructing A, the test (*) would not have failed and α ∈ A would hold.
Notably, (*) can be tested with an NP oracle: the conditions fails iff for some A , the program omit(Π, A ∪ {α}) has a spurious answer setÎ. In principle, the spurious check forÎ is difficult (a coNP-complete problem, by our results), but we can take advantage of knowing that omit(Π, A ) is faithful: so we only need to check whether an extension ofÎ is an answer set of omit(Π, A ), and not of Π itself; that is, we only need to check I / ∈ AS(omit(Π, A )) andÎ ∪ {α} / ∈ AS(omit(Π, A )). The FP NP -hardness is shown with a variant of the reduction provided in the FP NPhardness proof of item (i) of Theorem 14. Similar as there, we construct a program Π i for Π i , 1 ≤ i ≤ n, that comprises the first four rules of the program Π i there, that is, (ii) The proof of FP Σ P 2 [log, wit]-completeness is similar as above for Theorem 14. First, we note that to decide whether some refinement-safe faithful A ⊆ A \ A 0 of size |A| ≥ k exists is in Σ p 2 : a non-deterministic variant of the algorithm for item (i), that picks α always non-deterministically and finally checks that |A| ≥ k holds establishes this. We then can run a binary search, using a Σ p 2 witness oracle, to find a refinement-safe faithful abstraction A of largest size. This shows FP Σ P 2 [log, wit]-membership.
As for the FP Σ P 2 [log, wit]-hardness part, in the proof of FP Σ P 2 [log, wit]-hardness for Theorem 14-(ii) each put-back set P B for the spurious answer setÎ = ∅ for A = A satisfies AS(omit(Π, A \ P B)) = ∅, and is thus by Proposition 9 refinement-safe faithful. As the smallest size P B sets correspond to the maximum size A = A \ P B sets, the FP Σ P 2 [log, wit]-hardness follows, even for A 0 = ∅.
Thus, computing some subset-maximal set of atoms whose omission does not create spurious answer sets is significantly easier (under widely adopted complexity hypotheses) than computing a set of largest size with this property (i.e., retain only as few atoms as necessary) in the worst case. It also means that for largest size sets, a polynomial time algorithm with access to an NP oracle is unlikely to exist, and multiple calls to a solver for ∃∀-QBFs are needed, but a sublinear (logarithmic) number of calls is sufficient if the QBF-calls return witness assignments (which often applies in practice). In contrast, whether some subset-maximal set can always be computed with a logarithmic (or more liberal, sublinear), number of NP oracle calls (with or without witness output) remains to be seen.
We remark that without refinement safety, the problem of part (i) of Theorem 15 is likely to be more complex: deciding whether an abstraction is faithful is Π p 2 -complete by Corollary 13, and this question is trivially reducible to computing some ⊆-maximal set is a faithful abstraction).

Refinement using debugging
Over-approximation of a program unavoidably introduces spurious answer sets, which makes it necessary to have an abstraction refinement method. We show how to employ an ASP debugging approach in order to debug the inconsistency of the original program Π caused by checking a spurious answer setÎ, referred to as inconsistency of Π w.r.t.Î. We use a meta-level debugging language (Brain et al . 2007), which is based on a tagging technique that allows one to control the building of answer sets and to manipulate the evaluation of the program. This is a useful technique for our need to shift the focus from "debugging the original program" to "debugging the inconsistency caused by the spurious answer set." We alter the meta-program, in a way that hints for refining the abstraction can be obtained. Through debugging, some of the atoms are determined as badly omitted, and by adding them back in the refinement, the spurious answer set can be eliminated.

Debugging meta-program
The meta-program constructed by spock (Brain et al . 2007) introduces tags to control the building of answer sets. Given a program Π over A and a set N of names for all rules in Π, it creates an enriched alphabet A + obtained from A by adding atoms such as ap(n r ), bl (n r ), ok (n r ), ko(n r ) where n r ∈ N for each r ∈ Π. The atoms ap(n r ) and bl (n r ) express whether a rule r is applicable or blocked, respectively, while ok (n r ), ko(n r ) are used for manipulating the application of r. We omit the atoms ok (n r ), as they are not needed. The (altered) meta-program that is created is as follows.

Z. G. Saribatur and T. Eiter
Definition 8 Given Π, the program T meta [Π] consists of the following rules for r ∈ Π, α 1 ∈ B + (r), α 2 ∈ B − (r): Here, the last rules use double (nested) negation not α 2 (Lifschitz et al . 1999), which in the reduct w.r.t. an interpretation I is replaced by if I |= α 2 , and by ⊥ otherwise. The role of ko(r) is to avoid the application of the rule H(r) ← ap(r), not ko(r) if necessary. We use it for the rules that are changed due to some omitted atom in the body.
The following properties follow from Brain et al . (2007).
Proposition 16 (Brain et al . 2007) For a program Π over A, and an answer set X of T meta [Π], the following holds for any r ∈ Π and a ∈ A: The relation between the auxiliary atoms and the original atoms are described below.
Theorem 17 (Brain et al . 2007) For a program Π over A, the answer sets AS (Π) and AS (T meta [Π]) satisfy the following conditions: Abnormality atoms are introduced to indicate the cause of inconsistency: ab p (r) signals that rule r is falsified under some interpretation, ab c (α) points out that α is true but has no support, and ab l (α) indicates that α may be involved in a faulty loop (unfounded or odd).

Definition 9
Given a program Π over A, and a set A ⊆ A of atoms, the following additional metaprograms are constructed: If H(r) = ⊥: ko(n r ).

T A [A]
: for all α ∈ A: The difference from the abnormality atoms in Brain et al . (2007) is that the auxiliary atoms ab p (n r ) are only created for the rules which will be changed in the abstraction (but not omitted, except for constraints which get omitted instead of getting changed to choice rules) due to A, denoted by Π c ∈ A}, and the auxiliary atoms ab c (a) are created only for the non-omitted atoms. This helps the search of a concrete interpretation for the partial/abstract interpretation by avoiding "bad" (i.e., non-supported) guesses of the omitted atoms. Notice that for the rules r i with H(r i ) = α and empty body, we also put bl (n ri ) so that ab c (α) does not get determined, since one can always guess over α in Π.
Having ab l (α) indicates that α is determined through a loop, but it does not necessarily show that the loop is unfounded (as described through loop formulas in Brain et al . 2007). By checking whether α only gets support by itself, the unfoundedness can be caught. In some cases, α could be involved in an odd loop that was disregarded in the abstraction due to omission, which requires an additional check.
The basic properties of the abnormality atoms follow from Brain et al . (2007).
Proposition 18 (Brain et al . 2007) Consider a program Π over A, a set A ⊆ A of atoms, and an answer set Moreover, for every a ∈ A \ A, it holds that: The next result shows that the answer sets of the translated program that are free from abnormality atoms correspond to the answer sets of the correctness checking of an abstract answer setÎ over Π using the query Q Â I . We denote by AB A (Π) the set of abnormality atoms according to the omitted atoms A, that is, Theorem 19 For a program Π over A, a set A ⊆ A of atoms and answer setÎ of omit(Π, A), the following holds.

164
Z. G. Saribatur and T. Eiter The proof is moved to the Online Appendix for clarity of the presentation.

Determining bad-omission atoms
Whether or not Π is consistent, our focus is on debugging the cause of inconsistency introduced through checking for a spurious answer setÎ, that is, evaluating the program Π∪Q Â I from Proposition 2 in Section 3.2. We reason about the inconsistency by inspecting the reason for havingÎ ∈ AS(omit(Π, A)) due to some modified rules.
Any occurrence of the above cases shows thatÎ is spurious. In case (i), due toÎ |= α, the rule r is not satisfied by I while I is a model of the remaining rules. In case (ii), an I that matchesÎ |= α does not give a supporting rule for α.

Definition 11
Let r : α ← B be a rule in Π such that B ± ∩ A = ∅. The abstract ruler = omit(r, A) introduces a spurious loop-behavior w.r.t.Î, if some model I of Π exists s.t. I| A =Î and I |= r, but α is involved in a loop that is unfounded or is odd, due to some α ∈ A ∩ B ± .
The need for reasoning about the two possible faulty loop behaviors is shown by the following examples.
The program Π 1 has the single answer set ∅, and omitting a creates a spurious answer set {b} disregarding that b in unfounded. The program Π 2 is unsatisfiable due to the odd loop of a and b. When both atoms are omitted, this loop is disregarded, which causes a spurious answer set {c}.
Bad omission of atoms are then defined as follows.
https://doi.org/10.1017/S1471068420000095 Published online by Cambridge University Press Definition 12 (Bad omission atoms) An atom α ∈ A is a bad omission w.r.t. a spurious answer setÎ of omit(Π, A), if some rule r ∈ Π with α ∈ B ± (r) exists s.t.r = m A (r) introduces either (i) a spurious choice, or (ii) a spurious support or (iii) a spurious loop-behavior w.r.t.Î.
Intuitively, for case (i) of Definition 10, as α was decided due to choice in H(r), we infer that the omitted atom which caused r to become a choice rule is a bad omission. Also for case (ii), as α is decided withÎ |= B(r), we infer that the omitted atom that caused B(r) to be modified is a bad omission. As for case (iii), it shows that the modification made on r (either omission or change to choice rule) ignores an unfoundedness or an odd loop. Case (i) also catches issues that arise due to omitting a constraint in the abstraction.
We now describe how we determine when an omitted atom is a bad omission.

Definition 13 (Bad omission determining program)
The bad omission determining program T badomit is constructed using the abnormality atoms obtained from T P [Π], T C [Π, A] and T A [A] as follows: 1. A bad omission is inferred if the original rule is not satisfied, but applicable (and satisfied) in the abstract program: badomit(X, type1 ) ← ab p (R), absAp(R), modified (R), omittedAtomFrom(X, R).

A bad omission is inferred if the original rule is blocked and the head is unsupported,
while it is applicable (and satisfied) in the abstract program: omittedAtomFrom(X, R).

3.
A bad omission is inferred in case there is unfoundedness or an involvement of an odd loop, via an omitted atom: faulty(X) ← ab l (X), inOddLoop(X, X 1 ), omittedAtom(X 1 ).
badomit(X 1 , type3 ) ← faulty(X), head (R, X), modified (R), absAp(R), where absAp(r) is an auxiliary atom to keep track of which original rule becomes applicable with the remaining non-omitted atoms for the abstract interpretation, changed (r) shows that r is changed to a choice rule in the abstraction, modified (r) shows that r is either changed or omitted in the abstraction, and omittedAtomFrom(x, r) is an auxiliary atom that states which atoms are omitted from a rule.
For defining type3 , we check for loops using the encoding in Syrjänen (2006) and determine inOddLoop and (newly defined) inPosLoop atoms of Π (see Figure 2).
The cases for type2 and type3 introduce as bad omissions the omitted atoms of all the rules that add to ab c (H) being true, or of all rules that have X in the head for ab l (X), respectively. Modifying badomit determination to have a choice over such rules to be refined (and their omitted atoms to be badomit) and minimizing the number of badomit atoms reduces the number of added back atoms in a refinement step, at the cost of increasing the search space.  In order to avoid the guesses of ab l for omitted atoms even if there is no faulty loop behavior related with them (i.e., this is not the cause of inconsistency ofÎ), we add the constraint ← ab l (X), not someFaulty. with the auxiliary definition someFaulty ← faulty(X).
With all this in place, the program for debugging a spurious answer set is composed as follows.

Definition 14 (spurious answer set debugging program)
For an abstract answer setÎ, we denote by T

Example 10
For the following program, Π,Î = {b} is a spurious answer set of the abstraction for A = {a, d}: {b}.  badomit(a, type2)}. The answer set shows that since c / ∈Î, the rule r1 gets blocked and the rule r2 becomes applicable (which means d is derived). However, as the rule r3 is blocked, a cannot be derived, and thus the occurrence of b is unsupported in Π (w. r.t {b, d}), which was avoided in Π a,d due to (badly) omitting a from the body of r4.
The next example shows the need for reasoning about the disregarded positive loops and odd loops, due to omission. The program T [Π,Î] always returns an answer set forÎ, due to relaxing Π by tolerating abnormalities that arise from checking the concreteness forÎ.

Proposition 20
For each abstract answer setÎ of omit(Π, A), the program T [Π,Î] has an answer set I such that I ∩ A =Î.

Proof
Let X be an interpretation over A * A with X∩A =Î. We will show that with the help of the auxiliary rules/atoms, some interpretation X which is a minimal model of T [Π,Î] X can be reached starting from X. We have the cases (i) X (T [Π,Î]) X and (ii) X |= T [Π,Î] X .
(i) Let r be a ground unsatisfied rule in T [Π,Î] X . This means that X |= B(r) and X H(r). We show that X can be changed to some interpretation X that avoids the condition for X not satisfying r. First, observe that since X ∩ A =Î we have instantiated for X, and hence be satisfied. Thus, r can either (a-1) have H(r) ∈ AB A (Π) and be in (T P [Π] ∪ T C [Π, A]) X , (a-2) have H(r) = ko(n r ) for some r ∈ Π and be in T P [Π] X , (a-3) be in T X bo , or (a-4) be of form α ← ab l (α) for some α ∈ A in T A [A] X . For cases (a-1), (a-2), and (a-3), we can construct X = X ∪ {H(r)} so that X |= H(r) and the reduct T X will not have further rules.
As for case (a-4), if α ∈ A, this means α is determined to be false byÎ, so we construct X = (X \ {ab l (α)}) ∪ {ab l (α) } so that r does not occur in T X . If α / ∈ A, then we construct X = X ∪ {α}.
and H(r ) A for some r ∈ Π, this means ko(n r ) / ∈ X. However, rules for r are added in T P [Π] which uses the rule ko(n r ) to deactivate the meta-rule in T meta [Π], which is then also unsatisfied in the reduct T P [Π] X . So, we construct X = X ∪ {ko(n r )}. Thus, the rule r does not appear in T meta [Π] X . (b-2) Let the rule be of form H(r ) ← ap(n r ), not ko(n r ), for some r ∈ Π different from the one in (b-1). We have ap(n r ) ∈ X. Assume X |= B(r ).
If H(r ) = ⊥, then we must have B ± (r ) ∩ A = ∅ which is handled in (b-1), since otherwise r would occur in omit(Π, A) and contradict thatÎ is an answer set. The case H(r ) = ⊥ cannot occur, since that would mean r occurs in omit(Π, A) and by assumption X should satisfy r . If X B(r ), we construct X = X \ ap(n r ). (b-3) If r is of form ap(n r ) ← B (r ) for some r ∈ Π, then we construct X = X ∪ {ap(n r )}. If r is of the remaining forms with bl(n r ), we construct X = X ∪ {bl (n r )} (ii) If X is a minimal model, then X is an answer set of T [Π,Î], which achieves the result. We assume this is not the case and that there exists Then ap(n r ) / ∈ Y should hold for all r ∈ def (α, Π) (to satisfy the corresponding meta-rules in T meta [Π] X ). Also T A [A] Y does not contain the rule α ← ab l (α) (since otherwise it would not be satisfied). So, we have ab l (α) / ∈ Y , but then we get ab l (α) ∈ Y \ X which is a contradiction.
If the case α ∈ A * A \ A occurs, then we pick Y as the interpretation. If α ∈ AB A (Π)∪HB T bo , then the reduct T [Π,Î] Y will not have further rules. If α ∈ A + \A, then we apply the above reasoning for Y . When we recursively continue with this reasoning, eventually, this case will not be applicable, and thus we can construct a minimal model.
The following result shows that T [Π,Î] flags in its answer sets always bad omission of atoms, which can be utilized for refinement.

Proof
Note that by Proposition 2, we know that the program Π ∪ Q Â I is unsatisfiable. Thus, S∩A is not an answer set of Π∪Q Â I . By Theorem 19, we know that having S∩AB A (Π) = ∅ contradicts with the spuriousness ofÎ. Thus, we have S ∩ AB A (Π) = ∅.
(a) If ab p (n r ) ∈ S for some rule r ∈ Π, then either the rule ab p (n r ) ← ap(n r ), not H(r) is in (T [Π,Î]) S , that is, ap(n r ) ∈ S and H(r) / ∈ S, or the rule ab p (n r ) ← ap(n r ) is in (T [Π,Î]) S , that is, ap(n r ) ∈ S. This unsatisfied rule is then a reason for S ∩ A not being an answer set of Π This unsupported atom α is then a reason for S ∩ A not being an answer set of Π ∪ Q Â I . We know that α is also inÎ, due to S |= (Q Â I ) S . This means that the abstractionr i of some rule r i is in omit(Π, A)Î , that is, the auxiliary atom absAp(n ri ) is true, while bl(n ri ) ∈ S. Thus B ± (r) ∩ A = ∅ must hold. Then by definition, badomit(α , type2 ) ∈ S for α ∈ B ± (r) ∩ A. (c) If ab l (α) ∈ S for some atom α ∈ A, then α ∈ S and ab c (α) / ∈ S. Assume that S ∩ A is not an answer set of Π ∪ Q Â I due to an odd or unfounded loop L containing α.

Z. G. Saribatur and T. Eiter
We distinguish the cases for α. Let α ∈ A. As ab c (α) / ∈ S, for some rule r i in def (α, Π), we have bl (n ri ) / ∈ S, that is, ap(n ri ) ∈ S and thus S |= B(r i ). We know that α is also inÎ, and sinceÎ is an answer set of omit(Π, A), we conclude that there exists some α ∈ B ± (r) ∩ A such that α ∈ L. This way, for the abstract ruler i we haveÎ |= B(r i ), that is, the auxiliary atom absAp(n ri ) is true. By definition, we get badomit(α , type3 ) ∈ S. Now, let α ∈ A. Then, each rule r i in def (α, Π) with B ± (n ri ) ∩ L = ∅ is omitted. Say α ∈ B ± (n ri )∩L. If α ∈ A, by the above reasoning, we get badomit(α , type3 ) ∈ S for some α ∈ B ± (r ) ∩ A, for r ∈ def (α , Π). If α ∈ A, we recursively do the same reasoning. Since L is a loop, eventually we reach a rule r im with α ∈ B ± (r im ). Without loss of generality, H(r im ) is unfoundedly true due to S |= B(r im ); as α is omitted from r im , we thus get badomit(α, type3 ) ∈ S. If there is no such loop L with α ∈ L, then case (a) or (b) applies for S ∩ A not being an answer set of Π ∪ Q Â I .
The badly omitted atoms A o ⊆ A w.r.t. a spuriousÎ ∈ AS(omit(Π, A)) are added back to refine m A . IfÎ still occurs in the refined program omit(Π, A \ A o ), that is, somê I ∈AS(omit(Π, A \ A o )) withÎ | A =Î exists, then T [Π,Î ] finds another possible bad omission. In the worst case, all omitted atoms A are put back to eliminateÎ. Let where BA i are the badly omitted atoms for omit(Π, A i ) w.r.t. an abstract answer setÎ i of omit(Π, A i ).

Corollary 22
For a spurious answer setÎ, after at most k = |A| steps, omit(Π, A k ) will have no answer set that matchesÎ.
Adding back a badly omitted atom may cause a previously omitted rule to appear as a changed rule in the refined program. Due to this choice rule, the spurious answer set might not get eliminated. To give a (better) upper bound for the number of required iterations in order to eliminate a spurious answer set, a trace of the dependencies among the omitted rules is needed.
The rule dependency graph of Π, denoted G rule Π = (V, E), shows the positive/negative dependencies similarly as in G Π , but at a rule-level, where the vertices V are rules r ∈ Π and an edge from r to r exists in E if H(r ) ∈ B ± (r) holds, which is negative if H(r ) ∈ B − (r) and positive otherwise. For a set A of atoms, n A denotes the maximum length of a (non-cyclic) path in G rule Π from some rule r with B ± (r) ∩ A = ∅ backwards through rules r with H(r ) ∈ A. The number n A shows the maximum level of direct or indirect dependency between omitted atoms and their respective rules.

Proposition 23
Given a program Π, a set A of atoms, and a spuriousÎ ∈ AS(omit(Π, A)), omit(Π, A i ) will have no abstract answer set matchingÎ after at most i = n A iterations.
By iterating this process n A times, all omitted rules on which r 0 depends are traced and eventually no abstract answer set matchingÎ occurs.
We remark that in case more than one dependency path r 0 , . . . , r nA with several rules causing inconsistencies exists, the returned set of badomits from T [Π,Î] allows one to refine the rules in parallel.
Recall that Proposition 8 ensures that adding back further omitted atoms will not reintroduce a spurious answer set. Further heuristics on the determination of bad omission atoms can be applied in order to ensure that a spurious answer set is eliminated in one step. This will be further elaborated in a discussion in Section 7.3.1

Application: catching unsatisfiability reasons of programs
In this section, we consider as an application case the use of abstraction in finding a cause of unsatisfiability for an ASP program. To this end, we first introduce the notion of blocker sets for understanding which of the atoms are causing the unsatisfiability.
After describing the implementation, we report about our experiments where the aim was to observe the use of abstraction and refinement for achieving an over-approximation of a program that is still unsatisfiable and to compute the ⊆-minimal blockers of the programs, which projects away the part that is unnecessary for the unsatisfiability.

Blocker sets of unsatisfiable programs
If a program Π has no answer sets, we can obtain by omitting sufficiently many atoms from it an abstract program that has some abstract answer set. By Proposition 3-(iv), any such answer set will be spurious. On the other hand, as long as the abstracted program has no answer sets, by Proposition 3-(iii) also the original program Π has no answer set. This motivates us to use omission abstraction in order to catch a "real" cause of inconsistency in a program. To this end, we introduce the following notion.

Definition 15 A set C ⊆ A of atoms is an (answer set) blocker set of Π if AS(omit(Π, A \ C)) = ∅.
In other words, when we keep the set C of atoms and omit the rest from Π to obtain the abstract program Π , then the latter is still unsatisfiable. This means that the atoms in C are blocking 5 the occurrence of answer sets: no answer set is possible as long as all these atoms are present in the program, regardless of how the omitted atoms will be evaluated in building an answer set.

Z. G. Saribatur and T. Eiter
Example 12 (Example 3 continued ) Modify Π by changing the last rule to b ← not b., in order to have a program Π which is unsatisfiable. Omitting the set A = {d} from Π creates the abstract program Π {d} which is still unsatisfiable. Thus, the set C = A \ A = {a, b, c} is a blocker set of Π . This is similar for omitting the set A = {a, c}, which then causes to have C = {d, b} as a blocker set of Π .
Notice that C = A, that is, no atom is omitted, is trivially a blocker set if Π is unsatisfiable, while C = ∅, that is, all atoms are omitted, is never a blocker set since AS(omit(Π, A)) = {∅}.
We can view a blocker set as an explanation of unsatisfiability; by applying Occam's razor, simpler explanations are preferred, which in pure logical terms motivates the following notion.

Definition 16
By Proposition 9, in order to test whether a blocker set C is minimal, we only need to check whether for no C = C \ {c}, for c ∈ C, the abstraction omit(Π, A \ C ) has an answer set. That is, for a minimal blocker set C, we have that A \ C is a maximal unsatisfiable abstraction, that is, a maximal set of atoms that can be omitted while keeping the unsatisfiability of Π.
Example 13 (Example 12 continued ) The program Π has the single minimal blocker set C = {b}. Indeed, the rule b ← not b does not admit an answer set. Thus, every blocker set must contain b, and C is the smallest such set.
We remark that the atoms occurring in the blocker sets are intuitively the ones responsible for the unsatisfiability of the program. In order to observe the reason of unsatisfiability, one has to look at the remaining abstract program. For this, we consider the notion of blocker rule set associated with a blocker set C, which are the rules that remain in omit(Π, A \ C). For example, the programs Π , Π {d} and Π {a,c} in Example 12 contain the blocker rule sets associated with {a, b, c, d}, {a, b, c}, and {b, d}, respectively. Here, the abstract programs contain choice rules due to the omission in the body, and the unsatisfiability of the programs shows that the evaluation of the respective rule does not make a difference for unsatisfiability. In other words, whether these rules are projected to the original rules by removing the choice, for example, {c}. in Π {d} gets changed to c., or whether they are converted into constraints, for example, ← not c, the program will still be unsatisfiable.
Example 12 illustrated a simple reason for unsatisfiability. However, the introduced notion is also able to capture more complex reasons of unsatisfiability that involve multiple rules related with each other, which is illustrated in the next example.

Example 14 (Graph coloring)
Consider coloring the graph shown in Figure 1(a) with two colors green and red. Due to the clique formed by the nodes 1, 2, 3, it is not 2-colorable. A respective encoding is shown in Figure 5, which for the given graph reduces by grounding and elimination of facts to the following rules, where n∈{1, . . . , 9}, and c, c 1 , c 2 ∈{red, green}: {chosenColor (n, c)}.
Omitting a node n in the graph means to omit all ground atoms related to n; omitting all nodes except 1, 2, 3 gives us a blocker set with the corresponding blocker rule set shown in Figure 6. This abstract program is unsatisfiable and omitting further atoms in the abstraction yields spurious satisfiability. The set of atoms that remain in the program is actually the minimal blocker set for this program. We can also observe the property of unsatisfiable programs being refinement-safe faithful (Proposition 9), as refining the shown abstraction by adding back atoms relevant with the other nodes will still yield unsatisfiable programs.

Corollary 24
Computing (i) some ⊆-minimal respectively (ii) some smallest size blocker C ⊆ A for a given program Π is (i) in FP NP and FP NP -hard respectively (ii) FP Σ P 2 [log, wit]complete.
The membership follows for the case that Π has no answer sets, and the hardness by the reduction in the proof of Theorem 15.

Implementation
The experiments have been conducted with a tool 7 that we have implemented according to the described method. It uses Python, Clingo (Gebser et al . 2011), and the metaprogram output of the Spock debugger (Brain et al . 2007).
The procedure for the abstraction and refinement method is shown in Algorithm 1. Given a program Π and a set A init of atoms to be omitted, first the abstract program Π = omit(Π, A init ) is constructed (line 2). If the abstract program is unsatisfiable, the program and the set of omitted atoms are returned (line 13). Otherwise, an answer set I ∈ AS(omit(Π, A init )) is computed. In the implementation, the first answer set is picked. In order to check whether I is concrete, the meta-program Π debug = T [Π,Î] as described in Section 5 is constructed (line 5). Then, a search over the answer sets of T [Π,Î] for a minimum number of badomit atoms is carried out (line 6). If an answer set with no badomit atoms exists, then this shows that I is concrete, and the abstract program and the set of omitted atoms are returned (line 8). Otherwise, the set of omitted atoms is refined by removing the atoms that are determined as badly omitted, and a new abstract program is constructed with the refined abstraction A . This loop continues until either Algorithm 2: ComputeMinBlocker.
the abstract program Π constructed at line 11 is unsatisfiable or its first answer set is concrete. Figure 7 shows the implemented system according to Algorithm 1 with the respective components. The arcs model both control and data flow within the tool. The workflow of the tool is as follows. First, the input program Π and the set A of atoms to be omitted are read. Then, the control component calls the abstraction creator component which uses Π and A to create the abstract program Π A 1 . The controller then calls the ASP Solver to get an answer set of Π A 2 . If the solver finds no answer set, the controller outputs the abstract program and the set of omitted atoms. Otherwise, it calls the refinement component with the abstract answer setÎ to check spuriousness and to decide whether or not to refine the abstraction 3 . The refinement component calls the checker creator 4 to create T [Π,Î], which uses Spock 5 , and then calls the ASP solver to check whether I is concrete 6 . If not, that is, whenÎ is spurious, it refines the abstraction by updating A (to A ) 7 . Otherwise, the controller returns the outputs.

Z. G. Saribatur and T. Eiter
The computation of a ⊆-minimal blocker set of an unsatisfiable program, given an initial set of omission atoms A, is shown in Algorithm 2; it derives from computing some ⊆-minimal put-back set (Theorem 14), by taking into account that minimal blocker sets amount to minimal put-back set for unsatisfiability. The procedure checks whether omitting an atom α ∈ A\A from Π preserves unsatisfiability. If yes, the atom is added to A and the search continues from the newly constructed abstract program omit (Π, {α}). Once all the atoms are examined, the atoms that are not omitted constitute/form a ⊆-minimal blocker set, provided that AS(Π, A) is unsatisfiable.

Experiments
In our experiments, we wanted to observe the use of abstraction in catching the part of the program which causes unsatisfiability. We aimed at studying how the abstraction and refinement method behaves in different benchmarks in terms of the computed final abstractions and the needed refinement steps, when starting with an initial omission of a random set of atoms. For the refinement step, we expected the search for the answer set with minimum number of badomit atoms to be difficult and thus wanted to investigate whether different minimizations over the badomit atom number make a difference in the reached final abstractions.
Additionally, we were interested in computing the ⊆-minimal blocker sets of the programs and observing the difference in size of the ⊆-minimal blocker sets depending on the problems. For finding ⊆-minimal blocker sets, we additionally compared a top-down method to a bottom-up method, to see their effects on the quality of the resulting ⊆minimal blocker sets. The top-down method proceeds by calling the function ComputeM-inBlocker with the original program Π, A and A = {}, so that the search for a ⊆-minimal blocker set starts from the top. The bottom-up method initially chooses a certain percentage of the atoms to omit, A init , and calls the function Abs&Ref with Π and A init to refine the abstraction and find an unsatisfiable abstract program, omit(Π, A f inal ). Then, a search for ⊆-minimal blocker sets is done, with the remaining atoms, by calling the function ComputeMinBlocker with omit(Π, A f inal ), A and A f inal . We wanted to observe whether there are cases where the bottom-up method helps in reaching better quality ⊆-minimal blocker sets that have smaller size than those obtained with the top-down method.

Benchmarks
We considered five benchmark problems with a focus on the unsatisfiable instances. Two of the problems are based on graphs, two are scheduling and planning problems, respectively, and the fifth one is a subset selection problem.
Graph coloring (GC). We obtained the generator for the graph coloring problem 8 that was submitted to the ASP Competition 2013 (Alviano et al . 2013), and we generated 35 graph instances with node size varying from 20 to 50 with edge probability 0.2-0.6, which are not 2 or 3-colorable. The respective colorability tests are added as superscripts to GC, that is, GC 2 , GC 3 .
Abstract argumentation (AA). Abstract argumentation frameworks are based on graphs to represent and reason about arguments. The abstract argumentation research community has a broad collection of benchmarks with different types of graph classes, which are also being used in competitions (Gaggl et al . 2016). We obtained the Watts-Strogatz (WS) instances (Watts and Strogatz 1998) that were generated by Cerutti et al . (2016) and are unsatisfiable for existence of so-called stable extensions. 9 We focused on the unsatisfiable (in total 45) instances with 100 arguments (i.e., nodes) where each argument is connected (i.e., has an edge) to its n ∈ {6, 12, 18} nearest neighbors and it is connected to the remaining arguments with a probability β ∈ {0.10, 0.30, 0.50, 0.70, 0.90}.
Disjunctive scheduling (DS). As a non-graph problem, we considered the task scheduling problem from the ASP Competition 2011 10 and generated 40 unsatisfiable instances with t ∈ {10, 20} tasks within s ∈ {20, 30} time steps, where d ∈ {10, 20} tasks are randomly chosen to not to have overlapping schedules.
Strategic companies (SC). We considered the strategic companies problem with the encoding and simple instances provided in Eiter et al . (1998). In order to achieve unsatisfiability, we added a constraint to the encoding that forbids having all of the companies that produce one particular product to be strategic. SC is a canonic example of a disjunctive program that has presumably higher computational cost than normal logic programs, and no polynomial time encoding into program such program is feasible. We have thus split rules with disjunctive heads, for example, a ∨ b ← c, into choice rules {a} ← c; {b} ← c at the cost of introducing spurious guesses and answer sets. The resulting split program can be seen as an over-approximation of the original program and thus causes for unsatisfiability of the split program as approximate causes for unsatisfiability of the original program.
15-puzzle (PZ). Inspired from the Unsolvability International Planning Competition, 11 we obtained the ASP encoding for the Sliding Tiles problem from the ASP Competition 2009, 12 which is named as 15-puzzle. We altered the encoding in order to avoid having cardinality constraints in the rules and to make it possible to also solve non-square instances. We used the 20 unsolvable instances from the planning competition, which consist of 10 instances of 3 × 3 and 10 instances of 4 × 3 tiles.
The collection of all encodings and benchmark instances can be found at http://www. kr.tuwien.ac.at/research/systems/abstraction/.

Results
The tests were run on an Intel Core i5-3450 CPU @ 3.10 GHz machine using Clingo 5.3, under a 600 s time and 7 GB memory limit. The initial omission, A init , is done by choosing randomly 50%, 75%, or 100% of the nodes in the graph problems GC, AA, of the tasks in DS, of the companies in SC, and of the tiles in PZ, as well as by omitting all the atoms related with the chosen objects. We show the overall average of 10 runs for each instance in Figure 8. 178 Z. G. Saribatur and T. Eiter Fig. 8. Experimental results for the base case (i.e., with upper limit on badomit # per step).
The first three rows under each category show the bottom-up approach for 50%, 75%, and 100% initial omission, respectively. The columns |A init |/|A| and |A final |/|A| show the ratio of the initial omission set A init and the final omission set A final that achieves unsatisfiability after refining A init (with the number of refinement steps and time shown in the respective columns). The second part of the columns is on the computation of a ⊆-minimal blocker set C min . For the bottom-up approach, the search starts from A final while for the top-down approach, it starts from A. In each refinement step, the number of determined badomit atoms are minimized to be at most |A|/2; Figure 9 shows results for different upper limits and its full minimization. Figure 8 shows that, as expected, there is a minimal part of the program which contains the reason for unsatisfiability of the program by projecting away the atoms that are not needed (sometimes more than 90% of all atoms). Observe that when 100% of the objects in the problems are omitted, refining the abstraction until an unsatisfiable abstract program takes the most time. This shows that a naive way of starting with an initial abstraction by omitting every relevant detail is not efficient in reaching an unsatis- fiable abstract program. We can observe that for the bottom-up approach, starting with larger sets A f inal of omitted atoms usually results in spending less time to compute a ⊆-minimal blocker set. This is because of fewer atoms to check during the computation. For example, for GC 3 starting with 40% of |A final |/|A| computes a ⊆-minimal blocker set faster than the other two cases. Additionally, with a bottom-up method, it is possible to reach a ⊆-minimal blocker set which is smaller in size than the ones obtained with the top-down method.
The graph coloring benchmarks (GC 2,3 ) show that more atoms are kept in the abstraction to catch the non-3-colorability than the non-2-colorability, which matches our intuition. For example, in GC 2 omitting 50% of the nodes (49% of the atoms in A init ) already reaches an unsatisfiable program, since no atoms were added back in A f inal . However, for GC 3 , an average of only 9% of the omitted atoms was added back until unsatisfiability is caught.
For the GC 2,3 , SC, and PZ benchmarks, we can observe that omitting 50% of the objects ends up easily in reaching some unsatisfiable abstract program, with refinements of the abstractions being relatively small. For example, for GC 2 , the size of A f inal is the same as for A init , and for PZ, an average of only 4% of the atoms is added back in A f inal . However, this behavior is not observed when initially omitting 75% of the objects.
We can also observe that some problems (AA and PZ) have larger ⊆-minimal blocker sets than others. This shows that these problems have a more complex structure than others, in the sense that more atoms are syntactically related with each other through the rules and have to be considered for obtaining the unsatisfiability.
Badomit minimization. In a refinement step, minimizing the number of badomit atoms gives the smallest set of atoms to put back. However, the minimization makes the search more difficult, hence may hit a time-out; for example, no optimal solution for 45 nodes in GC was found in 10 min. Figure 9 shows the results of giving different upper bounds on the number of badomit atoms and also applying the full minimization in the refinement for the AA instances. The numbers in the parentheses show the number of instances that reached a time-out. As more minimization is imposed, we can observe an increase in the size of the final omissions A f inal and also a decrease in the size of the ⊆-minimal blocker set. For example, for 75% initial omission, we can see that the size of the computed final omission increases from 0.20 (Figure 8) to 0.24, 0.29 and finally to 0.30. Also, the size of the ⊆-minimal blocker set decreases from 0.37 (Figure 8) to 0.36, 0.35 and finally to 0.34. As expected, adding the smallest set of badomit atoms back makes it possible to reach a larger omission A f inal that keeps unsatisfiability (e.g., min badomit# third row (100% A init ): A f inal is 44% instead of 0.01% as in Figure 8). On the other hand, such minimization over the number of badomit atoms causes to have more refinement steps (Ref #) to reach some unsatisfiable abstract program, which also adds to the overall time.
The ⊆-minimal blocker search algorithm relies on the order of the picked atoms. We considered the heuristics of ordering the atoms according to the number of rules in which each atom shows up in the body, and starting the minimality search by omitting the least occurring atoms. However, this did not provide better results than just picking an atom arbitrarily.
Sliding tiles (15-puzzle). Studying the resulting abstract programs with ⊆-minimal blockers showed that finding out whether the problem instance is unsolvable within the given time frame does not require to consider every detail of the problem. Omitting the details about some of the tiles still reaches a program which is unsolvable and shows the reason for unsolvability through the remaining tiles. Figure 10 shows an instance from the benchmark, which is unsolvable in 10 steps. Applying omission abstraction achieves an abstract program that only contains atoms relevant with the tiles 0, 3, 4, 5 and is still unsatisfiable; this matches the intuition behind the notion of pattern databases introduced in Culberson and Schaeffer (1998).
Summary. The results show that the notion of abstraction is useful in computing the part of the problem which causes unsatisfiability, as all of the benchmarks contain a blocker set that is smaller than the original vocabulary. We observed that different program structures cause the ⊆-minimal blocker sets to be different in size with respect to the respective original vocabulary size. Computation of these ⊆-minimal blocker sets can sometimes result in smaller sizes with the bottom-up approach. However, starting with an 100% initial omission to use the bottom-up approach appears to be unreasonable due to the time difference compared to the top-down approach, even though sometimes it computes ⊆-minimal blocker atoms sets of smaller size. The abstraction and refinement approach can also be useful if there is a desire to find some (non-minimal) blocker, as most of the time, starting with an initial omission of 50% or 75% results in computing some unsatisfiable abstraction in few refinement steps.
We recall that our focus in this initial work is on the usefulness of the abstraction approach on ASP, and not on the scalability. However, we believe that further implementation improvements and optimization techniques should also make it possible to argue about efficiency.

Discussion
In this section, we first discuss possible extensions of the approach to more expressive programs, in particular to non-ground programs and to disjunctive logic programs, and we then address further aspects that may influence the solving behavior.

Non-ground case
In case of omitting atoms from non-ground programs, a simple extension of the method described above is to remove all non-ground atoms from the program that involve a predicate p that should be omitted. This, however, may require to introduce domain variables in order to avoid the derivation of spurious atoms. Specifically, if in a rule r : α ← B(r), a non-ground atom p(V 1 , . . . , V n ) that is omitted from the body shares some arguments, V i , with the head α, then α is conditioned for V i with a domain atom dom(V i ) in the constructed rule so that all values of V i are considered.
For a more fine-grained omission, let the set A consist of the atoms α = p(c 1 , . . . , c k ) and let A p ⊆ A denote the set of ground atoms with predicate p that we want to omit. Consider a k-ary predicate θ p such that for any c 1 , . . . , c k , we have θ p (c 1 , . . . , c k ) = true iff p(c 1 , . . . , c k ) ∈ A p ; for a (possibly non-ground) atom α = p(t 1 , . . . , t k ), we write θ(α) for θ p (t 1 , . . . , t k ). We can then build from a non-ground program Π an abstract non-ground program omit(Π, A) according to the abstraction m A , by mapping every rule r : α ← B in Π to a set omit(r, A) of rules such that and no other rules. The steps above assume that in a rule, a most one predicate to omit occurs in a single atom β. However, the steps can be readily lifted to consider omitting a set {β 1 , . . . , β n } of atoms with multiple predicates from the rules. For this, α ← B, not θ(β) will be converted into α ← B, not θ(β 1 ), . . . , not θ(β n ) and  (1), c(2)} = A c . We have θ(c(1)) = θ(c(2)) = true and θ(c(X)) = false, for X ∈ {3, . . . , 5}. The abstract non-ground program The abstract answer sets with facts b(2), θ(c(1)), θ(c(2)) are {{b (2) For determining bad omissions in non-ground programs, if lifting the current debugging rules is not scalable, other meta-programming ideas Oetsch et al . 2010) can be used. The issue that arises with the non-ground case is having lots of guesses to catch the inconsistency. Determining a reasonable set of bad omission atoms requires optimizations which makes solving the debugging problem more difficult.

Disjunctive programs
For disjunctive programs, splitting the disjunctive rules yields an over-approximation.
The current abstraction method can then be applied over Π . However, it is possible that for an unsatisfiable Π, the constructed Π becomes satisfiable; the reason for unsatisfiability of Π can then not be grasped.
The approach from above can be extended to disjunctive programs Π by injecting auxiliary atoms to disjunctive heads in order to cover the case where the body does not fire in the original program. To obtain with a given set A of atoms an abstract disjunctive program omit(Π, A), we define abstraction of disjunctive rules r : α 1 ∨ · · · ∨ α n ← B in Π, where n ≥ 2 and all α i = ⊥ are pairwise distinct, as follows: where x is a fresh auxiliary atom. Further development of the approach for disjunctive programs in a syntax preserving manner remains as future work.

Further solution aspects
The abstraction approach that we presented is focused on the syntactic level of programs, and it aims to preserve the structure of the given program. Thus, depending on the particular encoding that is used to solve a particular problem, the abstraction process may provide results that, from the semantic view of the problem, can be of quite different quality.
For illustration, consider a variant of the graph coloring encoding with a rule colorUsed (Y ) ← colored (X, Y ), node(X), color (Y ) which records that a certain color is used in the coloring solution, and where colorUsed (Y ) is then used in other rules for further reasoning. Omitting nodes of the graph means omitting the ground atoms that involve them; this will cause to have a choice rule {colorUsed (Y )} for each color Y in the constructed abstract program. However, these guesses could immediately cause the occurrence of spurious answer sets due to the random guesses of colorUsed . Thus, one may need to add back many of the atoms in order to get rid of the spurious guesses.
Other aspects that apparently will have an influence on the quality of abstraction results is the way in which refinements are made and the choice of the initial abstraction. We considered possible strategies for this in order to help with the search, and we tested their effects in some of the benchmarks. The first strategy, described in Section 7.3.1, is on refining the reasoning step for determining bad omissions, while the the second, described in Section 7.3.2, is on making a more intuitive decision than a random choice for the initial set of omitted atoms.

Bad omission determination
It may happen that in a refinement step, no put-back set is found that eliminates the spurious answer set. Therefore, we consider further reasoning for bad omission determination to see whether it can be useful in order to mitigate this behavior.

Example 17
Consider the following program Π, with the single answer set I = {c, d, a, b}, and its abstraction Π a,d , with AS( Π a,d ) = {{c}, {c, b}} The abstract answer setÎ = {c} is spurious, as a corresponding answer set of Π must contain a by r3, d by r2 and b by r1, which is impossible since b is false inÎ. Adding to Π the query Q  Reasoning over omitted rules. We considered an additional badomit type to help with catching the cases when putting back one omitted atom does not eliminate the spurious answer set.
• If a rule was omitted due to a badly omitted atom, it has an omitted atom in the body, and the abstract rule was applicable, then an additional bad omission is inferred. badomit The idea is as follows: if some atom a, which was decided to be badly omitted, occurs in the head of a rule r, then once a is put back, r will also be put back. However, if B(r) has some other omitted atom, then r will be put back as a choice rule. If this rule was also applicable in the abstract program for the given interpretation I, then once it has been put back as a choice rule, it will still be applicable for some I = I ∪ {a} or I = I. Thus, the choice over H(r) may again have the same spurious answer set determined.
Experiments. Figure 11 shows the conducted experiments with the additional bad omission detection. Observe that compared with the results in Figure 8, for the DS benchmarks, the number of refinement steps and the time spent decreased since more omitted atoms were decided to be badly omitted in one step. Also, we can see that the final set A f inal of omitted atoms remains larger with the heuristics. On the other hand, this heuristic does not have a positive effect on the quality of the obtained minimal blockers. However, the results for the AA benchmarks are different. Although a larger final set of omitted atoms A f inal is computed for A init with 100% (15% instead of 0.01% in Figure 8), the overall time spent and the refinement steps for obtaining some A f inal increased. On the other hand, smaller minimal blockers were computed. The results show that the considered strategy does not obtain the expected results on every program, as the structure of the programs matters.

Initial omission set selection
A possible strategy for setting up the initial omission set is to look at the occurrences of atoms in rule bodies and to select atoms that occur least often, as intuitively, atoms that occur less in the rules should be less relevant with the unsatisfiability. Experiments. In Figure 12, we see the results of choosing as initial omission 50% and 75% of the objects in increasing order by number of their occurrences. In the benchmarks GC 3 , when omitting 75% of the least occurring nodes, two of the instances hit time-out during the Clingo call when searching for an optimal number of badomit atoms, and one instance hits time-out when computing some A f inal , again spending most of the time in Clingo calls. The time increase for finding some optimized number of badomit atoms is due to many possible badomit atoms among the omitted atoms in the particular instances. An interesting observation is that omitting 75% of the least occurring nodes results in larger A f inal sets: while random omission removes on average 31% of the atoms (Figure 8), with the strategy added it increases to 67%. This result matches the intuition behind the strategy: the nodes that are not involved in the reasoning should not really be the cause of non-colorability. We also observe a positive effect on the quality of the computed ⊆-minimal blocker sets, which are smaller in size, only 15% of the atoms for 50% and 75% initial omission, while before they were 16% and 17% (Figure 8), respectively.
For the AA benchmarks, compared to Figure 8, the strategy made it possible to obtain larger A f inal sets. However, overall it does not show a considerable effect on the number of refinement steps or on the quality of the computed ⊆-minimal blocker sets as in GC 3 . We additionally performed experiments with full minimization of badomit# in the refinement step ( Figure 13). Compared to the results in Figure 9, we can observe that larger A f inal sets were obtained, and there were no time-outs when determining the badomit atoms in the refinement steps. The search for optimizing the number of badomit atoms is easier due to doing the search among the omitted atoms that have the least dependency.
For the DS benchmarks, although the strategy reduced the average refinement steps and time, it had a negative effect on the quality of the ⊆-minimal blocker sets as they are much larger (13% and 14% for initial omission of 50% and 75% of tasks, instead of 10% and 9% as in Figure 8, respectively).
Although abstraction is a well-known approach to reduce problem complexity in computer science and artificial intelligence, it has not been considered so far in ASP. In the context of logic programming, abstraction has been studied many years back in Cousot and Cousot (1992). However, the focus was on the use of abstract interpretations and termination analysis of programs, and moreover, stable semantics was not addressed. In planning, abstraction has been used for different purposes; two main applications are plan refinement (Sacerdoti 1974;Knoblock 1994), which is concerned with using abstract plans computed in an abstract space to find a concrete plan, while abstraction-based heuristics (Edelkamp 2001;Helmert et al . 2014) deal with using the costs of abstract solutions as a heuristic to guide the search for a plan. Pattern databases (Edelkamp 2001) are a notion of abstraction which aims at projecting the state space to a set of variables, called a "pattern." In contrast, merge and shrink abstraction (Helmert et al . 2014) starts with a suite of single projections and then computes a final abstraction by merging them and shrinking. In the sequel, we address related issues in the realm of ASP.

Relaxation-and equivalence-based rewriting
Over-approximation has been considered in ASP through relaxation methods (Lin and Zhao 2004;Giunchiglia et al . 2004). These methods translate a ground program into its completion (Clark 1978) and search for an answer set over the relaxed model. Omission abstraction is able to achieve an over-approximation by also reducing the vocabulary which makes it possible to focus on a certain set of atoms when computing an abstract answer set. However, finding the reason for spuriousness of an abstract answer set is trickier than finding the reason for a model of the completion not being an answer set of the original program, since the abstract answer set contains fewer atoms and a search over the original program has to be done to detect the reason why a matching answer set cannot be found.
Under answer set semantics, a program Π 1 is equivalent to a program Π 2 , if AS (Π 1 ) = AS (Π 2 ). Strong equivalence (Lifschitz et al . 2001) is a much stricter condition over the two programs that accounts for non-monotonicity: Π 1 and Π 2 are strongly equivalent if, for any set R of rules, the programs Π 1 ∪ R and Π 2 ∪ R are equivalent. This is the notion that makes it possible to simplify a part of a logic program without looking at the rest of it: if a subprogram Q of Π is strongly equivalent to a simpler program Q , the Q is replaced by Q . The works (Osorio et al . 2002;Turner 2003;Eiter et al . 2004;Pearce 2004) show ways of transforming programs by ensuring that the property holds. A more liberal notion is uniform equivalence (Maher 1986;Sagiv 1987) where R is restricted to a set of facts. Then, a subprogram Q in Π can be replaced by a uniformly equivalent program Q and the main structure will not be affected (Eiter and Fink 2003).
In terms of abstraction, there is the abstraction mapping that needs to be taken into account, since the constructed program may contain a modified language and the mapping makes it possible to relate it back to the original language. Thus, in order to define equivalence between the original program Π and its abstraction Π m according to a mapping m, we need to compare m(AS (Π)) with AS ( Π m ). The equivalence of Π and Π m then becomes similar to the notion of faithfulness. However, as we have shown, even if the abstract program Π m is faithful, refining m may lead to an abstract program that contains spurious answer sets. Thus, simply lifting the current notions of equivalence to abstraction may not achieve useful results.
Refinement-safe faithfulness however is a property that would allow one to make use of Π m instead of Π, since it preserves the answer sets. This property can immediately be achieved when a constructed abstract program is unsatisfiable (which then shows that original program was unsatisfiable). However, for original programs that are consistent, reaching an abstraction that is refinement-safe faithful is not easy; adding an atom back may immediately cause to reach a guessing that introduces spurious solutions.
The unfolding method for disjunctive programs (Janhunen et al . 2006) is similar in spirit to our approach of introducing choice to the head for uncertainties. For a given disjunctive program P , they create a generating program that preserves completeness. Using this program, they generate model candidates M (but they may also get "extra" candidate models, which do not match the stable models of P ). Then, they test for stability of the candidates, by building a normal program Test (P, M ) that has no stable models if and only if M is a stable model of the original disjunctive program P . Thus, stability testing is reduced to testing the non-existence of stable models for Test (P, M ). However, this approach does not consider omission of atoms from the disjunctive rules when creating the new program; they further extend the vocabulary with auxiliary atoms. They build the model candidate gradually by starting from an empty partial interpretation and extending it step by step. For this, they use the observation that if for the extension M of the partial interpretation that assigns false to the undefined atoms, Test (P, M ) has a stable model, then P has no stable model M ⊃ M . Compared to the notions that we introduced for omission-based abstraction, this technique would give a more restricted notion of spuriousness of an abstract answer set, since the omitted atoms would be assigned to false.

ASP debugging
Investigating inconsistent ASP programs has been addressed in several works on debugging (Brain et al . 2007;Oetsch et al . 2010;Dodaro et al . 2015;, where the basic assumption is that one has an inconsistent program and an interpretation as expected answer set. In our case, we do not have a candidate solution but are interested in finding the minimal projection of the program that is inconsistent. Through abstraction and refinement, we are obtaining candidate abstract answer sets to check in the original program. Importantly, the aim is not to debug the program itself, but to debug (and refine) the abstraction that has been constructed.
Different from other works, Dodaro et al . (2015) computed the unsatisfiable cores (i.e., the set of atoms that, if true, causes inconsistency) for a set of assumption atoms and finds a diagnosis with it. The user interacts with the debugger by answering queries on an expected answer set, to narrow down the diagnosed set. In our work, such an interaction is not required and the set of blocker atoms that was found points to an abstract program (a projection of the original program) which shows all the rules (or projection of the rules) that are related with the inconsistency.
The work by Syrjänen (2006) is based on identifying the conflict sets that contain mutually incompatible constraints. However, for large programs, the smallest input program where the error happens must be found manually. Another related work is Pontelli et al . (2009), which gives justifications for the truth values of atoms with respect to an answer set by graph-based explanations that encode the reasons for these values. Notably, justifications can be computed offline or online when computing an answer set, where they may be utilized for program debugging purposes. The authors demonstrated how their approach can be used to guide the search for consistency restoring in CR-Prolog (Balduccini and Gelfond 2003), by identifying restoral rules that are needed to resolve conflicts between literals detected from their justifications. However, the latter hinge on (possibly partial) interpretations, and thus do not provide a strong explanation of inconsistency as blockers, which are independent of particular interpretations.

Unsatisfiable cores in ASP
A well-known notion for unsatisfiability is minimal unsatisfiable subsets (MUS), also known as unsatisfiable cores (Liffiton and Sakallah 2008;Lynce and Silva 2004). It is based on computing, given a set of constraints respectively formulas, a minimal subset of the constraints that explains why the overall set is unsatisfiable. Unsatisfiable cores are helpful in speeding up automated reasoning, but have beyond many applications and a key role, for example, in model-based diagnosis (Reiter 1987) and in consistent query answering (Arenas et al . 1999).
In ASP, unsatisfiable cores have been used in the context of computing optimal answer sets (Alviano and Dodaro 2016;Andres et al . 2012), where for a given (satisfiable) program, weak constraints are turned into hard constraints; an unsatisfiable core of the modified program that consists of rewritten constraints allows one to derive an underestimate for the cost of an optimal answer set, since at least one of the constraints in the core cannot be satisfied. However, if the original program is unsatisfiable, such cores are pointless. In the recent work (Alviano et al . 2018), unsatisfiable core computation has been used for implementing cautious reasoning. The idea is that modern ASP solvers allow one to search, given a set of assumption literals, for an answer set. In case of failure, a subset of these literals is returned that is sufficient to cause the failure, which constitutes an unsatisfiable core. Cautious consequence of an atom amounts then to showing that the negated atom is an unsatisfiable core.
Intuitively, unsatisfiable cores are similar in nature to spurious abstract answer sets, since the latter likewise do not permit to complete a partial answer set to the whole alphabet. More formally, their relationship is as follows.
Technically, in our terms an unsatisfiable (u-) core for a program Π is an assignment I over a subset C ⊆ A of the atoms such that Π has no answer set J that is compatible with I, that is, such that J| C = I holds; moreover, I is minimal, if no sub-assignment I , that is, restriction of I to some subset C ⊂ C of the atoms) is a u-core (cf. Alviano et al . 2018). We then have the following property.

Proposition 26
Suppose thatÎ ∈ AS(omit(Π, A)) for a program Π and a set A of atoms. IfÎ is spurious, thenÎ is a u-core of Π (w.r.t. A \ A). Furthermore, if A is maximal, that is, no A ⊃ A exists such that omit(Π, A ) has some (spurious) answer set I such thatÎ| A = I , then I is a minimal core.

Proof
The abstract answer setÎ describes an assignment over A\A, and asÎ is spurious, there is no answer set J of Π such that J| A\A =Î; henceÎ is a u-core. Now toward a contradiction assume that A is maximal butÎ is not a minimal u-core. The latter means that some sub-assignmentÎ ofÎ, that is, restrictionÎ =Î| A ofÎ to A \ A for some A ⊃ A, is a u-core for Π. By over-approximation of abstraction (Theorem 1) and the possibility of iterative construction (Proposition 5), we conclude thatÎ ∈ AS (omit(Π, A )) must hold. SinceÎ is a u-core, it follows thatÎ is spurious. By this, we reach a contradiction to the assumption that A is maximal.
That is, spurious answer sets are u-cores; however, the converse fails in that cores C are not necessarily spurious answer sets of the corresponding omission A = A \ A(C), where A(C) are the atoms that occur in C. For example, for the program with the single rule r : a ← b, not a.
the set C = {b} is a core, while C is not an answer set of omit({r}, {a}) = ∅. Intuitively, the reason is that C lacks foundedness for the abstraction, as it assigns b true while there is no way to derive b from the rules of the program, and thus b must be false in every answer set. As C is a minimal u-core, the example shows that also minimal u-cores may not be spurious answer sets.
Thus, spurious answer sets are a more fine-grained notion of relative inconsistency than (minimal) u-cores, which accounts for a notion of weak satisfiability in terms of the abstracted program. In case of an unsatisfiable program Π, each blocker set C for Π naturally gives rise to u-cores in terms of arbitrary assignments I to the atoms in A \ C; in this sense, blocker sets are conceptually a stronger notion of inconsistency explanation than u-cores, in which minimal blocker sets and minimal u-cores remain unrelated in general.

Forgetting
Forgetting is an important operation in knowledge representation and reasoning, which has been studied for many formalisms and is a helpful tool for a range of applications (cf. Delgrande 2017; Eiter and Kern-Isberner 2018). The aim of forgetting is to reduce the signature of a knowledge base, by removing symbols from the formulas in it (while possibly adding new formulas) such that the information in the knowledge base, given by its semantics that may be defined in terms of models or a consequence relation, is invariant with respect to the remaining symbols; that is, the models resp. consequences for them should not change after forgetting.
Due to non-monotonicity and minimality of models, forgetting in ASP turned out to be a non-rivial issue. It has been extensively studied in the form of introducing specific operators that follow different principles and obey different properties; we refer to Gonçalves et al . (2017) and Leite (2017) for a survey and discussion. The main aim of forgetting in ASP as such is to remove/hide atoms from a given program, while preserving its semantics for the remaining atoms. As atoms in answer sets must be derivable, this requires to maintain dependency links between atoms. For example, forgetting the atom b from the program Π = {a ← b.; b ← c.} is expected to result in a program Π in which the link between a and c is preserved; this intuitively requires to have the rule a ← c in Π . The various properties that have been introduced as postulates or desired properties for an ASP forgetting operator mainly serve to ensure this outcome; forgetting in ASP is thus subject to more restricted conditions than abstraction.
Atom omission as we consider it is different from forgetting in ASP as it aims at a deliberate over-approximation of the original program that may not be faithful; furthermore, our omission does not resort to language extensions such as nested logic programs that might be necessary in order to exclude non-faithful abstraction; notably, in the ASP literature, under-approximation of the answer sets was advocated if no language extensions should be made (Eiter and Wang 2008).
Only more recently over-approximation has been considered as a possible property of forgetting in ASP in Delgrande and Wang (2015), which was later named Weakened Consequence (WC) in Gonçalves et al . (2016): (WC): Let Π be a disjunctive logic program, let A be a set of atoms, and let X be an answer set for Π. Then X \ A is an answer set for forget(Π, A).
That is, AS(Π)| A ⊆ AS(forget(Π, A)) should hold. This property amounts to the notion of over-approximation that we achieve in Theorem 1. However, according to Gonçalves et al . (2016), this property is in terms of proper forgetting only meaningful if it is combined with further axioms. Our results may thus serve as a base for obtaining such combinations; in turn, imposing further properties may allow us to prune spurious answer sets from the abstraction.

Conclusion
Abstraction is a well-known approach to reduce problem complexity by stepping to simpler, less detailed models or descriptions. In this article, we have considered this hitherto in ASP-neglected approach, and we have presented a novel method for abstracting ASP programs by omitting atoms from the rules of the programs. The resulting abstract program can be efficiently constructed, has rules similar to the original program, and is a semantic over-approximation of the latter, that is, each original answer set is covered by some abstract answer set. We have investigated semantic and computational properties of the abstraction method, and we have presented a refinement method for eliminating spurious answer sets by adding badly omitted atoms back. The latter are determined using an approach inspired from previous work on debugging ASP programs. An abstraction and refinement approach, like the one that we presented, may be used for different purposes. We have demonstrated as a show case giving explanations of the unsatisfiability of ASP programs, which can be achieved in terms of particular sets of omitted atoms, called blockers, for which no truth assignment will lead to an answer set. Thanks to the structure-preserving nature of the abstraction method, this allows one to narrow down the focus of attention to the rules associated with the blockers. Experimental results collected with a prototype implementations have shown that, in this way, strong explanations for the cause of inconsistency can be found. They would not have been easily visible if we had applied a pure semantic approach in which connections between atoms might get lost by abstractions. We have briefly discussed how the approach may be extended to the non-ground case and to disjunctive programs, and we have addressed some further aspects that can help with the search.
Outlook and future work. There are several avenues of research in order to advance and complement this initial work on abstraction in ASP. Regarding over-approximation, the current abstraction method can be made more sophisticated in order to avoid introducing too many spurious answer sets. This, however, will require to conduct a more extensive program analysis, as well as to have non-modular program abstraction procedures which do not operate on a rule by rule basis; to what extent the program structure can be obtained, and understanding the trade-off between program similarity and answer set similarity are interesting research questions.
Faithful abstractions achieve a projection of the original answer sets, which we conjecture to be faster to compute in the abstract program. However, reaching a faithful abstraction is not easy, and furthermore, checking the correctness of a computed abstract answer set is costly, as one needs to complete the partial (abstract) answer set in the original program. Further investigations are required in this direction to make it possible to start with a "good" initial abstraction and to efficiently reach a (faithful) abstraction with a concrete solution. This would then make it possible to use abstraction for certain reasoning tasks on ASP programs such as brave or cautious reasoning or to compute a concrete answer set for programs with grounding or search issues.
Another direction is building a highly efficient implementation. The current experimental prototype has been built on top of legacy code and tools such as Spock (Brain et al . 2007) from previous works; there is a lot of room for significant performance improvement. However, even for the current, non-optimized implementation, it is already possible to see benefits in terms of qualitative improvements of the results. An optimized implementation may lead to view abstraction under a performance aspect, which then becomes part of a general ASP solving toolbox.
Yet another direction is to broaden the classes of programs to which abstraction can be fruitfully applied. We have briefly discussed non-ground and disjunctive programs, for which abstraction needs to be worked out, but also other language extensions such as aggregates, nested implication, or program modules (which are naturally close relatives to abstraction) are interesting topics. In particular, for non-ground programs other, natural forms of abstraction are feasible; for example, to abstract over individuals of the domain of discourse or predicate abstraction. The companion work (Saribatur et al . 2019) studies the former issue.

Supplementary material
To view supplementary material for this article, please visit https://doi.org/ 10.1017/S1471068420000095