4 research outputs found

    Provably Correct Compiler Generation

    Get PDF
    We have designed, implemented, and proved the correctness of a compiler generator that accepts action semantic descriptions of imperative programming languages. We have used it to generate compilers for both a toy language and a non-trivial subset of Ada. The generated compilers emit absolute code for an abstract RISC machine language that is assembled into code for the SPARC and the HP Precision Architecture. The generated code is an order of magnitude better than that produced by compilers generated by the classical systems of Mosses, Paulson, and Wand. Our machine language needs no run time type-checking and is thus more realistic than those considered in previous compiler proofs. We use solely algebraic specifications; proofs are given in the initiaI model. The use of action semantics makes the processable language specifications easy to read and pleasant to work with. We view our compiler generator as a promising first step towards user-friendly and automatic generation of realistic and provably correct compilers

    What is Type-Safe Code Reuse?

    No full text
    Subclassing is reuse of class definitions. It is usually tied to the use of class names, thus relying on the order in which the particular classes in a program are created. This is a burden, however, both when programming and in theoretical studies. This paper presents a structural notion of subclassing for typed languages. It is a direct abstraction of the Smalltalk interpreter and the separate compilation technique of Modula. We argue that it is the most general mechanism which can be supported by the implementation while relying on the type-correctness of superclasses. In short, it captures type-safe code reuse. 1 Introduction An important goal of object-oriented programming is to obtain reusable classes without introducing significant compiling or linking overhead. A statically typed language should thus offer general mechanisms for reusing classes without ever requiring a compiler to re-type-check an already compiled class. Such mechanisms allow type-safe code reuse. Instead of s..

    What is Type-Safe Code Reuse?

    No full text

    In Proc. ECOOP’91, Springer-Verlag (LNCS 512), pages 325–341. What is Type-Safe Code Reuse?

    Get PDF
    Subclassing is reuse of class definitions. It is usually tied to the use of class names, thus relying on the order in which the particular classes in a program are created. This is a burden, however, both when programming and in theoretical studies. This paper presents a structural notion of subclassing for typed languages. It is a direct abstraction of the Smalltalk interpreter and the separate compilation technique of Modula. We argue that it is the most general mechanism which can be supported by the implementation while relying on the type-correctness of superclasses. In short, it captures type-safe code reuse.
    corecore