Abstract

Logic programming is a language paradigm based on logic, more specifically on resolution theorem proving in the predicate calculus as proposed in Robinson [1965]. Robinson had the foresight to distinguish the importance of two components in automatic theorem proving: a single inference rule called resolution and the testing for equality of trees called unification. Resolution is an inference step used to prove the validity of predicate calculus formulas expressed as clauses. In its simplest version: P ~ Q and -P ~ R imply Q ~ R, which is called the resolvant. Unification is the matching of terms used in a resolution step. It consists of testing the satisfiability of the equality of terms (i.e., labeled trees) whose leaves may contain variables. For example, the unification of the terms p(X, q(Z, a)) and p(b, q(a, Y)) succeeds, yielding the bindings X 5 b, Z 5 a, and Y 5 a. Prolog, the main representative of LP, consists of a sequence of Horn clauses. A Horn clause is one containing (at most) one positive literal. The term definite clause is used to denote a clause with exactly one positive literal. Prolog programs can be viewed as a set of definite clauses in which the positive literal is the head of the rule and the negative literals constitute the body or tail of the rule. From a procedural point of view, a head corresponds to the definition of a Boolean function whose body consists of conjunctions of calls to the Boolean functions representing the tail [Kowalski 1979]. A quintessential example of a Prolog program is that of append. It consists of two Horn clauses specifying that list L3 is the concatenation of two lists, L1 and L2:

Full Text
Paper version not known

Talk to us

Join us for a 30 min session where you can share your feedback and ask us any queries you have

Schedule a call

Disclaimer: All third-party content on this website/platform is and will remain the property of their respective owners and is provided on "as is" basis without any warranties, express or implied. Use of third-party content does not indicate any affiliation, sponsorship with or endorsement by them. Any references to third-party content is to identify the corresponding services and shall be considered fair use under The CopyrightLaw.