Operational Semantics of a Focusing Debugger

Karen L. Bernstein, Eugene W. Stark
1995 Electronical Notes in Theoretical Computer Science  
This paper explores two main ideas: (1) a debugger for a programming language ought t o h a ve a formal semantic de nition that is closely allied to the formal definition of the language itself and (2) a debugger for very high level programming language ought to provide support for exposing hidden information in a controlled fashion. We i n vestigate these ideas by giving formal semantic de nitions for a simple functional programming language and an associated debugger for the language. The
more » ... al de nitions are accomplished using structured operational semantics, and they demonstrate one way in which the formal de nition of a debugger might b e built \on top of" the formal de nition of the underlying language. The debugger itself provides the novel capability o f a l l o wing the programmer to \focus" or shift the scope of attention in a syntax-directed fashion to a speci c subexpression within the program, and to view the execution of the program from that vantage. The main formal result about the debugger is that \focusing preserves meaning," in the sense that a program being debugged exhibits equivalent (bisimilar) operational behavior regardless of the subexpression to which the focus has been shifted.
doi:10.1016/s1571-0661(04)80002-1 fatcat:botxphjbzjfe3ln7ix5t52hqxe