skip to main content
research-article
Open Access

Reasoning on divergent computations with coaxioms

Published:12 October 2017Publication History
Skip Abstract Section

Abstract

Coaxioms have been recently introduced to enhance the expressive power of inference systems, by supporting interpretations which are neither purely inductive, nor coinductive. This paper proposes a novel approach based on coaxioms to capture divergence in semantic definitions by allowing inductive and coinductive semantic rules to be merged together for defining a unique semantic judgment. In particular, coinduction is used to derive a special result which models divergence. In this way, divergent, terminating, and stuck computations can be properly distinguished even in semantic definitions where this is typically difficult, as in big-step style. We show how the proposed approach can be applied to several languages; in particular, we first illustrate it on the paradigmatic example of the λ-calculus, then show how it can be adopted for defining the big-step semantics of a simple imperative Java-like language. We provide proof techniques to show classical results, including equivalence with small-step semantics, and type soundness for typed versions of both languages.

References

  1. Peter Aczel. 1977. An Introduction to Inductive Definitions. In Handbook of Mathematical logic, Jon Barwise (Ed.). North Holland, 739–782. Google ScholarGoogle ScholarCross RefCross Ref
  2. Mads Sig Ager. 2004. From Natural Semantics to Abstract Machines. In Logic Based Program Synthesis and Transformation -LOPSTR 2004, Revised Selected Papers (Lecture Notes in Computer Science), Sandro Etalle (Ed.), Vol. 3573. Springer, 245–261. DOI: Google ScholarGoogle ScholarDigital LibraryDigital Library
  3. Nada Amin and Tiark Rompf. 2017. Type Soundness Proofs with Definitional Interpreters. In ACM Symp. on Principles of Programming Languages 2017, Giuseppe Castagna and Andrew D. Gordon (Eds.). ACM Press, 666–679. DOI: Google ScholarGoogle ScholarDigital LibraryDigital Library
  4. Davide Ancona. 2011. Coinductive Big-Step Operational Semantics for Type Soundness of Java-like Languages. In FTfJP’11 - Formal Techniques for Java-like Programs, Stephen N. Freund (Ed.). ACM Press, 5:1–5:6. DOI: Google ScholarGoogle ScholarDigital LibraryDigital Library
  5. Davide Ancona. 2012. Soundness of Object-Oriented Languages with Coinductive Big-Step Semantics. In ECOOP’12 -Object-Oriented Programming (Lecture Notes in Computer Science), James Noble (Ed.), Vol. 7313. Springer, 459–483. DOI: Google ScholarGoogle ScholarDigital LibraryDigital Library
  6. Davide Ancona. 2014. How to Prove Type Soundness of Java-like Languages without Forgoing Big-Step Semantics. In FTfJP’14 - Formal Techniques for Java-like Programs, David J. Pearce (Ed.). ACM Press, 1:1–1:6. DOI: Google ScholarGoogle ScholarDigital LibraryDigital Library
  7. Davide Ancona and Andrea Corradi. 2014. Sound and Complete Subtyping between Coinductive Types for Object-Oriented Languages. In ECOOP’14 - Object-Oriented Programming (Lecture Notes in Computer Science), Richard Jones (Ed.), Vol. 8586. Springer, 282–307. DOI: Google ScholarGoogle ScholarDigital LibraryDigital Library
  8. Davide Ancona, Francesco Dagnino, and Elena Zucca. 2017. Generalizing Inference Systems by Coaxioms. In ESOP 2017 -European Symposium on Programming (Lecture Notes in Computer Science), Hongseok Yang (Ed.), Vol. 10201. Springer, 29–55. DOI: Google ScholarGoogle ScholarDigital LibraryDigital Library
  9. Arthur Charguéraud. 2013. Pretty-Big-Step Semantics. In ESOP 2013 - European Symposium on Programming (Lecture Notes in Computer Science), Matthias Felleisen and Philippa Gardner (Eds.), Vol. 7792. Springer, 41–60. DOI: Google ScholarGoogle ScholarDigital LibraryDigital Library
  10. Patrick Cousot and Radhia Cousot. 1992. Inductive Definitions, Semantics and Abstract Interpretations. In ACM Symp. on Principles of Programming Languages 1992, Ravi Sethi (Ed.). ACM Press, 83–94. DOI: Google ScholarGoogle ScholarDigital LibraryDigital Library
  11. Patrick Cousot and Radhia Cousot. 2009. Bi-inductive structural semantics. Information and Computation 207, 2 (2009), 258–283. DOI: Google ScholarGoogle ScholarDigital LibraryDigital Library
  12. Nils Anders Danielsson. 2012. Operational semantics using the partiality monad. In Intl. Conf. on Functional Programming 2012, Peter Thiemann and Robby Bruce Findler (Eds.). ACM Press, 127–138. DOI: Google ScholarGoogle ScholarDigital LibraryDigital Library
  13. Sophia Drossopoulou, Susan Eisenbach, and Sarfraz Khurshid. 1999. Is the Java Type System Sound? Theory and Practice of Object Systems 5, 1 (1999), 3–24. Google ScholarGoogle ScholarDigital LibraryDigital Library
  14. Erik Ernst, Klaus Ostermann, and William R. Cook. 2006. A virtual class calculus. In ACM Symp. on Principles of Programming Languages 2006, J. Gregory Morrisett and Simon L. Peyton Jones (Eds.). ACM Press, 270–282. DOI: Google ScholarGoogle ScholarDigital LibraryDigital Library
  15. Atsushi Igarashi, Benjamin C. Pierce, and Philip Wadler. 2001. Featherweight Java: a minimal core calculus for Java and GJ. ACM Transactions on Programming Languages and Systems 23, 3 (2001), 396–450. DOI: Google ScholarGoogle ScholarDigital LibraryDigital Library
  16. Jaroslaw D. M. Kusmierek and Viviana Bono. 2010. Big-step Operational Semantics Revisited. Fundamenta Informaticae 103, 1-4 (2010), 137–172. DOI: Google ScholarGoogle ScholarCross RefCross Ref
  17. Xavier Leroy and Hervé Grall. 2009. Coinductive big-step operational semantics. Information and Computation 207, 2 (2009), 284–304. DOI: Google ScholarGoogle ScholarDigital LibraryDigital Library
  18. Robin Milner. 1978. A Theory of Type Polymorphism in Programming. J. Comput. Syst. Sci. 17, 3 (1978), 348–375. DOI: Google ScholarGoogle ScholarCross RefCross Ref
  19. Robin Milner and Mads Tofte. 1991. Co-Induction in Relational Semantics. Theoretical Computer Science 87, 1 (1991), 209–220. DOI: Google ScholarGoogle ScholarDigital LibraryDigital Library
  20. Keiko Nakata and Tarmo Uustalu. 2009. Trace-Based Coinductive Operational Semantics for While. In Theorem Proving in Higher Order Logics - TPHOLs 2009 (Lecture Notes in Computer Science), Stefan Berghofer, Tobias Nipkow, Christian Urban, and Makarius Wenzel (Eds.), Vol. 5674. Springer, 375–390. DOI: Google ScholarGoogle ScholarDigital LibraryDigital Library
  21. Keiko Nakata and Tarmo Uustalu. 2010a. A Hoare Logic for the Coinductive Trace-Based Big-Step Semantics of While. In ESOP 2010 - European Symposium on Programming (Lecture Notes in Computer Science), Andrew D. Gordon (Ed.), Vol. 6012. Springer, 488–506. DOI: Google ScholarGoogle ScholarDigital LibraryDigital Library
  22. Keiko Nakata and Tarmo Uustalu. 2010b. Resumptions, Weak Bisimilarity and Big-Step Semantics for While with Interactive I/O: An Exercise in Mixed Induction-Coinduction. In SOS’10 - Structural Operational Semantics (Electronic Proceedings in Theoretical Computer Science), Luca Aceto and Pawel Sobocinski (Eds.), Vol. 32. 57–75. DOI: Google ScholarGoogle ScholarCross RefCross Ref
  23. Johan Östlund and Tobias Wrigstad. 2010. Welterweight Java. In Objects, Models, Components, Patterns, TOOLS 2010 (Lecture Notes in Computer Science), Jan Vitek (Ed.), Vol. 6141. Springer, 97–116. DOI: Google ScholarGoogle ScholarCross RefCross Ref
  24. Scott Owens, Magnus O. Myreen, Ramana Kumar, and Yong Kiam Tan. 2016. Functional Big-Step Semantics. In ESOP 2016 -European Symposium on Programming (Lecture Notes in Computer Science), Peter Thiemann (Ed.), Vol. 9632. Springer, 589–615. DOI: Google ScholarGoogle ScholarDigital LibraryDigital Library
  25. Andrei Stefanescu, Daejun Park, Shijiao Yuwen, Yilong Li, and Grigore Rosu. 2016. Semantics-based program verifiers for all languages. In ACM SIGPLAN Conference on Object-Oriented Programming, Systems, Languages and Applications (OOPSLA 2016), Eelco Visser and Yannis Smaragdakis (Eds.). ACM Press, 74–91. DOI: Google ScholarGoogle ScholarDigital LibraryDigital Library
  26. Allen Stoughton. 1997. An Operational Semantics Framework Supporting the Incremental Construction of Derivation Trees. Electronic Notes in Theoretical Computer Science 10 (1997), 122–133. DOI: Google ScholarGoogle ScholarDigital LibraryDigital Library
  27. Andrew K. Wright and Matthias Felleisen. 1994. A Syntactic Approach to Type Soundness. Information and Computation 115, 1 (1994), 38–94. DOI: Google ScholarGoogle ScholarDigital LibraryDigital Library

Index Terms

  1. Reasoning on divergent computations with coaxioms

    Recommendations

    Comments

    Login options

    Check if you have access through your login credentials or your institution to get full access on this article.

    Sign in

    Full Access

    PDF Format

    View or Download as a PDF file.

    PDF

    eReader

    View online with eReader.

    eReader
    About Cookies On This Site

    We use cookies to ensure that we give you the best experience on our website.

    Learn more

    Got it!