logic programming

Also found in: Dictionary, Thesaurus, Acronyms, Wikipedia.

logic programming

(artificial intelligence, programming, language)
A declarative, relational style of programming based on first-order logic. The original logic programming language was Prolog. The concept is based on Horn clauses.

The programmer writes a "database" of "facts", e.g.


("water is wet") and "rules", e.g.

mortal(X) :- human(X).

("X is mortal is implied by X is human"). Facts and rules are collectively known as "clauses".

The user supplies a "goal" which the system attempts to prove using "resolution" or "backward chaining". This involves matching the current goal against each fact or the left hand side of each rule using "unification". If the goal matches a fact, the goal succeeds; if it matches a rule then the process recurses, taking each sub-goal on the right hand side of the rule as the current goal. If all sub-goals succeed then the rule succeeds.

Each time a possible clause is chosen, a "choice point" is created on a stack. If subsequent resolution fails then control eventually returns to the choice point and subsequent clauses are tried. This is known as "backtracking".

Clauses may contain logic variables which take on any value necessary to make the fact or the left hand side of the rule match a goal. Unification binds these variables to the corresponding subterms of the goal. Such bindings are associated with the choice point at which the clause was chosen and are undone when backtracking reaches that choice point.

The user is informed of the success or failure of his first goal and if it succeeds and contains variables he is told what values of those variables caused it to succeed. He can then ask for alternative solutions.
References in periodicals archive ?
The applications of pressure sensors start the timer, infrared distance measurement back through fuzzy logic programming operation, it is easy to implement and has easy production.
In logic programming, legal expertise could be represented by this format:
Pereira, Reasoning with Logic Programming, 1996, LNAI 1111, Springer-Verlag.
Logic programming environments: Dynamic program analysis and debugging.
Our proposal is to define a novel, hybrid approach to solve this problem by relying on defeasible logic programming [7], an argument-based framework based on logic programming.
Constraint logic programming (CLP) [Jaffar and Lassez 1987] languages extend logic programming (LP) by replacing term equalities with constraints and unification with constraint solving.
There were many early attempts at bridging the gap between logic programming and argumentation.
The narrowing relation over terms constitutes the basis of the most important operational semantics of languages that integrate functional and logic programming paradigms.
SCIENTIFIC KNOWLEDGE DISCOVERY TASKS CAN BE carried out using inductive logic programming (ILP).
Logic Programming Associates Ltd (LPA), a UK software tools developer, has designed a document management product that it claims will enable insurers or lawyers to process policy documents faster and more efficiently.
MTC200 software modules offer interoperability with Windows NT, IEC 61131-3 logic programming and RS274D CNC programming standards, serial and Ethernet communications, IEC 61491 (Sercos) fiber optic digital interface between control and digital drives, and standard I/O communications buses such as Interbus-S, Profibus, and DeviceNet.
Thus, unless the Polynomial Hierarchy collapses, disjunctive Datalog is more expressive than normal logic programming with negation.