We now go beyond the syntactic realm to describe some semantics of the Exp language with a set of Typol rules. We might want to study many different semantics when developing a language -static, dynamic, transformation, etc. In this tutorial, we specify the dynamic semantics of evaluating arithmetic expressions. We compile the Typol program that specifies these semantics into an interpreter for Exp.
Thus far, the Exp environment consists of a parser tool and a pretty printer tool. We are about to add an interpreter tool that is implemented in Typol. A semantics tool may require more than one Typol program to function; these files are all stored in the directory specified by resources in the formalism resource file. The Typol specifications for the Exp interpreter are stored in the directory:
contrib/Exp/semantics/interpreter
For information about Typol, please consult the Typol manual in the Mantle. For information about messages, please consult the message manual in the Core.