The KoalaCompiler is developed as a component-based system using Stratego.StrategoXT: * The system is implemented as a set of program transformation tools. * Different pieces are implemented as separate tool components (executable programs). * Each tool component is implemented in the [[Stratego.WebHome][Stratego]] programming language. * Tool components are connected through the [[ATerm]] exchange format. * All tool components are _syntax-driven_: * Syntax definitions are defined in [[Sdf.WebHome][SDF]]. * From a syntax definition a pretty-printer, abstract syntax definition, and libraries are generated. * All transformations operate on abstract syntax trees . * Compositions of tool components are created with the Transformation Tool Composition framework Stratego.XTC. The Koala compilation process consists of three phases: 1 _Parsing_. During this phase a top-level Koala component definition is located and parsed. Subsequently, all contained elements are recursively located and parsed. The result of parsing is a single abstract syntax tree (AST) that contains exactly _all_ elements of the Koala composition. 1 _Normalization_. In this phase the AST from phase 1 is reduced to normal form. This involves several simplification steps, constant propagation, function inlining, reachability analysis, switch reduction, transitive wiring, and component pruning. The result is again an AST, that may serve for analysis or realization. 1 _Realization_. In this phase the normalized Koala composition is realized for some target. Traditionally, realization is only performed for the C programming language (which we support through KoalaC). Other realizations are: pretty-printing (see KoalaText) or vizualization (see KoalaDot). Additional realization components can simply be connected to the compiler framework (e.g., see KoalaSTC). -- Main.MerijnDeJonge - 22 Dec 2004