skip to main content
article

From invariant checking to invariant inference using randomized search

Published: 01 June 2016 Publication History

Abstract

We describe a general framework c2i for generating an invariant inference procedure from an invariant checking procedure. Given a checker and a language of possible invariants, c2i generates an inference procedure that iteratively invokes two phases. The search phase uses randomized search to discover candidate invariants and the validate phase uses the checker to either prove or refute that the candidate is an actual invariant. To demonstrate the applicability of c2i, we use it to generate inference procedures that prove safety properties of numerical programs, prove non-termination of numerical programs, prove functional specifications of array manipulating programs, prove safety properties of string manipulating programs, and prove functional specifications of heap manipulating programs that use linked list data structures.

References

[1]
Alur R, Bodík R, Juniwal G, Martin MMK, Raghothaman M, Seshia SA, Singh R, Solar-Lezama A, Torlak E, Udupa A (2013) Syntax-guided synthesis. In: FMCAD
[2]
Amato G, Parton M, Scozzari F (2012) Discovering invariants via simple component analysis. J Symb Comput 47(12):1533---1560
[3]
Andrieu C, de Freitas N, Doucet A, Jordan MI (2003) An introduction to MCMC for machine learning. Mach Learn 50(1):5---43
[4]
Beyer D Competition on Software Verification (SV-COMP) benchmarks. https://svn.sosy-lab.org/software/sv-benchmarks/tags/svcomp13/loops/
[5]
Beyer D, Henzinger TA, Jhala R, Majumdar R (2007) The software model checker blast. STTT 9(5---6):505---525
[6]
Beyer D, Henzinger TA, Majumdar R, Rybalchenko A (2007) Invariant synthesis for combined theories. In: VMCAI
[7]
BjØrner N, McMillan KL, Rybalchenko A (2013) On solving universally quantified horn clauses. In: SAS
[8]
Burckhardt S, Kothari P, Musuvathi M, Nagarakatte S (2010) A randomized scheduler with probabilistic guarantees of finding bugs. In: ASPLOS
[9]
Burnim J, Jalbert N, Stergiou C, Sen K (2009) Looper: Lightweight detection of infinite loops at runtime. In: ASE
[10]
Calcagno C, Distefano D, O'Hearn PW, Yang H (2009) Compositional shape analysis by means of bi-abduction. In: POPL
[11]
Chib S, Greenberg E (1995) Understanding the Metropolis-Hastings algorithm. Am Stat 49(4):327---335
[12]
Clarisó R, Cortadella J (2004) The octahedron abstract domain. In: SAS
[13]
Cobleigh JM, Giannakopoulou D, Pasareanu CS (2003) Learning assumptions for compositional verification. In: TACAS
[14]
Colón M, Sankaranarayanan S, Sipma H (2003) Linear invariant generation using non-linear constraint solving. In: CAV
[15]
Costantini G, Ferrara P, Cortesi A (2011) Static analysis of string values. In: ICFEM
[16]
Cousot P, Cousot R (1977) Abstract interpretation: a unified lattice model for static analysis of programs by construction or approximation of fixpoints. In: POPL
[17]
Dillig I, Dillig T, Aiken A (2010) Fluid updates: beyond strong vs. weak updates. In: ESOP
[18]
Dillig I, Dillig T, Li B, McMillan KL (2013) Inductive invariant generation via abductive inference. In: OOPSLA
[19]
Ernst MD, Perkins JH, Guo PJ, McCamant S, Pacheco C, Tschantz MS, Xiao C (2007) The Daikon system for dynamic detection of likely invariants. Sci Comput Prog 69(1---3):35---45
[20]
Flanagan C, Leino KRM (2001) Houdini, an annotation assistant for ESC/Java. In: FME
[21]
Garg P, Löding C, Madhusudan P, Neider D (2013) Learning universally quantified invariants of linear data structures. In: CAV
[22]
Garg P, Löding C, Madhusudan P, Neider D (2014) ICE: a robust learning framework for synthesizing invariants. In: CAV
[23]
Grebenshchikov S, Lopes NP, Popeea C, Rybalchenko A (2012) Synthesizing software verifiers from proof rules. In: PLDI
[24]
Gulavani BS, Henzinger TA, Kannan Y, Nori AV, Rajamani SK (2006) Synergy: a new algorithm for property checking. In: FSE
[25]
Gulwani S, Jojic N (2007) Program verification as probabilistic inference. In: POPL
[26]
Gulwani S, Necula GC (2003) Discovering affine equalities using random interpretation. In: POPL
[27]
Gulwani S, Srivastava S, Venkatesan R (2008) Program analysis as constraint solving. In: PLDI
[28]
Gulwani S, Srivastava S, Venkatesan R (2009) Constraint-based invariant inference over predicate abstraction. In: VMCAI
[29]
Gupta A, Henzinger TA, Majumdar R, Rybalchenko A, Xu RG (2008) Proving non-termination. In: POPL
[30]
Gupta A, Majumdar R, Rybalchenko A (2009) From tests to proofs. In: TACAS
[31]
Harder M, Mellen J, Ernst MD (2003) Improving test suites via operational abstraction. In: ICSE
[32]
Hoder K, BjØrner N (2012) Generalized property directed reachability. In: SAT
[33]
Itzhaky S, Banerjee A, Immerman N, Nanevski A, Sagiv M (2013) Effectively-propositional reasoning about reachability in linked data structures. In: CAV
[34]
Itzhaky S, BjØrner N, Reps TW, Sagiv M, Thakur AV (2014) Property-directed shape analysis. In: CAV
[35]
Ivancic F, Sankaranarayanan S NECLA static analysis benchmarks. https://www.nec-labs.com/research/system/systems_SAV-website/small_static_bench-v1.1.tar.gz
[36]
Jhala R, McMillan KL (2006) A practical and complete approach to predicate refinement. In: TACAS. Springer, Berlin
[37]
Jung Y, Kong S, Wang BY, Yi K (2010) Deriving invariants by algorithmic learning, decision procedures, and predicate abstraction. In: VMCAI. Springer, Berlin
[38]
Kannan Y, Sen K (2008) Universal symbolic execution and its application to likely data structure invariant generation. In: Proceedings of the ISSTA
[39]
Kong S, Jung Y, David C, Wang BY, Yi K (2010) Automatically inferring quantified loop invariants by algorithmic learning from simple templates. In: APLAS
[40]
McMillan K, Rybalchenko A (2013) Combinatorial approach to some sparse-matrix problems. Technical report, Microsoft Research
[41]
Miné A (2006) The octagon abstract domain. High-order Symb Comput 19(1):31---100
[42]
de Moura LM, BjØrner N (2008) Z3: an efficient SMT solver. In: TACAS
[43]
Naik M, Yang H, Castelnuovo G, Sagiv M (2012) Abstractions from tests. In: POPL
[44]
Neuwald AF, Liu JS, Lipman DJ, Lawrence CE (1997) Extracting protein alignment models from the sequence database. Nucleic Acids Res 25:1665---1677
[45]
Nguyen T, Kapur D, Weimer W, Forrest S (2012) Using dynamic analysis to discover polynomial and array invariants. In: ICSE
[46]
Nori AV, Sharma R (2013) Termination proofs from tests. In: ESEC/SIGSOFT FSE
[47]
Qiu X, Garg P, Stefanescu A, Madhusudan P (2013) Natural proofs for structure, data, and separation. In: PLDI
[48]
Reps TW, Sagiv S, Yorsh G (2004) Symbolic implementation of the best transformer. In: VMCAI
[49]
Sagiv S, Reps TW, Wilhelm R (2002) Parametric shape analysis via 3-valued logic. ACM Trans Program Lang Syst 24(3):217---298
[50]
Sankaranarayanan S, Chang RM, Jiang G, Ivancic F (2007) State space exploration using feedback constraint generation and monte-carlo sampling. In: ESEC/SIGSOFT FSE
[51]
Schkufza E, Sharma R, Aiken A (2013) Stochastic superoptimization. In: ASPLOS
[52]
Sharma R, Aiken A (2014) From invariant checking to invariant inference using randomized search. In: CAV
[53]
Sharma R, Gupta S, Hariharan B, Aiken A, Liang P, Nori AV (2013) A data driven approach for algebraic loop invariants. In: ESOP
[54]
Sharma R, Gupta S, Hariharan B, Aiken A, Nori AV (2013) Program verification as learning geometric concepts. In: SAS
[55]
Sharma R, Nori A, Aiken A (2012) Interpolants as classifiers. In: CAV
[56]
Sharma R, Nori AV, Aiken A (2014) Bias-variance tradeoffs in program analysis. In: POPL
[57]
Solar-Lezama A (2009) The sketching approach to program synthesis. In: APLAS
[58]
Srivastava S, Gulwani S (2009) Program verification using templates over predicate abstraction. In: PLDI
[59]
Srivastava S, Gulwani S, Foster JS (2009) VS3: SMT solvers for program verification. In: CAV
[60]
Zheng Y, Zhang X, Ganesh V (2013) Z3-str: a Z3-based string solver for web application analysis. In: ESEC/SIGSOFT FSE

