An Object-Oriented Interpreter Framework for the Oberon-2 Programming Language

Günter Obiltschnig

Diploma Thesis

Institute for Practical Computer Science
(System Software)
Johannes Kepler Universität Linz

 

Abstract

The interpreter for the Oberon-2 programming language presented in this diploma thesis is distinct from existing systems in two special ways. Many existing interpretation systems compile the source program into code for a virtual machine. This code is then loaded and executed by the interpreter. The interpreter presented here uses the front end of the portable Oberon-2 compiler to translate the source program into a syntax tree with an accompanying symbol table. This syntax tree is then directly interpreted and thus executed. The term syntax tree based interpretation is introduced to describe this feature. The second remarkable feature of the interpreter is, that it is implemented as an object-oriented -- and therefore extensible -- framework. Using this framework, many sophisticated tools for program ananysis and debugging can be built with very little effort. The framework also supports security management, so that it can be used to execute programs in security sensitive environments. An example for such an environment would be a Web browser which interprets a script embedded in a Hypertext Markup Language document. The interpreter also supports the import of compiled program modules and therefore the execution of compiled procedures inside those modules. Compiled procedures can even call back interpreted procedures via procedure variables. This feature is called mixed mode execution. As examples of how the interpreter framework can be used, two applications of it are presented. OberonScript is an extension to the Oberon Web browser comparable to JavaScript for the Netscape Web browser or VBScript for the Internet-Explorer Web browser. Oberon-2 script programs can be embedded in a Hypertext Markup Language document and are executed by the Web browser when the document is rendered. A simple tool for performing a code coverage analysis on an Oberon module is presented as a second example.

 

Resources

 

Contact

Developer: Günter Obiltschnig (guenter.obiltschnig@csl.at)
Supervisor: DDI Christoph Steindl (steindl@ssw.uni-linz.ac.at)

 


Copyright © 1997-1999 by Günter Obiltschnig. All rights reserved.
Created: Jan 16, 1999. Updated: Jan 18, 1999.