next up previous
Next: Implementation Environment Up: DARWIN - A Genetic Previous: Function Definition

Implementation Structure

The DARWIN project implementation consists of 4 major parts and an external code template database. The DARWIN project consists of

The general structure of the DARWIN cross-compiler is Figure 3.

Figure 1: Structure of DARWIN Cross-Compiler
\begin{figure}\begin{center}
\mbox{\epsfig{file=compiler.eps,width=12cm}}
\end{center}
\end{figure}

The Parser is the entity responsible for imposing the DARWIN Language syntax and converting a DARWIN program into a computer readable form - the parse tree. This parse tree is in turn fed into the Post-Processor, which in turn performs type-checking and verifies language semantics. The output of the Post-processor is an abstract syntax tree, equivalent to the parse tree but restructured in a form suitable for traversal by the Electra Engine. In addition, the Post-Processor produces the symbol and type tables. Next, the abstract syntax tree is passed to the Electra Engine, which performs abstract tree translation and code generation. The Electra Engine relies on the presence of a template database, which is loaded prior to starting the engine. The template database is a text file containing abstract tree templates, which are matched inside the abstract tree of the DARWIN program and translated accordingly. The output of the Electra Engine is an abstract tree representing valid C code. The Unparser, takes this abstract tree and produces a formatted C program code.

The detailed description of the Parser, Post-processor, Electra engine and Unparser will follow.


next up previous
Next: Implementation Environment Up: DARWIN - A Genetic Previous: Function Definition
Gokturk Ucoluk 2003-09-15