Learning the boundary of inductive invariants (original) (raw)

Article No.: 15, Pages 1 - 30

Published: 04 January 2021 Publication History

Abstract

We study the complexity of invariant inference and its connections to exact concept learning. We define a condition on invariants and their geometry, called the fence condition, which permits applying theoretical results from exact concept learning to answer open problems in invariant inference theory. The condition requires the invariant's boundary---the states whose Hamming distance from the invariant is one---to be backwards reachable from the bad states in a small number of steps. Using this condition, we obtain the first polynomial complexity result for an interpolation-based invariant inference algorithm, efficiently inferring monotone DNF invariants with access to a SAT solver as an oracle. We further harness Bshouty's seminal result in concept learning to efficiently infer invariants of a larger syntactic class of invariants beyond monotone DNF. Lastly, we consider the robustness of inference under program transformations. We show that some simple transformations preserve the fence condition, and that it is sensitive to more complex transformations.

References

[1]

Azza Abouzied, Dana Angluin, Christos H. Papadimitriou, Joseph M. Hellerstein, and Avi Silberschatz. 2013. Learning and verifying quantified boolean queries by example. In Proceedings of the 32nd ACM SIGMOD-SIGACT-SIGART Symposium on Principles of Database Systems, PODS 2013, New York, NY, USA-June 22-27, 2013. 49-60. https://doi.org/10.1145/ 2463664.2465220

[2]

Howard Aizenstein and Leonard Pitt. 1995. On The Learnability Of Disjunctive Normal Form Formulas. Mach. Learn. 19, 3 ( 1995 ), 183-208. https://doi.org/10.1007/BF00996269

[3]

Aws Albarghouthi and Kenneth L. McMillan. 2013. Beautiful Interpolants. In Computer Aided Verification-25th International Conference, CAV 2013, Saint Petersburg, Russia, July 13-19, 2013. Proceedings. 313-329. https://doi.org/10.1007/978-3-642-39799-8\_22

[4]

Rajeev Alur, Rastislav Bodík, Eric Dallal, Dana Fisman, Pranav Garg, Garvit Juniwal, Hadas Kress-Gazit, P. Madhusudan, Milo M. K. Martin, Mukund Raghothaman, Shambwaditya Saha, Sanjit A. Seshia, Rishabh Singh, Armando Solar-Lezama, Emina Torlak, and Abhishek Udupa. 2015. Syntax-Guided Synthesis. In Dependable Software Systems Engineering. 1-25.

[5]

Dana Angluin. 1987. Queries and Concept Learning. Machine Learning 2, 4 ( 1987 ), 319-342.

[6]

Dana Angluin, Lisa Hellerstein, and Marek Karpinski. 1993. Learning Read-Once Formulas with Queries. J. ACM 40, 1 ( 1993 ), 185-210. https://doi.org/10.1145/138027.138061

[7]

Marta Arias. 2004. Exact learning of first-order horn expressions from queries. Ph.D. Dissertation. Tufts University, Medford, MA.

[8]

Armin Biere, Alessandro Cimatti, Edmund M. Clarke, and Yunshan Zhu. 1999. Symbolic Model Checking without BDDs. In Tools and Algorithms for Construction and Analysis of Systems, 5th International Conference, TACAS '99, Held as Part of the European Joint Conferences on the Theory and Practice of Software, ETAPS'99, Amsterdam, The Netherlands, March 22-28, 1999, Proceedings. 193-207. https://doi.org/10.1007/3-540-49059-0\_14

[9]

Nikolaj Bjørner, Arie Gurfinkel, Konstantin Korovin, and Ori Lahav. 2013. Instantiations, Zippers and EPR Interpolation. In LPAR 2013, 19th International Conference on Logic for Programming, Artificial Intelligence and Reasoning, December 12-17, 2013, Stellenbosch, South Africa, Short papers proceedings. 35-41. https://easychair.org/publications/paper/XtN

