Abstract:Abstract. Bernie Pope introduced the idea of representing functional values as finite maps instead of partial applications into algorithmic debugging of higher-order functional languages. He implemented it in his Haskell debugger Buddha. Here we give an implementation-independent formal definition of algorithmic debugging for both representation in a single framework, even though the computation trees for the two representations have rather different structures. On this basis we prove the soundness of algorith… Show more
“…Buddha can represent functional values as nite maps and Pope stated that a computation tree with functional values as nite maps has to have a structure that is di erent from the EDT. Subsequently Chitil and Davie (2008) de ned the new computation tree structure formally by relating it to the ART, named it the function dependence tree (FDT), and proved its soundness for algorithmic debugging.…”
Section: Other Algorithmic Debuggers For Lazy Functional Languagesmentioning
Existing methods for generating a detailed trace of a computation of a lazy functional program are complex. These complications limit the use of tracing in practice. However, such a detailed trace is desirable for understanding and debugging a lazy functional program. Here we present a lightweight method that instruments a program to generate such a trace, namely the augmented redex trail introduced by the Haskell tracer Hat. The new method is a major step towards an omniscient debugger for real-world Haskell programs.
CCS CONCEPTS• Theory of computation → Operational semantics; • Software and its engineering → Functionality;
“…Buddha can represent functional values as nite maps and Pope stated that a computation tree with functional values as nite maps has to have a structure that is di erent from the EDT. Subsequently Chitil and Davie (2008) de ned the new computation tree structure formally by relating it to the ART, named it the function dependence tree (FDT), and proved its soundness for algorithmic debugging.…”
Section: Other Algorithmic Debuggers For Lazy Functional Languagesmentioning
Existing methods for generating a detailed trace of a computation of a lazy functional program are complex. These complications limit the use of tracing in practice. However, such a detailed trace is desirable for understanding and debugging a lazy functional program. Here we present a lightweight method that instruments a program to generate such a trace, namely the augmented redex trail introduced by the Haskell tracer Hat. The new method is a major step towards an omniscient debugger for real-world Haskell programs.
CCS CONCEPTS• Theory of computation → Operational semantics; • Software and its engineering → Functionality;
“…The expected result of the program is the ordered list [3,4,5], but when executed the program prints [3,5,4] instead. The program uses many standard library functions such as ++ and foldr that are trusted, that is, assumed to be correct.…”
Section: Background Observation and Ideamentioning
confidence: 99%
“…Values such as integers and lists are given in familiar syntax, but functional values have an extensional representation as finite maps, from observed arguments to observed results. 3 Note that only the observed expression is annotated. Other parts of the program that actually produce the value, in particular the definitions of helper functions such as span and ++, are left unchanged.…”
Section: Observing Intermediate Data With Hoodmentioning
confidence: 99%
“…Chitil and Davie [3] make the point that there are several structurally different computation trees for the same computation. They study two choices for making a computation statement f v f = v ′ f the parent of a computation statement g vg = v ′ g : either function identifier g appears in the definition of function f , or the application of g to vg appears in the definition of function f .…”
Existing algorithmic debuggers for Haskell require a transformation of all modules in a program, even libraries that the user does not want to debug and which may use language features not supported by the debugger. This is a pity, because a promising approach to debugging is therefore not applicable to many real-world programs. We use the cost centre stack from the Glasgow Haskell Compiler profiling environment together with runtime value observations as provided by the Haskell Object Observation Debugger (HOOD) to collect enough information for algorithmic debugging. Program annotations are in suspected modules only. With this technique algorithmic debugging is applicable to a much larger set of Haskell programs. This demonstrates that for functional languages in general a simple stack trace extension is useful to support tasks such as profiling and debugging.
“…Hence we omit monadic IO elsewhere in the paper 3. Parts of values, for example list elements, that are not demanded in the computation are just shown as underscore .…”
Existing algorithmic debuggers for Haskell require a transformation of all modules in a program, even libraries that the user does not want to debug and which may use language features not supported by the debugger. This is a pity, because a promising approach to debugging is therefore not applicable to many real-world programs. We use the cost centre stack from the Glasgow Haskell Compiler profiling environment together with runtime value observations as provided by the Haskell Object Observation Debugger (HOOD) to collect enough information for algorithmic debugging. Program annotations are in suspected modules only. With this technique algorithmic debugging is applicable to a much larger set of Haskell programs. This demonstrates that for functional languages in general a simple stack trace extension is useful to support tasks such as profiling and debugging.
scite is a Brooklyn-based organization that helps researchers better discover and understand research articles through Smart Citations–citations that display the context of the citation and describe whether the article provides supporting or contrasting evidence. scite is used by students and researchers from around the world and is funded in part by the National Science Foundation and the National Institute on Drug Abuse of the National Institutes of Health.