Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
skip to main content
research-article

Property-Directed Inference of Universal Invariants or Proving Their Absence

Published: 29 March 2017 Publication History

Abstract

We present Universal Property Directed Reachability (PDR), a property-directed semi-algorithm for automatic inference of invariants in a universal fragment of first-order logic. PDR is an extension of Bradley’s PDR/IC3 algorithm for inference of propositional invariants. PDR terminates when it discovers a concrete counterexample, infers an inductive universal invariant strong enough to establish the desired safety property, or finds a proof that such an invariant does not exist. PDR is not guaranteed to terminate. However, we prove that under certain conditions, for example, when reasoning about programs manipulating singly linked lists, it does.
We implemented an analyzer based on PDR and applied it to a collection of list-manipulating programs. Our analyzer was able to automatically infer universal invariants strong enough to establish memory safety and certain functional correctness properties, show the absence of such invariants for certain natural programs and specifications, and detect bugs. All this without the need for user-supplied abstraction predicates.

References

[1]
Aws Albarghouthi, Josh Berdine, Byron Cook, and Zachary Kincaid. 2015. Spatial interpolants. CoRR abs/1501.04100 (2015). Retrieved from http://arxiv.org/abs/1501.04100
[2]
Francesco Alberti, Roberto Bruttomesso, Silvio Ghilardi, Silvio Ranise, and Natasha Sharygina. 2012. SAFARI: SMT-based abstraction for arrays with interpolants. In Proceedings of 24th International Conference on Computer Aided Verification (CAV’12), Vol. 7358. Springer.
[3]
Clark Barrett, Aaron Stump, and Cesare Tinelli. 2010. The Satisfiability Modulo Theories Library (SMT-LIB). (2010). Retrieved from http://www.smt-lib.org.
[4]
Josh Berdine, Cristiano Calcagno, Byron Cook, Dino Distefano, Peter W. O’Hearn, Thomas Wies, and Hongseok Yang. 2007. Shape analysis for composite data structures. In Proceedings of 19th International Conference on Computer Aided Verification (CAV’07), Vol. 4590. Springer, 178--192.
[5]
Josh Berdine, Cristiano Calcagno, and Peter W. O’Hearn. 2004. A decidable fragment of separation logic. In Proceedings of the 24th International Conference on Foundations of Software Technology and Theoretical Computer Science (FSTTCS’04). Springer-Verlag, Berlin, 97--109.
[6]
Armin Biere, Alessandro Cimatti, Edmund M. Clarke, Ofer Strichman, and Yunshan Zhu. 2003. Bounded model checking. Adv. Comput. 58 (2003), 118--149.
[7]
Armin Biere, Alessandro Cimatti, Edmund M. Clarke, and Yunshan Zhu. 1999. Symbolic model checking without BDDs. In Proceedings of 5th International Conference on Tools and Algorithms for Construction and Analysis of Systems (TACAS’99). Springer, 193--207.
[8]
Johannes Birgmeier, Aaron R. Bradley, and Georg Weissenbacher. 2014. Counterexample to induction-guided abstraction-refinement (CTIGAR). In Proceedings of 26th International Conference on Computer Aided Verification (CAV’14), Vol. 8559. Springer, 831--848.
[9]
Nikolaj Bjørner, Kenneth L. McMillan, and Andrey Rybalchenko. 2013. On solving universally quantified horn clauses. In Proceedings of 20th International Static Analysis Symposium (SAS’13), Vol. 7935. Springer, 105--125.
[10]
Egon Börger, Erich Grädel, and Yuri Gurevich. 2008. The Classical Decision Problem. Springer-Verlag.
[11]
Ahmed Bouajjani, Cezara Dragoi, Constantin Enea, and Mihaela Sighireanu. 2009. A logic-based framework for reasoning about composite data structures. In Proceedings of 20th International Conference on Concurrency Theory (CONCUR’09), Vol. 5710. Springer, 178--195.
[12]
Aaron R. Bradley. 2011. SAT-based model checking without unrolling. In Proceedings of the 12th International Conference on Verification, Model Checking, and Abstract Interpretation (VMCAI’11), Vol. 6538. Springer, 70--87.
[13]
Chen C. Chang and Howard J. Keisler. 1990. Model Theory. Elsevier Science.
[14]
Alessandro Cimatti and Alberto Griggio. 2012. Software model checking via IC3. In Proceedings of the 24th International Conference on Computer Aided Verification (CAV’12), Vol. 7358. Springer, 277--293.
[15]
Alessandro Cimatti, Alberto Griggio, Sergio Mover, and Stefano Tonetta. 2014. IC3 modulo theories via implicit predicate abstraction. In Proceedings of the 20th International Conference on Tools and Algorithms for the Construction and Analysis of Systems (TACAS’14), Vol. 8413. Springer, 46--61.
[16]
Edmund Clarke, Daniel Kroening, and Karen Yorav. 2003. Behavioral consistency of C and verilog programs using bounded model checking. In Proceedings of the 40th Annual Design Automation Conference (DAC’03). ACM, New York, NY, 368--371.
[17]
Sylvain Conchon, Amit Goel, Sava Krstic, Alain Mebsout, and Fatiha Zaïdi. 2012. Cubicle: A parallel smt-based model checker for parameterized systems—tool paper. In Proceedings of the 24th International Conference on Computer Aided Verification (CAV’12), Vol. 7358. Springer, 718--724.
[18]
Sylvain Conchon, Amit Goel, Sava Krstic, Alain Mebsout, and Fatiha Zaïdi. 2013. Invariants for finite instances and beyond. In Proceedings of Conference on Formal Methods in Computer-Aided Design (FMCAD’13). IEEE, 61--68.
[19]
Stephen A. Cook and Derek C. Oppen. 1975. An assertion language for data structures. In Proceedings of the 2Nd ACM SIGACT-SIGPLAN Symposium on Principles of Programming Languages (POPL’75). ACM, New York, NY, 160--166.
[20]
Thomas H. Cormen, Charles E. Leiserson, Ronald L. Rivest, and Clifford Stein. 2009. Introduction to Algorithms (3rd ed.). The MIT Press.
[21]
Patrick Cousot and Radhia Cousot. 1977. Abstract interpretation: A unified lattice model for static analysis of programs by construction or approximation of fixpoints. In Conference Record of the Fourth ACM Symposium on Principles of Programming Languages (POPL’77). ACM, 238--252.
[22]
Satyaki Das and David L. Dill. 2002. Counter-example based predicate discovery in predicate abstraction. In Proceedings of the 4th International Conference on Formal Methods in Computer-Aided Design (FMCAD’02), Vol. 2517. Springer, 19--32.
[23]
Leonardo Mendonça de Moura and Nikolaj Bjørner. 2008. Z3: an efficient SMT solver. In Proceedings of the 14th International Conference on Tools and Algorithms for the Construction and Analysis of Systems (TACAS’08), Vol. 4963. Springer, 337--340.
[24]
Isil Dillig, Thomas Dillig, and Alex Aiken. 2010. Symbolic heap abstraction with demand-driven axiomatization of memory invariants. In ACM SIGPLAN Conference on Object-Oriented Programming, Systems, Languages, and Applications (OOPSLA’10). ACM, 397--410.
[25]
Dino Distefano, Peter W. O’Hearn, and Hongseok Yang. 2006. A local shape analysis based on separation logic. In Proceedings of the 12th International Conference on Tools and Algorithms for the Construction and Analysis of Systems (TACAS’06), Vol. 3920. Springer, 287--302.
[26]
Niklas Eén, Alan Mishchenko, and Robert K. Brayton. 2011. Efficient implementation of property directed reachability. In Proceedings of International Conference on Formal Methods in Computer-Aided Design (FMCAD’11). FMCAD Inc., 125--134.
[27]
Cormac Flanagan and K. Rustan M. Leino. 2001. Houdini, an annotation assistant for ESC/java. In Proceedings of Symposium of Formal Methods Europe (FME’01), Vol. 2021. Springer, 500--517.
[28]
Cormac Flanagan and Shaz Qadeer. 2002. Predicate abstraction for software verification. In Conference Record of the 29th SIGPLAN-SIGACT Symposium on Principles of Programming Languages (POPL’02). ACM, 191--202.
[29]
Asya Frumkin, Yotam M. Y. Feldman, Ondřej Lhoták, Oded Padon, Mooly Sagiv, and Sharon Shoham. 2017. Property directed reachability for proving absence of concurrent modification errors. In Proceedings of the 18th International Conference on Verification, Model Checking, and Abstract Interpretation (VMCAI’17). Springer. To appear.
[30]
Pranav Garg, Christof Löding, P. Madhusudan, and Daniel Neider. 2013a. Learning universally quantified invariants of linear data structures. In Proceedings of the 25th International Conference on Computer Aided Verification (CAV’13), Vol. 8044. Springer, 813--829.
[31]
Pranav Garg, P. Madhusudan, and Gennaro Parlato. 2013b. Quantified data automata on skinny trees: An abstract domain for lists. In Proceedings of the 20th International Symposium on Static Analysis (SAS’13), Vol. 7935. Springer, 172--193.
[32]
Silvio Ghilardi and Silvio Ranise. 2010a. Backward reachability of array-based systems by SMT solving: Termination and invariant synthesis. Logic. Methods Comput. Sci. 6, 4 (2010).
[33]
Silvio Ghilardi and Silvio Ranise. 2010b. MCMT: A model checker modulo theories. In Proceedings of the 5th International Joint Conference on Automated Reasoning (IJCAR’10), Vol. 6173. Springer, 22--29.
[34]
Thomas A. Henzinger, Ranjit Jhala, Rupak Majumdar, and Grégoire Sutre. 2002. Lazy abstraction. In Conference Record of POPL 2002: The 29th SIGPLAN-SIGACT Symposium on Principles of Programming Languages. ACM, 58--70.
[35]
Krystof Hoder and Nikolaj Bjørner. 2012. Generalized property directed reachability. In Proceedings of the 15th International Conference on Theory and Applications of Satisfiability Testing (SAT’12), Vol. 7317. Springer, 157--171.
[36]
Krystof Hoder, Laura Kovács, and Andrei Voronkov. 2011. Invariant generation in vampire. In Proceedings of the 17th International Conference on Tools and Algorithms for the Construction and Analysis of Systems (TACAS’11), Vol. 6605. Springer, 60--64.
[37]
Shachar Itzhaky, Anindya Banerjee, Neil Immerman, Aleksandar Nanevski, and Mooly Sagiv. 2013. Effectively-propositional reasoning about reachability in linked data structures. In Proceedings of the 25th International Conference on Computer Aided Verification (CAV’13), Vol. 8044. Springer, 756--772.
[38]
Shachar Itzhaky, Nikolaj Bjørner, Thomas W. Reps, Mooly Sagiv, and Aditya V. Thakur. 2014. Property-directed shape analysis. In Proceedings of the 26th International Conference on Computer Aided Verification (CAV’14), Vol. 8559. Springer, 35--51.
[39]
Ranjit Jhala and Kenneth L. McMillan. 2006. A practical and complete approach to predicate refinement. In Proceedings of the 12th International Conference on Tools and Algorithms for the Construction and Analysis of Systems (TACAS’06), Vol. 3920. Springer, 459--473.
[40]
Aleksandr Karbyshev, Nikolaj Bjørner, Shachar Itzhaky, Noam Rinetzky, and Sharon Shoham. 2015. Property-directed inference of universal invariants or proving their absence. In Proceedings of the 27th International Conference on Computer Aided Verification (CAV’15), Vol. 9206. Springer, 583--602.
[41]
Anvesh Komuravelli, Arie Gurfinkel, and Sagar Chaki. 2014. SMT-based model checking for recursive programs. In Proceedings of the 26th International Conference on Computer Aided Verification (CAV’14), Vol. 8559. Springer, 17--34.
[42]
Shuvendu K. Lahiri and Randal E. Bryant. 2007. Predicate abstraction with indexed predicates. ACM Trans. Comput. Logic 9, 1 (2007).
[43]
Shuvendu K. Lahiri and Shaz Qadeer. 2006. Verifying properties of well-founded linked lists. In Proceedings of the 33rd ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages (POPL’06). ACM, New York, NY, 115--126.
[44]
Shuvendu K. Lahiri and Shaz Qadeer. 2008. Back to the future: Revisiting precise program verification using SMT solvers. In Proceedings of the 35th ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages (POPL’08). ACM, 171--182.
[45]
Tal Lev-Ami, Neil Immerman, and Shmuel Sagiv. 2006. Abstraction for shape analysis with fast and precise transformers. In Proceedings of the 18th International Conference on Computer Aided Verification (CAV’06), Vol. 4144. Springer, 547--561.
[46]
Harry R. Lewis. 1980. Complexity results for classes of quantificational formulas. J. Comput. Syst. Sci. 21, 3 (1980), 317--353.
[47]
P. Madhusudan, Gennaro Parlato, and Xiaokang Qiu. 2011. Decidable logics combining heap structures and data. In Proceedings of the 38th ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages (POPL’11). ACM, New York, NY, 611--622.
[48]
P. Madhusudan and Xiaokang Qiu. 2011. Efficient decision procedures for heaps using STRAND. In Proceedings of the 18th International Symposium on Static Analysis (SAS’11), Vol. 6887. Springer, 43--59.
[49]
Roman Manevich, Eran Yahav, Ganesan Ramalingam, and Shmuel Sagiv. 2005. Predicate abstraction and canonical abstraction for singly-linked lists. In Proceedings of the 6th International Conference on Verification, Model Checking, and Abstract Interpretation (VMCAI’05), Vol. 3385. Springer, 181--198.
[50]
Anders Møller and Michael I. Schwartzbach. 2001. The pointer assertion logic engine. In Proceedings of the 2001 ACM SIGPLAN Conference on Programming Language Design and Implementation (PLDI’01). ACM, New York, NY, 221--231.
[51]
ONF. 2016. (2016). The Open Networking Foundation. Retrieved from http://opennetworking.org.
[52]
Oded Padon, Neil Immerman, Sharon Shoham, Aleksandr Karbyshev, and Mooly Sagiv. 2016. Decidability of inferring inductive invariants. In Proceedings of the 43rd Annual ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages (POPL’16). ACM, 217--231.
[53]
Ruzica Piskac, Thomas Wies, and Damien Zufferey. 2014a. Automating separation logic with trees and data. In Proceedings of 26th International Conference on Computer Aided Verification (CAV’14), Armin Biere and Roderick Bloem (Eds.), Vol. 8559. Springer, 711--728.
[54]
Ruzica Piskac, Thomas Wies, and Damien Zufferey. 2014b. GRASShopper - Complete heap verification with mixed specifications. In Proceedings of the 20th International Conference on Tools and Algorithms for the Construction and Analysis of Systems (TACAS 2014), Vol. 8413. Springer, 124--139.
[55]
Andreas Podelski and Thomas Wies. 2010. Counterexample-guided focus. In Proceedings of the 37th ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages (POPL’10). ACM, 249--260.
[56]
Zvonimir Rakamaric, Jesse D. Bingham, and Alan J. Hu. 2007. An inference-rule-based decision procedure for verification of heap-manipulating programs with mutable data and cyclic data structures. In Proceedings of the 8th International Conference on Verification, Model Checking, and Abstract Interpretation (VMCAI 2007), Vol. 4349. Springer, 106--121.
[57]
Thomas W. Reps, Susan Horwitz, and Shmuel Sagiv. 1995. Precise interprocedural dataflow analysis via graph reachability. In Conference Record of the 22nd ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages (POPL’95). ACM Press, 49--61.
[58]
John C. Reynolds. 2002. Separation logic: A logic for shared mutable data structures. In Proceedings of the 17th IEEE Symposium on Logic in Computer Science (LICS’02). IEEE Computer Society, 55--74.
[59]
Shmuel Sagiv, Thomas W. Reps, and Reinhard Wilhelm. 2002. Parametric shape analysis via 3-valued logic. ACM Trans. Program. Lang. Syst. 24, 3 (2002), 217--298.
[60]
Saurabh Srivastava and Sumit Gulwani. 2009. Program verification using templates over predicate abstraction. In Proceedings of the 2009 ACM SIGPLAN Conference on Programming Language Design and Implementation (PLDI’09). ACM, 223--234.
[61]
A. Thakur, A. Lal, J. Lim, and T. Reps. 2013. PostHat and All That: Attaining Most-Precise Inductive Invariants. TR-1790. Comp. Sci. Dept., Univ. of Wisconsin—Madison, Madison, WI.
[62]
Aditya V. Thakur, Akash Lal, Junghee Lim, and Thomas W. Reps. 2015. Posthat and all that: Automating abstract interpretation. Electr. Notes Theor. Comput. Sci. 311 (2015), 15--32.
[63]
Thomas Wies, Marco Muñiz, and Viktor Kuncak. 2011. An efficient decision procedure for imperative tree data structures. In Proceedings of the 23rd International Conference on Automated Deduction (CADE-23), Vol. 6803. Springer, 476--491.
[64]
Glynn Winskel. 1993. The Formal Semantics of Programming Languages: An Introduction. MIT Press, Cambridge, MA.
[65]
Greta Yorsh, Thomas W. Reps, and Shmuel Sagiv. 2004. Symbolically computing most-precise abstract operations for shape analysis. In Proceedings of the 10th International Conference on Tools and Algorithms for the Construction and Analysis of Systems (TACAS’04), Vol. 2988. Springer, 530--545.

