Niek Sombekke - Graph-Based Semantics of the .NET Intermediate Language

author:Niek Sombekke
title:Graph-Based Semantics of the .NET Intermediate Language
keywords:GROOVE, semantics, .NET, AST A. Rensink
ir. H. Kastenberg
ir. T
graduation date:25 May 2007 (mark: 7/10)


The semantics of a programming language are often described in a natural language. Such descriptions are often ambiguous and hard (or even impossible) to construct in a precise way. To tackle these problems one could specify a formal description of the semantics by using a mathematical model. In this report such a mathematical model is presented for the .NET Intermediate Language (IL) in the form of graphs and transformations to these graphs.

In order to be able to perform transformations on graphs, we need a start graph. The .NET Intermediate Language generates bytecode and cannot supply such a start graph. Therefore we have constructed a translator that translates an arbitrary IL program into a so called Abstract Syntax Graph (ASG). The ASG is the start graph to which we now can apply graph transformations.

Central in this report are graph production rules that we have specified in order to describe the semantics of .NET IL instructions. These production rules are used for transforming graphs, and by applying them to the (intermediate) graphs repeatedly it is possible to simulate a program.

Although further research is necessary, we believe this project provides a promising basis of representing the semantics of the .NET Intermediate Language in an intuitive and formal way.