Skip to main content

Part of the book series: Lecture Notes in Computer Science ((LNAI,volume 2850))

Abstract.

We consider the machine-supported verification of a code generator computing machine code from WHILE-programs, i.e. abstract syntax trees which may be obtained by a parser from programs of an imperative programming language. We motivate the representation of states developed for the verification, which is crucial for success, as the interpretation of tree-structured WHILE-programs differs significantly in its operation from the interpretation of the linear machine code. This work has been developed for a course to demonstrate to the students the support gained by computer-aided verification in a central subject of computer science, boiled down to the classroom-level. We report about the insights obtained into the properties of machine code as well as the challenges and efforts encountered when verifying the correctness of the code generator. We also illustrate the performance of the \(\checkmark\) eriFun system that was used for this work.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 39.99
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 54.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. http://www.informatik.tu-darmstadt.de/pm/verifun/

  2. Aho, A.V., Sethi, R., Ullmann, J.D.: Compilers: Principles, Techniques and Tools. Addison-Wesley, New York (1986)

    Google Scholar 

  3. Dold, A., Vialard, V.: A mechanically verified compiling specification for a Lisp compiler. In: Hariharan, R., Mukund, M., Vinay, V. (eds.) FSTTCS 2001. LNCS, vol. 2245, pp. 144–155. Springer, Heidelberg (2001)

    Chapter  Google Scholar 

  4. Flatau, A.D.: A Verified Implementation of an Applicative Language with Dynamic Storage Allocation. PhD. Thesis, Univ. of Texas (1992)

    Google Scholar 

  5. Giesl, J.: Termination of Nested and Mutually Recursive Algorithms. Journal of Automated Reasoning 19, 1–29 (1997)

    Article  MATH  MathSciNet  Google Scholar 

  6. Goerigk, W., Dold, A., Gaul, T., Goos, G., Heberle, A., von Henke, H., Hoffmann, U., Langmaack, H., Zimmermann, W.: Compiler correctness and implementation verification: The Verifix approach. In: Fritzson, P. (ed.) Proc. of the Poster Session of CC 1996 - Intern. Conf. on Compiler Construction, pp. 65–73 (1996)

    Google Scholar 

  7. Gunter, C.A.: Semantics of Programming Languages — Structures and Techniques. The MIT Press, Cambridge (1992)

    MATH  Google Scholar 

  8. Hannan, J., Pfenning, F.: Compiler verification in LF. In: Scedrov, A. (ed.) Proceedings of the Seventh Annual IEEE Symposium on Logic in Computer Science, pp. 407–418. IEEE Computer Society Press, Los Alamitos (1992)

    Chapter  Google Scholar 

  9. McCarthy, J., Painter, J.A.: Correctness of a Compiler for Arithmetical Expressions. In: Schwartz, J.T. (ed.) Proc. on a Symp. in Applied Math., 19, Math. Aspects of Comp. Sc.. American Math. Society, Providence (1967)

    Google Scholar 

  10. Moore, J.S.: A Mechanically Verified Language Implementation. Journal of Automated Reasoning 5(4), 461–492 (1989)

    Google Scholar 

  11. Moore, J.S.: PITON - A Mechanically Verified Assembly-Level Language. Kluwer Academic Publishers, Dordrecht (1996)

    Google Scholar 

  12. Moore, J.S.: An exercise in graph theory. In: Kaufmann, M., Manolios, P., Moore, J.S. (eds.) Computer-Aided Reasoning: ACL2 Case Studies, Boston, MA., pp. 41–74. Kluwer Academic Press, Dordrecht (2000)

    Google Scholar 

  13. Nielson, H.R., Nielson, F.: Semantics with Applications. John Wiley and Sons, New York (1992)

    MATH  Google Scholar 

  14. Curzon, P.: A verified compiler for a structured assembly language. In: Archer, M., Joyce, J.J., Levitt, K.N., Windley, P.J. (eds.) International Workshop on Higher Order Logic Theorem Proving and its Applications, Davis, California, pp. 253–262. IEEE Computer Society Press, Los Alamitos (1991)

    Chapter  Google Scholar 

  15. Schellhorn, G., Ahrendt, W.: The WAM case study: Verifying compiler correctness for Prolog with KIV. In: Bibel, W., Schmidt, P.H. (eds.) Automated Deduction: A Basis for Applications, vol. III. Kluwer Academic Publishers, Dordrecht (1998)

    Google Scholar 

  16. Walther, C.: On Proving the Termination of Algorithms by Machine. Artificial Intelligence 71(1), 101–157 (1994)

    Article  MATH  MathSciNet  Google Scholar 

  17. Walther, C.: Criteria for Termination. In: Hölldobler, S. (ed.) Intellectics and Computational Logic. Kluwer Academic Publishers, Dordrecht (2000)

    Google Scholar 

  18. Walther, C.: Semantik und Programmverifikation. Teubner-Wiley, Leipzig (2001)

    Google Scholar 

  19. Walther, C., Schweitzer, S.: A Machine Supported Proof of the Unique Prime Factorization Theorem. Technical Report VFR 02/03, Programmiermethodik, Technische Universität Darmstadt (2002)

    Google Scholar 

  20. Walther, C., Schweitzer, S.: The \(\surd\)eriFun Tutorial. Technical Report VFR 02/04, Programmiermethodik, Technische Universität Darmstadt (2002)

    Google Scholar 

  21. Walther, C., Schweitzer, S.: \(\surd\)eriFun User Guide. Technical Report VFR 02/01, Programmiermethodik, Technische Universität Darmstadt (2002)

    Google Scholar 

  22. Walther, C., Schweitzer, S.: About \(\surd\)eriFun. In: Baader, F. (ed.) CADE 2003. LNCS (LNAI), vol. 2741, pp. 1–5. Springer, Heidelberg (2003)

    Chapter  Google Scholar 

  23. Walther, C., Schweitzer, S.: A Machine-Verified Code Generator. Technical Report VFR 03/01, Programmiermethodik, Technische Universität Darmstadt (2003)

    Google Scholar 

  24. Walther, C., Schweitzer, S.: Verification in the Classroom. To appear in Journal of Automated Reasoning - Special Issue on Automated Reasoning and Theorem Proving in Education, 1–21 (2003)

    Google Scholar 

  25. Walther, C., Schweitzer, S.: A Verification of Binary Search. In: Hutter, D., Stephan, W. (eds.) Mechanizing Mathematical Reasoning: Techniques, Tools and Applications. LNCS (LNAI), vol. 2605, pp. 1–18. Springer, Heidelberg (2003)

    Google Scholar 

  26. Winskel, G.: The Formal Semantics of Programming Languages. The MIT Press, Cambridge (1993)

    MATH  Google Scholar 

  27. Young, W.D.: A Mechanically Verified Code Generator. Journal of Automated Reasoning 5(4), 493–518 (1989)

    Article  Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2003 Springer-Verlag Berlin Heidelberg

About this paper

Cite this paper

Walther, C., Schweitzer, S. (2003). A Machine-Verified Code Generator. In: Vardi, M.Y., Voronkov, A. (eds) Logic for Programming, Artificial Intelligence, and Reasoning. LPAR 2003. Lecture Notes in Computer Science(), vol 2850. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-540-39813-4_6

Download citation

  • DOI: https://doi.org/10.1007/978-3-540-39813-4_6

  • Publisher Name: Springer, Berlin, Heidelberg

  • Print ISBN: 978-3-540-20101-4

  • Online ISBN: 978-3-540-39813-4

  • eBook Packages: Springer Book Archive

Publish with us

Policies and ethics