skip to main content
research-article
Open Access
Artifacts Available
Artifacts Evaluated & Functional

SyTeCi: automating contextual equivalence for higher-order programs with references

Published:20 December 2019Publication History
Related Artifact: Prototype of SyTeCi software https://doi.org/10.1145/3373111
Skip Abstract Section

Abstract

We propose a framework to study contextual equivalence of programs written in a call-by-value functional language with local integer references. It reduces the problem of contextual equivalence to the problem of non-reachability in a transition system of memory configurations. This reduction is complete for recursion-free programs.

Restricting to programs that do not allocate references inside the body of functions, we encode this non-reachability problem as a set of constrained Horn clause that can then be checked for satisfiability automatically. Restricting furthermore to a language with finite data-types, we also get a new decidability result for contextual equivalence at any type.

Skip Supplemental Material Section

Supplemental Material

a59-jaber.webm

References

  1. Amal Ahmed, Derek Dreyer, and Andreas Rossberg. 2009. State-dependent Representation Independence. In Proceedings of the 36th ACM Symposium on Principles of Programming Languages (POPL ’09). ACM, New York, 14.Google ScholarGoogle ScholarDigital LibraryDigital Library
  2. Anindya Banerjee and David A. Naumann. 2005. Ownership Confinement Ensures Representation Independence for Object-oriented Programs. J. ACM 52, 6 (2005), 894–960. Google ScholarGoogle ScholarDigital LibraryDigital Library
  3. Nikolaj Bjørner, Arie Gurfinkel, Ken McMillan, and Andrey Rybalchenko. 2015. Horn clause solvers for program verification. In Fields of Logic and Computation II. Springer, 24–51.Google ScholarGoogle Scholar
  4. Nikolaj Bjørner, Ken McMillan, and Andrey Rybalchenko. 2013. On solving universally quantified horn clauses. In International Static Analysis Symposium. Springer, 105–125.Google ScholarGoogle ScholarCross RefCross Ref
  5. James Brotherston and Alex Simpson. 2011. Sequent Calculi for Induction and Infinite Descent. J. Log. and Comput. 21, 6 (Dec. 2011), 1177–1216. Google ScholarGoogle ScholarDigital LibraryDigital Library
  6. Conrad Cotton-Barratt, David Hopkins, Andrzej S. Murawski, and C.-H. Luke Ong. 2015. Fragments of ML Decidable by Nested Data Class Memory Automata. In Proceedings of the 18th International Conference on Foundations of Software Science and Computation Structures (FoSSaCS’15). 249–263.Google ScholarGoogle ScholarCross RefCross Ref
  7. Conrad Cotton-Barratt, Andrzej S. Murawski, and C.-H. Luke Ong. 2017. ML and Extended Branching VASS. In Proceedings of the 26th European Symposium on Programming Languages and Systems (ESOP’17). 314–340.Google ScholarGoogle ScholarCross RefCross Ref
  8. Derek Dreyer, Amal Ahmed, and Lars Birkedal. 2009. Logical Step-Indexed Logical Relations. In Proceedings of the 24th IEEE Symposium on Logic In Computer Science (LICS ’09). IEEE, Washington, DC, USA, 71–80.Google ScholarGoogle ScholarDigital LibraryDigital Library
  9. Derek Dreyer, Georg Neis, and Lars Birkedal. 2010a. The Impact of Higher-order State and Control Effects on Local Relational Reasoning. In Proceedings of the 15th ACM SIGPLAN International Conference on Functional Programming (ICFP ’10). ACM, New York, 143–156.Google ScholarGoogle ScholarDigital LibraryDigital Library
  10. Derek Dreyer, Georg Neis, Andreas Rossberg, and Lars Birkedal. 2010b. A Relational Modal Logic for Higher-order Stateful ADTs. In Proceedings of the 37th ACM Symposium on Principles of Programming Languages (POPL ’10). ACM, New York, 185–198.Google ScholarGoogle ScholarDigital LibraryDigital Library
  11. Dennis Felsing, Sarah Grebing, Vladimir Klebanov, Philipp Rümmer, and Mattias Ulbrich. 2014. Automating Regression Verification. In Proceedings of the 29th ACM/IEEE International Conference on Automated Software Engineering (ASE ’14). ACM, New York, 349–360.Google ScholarGoogle ScholarDigital LibraryDigital Library
  12. Benny Godlin and Ofer Strichman. 2009. Regression Verification. In Proceedings of the 46th Design Automation Conference (DAC ’09). ACM, New York, 6.Google ScholarGoogle Scholar
  13. Arie Gurfinkel, Temesghen Kahsai, Anvesh Komuravelli, and Jorge A Navas. 2015. The SeaHorn verification framework. In International Conference on Computer Aided Verification. Springer, 343–361.Google ScholarGoogle ScholarCross RefCross Ref
  14. Kryštof Hoder, Nikolaj Bjørner, and Leonardo De Moura. 2011. muZ: An Efficient Engine for Fixed Points with Constraints. In Proceedings of the 23rd International Conference on Computer Aided Verification (CAV’11). Springer-Verlag, Berlin, Heidelberg, 457–462. http://dl.acm.org/citation.cfm?id=2032305.2032341Google ScholarGoogle ScholarCross RefCross Ref
  15. David Hopkins, Andrzej S. Murawski, and C.-H. Luke Ong. 2011. A Fragment of ML Decidable by Visibly Pushdown Automata. In Proceedings of the 38th International Conference on Automata, Languages and Programming - Volume Part II (ICALP’11). Springer-Verlag, Berlin, Heidelberg, 149–161.Google ScholarGoogle ScholarCross RefCross Ref
  16. David Hopkins, Andrzej S. Murawski, and C.-H. Luke Ong. 2012. HECTOR: An Equivalence Checker for a Higher-order Fragment of ML. In Proceedings of the 24th International Conference on Computer Aided Verification (CAV’12). SpringerVerlag, Berlin, Heidelberg, 774–780. Google ScholarGoogle ScholarDigital LibraryDigital Library
  17. David Hopkins and C. H. Ong. 2009. Homer: A Higher-Order Observational Equivalence Model checkER. In Proceedings of the 21st International Conference on Computer Aided Verification (CAV ’09). Springer-Verlag, Berlin, Heidelberg, 654–660. Google ScholarGoogle ScholarDigital LibraryDigital Library
  18. Chung-Kil Hur, Derek Dreyer, Georg Neis, and Viktor Vafeiadis. 2012. The Marriage of Bisimulations and Kripke Logical Relations. In Proceedings of the 39th ACM Symposium on Principles of Programming Languages (POPL ’12). ACM, New York, 59–72.Google ScholarGoogle ScholarDigital LibraryDigital Library
  19. Guilhem Jaber. 2015. Operational Nominal Game Semantics. In Proceedings of the 18th International Conference on Foundations of Software Science and Computation Structures (FOSSACS 2015). Springer Berlin Heidelberg, Berlin, Heidelberg.Google ScholarGoogle ScholarCross RefCross Ref
  20. Guilhem Jaber and Nicolas Tabareau. 2015. Kripke Open Bisimulation - A Marriage of Game Semantics and Operational Techniques. In Proceedings of the 13th Asian Symposium on Programming Languages and Systems (APLAS 2015).Google ScholarGoogle Scholar
  21. Guilhem Jaber and Nikos Tzevelekos. 2016. Trace Semantics for Polymorphic References. In Proceedings of the 31st ACM/IEEE Symposium on Logic in Computer Science (LICS ’16). ACM, New York, 585–594.Google ScholarGoogle ScholarDigital LibraryDigital Library
  22. Radha Jagadeesan, Corin Pitcher, and James Riely. 2009. Transactions on Aspect-Oriented Software Development V. SpringerVerlag, Berlin, Heidelberg, Chapter Open Bisimulation for Aspects, 72–132. Google ScholarGoogle ScholarDigital LibraryDigital Library
  23. Vasileios Koutavas and Mitchell Wand. 2006. Small Bisimulations for Reasoning About Higher-order Imperative Programs. In Conference Record of the 33rd ACM Symposium on Principles of Programming Languages (POPL ’06). ACM, New York, 141–152.Google ScholarGoogle Scholar
  24. Shuvendu K. Lahiri, Chris Hawblitzel, Ming Kawaguchi, and Henrique Rebêlo. 2012. SYMDIFF: A Language-agnostic Semantic Diff Tool for Imperative Programs. In Proceedings of the 24th International Conference on Computer Aided Verification (CAV’12). Springer-Verlag, Berlin, Heidelberg, 712–717.Google ScholarGoogle ScholarDigital LibraryDigital Library
  25. James Laird. 2007. A Fully Abstract Trace Semantics for General. In Proceedings of the 34th International Conference on Automata, Languages and Programming (ICALP’07). Springer-Verlag, Berlin, Heidelberg, 667–679.Google ScholarGoogle ScholarDigital LibraryDigital Library
  26. Soren B. Lassen and Paul Blain Levy. 2007. Typed Normal Form Bisimulation. In Proceedings of the 21st International Conference, and Proceedings of the 16th Annuall Conference on Computer Science Logic (CSL’07/EACSL’07). Springer-Verlag, Berlin, Heidelberg, 283–297. http://dl.acm.org/citation.cfm?id=2392389.2392418Google ScholarGoogle Scholar
  27. Andrzej S. Murawski. 2005. Functions with local state: Regularity and undecidability. Theoretical Computer Science 338, 1 (2005), 315 – 349.Google ScholarGoogle ScholarDigital LibraryDigital Library
  28. Andrzej S. Murawski, Steven J. Ramsay, and Nikos Tzevelekos. 2015. A Contextual Equivalence Checker for IMJ*. In Automated Technology for Verification and Analysis (ATVA’15). Springer International Publishing, 234–240.Google ScholarGoogle Scholar
  29. Andrzej S. Murawski and Nikos Tzevelekos. 2011a. Algorithmic Nominal Game Semantics. In Proceedings of the 20th European Conference on Programming Languages and Systems (ESOP’11). Springer-Verlag, Berlin, Heidelberg, 419–438.Google ScholarGoogle Scholar
  30. Andrzej S. Murawski and Nikos Tzevelekos. 2011b. Game Semantics for Good General References. In Proceedings of the 2011 IEEE 26th Annual Symposium on Logic in Computer Science (LICS ’11). IEEE Computer Society, Washington, DC, USA, 75–84. Google ScholarGoogle ScholarDigital LibraryDigital Library
  31. Andrzej S. Murawski and Nikos Tzevelekos. 2012. Algorithmic Games for Full Ground References. In Proceedings of the 39th International Colloquium Conference on Automata, Languages, and Programming - Volume Part II (ICALP’12). Springer-Verlag, Berlin, Heidelberg, 312–324.Google ScholarGoogle Scholar
  32. Andrew M. Pitts. 1996. Reasoning About Local Variables with Operationally-based Logical Relations. In Proceedings of the 11th IEEE Symposium on Logic in Computer Science (LICS ’96). IEEE, Washington, DC, USA, 152–.Google ScholarGoogle ScholarDigital LibraryDigital Library
  33. Gordon D. Plotkin and Martín Abadi. 1993. A Logic for Parametric Polymorphism. In Proceedings of the International Conference on Typed Lambda Calculi and Applications (TLCA ’93). Springer-Verlag, London, UK, UK, 361–375.Google ScholarGoogle Scholar
  34. Davide Sangiorgi, Naoki Kobayashi, and Eijiro Sumii. 2007. Environmental Bisimulations for Higher-Order Languages. In Proceedings of the 22Nd IEEE Symposium on Logic in Computer Science (LICS ’07). IEEE, Washington, DC, USA, 293–302.Google ScholarGoogle ScholarDigital LibraryDigital Library
  35. Eijiro Sumii. 2009. A Complete Characterization of Observational Equivalence in Polymorphic lambda-calculus with General References. In Proceedings of the 23rd CSL International Conference and 18th EACSL Conference on Computer Science Logic (CSL’09/EACSL’09). Springer-Verlag, Berlin, Heidelberg, 455–469.Google ScholarGoogle ScholarDigital LibraryDigital Library
  36. Eijiro Sumii and Benjamin C. Pierce. 2005. A Bisimulation for Type Abstraction and Recursion. In Proceedings of the 32Nd ACM Symposium on Principles of Programming Languages (POPL ’05). ACM, New York, 63–74.Google ScholarGoogle Scholar
  37. Nikos Tzevelekos. 2011. Fresh-register Automata. In Proceedings of the 38th ACM Symposium on Principles of Programming Languages (POPL ’11). ACM, New York, 295–306.Google ScholarGoogle Scholar
  38. Yuepeng Wang, Isil Dillig, Shuvendu K. Lahiri, and William R. Cook. 2018. Verifying Equivalence of Database-driven Applications. Proc. ACM Program. Lang. 2, POPL, Article 56 (2018), 29 pages. Google ScholarGoogle ScholarDigital LibraryDigital Library

Index Terms

  1. SyTeCi: automating contextual equivalence for higher-order programs with references

        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!