Abstract:
The primary contribution of this thesis is an investigation into the feasibility of the use of high level dynamic languages for compiler implementation. This thesis describes the rationale, design, testing and discussion of the implementation of a retargetable standards compliant C compiler and framework called ACC (Auckland C compiler) and compares it against other traditional C compiler implementations such as GCC, LLVM, PCC and TCC. The distinguishing feature of ACC is its implementation in the high level and dynamic programming language python. These dynamic features allow a level of interactivity and rapid prototyping that has not previously been possible using the more traditional open source compilers. The ACC compiler described diverges from the prominent GCC and LLVM frameworks design goals in that it aims to decrease compiler development learning curves, increase modi ability, increase portability , and increase code clarity at the expense of speed and backwards compatibility. The ACC compiler currently achieves modest results when compared to these mature frameworks in regards to compile time performance, but will improve alongside fast python language implementations such as Pypy.