In class, we shall discuss the following three modules.

- Computation of paths in a graph given the adjacency
information of that graph. The module
path.mod
contains the description of a particular graph and the program
for computing its transitive closure. The file
path.ses
contains an example session using this code.
- The natural numbers 0, 1, 2, 3, .... are built into lambda Prolog,
along with operations to compute on them. It is interesting to
re-create a version of these numbers using terms, in the following
correspondence
0 z 1 (s z) 2 (s (s z)) 3 (s (s (s z))) 4 (s (s (s (s z))))

and so on. The module peano.mod contains the definition of this data structure and various predicates for computing on these numbers. The file peano.ses contains an example session using this code. - Lists are a common data structure and the module
lists.mod
contains the description of some simple list programs. The file
lists.ses
contains an example session using this code.

Lecture Directory / Module Directory / CSE360 Syllabus