Towards a demonstrably-correct ada compiler

  • Authors:
  • Chris Nettleton;Wilson Ifill;Colin Marsh

  • Affiliations:
  • XGC Software, London UK;AWE plc, Aldermaston UK;AWE plc, Aldermaston UK

  • Venue:
  • Proceedings of the 2007 ACM international conference on SIGAda annual international conference
  • Year:
  • 2007

Quantified Score

Hi-index 0.00

Visualization

Abstract

We report on a significant new compiler technology for applications requiring the highest level of reliability. This work is partly funded by AWE plc and takes into account previous AWE work on a demonstrably correct compiler for a Pascal-like language. This work will be of interest to anyone developing safety-critical software. Today's Ada compilers are based on 1980s' technology, when 4M Bytes of memory was considered sufficient for a project of 10 users. Using today's computers, when even a laptop computer has 512 M Bytes of memory; we can offer a much better compiler for a fraction of the cost. Initial estimates suggest a new technology compiler will be 1/50th the number of source lines, yet meet all our requirements for features and run-time performance. We have already confirmed the feasibility of our approach in a prototype compiler. This handles a well-defined subset of Ada95 and employs algebraic simplifications in place of optimizations. By prohibiting recursion, we avoid costly run-time organization. Our prototype run-time system is just three instructions. Our compiler is written in a notation much like ordinary mathematics, and is therefore amenable to mathematical techniques such as theorem proving. Later we intend to offer a proof of correctness. In the meantime, we will demonstrate correctness, both in the sense that a given program has been correctly compiled, and that all programs will be correctly compiled. The prototype compiler performs well. It compiles at several thousand lines per second and generates code that compares well with that from our optimizing compiler.