ABSTRACT
This paper presents a novel automated procedure for discovering expressive shape specifications for sophisticated functional data structures. Our approach extracts potential shape predicates based on the definition of constructors of arbitrary user-defined inductive data types, and combines these predicates within an expressive first-order specification language using a lightweight data-driven learning procedure. Notably, this technique requires no programmer annotations, and is equipped with a type-based decision procedure to verify the correctness of discovered specifications. Experimental results indicate that our implementation is both efficient and effective, capable of automatically synthesizing sophisticated shape specifications over a range of complex data types, going well beyond the scope of existing solutions.
- A. Albarghouthi and K. L. McMillan. Beautiful Interpolants. In CAV, 2013. doi: 10.1007/978-3-642-39799-8_ 22.Google Scholar
- R. Alur, R. Bod´ık, E. Dallal, D. Fisman, P. Garg, G. Juniwal, H. Kress-Gazit, P. Madhusudan, M. M. K. Martin, M. Raghothaman, S. Saha, S. A. Seshia, R. Singh, A. Solar-Lezama, E. Torlak, and A. Udupa. Syntax-Guided Synthesis. In Dependable Software Systems Engineering, pages 1– 25, 2015. doi: 10.3233/978-1-61499-495-4-1.Google Scholar
- J. Berdine, B. Cook, and S. Ishtiaq. SLAYER: Memory Safety for Systems-level Code. In CAV, 2011. Google ScholarDigital Library
- doi: 10.1007/ 978-3-642-22110-1_15.Google Scholar
- M. Bofill, M. Palah´ı, J. Suy, and M. Villaret. Solving constraint satisfaction problems with SAT modulo theories. Constraints, 17(3):273–303, 2012. doi: 10.1007/ s10601-012-9123-1. Google ScholarDigital Library
- C. Calcagno, D. Distefano, P. O’Hearn, and H. Yang. Compositional Shape Analysis by Means of Bi-abduction. In POPL, 2009. doi: 10.1145/1480881.1480917. Google ScholarDigital Library
- B.-Y. E. Chang and X. Rival. Relational Inductive Shape Analysis. In POPL, 2008. Google ScholarDigital Library
- doi: 10.1145/1328438.Google Scholar
- 1328469.Google Scholar
- A. Chlipala. Mostly-automated Verification of Low-level Programs in Computational Separation Logic. In PLDI, 2011. Google ScholarDigital Library
- doi: 10.1145/1993498.1993526.Google Scholar
- K. Claessen and J. Hughes. QuickCheck: A Lightweight Tool for Random Testing of Haskell Programs. In ICFP, 2000. Google ScholarDigital Library
- doi: 10.1145/351240.351266.Google Scholar
- E. Cohen, M. Dahlweid, M. Hillebrand, D. Leinenbach, M. Moskal, T. Santen, W. Schulte, and S. Tobies. VCC: A Practical System for Verifying Concurrent C. In TPHOLs, 2009. doi: 10.1007/978-3-642-03359-9_2. Google ScholarDigital Library
- L. De Moura and N. Bjørner. Z3: An Efficient SMT Solver. In TACAS, 2008. doi: 10.1007/978-3-540-78800-3_ 24. Google ScholarDigital Library
- I. Dillig, T. Dillig, A. Aiken, and M. Sagiv. Precise and Compact Modular Procedure Summaries for Heap Manipulating Programs. In PLDI, 2011. doi: 10.1145/1993498. Google ScholarDigital Library
- 1993565.Google Scholar
- M. D. Ernst, J. H. Perkins, P. J. Guo, S. McCamant, C. Pacheco, M. S. Tschantz, and C. Xiao. The Daikon System for Dynamic Detection of Likely Invariants. Sci. Comput. Program., 69(1-3):35–45, 2007. doi: 10.1016/j.scico. 2007.01.015. Google ScholarDigital Library
- C. Flanagan and K. R. M. Leino. Houdini, an Annotation Assistant for ESC/Java. In FME, 2001. Google ScholarDigital Library
- doi: 10.1007/ 3-540-45251-6_29.Google Scholar
- P. Garg, C. Löding, P. Madhusudan, and D. Neider. Learning Universally Quantified Invariants of Linear Data Structures. In CAV, 2013. doi: 10.1007/978-3-642-39799-8_ 57.Google Scholar
- P. Garg, C. Löding, P. Madhusudan, and D. Neider. ICE: A Robust Learning Framework for learning Invariants. In CAV, 2014. doi: 10.1007/978-3-319-08867-9_5. Google ScholarDigital Library
- P. Garg, P. Madhusudan, D. Neider, and D. Roth. Learning Invariants Using Decision Trees and Implication Counterexamples. In POPL, 2016. doi: 10.1145/2837614.2837664. Google ScholarDigital Library
- T. Gehr, D. Dimitrov, and M. Vechev. Learning Commutativity Specifications. In CAV, 2015.Google Scholar
- doi: 10.1007/ 978-3-319-21690-4_18.Google Scholar
- P. Godefroid and A. Taly. Automated Synthesis of Symbolic Instruction Encodings from I/O Samples. In PLDI, 2012. Google ScholarDigital Library
- doi: 10.1145/2254064.2254116.Google Scholar
- S. Graf and H. Sa¨ıdi. Construction of Abstract State Graphs with PVS. In CAV, 1997. Google ScholarDigital Library
- doi: 10.1007/ 3-540-63166-6_10.Google Scholar
- B. Guo, N. Vachharajani, and D. I. August. Shape Analysis with Inductive Recursion Synthesis. In PLDI, 2007. doi: 10. 1145/1250734.1250764. Google ScholarDigital Library
- A. Gupta, R. Majumdar, and A. Rybalchenko. From Tests to Proofs. In TACAS, 2009. Google ScholarDigital Library
- doi: 10.1007/ 978-3-642-00768-2_24.Google Scholar
- T. A. Henzinger, R. Jhala, R. Majumdar, and K. L. McMillan. Abstractions from Proofs. In POPL, 2004. doi: 10.1145/ 964001.964021. Google ScholarDigital Library
- C. Ihlemann, S. Jacobs, and V. Sofronie-Stokkermans. On Local Reasoning in Verification. In TACAS, 2008. doi: 10. 1007/978-3-540-78800-3_19. Google ScholarDigital Library
- S. Itzhaky, A. Banerjee, N. Immerman, A. Nanevski, and M. Sagiv. Effectively-Propositional Reasoning About Reachability in Linked Data Structures. In CAV, 2013. doi: 10. 1007/978-3-642-39799-8_53.Google Scholar
- S. Itzhaky, A. Banerjee, N. Immerman, O. Lahav, A. Nanevski, and M. Sagiv. Modular Reasoning About Heap Paths via Effectively Propositional Formulas. In POPL, 2014. doi: 10.1145/2535838.2535854. Google ScholarDigital Library
- S. Itzhaky, N. Bjørner, T. W. Reps, M. Sagiv, and A. V. Thakur. Property-Directed Shape Analysis. In CAV, 2014. doi: 10. 1007/978-3-319-08867-9_3. Google ScholarDigital Library
- B. Jeannet, A. Loginov, T. Reps, and M. Sagiv. A Relational Approach to Interprocedural Shape Analysis. ACM Trans. Program. Lang. Syst., 32:5:1–5:52, 2010. doi: 10.1145/ 1667048.1667050. Google ScholarDigital Library
- G. Kaki and S. Jagannathan. A Relational Framework for Higher-order Shape Analysis. In ICFP, 2014. Google ScholarDigital Library
- doi: 10. 1145/2628136.2628159.Google Scholar
- A. Karbyshev, N. Bjorner, S. Itzhaky, N. Rinetzky, and S. Shoham. Property-Directed Inference of Universal Invariants or Proving Their Absence. In CAV, 2015. doi: 10. 1007/978-3-319-21690-4_40.Google Scholar
- M. Kawaguchi, P. Rondon, and R. Jhala. Type-based Data Structure Verification. In PLDI, 2009. Google ScholarDigital Library
- doi: 10.1145/ 1542476.1542510.Google Scholar
- S. Lahiri and S. Qadeer. Back to the Future: Revisiting Precise Program Verification Using SMT Solvers. In POPL, 2008. Google ScholarDigital Library
- doi: 10.1145/1328438.1328461.Google Scholar
- Q. L. Le, C. Gherghina, S. Qin, and W.-N. Chin. Shape Analysis via Second-Order Bi-Abduction. In CAV, 2014. Google ScholarDigital Library
- doi: 10.1007/978-3-319-08867-9_4.Google Scholar
- K. R. M. Leino. Dafny: An Automatic Program Verifier for Functional Correctness. In LPAR, 2010. doi: 10.1007/ 978-3-642-17511-4_20. Google ScholarDigital Library
- T. Lev-Ami and S. Sagiv. TVLA: A System for Implementing Static Analyses. In SAS, 2000. doi: 10.1007/ 978-3-540-45099-3_15. Google ScholarDigital Library
- T. Lev-Ami, N. Immerman, T. Reps, M. Sagiv, S. Srivastava, and G. Yorsh. Simulating Reachability Using First-order Logic with Applications to Verification of Linked Data Structures. In CADE, 2005. doi: 10.1007/11532231_8. Google ScholarDigital Library
- A. Loginov, T. Reps, and M. Sagiv. Abstraction Refinement via Inductive Learning. In CAV, 2005. Google ScholarDigital Library
- doi: 10.1007/ 11513988_50.Google Scholar
- P. Madhusudan, X. Qiu, and A. Stefanescu. Recursive Proofs for Inductive Tree Data-structures. In POPL, 2012. doi: 10. 1145/2103656.2103673. Google ScholarDigital Library
- R. Manevich, E. Yahav, G. Ramalingam, and M. Sagiv. Predicate Abstraction and Canonical Abstraction for Singly-linked Lists. In VMCAI, 2005. Google ScholarDigital Library
- doi: 10.1007/ 978-3-540-30579-8_13.Google Scholar
- E. J. McCluskey. Minimization of Boolean Functions. Bell system technical Journal, 35(6):1417–1444, 1956.Google Scholar
- H. H. Nguyen, C. David, S. Qin, and W.-N. Chin. Automated Verification of Shape and Size Properties via Separation Logic. In VMCAI, 2007. Google ScholarDigital Library
- doi: 10.1007/ 978-3-540-69738-1_18.Google Scholar
- P. C. Nguyen and D. V. Horn. Relatively Complete Counterexamples for Higher-Order Programs. In PLDI, 2015. Google ScholarDigital Library
- doi: 10.1145/2737924.2737971.Google Scholar
- T. Nguyen, D. Kapur, W. Weimer, and S. Forrest. Using Dynamic Analysis to Generate Disjunctive Invariants. In ICSE, 2014. doi: 10.1145/2568225.2568275. Google ScholarDigital Library
- E. Pek, X. Qiu, and P. Madhusudan. Natural Proofs for Data Structure Manipulation in C Using Separation Logic. In PLDI, 2014. doi: 10.1145/2594291.2594325. Google ScholarDigital Library
- P. Philippaerts, J. T. Mühlberg, W. Penninckx, J. Smans, B. Jacobs, and F. Piessens. Software Verification with VeriFast: Industrial Case Studies. Sci. Comput. Program., 82:77–97, 2014. doi: 10.1016/j.scico.2013.01.006. Google ScholarDigital Library
- R. Piskac, L. Moura, and N. Bjørner. Deciding Effectively Propositional Logic Using DPLL and Substitution Sets. J. Autom. Reason., 44:401–424, 2010. Google ScholarDigital Library
- doi: 10.1007/ s10817-009-9161-6.Google Scholar
- R. Piskac, T. Wies, and D. Zufferey. GRASShopper - Complete Heap Verification with Mixed Specifications. In TACAS, 2014. doi: 10.1007/978-3-642-54862-8_9.Google Scholar
- R. Piskac, T. Wies, and D. Zufferey. Automating Separation Logic with Trees and Data. In CAV, 2014. doi: 10.1007/ 978-3-319-08867-9_47. Google ScholarDigital Library
- X. Qiu, P. Garg, A. S¸tefănescu, and P. Madhusudan. Natural Proofs for Structure, Data, and Separation. In PLDI, 2013. Google ScholarDigital Library
- doi: 10.1145/2462156.2462169.Google Scholar
- T. Reps, M. Sagiv, and G. Yorsh. Symbolic Implementation of the Best Transformer. In VMCAI, 2004. doi: 10.1007/ 978-3-540-24622-0_21.Google ScholarCross Ref
- P. M. Rondon, M. Kawaguci, and R. Jhala. Liquid Types. In PLDI, 2008. doi: 10.1145/1375581.1375602. Google ScholarDigital Library
- R. Sharma and A. Aiken. From Invariant Checking to Invariant Inference Using Randomized Search. In CAV, 2014. Google ScholarDigital Library
- doi: 10.1007/978-3-319-08867-9_6.Google Scholar
- R. Sharma, A. V. Nori, and A. Aiken. Interpolants As Classifiers. In CAV, 2012. Google ScholarDigital Library
- doi: 10.1007/ 978-3-642-31424-7_11.Google Scholar
- R. Sharma, S. Gupta, B. Hariharan, A. Aiken, P. Liang, and A. V. Nori. A Data Driven Approach for Algebraic Loop Invariants. In ESOP, 2013. Google ScholarDigital Library
- doi: 10.1007/ 978-3-642-37036-6_31.Google Scholar
- R. Sharma, S. Gupta, B. Hariharan, A. Aiken, and A. Nori. Verification as Learning Geometric Concepts. In SAS, 2013.Google ScholarCross Ref
- doi: 10.1007/978-3-642-38856-9_21.Google Scholar
- A. Solar-Lezama. Program Synthesis by Sketching. PhD thesis, University of California at Berkeley, 2008. Google ScholarDigital Library
- S. Srivastava and S. Gulwani. Program Verification Using Templates over Predicate Abstraction. In PLDI, 2009. Google ScholarDigital Library
- doi: 10.1145/1542476.1542501.Google Scholar
- M. Stojadinovi´c and F. Mari´c. meSAT: multiple encodings of CSP to SAT. Constraints, 19(4):380–403, 2014. doi: 10. 1007/s10601-014-9165-7. Google ScholarDigital Library
- P. Suter, M. Dotta, and V. Kuncak. Decision Procedures for Algebraic Data Types with Abstractions. In POPL, 2010. Google ScholarDigital Library
- doi: 10.1145/1706299.1706325.Google Scholar
- P. Suter, A. S. Köksal, and V. Kuncak. Satisfiability Modulo Recursive Programs. In SAS, 2011. Google ScholarDigital Library
- doi: 10.1007/ 978-3-642-23702-7_23.Google Scholar
- A. Thakur, A. Lal, J. Lim, and T. Reps. PostHat and All That: Automating Abstract Interpretation. Electron. Notes Theor. Comput. Sci., 311:15–32, 2015. doi: 10.1016/j.entcs. 2015.02.003. Google ScholarDigital Library
- N. Vazou, E. L. Seidel, R. Jhala, D. Vytiniotis, and S. Peyton-Jones. Refinement Types for Haskell. In ICFP, 2014. Google ScholarDigital Library
- doi: 10.1145/2628136.2628161.Google Scholar
- N. Vazou, A. Bakst, and R. Jhala. Bounded Refinement Types. In ICFP, 2015. doi: 10.1145/2784731.2784745. Google ScholarDigital Library
- H. Xi and F. Pfenning. Dependent Types in Practical Programming. In POPL, 1999. doi: 10.1145/292540.292560. Google ScholarDigital Library
- H. Yang, O. Lee, J. Berdine, C. Calcagno, B. Cook, D. Distefano, and P. O’Hearn. Scalable Shape Analysis for Systems Code. In CAV, 2008. Google ScholarDigital Library
- doi: 10.1007/ 978-3-540-70545-1_36.Google Scholar
- G. Yorsh, T. Reps, and M. Sagiv. Symbolically Computing Most-precise Abstract Operations for Shape Analysis. In TACAS, 2004.Google ScholarCross Ref
- doi: 10.1007/978-3-540-24730-2_ 39.Google Scholar
- G. Yorsh, T. Ball, and M. Sagiv. Testing, Abstraction, Theorem Proving: Better Together! In ISSTA, 2006. doi: 10. 1145/1146238.1146255. Google ScholarDigital Library
- G. Yorsh, A. Rabinovich, M. Sagiv, A. Meyer, and A. Bouajjani. A Logic of Reachable Patterns in Linked Data-structures. In FOSSACS, 2006. doi: 10.1007/11690634_7. Google ScholarDigital Library
- K. Zee, V. Kuncak, and M. Rinard. Full Functional Verification of Linked Data Structures. In PLDI, 2008. doi: 10. 1145/1375581.1375624. Google ScholarDigital Library
- H. Zhu, A. Nori, and S. Jagannathan. Learning Refinement Types. In ICFP, 2015. doi: 10.1145/2784731. Google ScholarDigital Library
- 2784766.Google Scholar
- H. Zhu, A. Nori, and S. Jagannathan. Dependent Array Type Inference from Tests. In VMCAI, 2015. doi: 10.1007/ 978-3-662-46081-8_23.Google ScholarDigital Library
- H. Zhu, G. Petri, and S. Jagannathan. Automatically Learning Shape Specifications. Technical report, Purdue Univsersity, 2016.Google Scholar
Index Terms
- Automatically learning shape specifications
Recommendations
Automatically learning shape specifications
PLDI '16This paper presents a novel automated procedure for discovering expressive shape specifications for sophisticated functional data structures. Our approach extracts potential shape predicates based on the definition of constructors of arbitrary user-...
Learning refinement types
ICFP '15We propose the integration of a random test generation system (capable of discovering program bugs) and a refinement type system (capable of expressing and verifying program invariants), for higher-order functional programs, using a novel lightweight ...
Using Modechart Modules for Testing Formal Specifications
HASE '99: The 4th IEEE International Symposium on High-Assurance Systems EngineeringAutomated model-checking of formal specifications for real-time systems has remained an elusive goal due to the {\em state-space} explosion problem. This paper describes an approach to testing formal specifications using automatically generated testing ...
Comments