Cited By

View all
  • (2024)LLM Meets Bounded Model Checking: Neuro-symbolic Loop Invariant InferenceProceedings of the 39th IEEE/ACM International Conference on Automated Software Engineering10.1145/3691620.3695014(406-417)Online publication date: 27-Oct-2024
  • (2024)Can Large Language Models Transform Natural Language Intent into Formal Method Postconditions?Proceedings of the ACM on Software Engineering10.1145/36607911:FSE(1889-1912)Online publication date: 12-Jul-2024
  • (2023)Can large language models reason about program invariants?Proceedings of the 40th International Conference on Machine Learning10.5555/3618408.3619552(27496-27520)Online publication date: 23-Jul-2023
  • Show More Cited By
  1. From invariant checking to invariant inference using randomized search

    Recommendations

    Comments

    Information & Contributors

    Information

    Published In

    cover image Formal Methods in System Design
    Formal Methods in System Design  Volume 48, Issue 3
    June 2016
    152 pages

    Publisher

    Kluwer Academic Publishers

    United States

    Publication History

    Published: 01 June 2016

    Author Tags

    1. Loop invariants
    2. Markov Chain Monte Carlo (MCMC)
    3. Satisfiability modulo theories (SMT)
    4. Verification

    Qualifiers

    • Article

    Contributors

    Other Metrics

    Bibliometrics & Citations

    Bibliometrics

    Article Metrics

    • Downloads (Last 12 months)0
    • Downloads (Last 6 weeks)0
    Reflects downloads up to 16 Nov 2024

    Other Metrics

    Citations

    Cited By

    View all
    • (2024)LLM Meets Bounded Model Checking: Neuro-symbolic Loop Invariant InferenceProceedings of the 39th IEEE/ACM International Conference on Automated Software Engineering10.1145/3691620.3695014(406-417)Online publication date: 27-Oct-2024
    • (2024)Can Large Language Models Transform Natural Language Intent into Formal Method Postconditions?Proceedings of the ACM on Software Engineering10.1145/36607911:FSE(1889-1912)Online publication date: 12-Jul-2024
    • (2023)Can large language models reason about program invariants?Proceedings of the 40th International Conference on Machine Learning10.5555/3618408.3619552(27496-27520)Online publication date: 23-Jul-2023
    • (2023)A Pragmatic Approach to Stateful Partial Order ReductionVerification, Model Checking, and Abstract Interpretation10.1007/978-3-031-24950-1_7(129-154)Online publication date: 16-Jan-2023
    • (2022)Scalable linear invariant generation with Farkas’ lemmaProceedings of the ACM on Programming Languages10.1145/35632956:OOPSLA2(204-232)Online publication date: 31-Oct-2022
    • (2022)Learning Contract Invariants Using Reinforcement LearningProceedings of the 37th IEEE/ACM International Conference on Automated Software Engineering10.1145/3551349.3556962(1-11)Online publication date: 10-Oct-2022
    • (2022)Learning to Synthesize Relational InvariantsProceedings of the 37th IEEE/ACM International Conference on Automated Software Engineering10.1145/3551349.3556942(1-12)Online publication date: 10-Oct-2022
    • (2022)Kleene algebra modulo theories: a framework for concrete KATsProceedings of the 43rd ACM SIGPLAN International Conference on Programming Language Design and Implementation10.1145/3519939.3523722(594-608)Online publication date: 9-Jun-2022
    • (2022)Property-directed reachability as abstract interpretation in the monotone theoryProceedings of the ACM on Programming Languages10.1145/34986766:POPL(1-31)Online publication date: 12-Jan-2022
    • (2022)SAT-Based Invariant Inference and Its Relation to Concept LearningReachability Problems10.1007/978-3-031-19135-0_1(3-27)Online publication date: 17-Oct-2022
    • Show More Cited By

    View Options

    View options

    Login options

    Media

    Figures

    Other

    Tables

    Share

    Share

    Share this Publication link

    Share on social media