[10]

Cristina Borralleras, Marc Brockschmidt, Daniel Larraz, Albert Oliveras, Enric Rodríguez-Carbonell, and Albert Rubio. 2017. Proving Termination Through Conditional Termination. In Tools and Algorithms for the Construction and Analysis of Systems-23rd International Conference, TACAS 2017, Held as Part of the European Joint Conferences on Theory and Practice of Software, ETAPS 2017, Uppsala, Sweden, April 22-29, 2017, Proceedings, Part I. 99-117.

[11]

Aaron R. Bradley. 2011. SAT-Based Model Checking without Unrolling. In Verification, Model Checking, and Abstract Interpretation-12th International Conference, VMCAI 2011, Austin, TX, USA, January 23-25, 2011. Proceedings. 70-87. https://doi.org/10.1007/978-3-642-18275-4\_7

[12]

Nader H. Bshouty. 1995. Exact Learning Boolean Function via the Monotone Theory. Inf. Comput. 123, 1 ( 1995 ), 146-153. https://doi.org/10.1006/inco. 1995.1164

[13]

Nader H. Bshouty. 1997. Simple Learning Algorithms Using Divide and Conquer. Comput. Complex. 6, 2 ( 1997 ), 174-194. https://doi.org/10.1007/BF01262930

[14]

Nader H. Bshouty. 2018. Exact learning from an honest teacher that answers membership queries. Theor. Comput. Sci. 733 ( 2018 ), 4-43. https://doi.org/10.1016/j.tcs. 2018. 04.034

[15]

Ashok K. Chandra and George Markowsky. 1978. On the number of prime implicants. Discret. Math. 24, 1 ( 1978 ), 7-11. https://doi.org/10.1016/ 0012-365X ( 78 ) 90168-1

[16]

Yu-Fang Chen, Edmund M. Clarke, Azadeh Farzan, Ming-Hsien Tsai, Yih-Kuen Tsay, and Bow-Yaw Wang. 2010. Automated Assume-Guarantee Reasoning through Implicit Learning. In Computer Aided Verification, 22nd International Conference, CAV 2010, Edinburgh, UK, July 15-19, 2010. Proceedings. 511-526. https://doi.org/10.1007/978-3-642-14295-6\_44

[17]

Hana Chockler, Alexander Ivrii, and Arie Matsliah. 2012. Computing Interpolants without Proofs. In Hardware and Software: Verification and Testing-8th International Haifa Verification Conference, HVC 2012, Haifa, Israel, November 6-8, 2012. Revised Selected Papers. 72-85. https://doi.org/10.1007/978-3-642-39611-3\_12

[18]

Alessandro Cimatti, Alberto Griggio, and Roberto Sebastiani. 2010. Eficient generation of craig interpolants in satisfiability modulo theories. ACM Trans. Comput. Log. 12, 1 ( 2010 ), 7 : 1-7 : 54. https://doi.org/10.1145/1838552.1838559

[19]

William Craig. 1957. Linear Reasoning. A New Form of the Herbrand-Gentzen Theorem. J. Symbolic Logic 22, 3 ( 09 1957 ), 250-268. https://projecteuclid.org:443/euclid.jsl/1183732823

[20]

Yves Crama and Peter L. Hammer. 2011. Boolean Functions-Theory, Algorithms, and Applications. Encyclopedia of mathematics and its applications, Vol. 142. Cambridge University Press. http://www.cambridge.org/gb/knowledge/isbn/ item6222210/?site_locale=en_GB

[21]

John Cyphert, Jason Breck, Zachary Kincaid, and Thomas W. Reps. 2019. Refinement of path expressions for static analysis. Proc. ACM Program. Lang. 3, POPL ( 2019 ), 45 : 1-45 : 29. https://doi.org/10.1145/3290358

[22]

