Skip to main content

A Sound and Complete Bisimulation for Contextual Equivalence in \(\lambda \)-Calculus with Call/cc

  • Conference paper
  • First Online:
Programming Languages and Systems (APLAS 2016)

Part of the book series: Lecture Notes in Computer Science ((LNPSE,volume 10017))

Included in the following conference series:

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.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 39.99
Price excludes VAT (USA)
  • Available as EPUB and PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 54.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Notes

  1. 1.

    http://www.smlnj.org/doc/SMLofNJ/pages/cont.html

  2. 2.

    http://pauillac.inria.fr/~xleroy/software.html#callcc

  3. 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

  1. 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

  2. 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

    Chapter  Google Scholar 

  3. 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

    Chapter  Google Scholar 

  4. Danvy, O., Filinski, A.: Abstracting control. In: LISP and Functional Programming, pp. 151–160 (1990). http://doi.acm.org/10.1145/91556.91622

  5. 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

    Article  MathSciNet  MATH  Google Scholar 

  6. 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

    Article  MathSciNet  MATH  Google Scholar 

  7. 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

    Article  MathSciNet  MATH  Google Scholar 

  8. 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

  9. 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

  10. 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)

    Google Scholar 

  11. 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

  12. Kiselyov, O.: An argument against call/cc. http://okmij.org/ftp/continuations/against-callcc.html

  13. Koutavas, V.: Reasoning about imperative and higher-order programs. Ph.D. thesis, Northeastern University (2008)

    Google Scholar 

  14. Morris Jr., J.H.: Lambda-calculus models of programming languages. Ph.D. thesis, Massachusetts Institute of Technology (1968)

    Google Scholar 

  15. Sabry, A.: Note on axiomatizing the semantics of control operators. Technical report CIS-TR-96-03, Department of Computer Science, University of Oregon (1996)

    Google Scholar 

  16. Sabry, A., Felleisen, M.: Reasoning about programs in continuation-passing style. LISP Symb. Comput. 6(3–4), 289–360 (1993)

    Article  Google Scholar 

  17. 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)

    Google Scholar 

  18. 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

    Google Scholar 

  19. 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)

    Chapter  Google Scholar 

  20. 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)

    Google Scholar 

  21. 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)

    Google Scholar 

  22. 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)

    MathSciNet  MATH  Google Scholar 

  23. Thielecke, H.: Contrasting exceptions and continuations (2001). http://www.cs.bham.ac.uk/hxt/research/exncontjournal.pdf

Download references

Acknowledgments

We thank Oleg Kiselyov for informing us of the problem of contextual equivalence between M and MM, 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

Authors

Corresponding authors

Correspondence to Taichi Yachi or Eijiro Sumii .

Editor information

Editors and Affiliations

Rights and permissions

Reprints 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)

Publish with us

Policies and ethics