Here are some debugging techniques

  • Reduce the specification and the input to localize the error

Format Checking

Unit Testing

  • Write a unit test using StrategoUnit?

Debug

  • Print intermediate results using debug

  • Use the debug strategy with an argument. It turns out that the debug strategy will accept a string prefaced by an exclamation mark, thus: debug(!"after doing something or other: ") If you do this, it will print the current aterm as usual, but first it will print the string, so that you know where in the program it is.

Tracing

Pitfalls

  • Compare your code with the list of PittFalls?

Revision: r1.5 - 09 Dec 2001 - 12:49 - EelcoVisser
Stratego > DebuggingTechniques
Copyright © 1999-2020 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback