Abstract

A clear and consistent execution model of any programming language can lay the foundations not only for a good leaming experience, but also for a smoother design/edit/run/debug cycle. In this paper, we describe our attempt to construct precisely such a model for the logic programming language Prolog, based upon a notational extension of logic programming's traditional AND/OR trees. Our extension, called the “AORTA” diagram, is an And/OR Tree, Augmented to include invocation history “status boxes” at each node. This augmentation makes it possible to present a graphical view of Prolog execution which is very compact, yet which contains complete details of unification and control history, including multiple (backtracking) invocations and extra-logical features such as the cut. The paper describes our fine-grained view of Prolog execution in detail, and argues that this fine-grained view can readily be integrated into a coarse-grained model such as thatrequired for understanding the execution of very large programs. Indeed, our notation is already in use across a range of media, including textbook diagrams, video animations, and a graphical tracing and debugging facility running on modem graphics workstations.

Full Text
Published version (Free)

Talk to us

Join us for a 30 min session where you can share your feedback and ask us any queries you have

Schedule a call