Skip to main content
Springer Nature - PMC COVID-19 Collection logoLink to Springer Nature - PMC COVID-19 Collection
. 2021 Mar 23;12648:348–374. doi: 10.1007/978-3-030-72019-3_13

Complete trace models of state and control

Guilhem Jaber 9,, Andrzej S Murawski 10,
Editor: Nobuko Yoshida1
PMCID: PMC7984571

Abstract

We consider a hierarchy of four typed call-by-value languages with either higher-order or ground-type references and with either call/cc or no control operator.

Our first result is a fully abstract trace model for the most expressive setting, featuring both higher-order references and call/cc, constructed in the spirit of operational game semantics. Next we examine the impact of suppressing higher-order references and callcc in contexts and provide an operational explanation for the game-semantic conditions known as visibility and bracketing respectively. This allows us to refine the original model to provide fully abstract trace models of interaction with contexts that need not use higher-order references or call/cc. Along the way, we discuss the relationship between error- and termination-based contextual testing in each case, and relate the two to trace and complete trace equivalence respectively.

Overall, the paper provides a systematic development of operational game semantics for all four cases, which represent the state-based face of the so-called semantic cube.

Keywords: contextual equivalence, operational game semantics, higher-order references, control operators

Footnotes

The full version is available at https://hal.archives-ouvertes.fr/hal-03116698.

Contributor Information

Nobuko Yoshida, Email: tenko.yoshida@gmail.com.

Guilhem Jaber, Email: guilhem.jaber@univ-nantes.fr.

Andrzej S. Murawski, Email: andrzej.murawski@cs.ox.ac.uk

