Content deleted Content added
→Example 4: better colorize Prolog code in text, to improve optical distinction between e.g. "normal(X)" and "in normal logic programming"; BTW: I guess, the new predicate abnormal(X) is obtained by suitably renaming the abduction result? - this should be explained in text |
→Example 4: Change to a more general treatment of the relationship between ALP and NAF. |
||
Line 91:
Once an explanation has been chosen, then this becomes part of the theory, which can be used to draw new conclusions. The explanation and more generally these new conclusions form the solution of the problem.
==Default reasoning in ALP==
The following example shows how abduction can be to simulate [[negation as failure]]:<ref>Eshghi, K. and Kowalski, R.A., 1989, June. Abduction Compared with Negation by Failure. In ICLP (Vol. 89, pp. 234-255).</ref>▼
As shown in<ref>{{cite report | url=https://www.cs.ubc.ca/~poole/papers/Theorist-CS-86-06.pdf |first1=David |last1=Poole |first2=Randy |last2=Goebel |first3=Romas |last3=Aleliunas | title=Theorist: A Logical Reasoning System for Defaults and Diagnosis | institution=Univ. Waterloo | type=Research Report | number=CS-86-06 | date=Feb 1986 }}</ref><ref>{{cite book | url= |first1=David |last1=Poole |first2=Randy |last2=Goebel |first3=Romas |last3=Aleliunas | contribution=Theorist: A Logical Reasoning System for Defaults and Diagnosis | pages=331–352 | doi=10.1007/978-1-4612-4792-0 | isbn=978-1-4612-9158-9 | editor1=Nick J. Cercone | editor2= Gordon McCalla | title= The Knowledge Frontier – Essays in the Representation of Knowledge | ___location=New York, NY | publisher=Springer | series=Symbolic Computation | volume= | edition=1st | year=1987 |s2cid=38209923 }}</ref>, abduction can also be used for [[default reasoning]].
Consider the classic example of reasoning by default that a bird can fly if it is consistent to assume that the bird can fly. The example can be formulated naturally as an abductive logic program. Here is a variant of the example:
<syntaxhighlight lang="prolog">
canfly(X) :- bird(X),
false :-
bird(john).
bird(mary).
Line 101 ⟶ 105:
</syntaxhighlight>
Here the predicate <syntaxhighlight inline lang="prolog">
The example can be reformulated in normal logic programming without abduction, by using [[negation as failure]] with a non-abducible predicate <syntaxhighlight inline lang="prolog">abnormal_flying_bird(_),</syntaxhighlight> which is the contrary of the abducible predicate <syntaxhighlight inline lang="prolog">normal_flying_bird(_)</syntaxhighlight>:
<syntaxhighlight lang="prolog">
canfly(X) :- bird(X), not(abnormal_flying_bird(X)).
abnormal_flying_bird(X):- wounded(X).
bird(john).
bird(mary).
wounded(john).
</syntaxhighlight>
▲
In the general case, abduction in ALP can be simulated by adding, for every abducible predicate <syntaxhighlight inline lang="prolog">p,</syntaxhighlight> a pair of clauses:
<syntaxhighlight lang="prolog">
p :- not(abp).
abp :- not(p).
</syntaxhighlight>
where <syntaxhighlight inline lang="prolog">abp</syntaxhighlight> is a predicate representing the contrary of <syntaxhighlight inline lang="prolog">p,</syntaxhighlight> and neither <syntaxhighlight inline lang="prolog">abp</syntaxhighlight> nor <syntaxhighlight inline lang="prolog">p</syntaxhighlight> are abducible.<ref>Kakas, A.C., Kowalski, R.A. and Toni, F., 1992. Abductive logic programming. Journal of logic and computation, 2(6), pp.719-770.</ref>
==Formal semantics==
|