Skip to main content

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

  • 310 Accesses

Abstract

In the implementation of procedures, developers often assume that the input satisfies certain properties; for example, binary search assumes the array to be sorted. Such requirements on the input can be formally expressed as preconditions of procedures. If a second-order procedure p (e.g., map or ffoldl) is called with a first-order procedure f that has a precondition, the question arises whether p will call f only with arguments that satisfy the precondition of f. In this paper, we propose a method to statically analyze if all procedure calls in a given second-order program satisfy the respective preconditions. In particular, we consider indirect calls of procedures that are passed as an argument to a second-order procedure.

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

Access this chapter

eBook
USD 16.99
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 16.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. Aderhold, M.: Verification of Second-Order Functional Programs. Doctoral dissertation, TU Darmstadt (2009)

    Google Scholar 

  2. Aderhold, M.: Automated synthesis of induction axioms for programs with second-order recursion. In: Giesl, J., Hähnle, R. (eds.) IJCAR 2010. LNCS (LNAI), vol. 6173, pp. 263–277. Springer, Heidelberg (2010)

    Google Scholar 

  3. Andrews, P.B.: An Introduction to Mathematical Logic and Type Theory: To Truth Through Proof. Kluwer Academic Publishers, Dordrecht (2002)

    Book  MATH  Google Scholar 

  4. Barnett, M., Leino, K.R.M., Schulte, W.: The Spec# programming system: An overview. In: Barthe, G., Burdy, L., Huisman, M., Lanet, J.-L., Muntean, T. (eds.) CASSIS 2004. LNCS, vol. 3362, pp. 49–69. Springer, Heidelberg (2005)

    Chapter  Google Scholar 

  5. Boyer, R.S., Goldschlag, D.M., Kaufmann, M., Moore, J.S.: Functional instantiation in first-order logic. In: Lifschitz, V. (ed.) Papers in Honor of John McCarthy, pp. 7–26. Academic Press, London (1991)

    Google Scholar 

  6. Gries, D., Schneider, F.B.: Avoiding the undefined by underspecification. In: van Leeuwen, J. (ed.) Computer Science Today: Recent Trends and Developments. LNCS, vol. 1000, pp. 366–373. Springer, Heidelberg (1995)

    Chapter  Google Scholar 

  7. Hunt Jr., W.A., Kaufmann, M., Krug, R.B.: Meta reasoning in ACL2. In: Hurd, J., Melham, T. (eds.) TPHOLS 2005. LNCS, vol. 3603, pp. 163–178. Springer, Heidelberg (2005)

    Chapter  Google Scholar 

  8. Kaufmann, M., Manolios, P., Moore, J.S.: Computer-Aided Reasoning: An Approach. Kluwer Academic Publishers, Dordrecht (2000)

    Google Scholar 

  9. Meyer, B.: Eiffel: The Language. Prentice Hall International, London (1992)

    MATH  Google Scholar 

  10. Nipkow, T., Paulson, L.C., Wenzel, M.: Isabelle/HOL — A Proof Assistant for Higher-Order Logic, Springer, Heidelberg (June 2010)

    MATH  Google Scholar 

  11. Owre, S., Shankar, N., Rushby, J.M., Stringer-Calvert, D.W.J.: PVS Language Reference, Computer Science Laboratory, SRI International (November 2001)

    Google Scholar 

  12. Peyton Jones, S. (ed.): Haskell 98 Language and Libraries: The Revised Report. Cambridge University Press (2003)

    Google Scholar 

  13. Sabel, D., Schmidt-Schauß, M.: Reconstruction of a logic for inductive proofs of properties of functional programs. Frank report 39, J. W. Goethe-Universität, Frankfurt am Main, Germany (June 2010)

    Google Scholar 

  14. Schlosser, A., Walther, C., Gonder, M., Aderhold, M.: Context dependent procedures and computed types in \({\checkmark}\)eriFun. In: Proc. of 1st Workshop Programming Languages meet Program Verification. ENTCS, vol. 174, pp. 61–78 (2007)

    Google Scholar 

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

    Book  Google Scholar 

  16. Walther, C., Aderhold, M., Schlosser, A.: The \(\mathcal{L}\) 1.0 Primer. Technical Report VFR 06/01, TU Darmstadt (2006)

    Google Scholar 

  17. Walther, C., Schweitzer, S.: About \({\checkmark}\)eriFun. In: Baader, F. (ed.) CADE 2003. LNCS (LNAI), vol. 2741, pp. 322–327. Springer, Heidelberg (2003)

    Chapter  Google Scholar 

  18. Walther, C., Schweitzer, S.: Verification in the classroom. Journal of Automated Reasoning 32(1), 35–73 (2004)

    Article  Google Scholar 

  19. Walther, C., Schweitzer, S.: Reasoning about incompletely defined programs. In: Sutcliffe, G., Voronkov, A. (eds.) LPAR 2005. LNCS (LNAI), vol. 3835, pp. 427–442. Springer, Heidelberg (2005)

    Chapter  Google Scholar 

  20. Xu, D.N., Peyton Jones, S., Claessen, K.: Static contract checking for Haskell. In: Proceedings of the 36th ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages (POPL), pp. 41–52. ACM, New York (2009)

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2010 Springer-Verlag Berlin Heidelberg

About this chapter

Cite this chapter

Aderhold, M. (2010). Second-Order Programs with Preconditions. In: Siegler, S., Wasser, N. (eds) Verification, Induction, Termination Analysis. Lecture Notes in Computer Science(), vol 6463. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-642-17172-7_8

Download citation

  • DOI: https://doi.org/10.1007/978-3-642-17172-7_8

  • Publisher Name: Springer, Berlin, Heidelberg

  • Print ISBN: 978-3-642-17171-0

  • Online ISBN: 978-3-642-17172-7

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics