Abstract
We present a sound and complete proof technique, based on syntactic logical relations, for showing contextual equivalence of expressions in a λ-calculus with recursive types and impredicative universal and existential types. Our development builds on the step-indexed PER model of recursive types presented by Appel and McAllester. We have discovered that a direct proof of transitivity of that model does not go through, leaving the “PER” status of the model in question. We show how to extend the Appel-McAllester model to obtain a logical relation that we can prove is transitive, as well as sound and complete with respect to contextual equivalence. We then augment this model to support relational reasoning in the presence of quantified types.
Step-indexed relations are indexed not just by types, but also by the number of steps available for future evaluation. This stratification is essential for handling various circularities, from recursive functions, to recursive types, to impredicative polymorphism. The resulting construction is more elementary than existing logical relations which require complex machinery such as domain theory, admissibility, syntactic minimal invariance, and ⊤ ⊤-closure.
Chapter PDF
Similar content being viewed by others
Keywords
These keywords were added by machine and not by the authors. This process is experimental and the keywords may be updated as the learning algorithm improves.
References
Plotkin, G.D.: Lambda-definability and logical relations. Memorandum SAI–RM–4. University of Edinburgh, Edinburgh, Scotland (1973)
Statman, R.: Logical relations and the typed λ-calculus. Information and Control 65(2–3), 85–97 (1985)
Pitts, A.M.: Relational properties of domains. Information and Computation 127(2), 66–90 (1996)
Tait, W.W.: Intensional interpretations of functionals of finite type i. Journal of Symbolic Logic 32(2), 198–212 (1967)
Girard, J.Y.: Interprétation Fonctionnelle et Élimination des Coupures de l’Arithm étique d’Ordre Supérieur. Thèse de doctorat d’état, Université Paris VII, Paris, France (1972)
Pitts, A.M.: Parametric polymorphism and operational equivalence. Mathematical Structures in Computer Science 10, 321–359 (2000)
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)
Crary, K., Harper, R.: Syntactic logical relations over polymorphic and recursive types. Draft (2000)
Pitts, A.M.: Typed operational reasoning. In: Pierce, B.C. (ed.) Advanced Topics in Types and Programming Languages. MIT Press, Cambridge (2005)
Birkedal, L., Harper, R.: Relational interpretations of recursive types in an operational setting. In: Ito, T., Abadi, M. (eds.) TACS 1997. LNCS, vol. 1281. Springer, Heidelberg (1997)
Melliès, P.A., Vouillon, J.: Semantic types: A fresh look at the ideal model for types. In: POPL, Venice, Italy (2004)
Melliès, P.A., Vouillon, J.: Recursive polymorphic types and parametricity in an operational framework. In: LICS, Chicago, Illinois (2005)
Appel, A.W., McAllester, D.: An indexed model of recursive types for foundational proof-carrying code. ACM TOPLAS 23(5), 657–683 (2001)
Ahmed, A., Appel, A.W., Virga, R.: An indexed model of impredicative polymorphism and mutable references (2003), Available at http://www.cs.princeton.edu/~appel/papers/impred.pdf
Ahmed, A.J.: Semantics of Types for Mutable State. PhD thesis, Princeton University (2004)
Ahmed, A.: Step-indexed syntactic logical relations for recursive and quantified types. Technical Report TR-01-06, Harvard University (2006)
Pierce, B.C.: Types and Programming Languages. MIT Press, Cambridge (2002)
Mason, I.A., Talcott, C.L.: Equivalence in functional languages with effects. Journal of Functional Programming 1(3), 287–327 (1991)
Sumii, E., Pierce, B.C.: A bisimulation for type abstraction and recursion. In: POPL, Long Beach, California, pp. 63–74 (2005)
MacQueen, D., Plotkin, G., Sethi, R.: An ideal model for recursive polymorphic types. Information and Computation 71(1/2), 95–130 (1986)
Wadler, P.: Theorems for free! In: ACM Symposium on Functional Programming Languages and Computer Architecture (FPCA), London (1989)
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
Ahmed, A. (2006). Step-Indexed Syntactic Logical Relations for Recursive and Quantified Types. In: Sestoft, P. (eds) Programming Languages and Systems. ESOP 2006. Lecture Notes in Computer Science, vol 3924. Springer, Berlin, Heidelberg. https://doi.org/10.1007/11693024_6
Download citation
DOI: https://doi.org/10.1007/11693024_6
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-540-33095-0
Online ISBN: 978-3-540-33096-7
eBook Packages: Computer ScienceComputer Science (R0)