3. dell is the vendor of pc
1
and pc
2
,
4. a customer avoids all cameras not on offer,
5. all electronic products that are not brand new are
on offer,
6. each vendor of a product is a provider,
7. each entity providing a product is a provider,
8. all related products are similar, and
9. thebinarysimilarityrelationonproductsis
transitively closed. Therefore:
1. pcðpc
1
Þ; pcðpc
2
Þ;
2. brand
newðpc
1
Þ; brand newðobj
3
Þ;
3. vendorðdell; pc
1
Þ; vendorðdell; pc
2
Þ;
4. avoidðXÞ cameraðXÞ; not offerðXÞ;
5. offerðXÞ electronicsðXÞ; not brand
newðXÞ;
6. providerðV Þ vendorðV;XÞ; productðXÞ;
7. providerðV Þ providesðV;XÞ; productðXÞ;
8. similarðX; Y Þ relatedðX; Y Þ;
9. similarðX; ZÞ similarðX; Y Þ; similarðY;ZÞ.
In a disjunctive program P
0
, we may additionally
express that:
10. obj
3
is either a personal computer or a laptop,
and that
11. every screen is either a TFT, a CRT, or a
touchscreen:
10. pcðobj
3
Þ_laptopðobj
3
Þ;
11. tftðXÞ_crtðXÞ_touchscreenðXÞ screenðXÞ.
3.2 Answer Set Semantics
The answer set semantics of disjunctive programs is defined
in terms of finite sets of ground atoms, which represent
Herbrand interpretations. Positive disjunctive programs are
associated with all their minimal satisfying sets of ground
atoms, while the semantics of general disjunctive programs
is defined by reduction to the minimal model semantics of
positive disjunctive programs via the Gelfond-Lifschitz
reduct [29].
The Herbrand universe of a disjunctive program P ,
denoted HU
P
, is the set of all constant symbols appearing
in P . If there is no such constant symbol, then HU
P
¼fcg,
where c is an arbitrary constant symbol from . As usual,
terms, atoms, literals, rules, programs, etc., are ground iff
they do not contain any variables. The Herbrand base of a
disjunctive program P , denoted HB
P
, is the set of all
ground atoms that can be constructed from the predicate
symbols appearing in P and the constant symbols in HU
P
.
Hence, in the standard answer set semantics, the Herbrand
base is constructed from all constant and predicate symbols
in a given disjunctive program, and thus the Herbrand base
is finite. A ground instance of a rule r 2 P is obtained from r
by replacing every variable that occurs in r by a constant
symbol from HU
P
. We denote by groundðP Þ the set of all
ground instances of rules in P .
An interpretation I relative to a disjunctive program P is a
subset of HB
P
. Informally, every such I represents the
Herbrand interpretation in which all a 2 I (resp.,
a 2 HB
P
I) are true (resp., false). An interpretation I is a
model of a groundatom a 2 HB
P
,orI satisfies a, denoted I a,
iff a 2 I. We say I is a model of a ground rule r, denoted I r,
iff I for some 2 HðrÞ whenever I BðrÞ, that is, I
for all 2 B
þ
ðrÞ and I 6 for all 2 B
ðrÞ. We say I is a
model of a disjunctive program P , denoted I P , iff I r for
every r 2 groundðP Þ.
An answer set of a positive disjunctive program P is a
minimal model of P relative to set inclusion. The Gelfond-
Lifschitz reduct of a disjunctive program P relative to
I HB
P
, denoted P
I
, is the ground positive disjunctive
program obtained from groundðP Þ by
1. deleting every rule r such that B
ðrÞ\I 6¼;, and
2. deleting the negative body from each remaining
rule.
An answer set of a disjunctive program P is an interpretation
I HB
P
such that I is an answer set of P
I
. A disjunctive
program P is consistent iff P has an answer set. Hence,
under the answer set semantics, every disjunctive program
P is interpreted as its grounding groundðPÞ. Note that the
answer sets of any disjunctive program P are also minimal
models of P. An equivalent definition of the answer set
semantics is based on the so-called FLP-reduct [27]: The FLP-
reduct of a disjunctive program P relative to I HB
P
,
denoted P
I
, is the set of all r 2 groundðP Þ such that
I BðrÞ. An interpretation I HB
P
is an answer set of P
iff I is a minimal model of P
I
.
We finally recall the notions of cautious (resp., brave)
reasoning from disjunctive programs under the answer set
semantics. A ground atom a 2 HB
P
is a cautious (resp., brave)
consequence of a disjunctive program P under the answer set
semantics iff every (resp., some) answer set of P satisfies a.
Example 3.2. Let the disjunctive program P
00
be given by the
disjunctive program P
0
of Example 3.1 and the facts
cameraðcamÞ, electronicsðcamÞ,andbrand
newðcamÞ.
Then, P
00
has two different answer sets. They contain
the facts in lines 1-3 of Example 3.1, the above ones,
avoidðcamÞ, and either pcðobj
3
Þ or laptopðobj
3
Þ. Hence, all
the former but the last two facts are cautious conse-
quences of P
00
, while pcðobj
3
Þ and laptopðobj
3
Þ are brave
consequences of P
00
.
Observe that for positive disjunctive programs P , since
the set of all answer sets of P is given by the set of all
minimal models of P , it holds that a 2 HB
P
is a cautious
consequence of P under the answer set semantics iff a is a
logical consequence of the propositional positive disjunctive
program groundðP Þ. Note that, more generally, this result
holds also when a is a ground formula constructed from
HB
, using the Boolean operators ^ and _. That is, the
closed-world property (that is, the derivation of negative facts
from the absence of derivations of positive facts) of the
above notion of cautious reasoning under the answer set
semantics is actually limited to the occurrences of default
negations in rule bodies.
3.3 Well-Founded Semantics
Besides the answer set semantics, the well-founded semantics
[63] is the most widely used semantics for nonmonotonic
logic programs, and it is especially under a data-oriented
perspective of great importance for the Web. As nice
features, the well-founded semantics is defined for all
normal programs (unlike the answer set semantics), has a
polynomial data tractability (while the answer set semantics
is intractable), approximates the answer set semantics
1580 IEEE TRANSACTIONS ON KNOWLEDGE AND DATA ENGINEERING, VOL. 22, NO. 11, NOVEMBER 2010