9 research outputs found

    Towards Modular Compilation Using Higher-Order Effects

    Get PDF
    Compilers transform a human readable source language into machine readable target language. Nanopass compilers simplify this approach by breaking up this transformation into small steps that are more understandable, maintainable, and extensible. We propose a semantics-driven variant of the nanopass compiler architecture exploring the use a effects and handlers to model the intermediate languages and the transformation passes, respectively. Our approach is fully typed and ensures that all cases in the compiler are covered. Additionally, by using an effect system we abstract over the control flow of the intermediate language making the compiler even more flexible. We apply this approach to a minimal compiler from a language with arithmetic and let-bound variables to a string of pretty printed X86 instructions. In the future, we hope to extend this work to compile a larger and more complicated language and we envision a formal verification framework from compilers written in this style

    The IO- and OI-hierarchies

    Get PDF
    AbstractAn analysis of recursive procedures in ALGOL 68 with finite modes shows, that a denotational semantics of this language can be described on the level of program schemes using a typed λ-calculus with fixed-point operators. In the first part of this paper, we derive classical schematological theorems for the resulting class of level-n schemes. In part two, we investigate the language families obtained by call-by-value and call-by-name interpretation of level-n schemes over the algebra of formal languages. It is proved, that differentiating according to the functional level of recursion leads to two infinite hierarchies of recursive languages, the IO- and OI-hierarchies, which can be characterized as canonical extensions of the regular, context-free, and IO- and OI-macro languages, respectively. Sufficient conditions are derived to establish strictness of IO-like hierarchies. Finally we derive, that recursion on higher types induces an infinite hierarchy of control structures by proving that level-n schemes are strictly less powerful than level-n+1 schemes

    Translator generation using denotational semantics

    Full text link
    corecore