Abstract
In programs written in lazy functional languages such as for example Clean and Haskell, the programmer can choose freely whether particular subexpressions will be evaluated lazily (the default) or strictly (must be specified explicitly). It is widely known that this choice affects resource consumption, termination and semantics in several ways. However, functional programmers tend to be less aware of the consequences for logical program properties and formal reasoning.
This paper aims to give a better understanding of the concept of explicit strictness and its impact on properties and reasoning. It will be shown that explicit strictness may make reasoning more cumbersome, due to the introduction of additional definedness conditions.
Fortunately, these definedness conditions can be handled quite effectively by proof assistants. This paper describes the specific support that is offered by Sparkle for expressing and proving definedness conditions. This support makes reasoning with explicit strictness almost appear like reasoning without explicit strictness. To our knowledge, Sparkle is currently the only proof assistant with such strictness specific support.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Preview
Unable to display preview. Download preview PDF.
References
Abel, A., Benke, M., Bove, A., Hughes, J., Norell, U.: Verifying Haskell programs using constructive type theory. In: Leijen, D. (ed.) Proceedings of the ACM SIGPLAN 2005 Haskell Workshop, Tallinn, Estonia, pp. 62–74. ACM Press, New York (2005)
Baker-Finch, C., King, D., Trinder, P.: An operational semantics for parallel lazy evaluation. In: ACM-SIGPLAN International Conference on Functional Programming (ICFP 2000), Montreal, Canada, pp. 162–173 (2000)
Barendregt, H.P., van Eekelen, M.C.J.D., Glauert, J.R.W., Kennaway, R., Plasmeijer, M.J., Sleep, M.R.: Term graph rewriting. In: de Bakker, J.W., Nijman, A.J., Treleaven, P.C. (eds.) PARLE 1987. LNCS, vol. 259, pp. 141–158. Springer, Heidelberg (1987)
Burn, G.L.: Evaluation transformers – a model for the parallel evolution of functional languages. In: Kahn, G. (ed.) FPCA 1987. LNCS, vol. 274, pp. 446–470. Springer, Heidelberg (1987)
Danielsson, N.A., Jansson, P.: Chasing bottoms: A case study in program verification in the presence of partial and infinite values. In: Kozen, D. (ed.) MPC 2004. LNCS, vol. 3125, pp. 85–109. Springer, Heidelberg (2004)
de Mol, M., van Eekelen, M., Plasmeijer, R.: Theorem proving for functional programmers. In: Arts, T., Mohnen, M. (eds.) IFL 2002. LNCS, vol. 2312, pp. 55–72. Springer, Heidelberg (2002)
Dowse, M., Butterfield, A., van Eekelen, M.: A language for reasoning about concurrent functional i/o. In: Arts, T., Mohnen, M. (eds.) Selected Papers from the 16th International Workshop on Implementation and Application of Functional Languages, IFL 2004, Lübeck, Germany, LNCS, vol. 3074, pp. 177–195. Springer, Heidelberg (2004)
Gustavsson, J., Sands, D.: Possibilities and limitations of call-by-need space improvement. In: Proceedings of the sixth ACM SIGPLAN International Conference on Functional Programming, pp. 265–276. ACM Press, New York (2001)
Johann, P., Voigtländer, J.: Free theorems in the presence of seq. In: Proceedings of the 31st ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages, Venice, Italy, pp. 99–110 (2004)
van Kesteren, R., van Eekelen, M., de Mol, M.: Proof Support for General Type Classes. In: Intellect 2004 (to appear, 2004)
Koopman, P., Alimarine, A., Tretmans, J., Plasmeijer, R.: Gast: Generic automated software testing. In: Peña, R., Arts, T. (eds.) IFL 2002. LNCS, vol. 2670, pp. 84–100. Springer, Heidelberg (2003)
Launchbury, J.: A natural semantics for lazy evaluation. In: Proceedings of the 20th Annual ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages, Charleston, South Carolina, pp. 144–154 (1993)
Pitts, A.M.: Existential types: Logical relations and operational equivalence. In: Larsen, K.G., Skyum, S., Winskel, G. (eds.) ICALP 1998. LNCS, vol. 1443, pp. 309–326. Springer, Heidelberg (1998)
Plasmeijer, R., van Eekelen, M.: Functional Programming and Parallel Graph Rewriting (1993), ISBN 0-201-41663-8
Sestoft, P.: Deriving a lazy abstract machine. Journal of Functional Programming 7(3), 231–264 (1997)
Tejfel, M., Horváth, Z., Kozsik, T.: Extending the sparkle core language with object abstraction. Acta Cybernetica 17(2) (2005)
Trinder, P.W., Hammond, K., Loidl, H.-W., Jones, S.L.P.: Algorithm + strategy = parallelism. J. Funct. Program. 8(1), 23–60 (1998)
Author information
Authors and Affiliations
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2006 Springer-Verlag Berlin Heidelberg
About this paper
Cite this paper
van Eekelen, M., de Mol, M. (2006). Proof Tool Support for Explicit Strictness. In: Butterfield, A., Grelck, C., Huch, F. (eds) Implementation and Application of Functional Languages. IFL 2005. Lecture Notes in Computer Science, vol 4015. Springer, Berlin, Heidelberg. https://doi.org/10.1007/11964681_3
Download citation
DOI: https://doi.org/10.1007/11964681_3
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-540-69174-7
Online ISBN: 978-3-540-69175-4
eBook Packages: Computer ScienceComputer Science (R0)