| OCR Text |
Show 7 implementation described here uses one specific type of parallelism. OR-parall llsm; it is described in more detail. especially with regard to implementation problems which must be addressed by any OR-parallel system. The second part of the chapter is a brief description of the most successful compilation technique for logic languages in use today: the Warren Abstract Machine. or WAM. Logic programs, which do not appear to submit to conventional compilation techniques, can be compiled into the WAM instruction set to produce code which is competitive (at least when interpreted) with other languages designed for symbolic computing. 2.1 Basics of Logic and Logic Programming The treatment of logic in this section is not complete or exact, but is intended to present the concepts underlying the logic programming paradigm without undue detail. The discussion of logic programming is also not exhaustive. Several good books which give a deeper treatment of logic programming have appeared recently; among these are [45]. [9], and [29]. 2.1.1 Definitions and Syntax A logic program consists of a set of formulas in a logic language. The most common logic programming languages are based on first -order predicate logic (FOPL). FOPL consists of a set of clauses built from tenns (literals) and logical connectives. Terms are built from constants (or atoms), variables, functors, and predicate symbols. Constants are fixed quantities such as integers and strings. They are the simplest entities of logic, and represent themselves only. They have no meaning except as unique placeholders in the logic language. (In "real" logic programs, of course, numbers may also have their usual mathematical meaning.) Examples of constants are a, b, 42, 3 .14, "hello, world" and parent. A variable may represent any object, including another variable. Logical variables are variables in the true mathematical sense of a fixed but arbitrary quantity |