Abstract
We develop a sound and complete proof method of contextual equivalence in \(\lambda \)-calculus with the abortive control operator call/cc (as opposed to delimited control operators like \(\mathtt {shift}\) and \(\mathtt {reset}\)), and prove the non-trivial equivalence between \(\lambda f.\,f()\) and \(\lambda f.\,f();f()\) for example, both for the first time to our knowledge. Although our method is based on environmental bisimulations (Sumii et al. 2004-), it makes an essential and general change to their metatheory, which is not only necessary for handling call/cc but is also applicable in other languages with no control operator.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Notes
- 1.
- 2.
- 3.
In fact, we finished most of our proofs before discovering his unpublished manuscript [23], often reinventing essential ideas that are specific to each example.
References
Aristizábal, A., Biernacki, D., Lenglet, S., Polesiuk, P.: Environmental bisimulations for delimited-control operators with dynamic prompt generation. In: Kesner, D., Pientka, B. (eds.) 1st International Conference on Formal Structures for Computation and Deduction, FSCD 2016, 22–26 June 2016, Porto, Portugal. LIPIcs, vol. 52, pp. 9:1–9:17. Schloss Dagstuhl - Leibniz-Zentrum fuer Informatik (2016). http://dx.doi.org/10.4230/LIPIcs.FSCD.2016.9
Biernacki, D., Lenglet, S.: Normal form bisimulations for delimited-control operators. In: Schrijvers, T., Thiemann, P. (eds.) FLOPS 2012. LNCS, vol. 7294, pp. 47–61. Springer, Heidelberg (2012). doi:10.1007/978-3-642-29822-6_7
Biernacki, D., Lenglet, S.: Environmental bisimulations for delimited-control operators. In: Shan, C. (ed.) APLAS 2013. LNCS, vol. 8301, pp. 333–348. Springer, Heidelberg (2013). doi:10.1007/978-3-319-03542-0_24
Danvy, O., Filinski, A.: Abstracting control. In: LISP and Functional Programming, pp. 151–160 (1990). http://doi.acm.org/10.1145/91556.91622
Dreyer, D., Neis, G., Birkedal, L.: The impact of higher-order state and control effects on local relational reasoning. J. Funct. Program. 22(4–5), 477–528 (2012). http://dx.doi.org/10.1017/S095679681200024X
Felleisen, M., Friedman, D.P., Kohlbecker, E.E., Duba, B.F.: A syntactic theory of sequential control. Theor. Comput. Sci. 52, 205–237 (1987). http://dx.doi.org/10.1016/0304-3975(87)90109–5
Felleisen, M., Hieb, R.: The revised report on the syntactic theories of sequential control and state. Theor. Comput. Sci. 103(2), 235–271 (1992). http://dx.doi.org/10.1016/0304-3975(92)90014–7
Griffin, T.: A formulae-as-types notion of control. In: Allen, F.E. (ed.) Conference Record of the Seventeenth Annual ACM Symposium on Principles of Programming Languages, San Francisco, California, USA, January 1990, pp. 47–58. ACM Press (1990). http://doi.acm.org/10.1145/96709.96714
Hur, C., Dreyer, D., Neis, G., Vafeiadis, V.: The marriage of bisimulations and kripke logical relations. In: Field, J., Hicks, M. (eds.) Proceedings of the 39th ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages, POPL 2012, Philadelphia, Pennsylvania, USA, 22–28 January 2012, pp. 59–72. ACM (2012). http://doi.acm.org/10.1145/2103656.2103666
Hur, C.K., Neis, G., Dreyer, D., Vafeiadis, V.: A logical step forward in parametric bisimulations. Technical report MPI-SWS-2014-003, Max Planck Institute for Software Systems (2014)
Kameyama, Y., Hasegawa, M.: A sound and complete axiomatization of delimited continuations. In: Runciman, C., Shivers, O. (eds.) Proceedings of the Eighth ACM SIGPLAN International Conference on Functional Programming, ICFP 2003, Uppsala, Sweden, 25–29 August 2003, pp. 177–188. ACM (2003). http://doi.acm.org/10.1145/944705.944722
Kiselyov, O.: An argument against call/cc. http://okmij.org/ftp/continuations/against-callcc.html
Koutavas, V.: Reasoning about imperative and higher-order programs. Ph.D. thesis, Northeastern University (2008)
Morris Jr., J.H.: Lambda-calculus models of programming languages. Ph.D. thesis, Massachusetts Institute of Technology (1968)
Sabry, A.: Note on axiomatizing the semantics of control operators. Technical report CIS-TR-96-03, Department of Computer Science, University of Oregon (1996)
Sabry, A., Felleisen, M.: Reasoning about programs in continuation-passing style. LISP Symb. Comput. 6(3–4), 289–360 (1993)
Sangiorgi, D., Kobayashi, N., Sumii, E.: Environmental bisimulations for higher-order languages. In: Twenty-Second Annual IEEE Symposium on Logic in Computer Science, pp. 293–302 (2007)
Støvring, K., Lassen, S.B.: A complete, co-inductive syntactic theory of sequential control and state. In: Palsberg, J. (ed.) Semantics and Algebraic Specification, Essays Dedicated to Peter D. Mosses on the Occasion of His 60th Birthday. LNCS, vol. 5700, pp. 329–375. Springer, Heidelberg (2009). doi:10.1007/978-3-642-04164-8_17
Sumii, E.: A complete characterization of observational equivalence in polymorphic \(\lambda \)-calculus with general references. In: Grädel, E., Kahle, R. (eds.) CSL 2009. LNCS, vol. 5771, pp. 455–469. Springer, Heidelberg (2009)
Sumii, E., Pierce, B.C.: A bisimulation for dynamic sealing. In: Proceedings of the 31st ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages, pp. 161–172 (2004)
Sumii, E., Pierce, B.C.: A bisimulation for type abstraction and recursion. In: Proceedings of the 32nd ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages, pp. 63–74 (2005)
Sumii, E., Pierce, B.C.: A bisimulation for type abstraction and recursion. J. ACM 54(5–26), 1–43 (2007). Extended abstract appeared in Proceedings of the 32nd ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages, pp. 63–74 (2005)
Thielecke, H.: Contrasting exceptions and continuations (2001). http://www.cs.bham.ac.uk/hxt/research/exncontjournal.pdf
Acknowledgments
We thank Oleg Kiselyov for informing us of the problem of contextual equivalence between M and M; M, and the anonymous reviewers for useful comments. This research and the authors are partially supported by KAKENHI JP16K12409, JP15H02681, JP25540001, and JP22300005.
Author information
Authors and Affiliations
Corresponding authors
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2016 Springer International Publishing AG
About this paper
Cite this paper
Yachi, T., Sumii, E. (2016). A Sound and Complete Bisimulation for Contextual Equivalence in \(\lambda \)-Calculus with Call/cc . In: Igarashi, A. (eds) Programming Languages and Systems. APLAS 2016. Lecture Notes in Computer Science(), vol 10017. Springer, Cham. https://doi.org/10.1007/978-3-319-47958-3_10
Download citation
DOI: https://doi.org/10.1007/978-3-319-47958-3_10
Published:
Publisher Name: Springer, Cham
Print ISBN: 978-3-319-47957-6
Online ISBN: 978-3-319-47958-3
eBook Packages: Computer ScienceComputer Science (R0)