Isil Dillig, Thomas Dillig, Boyang Li, and Kenneth L. McMillan. 2013. Inductive invariant generation via abductive inference. In Proceedings of the 2013 ACM SIGPLAN International Conference on Object Oriented Programming Systems Languages & Applications, OOPSLA 2013, part of SPLASH 2013, Indianapolis, IN, USA, October 26-31, 2013. 443-456.

[23]

Samuel Drews and Aws Albarghouthi. 2016. Efectively Propositional Interpolants. In Computer Aided Verification-28th International Conference, CAV 2016, Toronto, ON, Canada, July 17-23, 2016, Proceedings, Part II (Lecture Notes in Computer Science), Swarat Chaudhuri and Azadeh Farzan (Eds.), Vol. 9780. Springer, 210-229. https://doi.org/10.1007/978-3-319-41540-6\_12

[24]

Niklas Eén, Alan Mishchenko, and Robert K. Brayton. 2011. Eficient implementation of property directed reachability. In International Conference on Formal Methods in Computer-Aided Design, FMCAD '11, Austin, TX, USA, October 30-November 02, 2011. 125-134. http://dl.acm.org/citation.cfm?id= 2157675

[25]

Grigory Fedyukovich and Rastislav Bodík. 2018. Accelerating Syntax-Guided Invariant Synthesis. In Tools and Algorithms for the Construction and Analysis of Systems-24th International Conference, TACAS 2018, Held as Part of the European Joint Conferences on Theory and Practice of Software, ETAPS 2018, Thessaloniki, Greece, April 14-20, 2018, Proceedings, Part I. 251-269. https://doi.org/10.1007/978-3-319-89960-2\_14

[26]

Yotam M. Y. Feldman, Neil Immerman, Mooly Sagiv, and Sharon Shoham. 2020. Complexity and information in invariant inference. Proc. ACM Program. Lang. 4, POPL ( 2020 ), 5 : 1-5 : 29. https://doi.org/10.1145/3371073

[27]

Yotam M. Y. Feldman, Mooly Sagiv, Sharon Shoham, and James R. Wilcox. 2021. Learning the Boundary of Inductive Invariants. CoRR abs/ 2008.09909 ( 2021 ). https://arxiv.org/abs/ 2008.09909

[28]

Yotam M. Y. Feldman, James R. Wilcox, Sharon Shoham, and Mooly Sagiv. 2019. Inferring Inductive Invariants from Phase Structures. In Computer Aided Verification-31st International Conference, CAV 2019, New York City, NY, USA, July 15-18, 2019, Proceedings, Part II. 405-425. https://doi.org/10.1007/978-3-030-25543-5\_23

[29]

Jean-Christophe Filliâtre, Léon Gondelman, and Andrei Paskevich. 2016. The spirit of ghost code. Formal Methods Syst. Des. 48, 3 ( 2016 ), 152-174. https://doi.org/10.1007/s10703-016-0243-x

[30]

Cormac Flanagan and K. Rustan M. Leino. 2001. Houdini, an Annotation Assistant for ESC/Java. In FME 2001: Formal Methods for Increasing Software Productivity, International Symposium of Formal Methods Europe, Berlin, Germany, March 12-16, 2001, Proceedings. 500-517.

[31]

Cormac Flanagan and Shaz Qadeer. 2002. Predicate abstraction for software verification. In Conference Record of POPL 2002 : The 29th SIGPLAN-SIGACT Symposium on Principles of Programming Languages, Portland, OR, USA, January 16-18, 2002. 191-202. https://doi.org/10.1145/503272.503291

[32]

Pranav Garg, Christof Löding, P Madhusudan, and Daniel Neider. 2014. ICE: A robust framework for learning invariants. In Computer Aided Verification. Springer, 69-87.

[33]

Pranav Garg, Daniel Neider, P. Madhusudan, and Dan Roth. 2016. Learning invariants using decision trees and implication counterexamples. In Proceedings of the 43rd Annual ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages, POPL 2016, St. Petersburg, FL, USA, January 20-22, 2016. 499-512. https://doi.org/10.1145/2837614.2837664

