Here are some debugging techniques

  • Reduce the specification and the input to localize the error

  • Print intermediate results using debug

  • Write a unit test using StrategoUnit?

  • Compare your code with the list of ThingsThatCannotWork?

  • 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.

Revision: r1.4 - 03 Nov 2001 - 14:24 - 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