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.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Preview
Unable to display preview. Download preview PDF.
Similar content being viewed by others
References
Augustsson, L.: Putting Curry-Howard to work (Invited talk). At Approaches and Applications of Inductive Programming (2009)
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)
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)
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)
Dyckhoff, R.: Contraction-free sequent calculi for intuitionistic logic. Journal of Symbolic Logic 57(3), 795–807 (1992)
Holdermans, S., Hage, J.: Making “stricterness” more relevant. In: Proceedings of Partial Evaluation and Program Manipulation, pp. 121–130. ACM Press, New York (2010)
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)
Johann, P., Voigtländer, J.: The impact of seq on free theorems-based program transformations. Fundamenta Informaticae 69(1–2), 63–102 (2006)
Lakatos, I.: Proofs and Refutations: The Logic of Mathematical Discovery. Cambridge University Press, Cambridge (1976)
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)
Reynolds, J.C.: Towards a theory of type structure. In: Robinet, B. (ed.) Programming Symposium. LNCS, vol. 19, pp. 408–423. Springer, Heidelberg (1974)
Reynolds, J.C.: Types, abstraction and parametric polymorphism. In: Proceedings of Information Processing, pp. 513–523. Elsevier, Amsterdam (1983)
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
Seidel, D., Voigtländer, J.: Taming selective strictness. In: Proceedings of Arbeitstagung Programmiersprachen. LNI, vol. 154, pp. 2916–2930. GI (2009)
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)
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)
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)
Voigtländer, J.: Bidirectionalization for free! In: Proceedings of Principles of Programming Languages, pp. 165–176. ACM Press, New York (2009)
Wadler, P.: Theorems for free! In: Proceedings of Functional Programming Languages and Computer Architecture, pp. 347–359. ACM Press, New York (1989)
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)
Author information
Authors and Affiliations
Editor information
Editors and Affiliations
Rights 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)