[34]

Roberto Giacobazzi, Francesco Logozzo, and Francesco Ranzato. 2015. Analyzing Program Analyses. In Proceedings of the 42nd Annual ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages, POPL 2015, Mumbai, India, January 15-17, 2015, Sriram K. Rajamani and David Walker (Eds.). ACM, 261-273. https://doi.org/10.1145/2676726.2676987

[35]

Susanne Graf and Hassen Saïdi. 1997. Construction of Abstract State Graphs with PVS. In Computer Aided Verification, 9th International Conference, CAV '97, Haifa, Israel, June 22-25, 1997, Proceedings. 72-83. https://doi.org/10.1007/3-540-63166-6\_10

[36]

Arie Gurfinkel, Sharon Shoham, and Yuri Meshman. 2016. SMT-based verification of parameterized systems. In Proceedings of the 24th ACM SIGSOFT International Symposium on Foundations of Software Engineering, FSE 2016, Seattle, WA, USA, November 13-18, 2016. 338-348. https://doi.org/10.1145/2950290.2950330

[37]

Shachar Itzhaky, Nikolaj Bjørner, Thomas W. Reps, Mooly Sagiv, and Aditya V. Thakur. 2014. Property-Directed Shape Analysis. In Computer Aided Verification-26th International Conference, CAV 2014, Held as Part of the Vienna Summer of Logic, VSL 2014, Vienna, Austria, July 18-22, 2014. Proceedings. 35-51. https://doi.org/10.1007/978-3-319-08867-9\_3

[38]

Susmit Jha, Sumit Gulwani, Sanjit A. Seshia, and Ashish Tiwari. 2010. Oracle-guided component-based program synthesis. In Proceedings of the 32nd ACM/IEEE International Conference on Software Engineering-Volume 1, ICSE 2010, Cape Town, South Africa, 1-8 May 2010. 215-224. https://doi.org/10.1145/1806799.1806833

[39]

Yungbum Jung, Soonho Kong, Cristina David, Bow-Yaw Wang, and Kwangkeun Yi. 2015. Automatically inferring loop invariants via algorithmic learning. Math. Struct. Comput. Sci. 25, 4 ( 2015 ), 892-915. https://doi.org/10.1017/S0960129513000078

[40]

Aleksandr Karbyshev, Nikolaj Bjørner, Shachar Itzhaky, Noam Rinetzky, and Sharon Shoham. 2017. Property-Directed Inference of Universal Invariants or Proving Their Absence. J. ACM 64, 1 ( 2017 ), 7 : 1-7 : 33. https://doi.org/10.1145/3022187

[41]

Egor George Karpenkov, David Monniaux, and Philipp Wendler. 2016. Program Analysis with Local Policy Iteration. In Verification, Model Checking, and Abstract Interpretation-17th International Conference, VMCAI 2016, St. Petersburg, FL, USA, January 17-19, 2016. Proceedings. 127-146. https://doi.org/10.1007/978-3-662-49122-5\_6

[42]

Jason R. Koenig, Oded Padon, Neil Immerman, and Alex Aiken. 2020. First-order quantified separators. In Proceedings of the 41st ACM SIGPLAN International Conference on Programming Language Design and Implementation, PLDI 2020, London, UK, June 15-20, 2020, Alastair F. Donaldson and Emina Torlak (Eds.). ACM, 703-717. https://doi.org/10.1145/3385412.3386018

[43]

Daniel Kroening and Georg Weissenbacher. 2007. Lifting Propositional Interpolants to the Word-Level. In Formal Methods in Computer-Aided Design, 7th International Conference, FMCAD 2007, Austin, Texas, USA, November 11-14, 2007, Proceedings. IEEE Computer Society, 85-89. https://doi.org/10.1109/FAMCAD. 2007.13

[44]

