Error Reporting

Stratego -- Strategies for Program Transformation
Ideas for improving the error reporting of the StrategoCompiler. Feel free to add more ideas.

  • check import graph: operators used in a module should be visible through its imports

  • Warn in case of overloaded rule or strategy names (optionally)

  • store line numbers of rules and definitions and use in error messages

  • list origin when reporting "error: operator s1/0 undefined"
    • could be done by first making a list/table of all available definitions and checking it after computing the calls from a rule or definition

  • dealing with shared libraries; Merijn writes:

    • doe configure --disable-shared (de allerlaatste versie van aterm doet dat automatisch al). Hiermee wordt de generatie van shared libraries voorkomen
    • of, link sc met de -static optie om geen gebruik te aken van shared libraries
    • of, laat LD_LIBRARY_PATH wijzen naar /lib. Hierdoor kan de dynamic linker de shared libraries vinden.

  • sc : commandline interface * - -c flag for sc: only compile to C code * - document the interface in tutorial and manual page (?)

  • silent rewriting mode: no success or failure message or profiling information

  • infallible rules that give runtime errors with linenumbers if they do fail

-- EelcoVisser - 09 Dec 2001

Short of a type system for Stratego, and an accompanying type-checker, many additional static checks would be helpful to the programmer. For instance, mistakes in arities of strategies and strategy variables could be caught and reported as such by the compiler, instead of leading to C compilation or linking errors.

-- MerijnDeJonge & JoostVisser in Proceedings of SecondStrategoUsersDay


ToDo | CategoryToDo? | CompilerImprovements