An Object Oriented Model for Semantics Directed Compiler Generation
Luiz Carlos Castro Guedes
UFF
Edward Hermann Haeusler
José Lucas Rangel
PUC-RIO
This paper describes a semantic model suitable for a compiler generation
system that takes
as input the denotational description of the source language. The model
proposed here
maps the denotational definition of a programming language to an Object
Oriented
program in an adequate language. The core of the model is the mapping from
syntactic
and semantic domains into classes, and from semantic functions into methods
of those
classes. Semantic equations are mapped to the implementation of some of
those methods.
Its correctness has been proved and a system prototype implemented.
Performance tests
have shown our system outperforms similar systems and that its produced
compilers are
just one order of magnitude slower than hand written ones. The great
efficiency of the
model is a promising step towards the automatically generation of production
quality
compilers. Thus, a natural and elegant model to translate programming
language
descriptions into realistic compilers with its correctness guaranteed has
been obtained.
.