References

  • 1.Abramsky, S.: Games in the semantics of programming languages. In: Proceedings of the 11th Amsterdam Colloquium. pp. 1–6. ILLC, Dept. of Philosophy, University of Amsterdam (1997)
  • 2.Abramsky, S., Jagadeesan, R., Malacaria, P.: Full abstraction for PCF. Information and Computation 163, 409–470 (2000)
  • 3.Abramsky, S., McCusker, G.: Call-by-value games. In: Proceedings of CSL. Lecture Notes in Computer Science, vol. 1414, pp. 1–17. Springer-Verlag (1997)
  • 4.Ahmed, A., Dreyer, D., Rossberg, A.: State-dependent representation independence. In: Proceedings of POPL. pp. 340–353. ACM (2009)
  • 5.Aristizabal, A., Biernacki, D., Lenglet, S., Polesiuk, P.: Environmental Bisimulations for Delimited-Control Operators with Dynamic Prompt Generation. Logical Methods in Computer Science 13(3) (2017)
  • 6.Biernacki, D., Lenglet, S.: Environmental bisimulations for delimited-control operators. In: Proceedings of APLAS. Lecture Notes in Computer Science, vol. 8301, pp. 333–348. Springer (2013)
  • 7.Biernacki, D., Lenglet, S., Polesiuk, P.: A complete normal-form bisimilarity for state. In: Proceedings of FOSSACS. Lecture Notes in Computer Science, vol. 11425, pp. 98–114. Springer (2019)
  • 8.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)
  • 9.Ghica, D.R., Tzevelekos, N.: A system-level game semantics. Electr. Notes Theor. Comput. Sci. 286, 191–211 (2012)
  • 10.Honsell, F., Mason, I.A., Smith, S.F., Talcott, C.L.: A variable typed logic of effects. Inf. Comput. 119(1), 55–90 (1995)
  • 11.Hur, C.K., Dreyer, D., Neis, G., Vafeiadis, V.: The marriage of bisimulations and kripke logical relations. In: Proceedings of POPL. pp. 59–72. ACM (2012)
  • 12.Hyland, J.M.E., Ong, C.H.L.: On Full Abstraction for PCF: I. Models, observables and the full abstraction problem, II. Dialogue games and innocent strategies, III. A fully abstract and universal game model. Information and Computation 163(2), 285–408 (2000)
  • 13.Jaber, G.: Operational nominal game semantics. In: Proceedings of FOSSACS. Lecture Notes in Computer Science, vol. 9034, pp. 264–278 (2015)
  • 14.Jaber, G., Tabareau, N.: Kripke open bisimulation - A marriage of game semantics and operational techniques. In: Proceedings of APLAS. Lecture Notes in Computer Science, vol. 9458, pp. 271–291 (2015)
  • 15.Jaber, G., Tzevelekos, N.: Trace semantics for polymorphic references. In: Proceedings of LICS. pp. 585–594. ACM (2016)
  • 16.Jagadeesan, R., Pitcher, C., Riely, J.: Open bisimulation for aspects. In: Proceedings of AOSD. ACM International Conference Proceeding Series, vol. 208, pp. 107–120 (2007)
  • 17.Jeffrey, A., Rathke, J.: Towards a theory of bisimulation for local names. In: Proceedings of LICS. pp. 56–66 (1999)
  • 18.Jeffrey, A., Rathke, J.: A fully abstract may testing semantics for concurrent objects. Theor. Comput. Sci. 338(1-3), 17–63 (2005)
  • 19.Koutavas, V., Wand, M.: Small bisimulations for reasoning about higher-order imperative programs. In: Proceedings of POPL. pp. 141–152. ACM (2006)
  • 20.Lago, U.D., Gavazzo, F.: Effectful normal form bisimulation. In: Proceedings of ESOP. Lecture Notes in Computer Science, vol. 11423, pp. 263–292. Springer (2019)
  • 21.Lago, U.D., Gavazzo, F., Levy, P.B.: Effectful applicative bisimilarity: Monads, relators, and howe’s method. In: Proceedings of LICS. IEEE Press (2017)
  • 22.Laird, J.: Full abstraction for functional languages with control. In: Proceedings of 12th IEEE Symposium on Logic in Computer Science. pp. 58–67 (1997)
  • 23.Laird, J.: A fully abstract trace semantics for general references. In: Proceedings of ICALP, Lecture Notes in Computer Science, vol. 4596, pp. 667–679. Springer (2007)
  • 24.Lassen, S.B., Levy, P.B.: Typed normal form bisimulation. In: Proceedings of CSL, Lecture Notes in Computer Science, vol. 4646, pp. 283–297. Springer (2007)
  • 25.Levy, P.B., Staton, S.: Transition systems over games. In: Proceedings of CSL-LICS. pp. 64:1–64:10 (2014)
  • 26.Milner, R.: Fully abstract models of typed lambda-calculi. Theoretical Computer Science 4(1), 1–22 (1977)
  • 27.Murawski, A.S., Tzevelekos, N.: Game semantics for good general references. In: Proceedings of LICS. pp. 75–84. IEEE Computer Society Press (2011)
  • 28.Pitts, A.M., Stark, I.D.B.: Operational reasoning for functions with local state. In: Gordon, A.D., Pitts, A.M. (eds.) Higher-Order Operational Techniques in Semantics, pp. 227–273. Cambridge University Press (1998)
  • 29.Sangiorgi, D.: Expressing mobility in process algebras: First-order and higher-order paradigms. Tech. Rep. CST-99-93, University of Edinburgh (1993), PhD thesis
  • 30.Sangiorgi, D., Kobayashi, N., Sumii, E.: Environmental bisimulations for higher-order languages. ACM Trans. Program. Lang. Syst. 33(1), 5 (2011)
  • 31.Støvring, K., Lassen, S.B.: A complete, co-inductive syntactic theory of sequential control and state. In: POPL. pp. 161–172. ACM (2007)
  • 32.Sumii, E.: A complete characterization of observational equivalence in polymorphic lambda-calculus with general references. In: Proceedings of CSL. Lecture Notes in Computer Science, vol. 5771, pp. 455–469. Springer (2009)
  • 33.Talcott, C.L.: Reasoning about functions with effects. In: Gordon, A.D., Pitts, A.M. (eds.) Higher-Order Operational Techniques in Semantics, pp. 347–390. Cambridge University Press (1998)
  • 34.Yachi, T., Sumii, E.: A sound and complete bisimulation for contextual equivalence in λ-calculus with call/cc. In: Proceedings of APLAS. pp. 171–186. Springer (2016)

Articles from Programming Languages and Systems are provided here courtesy of Nature Publishing Group

RESOURCES