c h a p t e r n i n e
DESCRIPTION
C H A P T E R N I N E. Logic Programming. Attempting to Satisfy the Query talkswith (bob, allen) Figure 9.1. First Attempt to Satisfy the Query talkswith(Who, allen) Figure 9.2. A Partial Family Tree Figure 9.3. A Small Family “Tree” Figure 9.4. - PowerPoint PPT PresentationTRANSCRIPT
![Page 1: C H A P T E R N I N E](https://reader031.vdocument.in/reader031/viewer/2022032709/56813222550346895d98831c/html5/thumbnails/1.jpg)
Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
C H A P T E R N I N E
Logic Programming
![Page 2: C H A P T E R N I N E](https://reader031.vdocument.in/reader031/viewer/2022032709/56813222550346895d98831c/html5/thumbnails/2.jpg)
Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
9-2
Attempting to Satisfy the Query talkswith (bob, allen)Figure 9.1
![Page 3: C H A P T E R N I N E](https://reader031.vdocument.in/reader031/viewer/2022032709/56813222550346895d98831c/html5/thumbnails/3.jpg)
Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
9-3
First Attempt to Satisfy the Query talkswith(Who, allen)Figure 9.2
![Page 4: C H A P T E R N I N E](https://reader031.vdocument.in/reader031/viewer/2022032709/56813222550346895d98831c/html5/thumbnails/4.jpg)
Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
9-4
A Partial Family TreeFigure 9.3
![Page 5: C H A P T E R N I N E](https://reader031.vdocument.in/reader031/viewer/2022032709/56813222550346895d98831c/html5/thumbnails/5.jpg)
Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
9-5
A Small Family “Tree”Figure 9.4
![Page 6: C H A P T E R N I N E](https://reader031.vdocument.in/reader031/viewer/2022032709/56813222550346895d98831c/html5/thumbnails/6.jpg)
Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
9-6
Partial Search Tree for append([english, russian], [spanish], L)Figure 9.5
![Page 7: C H A P T E R N I N E](https://reader031.vdocument.in/reader031/viewer/2022032709/56813222550346895d98831c/html5/thumbnails/7.jpg)
Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
9-7
Trace of bsort for the List [5,2,3,1].Figure 9.6
![Page 8: C H A P T E R N I N E](https://reader031.vdocument.in/reader031/viewer/2022032709/56813222550346895d98831c/html5/thumbnails/8.jpg)
Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
9-8
The Factorial Function in PrologFigure 9.7
![Page 9: C H A P T E R N I N E](https://reader031.vdocument.in/reader031/viewer/2022032709/56813222550346895d98831c/html5/thumbnails/9.jpg)
Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
9-9
Trace of Factorial (4)Figure 9.8
![Page 10: C H A P T E R N I N E](https://reader031.vdocument.in/reader031/viewer/2022032709/56813222550346895d98831c/html5/thumbnails/10.jpg)
Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
9-10
Symbolic Differentiation RulesFigure 9.9
![Page 11: C H A P T E R N I N E](https://reader031.vdocument.in/reader031/viewer/2022032709/56813222550346895d98831c/html5/thumbnails/11.jpg)
Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
9-11
Prolog Symbolic DifferentiatorFigure 9.10
![Page 12: C H A P T E R N I N E](https://reader031.vdocument.in/reader031/viewer/2022032709/56813222550346895d98831c/html5/thumbnails/12.jpg)
Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
9-12
Search Tree for the Query d(x, 2*x+1, Ans)Figure 9.11
![Page 13: C H A P T E R N I N E](https://reader031.vdocument.in/reader031/viewer/2022032709/56813222550346895d98831c/html5/thumbnails/13.jpg)
Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
9-13
Prolog Solution for the Building ProblemFigure 9.12
![Page 14: C H A P T E R N I N E](https://reader031.vdocument.in/reader031/viewer/2022032709/56813222550346895d98831c/html5/thumbnails/14.jpg)
Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
9-14
A Simple BNF Grammar and Parse Tree for “The Giraffe Dreams”† Figure 9.13
![Page 15: C H A P T E R N I N E](https://reader031.vdocument.in/reader031/viewer/2022032709/56813222550346895d98831c/html5/thumbnails/15.jpg)
Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
9-15
Tracing Execution of a Prolog QueryFigure 9.14
![Page 16: C H A P T E R N I N E](https://reader031.vdocument.in/reader031/viewer/2022032709/56813222550346895d98831c/html5/thumbnails/16.jpg)
Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
9-16
Prolog DCG for the Syntax of Jay ExpressionsFigure 9.15
![Page 17: C H A P T E R N I N E](https://reader031.vdocument.in/reader031/viewer/2022032709/56813222550346895d98831c/html5/thumbnails/17.jpg)
Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
9-17
Jay Expression Syntax Extended to Generate Parse TreesFigure 9.16