On the Epistemological its Extensions

From: AAAI Technical Report SS-01-01. Compilation copyright © 2001, AAAI (www.aaai.org). All rights reserved.
On the Epistemological
foundations of Logic Programming and its
Extensions
Marc Denecker
Department of Computer Science, K.U.Leuven,
Celestijnenlaan 200A, B-3001Heverlee, Belgium.
Phone: +32 16 327555 -- Fax: +32 16 327996
email: marcd@cs.kuleuven.ac.be
Extended
Abstract
Oneof the major roles of logic in computerscience and
A.I. is for knowledgerepresentation and specification.
In the context of knowledgerepresentation, formal logic
is widely praised as the tool par excellence for expressing information in a precise way and for correct and
precise communicationof information between different experts. In the scenario of communicatingexperts,
the experts express their knowledgeabout someexternal problem domainin logic specifications which subsequently are communicatedto other experts. In the
computational logic approach to AI, computers participate in this and assist the humanexperts by solving
computational problems using the logic specifications.
The use of formal logic helps to avoid the ambiguities
and lacunas that appear frequently in natural language
specifications and, in a absence of computer systems
that understand natural language, is the most promising way of transferring knowledgeto a computer system.
Obviously, when different humanexperts communicate their knowledgeabout some external problem domain via logical specifications, correct communication
is only possible to the extent that they interpret the
logical formulas in the same way about this problem
domain. They should agree on what the formulas of
the specification say about the problem domain. The
wayhumanexperts interpret the logic formulas of a forreal logic in the problemworld is what logicians call the
declarative reading of the logic. Oneof the fundamental
prexassumptionsunderlying the use of logic for knowledge representation, specification and problemsolving
is that a formal logic has a weU-understoodand objective declarative reading.
The epistemological study of a logic aims to clarify
its declarative reading. A standard technique to do so
is by explaining in what states of the worldthe formulas
of the logic are true. The states of the world in whicha
given formulais true represent the possible states of the
world. An epistemological theory that expresses when
logical statements are true is what logicians also call a
truth conditional semantics (e.g. (Moore1995), p.
The goal of this study is to investigate the declarative
reading of logic programming(LP) and its extensions:
34
stable logic programming,answer set programmingand
abductive logic programming.
One of the central goals of logic programmingwas
and still is to combinethe advantagesof formal declarative logic and procedural languages (Kowalski 1974).
Originally, a definite logic programwas seen as a classical logic Horn theory. The use of SLD-resolution
induced the p~ocedural interpretation upon logic programs. Whenthe negation as failure inference rule was
introduced in Prolog systems, the view of logic programs as classical logic implications broke down. It
was realized that the soundness of this rule could not
be justified on the basis of the classical logic semantics of a logic program. Important efforts were made
to propose alternative formal semantics for logic programmingfor which negation as failure is sound. This
resulted in a numberof different semantics of whichthe
completion semantics (Clark 1978), the stable semantics (Gelfond &Lifschitz 1988) and the well-founded
semantics (Van Gelder, Ross, & Schlipf 1991) are the
most important ones. An important tool for defining
these semantics was the use of embeddingsof logic programming
in other logics, in particular in classical logic
(CL), default logic (DL) and autoepistemic logic (AEL).
The question investigated here is what these formal
semantics say about the declarative reading of logic programs. One view that appeared very early on is that
logic programsrepresent definitions; recursive programs
represent inductive definitions. This view is appealing
in the context of manyprototypical logic programs:
member(X,
[X I Y] ).
member(X,[Z,L]) :- member(X,L).
append( [] ,L,L).
append([HIT],L, [HIT2]) :- append(T,L,T2)
trans(X,Y) :- p(X,Y).
trane(X,Z) :- tr(X,Y), tr(Y,Z).
Each of these Horn programs can be seen as the natural representation of an inductive definition. The least
model semantics of (van Emden& Kowalski 1976) formalises the view of Horn programsas inductive definitions. In (Denecker 1998), I pointed to the strong relationships between Horn programs under least model
semantics
andstandard
formalisations
ofmonotone
inductive
definitions
suchas (Moschovakis
1974)and
(Aczel
1977).
Thedeclarative
reading
oflogicprograms
as(inductive)
definitions
isoften
natural
inthecontext
ofprogramswithnegation
as well:
child(X):- person(X),not
adult(X).
even(O).
even(s(N)) :- not even(N).
For example, the rules defining even represent the inductive definition:
¯ 0 is even.
¯ if n is not even, then n + 1 is even, otherwise n + 1
isnoteven.
Itis well-known
thattheleastmodelsemantics
does
notextend
to logicprograms
withnegation.
In (Clark
1978),
Clarkproposed
an alternative
approach
to formalisethe sameintuition.
He mapsa logicprogram
toitscompletion,
thesetofcompleted
definitions.
A
completed
definition
istheway(non-recursive)
definitionsareexpressed
in firstorderlogic.
Forexample,
thecompletion
of theprogram
p :- q, not r
is the CLtheory:
{q ~ false , r et false , p et q A-.r}
Unfortunately,
Clark
completion
semantics
isin general
tooweakto formalise
thedeclarative
reading
ofdefiniteprograms
as inductive
definitions.
It accepts
unintended
models
in programs
withpositive
loopssuch
i.Recently,
as thetransitive
closure
program
in (Denecker
1998),
I pointed
tothetight
relationship
oflogic
programming
undertheperfect
modelsemantics
(Przymusinski
1988;Apt,Blair,& Walker1988)and the
well-founded
semantics
(VanGelder,
Ross,& Schlipf
1991)withIterated
Inductive
Definitions,
a nonmonotoneformofinductive
definition.
Thisstudyputsforwardthethesisthatthewell-founded
semantics
formalises
a principle
of generalised
monotone
andnonmonotone
induction
definition.
In (Denecker
2000b),
thisviewwasfurther
elaborated
inID-logic,
a logic
extending
classical
logic
withgeneralised
inductive
definitions.
Another
viewon logicprograms
camefromthearea
of Nonmonotonic
Reasoning.
(Gelfond
1987)proposed
to interpret
a logicprogram
as an autoepistemic
theory. In this view, failure to prove literals not p are interpreted as modalliterals -~Kpin autoepistemic logic.
Gelfondproposed to interpret a logic programmingrule
p :- q, not r
as thefollowing
AELformula:
p *- q A -,Kr
Inthesequel,
I willrefer
tothisembedding
asae/and
denote
themapping
of a logicprogram
P as ael(P).
(Gelfond
& Lifschitz
1988)basedthestablesemanticson thisembedding.
Theyshowedthata stable
model
ofa program
P is thesetofatomsinanautoepistemicexpansion
of ael(P).
Theyshowedalsothatthe
leastmodelof a Horntheory
isitsunique
stable
model
andarguedthatthestablesemantics
correctly
modelsthemeaning
ofe.g.thetransitive
closure
program.
Importantly,
thisresult
suggest
thatthenonmonotone
viewon Hornprograms
coincides
withtheviewof Horn
programs
as inductive
definitions.
However,
aswillbe
shown,
thereisa snake
underthegrass.
A numberof alternative
embeddings
basedon a similarideahavebeenproposed.
I onlymention
another
seminal
oneof(Marek
& Truszczyzlski
1989)in Default
Logic(DL).It mapsa rule
p :- q, not r
to the default:
q : -,r
P
This embedding of program P will be denoted d/(P).
Marekand Truszczyfiski showed that a stable model of
P is the set of atomsin a default extension of d/(P).
In view Of the fact that a declarative logic should
have a non-ambiguous declarative meaning, the question rises to what extend these different readings correspond to each other. Logic programmingcan be seen as
a family of logics, each inducedby a pair of a syntax and
a formal semantics. The logics of normal programswith
the completion semantics, the stable semantics and the
well-founded semantics partially coincide, for example
in the case of hierarchical programs. In general, we
should expect that (a) the declarative reading underlying these semantics are equivalent in these coinciding
cases. Also, we should expect that (b) each logic in this
family has a unique declarative reading. If it has been
claimed that one and the samesemantics formalises different readings, then these readings must be equivalent
in somedeep sense.
In fact, it is easy to showthat neither (a) nor (b)
holds. Consider the case of Horn programsand as an illustration, take the simple non-recursive Horn program:
P1 = {P +- q}
The first point is that Pa is a non-recursive Horn program. For such programs, all semantics coincide. In
this case, the empty set {} is the unique least model,
the unique model of the completion, the unique stable model and the unique well-founded model. So, all
formal model semantics coincide on P1.
Now,let us compare the meaning of PI as expressed
XAwell-known
factisthatinductive
definable
concepts
suchastheconcept
oftransitive
closure
cannot
beexpressed by the different embeddings on which these model semantics are based. The comparison can be done on
infirst
order
logic.
35
a formal
basis,
bycomparing
thebelief
setsassociated
withthese
embeddings.
A belief
setisa setT offirst
orderformulas
thatcontains
eachofitsimplications.
For
anyfirst
order
theory
T,letCn(T)
denote
thesetofits
logical implications: Cn(T) - {¢~IT ~ ~b}. Then T is
a belief set iff T = Cn(T). A belief set is often taken
as a representation of the belief state of someideally
rational agent. Both the semantics of default logic and
autoepistemiclogic are expressedvia belief sets.
¯ For non-recursive Horn programs, the definition view
is correctly expressed by the completion, comp(P1)
is the theory
{Ip~q
q~false
The reason whyq is knownto be faise is that it is
assumed to have the empty definition. The unique
belief set of the viewof/’1 as a definition is:
Cn( comp(P1) ) = Cn({-W, -~p}
¯ According to Gelfond’s mapping, the meaning of P1
is the autoepistemic theory ael(P1)
{p q}
In (Moore
1983),
Mooredefined
thesemantics
ofautoepistemic
logicin termsof autoepistemic
expansion.
Asshown
inthesamepaper,
thesetofclassical
logic
formulas
inanexpansion
E isdeductively
closed
and completely
determines
E. Moreover,Moore
alsoshowed
thatautoepistemic
logic
extends
classical
logic
inthefollowing
sense:
ifanautoepistemic
theoryT contains
nooccurences
of themodaloperator,
thenit hasa unique
expansion
whichis completely
determined
by Cn(T).Consequently,
aelinterprets
eachHornprogram
as a Horntheory,
ael(Po)
hasone
autoepistemic
expansion
extending
theunique
belief
set:
c.({pq})
¯ The meaning of/’1 according to the embedding in
default logic is the default d/(P1):
{v}
On theonehand,we observe
thattheleastmodel,
themodelof thecompletion,
thestable
andthewellfounded
modelof P1 coincide.
On theotherhand,we
observe
thatthethree
embeddings
assign
a different
beliefset to/’1: respectively Cn({-~p,-~q} ), Cn( {p eand Cn({}). These three belief sets are non-equivalent
and have different first order models. Consequently,P1
is an exampleof a programfor which all formal model
semantics coincide, but for which the declarative reading is different under the three different views. So it
illustrates that point (a) does not hold.
PI also illustrates that ael and d/assign a different
meaningto logic programs. Nevertheless, both embeddings have been shownto induce stable semantics. So,
this examplealso illustrates that point (b) does not
hold.
The ambiguity illustrated by /’1 boils downto the
following phenomenon. Assumethat we have a logic
programwritten by someexpert to represent his knowledge. Assume moreover that we know which formal
model semantics was intended by the expert and that
we even knowwhat are the modelsof the program. Still,
we are unable to know what is the knowledge of the
expert and howthe world looks like according to the
expert.
A famouscaseof a studyshowing
epistemological
ambiguity
of a knowledge
representation
formalism
is
Woods’studyof semantic
networksin 1975(Woods
1975).
Woodsshowedthata linkin semantic
networks
couldbeandhadbeeninterpreted
in atleast3 differentways.A majorconclusion
drawnfromthispaperby
theAI community
(e.g.in Hayes"Indefense
of logic"
(Hayes
1977)orNewell’s
"Theknowledge
level"
(Newell
1980))
wasthata declarative
language
needsa formal
account
of itsmeaning.
Thephenomenon
of theambiguity
ofLPaddressed
inthecurrent
paperissimilax
in
nature
totheambiguity
of linkspointed
outby Woods.
WhatmakesLP’sambiguity
evenmoresurprising
and
worrysome
is thatunlikesemantic
netsin themiddle
seventies,
itarises
in thecontext
oflogics
withmodel
semantics. In the context of logic programming,formal
semantics do not seem to guarantee a non-ambiguous
declarative reading!
Howis it possible that even if we fix the formal semantics,
logic programsare still ambiguous?
In(Reiter
1980),
Reiter
characterised
thesemantics
Half of the explanation is that the definition view
of a default
theory
bydefault
extensions,
whichare
and the nonmonotonicviews assign a different role to a
belief
sets.
Theunique
default
extension
ofthisset
"model". In the definition view, a modelrepresents a
is:
possible state of the world. In the nonmonotoneviews,
Cn({})
it represents a set of believed atoms. In both views, the
same mathematical structures are used to represent two
I.e.thisis thesetoftautologies.
Thereason
that
thisistheunique
default
extension
isthatthejusti- very different sorts of entities.
This observation has someunsettling consequences.
fication
ofthedefault
cannot
bederived,
andhence,
thedefault
doesnotapply.
Notethattheimplication Comparingsets of believed atoms and possible worlds is
p <--q ~ Cn({}).
So thebelief
represented
by this
as comparing apples and oranges. Manymathematical
results relating different modelsemantics are meaningdefault
isevenweaker
thantheclassical
logic
interpretation
oftherule.
less at the epistemological level! E.g. at the episte-
36
mological level, the mathematicalresult that a stable
model is a model of the completion is as informative
as to say that 2 kilometer is less than 4 kilogram. The
same holds for the mathematicalresult that the stable
modelof a Horn programP is its least model. This is
true, but as illustrated by P1, the view of P as a monotone inductive definition does not coincide with ael(P)
nor d/(P).
The different roles of "models" cannot be the only
explanation of the ambiguity since in the embeddings
d/ and ael, the role of the stable model is the same.
Here another explanation is in order, namelythat a set
of believed atoms only provides weak and incomplete
information about the meaningof a theory. In general,
2.
manydifferent belief sets mayshare the same atoms
In this particular case, for almost all programsP, the
theories d/(P) and ael(P) have different belief sets, but
there the sets of believed atomsin these belief sets correspond.
Clark,K. 1978.Negation
as failure.
In Gallalre,
H.,andMinker,
J.,eds.,LogicandDatabases. Plenum
Press.
293-322.
Denecker,
M. 1998.Thewell-founded
semantics
is the
principle
of inductive
definition.
InDix,J.;nasdel
Cerro, L. F.; and Furbach,U., eds., Logics in Artificial
Intelligence, 1-16. Schloss Daghstull: Springer-Verlag,
Lecture notes in Artificial Intelligence 1489.
Denecker,
M. 2000a. What is in a model?
Epistemological
ambiguity of Logic Programming.
Draft; available on the internet:
http://www.kuleuven.ac.be/marcd/papers/ambiguity.ps.
Denecker, M. 2000b. Extending classical logic with
inductive definitions. In et al., J., ed., First International Conference on Computational Logic (CL2000),
volume1861of Lecture notes in Artificial Intelligence,
703-717. London: Springer.
Gelfond, M., and Lifschitz, V. 1988. The stable model
semantics for logic programming.In Proc. of the InEpistemological
clarity
isa sinequanonfordeclarternational Joint Conference and Symposiumon Logic
ativelogic.Foranyone
whowishes
to consider
logic
Programming, 1070-1080. IEEE.
programming
logics
as declarative
logic,
theambiguity
Gelfond, M. 1987. On Stratified Autoepistemic Theophenomenon
posesa fundamental
problemthatmust
ries. In Proc. of AAAI87, 207-211. MorganKanfman.
beresolved.
Thefirstaimof thisabstract
isto bring
Hayes, P. 1977. In defense of logic. In Proc. of the 5th
abouttheepistemological
ambiguity.
A moreextended
studycanbefoundat (Denecker
2000a).
Itsmaingoal
IJCAI77.
areasfollows:
Kowalski, R. 1974. Predicate logic as a program¯ Thereis currently
little
understanding
andappreciming language. In Proc. of IFIP 74, 569-574. Northation
fortheissueofepistemological
foundations
of
Holland.
logicin thefieldof logicprogramming,
andmorein
Marek, V., and Truszczyrlski, M. 1989. Stable segeneral,
inmanylogic-based
disciplines
inAI.This
mantics for logic programs and default reasoning.
study
is a pleaforclear
epistemological
foundations In E.Lust, and Overbeek, R., eds., Proc. of the
of logicanduseslogicprogramming
as a testcase
North American Conference on Logic Programming
to showwhatcango wrongin absence
of suchfounand Non-monotonic Reasoning, 243-257.
dations.
Tothisend,it investigates
theimpact
of
Moore, R. 1983. Semantical Considerations on nontheepistemological
ambiguity
ofLP atpractical
and
monotoniclogic. In Proc. of IJCAI-S3, 272-279.
fundamental
levels.
Moore, R. 1995. Logic and Representation, vol¯ Thegoalisnotonlytopoint
totheproblem
anditsefume CSLI Lecture Notes No39. Center for the Study
fects
butalsotoclarify
thedifferent
declarative
views
of Languageand Information, Standford, California:
on logicprogramming
anditsextensions
Abductive
CSLI Publications.
LogicProgramming
and Answerset programming.
Thisisthefirststeptowards
solving
theepistemo- Moschovakis, Y. N. 1974. Elementary Induction on
logical
ambiguity.
Thepaperpoints
outsomedirecAbstract Structures. North-Holland Publishing Company, Amsterdam- New York.
tions.
Newell, A. 1980. The knowledgelevel, artifical IntelReferences
ligence 18:87-127. Also presidential addres at AAAI
80.
Aczel,
P.1977.An Introduction
to Inductive
Definitions.
In Barwise, J., ed., Handbookof Mathematical
Przymusinski, T. 1988. On the semantics of StratLogic. North-Holland Publishing Company.739-782.
ified Databases. In Minker, J., ed., Foundations of
Apt, K.; Blair, H.; and Walker, A. 1988. Towards a
Deductive Databases and Logic Programming. Morgan
theory of Declarative Knowledge.In Minker, J., ed.,
Kaufman.
Foundations of Deductive Databases and Logic ProReiter, R. 1980. A logic for default reasoning. Artificial
gramming. Morgan Kanfmann.
Intelligence 13:81-132.
2Thereadings of a HornprogramP as a classical logic
van Emden, M., and Kowalski, R. 1976. The semanHorntheory, or as an inductivedefinition or as ael(P) or as
tics of Predicate Logic as a ProgrammingLanguage.
dl(P) differ but yield the sameset of believedatoms.
Journal of the ACM4(4):733-742.
37
VanGelder,
A.;Ross,K.;andSchlipf,
J. 1991.The
Well-Founded
Semantics
forGeneral
LogicPrograms.
Journal of the ACM38(3):620-650.
Woods, W. 1975. What’s in a link: Foundations of
semantic networks. In Bobrow,D., and Collins, A.,
eds., Representation and understanding: Studies in
cognitive science. Academic Press, NewYork. Also
in Brachman and Levesque, Readings in Knowledge
Representation, MorganKaufman,1985.
38