Advertisement

An Improved Unrolling-Based Decision Procedure for Algebraic Data Types

  • Tuan-Hung Pham
  • Michael W. Whalen
Part of the Lecture Notes in Computer Science book series (LNCS, volume 8164)

Abstract

Reasoning about algebraic data types and functions that operate over these data types is an important problem for a large variety of applications. In this paper, we present a decision procedure for reasoning about data types using abstractions that are provided by catamorphisms: fold functions that map instances of algebraic data types into values in a decidable domain. We show that the procedure is sound and complete for a class of monotonic catamorphisms.

Our work extends a previous decision procedure that solves formulas involving algebraic data types via successive unrollings of catamorphism functions. First, we propose the categories of monotonic catamorphisms and associative-commutative catamorphisms, which we argue provide a better formal foundation than previous categorizations of catamorphisms. We use monotonic catamorphisms to fix an incompleteness in the previous unrolling algorithm (and associated proof). We then use these notions to address two open problems from previous work: (1) we provide a bound on the number of unrollings necessary for completeness, showing that it is exponentially small with respect to formula size for associative-commutative catamorphisms, and (2) we demonstrate that associative-commutative catamorphisms can be combined within a formula whilst preserving completeness.

Keywords

Data Type Decision Procedure Parametric Logic Tree Shape Predicate Abstraction 
These keywords were added by machine and not by the authors. This process is experimental and the keywords may be updated as the learning algorithm improves.

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. 1.
    Barrett, C., Conway, C.L., Deters, M., Hadarean, L., Jovanović, D., King, T., Reynolds, A., Tinelli, C.: CVC4. In: Gopalakrishnan, G., Qadeer, S. (eds.) CAV 2011. LNCS, vol. 6806, pp. 171–177. Springer, Heidelberg (2011)CrossRefGoogle Scholar
  2. 2.
    Barrett, C., Shikanian, I., Tinelli, C.: An Abstract Decision Procedure for Satisfiability in the Theory of Recursive Data Types. Electronic Notes in Theoretical Computer Science 174(8), 23–37 (2007)CrossRefGoogle Scholar
  3. 3.
    Barrett, C., Stump, A., Tinelli, C.: The SMT-LIB Standard: Version 2.0. In: SMT (2010)Google Scholar
  4. 4.
    Bruttomesso, R., Pek, E., Sharygina, N., Tsitovich, A.: The OpenSMT solver. In: Esparza, J., Majumdar, R. (eds.) TACAS 2010. LNCS, vol. 6015, pp. 150–153. Springer, Heidelberg (2010)CrossRefGoogle Scholar
  5. 5.
    De Moura, L., Bjørner, N.: Z3: An Efficient SMT Solver. In: Ramakrishnan, C.R., Rehof, J. (eds.) TACAS 2008. LNCS, vol. 4963, pp. 337–340. Springer, Heidelberg (2008)CrossRefGoogle Scholar
  6. 6.
    Epp, S.S.: Discrete Mathematics with Applications, 4th edn. Brooks/Cole Publishing Co. (2010)Google Scholar
  7. 7.
    Flajolet, P., Sedgewick, R.: Analytic Combinatorics. Cambridge University Press (2009)Google Scholar
  8. 8.
    Ganzinger, H., Hagen, G., Nieuwenhuis, R., Oliveras, A., Tinelli, C.: DPLL(T): Fast Decision Procedures. In: Alur, R., Peled, D.A. (eds.) CAV 2004. LNCS, vol. 3114, pp. 175–188. Springer, Heidelberg (2004)CrossRefGoogle Scholar
  9. 9.
    Hardin, D., Slind, K., Whalen, M., Pham, T.-H.: The Guardol Language and Verification System. In: Flanagan, C., König, B. (eds.) TACAS 2012. LNCS, vol. 7214, pp. 18–32. Springer, Heidelberg (2012)CrossRefGoogle Scholar
  10. 10.
    Jacobs, S., Kuncak, V.: Towards Complete Reasoning about Axiomatic Specifications. In: Jhala, R., Schmidt, D. (eds.) VMCAI 2011. LNCS, vol. 6538, pp. 278–293. Springer, Heidelberg (2011)CrossRefGoogle Scholar
  11. 11.
    Kaufmann, M., Manolios, P., Moore, J.: Computer-Aided Reasoning: ACL2 Case Studies. Springer (2000)Google Scholar
  12. 12.
    Kobayashi, N., Sato, R., Unno, H.: Predicate Abstraction and CEGAR for Higher-Order Model Checking. In: PLDI, pp. 222–233 (2011)Google Scholar
  13. 13.
    Koshy, T.: Catalan Numbers with Applications. Oxford University Press (2009)Google Scholar
  14. 14.
    Madhusudan, P., Parlato, G., Qiu, X.: Decidable Logics Combining Heap Structures and Data. In: POPL, pp. 611–622 (2011)Google Scholar
  15. 15.
    Madhusudan, P., Qiu, X., Stefanescu, A.: Recursive Proofs for Inductive Tree Data-Structures. In: POPL, pp. 123–136 (2012)Google Scholar
  16. 16.
    Oppen, D.C.: Reasoning About Recursively Defined Data Structures. J. ACM 27(3), 403–411 (1980)CrossRefMATHMathSciNetGoogle Scholar
  17. 17.
    Pham, T.-H., Whalen, M.W.: Abstractions in Decision Procedures for Algebraic Data Types. Technical Report 13-006, Department of Computer Science and Engineering, University of Minnesota (2013), http://www.msse.umn.edu/publications/tech-reports/13-006
  18. 18.
    Pham, T.-H., Whalen, M.W.: RADA: A Tool for Reasoning about Algebraic Data Types with Abstractions. In: ESEC/FSE (to appear, 2013)Google Scholar
  19. 19.
    Rosen, K.H.: Discrete Mathematics and Its Applications, 7th edn. McGraw-Hill Higher Education (2012)Google Scholar
  20. 20.
    Sato, R., Unno, H., Kobayashi, N.: Towards a Scalable Software Model Checker for Higher-Order Programs. In: PEPM, pp. 53–62 (2013)Google Scholar
  21. 21.
    Sofronie-Stokkermans, V.: Locality Results for Certain Extensions of Theories with Bridging Functions. In: Schmidt, R.A. (ed.) CADE-22. LNCS, vol. 5663, pp. 67–83. Springer, Heidelberg (2009)CrossRefGoogle Scholar
  22. 22.
    Stanley, R.P.: Enumerative Combinatorics, vol. 2. Cambridge University Press (2001)Google Scholar
  23. 23.
    Suter, P., Dotta, M., Kuncak, V.: Decision Procedures for Algebraic Data Types with Abstractions. In: POPL, pp. 199–210 (2010)Google Scholar
  24. 24.
    Suter, P., Köksal, A.S., Kuncak, V.: Satisfiability Modulo Recursive Programs. In: Yahav, E. (ed.) SAS 2011. LNCS, vol. 6887, pp. 298–315. Springer, Heidelberg (2011)CrossRefGoogle Scholar
  25. 25.
    Zee, K., Kuncak, V., Rinard, M.: Full Functional Verification of Linked Data Structures. In: PLDI, pp. 349–361 (2008)Google Scholar
  26. 26.
    Zee, K., Kuncak, V., Rinard, M.C.: An Integrated Proof Language for Imperative Programs. In: PLDI, pp. 338–351 (2009)Google Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 2014

Authors and Affiliations

  • Tuan-Hung Pham
    • 1
  • Michael W. Whalen
    • 1
  1. 1.University of MinnesotaUSA

Personalised recommendations