On the correctness of an optimising assembler for the intel MCS-51 microprocessor

  • Authors:
  • Dominic P. Mulligan;Claudio Sacerdoti Coen

  • Affiliations:
  • Dipartimento di Scienze dell'Informazione, Universitá degli Studi di Bologna, Italy;Dipartimento di Scienze dell'Informazione, Universitá degli Studi di Bologna, Italy

  • Venue:
  • CPP'12 Proceedings of the Second international conference on Certified Programs and Proofs
  • Year:
  • 2012

Quantified Score

Hi-index 0.00

Visualization

Abstract

We present a proof of correctness in Matita for an optimising assembler for the MCS-51 microcontroller. The efficient expansion of pseudoinstructions, namely jumps, into machine instructions is complex. We isolate the decision making over how jumps should be expanded from the expansion process itself as much as possible using 'policies', making the proof of correctness for the assembler more straightforward. Our proof strategy contains a tracking facility for 'good addresses' and only programs that use good addresses have their semantics preserved under assembly, as we observe that it is impossible for an assembler to preserve the semantics of every assembly program. Our strategy offers increased flexibility over the traditional approach to proving the correctness of assemblers, wherein addresses in assembly are kept opaque and immutable. In particular, we may experiment with allowing the benign manipulation of addresses.