BibTeX
@inproceedings{NKD-gi97, title = {Visual Metaphors for Understanding Logic Program Execution}, author = {Eric Neufeld and Anthony Kusalik and Michael Dobrohoczki}, booktitle = {Proceedings of the Graphics Interface 1997 Conference, May 21-23, 1997, Kelowna, BC, Canada}, year = {1997}, month = {May}, pages = {114--120}, url = {http://graphicsinterface.org/wp-content/uploads/gi1997-13.pdf} }
Abstract
A classic notion in logic programming is the separation of logic and control. Logic is for problem solving; control is for directing inference. However, practical experience in the classroom suggests that problem-solving students nonetheless devote much effort to understanding control issues such as eliminating looping behaviours and improving program efficiency. In the case of Prolog, this requires a clear understanding of the operation of both unification and backtracking. Students often try to get this understand by tracing executions, but the common four-port debugger used in Prolog is not as helpful as it could be. In particular, it provides information in low bandwidth textual form. This paper describes a new visualization system for logic programming that uses colour tagging to trace unification through the Prolog proof tree. A user can dynamically tag" a term or subterm with a colour that is immediately propagrated through the displayed tree. The colour is also propagated through the proof tree on subsequent execution steps. This "colour unification" has an interesting relationship with usual Prolog unification. Initial experiences reveal several interesting visual metaphors that assist understanding of logic program execution. Experience to date also suggests new directions for visualization of logic programs.