首页 | 本学科首页   官方微博 | 高级检索  
     检索      


A fine-grained account of Prolog execution for teaching and debugging
Authors:Marc Eisenstadt  Mike Brayshaw
Institution:(1) Human Cognition Research Laboratory, Open University, MK7 6AA Milton Keynes, U.K.
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 ldquoAORTArdquo diagram, is an And/OR Tree, Augmented to include invocation history ldquostatus boxesrdquo 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.
Keywords:
本文献已被 SpringerLink 等数据库收录!
设为首页 | 免责声明 | 关于勤云 | 加入收藏

Copyright©北京勤云科技发展有限公司  京ICP备09084417号