ArticlePDF Available

Existential Quantifiers in the Rule Body

Authors:

Abstract

In this paper we consider a simple syntactic extension of Answer Set Programming (ASP) for dealing with (nested) existential quantifiers and double negation in the rule bodies, in a close way to the recent proposal RASPL-1. The semantics for this extension just re-sorts to Equilibrium Logic (or, equivalently, to the General Theory of Stable Models), which provides a logic-programming interpretation for any arbitrary theory in the syntax of Predicate Calculus. We present a translation of this syntactic class into standard logic programs with vari-ables (either disjunctive or normal, depending on the input rule heads), as those allowed by current ASP solvers. The translation relies on the introduction of auxiliary predicates and the main result shows that it preserves strong equivalence modulo the original signature.
Existential quantifiers in the rule body
Pedro Cabalar?
Department of Computer Science,
Corunna University (Corunna, Spain),
cabalar@udc.es
Abstract. In this paper we consider a simple syntactic extension of
Answer Set Programming (ASP) for dealing with (nested) existential
quantifiers and double negation in the rule bodies, in a close way to
the recent proposal RASPL-1. The semantics for this extension just re-
sorts to Equilibrium Logic (or, equivalently, to the General Theory of
Stable Models), which provides a logic-programming interpretation for
any arbitrary theory in the syntax of Predicate Calculus. We present a
translation of this syntactic class into standard logic programs with vari-
ables (either disjunctive or normal, depending on the input rule heads),
as those allowed by current ASP solvers. The translation relies on the
introduction of auxiliary predicates and the main result shows that it
preserves strong equivalence modulo the original signature.
1 Introduction
One of the traditional limitations of Answer Set Programming (ASP) in the
past has been the need of resorting to a ground instantitation of program rules.
Starting from the original definition of Stable Models [1] in terms of a proposi-
tional language, ASP solvers were designed following a two step process: first,
removing variables in favour of all their ground instances; and second, comput-
ing the stable models of the resulting ground program. Variables were somehow
an “external” element that was not directly treated in the semantics. It is not
surprising, in this way, that quantification was not paid too much attention in
the past although, paradoxically, most practical applications of ASP deal in one
way or another with some limited use of quantified variables, using auxiliary
predicates to capture the intended meaning.
This general picture has experienced a drastical change in the last years
thanks to the introduction of Quantified Equilibrium Logic [2] (QEL) or the
equivalent definition of stable models for first-order formulas proposed in [3].
These approaches provide a logic-programming interpretation for any arbitrary
first-order theory, so that syntactic restrictions do not play a role in the seman-
tic definition any more. Some recent results have been obtained in applying this
semantics to programs with variables, without resorting to grounding. For in-
stance, [4] treats the problem of strong equivalence, whereas in [5] QEL is used
?This research was partially supported by Spanish MEC project TIN-2006-15455-
C03-02 and Xunta de Galicia project INCITE08-PXIB105159PR.
to analyse rule redundancy and the completeness of rule subsumption under
a given substitution. On the other hand, much work remains to be done yet
in exploring the intuition, under a logic-programming perspective, of the QEL
interpretation of formulas with arbitrary syntax or belonging to new syntac-
tic classes. Several works have followed this direction: we can mention [6], that
has studied the extension of the concept of safety for arbitrary theories; [7],
which considers an extension for dealing with partial functions; or [8], that pro-
poses a logic-programming language RASPL-1 for counting and choice that can
be translated into first-order expressions under QEL by introducing existential
quantifiers and double negations in the rule bodies.
In this paper we analyse an extension of logic programs with variables where,
similarly to first-order theories resulting from the RASPL-1 translation, we in-
troduce existential quantifiers and double negations in the rule bodies, further
allowing a way of nesting these new constructs (something not considered in [8]).
We provide some intutitions of the utility of this extension and explain how these
features are already used in the current ASP programming style by a suitable in-
troduction of auxiliary predicates. In fact, we propose an automated translation
that relies on this technique of auxiliary predicates and reduces the proposed
extension to regular logic programs with variables as those accepted by current
ASP grounding tools. This translation is shown to be strongly equivalent (mod-
ulo the original language without the auxiliary predicates). Apart from providing
a more readable and compact representation, the advantage of dealing with the
extended syntax is avoiding a potential source of errors in the introduction of
auxiliary predicates, not only due to a possible programmer’s mistake in the
formulation, but especially because auxiliary predicates must be guaranteed to
be hidden and limited to their original use.
The rest of the paper is organised as follows. In the next section we introduce
some motivating examples and explain the paper goals. In Section 3 we provide
an overview of Quantified Equilibrium Logic to proceed in the next section with
the introduction of the syntactic subclass we study in this paper. Section 5
presents the translation of this class into regular logic programs, proving its
correctnes. Section 6 discusses some related work and finally, Section 7 concludes
the paper.
2 Motivation
Example 1. Given the extent of predicates person(X), parent(X, Y ) (Xis a
parent of Y) and married(X, Y ) which is a symmetric relation, suppose we
want to represent that a person is happy, happy(X), when all his/her offsprings
are married. ut
A typical piece of program representing this problem in ASP would probably
look like:
has spouse(Y)married(Y, Z )
has single offs(X)parent(X, Y ),not has spouse(Y)
happy(X)person(X),not has single offs(X)
Notice how predicates has spouse and has single offs are not in the problem
enunciate. Furthermore, their name suggest that we are capturing an existential
quantifier: note how in the first two rules, we have a free variable in the body that
does not occur in the head. In other words, a more compact way of representing
this program could just be:
happy(X)person(X),not Y(parent(X, Y ),not Z married(Y , Z)) (1)
We will show that, in fact, both representations are strongly equivalent under
QEL if we restrict the use of the auxiliary predicates has spouse and has single offs
to the above mentioned rules. Notice, however, the importance of this second
representation. We, not only, get a more readable formula and avoid auxiliary
predicates not included in the original problem: we also avoid a possible mis-
take in the use of these predicates in another part or module of the program,
something that could radically change their intended meaning for the example.
As another typical example of an implicit existential quantifier, consider the
frequent formalisation of the inertia default in ASP:
holds(F, V, do(A, S)) holds(F, V, S ),not ab(F, V, A, S) (2)
ab(F, V, A, S)holds(F, W, do(A, S)), W 6=V(3)
where the complete rule bodies would also include the atoms action(A), situation(S),
fluent(F), range(F, V ) and range(F, W ) to specify the sorts of each variable1.
Again, predicate ab is introduced to capture the meaning: “there exists a value
for Fother than V.” In other words, the formula could have been written instead
as:
holds(F, V, do(A, S)) holds(F, V, S ),not W(holds(F, W, do(A, S)), W 6=V)
Something similar happens with choice-like pairs of rules for generating pos-
sible solutions. They typically have the form of even negative loops, like in the
example:
in(X)vertex(X),not out(X)
out(X)vertex(X),not in(X)
⊥ ← in(X), in(Y), X 6=Y, not edge(X, Y ),not edge(Y , X)
1Grounders like lparse allow avoiding the repetitive definition of variable sorts by
specifying general sorted variables with macros of the form #domain action(A).
intended for generating a clique2in terms of predicate in(X). It seems clear
that predicate out(X) is auxiliary and thus its use should be limited to this pair
of rules (adding other rules with out(X) as a head may change the intended
meaning). An alternative to this kind of “generating” loops is using a cardinality
constraint (as defined in [9]) of the form:
{in(X)} ← vertex(X)
whose intuitive meaning is, for each vertex X, pick 0 or 1 atoms in the set
{in(X)}. As explained in [8] the formula above is (strongly) equivalent to:
in(X)vertex(X)∧ ¬¬in(X) (4)
The informal reading of a formula like ¬¬αin the body is that “it is consistent
to assume α.” It is perhaps interesting to note that, as shown in [10], a double
negation in the body can be moved (maintaining strong equivalence) to a single
negation in the head, as follows:
in(X)∨ ¬in(X)vertex(X)
and it is well-known [11,12] that head negations can be ruled out in favour of
auxiliary predicates, eventually returning to the same formulation we had with
the out(X) predicate. Once again, the interest of the extended syntax is that it
can be translated into traditional logic programs while it avoids the explicit use
of auxiliary predicates which become hidden in the translation.
3 Overview of Quantified Equilibrium Logic
Following [5], Quantified Equilibirum Logic (QEL) is defined in terms of a models
selection criterion for the intermediate logic of Quantified Here-and-There. In the
paper, we will deal with a version of this logic dealing with static domains and
decidable equality, calling it QHT for short.
Let L=hC, F, P ibe a first-order language where Cis a set of constants,F
a set of functions and Pa set of predicates. First-order formulae for Lare built
up in the usual way, with the same syntax of classical predicate calculus. As in
Intuitionistic Calculus, the formula ¬ϕwill actually stand for ϕ→ ⊥. We write
Atoms(C, P ) to stand for the set of atomic sentences built with predicates in P
and constants in C. Similarly, T erms(C, F ) denote the set of ground terms built
from functions in Fand constants in C.
We will adopt a logical writing for logic programming connectives, so that
constructions like (α, β), (not α) and (αβ) are respectively written as (αβ),
(¬α) and (βα). We also adopt lower-case letters for variables and functions,
and upper-case for predicates and constants. In this way, a rule like (2) becomes
the formula:
Holds(f, v, s)∧ ¬Ab(f, v, a, s)Holds(f , v, do(a, s))
2A clique is a set of vertices that are pairwise adjacent.
We use boldface letters x,yto denote tuples of variables, and similarly dfor
tuples of domain elements.
The corresponding semantics for QHT is described as follows.
Definition 1 (QHT-interpretation). A QHT-interpretation for a language
L=hC, F, P iis a tuple h(D, σ), H, T iwhere:
1. Dis a nonempty set of constant names identifying each element in the inter-
pretation universe. For simplicity, we take the same name for the constant
and the universe element.
2. σ:T erms(DC, F )Dassigns a constant in Dto any term built with
functions in Fand constants in the extended set of constants CD. It must
satisfy: σ(d) = dfor all dD.
3. Hand Tare sets of ground atomic sentences such that HTAtoms(D, P ).
ut
An interpretation of the form h(D, σ), T , Tiis said to be total and can be seen
as the classical first-order interpretation h(D, σ), T i. In fact, we will indistinctly
use both notations. Furthermore, given any arbitrary M=h(D, σ), H, T iwe will
define a corresponding total (or classical) interpretation MT
def
=h(D, σ), T i.
Satisfaction of formulas is recursively defined as follows. Given an interpre-
tation M=h(D, σ), H, T i, the following statements are true:
M |=p(t1, . . . , tn) if p(σ(t1), . . . , σ(tn)) H.
M |=t1=t2if σ(t1) = σ(t2).
M 6|=.
M |=αβif M |=αand M |=β. Disjunction is analogous.
M |=αβif both:
(i) M 6|=αor M |=βand
(ii) MT|=αβin classical logic
M |=x α(x) if both:
(i) M |=α(d), for each dDand
(ii) MT|=x α(x) in classical logic
M |=x α(x) if for some dD,M |=α(d). ut
In the proofs, we will make use of the following property:
Proposition 1. If M |=ϕthen MT|=ϕ.ut
Nonmonotonic entailment is obtained by introducing a models-minimisation
criterion. Let us define the following ordering relation among interpretations
Definition 2. We say that an interpretation M=h(D, σ), H, T iis smaller
than an interpretation M0=h(D, σ), H 0, T i, written MM0, when HH0.
ut
That is, to be comparable, Mand M0must only differ in their Hcomponent, so
that MM0iff HH0. Notice that, as a consequence, MMT. As usual,
we write M≺M0when MM0and M 6=M0(that is HH0).
We say that Mis a model of a theory Γif Msatisfies all the formulas in
Γ. If Mis total, it is easy to check that: M |=Γiff MT|=Γin classical logic.
The next definition introduces the idea of minimal models for QHT.
Definition 3 (Equilibrium model). A total model Mof a theory Γis an
equilibrium model if there is no smaller model M0≺ M of Γ.ut
Note that an equilibrium model is a total model, i.e., a classical model of Γ.
We name Quantified Equilibrium Logic (QEL) the logic induced by equilibrium
models.
Given an interpretation Mfor a given language, and a sublanguage L, we
write M|Lto denote the projection of Mmodulo L. We say that two theories
Γ1, Γ2for language L0are strongly equivalent with respect to a given sublanguage
Lof L0, written Γ1L
sΓ2, when for any theory Γin L, the sets of equilibrium
models (modulo L) for Γ1Γand Γ2Γcoincide. When L=L0we just write
Γ1sΓ2and, in fact, this has been proved [13] to correspond to the QHT-
equivalence of Γ1and Γ2.
AHerbrand QHT-interpretation M=h(D, σ), H, T iis such that Dcorre-
sponds to T erms(C, F ) and σ=id, where id is the identity relation. In [13] it
was shown that Mis a Herbrand equilibrium model of a logic program Πiff T
is a stable model of the (possibly infinite) ground program grD(Π) obtained by
replacing all variables by all terms in Din all possible ways.
4 Bodies with existential quantifiers
In this section we introduce the syntactic extension of logic programs we are
interested in. We define a body as conjunction of conditions being a condition,
in its turn, recursively defined as:
i) an atom P(t) where tis a tuple of terms;
ii) an equality atom t=t0with t, t0terms;
iii) x(ψ) where xis a tuple of variables and ψis a body in its turn;
iv) ¬Cwhere Cis a condition;
Conditions of the form i) and ii) are called atoms. A literal is also a condition,
with the form of an atom or its negation; the rest of conditions are called non-
literal. A literal like ¬(t=t0) will be abbreviated as t6=t0. Without loss of
generality, we can assume that we handle two consecutive negations at most,
since ¬¬¬C↔ ¬Cis a QHT-tautology. Conditions beginning (resp. not begin-
ning) with ¬are said to be negative (resp. positive). Given a body B, we define
its positive (resp. negative )part,B+(resp. B) as the conjunction of positive
(resp. negative) conditions in B. We assume that x1. . . xnψis a shorthand
notation for x1. . . xnψ.
Arule is an expression like BHd where H d is a (possibly empty) dis-
junction of atoms (called the rule head) and Bis a body. We assume that an
empty disjunction corresponds to . All free variables in a rule are implicitly
universally quantified. The following are examples of rules:
P(x)∧ ¬¬Q(x)∧ ¬∃yR(x, y)∧ ∃z¬R(y, z )S(x)R(x, x) (5)
P erson(x)∧ ¬∃y(P arent(x, y)∧ ¬∃z Married(y, z)) H appy(x) (6)
V ertex(x)∧ ¬¬In(x)In(x) (7)
V ertex(x)∧ ¬∃y(Edge(x, y)∧ ∃z(E dge(y , z))) P(x) (8)
Rules (6) and (7) are just different ways of writing (1) and (4) respectively.
Rule (8) would intuitively mean, for instance, that P(x) holds for any vertex x
that is terminal or exclusively connected to terminal nodes. A rule is said to be
normal if Hd just contains one atom. If Hd =the rule receives the name of
constraint. A rule is said to be regular if its body is a conjunction of literals (i.e.
it does not contain double negations or existential quantifiers).
A set of rules of the general form above will be called a logic program with
existential quantifiers in the body or -logic program, for short. A program is
said to be normal when all its rules are normal. The same applies for regular
program.
5 A translation into regular logic programs
The translation of a rule r:BHd into a regular logic program rwill consist
in recursively translating all the negative conditions in the rule body Bwith
respect to its positive part B+. This will possibly generate a set of additional
rules dealing with new auxiliary predicates.
Definition 4 (Translation of conditions). We define the translation of a
condition Cwith respect to a positive body B+as a pair hC, Π (C, B+)iwhere
Cis a formula and Π(C, B+)a set of rules.
1. If Cis a literal or has the form xα(x)then C=C,Π(C, B+) = .
2. Otherwise, the condition has the form C=¬α(x)being xthe free variables
in C. Then C=¬Aux(x)and Π(C, B+)=(B+α(x)Aux(x))where
Aux is a new fresh predicate and is the translation of rules in Definition 5.
ut
The translation of a conjunction of conditions Dwith respect to a positive
body B+is defined as expected hD, Π(D , B+)iwhere Dis the conjunction of
all Cfor each Cin D, and Π(D, B+) the union of all rules Π(C, B +) for each
Cin D.
Definition 5 (Translation of a rule). The translation of a rule r, written r
is done in two steps:
i) We begin replacing all the positive conditions xϕin the body of rby ϕ[x/y]
being ya tuple of new fresh variables3and repeat this step until no condition
of this form is left. Let BHd denote the resulting rule.
ii) We then obtain the set of rules:
rdef
={Hd B+(B)} ∪ Π(B, B+)
ut
3The introduction of new variables ycan be omitted when xdoes not occur free in
the rest of the rule.
The translation of an -logic program Πis denoted Πand corresponds to
the logic program SrΠras expected. As an example of translation, consider
the rule r1= (6). We would have:
r
1={P erson(x)∧ ¬Aux1(x)Happy(x)} ∪ Π(B(r1), P erson(x))
where B(r1)=¬∃y(P arent(x, y)∧ ¬∃z(M arried(y, z))) and so,
Π(B(r1), P erson(x)) contains the translation of the rule:
P erson(x)∧ ∃y(P arent(x, y)∧ ¬∃z(Married(y, z))) Aux1(x)
We remove the positive existential quantifier4to obtain r2:
P arent(x, y)∧ ¬∃z(M arried(y, z)) P er son(x)Aux1(x)
and now
r
2={P arent(x, y)P er son(x)∧ ¬Aux2(x, y)Aux1(x)}
Π(B(r2), P arent(x, y)P erson(x))
This yields the rule
P arent(x, y)P er son(x)∧ ∃z(Married(y, z )) Aux2(x, y)
in which, again, we would just remove the positive existential quantifier. To sum
up, the final complete translation r
1would be the (regular) logic program:
P erson(x)∧ ¬Aux1(x)Happy(x)
P arent(x, y)P er son(x)∧ ¬Aux2(x, y)Aux1(x)
P arent(x, y)P er son(x)Married(y, z )Aux2(x, y)
We can informally read Aux2(x, y) as “yis a married child of x” and Aux1(x)
as “xhas some single child.”
It is easy to see that the translation is modular (we translate each rule inde-
pendently) and that its size is polynomial with respect to the original input.
Proposition 2. Given a rule rcontaining Aatoms in its body and Nsubfor-
mulas of one of the forms (¬∃xα)or (¬¬α), the translation rcontains N+ 1
regular rules whose bodies contain at most A+Natoms in their body. ut
It might be thought that, as we always have a way of removing positive
existential quantifiers, these are unnecessary. However, we must take into account
that they are useful when nested in another expression. For instance, rule (8)
would be translated as:
V ertex(x)∧ ¬Aux(x)P(x)
V ertex(x)Edge(x, y)E dge(y , z)Aux(x)
4As yis not free in the rest of the formula, there is no need to change it by a new
variable, in this case.
but note the difference with respect to a rule like5:
V ertex(x)V ertex(z)∧ ¬∃y(Edge(x, y )Edge(y, z )) P(x)
whose meaning is drastically different (zis now implicitly universally quantified).
This is reflected in the corresponding translation:
V ertex(x)V ertex(z)∧ ¬Aux(x, z )P(x)
V ertex(x)V ertex(z)Edge(x, y )Edge(y, z )Aux(x, z)
Note how Aux(x, z) depends also on znow, capturing the meaning “there is
an intermediate node between xand z.” In this way, P(x) would be true, for
instance, if we just had any unrelated zwithout incoming edges.
As an example with double negation, it can be easily checked that the trans-
lation of rule (7) becomes the program:
V ertex(x)∧ ¬Aux(x)In(x)
V ertex(x)∧ ¬In(x)Aux(x)
The intuition behind a double negation of an existential operator can be
understood with the following example. Consider the rule:
¬¬∃x(V ertex(x)M arked(x)) P
expressing that Pholds when it is consistent to assume that there exists a
marked vertex. The tranlsation would be the program Π1:
¬Aux1P V ertex(x)M arked(x)Aux2
¬Aux2Aux1
so that, Aux2means “there exists a marked vertex”, Aux1that “there does
not exist a marked vertex” (i.e., all vertices are marked) and so Pwould mean
“I cannot prove there does not exist a marked vertex.” It is perhaps worth to
observe the difference with respect to program Π2just consisting of:
V ertex(x)M arked(x)P
where Pchecks the existence of a marked node. Programs Π1and Π2are
not strongly equivalent (modulo non-auxiliary predicates). For instance, if we
consider the addition of program Π, consisting of the facts V ertex(1) and
V ertex(2)}plus the rules
PMarked(1) Marked(1) P
program Π2Πhas one stable model {V ertex(1), V ertex(2)}whereas Π1Π
has a second stable model {V ertex(1), V ertex(2), M arked(1), P }(modulo non-
auxiliary predicates).
5We included in this example an extra condition V ertex(z) just to keep handling a
safe rule, something we will discuss later.
5.1 Proof of correctness
To prove our main result, we will use several QHT valid equivalences (many of
them already commented in [14]) and introduce several lemmas. For instance,
we will frequently make use of the following QHT valid formula (see [14])
α(βγ)(αβγ) (9)
Similarly, the following is a QHT-theorem:
α∧ ¬(αβ)α∧ ¬β(10)
whose proof can be obtained from transformations in [10, 14].
Lemma 1. Let Mbe an equilibrium model of Γ, and M |=α. Then Mis an
equilibrium model of Γ∪ {α}.ut
Theorem 1 (Equivalent subformula replacement). Given the equivalence:
x(α(x)β(x)) (11)
where xis the set of free variables in αor β, and a given formula γcontaining
a subformula α(t), then (11) implies:
γγ[α(t)(t)]
ut
Theorem 2 (Defined predicate removal). Let Γ1be a theory for language
L,αa formula in that signature and Aux a predicate not in L. If Γ2is Γ1plus
x(Aux(x)α(x)) (12)
then Γ1L
sΓ2.ut
Lemma 2. Let M1=h(D, σ), H, T ibe a model of the formulas
x(α(x)Aux(x)) (13)
x(¬Aux(x)β(x)) (14)
where αand βdo not contain predicate Aux, and let M2=h(D, σ), H 0, T ibe
such that H\H0={Aux(d)|d∈ D} for some non-empty set of tuples of domain
elements Dsatisfying M1|=Aux(d)and M16|=α(d). Then M2|= (13) (14).
ut
Theorem 3. Let Ldenote a signature not containing predicate Aux, and let
α(x), β(x)be a pair of formulas for L. Given Γ1= (13) (14) and Γ2consisting
of Γ1plus:
x(Aux(x)α(x)) (15)
then Γ1L
sΓ2.ut
Theorem 4. Let Γ1be a theory consisting of the single formula
xα(x)∧ ¬β(x)γ(x)(16)
for language L, being xa tuple with all the variables that occur free in the
antecedent or in the consequent. Then Γ1L
sΓ2where Γ2is the pair of formulas:
xα(x)∧ ¬Aux(x)γ(x)(17)
xα(x)β(x)Aux(x)(18)
and Aux(x)is a fresh auxiliary predicate not included in L.ut
Lemma 3. Let xbe a variable that does not occur free in β. Then, the following
is a QHT-tautology:
(x α(x)β)↔ ∀x(α(x)β) (19)
ut
Theorem 5 (Main result). Let Πbe an -logic program for language L. Then
ΠL
sΠ.ut
Theorem 6. If Πis a disjunctive (resp. normal) -logic program then Πis a
disjunctive (resp. normal) regular logic program. ut
The reason for making the definition of new auxiliary predicates depend on
the positive body of the original rule has to do with the following property, that
will guarantee a correct grounding of the program resulting from the translation.
Definition 6 (Restricted variable). A variable Xis said to be restricted in
a conjunction of literals βby a positive literal Ain βwhen Xoccurs in Aand
one of the following holds:
1. Ahas the form p(t);
2. Ahas the form X=Yor Y=Xand, in its turn, Yis restricted by a
different positive literal A0in β.
We just say that Xis restricted in βif it is restricted by some Ain β.ut
Definition 7 (Safe rule). A rule r:BHd is said to be safe when both:
a) Any free variable occurring in ralso occurs free and restricted in B.
b) For any condition x ϕ in B,xoccurs free and restricted in ϕ.ut
For instance, rule (6) is safe: its only free variable xoccurs in the positive body
P erson(x). In fact, all the rules we used in the previous sections are safe. How-
ever, rules like:
¬¬Mark(x)Mark(x)
y Q(y)P(x)
x¬P(x)A
are not safe. Notice that, for regular programs (i.e. those exclusively containing
literal conditions) only case a) of Definition 7 is applicable and, in fact, this
coincides with the usual concept of safe rule in ASP.
Theorem 7. If Πis safe then Πis safe. ut
6 Related work
As commented in the Introduction, this work is directly related to the recently
introduced language RASPL-1 [8]. In fact, that language is defined in terms
of a translation into first order sentences that fit into the syntax extension we
study here (existential quantifiers and double negations in the body). To put an
example (extracted from [8]), the RASPL-1 program:
{q(x)} ← p(x)⊥←{x:q(x)}1
that can be read “give the choice for q(x) per each p(x) but do not take just 0
or 1 atoms for q”, actually corresponds to the -logic program:
p(x)∧ ¬¬q(x)q(x)¬∃xy(q(x)q(y)x6=y)→ ⊥
In fact, it is always possible to represent an existential quantifier in the body
x α(x) using the RASPL-1 construct 1 {x:α(x)}provided that α(x) is some
literal. In this sense, one of the contributions of this paper is the possibility of
recursively nesting quantifiers or double negations inside them. Notice that this
is quite comfortable, for instance, in rules like (6) or (8). On the other hand, we
provide here a translation of these -logic programs into regular logic programs
with new hidden auxiliary predicates, preserving strong equivalence modulo the
original language.
The use of -logic programs was actually forwarded in [7] where an extension
of QEL for dealing with partial functions was introduced. The paper considered
a syntactic subclass of logic programs with partial functions, providing a trans-
lation that removed functions in favour of predicates with an extra parameter
(this transformation is usually called flattening). The result of this translation,
however, fell in the class of -logic programs, dealing with negations in the head
(i.e. double negations in the body) and possibly nested existential quantifiers in
the body. The main result of the current paper was conjectured in [7].
A less related approach that has also considered the use of body quantifiers
is [15], although the semantics was only defined for stratified programs.
7 Conclusions
We have presented an extension of logic programming that allows dealing with
(possibly nested) existential quantifiers and double negations in the rule bodies.
We have shown how this new syntactic class captures several typical represen-
tation problems in ASP allowing a more compact and readable formulation and
avoiding the use of auxiliary predicates. In fact, we presented a translation that
reduces this new syntax to that of regular logic programs by automatically gen-
erating these auxiliary predicates, which are kept hidden to avoid programmer’s
errors.
Several open topics are left for future work. For instance, the direct use of
universal quantifiers is not so straightforward. To understand why, notice that
a rule like x(P(x)Q(x)) His not strongly equivalent to ¬∃x(P(x)
¬Q(x)) Hand its behaviour is related to nested implications, something that
in principle is not so clear (see the translation of a nested implication in [14]).
With the current formalism, we can just deal with a limited version of since
¬∃x(P(x)∧ ¬Q(x)) is strongly equivalent to ¬¬∀x(P(x)Q(x)). Another
interesting topic for future study is the use of existential quantifiers in the rule
heads.
References
1. Gelfond, M., Lifschitz, V.: The stable model semantics for logic programming. In:
Proc. of the 5th Intl. Conf. on Logic Programming. (1988) 1070–1080
2. Pearce, D., Valverde, A.: Towards a first order equilibrium logic for nonmonotonic
reasoning. In: Proc. of the 9th European Conf. on Logics in AI (JELIA’04). (2004)
147–160
3. Ferraris, P., Lee, J., Lifschitz, V.: A new perspective on stable models. In: Proc.
of the International Joint Conference on Artificial Intelligence (IJCAI’07). (2004)
372–379
4. Lifschitz, V., Pearce, D., Valverde, A.: A characterization of strong equivalence for
logic programs with variables. In: Proc. of the 9th Intl. Conf. on Logic Program-
ming and Nonmonotonic Reasoning (LPNMR’07). (2007) 188–200
5. Pearce, D., Valverde, A.: Quantified equilibrium logic and foundations for an-
swer set programming. In: Proc. of the 24th Intl. Conf. on Logic Programming
(ICLP’08). (2008) 547–560
6. Lee, J., Lifschitz, V., Palla, R.: Safe formulas in the general theory of stable models
(preliminary report). In: Proc. of the 24th Intl. Conf. on Logic Programming
(ICLP’08). (2008) 672–676
7. Cabalar, P.: Partial functions and equality in answer set programming. In: Proc.
of the 24th Intl. Conf. on Logic Programming (ICLP’08). (2008) 392–406
8. Lee, J., Lifschitz, V., Palla, R.: A reductive semantics for counting and choice
in answer set programming. In: Proc. of the 23rd AAAI Conference on Artificial
Intelligence. (2008) 472–479
9. Syrj¨anen, T.: Cardinality constraint programs. In: Proc. of the 9th European Conf.
on Logics in Artificial Intelligence (JELIA’04). (2004) 187–199
10. Lifschitz, V., Tang, L.R., Turner, H.: Nested expressions in logic programs. Ann.
Math. Artif. Intell. 25(3-4) (1999) 369–389
11. Inoue, K., Sakama, C.: Negation as failure in the head. J. Log. Program. 35(1)
(1998) 39–78
12. Janhunen, T.: On the effect of default negation on the expressiveness of disjunctive
rules. In: Proc. of the 6th Intl. Conf. on Logic Programming and Nonmonotonic
Reasoning. (2001) 93–106
13. Pearce, D., Valverde, A.: Quantified equilibrium logic and the first order logic of
here-and-there. Technical Report MA-06-02, University of M´alaga, Spain (2006)
14. Cabalar, P., Pearce, D., Valverde, A.: Reducing propositional theories in equilib-
rium logic to logic programs. In: 12th Portuguese Conference on Artificial Intelli-
gence (EPIA 2005). (2005) 4–17
15. Eiter, T., Gottlob, G., Veith, H.: Modular logic programming and generalized
quantifiers. In: Proc. of the 4th Intl. Conf. on Logic Programming and Nonmono-
tonic Reasoning (LPNMR’97). (1997) 290–309
Appendix. Proofs
Proof (Proposition 2). It is easy to see that, excepting for the first step, in
which the original rule ris considered, each time we introduce a new rule is
for univoquely defining an auxiliary predicate Aux(x) that corresponds to one
of the subexpressions of the form ¬∃xαor ¬¬αthat occurred in r. So, the
total number of rules is N+ 1. As for the body size of each rule, we always go
keeping a (usually strict) subset of the original number of atoms Aoccurring in
r, plus additional literals ¬Aux(x) corresponding to replaced conditions of the
form ¬∃xαor ¬¬α. As a result, we get the upper bound N+A.ut
Proof (Lemma 1). Obviously, M |=Γ∪ {α}. There cannot be a smaller model
M0≺ M for Γ∪ {α}, because it would also be a model of Γand this would
contradict minimality of Mfor Γ.ut
Proof (Theorem 1). It is easy to check that, given any tuple dof domain elements
and any model M=h(D, σ), H, T i,M |= (11) implies that:
1. M |=α(d) iff M |=β(d)
2. MT|=α(d) iff MT|=β(d)
Looking at the satisfaction of formulas, this means that for any model of (11),
α(t) and β(t) for any tuple of terms tare semantically equivalent and can be
interchanged. ut
Proof (Theorem 2). Let Γdenote an arbitrary theory for Land take Man
equilibrium model of ΓΓ1and signature L. We will show that there exists
an equilibrium model M0of ΓΓ2such that M0|L=M. It is clear we can
take M0equal to Mfor all predicates in Land fix the extent of Aux such
that M0|=Aux(d) iff M |=α(d) for any tuple of elements d. Obviously, by
construction, M0|=ΓΓ2. It must also be minimal, since any M00 ≺ M0that
M00 |=ΓΓ2is also a model of ΓΓ1and this would contradict the minimality
of Mfor that theory.
For the other direction, take some M0=h(D, σ), T 0iequilibrium model of
ΓΓ2. Clearly, M0|=ΓΓ1and, since this theory does not contain Aux,
its projection M0|L=M=h(D, σ), T imust also be a model for ΓΓ1. Take
another model of this theory, M2=h(D, σ), H, T iwith HT, that is M2≺ M.
But then, we can construct M0
2=h(D, σ), H 0, T 0isuch that H0consists of Hand
the set of atoms Aux(d) for which M2|=α(d). Notice that H0must be a subset
of T0because M2|=α(d) implies M |=α(d) and this implies M0|=α(d),
that together with M0|= (12) implies and M0|=Aux(d). But as HTwe
get H0T0and so M0
2≺ M0. On the other hand, by construction of M0
2
together with M0|= (12), we obtain M0
2|= (12). In this way, M0
2|=ΓΓ2
while M0
2≺ M0reaching a contradiction with minimality of M0for this theory.
ut
Proof (Lemma 2). Note first that, for any tuple d6∈ D,M1and M2coincide
both for Aux(d), α(d) and β(d). Then M1|= (13) and M1|= (14) allow us
to conclude M2|=α(d)Aux(d) and M2|=¬Aux(d)β(d), respectively.
We remain to prove that the same holds for tuples d∈ D. Consider MT=
h(D, σ), T i, that is, the total model above M1and M2. For any d∈ D, we
have M1|=Aux(d) and thus MT|=Aux(d), but then M26|=¬Aux(d). On
the other hand, M1|= (14) also implies MT|= (14) and, in particular, MT|=
¬Aux(d)β(d). The latter, together with M26|=¬Aux(d), implies M2|=
¬Aux(d)β(d), for any d∈ D.
Similarly, M1|= (13) implies MT|= (13) and, in particular, MT|=α(d)
Aux(d) for d∈ D. On the other hand, as M1and M2do not differ for α(d),
we conclude M26|=α(d), and thus, M2|=α(d)Aux(d). ut
Proof (Theorem 3). Let Γdenote an arbitrary theory for Land take M=
h(D, σ), T ian equilibrium model of ΓΓ1. For proving that Mis equilibrium
model of ΓΓ2, by Lemma 1, it suffices to show that M |= (15). Assume this
does not hold. As Mis a total model, this just means that for some tuple of
domain elements d,M |=Aux(d) and M 6|=α(d). Let us take now a model
M0=h(D, σ), H, T iwhere His equal to Texcepting that the extension of Aux
does not include the tuple d. Notice that HTand M0≺ M. In fact, we can
observe that Lemma 2 is applicable taking M1=M,M2=M0and D={d}to
conclude M0|= (13) (14), i.e., M0|=Γ1. Furthermore, as M0only differs from
Min Aux,M0|=Γ. But this contradicts the minimality of Mas equilibrium
model of ΓΓ1.
For the other direction, let Mbe an equilibrium model of ΓΓ2. Since
Γ1Γ2, obviously M |=ΓΓ1. We remain to prove that Mis minimal. Suppose
we had some other model M0≺ M of ΓΓ1. If M0|= (15) we would have
M0|=ΓΓ2and this would contradict the minimality of Mfor that theory. So,
assume M06|= (15). Let Dbe the set of tuples dfor which M06|=Aux(d)α(d)
(note that this set cannot be empty). As M |= (15) we must have M0|=Aux(d)
and M06|=α(d) for all d∈ D. Now take M00 equal to M0excepting that, for all
d∈ D,M00 6|=Aux(d). We can apply Lemma 2 taking M1=M0,M2=M00
and Dto conclude M00 |= (13) (14), i.e., M00 |=Γ1. Furthermore, as M00
only differs from M0in the extent of Aux, we obtain M00 |=ΓΓ1. Now, as
M00 6|=Aux(d) and we have M |= (15) we conclude M00 |=Aux(d)α(d). For
tuples c6∈ D we had M0|=Aux(c)α(c) by definition of D, but M0and M00
coincide in Aux(c) and α(c). As a result, M00 |= (15) too, and since M00 ≺ M
we obtain a contradiction with minimality of Mfor ΓΓ2.ut
Proof (Theorem 4). By (9), the formula (17) is strongly equivalent to:
x¬Aux(x)(α(x)γ(x)) (20)
so that, we can apply Theorem 3 on Γ2to transform the implication in (18) into
a double implication:
xα(x)β(x)Aux(x)(21)
As a result, Γ2is strongly equivalent (modulo L) to the theory consisting of (17)
and (21). By Theorem 1, this is strongly equivalent, in its turn, to (21) plus:
xα(x)∧ ¬(α(x)β(x)) γ(x)(22)
Due to (10), the latter is strongly equivalent to (16). Finally, by Theorem 2, we
can remove (21), since it is a definition for predicate Aux which does not belong
to L.ut
Proof (Lemma 3). As (19) is a classical tautology, we remain to prove that,
for any interpretation M=h(D, σ), H, T i,M |=x α(x)βiff M |=
x(α(x)β). For the left to right direction, assume M |=x α(x)βbut
M 6|=x(α(x)β). The latter means there exists some element dfor which
M 6|=α(d)β. Since M |=x α(x)βwe have that MTalso satisfies that
formula and so MT|=x(α(x)β) since it is a classically equivalent formula.
Therefore, the only possibility is M |=α(d) and M 6|=β. But from the former
we get M |=x α(x) and this contradicts M |=x α(x)β.
For the right to left direction, suppose M |=x(α(x)β). As MTalso satis-
fies that formula it must also satisfy the classically equivalent formula x α(x)
β. We remain to prove that M |=x α(x) implies M |=β. Assume that the
former holds. Then, for some element d,M |=α(d). As M |=x(α(x)β), in
particular, M |=α(d)β, but this together with M |=α(d) implies M |=β.
ut
Proof (Theorem 5. Main result). We prove the result by induction on the suc-
cessive application of ·in each group of newly generated rules. If a rule ris
regular it can be easily checked that r=rand the result of strong equivalence
is straightforward. If rcontains a double negation or an existential quantifier,
we will show that the two steps in Definition 5 preserve strong equivalence. Step
i) is the result of the successive application of Lemma 3, that allows us to re-
move a positive existential quantifier in the body, provided that the quantified
variable does not occur free in the rest of the formula. Notice that this lemma
can be applied to a larger body like x α(x)γβ(again, with xnot free
in γ) because the latter is QHT-equivalent to x α(x)(γβ). For Step ii),
consider any rule r:BHd with some non-literal negative condition ¬β1(x).
We can write ras B+(x)∧ ¬β1(x)B0(x)Hd(x), being B0(x) the rest of
conjuncts in the negative body, that is, B(x) excepting ¬β1(x). This expression
can be equivalently written as B+(x)∧ ¬β1(x)(B0(x)Hd(x)) and so, we
can apply Theorem 4 taking α(x) to be the positive body B+(x), and γ(x) the
implication B0(x)Hd(x) to conclude that ris strongly equivalent (modulo its
original language L) to the conjunction of B+(x)∧ ¬Aux1(x)B0(x)Hd(x)
plus B+(x)β1(x)Aux1(x) being Aux1a new fresh predicate. We can repeat
this step for the rest of non-literal negative conditions in Buntil the original
rule becomes B+(x)∧ ¬Aux1(x)∧ · · · ∧ ¬Auxn(x)B00(x)Hd(x), i.e., what
we called B+(B)Hd in Definition 5. Finally, the correctness of the
translation of the newly generated rules B+(x)βi(x)Auxi(x) follows from
the induction hypothesis. Note that termination of this inductive transformation
·is guaranteed by observing that in each step, we reduce the size of new rule
bodies, replacing negative non-literal conditions by smaller expressions. ut
Proof (Theorem 6). First, observe that all the rules generated in the transla-
tion either repeat one of the original rule heads in Πor just contain one atom
Aux(x). Thus, if the original program was disjunctive (resp. normal) then Π
will be disjunctive (resp. normal). Second, just notice that the translation is re-
cursively repeated until rule bodies exclusively contain literal conditions, so the
final program will be a regular logic program in the usual sense. ut
Proof (Theorem 7). It suffices to observe that the rules generated in each trans-
lation step preserves safety with respect to Definition 7. Assume we start from
a safe rule and obtain its translation following the steps in Definition 5. In Step
i) of that definition, each time we remove and replace it by ϕ[x/y] we are
introducing a new free variable yin the rule that must satisfy condition a) in
Definition 7 to maintain safety. But this is guaranteed because the original rule
was safe and so, xoccurred free and outside the scope of negation in ϕ. There-
fore, ywill occur free and outside the scope of negation in ϕ[x/y], which is part
of the resulting rule body. This means that the resulting rule satisfies a) in Def-
inition 7 for variable ywhile the status of the rest of variables in the rule has
not changed.
Now, take the rule r:BHd that results from iterating Step i) which,
as we have seen, preserves safety. Notice that rdoes not contain quantified
expressions outside the scope of negation, so that B+is just a conjunction of
atoms. It can be easily observed that each rule r0:B+(B)Hd does
not introduce new free variables with respect to BHd (it just replaced any
negative condition like ¬α(x) in Bby a new atom ¬Aux(x)) while it maintains
the original positive body B+. So, as the original rule rwas safe, all free variables
in r0also satisfy condition a) in Definition 7, while b) is not applicable because
r0is regular (its body exclusively consists of literals). Similarly, rules like r00 :
B+α(x)Aux(x) in Π(B, B+) do not introduce new free variables with
respect to reither, while they maintain the same positive body B+, so they will
satisfy a) in Definition 7. On the other hand, any quantified condition like y ϕ
that occurs in α(x) also occurred in a condition ¬α(x) in r. As rwas safe, y ϕ
will satisfy b) in Definition 7, so that rule r00 is safe too. ut
... The idea of the translation F2LP is similar to the one independently given by Cabalar (2009) that eliminates existential quantifiers in the scope of negation in the body of a rule. The difference is that our translation applies to the larger class of almost universal formulas and also differentiates between intensional and extensional predicates. ...
... Several parts of this chapter are also presented in (Lee et al., 2008a;Lee, Lifschitz, & Palla, 2008b, 2009). ...
... By Proposition 12 this is equivalent to (D, σ ), T | ¬ϕ and, as we had (D, σ ), T | (ψ → ϕ) we get (D, σ ), T | ψ that by Proposition 11 implies M | ψ reaching a contradiction. 2 Proof of Proposition 5. Since (DE) asserts that equality satisfies the excluded middle x = y ∨ ¬(x = y), we can apply Lemma 2 to obtain that ϕ → x = y is HT-equivalent to ¬(ϕ ∧ x = y). But, by Proposition 4, the latter is HT-equivalent to ϕ ∧ x = y → ⊥. 2 Proof of Proposition 6. Independently shown in [42,43]. 2 Proof of Proposition 7. Note first that YALE has the form of a logic program excepting for the use of an existential quantifier in (INE), (DV) and (DV 0 ) and the use of conjunction in (8) and (9). Using the propositions in Section 3 and previous results in this appendix, we can transform YALE into a logic program, we can then consider Π = gr D (YALE), that is, the (infinite) ground logic program resulting from replacing variables by all terms in the Herbrand universe D. An important observation is that this program can be split in the sense of the Splitting Theorem in [51], as any ground atom for Holds or Imposs indexed by a situation s never depends 17 on an atom indexed by do(a, s). ...
... See the recent works[42] and[43] for a detailed description on this technique of removing existential quantifiers from the rule bodies.7 Most logic programming formalisations of inertia for boolean fluents make use of a second negation called strong or explicit. ...
Article
This paper investigates the challenging problem of encoding the common sense knowledge involved in the manipulation of spatial objects from a reasoning about actions and change perspective. In particular, we propose a formal solution to a puzzle composed of non-trivial objects (such as holes and strings) assuming a version of the Situation Calculus written over first-order Equilibrium Logic, whose models generalise the stable model semantics. Key words: Common sense reasoning, qualitative spatial reasoning, reasoning about actions and change PACS: 1.
Article
Even within a single knowledge representation system there are often many different ways to model a given domain and formalise a reasoning problem specified over the domain. In particular, two knowledge descriptions can be semantically equivalent even if they are expressed in quite different languages or vocabularies. This paper proposes and studies a concept of synonymy that applies to equivalent theories formulated in distinct vocabularies. We suggest a set of general desiderata or criteria of adequacy that any reasonable synonymy concept should satisfy. We then analyse a specific concept of synonymy within answer set programming (ASP), a framework that is currently being applied with success in many areas of knowledge technology. We characterise this concept in different ways, show that it satisfies the prescribed criteria of adequacy, and illustrate how it can be applied to a sample problem arising in knowledge representation and reasoning. As a logical framework we use quantified equilibrium logic based on a first-order version of the logic of here-and-there. This serves as an adequate formal foundation for ASP and allows us to obtain a logical account of the synonymy relation.
Article
Full-text available
This report continues the study of quantified equilibrium logic, QEL, introduced in (25, 26), and its monotonic base logic, here-and-there. We present a slightly modified version of QEL where the so-called unique name assumption or UNA is not assumed from the outset but may be added as a special requirement for specific applications. We also consider here an alternative axiom set for first-order here-and-there. The new system appears to be simpler as well as making it easier to derive some simple semantic validities. In addition, based on the modified semantics for first-order here-and- there we present QEL and investigate some of its properties. We look in particular at two issues. First, we consider the relation of QEL to non-ground answer set programming. Specifically we show that in the quantified case equilibrium models corresponds precisely to the open an- swer sets of (12), while the earlier version of open answer sets discussed in (11) can be captured in QEL with UNA. Secondly, we propose a concept of strong equivalence for theories in QEL generalising the usual concept for propositional theories. The strong equivalence theorem of (16) is extended to the first-order case by showing that equivalence in the first-order logic of here-and-there is a necessary and sufficient condition forstrong equiva- lence. We relate this to the concept of strong equivalence for non-ground logic programs studied in (3).
Conference Paper
Full-text available
In this paper, the expressive power of disjunctive rules involving default negation is analyzed within a framework based on polynomial, faithful and modular (PFM) translations. The analysis is restricted to the stable semantics of disjunctive logic programs. A particular interest is understanding what is the effect if default negation is allowed in the heads of disjunctive rules. It is established in the paper that occurrences of default negation can be removed from the heads of rules using a PFM translation when default negation is allowed in the bodies of rules. In this case, we may conclude that default negation appearing in the heads of rules does not affect expressive power of rules. However, in the case that default negation may not be used in the bodies of rules, such a PFM translation is no longer possible. Moreover, there is no PFM translation for removing default negation from the bodies of rules. Consequently, disjunctive logic programs with default negation in the bodies of rules are strictly more expressive than those without.
Conference Paper
Full-text available
The paper studies reductions of propositional theories in equilibrium logic to logic programs under answer set semantics. Specifi- cally we are concerned with the question of how to transform an arbitrary set of propositional formulas into an equivalent logic program and what are the complexity constraints on this process. We want the transformed program to be equivalent in a strong sense so that theory parts can be transformed independent of the wider context in which they might be embedded. It was only recently established (1) that propositional theo- ries are indeed equivalent (in a strong sense) to logic programs. Here this result is extended with the following contributions. (i) We show how to ef- fectively obtain an equivalent program starting from an arbitrary theory. (ii) We show that in general there is no polynomial time transformation if we require the resulting program to share precisely the vocabulary or signature of the initial theory. (iii) Extending previous work we show how polynomial transformations can be achieved if one allows the resulting program to contain new atoms. The program obtained is still in a strong sense equivalent to the original theory, and the answer sets of the theory can be retrieved from it.
Conference Paper
QHT is a first-order super-intuitionistic logic that provides a foundation for answer set programming (ASP) and a useful tool for analysing and transforming non-ground programs. We recall some properties of QHT and its nonmonotonic extension, quantified equilibrium logic (QEL). We show how the proof theory of QHT can be used to extend to non-ground programs previous results on the completeness of θ-subsumption. We also establish a reduction of QHT to classical logic and show how this can be used to obtain and extend classical encodings for concepts such as the strong equivalence of programs and theories. We pay special attention to a class of general (disjunctive) logic programs that capture all universal theories in QEL.
Article
The class of logic programs with negation as failure in the head is a subset of the logic of MBNF introduced by Lifschitz and is an extension of the class of extended disjunctive programs. An interesting feature of such programs is that the minimality of answer sets does not hold. This paper considers the class of general extended disjunctive programs (GEDPs) as logic programs with negation as failure in the head. First, we discuss that the class of GEDPs is useful for representing knowledge in various domains in which the principle of minimality is too strong. In particular, the class of abductive programs is properly included in the class of GEDPs. Other applications include the representation of inclusive disjunctions and circumscription with fixed predicates. Secondly, the semantic nature of GEDPs is analyzed by the syntax of programs. In acyclic programs, negation as failure in the head can be shifted to the body without changing the answer sets of the program. On the other hand, supported sets of any program are always preserved by the same transformation. Thirdly, the computational complexity of the class of GEDPs is shown to remain in the same complexity class as normal disjunctive programs. Through the simulation of negation as failure in the head, computation of answer sets and supported sets is realized using any proof procedure for extended or positive disjunctive programs. Finally, a simple translation of GEDPs into autoepistemic logic is presented.
Conference Paper
In a recent paper, Ferraris, Lee and Lifschitz conjectured that the concept of a stable model of a first-order formula can be used to treat some answer set programming expressions as abbreviations. We follow up on that suggestion and introduce an answer set programming language that defines the mean- ing of counting and choice by reducing these constructs to first-order formulas. For the new language, the concept of a safe program is defined, and its semantic role is investigated. We compare the new language with the concept of a disjunc- tive program with aggregates introduced by Faber, Leone and Pfeifer, and discuss the possibility of implementing a frag- ment of the language by translating it into the input language of the answer set solver DLV. The language is also compared with cardinality constraint programs defined by Syrjanen.
Conference Paper
Two sets of rules are said to be strongly equivalent to each other if replacing one by the other within any logic program preserves the program’s stable models. The familiar characterization of strong equivalence of grounded programs in terms of the propositional logic of here-and-there is extended in this paper to a large class of logic programs with variables. This class includes, in particular, programs with conditional literals and cardinality constraints. The first-order version of the logic of here-and-there required for this purpose involves two additional non-intuitionistic axiom schemas.
Conference Paper
We define the class of cardinality constraint logic programs and provide a formal stable model semantics for them. The class extends normal logic programs by allowing the use of cardinality constraints and conditional literals. We identify a decidable subset, omega-restricted programs, of the class. We show how the formal semantics can be extended to allow the use of evaluated function symbols, such as arithmetic built-in operators. The omega-restricted cardinality constraint programs have been implemented in the Smodels system.
Conference Paper
Equilibrium logic, introduced in [20], is a conservative extension of answer set semantics for logic programs to the full language of propositional logic. In this paper we initiate the study of first-order variants of equilibrium logic. In particular, we focus on a quantified version QN 5 of the propositional many-valued logic N 5 of here-and-there with strong negation, and define the condition of equilibrium via a minimal model construction. We verify Skolem forms and Herbrand theorems for QN 5 and show that, like its propositional counterpart, the quantified version of equilibrium logic also conservatively extends answer set semantics.
Conference Paper
Safe first-order formulas generalize the concept of a safe rule, which plays an important role in the design of answer set solvers. We show that any safe sentence is equivalent, in a certain sense, to the re- sult of its grounding—to the variable-free sentence obtained from it by replacing all quantifiers with multiple conjunctions and disjunctions. It follows that a safe sentence and the result of its grounding have the same stable models, and that stable models of a safe sentence can be characterized by a formula of a simple syntactic form.