Shuvendu K. Lahiri and Shaz Qadeer. 2009. Complexity and Algorithms for Monomial and Clausal Predicate Abstraction. In Automated Deduction-CADE-22, 22nd International Conference on Automated Deduction, Montreal, Canada, August 2-7, 2009. Proceedings. 214-229.

[45]

K. Rustan M. Leino and Clément Pit-Claudel. 2016. Trigger Selection Strategies to Stabilize Program Verifiers. In Computer Aided Verification-28th International Conference, CAV 2016, Toronto, ON, Canada, July 17-23, 2016, Proceedings, Part I. 361-381. https://doi.org/10.1007/978-3-319-41528-4\_20

[46]

Francesco Logozzo, Shuvendu K. Lahiri, Manuel Fähndrich, and Sam Blackshear. 2014. Verification modulo versions: towards usable verification. In ACM SIGPLAN Conference on Programming Language Design and Implementation, PLDI '14, Edinburgh, United Kingdom-June 09-11, 2014, Michael F. P. O'Boyle and Keshav Pingali (Eds.). ACM, 294-304. https://doi.org/10.1145/2594291.2594326

[47]

Kenneth L. McMillan. 2003. Interpolation and SAT-Based Model Checking. In Computer Aided Verification, 15th International Conference, CAV 2003, Boulder, CO, USA, July 8-12, 2003, Proceedings. 1-13.

[48]

Kenneth L. McMillan. 2005. An interpolating theorem prover. Theor. Comput. Sci. 345, 1 ( 2005 ), 101-121. https://doi.org/10\. 1016/j.tcs. 2005. 07.003

[49]

Kenneth L. McMillan. 2006. Lazy Abstraction with Interpolants. In Computer Aided Verification, 18th International Conference, CAV 2006, Seattle, WA, USA, August 17-20, 2006, Proceedings. 123-136. https://doi.org/10.1007/11817963\_14

[50]

Kenneth L. McMillan. 2011. Interpolants from Z3 proofs. In International Conference on Formal Methods in Computer-Aided Design, FMCAD ' 11, Austin, TX, USA, October 30-November 02, 2011, Per Bjesse and Anna Slobodová (Eds.). FMCAD Inc., 19-27. http://dl.acm.org/citation.cfm?id= 2157661

[51]

Kenneth L. McMillan. 2018. Interpolation and Model Checking. In Handbook of Model Checking. 421-446. https://doi.org/ 10.1007/978-3-319-10575-8_14

[52]

Kedar S. Namjoshi. 2007. Symmetry and Completeness in the Analysis of Parameterized Systems. In Verification, Model Checking, and Abstract Interpretation, 8th International Conference, VMCAI 2007, Nice, France, January 14-16, 2007, Proceedings. 299-313. https://doi.org/10.1007/978-3-540-69738-1\_22

[53]

Ryan O'Donnell. 2014. Analysis of Boolean Functions. Cambridge University Press. http://www.cambridge.org/de/ academic/subjects/computer-science/ algorithmics-complexity-computer-algebra-and-computational-g/analysisboolean-functions

[54]

J. Ross Quinlan. 1986. Induction of Decision Trees. Mach. Learn. 1, 1 ( 1986 ), 81-106. https://doi.org/10.1023/A:1022643204877

[55]

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.

[56]

Rahul Sharma and Alex Aiken. 2016. From invariant checking to invariant inference using randomized search. Formal Methods in System Design 48, 3 ( 2016 ), 235-256. https://doi.org/10.1007/s10703-016-0248-5

[57]

Rahul Sharma, Isil Dillig, Thomas Dillig, and Alex Aiken. 2011. Simplifying Loop Invariant Generation Using Splitter Predicates. In Computer Aided Verification-23rd International Conference, CAV 2011, Snowbird, UT, USA, July 14-20, 2011. Proceedings. 703-719. https://doi.org/10.1007/978-3-642-22110-1\_57

[58]

