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.
- Martín Abadi and Leslie Lamport. 1988. The Existence of Refinement Mappings. In Proceedings of LICS.
Google Scholar
Cross Ref
- 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 Scholar
Digital Library
- 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 Scholar
- 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 Scholar
Digital Library
- 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 Scholar
Cross Ref
- 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 Scholar
Digital Library
- 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 Scholar
- 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 Scholar
- Gilles Barthe, Juan Manuel Crespo, and César Kunz. 2011. Relational Verification Using Product Programs. In Formal Methods.
Google Scholar
Digital Library
- 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 Scholar
- 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 Scholar
Cross Ref
- Gilles Barthe, Pedro R. D’Argenio, and Tamara Rezk. 2004. Secure Information Flow by Self-Composition. In IEEE CSFW. See extended version BartheDR11
Google Scholar
- Gilles Barthe, Pedro R. D’Argenio, and Tamara Rezk. 2011. Secure information flow by self-composition. Math. Struct. Comput. Sci., 21, 6 (2011).
Google Scholar
- 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 Scholar
- 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 Scholar
Digital Library
- Bernhard Beckert and Mattias Ulbrich. 2018. Trends in relational program verification. In Principled Software Development. Springer, 41–58.
Google Scholar
- N. Benton. 2004. Simple Relational Correctness Proofs for Static Analyses and Program Transformations. In POPL. 14–25.
Google Scholar
- Lennart Beringer. 2011. Relational Decomposition. In Interactive Theorem Proving (ITP) (LNCS, Vol. 6898).
Google Scholar
Cross Ref
- 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 Scholar
Digital Library
- Thomas Braibant and Damien Pous. 2010. An efficient Coq tactic for deciding Kleene algebras. In International Conference on Interactive Theorem Proving. 163–178.
Google Scholar
Digital Library
- Berkeley R. Churchill, Oded Padon, Rahul Sharma, and Alex Aiken. 2019. Semantic program alignment for equivalence checking. In PLDI.
Google Scholar
- 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 Scholar
Cross Ref
- Michael R. Clarkson and Fred B. Schneider. 2010. Hyperproperties. Journal of Computer Security, 18, 6 (2010), 1157–1210.
Google Scholar
Digital Library
- Martin Clochard, Claude Marché, and Andrei Paskevich. 2020. Deductive Verification with Ghost Monitors. Proc. ACM Program. Lang., 4, POPL (2020).
Google Scholar
Digital Library
- Ernie Cohen. 2000. Separation and Reduction. In Mathematics of Program Construction (LNCS, Vol. 1837). 45–59. https://doi.org/10.1007/10722010_4
Google Scholar
Cross Ref
- 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 Scholar
Digital Library
- Willem-Paul de Roever and Kai Engelhardt. 1998. Data Refinement: Model-Oriented Proof Methods and their Comparison. Cambridge University Press.
Google Scholar
Cross Ref
- 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 Scholar
Cross Ref
- 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 Scholar
Digital Library
- Marco Eilers, Peter Müller, and Samuel Hitz. 2018. Modular Product Programs. In European Symposium on Programming.
Google Scholar
- Azadeh Farzan and Anthony Vandikas. 2019. Automated hypersafety verification. In Computer Aided Verification. 200–218.
Google Scholar
- Robert Floyd. 1967. Assigning Meaning to Programs. In Symp. on Applied Math. 19, Math. Aspects of Comp. Sci.. Amer. Math. Soc., 19–32.
Google Scholar
Cross Ref
- Nissim Francez. 1983. Product Properties and Their Direct Verification. Acta Informatica, 20 (1983), 329–344.
Google Scholar
Digital Library
- Peter J. Freyd and Andre Scedrov. 1990. Categories, Allegories. North-Holland.
Google Scholar
- 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 Scholar
Digital Library
- 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 Scholar
- Benny Godlin and Ofer Strichman. 2008. Inference rules for proving the equivalence of recursive procedures. Acta Inf., 45, 6 (2008), 403–439.
Google Scholar
Digital Library
- 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 Scholar
- 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 Scholar
Digital Library
- 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 Scholar
Digital Library
- 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 Scholar
- 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 Scholar
Digital Library
- 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 Scholar
Cross Ref
- 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 Scholar
Cross Ref
- 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 Scholar
- Dexter Kozen. 1997. Kleene algebra with tests. ACM Transactions on Programming Languages and Systems, 19, 3 (1997), 427–443.
Google Scholar
Digital Library
- Dexter Kozen. 2000. On Hoare logic and Kleene algebra with tests. ACM Trans. Comput. Log., 1, 1 (2000), 60–76.
Google Scholar
Digital Library
- Dexter Kozen. 2003. Kleene algebra with tests and the static analysis of programs. Cornell University.
Google Scholar
- Dexter Kozen. 2004. Some results in dynamic model theory. Sci. Comput. Program., 51, 1-2 (2004), 3–22.
Google Scholar
- Dexter Kozen and Frederick Smith. 1996. Kleene algebra with tests: Completeness and decidability. In International Workshop on Computer Science Logic. 244–259.
Google Scholar
- Leslie Lamport and Fred B. Schneider. 2021. Verifying Hyperproperties With TLA. In IEEE Computer Security Foundations Symposium (CSF). 1–16.
Google Scholar
- 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 Scholar
Digital Library
- Konstantinos Mamouras. 2017. Equational Theories of Abnormal Termination Based on Kleene Algebra. In FoSSaCS. 88–105.
Google Scholar
- 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 Scholar
Cross Ref
- Carroll Morgan. 1988. Auxiliary Variables in Data Refinement. Inform. Process. Lett., 29, 6 (1988), 293–296.
Google Scholar
Digital Library
- 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 Scholar
- 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 Scholar
- 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 Scholar
Digital Library
- Peter W O’Hearn. 2019. Incorrectness logic. Proceedings of the ACM on Programming Languages, 4, POPL (2019), 1–32.
Google Scholar
- Lauren Pick, Grigory Fedyukovich, and Aarti Gupta. 2018. Exploiting Synchrony and Symmetry in Relational Verification. In Computer Aided Verification. 164–182.
Google Scholar
- Damien Pous. [n. d.]. Relation Algebra and KAT in Coq. http://perso.ens-lyon.fr/damien.pous/ra/ Coq library, accessed July 2022
Google Scholar
- Damien Pous. 2015. Symbolic algorithms for language equivalence and Kleene algebra with tests. In ACM Symposium on Principles of Programming Languages. 357–368.
Google Scholar
Digital Library
- 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 Scholar
Digital Library
- 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 Scholar
Digital Library
- Ron Shemer, Arie Gurfinkel, Sharon Shoham, and Yakir Vizel. 2019. Property directed self composition. In International Conference on Computer Aided Verification. 161–179.
Google Scholar
Cross Ref
- 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 Scholar
Digital Library
- Tachio Terauchi and Alex Aiken. 2005. Secure information flow as a safety problem. In International Static Analysis Symposium. 352–367.
Google Scholar
Digital Library
- Hiroshi Unno, Tachio Terauchi, and Eric Koskinen. 2021. Constraint-Based Relational Verification. In Computer Aided Verification. 742–766.
Google Scholar
- 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 Scholar
Digital Library
- Hongseok Yang. 2007. Relational Separation Logic. Theo. Comp. Sci., 375 (2007).
Google Scholar
- 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 Scholar
Digital Library
Index Terms
An Algebra of Alignment for Relational Verification
Recommendations
Embedding Kozen-Tiuryn Logic into Residuated One-Sorted Kleene Algebra with Tests
Logic, Language, Information, and ComputationAbstractKozen and Tiuryn have introduced the substructural logic for reasoning about correctness of while programs (ACM TOCL, 2003). The logic distinguishes between tests and partial correctness assertions, representing the latter by special ...
On incorrectness logic and Kleene algebra with top and tests
Kleene algebra with tests (KAT) is a foundational equational framework for reasoning about programs, which has found applications in program transformations, networking and compiler optimizations, among many other areas. In his seminal work, Kozen ...
On Hoare logic and Kleene algebra with tests
We show that Kleene algebra with tests (KAT) subsumes propositional Hoare logic (PHL). Thus the specialized syntax and deductive apparatus of Hoare logic are inessential and can be replaced by simple equational reasoning. In addition, we show that all ...






Comments