Specialeforsvar – Københavns Universitet

Specialeforsvar

Lars Hartmann: Analysis of the Correspondence between Programming Languages and CPU Instruction Sets. 

Abstract

We apply the methods of Ager et al., used to transform an interpreter into a compiler and virtual machine, to a well-defined subset --C of the programming language C and the subset MIPS64- of the CPU instruction set MIPS64. This is the first application of the methods to non-toy programming languages and CPUs, and the results suggest that the methods have applicability in practical language and CPU design.

We give --C an operational semantics that we implement in a direct style interpreter. This interpreter is then subjected to the process of Ager et al., resulting first in an abstract machine executing programs in the --C language and later in a compiler and virtual machine that corresponds to the --C interpreter.

For MIPS64-, the computational content is extracted using the ideas behind the split into compiler and virtual machine from Ager et al. We then define a small BASIC-like language called MipsL that is especially well-suited for compilation to MIPS64-.

Finally, we use the information extracted so far to suggest a scalar value that measures the fit between a programming language and a virtual or concrete machine.

Examiner: Jakob Grue Simonsen, DIKU
External examiner: Morten Rhiger, RUC and ITU