skip to main content

An Algebra of Alignment for Relational Verification

Published:11 January 2023Publication History
Skip Abstract Section

Abstract

Relational verification encompasses information flow security, regression verification, translation validation for compilers, and more. Effective alignment of the programs and computations to be related facilitates use of simpler relational invariants and relational procedure specs, which in turn enables automation and modular reasoning. Alignment has been explored in terms of trace pairs, deductive rules of relational Hoare logics (RHL), and several forms of product automata. This article shows how a simple extension of Kleene Algebra with Tests (KAT), called BiKAT, subsumes prior formulations, including alignment witnesses for forall-exists properties, which brings to light new RHL-style rules for such properties. Alignments can be discovered algorithmically or devised manually but, in either case, their adequacy with respect to the original programs must be proved; an explicit algebra enables constructive proof by equational reasoning. Furthermore our approach inherits algorithmic benefits from existing KAT-based techniques and tools, which are applicable to a range of semantic models.

References

  1. Martín Abadi and Leslie Lamport. 1988. The Existence of Refinement Mappings. In Proceedings of LICS. Google ScholarGoogle ScholarCross RefCross Ref
  2. Timos Antonopoulos, Eric Koskinen, and Ton Chanh Le. 2019. Specification and inference of trace refinement relations. Proceedings of the ACM on Programming Languages, 3, OOPSLA (2019), 1–30. Google ScholarGoogle ScholarDigital LibraryDigital Library
  3. Timos Antonopoulos, Eric Koskinen, Ton Chanh Le, Ramana Nagasamudram, David A. Naumann, and Minh Ngo. 2022. An algebra of alignment for relational verification (extended version). CoRR, abs/2202.04278 (2022), arXiv:2202.04278. arxiv:2202.04278 Google ScholarGoogle Scholar
  4. Timos Antonopoulos, Eric Koskinen, Ton Chanh Le, Ramana Nagasamudram, David A. Naumann, and Minh Ngo. 2022. An algebra of alignment for relational verification (artifact). https://doi.org/10.5281/zenodo.7144067 Google ScholarGoogle ScholarDigital LibraryDigital Library
  5. Krzysztof R. Apt, Frank S. de Boer, and Ernst-Rüdiger Olderog. 2009. Verification of Sequential and Concurrent Programs (3 ed.). Springer. https://doi.org/10.1007/978-1-84882-745-5 Google ScholarGoogle ScholarCross RefCross Ref
  6. Sahar Badihi, Faridah Akinotcho, Yi Li, and Julia Rubin. 2020. ARDiff: Scaling Program Equivalence Checking via Iterative Abstraction and Refinement of Common Code. In Joint Meeting on European Software Engineering Conference and Symposium on the Foundations of Software Engineering. 13–24. https://doi.org/10.1145/3368089.3409757 Google ScholarGoogle ScholarDigital LibraryDigital Library
  7. Anindya Banerjee, Ramana Nagasamudram, Mohammad Nikouei, and David A. Naumann. 2022. A Relational Program Logic with Data Abstraction and Dynamic Framing. ACM Transactions on Programming Languages and Systems, Accepted for publication. Available as arxiv:1910.14560 Google ScholarGoogle Scholar
  8. Anindya Banerjee, David A. Naumann, and Mohammad Nikouei. 2016. Relational Logic with Framing and Hypotheses. In 36th IARCS Annual Conference on Foundations of Software Technology and Theoretical Computer Science. Long version at arxiv:1611.08992 Google ScholarGoogle Scholar
  9. Gilles Barthe, Juan Manuel Crespo, and César Kunz. 2011. Relational Verification Using Product Programs. In Formal Methods. Google ScholarGoogle ScholarDigital LibraryDigital Library
  10. Gilles Barthe, Juan Manuel Crespo, and César Kunz. 2013. Beyond 2-Safety: Asymmetric Product Programs for Relational Program Verification. In Logical Foundations of Computer Science (LFCS) (LNCS, Vol. 7734). 29–43. Google ScholarGoogle Scholar
  11. Gilles Barthe, Juan Manuel Crespo, and César Kunz. 2016. Product Programs and Relational Program Logics. J. Logical and Algebraic Methods in Programming, 85, 5 (2016), 847–859. Google ScholarGoogle ScholarCross RefCross Ref
  12. Gilles Barthe, Pedro R. D’Argenio, and Tamara Rezk. 2004. Secure Information Flow by Self-Composition. In IEEE CSFW. See extended version BartheDR11 Google ScholarGoogle Scholar
  13. Gilles Barthe, Pedro R. D’Argenio, and Tamara Rezk. 2011. Secure information flow by self-composition. Math. Struct. Comput. Sci., 21, 6 (2011). Google ScholarGoogle Scholar
  14. Gilles Barthe, Renate Eilers, Pamina Georgiou, Bernhard Gleiss, Laura Kovács, and Matteo Maffei. 2019. Verifying relational properties using trace logic. In 2019 Formal Methods in Computer Aided Design (FMCAD). 170–178. Google ScholarGoogle Scholar
  15. Gilles Barthe, Benjamin Grégoire, Justin Hsu, and Pierre-Yves Strub. 2017. Coupling proofs are probabilistic product programs. In ACM Symposium on Principles of Programming Languages. 161–174. https://doi.org/10.1145/3009837.3009896 Google ScholarGoogle ScholarDigital LibraryDigital Library
  16. Bernhard Beckert and Mattias Ulbrich. 2018. Trends in relational program verification. In Principled Software Development. Springer, 41–58. Google ScholarGoogle Scholar
  17. N. Benton. 2004. Simple Relational Correctness Proofs for Static Analyses and Program Transformations. In POPL. 14–25. Google ScholarGoogle Scholar
  18. Lennart Beringer. 2011. Relational Decomposition. In Interactive Theorem Proving (ITP) (LNCS, Vol. 6898). Google ScholarGoogle ScholarCross RefCross Ref
  19. Raven Beutner and Bernd Finkbeiner. 2022. Software Verification of Hyperproperties Beyond k-Safety. In Computer Aided Verification. 341–362. https://doi.org/10.1007/978-3-031-13185-1_17 Google ScholarGoogle ScholarDigital LibraryDigital Library
  20. Thomas Braibant and Damien Pous. 2010. An efficient Coq tactic for deciding Kleene algebras. In International Conference on Interactive Theorem Proving. 163–178. Google ScholarGoogle ScholarDigital LibraryDigital Library
  21. Berkeley R. Churchill, Oded Padon, Rahul Sharma, and Alex Aiken. 2019. Semantic program alignment for equivalence checking. In PLDI. Google ScholarGoogle Scholar
  22. Michael R. Clarkson, Bernd Finkbeiner, Masoud Koleini, Kristopher K. Micinski, Markus N. Rabe, and César Sánchez. 2014. Temporal Logics for Hyperproperties. In Principles of Security and Trust (POST) (LNCS, Vol. 8414). 265–284. Google ScholarGoogle ScholarCross RefCross Ref
  23. Michael R. Clarkson and Fred B. Schneider. 2010. Hyperproperties. Journal of Computer Security, 18, 6 (2010), 1157–1210. Google ScholarGoogle ScholarDigital LibraryDigital Library
  24. Martin Clochard, Claude Marché, and Andrei Paskevich. 2020. Deductive Verification with Ghost Monitors. Proc. ACM Program. Lang., 4, POPL (2020). Google ScholarGoogle ScholarDigital LibraryDigital Library
  25. Ernie Cohen. 2000. Separation and Reduction. In Mathematics of Program Construction (LNCS, Vol. 1837). 45–59. https://doi.org/10.1007/10722010_4 Google ScholarGoogle ScholarCross RefCross Ref
  26. Willem-Paul de Roever, Frank de Boer, Ulrich Hannemann, Jozef Hooman, Yassine Lakhnech, Mannes Poel, and Job Zwiers. 2001. Concurrency Verification: Introduction to Compositional and Noncompositional Methods. Cambridge University. Google ScholarGoogle ScholarDigital LibraryDigital Library
  27. Willem-Paul de Roever and Kai Engelhardt. 1998. Data Refinement: Model-Oriented Proof Methods and their Comparison. Cambridge University Press. Google ScholarGoogle ScholarCross RefCross Ref
  28. Amina Doumane, Denis Kuperberg, Damien Pous, and Pierre Pradic. 2019. Kleene Algebra with Hypotheses. In Foundations of Software Science and Computation Structures (FOSSACS) (LNCS, Vol. 11425). 207–223. Google ScholarGoogle ScholarCross RefCross Ref
  29. Emanuele D’Osualdo, Azadeh Farzan, and Derek Dreyer. 2022. Proving Hypersafety Compositionally. Proc. ACM Program. Lang., 6, OOPSLA2 (2022), Article 135, 26 pages. https://doi.org/10.1145/3563298 Google ScholarGoogle ScholarDigital LibraryDigital Library
  30. Marco Eilers, Peter Müller, and Samuel Hitz. 2018. Modular Product Programs. In European Symposium on Programming. Google ScholarGoogle Scholar
  31. Azadeh Farzan and Anthony Vandikas. 2019. Automated hypersafety verification. In Computer Aided Verification. 200–218. Google ScholarGoogle Scholar
  32. Robert Floyd. 1967. Assigning Meaning to Programs. In Symp. on Applied Math. 19, Math. Aspects of Comp. Sci.. Amer. Math. Soc., 19–32. Google ScholarGoogle ScholarCross RefCross Ref
  33. Nissim Francez. 1983. Product Properties and Their Direct Verification. Acta Informatica, 20 (1983), 329–344. Google ScholarGoogle ScholarDigital LibraryDigital Library
  34. Peter J. Freyd and Andre Scedrov. 1990. Categories, Allegories. North-Holland. Google ScholarGoogle Scholar
  35. Dan Frumin, Robbert Krebbers, and Lars Birkedal. 2018. ReLoC: A Mechanised Relational Logic for Fine-Grained Concurrency. In IEEE Symp. on Logic in Computer Science. 442–451. Google ScholarGoogle ScholarDigital LibraryDigital Library
  36. Dan Frumin, Robbert Krebbers, and Lars Birkedal. 2020. ReLoC Reloaded: A Mechanized Relational Logic for Fine-Grained Concurrency and Logical Atomicity. CoRR, abs/2006.13635 (2020), arXiv:2006.13635. arxiv:2006.13635 Google ScholarGoogle Scholar
  37. Benny Godlin and Ofer Strichman. 2008. Inference rules for proving the equivalence of recursive procedures. Acta Inf., 45, 6 (2008), 403–439. Google ScholarGoogle ScholarDigital LibraryDigital Library
  38. Manish Goyal, Muqsit Azeem, Kumar Madhukar, and R. Venkatesh. 2021. Direct Construction of Program Alignment Automata for Equivalence Checking. https://doi.org/10.48550/ARXIV.2109.01864 Google ScholarGoogle Scholar
  39. Michael Greenberg, Ryan Beckett, and Eric Hayden Campbell. 2022. Kleene algebra modulo theories: a framework for concrete KATs. In PLDI. 594–608. https://doi.org/10.1145/3519939.3523722 Google ScholarGoogle ScholarDigital LibraryDigital Library
  40. Lennard Gäher, Michael Sammler, Simon Spies, Ralf Jung, Hoang-Hai Dang, Robbert Krebbers, Jeehoon Kang, and Derek Dreyer. 2022. Simuliris: a separation logic framework for verifying concurrent program optimizations. Proc. ACM Program. Lang., 6, POPL (2022). Google ScholarGoogle ScholarDigital LibraryDigital Library
  41. Chris Hawblitzel, Ming Kawaguchi, Shuvendu K. Lahiri, and Henrique Rebêlo. 2013. Towards Modularly Comparing Programs Using Automated Theorem Provers. In CADE. 282–299. Google ScholarGoogle Scholar
  42. C. A. R. Hoare, I.J. Hayes, He Jifeng, C.C. Morgan, A.W. Roscoe, J.W. Sanders, I.H. Sorensen, J.M. Spivey, and B.A. Sufrin. 1987. Laws of Programming. Commun. ACM, 30 (1987), 672–686,770. Google ScholarGoogle ScholarDigital LibraryDigital Library
  43. Tony Hoare, Stephan van Staden, Bernhard Möller, Georg Struth, and Huibiao Zhu. 2016. Developments in concurrent Kleene algebra. J. Log. Algebraic Methods Program., 85, 4 (2016), 617–636. https://doi.org/10.1016/j.jlamp.2015.09.012 Google ScholarGoogle ScholarCross RefCross Ref
  44. Peter Höfner, Damien Pous, and Georg Struth. 2019. Relational and algebraic methods in computer science. J. Log. Algebraic Methods Program., 106 (2019), 198–199. https://doi.org/10.1016/j.jlamp.2019.05.005 Google ScholarGoogle ScholarCross RefCross Ref
  45. Máté Kovács, Helmut Seidl, and Bernd Finkbeiner. 2013. Relational abstract interpretation for the verification of 2-hypersafety properties. In ACM Computer and Communications Security. Google ScholarGoogle Scholar
  46. Dexter Kozen. 1997. Kleene algebra with tests. ACM Transactions on Programming Languages and Systems, 19, 3 (1997), 427–443. Google ScholarGoogle ScholarDigital LibraryDigital Library
  47. Dexter Kozen. 2000. On Hoare logic and Kleene algebra with tests. ACM Trans. Comput. Log., 1, 1 (2000), 60–76. Google ScholarGoogle ScholarDigital LibraryDigital Library
  48. Dexter Kozen. 2003. Kleene algebra with tests and the static analysis of programs. Cornell University. Google ScholarGoogle Scholar
  49. Dexter Kozen. 2004. Some results in dynamic model theory. Sci. Comput. Program., 51, 1-2 (2004), 3–22. Google ScholarGoogle Scholar
  50. Dexter Kozen and Frederick Smith. 1996. Kleene algebra with tests: Completeness and decidability. In International Workshop on Computer Science Logic. 244–259. Google ScholarGoogle Scholar
  51. Leslie Lamport and Fred B. Schneider. 2021. Verifying Hyperproperties With TLA. In IEEE Computer Security Foundations Symposium (CSF). 1–16. Google ScholarGoogle Scholar
  52. Kenji Maillard, Cătălin Hritçu, Exequiel Rivas, and Antoine Van Muylder. 2020. The Next 700 Relational Program Logics. Proc. ACM Program. Lang., 4, POPL (2020), 4:1–4:33. Google ScholarGoogle ScholarDigital LibraryDigital Library
  53. Konstantinos Mamouras. 2017. Equational Theories of Abnormal Termination Based on Kleene Algebra. In FoSSaCS. 88–105. Google ScholarGoogle Scholar
  54. Dmitry Mordvinov and Grigory Fedyukovich. 2019. Property Directed Inference of Relational Invariants. In Formal Methods in Computer Aided Design. 152–160. https://doi.org/10.23919/FMCAD.2019.8894274 Google ScholarGoogle ScholarCross RefCross Ref
  55. Carroll Morgan. 1988. Auxiliary Variables in Data Refinement. Inform. Process. Lett., 29, 6 (1988), 293–296. Google ScholarGoogle ScholarDigital LibraryDigital Library
  56. Toby Murray. 2020. An Under-Approximate Relational Logic: Heralding Logics of Insecurity, Incorrect Implementation & More. CoRR, abs/2003.04791 (2020), arXiv:2003.04791. arxiv:2003.04791 Google ScholarGoogle Scholar
  57. Ramana Nagasamudram and David A. Naumann. 2021. Alignment Completeness for Relational Hoare Logics. In IEEE Symp. on Logic in Computer Science. 1–13. Extended version at arxiv:2101.11730 Google ScholarGoogle Scholar
  58. David A. Naumann. 2020. Thirty-Seven Years of Relational Hoare Logic: Remarks on Its Principles and History. In 9th International Symposium On Leveraging Applications of Formal Methods, Verification and Validation. 93–116. https://doi.org/10.1007/978-3-030-61470-6_7 Extended version at Google ScholarGoogle ScholarDigital LibraryDigital Library
  59. Peter W O’Hearn. 2019. Incorrectness logic. Proceedings of the ACM on Programming Languages, 4, POPL (2019), 1–32. Google ScholarGoogle Scholar
  60. Lauren Pick, Grigory Fedyukovich, and Aarti Gupta. 2018. Exploiting Synchrony and Symmetry in Relational Verification. In Computer Aided Verification. 164–182. Google ScholarGoogle Scholar
  61. Damien Pous. [n. d.]. Relation Algebra and KAT in Coq. http://perso.ens-lyon.fr/damien.pous/ra/ Coq library, accessed July 2022 Google ScholarGoogle Scholar
  62. Damien Pous. 2015. Symbolic algorithms for language equivalence and Kleene algebra with tests. In ACM Symposium on Principles of Programming Languages. 357–368. Google ScholarGoogle ScholarDigital LibraryDigital Library
  63. Damien Pous, Jurriaan Rot, and Jana Wagemaker. 2021. On Tools for Completeness of Kleene Algebra with Hypotheses. In Relational and Algebraic Methods in Computer Science (RAMiCS) (LNCS, Vol. 13027). 378–395. Google ScholarGoogle ScholarDigital LibraryDigital Library
  64. Andrei Sabelfeld and Andrew C. Myers. 2003. Language-Based Information-Flow Security. IEEE J. Selected Areas in Communications, 21, 1 (2003), Jan., 5–19. Google ScholarGoogle ScholarDigital LibraryDigital Library
  65. Ron Shemer, Arie Gurfinkel, Sharon Shoham, and Yakir Vizel. 2019. Property directed self composition. In International Conference on Computer Aided Verification. 161–179. Google ScholarGoogle ScholarCross RefCross Ref
  66. Marcelo Sousa and Isil Dillig. 2016. Cartesian Hoare logic for verifying k-safety properties. In Proceedings of the 37th ACM SIGPLAN Conference on Programming Language Design and Implementation. 57–69. Google ScholarGoogle ScholarDigital LibraryDigital Library
  67. Tachio Terauchi and Alex Aiken. 2005. Secure information flow as a safety problem. In International Static Analysis Symposium. 352–367. Google ScholarGoogle ScholarDigital LibraryDigital Library
  68. Hiroshi Unno, Tachio Terauchi, and Eric Koskinen. 2021. Constraint-Based Relational Verification. In Computer Aided Verification. 742–766. Google ScholarGoogle Scholar
  69. Jana Wagemaker, Marcello M. Bonsangue, Tobias Kappé, Jurriaan Rot, and Alexandra Silva. 2019. Completeness and Incompleteness of Synchronous Kleene Algebra. In Mathematics of Program Construction (LNCS, Vol. 11825). 385–413. Google ScholarGoogle ScholarDigital LibraryDigital Library
  70. Hongseok Yang. 2007. Relational Separation Logic. Theo. Comp. Sci., 375 (2007). Google ScholarGoogle Scholar
  71. Cheng Zhang, Arthur Azevedo de Amorim, and Marco Gaboardi. 2022. On incorrectness logic and Kleene algebra with top and tests. Proc. ACM Program. Lang., 6, POPL (2022), 1–30. https://doi.org/10.1145/3498690 Google ScholarGoogle ScholarDigital LibraryDigital Library

Index Terms

  1. An Algebra of Alignment for Relational Verification

        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

        • Article Metrics

          • Downloads (Last 12 months)184
          • Downloads (Last 6 weeks)29

          Other Metrics

        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!