Skip to main content

Automatically Generating Counterexamples to Naive Free Theorems

  • Conference paper
Functional and Logic Programming (FLOPS 2010)

Part of the book series: Lecture Notes in Computer Science ((LNTCS,volume 6009))

Included in the following conference series:

Abstract

Disproof can be as important as proof in studying programs and programming languages. In particular, side conditions in a statement about program behavior are sometimes best understood and explored by trying to exhibit a falsifying example in the absence of a condition in question. Automation is as desirable for such falsification as it is for verification. We develop formal and implemented tools for counterexample generation in the context of free theorems, i.e., statements derived from polymorphic types à la relational parametricity. The machinery we use is rooted in constraining the type system and in intuitionistic proof search.

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. Augustsson, L.: Putting Curry-Howard to work (Invited talk). At Approaches and Applications of Inductive Programming (2009)

    Google Scholar 

  2. Christiansen, J., Seidel, D., Voigtländer, J.: Free theorems for functional logic programs. In: Proceedings of Programming Languages meets Program Verification, pp. 39–48. ACM Press, New York (2010)

    Google Scholar 

  3. Claessen, K., Hughes, R.J.M.: QuickCheck: A lightweight tool for random testing of Haskell programs. In: Proceedings of International Conference on Functional Programming, pp. 268–279. ACM Press, New York (2000)

    Google Scholar 

  4. Corbineau, P.: First-order reasoning in the calculus of inductive constructions. In: Berardi, S., Coppo, M., Damiani, F. (eds.) TYPES 2003. LNCS, vol. 3085, pp. 162–177. Springer, Heidelberg (2004)

    Google Scholar 

  5. Dyckhoff, R.: Contraction-free sequent calculi for intuitionistic logic. Journal of Symbolic Logic 57(3), 795–807 (1992)

    Article  MATH  MathSciNet  Google Scholar 

  6. Holdermans, S., Hage, J.: Making “stricterness” more relevant. In: Proceedings of Partial Evaluation and Program Manipulation, pp. 121–130. ACM Press, New York (2010)

    Chapter  Google Scholar 

  7. Johann, P., Voigtländer, J.: Free theorems in the presence of seq. In: Proceedings of Principles of Programming Languages, pp. 99–110. ACM Press, New York (2004)

    Google Scholar 

  8. Johann, P., Voigtländer, J.: The impact of seq on free theorems-based program transformations. Fundamenta Informaticae 69(1–2), 63–102 (2006)

    MATH  MathSciNet  Google Scholar 

  9. Lakatos, I.: Proofs and Refutations: The Logic of Mathematical Discovery. Cambridge University Press, Cambridge (1976)

    MATH  Google Scholar 

  10. Launchbury, J., Paterson, R.: Parametricity and unboxing with unpointed types. In: Riis Nielson, H. (ed.) ESOP 1996. LNCS, vol. 1058, pp. 204–218. Springer, Heidelberg (1996)

    Google Scholar 

  11. Reynolds, J.C.: Towards a theory of type structure. In: Robinet, B. (ed.) Programming Symposium. LNCS, vol. 19, pp. 408–423. Springer, Heidelberg (1974)

    Google Scholar 

  12. Reynolds, J.C.: Types, abstraction and parametric polymorphism. In: Proceedings of Information Processing, pp. 513–523. Elsevier, Amsterdam (1983)

    Google Scholar 

  13. Seidel, D., Voigtländer, J.: Automatically generating counterexamples to naive free theorems. Technical Report TUD-FI09-05, Technische Universität Dresden (2009), http://www.iai.uni-bonn.de/~jv/TUD-FI09-05.pdf

  14. Seidel, D., Voigtländer, J.: Taming selective strictness. In: Proceedings of Arbeitstagung Programmiersprachen. LNI, vol. 154, pp. 2916–2930. GI (2009)

    Google Scholar 

  15. Stenger, F., Voigtländer, J.: Parametricity for Haskell with imprecise error semantics. In: Curien, P.-L. (ed.) TLCA 2009. LNCS, vol. 5608, pp. 294–308. Springer, Heidelberg (2009)

    Chapter  Google Scholar 

  16. Voigtländer, J.: Much ado about two: A pearl on parallel prefix computation. In: Proceedings of Principles of Programming Languages, pp. 29–35. ACM Press, New York (2008)

    Google Scholar 

  17. Voigtländer, J.: Semantics and pragmatics of new shortcut fusion rules. In: Garrigue, J., Hermenegildo, M.V. (eds.) FLOPS 2008. LNCS, vol. 4989, pp. 163–179. Springer, Heidelberg (2008)

    Chapter  Google Scholar 

  18. Voigtländer, J.: Bidirectionalization for free! In: Proceedings of Principles of Programming Languages, pp. 165–176. ACM Press, New York (2009)

    Google Scholar 

  19. Wadler, P.: Theorems for free! In: Proceedings of Functional Programming Languages and Computer Architecture, pp. 347–359. ACM Press, New York (1989)

    Google Scholar 

  20. Wright, D.A.: A new technique for strictness analysis. In: Abramsky, S., Maibaum, T. (eds.) TAPSOFT 1991. LNCS, vol. 494, pp. 235–258. Springer, Heidelberg (1991)

    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 paper

Cite this paper

Seidel, D., Voigtländer, J. (2010). Automatically Generating Counterexamples to Naive Free Theorems. In: Blume, M., Kobayashi, N., Vidal, G. (eds) Functional and Logic Programming. FLOPS 2010. Lecture Notes in Computer Science, vol 6009. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-642-12251-4_14

Download citation

  • DOI: https://doi.org/10.1007/978-3-642-12251-4_14

  • Publisher Name: Springer, Berlin, Heidelberg

  • Print ISBN: 978-3-642-12250-7

  • Online ISBN: 978-3-642-12251-4

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics