Classwork tidbits

The first piece of code is in Prolog. It implements a version of a parser and assembly language generator from a very simple language. The implementation follows closely a peculiar article on this subject (how to build compilers in Prolog): D.H.D. Warren, Logic Programming and Compiler Writing, Software Practice and Experience, vol 10, pp 97-125, 1980. Here is a link to the course.

The second piece of code is in Lisp, and, among many other things, it implements a simple version of Dijkstra's shortest path algorithm to lead an agent with a pot of gold straight home. The agent also avoids pits and wumpuses (or is it wumpi?) along the way.