Skip to main content

Synthesizing Certified Code

  • Conference paper
  • First Online:
FME 2002:Formal Methods—Getting IT Right (FME 2002)

Part of the book series: Lecture Notes in Computer Science ((LNCS,volume 2391))

Included in the following conference series:

Abstract

Code certification is a lightweight approach for formally demonstrating software quality. Its basic idea is to require code producers to provide formal proofs that their code satisfies certain quality properties. These proofs serve as certificates that can be checked independently. Since code certification uses the same underlying technology as program verification, it requires detailed annotations (e.g., loop invariants) to make the proofs possible. However, manually adding annotations to the code is time-consuming and error-prone.

We address this problem by combining code certification with automatic program synthesis. Given a high-level specification, our approach simultaneously generates code and all annotations required to certify the generated code. We describe a certification extension of AutoBayes, a synthesis tool for automatically generating data analysis programs. Based on built-in domain knowledge, proof annotations are added and used to generate proof obligations that are discharged by the automated theorem prover E-SETHEO. We demonstrate our approach by certifying operator- and memory-safety on a data-classification program. For this program, our approach was faster and more precise than PolySpace, a commercial static analysis tool.

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 84.99
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 109.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. A. W. Appel and A. P. Felty. A semantic model of types and machine instructions for proof-carrying code. In Proc. 27th ACM Symp. Principles of Programming Languages, pp. 243–253. ACM Press, 2001.

    Google Scholar 

  2. J. Barnes. High Integrity Ada: The SPARK Approach. Addison-Wesley, 1997.

    Google Scholar 

  3. H. Barringer, J. H. Cheng, and C. B. Jones. A logic covering undefinedness in program proofs. Acta Informatica, 21(3):251–269, Oct. 1984.

    Google Scholar 

  4. J. Berkowitz. Photoabsorption, Photoionization, and Photoelectron Spectroscopy. Academic Press, 1979.

    Google Scholar 

  5. CASC-JC theorem proving competition. http://www.cs.miams.edu/~tptp/CASC/JC.

  6. C. Colby, P. Lee, G. C. Necula, F. Blau, M. Plesko, and K. Cline. A certifying compiler for Java. ACM SIGPLAN Notices, 35(5):95–107, 2000.

    Article  Google Scholar 

  7. J. Dawes. The VDM-SL Reference Guide. Pitman, London, 1991.

    Google Scholar 

  8. E. W. Dijkstra. A Discipline of Programming. Prentice-Hall, 1976.

    Google Scholar 

  9. M. D. Ernst, J. Cockrell, W. G. Griswold, and D. Notkin. Dynamically discovering likely program invariants to support program evolution. IEEE Trans. Software Engineering, 27(2):1–25, Feb. 2001.

    Google Scholar 

  10. M. S. Feather and M. Goedicke (eds.) Proc. 16th Intl. Conf. Automated Software Engineering, IEEE Comp. Soc. Press, 2001.

    Google Scholar 

  11. B. Fischer and J. Schumann. AutoBayes: A system for generating data analysis programs from statistical models. J. Functional Programming, 2002. To appear. Preprint available at http://ase.arc.nasa.gov/people/fischer/.

  12. B. Fischer, J. Schumann, and T. Pressburger. Generating data analysis programs from statistical models (Position Paper). In W. Taha (ed.), Proc. Intl. Workshop Semantics, Applications, and Implementation of Program Generation, Lect. Notes Comp. Sci. 1924, pp. 212–229. Springer, 2000.

    Google Scholar 

  13. C. Flanagan and K. R. M. Leino. Houdini, an annotation assistant for ESC/Java. In J. Oliveira and P. Zave (eds.), Proc. Intl. Symp. Formal Methods Europe 2001: Formal Methods for Increasing Software Productivity, Lect. Notes Comp. Sci. 2021, pp. 500–517. Springer, 1997.

    Google Scholar 

  14. G. C. Gannod, Y. Chen, and B. H. C. Cheng. An automated approach for supporting software reuse via reverse engineering. In D. F. Redmiles and B. Nuseibeh (eds.), Proc. 13th Intl. Conf. Automated Software Engineering, pp. 79–86. IEEE Comp. Soc. Press, 1998.

    Google Scholar 

  15. P. Gill, W. Murray, and M. Wright. Practical Optimization. Academic Press, 1981.

    Google Scholar 

  16. L. Hornof and T. Jim. Certifying compilation and run-time code generation. Higher-Order and Symbolic Computation, 12(4):337–375, 1999.

    Article  MATH  Google Scholar 

  17. T. Kaiser, B. Fischer, and W. Struckmann. Mops: Verifying Modula-2 programs specified in VDM-SL. In Proc. 4th Workshop Tools for System Design and Verification, pp. 163–167. 2000.

    Google Scholar 

  18. A. Kennedy. Programming Languages and Dimensions. PhD thesis, University of Cambridge, Apr. 1996. Published as UCCL TR391.

    Google Scholar 

  19. C. Kreitz. Program synthesis. In W. Bibel and P. H. Schmitt (eds.), Automated Deduction-A Basis for Applications, Vol III, pp. 105–134. Kluwer, 1998.

    Google Scholar 

  20. R. Letz, J. Schumann, S. Bayerl, and W. Bibel. SETHEO: A high-performance theorem prover. J. Automated Reasoning, 8(2):183–212, 1992.

    Article  MATH  MathSciNet  Google Scholar 

  21. M. Lowry, T. Pressburger, and G. Rosu. Certifying domain-specific policies. In M. Goedicke (eds.) Proc. 16th Intl. Conf. Automated Software Engineering, IEEE Comp. Soc. Press, 2001 Feather and Goedicke [10]}, pp. 118–125.

    Google Scholar 

  22. D. C. Luckham and N. Suzuki. Verification of array, record, and pointer operations in Pascal. ACM Trans. Programming Languages and Systems, 1(2):226–244, 1979.

    Article  MATH  Google Scholar 

  23. C. B. Moler, J. N. Little, and S. Bangert. PC-Matlab Users Guide. Cochituate Place, 24 Prime Park Way, Natick, MA, USA, 1987.

    Google Scholar 

  24. M. Moser, O. Ibens, R. Letz, J. Steinbach, C. Goller, J. Schumann, and K. Mayr. The model elimination provers SETHEO and E-SETHEO. J. Automated Reasoning, 18:237–246, 1997.

    Article  Google Scholar 

  25. M. Murphy. Octave: A free, high-level language for mathematics. Linux Journal, 39, July 1997.

    Google Scholar 

  26. G. C. Necula and P. Lee. Efficient representation and validation of logical proofs. In Proc. 13th Annual IEEE Symp. Logic in Computer Science, pp. 93–104. IEEE Comp. Soc. Press, 1998.

    Google Scholar 

  27. R. Nickson and I. J. Hayes. Supporting contexts in program refinement. Science of Computer Programming, 29(3):279–302, 1997.

    Article  MATH  Google Scholar 

  28. PolySpace technologies. http://www.polyspace.com, 2002.

  29. W. H. Press, B. P. Flannery, S. A. Teukolsky, and W. T. Vetterling. Numerical Recipes in C Cambridge Univ. Press, Cambridge, UK, 2nd. edition, 1992.

    MATH  Google Scholar 

  30. M. Rittri. Dimension inference under polymorphic recursion. In Proc. 7th Conf. Functional Programming Languages and Computer Architecture, pp. 147–159, ACM Press, 1995.

    Google Scholar 

  31. Software Considerations in Airborne Systems and Equipment Certification. Radio Technical Commission for Aeronautics, 1992.

    Google Scholar 

  32. F. B. Schneider. Enforceable security policies. Computer Science Technical Report TR98-1644, Cornell University, Computer Science Department, September 1998.

    Google Scholar 

  33. S. Schulz. System abstract: E 0.3. In H. Ganzinger (ed.), Proc. 16th Intl. Conf. Automated Deduction, Lect. Notes Artificial Intelligence 1421, pp. 297–301. Springer, 1999.

    Google Scholar 

  34. Z. Shao, C. League, and S. Monnier. Implementing typed intermediate language. In Proc. 1998 ACM SIGPLAN Intl. Conf. Functional Programming, pp. 313–323. 1998.

    Google Scholar 

  35. G. Stenz and A. Wolf. E-SETHEO: Design configuration and use of a parallel theorem prover. In N. Foo (ed.), Proc. of the 12th Australian Joint Conf. on Artificial Intelligence, Lect. Notes Artificial Intelligence 1747, pp. 231–243. Springer, 1999.

    Google Scholar 

  36. W. Visser, K. Havelund, G. Brat, and S. Park. Model checking programs. In P. Alexander and P. Flener (eds.), Proc. 15th Intl. Conf. Automated Software Engineering, pp. 3–12. IEEE Comp. Soc. Press, 2000.

    Google Scholar 

  37. W. Reif. The KIV Approach to Software Verification. In M. Broy and S. Jähnichen (eds.), KORSO: Methods, Languages and Tools for the Construction of Correct Software, Lect. Notes Comp. Sci. 1009, pp. 339–370. Springer, 1995.

    Google Scholar 

  38. C. Weidenbach, B. Gaede, and G. Rock. Spass and Flotter version 0.42. In M. A. McRobbie and J. K. Slaney (eds.), Proc. 13th Intl. Conf. Automated Deduction, Lect. Notes Artificial Intelligence 1104, pp. 141–145. Springer, 1996.

    Google Scholar 

  39. J. Whittle, J. Van Baalen, J. Schumann, P. Robinson, T. Pressburger, J. Penix, P. Oh, M. Lowry, and G. Brat. Amphion/NAV: Deductive synthesis of state estimation software. In M. Goedicke (eds.) Proc. 16th Intl. Conf. Automated Software Engineering, IEEE Comp. Soc. Press, 2001 Feather and Goedicke [10]}, pp. 395–399.

    Google Scholar 

  40. G. Winskel. The Formal Semantics of Programming Languages: An Introduction. The MIT Press, 1993.

    Google Scholar 

  41. N. Wirth. Programming in Modula-2. Springer, 4th edition, 1988.

    Google Scholar 

  42. H. Xi and F. Pfenning. Eliminating array bound checking through dependent types. In Proc. ACM Conf. on Programming Language Design and Implementation 1998, pp. 249–257. ACM Press, 1998. Published as SIGPLAN Notices 33(5).

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2002 Springer-Verlag Berlin Heidelberg

About this paper

Cite this paper

Whalen, M., Schumann, J., Fischer, B. (2002). Synthesizing Certified Code. In: Eriksson, LH., Lindsay, P.A. (eds) FME 2002:Formal Methods—Getting IT Right. FME 2002. Lecture Notes in Computer Science, vol 2391. Springer, Berlin, Heidelberg. https://doi.org/10.1007/3-540-45614-7_25

Download citation

  • DOI: https://doi.org/10.1007/3-540-45614-7_25

  • Published:

  • Publisher Name: Springer, Berlin, Heidelberg

  • Print ISBN: 978-3-540-43928-8

  • Online ISBN: 978-3-540-45614-8

  • eBook Packages: Springer Book Archive

Publish with us

Policies and ethics