A guide to The Meta-Environment documentation for newbies
This pages serves as an index to the documentation on The Meta-Environment for people that are completely new to it. There are a few things to learn before starting to use it:
- Syntax definition and parsing using SDF.
- Algebraic specification and term rewriting using ASF+SDF.
- The particular usage of The Meta-Environment IDE.
If you have not attended the course already, you should start reading the
Introductory slides on ASF+SDF, which feature all three issues.
If you are interested in documentation on RScript (relational calculus), look
here.
An index to all documentation can be found
here. The
MailingLists are used by users and developers to help each other.
Syntax definition and parsing using SDF
Syntax definition is the task of defining the syntax of a language using grammar production rules. From this definition a parser can be generated that transforms source code (an input sentence) to a tree. So, the user of The Meta-Environment
defines a syntax and The Meta-Environment
generates a parser for her. The language to define syntax in The Meta-Environment is called
SDF (similar to EBNF).
For troubleshooting:
- Parse errors can be hard to debug. There is no online manual on that subject. Use general debugging techniques to find the cause of the failure:
- limit the size of the input as much as possible
- use delta debugging to find the minimal difference between a sentence that parses and one that does not.
- keep in mind that the error is either in the input sentence, or in the SDF definition.
- Ambiguities can be debugged using the method described here.
Algebraic specification and term rewriting using ASF+SDF
The other formalism next to
SDF in The Meta-Environment is called
ASF+SDF. You can manipulate the trees produced by parsers generated from
SDF definitions using
ASF+SDF. This is done using a form of programming called
algebraic specification which is similar to the
functional programming paradigm in many ways. An ASF program is actually a rewriting system, which simply transforms trees to other trees.
For troubleshooting:
- Explanation of ASF error messages
- When something 'does not rewrite' you could use the (somewhat experimental) debugger for ASF+SDF. Instead of 'Reduce' choose 'Debug Reduce' in the IDE, and go to the 'Processes' tab in the left part of the IDE. Then right-click on a process in the list to activate a source viewer. Use the 'step into' and 'step over' buttons to find the part of your program that fails.