Rahul Sharma, Saurabh Gupta, Bharath Hariharan, Alex Aiken, Percy Liang, and Aditya V. Nori. 2013b. A Data Driven Approach for Algebraic Loop Invariants. In Programming Languages and Systems-22nd European Symposium on Programming, ESOP 2013, Held as Part of the European Joint Conferences on Theory and Practice of Software, ETAPS 2013, Rome, Italy, March 16-24, 2013. Proceedings. 574-592. https://doi.org/10.1007/978-3-642-37036-6\_31

[59]

Rahul Sharma, Saurabh Gupta, Bharath Hariharan, Alex Aiken, and Aditya V. Nori. 2013a. Verification as Learning Geometric Concepts. In Static Analysis-20th International Symposium, SAS 2013, Seattle, WA, USA, June 20-22, 2013. Proceedings. 388-411.

[60]

Rahul Sharma, Aditya V. Nori, and Alex Aiken. 2012. Interpolants as Classifiers. In Computer Aided Verification-24th International Conference, CAV 2012, Berkeley, CA, USA, July 7-13, 2012 Proceedings. 71-87. https://doi.org/10.1007/978-3-642-31424-7\_11

[61]

Robert H. Sloan, Balázs Szörényi, and György Turán. 2008. On k-Term DNF with the Largest Number of Prime Implicants. SIAM J. Discret. Math. 21, 4 ( 2008 ), 987-998. https://doi.org/10.1137/050632026

[62]

Saurabh Srivastava, Sumit Gulwani, and Jefrey S. Foster. 2013. Template-based program verification and program synthesis. STTT 15, 5-6 ( 2013 ), 497-518.

[63]

Leslie G. Valiant. 1984. A Theory of the Learnable. Commun. ACM 27, 11 ( 1984 ), 1134-1142. https://doi.org/10.1145/ 1968.1972

[64]

Yakir Vizel, Arie Gurfinkel, and Sharad Malik. 2015a. Fast Interpolating BMC. In Computer Aided Verification-27th International Conference, CAV 2015, San Francisco, CA, USA, July 18-24, 2015, Proceedings, Part I (Lecture Notes in Computer Science), Daniel Kroening and Corina S. Pasareanu (Eds.), Vol. 9206. Springer, 641-657. https://doi.org/10.1007/978-3-319-21690-4\_43

[65]

Yakir Vizel, Alexander Nadel, and Vadim Ryvchin. 2015b. Eficient generation of small interpolants in CNF. Syst. Des. 47, 1 ( 2015 ), 51-74. https://doi.org/10.1007/s10703-015-0224-5

[66]

Douglas H Wiedemann. 1987. Hamming geometry. Ph.D. Dissertation. University of Waterloo.

Information & Contributors

Information

Published In

cover image Proceedings of the ACM on Programming Languages

Proceedings of the ACM on Programming Languages Volume 5, Issue POPL

January 2021

1789 pages

Copyright © 2021 Owner/Author.

This work is licensed under a Creative Commons Attribution-NoDerivatives International 4.0 License.

Publisher

Association for Computing Machinery

New York, NY, United States

Publication History

Published: 04 January 2021

Published in PACMPL Volume 5, Issue POPL

Permissions

Request permissions for this article.

Check for updates

Author Tags

  1. Hamming geometry
  2. complexity
  3. exact learning
  4. interpolation
  5. invariant inference

Qualifiers

Contributors

Other Metrics

Bibliometrics & Citations

Bibliometrics

Article Metrics

Reflects downloads up to 14 Nov 2024

Other Metrics

Citations

View Options

View options

PDF

View or Download as a PDF file.

PDF

eReader

View online with eReader.

eReader

Get Access

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

Media

Figures

Other

Tables

Affiliations

Yotam M. Y. Feldman

Tel Aviv University, Israel

Mooly Sagiv

Tel Aviv University, Israel

Sharon Shoham

Tel Aviv University, Israel

James R. Wilcox