Entwicklung eines Modulkonzeptes für einen MIEC-Compiler

  • Daniel Kogler

    Student thesis: Master's Thesis

    Abstract

    This master’s thesis deals with the extension of a MIEC compiler that translates the
    MiniIEC (MIEC) programming language into PROL16 machine code. The aim of the
    thesis is to implement a module concept that enables the encapsulation of functions and
    variables in modules as well as the support of function calls with parameters and return
    values in the MIEC language.
    The thesis begins with an introduction to the fundamentals and theoretical backgrounds
    of compiler construction, including attributed grammars (ATG), scanners, parsers, intermediate representation, and code generation. Subsequently, existing module concepts
    of more complex languages are examined, and various module concepts for MIEC are
    discussed. The concrete implementation and integration of one of these module concepts are described in detail, followed by extensive testing of the extended system.
    The implemented concept, with an adapted MIEC grammar and various extensions
    in the compiler, achieves the main goals. It allows for the outsourcing of functions and
    variables into separate module files that can be imported by a main program. Only
    entire module contents can be imported, and full data encapsulation to hide implementation details is not possible. Moreover, there is no advantage in terms of compilation
    time, as changes in the source code require all files to be recompiled to enable merging
    in the intermediate representation.
    The results of the thesis demonstrate the extended functionality of the MIEC language and provide deeper insights into the operation of the extended compiler. The
    thesis concludes with an evaluation of the results and an outlook on possible future
    extensions.
    Date of Award2024
    Original languageGerman (Austria)
    SupervisorFranz Leopold Wiesinger (Supervisor)

    Cite this

    '