Web-based Tool for Demonstrating Prolog Execution

Supervisor: Dr. Chris Hogger (Room 432)

Description

The project consists of building a tool through which various evaluation schemes for Prolog programs can be demonstrated in a web browser.

The main requirement is to display the SLD / SLDNF trees that characterize the standard behaviour of Prolog. The user should be able to present some Prolog program in the browser and then require it to be executed in a step-wise fashion while the corresponding tree is incrementally displayed in a separate frame. It should allow the user to click on any step in the evolving tree to find out which query call was selected, which program clause was used and which bindings were made.

The user should also be able to select arbitrary computation rules, besides the usual Prolog one, in order to demonstrate how the choice of rule influences the tree structure.

A further refinement, if time allowed, would be to show how a "cut" affects the tree, making clear the regions pruned by it.

The user interface would need to provide transparent and efficient means for the user to define or access sample programs and computation rules, and to provide a smooth viewing capability for inspecting different regions of the tree. The graphical appearance of the trees should resemble as closely as possible the "textbook" portrayals of them shown in standard Prolog courses, in order to be an effective teaching (and learning) tool.

The implementation details are not prescribed, but would probably be based on Java interfaced to Sicstus Prolog.