next up previous
Next: 4 Example Up: KHEPERA: A System for Previous: 2 Related Work

3 Overview of KHEPERA

The KHEPERA library provides low-level support for:


  
Figure 2: The KHEPERA Transformation System
\begin{figure}
\begin{verbatim}
Programs: Debugger Interface
 Transformation Lan...
 ...gure is typeset differently in the PostScript version of
 the paper]\end{figure}

An overview of the KHEPERA system is shown in Figure 2. KHEPERA encapsulates low-level details of the DSL implementation: AST manipulation, symbol and type table management, and management of line-number and lexical information. On a higher level, library routines are available to support pretty-printing (currently, with a small language to describe how to print each node type in the AST), type inference, and the tracking functions for debugging information. Further, a ``little language'' has been implemented to support a high-level description of the transformation rules. If transformation rules are written in the KHEPERA language, or if they are written in an ad hoc manner using the underlying KHEPERA AST manipulation library, then the debugging tracking and transformation replay support will be automatically provided.

An overview of how the KHEPERA system fits into a complete DSL implementation solution is shown in Figure 3. In the example shown in the next section, we explain how the scanner and parser specifications are simplified by using calls to the KHEPERA library and will provide an example showing how other important input files are specified.


  
Figure 3: Using the KHEPERA Transformation System
\begin{figure}
 \begin{center}
 \mbox{\epsffile{system2}}
 \end{center}\end{figure}

In Figure 4, the ``DSL Processor'' from from Figure 3 is expanded, showing the basic blocks that are created from the source code and showing how the DSL processor is used during the compilation of a program written in the DSL.


  
Figure 4: Using the DSL Processor
\begin{figure}
 \begin{center}
 \mbox{\epsffile{system4}}
 \end{center}\end{figure}


next up previous
Next: 4 Example Up: KHEPERA: A System for Previous: 2 Related Work
Rickard Faith
8/31/1997