[Updated web pages for Hat. olaf**20010521140634] { hunk ./docs/faq.html 2 - -
+ 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 -
hunk ./docs/feature-table.html 100 -Mar
2000Sept
2000Apr
2001Sept
2001 +Mar
2000Sept
2000May
2001Sept
2001 hunk ./docs/hatuser.tex 282 -\emph{At the moment hat-detect can only be used for computations that produce faulty output, not for computations that abort with an error message or are interrupted.} +\emph{At the moment hat-detect can only be used for computations that produce faulty output, not for computations that abort with an error message or are interrupted. Also it does not work correctly for programs that read input.} hunk ./docs/hatuser.tex 325 -Bug found in: "insert 2 (1:[])" +Bug found: "insert 2 (1:[]) = 2:2:[]" hunk ./docs/index.html 34 -
  • hat-stack
    +
  • Hat-stack
    hunk ./docs/index.html 60 -
  • hat-observe
    +
  • Hat-observe (inspired by Hood)
    hunk ./docs/index.html 77 -
  • hat-detect
    -Hat-detect is an interactive tool that enables locating semi-automatically an error in a program by answering a sequence of yes/no questions. Each question asked by hat-detect concerns the reduction of a redex -- that is, a function application -- to a value. You have to answer \emph{yes}, if the reduction is correct with respect to your intentions, and \emph{no} otherwise. After a number of questions hat-detect states which reduction is the cause of the observed faulty behaviour -- that is, which function definition is incorrect. +
  • Hat-detect (inspired by Freja)
    +Hat-detect is an interactive tool that enables locating semi-automatically an error in a program by answering a sequence of yes/no questions. Each question asked by hat-detect concerns the reduction of a redex - that is, a function application - to a value. You have to answer yes, if the reduction is correct with respect to your intentions, and no otherwise. After a number of questions hat-detect states which reduction is the cause of the observed faulty behaviour - that is, which function definition is incorrect. hunk ./docs/index.html 80 -Example session (y/n anwers are given by the user): +Example session (y/?/n anwers are given by the user): hunk ./docs/index.html 82 -1> main = IO _ (Y/?/N): n +1> main = IO _ (Y/?/N): ? hunk ./docs/index.html 91 + hunk ./docs/index.html 93 -Bug found in: "insert 2 (1:[])" +Bug found: "insert 2 (1:[]) = 2:2:[]" hunk ./docs/index.html 96 -
  • hat-trail
    +
  • Hat-trail
    hunk ./docs/index.html 115 -
  • the Hat user manual (part of the distribution) - (TeX) - (PostScript) +
  • tHat user manual (included in the distribution) + (PostScript) + (PDF) hunk ./docs/index.html 123 -Hat is part of the Haskell system nhc98. So you get Hat by downloading nhc98. +Hat 1.04 is part of the Haskell system nhc98. So you get Hat by downloading nhc98. hunk ./docs/index.html 125 -
  • - Download nhc98 including Hat +
  • + Download and install nhc98 including Hat hunk ./docs/index.html 145 -The ART project team has four active members: -Colin Runciman, -Malcolm Wallace, -Olaf Chitil and -Thorsten Brehm. +The ART project team has the following active members: +Colin Runciman, +Malcolm Wallace, +Olaf Chitil, +Thorsten Brehm and +Phil Hassall. hunk ./docs/index.html 152 -ART builds on previous work by Colin and +ART builds on previous work by Colin and hunk ./docs/index.html 157 -The ART project proposal describes well our main aims. Note that details have changed and will change. +The ART project proposal describes well our main aims. Note that details have changed and will continue to change. hunk ./docs/index.html 163 -
  • Separate Hat from nhc98; obtain a tracing pre-processor for other Haskell compilers. +
  • Obtain a tracing pre-processor for other Haskell compilers by separating Hat from nhc98. hunk ./docs/index.html 171 -We are especially looking for medium sized programs (300-3000 lines) for testing and evaluating Hat. Please contact us if you want to contribute a program. +We are especially looking for medium sized programs (300-3000 lines) for testing and evaluating Hat. Please contact us if you want to contribute a program. + + + +

    Mailing lists

    + +Because Hat is currently part of nhc98, the nhc mailing lists are the forum for discussing Hat. + hunk ./docs/index.html 186 -

    Publications

    +

    Publications

    hunk ./docs/index.html 191 - Markus Mohnen and Pieter Koopman (eds): Proceedings of the 12th International Workshop on Implementation of Functional Languages, Aachen, Germany, September 4th - 7th 2000, LNCS 2011, 2001, pp. 176--193. + Markus Mohnen and Pieter Koopman (eds): Proceedings of the 12th International Workshop on Implementation of Functional Languages, Aachen, Germany, September 4th - 7th 2000, LNCS 2011, 2001, pp. 176-193. hunk ./docs/index.html 200 -
    -
    Paper: Tracing lazy functional computations using redex trails. (PLILP'97) - (.ps.gz)
    -
    Paper: Partial redex trails of large functional computations. (IFL'97) - (.ps.gz)
    -
    Thesis: Tracing and Debugging Lazy Functional Computations (pub. Jan'99) - (.ps.gz)
    -
    -

    - -

    Mailing lists

    hunk ./docs/index.html 201 -
  • Bugs
    -Please mail bug reports to nhc-bugs@haskell.org. Because Hat is currently part of nhc98, the nhc mailing lists are the forum for discussing Hat. -
  • Tracing
    - If you are interested in testing the tracer, or contributing - in other ways to ART, please join our - mailing list. -
  • ART team members
    -To email the members of the ART team, use the address: -ART-team@cs.york.ac.uk +
  • Jan Sparud and Colin Runciman:
    +Tracing Lazy Functional Computations Using Redex Trails
    +(PLILP'97) +(.ps.gz) +

    +

  • Jan Sparud and Colin Runciman:
    +Complete and Partial Redex Trails of Functional Computations
    +(IFL'97) +(.ps.gz) +

    +

  • Jan Sparud:
    +Tracing and Debugging Lazy Functional Computations
    +(PhD thesis, 1999) +(.ps.gz) hunk ./docs/index.html 218 +
    hunk ./docs/limitations.html 1 -Hat 1.0 Bugs and Limitations - -
    +Hat 1.4 Bugs and Limitations + hunk ./docs/limitations.html 5 -

    Hat 1.0 Bugs and Limitations

    +

    Hat 1.04 Bugs and Limitations

    hunk ./docs/limitations.html 10 -This is a list of some known limitations and bugs in Hat 1.0, -a tracer for the functional language Haskell 98. -Please mail us at - ART-team@cs.york.ac.uk +This is a list of some known limitations and bugs in Hat 1.04. +Please mail + nhc-bugs@haskell.org hunk ./docs/limitations.html 18 -
    Type synonyms for arrow types do not compile correctly.
    - hunk ./docs/limitations.html 20 -
    Records are not supported.
    hunk ./docs/limitations.html 21 -
    Libraries Array, Directory, System, Time, Locale, CPUTime, Random +
    Libraries Time and Locale hunk ./docs/limitations.html 24 -
    Library IO is not fully supported: - no readFile or appendFile.
    - hunk ./docs/limitations.html 26 -
    Very rarely, the compiler fails with No match in _dCaf.
    +
    Very rarely, the compiler fails with No match in +_dCaf.
    hunk ./docs/limitations.html 29 -More details here. hunk ./docs/limitations.html 35 -
    Strictness annotations in data type definitions lose their effect.
    +
    Strictness annotations in data type definitions lose their +effect.
    hunk ./docs/limitations.html 39 -

    Trace-time problems:

    +

    Problems with viewing a trace

    hunk ./docs/limitations.html 41 +

    General

    hunk ./docs/limitations.html 43 -
    Comprehensions are not traced at source-level.
    +
    Records are not traced at source level.
    + +
    List comprehensions are not traced at source level.
    hunk ./docs/limitations.html 51 +
    Super-saturated applications are not shown correctly.
    + hunk ./docs/limitations.html 54 + hunk ./docs/limitations.html 56 -
    Scrolling resets when trace is extended and is deeper than trace window.
    +

    Hat-detect

    + +
    +
    Only useable for computations that produce faulty output, not for computations that abort with an error message or are interrupted. +
    Does not work correctly for programs that read input. +
    + +

    Hat-trail

    + +
    +
    Scrolling sometimes resets when trace is extended and is deeper than trace +window.
    hunk ./docs/limitations.html 73 -
    Shift-middle-click changes the display wrongly.
    - -
    Rarely, the browser hangs following a source-code link.
    +
    Only one instance of hat-trail can be run at a time.
    hunk ./docs/limitations.html 75 -More details here. hunk ./docs/limitations.html 78 -This page last modified: 2000.09.15
    - -
    +This page last modified: 21 May 2001
    hunk ./docs/private/Memos/index.html 1 -Advanced Redex Trails - - -
    -

    Private Team Information

    -

    Memos

    -
    - -
      -
    1. Advanced Redex Trails: fully-fledged tracing technology for functional programs (project proposal) -
    2. Comparison of Dependency-Based Debuggers for Lazy Functional Languages, Olaf Chitil, Version 1 from June 13, 2000. -
      - TeX-source, - Version 0 from June 13, 2000 -
      - -
    3. Incremental Archiving of Redex Trails, Colin Runciman, Version 0 from June 15, 2000. - -
    4. Problems with Numerics in Tracing with nhc98, Malcolm Wallace, Version 0 from June 15, 2000. - -
    5. Tracing List Comprehensions, Colin Runciman, Version 0 from June 15, 2000. - -
    6. Proposal for tracing primitive functions in nhc98 via the new FFI, Malcolm Wallace, Version 1 from June 27, 2000. -
    - -More to come ;-) - -
    -

    -This page last modified: June 29, 2000
    - - - rmfile ./docs/private/Memos/index.html rmdir ./docs/private/Memos hunk ./docs/private/conf.html 1 -Advanced Redex Trails - -
    - -
    -

    Advanced Redex Trails:

    -

    private team information

    -
    -
    - -

    -Target conferences for possible publication: -

    -
    Compiler Construction - CC'00 (Mar)
    -
    Scottish FP Workshop - ScotFP'00 (Jul)
    -
    Automated and Algorithmic Debugging - AADEBUG'00 (Aug)
    -
    International Workshop on Automated Debugging - AADEBUG'00 (Aug)
    -
    Implementation of Functional Languages - IFL'00 (Sept)
    -
    Haskell Workshop - HW'00 (Sept)
    -
    International Conference on Functional Programming - ICFP'00 (Sept)
    -
    Principles and Practice of Declarative Programming - PPDP'00 (Sept)
    -
    International Workshop on Functional and Logic Programming - WFLP'00 (Sept)
    -
    Practical Aspects of Declarative Languages - PADL'01 (Jan)
    -
    - -
    -

    -This page last modified: 2000.03.13
    - -

    - - rmfile ./docs/private/conf.html hunk ./docs/private/index.html 1 -Advanced Redex Trails - -
    - -
    -

    Advanced Redex Trails:

    -

    private team information

    -
    -
    - - - -
    -

    -This page last modified: June 13, 2000
    - -

    - - rmfile ./docs/private/index.html }