A fine-grained account of Prolog execution for teaching and debugging
A clear and consistent execution model of any programming language can lay the foundations not only for a good learning 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 Prolo...
Gespeichert in:
Veröffentlicht in: | Instructional science 1990-01, Vol.19 (4/5), p.407-436 |
---|---|
Hauptverfasser: | , |
Format: | Artikel |
Sprache: | eng |
Schlagworte: | |
Online-Zugang: | Volltext |
Tags: |
Tag hinzufügen
Keine Tags, Fügen Sie den ersten Tag hinzu!
|
Zusammenfassung: | A clear and consistent execution model of any programming language can lay the foundations not only for a good learning 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 that required 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 modern graphics workstations. |
---|---|
ISSN: | 0020-4277 1573-1952 |
DOI: | 10.1007/BF00116447 |