+
hunk ./docs/faq.html 5
- Haskell Tracer:
- frequently asked questions
+ Hat
+ Frequently Asked Questions
hunk ./docs/faq.html 10
-
-Why do you call it a tracer rather than a debugger?
-
+
+ Why do you call it a tracer rather than a debugger?
+
hunk ./docs/faq.html 22
-
-Briefly, how does tracing work?
-
-First, the tracing compiler does what amounts to a source-to-source
-transformation on the program. The transformed version computes the
-same result as the original, but additionally builds a trace as a normal
-functional data structure. After running the program, the Haskell
-runtime system waits for a connection from the trace browser.
-The browser is a Java program that simply displays the computed trace
-structure in a manageable way, allowing you to follow trail paths and to
-connect to the original program source. The browser communicates back
-and forth with the halted program, copying trace structures across
-when they are needed - typically users browse a very small proportion
-of the complete trace.
+ Why did you not implement a conventional tracer/debugger as they are well known for imperative languages?
hunk ./docs/faq.html 24
-
-I have trouble compiling my program for tracing.
-
-Unfortunately, the prototype tracer does not yet cover the whole of
-the Haskell'98 language, nor the whole of the Standard Prelude and
-Libraries. For example, many IO functions are missing. One of the
-first results of the ART project will be more comprehensive
-coverage. Check the Hat Feature
+Conventional tracers (debuggers) for imperative languages allow the user to step through the program computation, stop at given points and examine variable contents.
+In our opinion this tracing method is unsuitable for a lazy functional language such as Haskell, because its evaluation order is complex, function arguments are usually unwieldy large unevaluated expressions and generally computation details do not match the user's high-level view of functions mapping values to values. Also the stack used by the Haskell runtime system does not resemble the stack of function calls used by runtime systems of strict languages.
+
+However, the trace file written by the traced program contains all information in the order of lazy evaluation. It is possible to write a viewing tool that admits single stepping through a lazy computation.
+
+How much does tracing cost me in time and space?
+
+Currently a traced program runs about 50 times slower than its untraced counterpart. We are working on reducing this factor.
+As a rule of thumb, a reduction step produces about 40 bytes in the trace file. So trace files can easily grow to tenth and hundreds of megabytes. However, you can name some modules of your program as trusted, so that their reductions are not recorded in the trace.
+
+I have trouble compiling my program for tracing.
+
+Hat nearly but not yet fully covers
+the Haskell 98 language and its libraries.
+Also it supports only few language extensions.
+Check the Hat Feature
hunk ./docs/faq.html 43
-
-Even on a very simple program, the tracing compiler complains
- about dPat: no match.
-
+
+ Even on a very simple program, the tracing compiler complains
+ about dPat: no match.
+
hunk ./docs/faq.html 53
-
hunk ./docs/faq.html 54
+
hunk ./docs/faq.html 56
-
-http://www.cs.york.ac.uk/fp/ART/
+
+http://www.cs.york.ac.uk/fp/hat/
hunk ./docs/faq.html 60
-This page last modified: 2000.09.15
+This page last modified: 21 May 2001
hunk ./docs/faq.html 64
- |