![visual prolog 7.0 visual prolog 7.0](https://covers.zlibcdn2.com/covers/books/99/2a/4d/992a4ddff80f503036b5156b17e1561d.jpg)
There are two modes in which this combination may be implemented. A hybrid system which mixes and merges the two languages may provide the optimum configuration. Certain AI applications are more naturally programmed in LISP and others in Prolog. The order of LISP functions has minimal effect on LISP efficiency.Ĥ. The order in which rules are entered greatly effects the efficiency of Prolog. An exception is the recently released Turbo Prolog.ģ. Prolog in general does not support graphics. LISP in general has better I/O features than does Prolog.Ģ. Prolog has some serious disadvantages compared to LISP.
VISUAL PROLOG 7.0 CODE
This inference takes only three lines of Prolog but several pages of code in conventional procedural languages. We may note that no where we have stated explicitly that Socrates is mortal, but that it is implicit from the rule relating humans and mortality and the fact about Socrates. Is Socrates mortal? can easily be encoded in Prolog as That is, to solve the logical inference problem: Prolog Provides for Very Efficient Coding for Problems Requiring Inference: Once this recursive function has been defined, we may ask: member (cat, )? We may note that the “_” symbol signifies that “this variable matches anything”. These two rules may be encoded recursively in Prolog by the statements: If A is not the first element of L, then A is a member of L if and only if A is a A is a member of list L if A is the first element of L.ī. Prolog Handles Lists and Recursion Naturally:Ī very useful, recursively defined predicate is member (A, L)? which answers the question, “Is a member of list LI” If we have a list L defined as: (similar to that in LISP, elements are separated by commas and enclosed in square list.Ī is defined to be a member of list L if it satisfies either of the following two rules:Ī. The Prolog ‘no’ should be interpreted as “not known”.ģ. Since this fact has not yet been entered into the database. However, it has a number of extensions to make it easier for programming applications.Īfter building this database, a query of the form: Prolog is based on first-order predicate logic. Instead of having to try different rules of inference and hoping one succeed resolution in Prolog greatly reduces the search space. Instead of many different rules of limited applicability such as modus ponens, merging, chaining and so forth theorem provoking through resolution makes prolog as a strong tool. These include its declarative semantics, a means of directly expressing problem relationships in AI, as well as, with built-in resolution, a primary rule inference. Nonetheless, as a practical implementation of logic as a programming language, it has made many interesting contributions to AI problem solving. PROLOG has only recently reached a place of importance in the tool kit of the artificial intelligence community. There are several dialects available for the IBM-PC family including Prolog-86, Micri-Prolog, Turbo Prolog, IC Prolog and Prolog-1. Prolog has been implemented on a variety of computers ranging from the DEC VAX down to the British Acorn educational computer.