18,394 research outputs found
Run-time debugging for functional logic languages
This thesis describes the design, implementation and use of a run-time debugging tool for understanding the lazy semantics and locating failures in the functional logic language Curry. We provide a means for programmers to step in the evaluation order of program expressions at a source code level. Every expression evaluated is detected by a program coverage in a layout of the source code. Its run-time value can be represented to the user. The user can stop the execution of a program whenever he or she chooses to do so. A means to backward stepping is also provided. For large programs, we record only partial computations that are generated by evaluating selected expressions from the user.
To achieve these means, we suggest and use some annotations in programs. Repre- sentation of intermediate steps of evaluations in a single-step mode is also provided by a distributed programming technique. Stepping in the real order of lazy evaluations could be helpful in searching for failures in simple programs and to beginners in understanding the behavior of functions in functional logic languages
Optimizing Abstract Abstract Machines
The technique of abstracting abstract machines (AAM) provides a systematic
approach for deriving computable approximations of evaluators that are easily
proved sound. This article contributes a complementary step-by-step process for
subsequently going from a naive analyzer derived under the AAM approach, to an
efficient and correct implementation. The end result of the process is a two to
three order-of-magnitude improvement over the systematically derived analyzer,
making it competitive with hand-optimized implementations that compute
fundamentally less precise results.Comment: Proceedings of the International Conference on Functional Programming
2013 (ICFP 2013). Boston, Massachusetts. September, 201
Structure and Properties of Traces for Functional Programs
The tracer Hat records in a detailed trace the computation of a program written in the lazy functional language Haskell. The trace can then be viewed in various ways to support program comprehension and debugging. The trace was named the augmented redex trail. Its structure was inspired by standard graph rewriting implementations of functional languages. Here we describe a model of the trace that captures its essential properties and allows formal reasoning. The trace is a graph constructed by graph rewriting but goes beyond simple term graphs. Although the trace is a graph whose structure is independent of any rewriting strategy, we define the trace inductively, thus giving us a powerful method for proving its properties
- ā¦