Concepts of Programming Languages
740 Chapter 16 Logic Programming Languages relationships. The answer no means that either the goal was determined to be false or ...
16.6 The Basic Elements of Prolog 741 man(bob). the proof is trivial. If, however, the database contains the following fact and ...
742 Chapter 16 Logic Programming Languages match the goal with the left side of the second proposition (man(X)) through the inst ...
16.6 The Basic Elements of Prolog 743 The following two subsections describe Prolog examples that further illus- trate the resol ...
744 Chapter 16 Logic Programming Languages automobiles on a particular racetrack and the amount of time they are on the track. T ...
16.6 The Basic Elements of Prolog 745 (2) 2 Exit: speed(chevy, 105) (3) 2 Call: time(chevy, _6)? (3) 2 Exit: time(chevy, 21) (4) ...
746 Chapter 16 Logic Programming Languages twice. The second subgoal fails the first time, which forces a return through redo to ...
16.6 The Basic Elements of Prolog 747 male(jake) does. That is, it states that [apple, prune, grape, kumquat] is a new element o ...
748 Chapter 16 Logic Programming Languages is caused and controlled by the resolution process. As with ML and Haskell, a pattern ...
16.6 The Basic Elements of Prolog 749 (2) 2 Call: append([jo], [jake, darcie], _18)? (3) 3 Call: append([], [jake, darcie], _25) ...
750 Chapter 16 Logic Programming Languages The append predicate can also be used to create other list operations, such as the fo ...
16.7 Deficiencies of Prolog 751 Suppose we need to be able to determine whether a given symbol is in a given list. A straightfor ...
752 Chapter 16 Logic Programming Languages by ordering the database statements to optimize a particular application. For example ...
16.7 Deficiencies of Prolog 753 member(Element, [Element | _]) :- !. Backtracking will not attempt to resatisfy member but inste ...
754 Chapter 16 Logic Programming Languages 16.7.2 The Closed-World Assumption The nature of Prolog’s resolution sometimes create ...
16.7 Deficiencies of Prolog 755 information than positive information. For example, most people have 364 more unbirthdays than t ...
756 Chapter 16 Logic Programming Languages which would succeed, because its argument had failed. Finally, the result, which is X ...
16.8 Applications of Logic Programming 757 16.8 Applications of Logic Programming In this section, we briefly describe a few of ...
758 Chapter 16 Logic Programming Languages One of the central problems for the designer of an expert system is dealing with the ...
Review Questions 759 assuming the facts and rules of the database are true. This approach is the one developed for automatic the ...
«
32
33
34
35
36
37
38
39
40
41
»
Free download pdf