Towards an algebraic specification of code generation
暂无分享,去创建一个
We show how the problem of code generation for a simple language can be treated fully algebraically. The algebraic approach enjoys several advantages which should be demonstrated here. First, it allows a uniform specification both of the abstract syntax and of the semantics of the source and the target language on one side and of the code generation on the other side by means of hierarchical abstract data types. Moreover, theorems about the compiler, such as the preservation of the semantics, can be proved by induction on the term structure of the abstract syntax. Furthermore, existing tools for rapid prototyping with abstract data types can be applied to validate the specification against the intention in an early stage. In addition, this paper shows how such a system can also be used for performing induction proofs of conjectures.
[1] Friedrich L. Bauer,et al. Algorithmische Sprache und Programmentwicklung , 1981 .
[2] Heinrich Hußmann,et al. Unification in Conditional Equational Theories , 1985, European Conference on Computer Algebra.
[3] John McCarthy,et al. Correctness of a compiler for arithmetic expressions , 1966 .
[4] K. Indermark. Functional compiler description , 1988 .