Abstract
The paper proposes a variation of simulation for checking and proving contextual equivalence in a non-deterministic call-by-need lambda-calculus with constructors, case, seq, and a letrec with cyclic dependencies. It also proposes a novel method to prove its correctness. The calculus’ semantics is based on a small-step rewrite semantics and on may-convergence. The cyclic nature of letrec bindings, as well as non-determinism, makes known approaches to prove that simulation implies contextual preorder, such as Howe’s proof technique, inapplicable in this setting. The basic technique for the simulation as well as the correctness proof is called pre-evaluation, which computes a set of answers for every closed expression. If simulation succeeds in finite computation depth, then it is guaranteed to show contextual preorder of expressions.
This is a preview of subscription content, log in via an institution.
Buying options
Tax calculation will be finalised at checkout
Purchases are for personal use only
Learn about institutional subscriptionsPreview
Unable to display preview. Download preview PDF.
References
Ariola, Z.M., Blom, S.: Skew confluence and the lambda calculus with letrec. Annals of Pure and Applied Logic 117, 95–168 (2002)
Abramsky, S.: The lazy lambda calculus. In: Turner, D.A. (ed.) Research Topics in Functional Programming, pp. 65–116. Addison-Wesley, Reading (1990)
Ariola, Z.M., Klop, J.W.: Lambda calculus with explicit recursion. Inform. and Comput. 139(2), 154–233 (1997)
Ariola, Z.M., Klop, J.W.: Equational term graph rewriting. Fundamentae Informaticae 26(3,4), 207–240 (1996)
Gordon, A.D.: Bisimilarity as a theory of functional programming. Theoret. Comput. Sci. 228(1-2), 5–47 (1999)
Hanus, M.: A unified computation model for functional and logic programming. In: POPL 1997, pp. 80–93. ACM, New York (1996)
Howe, D.: Equality in lazy computation systems. In: 4th IEEE Symp. on Logic in Computer Science, pp. 198–203 (1989)
Howe, D.: Proving congruence of bisimulation in functional programming languages. Inform. and Comput. 124(2), 103–112 (1996)
Kutzner, A., Schmidt-Schauß, M.: A nondeterministic call-by-need lambda calculus. In: ICFP 1998, pp. 324–335. ACM Press, New York (1998)
Machkasova, E.: Computational Soundness of Non-Confluent Calculi with Applications to Modules and Linking. PhD thesis, Boston University (2002)
Machkasova, E.: Computational soundness of a call by name calculus of recursively-scoped records. In: 7th WRS. ENTCS (2007)
Mann, M.: Congruence of bisimulation in a non-deterministic call-by-need lambda calculus. In: SOS 2004, BRICS NS-04-1, pp. 20–38 (2004)
Moran, A.K.D., Sands, D., Carlsson, M.: Erratic fudgets: A semantic theory for an embedded coordination language. In: Ciancarini, P., Wolf, A.L. (eds.) COORDINATION 1999. LNCS, vol. 1594, pp. 85–102. Springer, Heidelberg (1999)
Machkasova, E., Turbak, F.A.: A calculus for link-time compilation. In: Smolka, G. (ed.) ESOP 2000 and ETAPS 2000. LNCS, vol. 1782, pp. 260–274. Springer, Heidelberg (2000)
Jones, S.P.: Haskell 98 language and libraries: the Revised Report. Cambridge University Press, Cambridge (2003), http://www.haskell.org
Peyton Jones, S., Gordon, A., Finne, S.: Concurrent Haskell. In: Proc. 23th Principles of Programming Languages (1996)
Plotkin, G.D.: Call-by-name, call-by-value, and the lambda-calculus. Theoret. Comput. Sci. 1, 125–159 (1975)
Schmidt-Schauß, M., Mann, M.: On equivalences and standardization in a non-deterministic call-by-need lambda calculus. Frank report 31, Inst. f. Informatik, J.W.Goethe-University, Frankfurt (August 2007)
Schmidt-Schauß, M., Machkasova, E.: A finite simulation method in a non-deterministic call-by-need calculus with letrec, constructors and case. Frank 32, Inst. f. Informatik, J.W.Goethe-University, Frankfurt (2008)
Sabel, D., Schmidt-Schauß, M.: A call-by-need lambda-calculus with locally bottom-avoiding choice: Context lemma and correctness of transformations. Math. Structures Comput. Sci (accepted for publication, 2007)
Schmidt-Schauß, M., Sabel, D.: On generic context lemmas for lambda calculi with sharing. Frank 27, Inst. Informatik, J.W.G-Univ., Frankfurt (2007)
Schmidt-Schauß, M., Schütz, M., Sabel, D.: On the safety of Nöcker’s strictness analysis. Frank 19, Inst. Informatik, J.W.G-Univ., Frankfurt (2004)
Schmidt-Schauß, M., Schütz, M., Sabel, D.: Safety of Nöcker’s strictness analysis. J. Funct. Programming (accepted for publication, 2008)
Wells, J.B., Plump, D., Kamareddine, F.: Diagrams for meaning preservation. In: Nieuwenhuis, R. (ed.) RTA 2003. LNCS, vol. 2706, pp. 88–106. Springer, Heidelberg (2003)
Author information
Authors and Affiliations
Editor information
Rights and permissions
Copyright information
© 2008 Springer-Verlag Berlin Heidelberg
About this paper
Cite this paper
Schmidt-Schauss, M., Machkasova, E. (2008). A Finite Simulation Method in a Non-deterministic Call-by-Need Lambda-Calculus with Letrec, Constructors, and Case. In: Voronkov, A. (eds) Rewriting Techniques and Applications. RTA 2008. Lecture Notes in Computer Science, vol 5117. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-540-70590-1_22
Download citation
DOI: https://doi.org/10.1007/978-3-540-70590-1_22
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-540-70588-8
Online ISBN: 978-3-540-70590-1
eBook Packages: Computer ScienceComputer Science (R0)