Cited By

View all
  • (2025)Proving Cutoff Bounds for Safety Properties in First-Order LogicAutomated Technology for Verification and Analysis10.1007/978-3-031-78709-6_7(135-159)Online publication date: 1-Feb-2025
  • (2024)Inductive invariants that spark joyProceedings of the 18th USENIX Conference on Operating Systems Design and Implementation10.5555/3691938.3691983(837-853)Online publication date: 10-Jul-2024
  • (2024)Mostly Automated Verification of Liveness Properties for Distributed Protocols with Ranking FunctionsProceedings of the ACM on Programming Languages10.1145/36328778:POPL(1028-1059)Online publication date: 5-Jan-2024
  • Show More Cited By

Index Terms

  1. Property-Directed Inference of Universal Invariants or Proving Their Absence

        Recommendations

        Comments

        Information & Contributors

        Information

        Published In

        cover image Journal of the ACM
        Journal of the ACM  Volume 64, Issue 1
        February 2017
        254 pages
        ISSN:0004-5411
        EISSN:1557-735X
        DOI:10.1145/3065931
        Issue’s Table of Contents
        Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than the author(s) must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from [email protected].

        Publisher

        Association for Computing Machinery

        New York, NY, United States

        Publication History

        Published: 29 March 2017
        Accepted: 01 December 2016
        Revised: 01 November 2016
        Received: 01 January 2016
        Published in JACM Volume 64, Issue 1

        Permissions

        Request permissions for this article.

        Check for updates

        Author Tags

        1. EPR
        2. IC3
        3. PDR
        4. Universal invariants
        5. property-directed reachability

        Qualifiers

        • Research-article
        • Research
        • Refereed

        Funding Sources

        • ERC
        • BSF
        • Broadcom Foundation and Tel Aviv University Authentication Initiative
        • EU FP7 project ADVENT

        Contributors

        Other Metrics

        Bibliometrics & Citations

        Bibliometrics

        Article Metrics

        • Downloads (Last 12 months)23
        • Downloads (Last 6 weeks)2
        Reflects downloads up to 16 Feb 2025

        Other Metrics

        Citations

        Cited By

        View all
        • (2025)Proving Cutoff Bounds for Safety Properties in First-Order LogicAutomated Technology for Verification and Analysis10.1007/978-3-031-78709-6_7(135-159)Online publication date: 1-Feb-2025
        • (2024)Inductive invariants that spark joyProceedings of the 18th USENIX Conference on Operating Systems Design and Implementation10.5555/3691938.3691983(837-853)Online publication date: 10-Jul-2024
        • (2024)Mostly Automated Verification of Liveness Properties for Distributed Protocols with Ranking FunctionsProceedings of the ACM on Programming Languages10.1145/36328778:POPL(1028-1059)Online publication date: 5-Jan-2024
        • (2024)An Infinite Needle in a Finite Haystack: Finding Infinite Counter-Models in Deductive VerificationProceedings of the ACM on Programming Languages10.1145/36328758:POPL(970-1000)Online publication date: 5-Jan-2024
        • (2024)SAT-Based Quantified Symmetric Minimization of the Reachable States of Distributed Protocols: An UpdateLeveraging Applications of Formal Methods, Verification and Validation. Specification and Verification10.1007/978-3-031-75380-0_21(374-384)Online publication date: 27-Oct-2024
        • (2024)Efficient Implementation of an Abstract Domain of Quantified First-Order FormulasComputer Aided Verification10.1007/978-3-031-65630-9_5(86-108)Online publication date: 24-Jul-2024
        • (2024)mypyvy: A Research Platform for Verification of Transition Systems in First-Order LogicComputer Aided Verification10.1007/978-3-031-65630-9_4(71-85)Online publication date: 25-Jul-2024
        • (2023)Safety verification and universal invariants for relational action basesProceedings of the Thirty-Second International Joint Conference on Artificial Intelligence10.24963/ijcai.2023/362(3248-3257)Online publication date: 19-Aug-2023
        • (2023)Regularity and quantification: a new approach to verify distributed protocolsInnovations in Systems and Software Engineering10.1007/s11334-022-00460-819:4(359-377)Online publication date: 1-Dec-2023
        • (2023)Synthesizing History and Prophecy Variables for Symbolic Model CheckingVerification, Model Checking, and Abstract Interpretation10.1007/978-3-031-24950-1_15(320-340)Online publication date: 17-Jan-2023
        • Show More Cited By

        View Options

        Login options

        Full Access

        View options

        PDF

        View or Download as a PDF file.

        PDF

        eReader

        View online with eReader.

        eReader

        Figures

        Tables

        Media

        Share

        Share

        Share this Publication link

        Share on social media