Negation As Failure
Micro-Planner had a construct, called "thnot", which when applied to an expression returns the value true if (and only if) the evaluation of the expression fails. An equivalent operator is normally built-in in modern Prolog's implementations and has been called "negation as failure". It is normally written as not(p), where p is an atom whose variables normally have been instantiated by the time not(p) is invoked. A more cryptic (but standard) syntax is \+ p . Negation as failure literals can occur as conditions not(Bi) in the body of program clauses.
The logical status of negation as failure was unresolved until Keith Clark showed that, under certain natural conditions, it is a correct (and sometimes complete) implementation of classical negation with respect to the completion of the program. Completion amounts roughly to regarding the set of all the program clauses with the same predicate on the left hand side, say
- H :- Body1.
- …
- H :- Bodyk.
as a definition of the predicate
- H iff (Body1 or … or Bodyk)
where "iff" means "if and only if". Writing the completion also requires explicit use of the equality predicate and the inclusion of a set of appropriate axioms for equality. However, the implementation of negation by failure needs only the if-halves of the definitions without the axioms of equality.
The notion of completion is closely related to McCarthy's circumscription semantics for default reasoning, and to the closed world assumption.
As an alternative to the completion semantics, negation as failure can also be interpreted epistemically, as in the stable model semantics of answer set programming. In this interpretation not(Bi) means literally that Bi is not known or not believed. The epistemic interpretation has the advantage that it can be combined very simply with classical negation, as in "extended logic programming", to formalise such phrases as "the contrary can not be shown", where "contrary" is classical negation and "can not be shown" is the epistemic interpretation of negation as failure.
Read more about this topic: Logic Programming
Famous quotes containing the words negation and/or failure:
“I am firmly opposed to the government entering into any business the major purpose of which is competition with our citizens ... for the Federal Government deliberately to go out to build up and expand ... a power and manufacturing business is to break down the initiative and enterprise of the American people; it is the destruction of equality of opportunity amongst our people, it is the negation of the ideals upon which our civilization has been based.”
—Herbert Hoover (18741964)
“Dear George: Remember no man is a failure who has friends. Thanks for the wings! Love, Clarence”
—Frances Goodrich (18911984)