skip to main content
10.1145/1706299.1706325acmconferencesArticle/Chapter ViewAbstractPublication PagespoplConference Proceedingsconference-collections
research-article

Decision procedures for algebraic data types with abstractions

Authors Info & Claims
Published:17 January 2010Publication History

ABSTRACT

We describe a family of decision procedures that extend the decision procedure for quantifier-free constraints on recursive algebraic data types (term algebras) to support recursive abstraction functions. Our abstraction functions are catamorphisms (term algebra homomorphisms) mapping algebraic data type values into values in other decidable theories (e.g. sets, multisets, lists, integers, booleans). Each instance of our decision procedure family is sound; we identify a widely applicable many-to-one condition on abstraction functions that implies the completeness. Complete instances of our decision procedure include the following correctness statements: 1) a functional data structure implementation satisfies a recursively specified invariant, 2) such data structure conforms to a contract given in terms of sets, multisets, lists, sizes, or heights, 3) a transformation of a formula (or lambda term) abstract syntax tree changes the set of free variables in the specified way.

References

  1. F. Baader and S. Ghilardi. Connecting many-sorted theories. In CADE, pages 278--294, 2005. Google ScholarGoogle ScholarDigital LibraryDigital Library
  2. F. Baader and W. Snyder. Unification theory. In Handbook of Automated Reasoning. Elsevier, 2001.Google ScholarGoogle ScholarCross RefCross Ref
  3. M. Barnett, K.R.M. Leino, and W. Schulte. The Spec# programming system: An overview. In CASSIS: Int. Workshop on Construction and Analysis of Safe, Secure and Interoperable Smart devices, 2004. Google ScholarGoogle ScholarDigital LibraryDigital Library
  4. C. Barrett, S. Ranise, A. Stump, and C. Tinelli. The Satisfiability Modulo Theories Library (SMT-LIB). http://www.SMT-LIB.org, 2009.Google ScholarGoogle Scholar
  5. C. Barrett, I. Shikanian, and C. Tinelli. An abstract decision procedure for satisfiability in the theory of recursive data types. Electronic Notes in Theoretical Computer Science, 174(8):23--37, 2007. Google ScholarGoogle ScholarDigital LibraryDigital Library
  6. C. Barrett and C. Tinelli. CVC3. In CAV, 2007. Google ScholarGoogle ScholarDigital LibraryDigital Library
  7. B. Beckert, R. Hähnle, and P.H. Schmitt, editors. Verification of Object-Oriented Software: The KeY Approach. LNCS 4334. Springer, 2007. Google ScholarGoogle ScholarDigital LibraryDigital Library
  8. N. Bjørner, N. Tillmann, and A. Voronkov. Path feasibility analysis for string-manipulating programs. In TACAS, pages 307--321, 2009. Google ScholarGoogle ScholarDigital LibraryDigital Library
  9. E. Börger, E. Grädel, and Y. Gurevich. The Classical Decision Problem. Springer-Verlag, 1997.Google ScholarGoogle ScholarCross RefCross Ref
  10. C. Boyapati, S. Khurshid, and D. Marinov. Korat: Automated testing based on Java predicates. In ISSTA, 2002. Google ScholarGoogle ScholarDigital LibraryDigital Library
  11. A.R. Bradley and Z. Manna. The Calculus of Computation. Springer, 2007.Google ScholarGoogle Scholar
  12. R. Cartwright and M. Fagan. Soft typing. In PLDI, 1991. Google ScholarGoogle ScholarDigital LibraryDigital Library
  13. K. Claessen and J. Hughes. Quickcheck: a lightweight tool for random testing of haskell programs. In ICFP, pages 268--279, 2000. Google ScholarGoogle ScholarDigital LibraryDigital Library
  14. 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. Google ScholarGoogle ScholarDigital LibraryDigital Library
  15. H. Comon and C. Delor. Equational formulae with membership constraints. Information and Computation, 112(2):167--216, 1994. Google ScholarGoogle ScholarDigital LibraryDigital Library
  16. L. de Moura and N. Bjørner. Z3: An efficient SMT solver. In TACAS, pages 337--340, 2008. Google ScholarGoogle ScholarDigital LibraryDigital Library
  17. L. de Moura and N. Bjørner. Generalized, efficient array decision procedures. In FMCAD, 2009.Google ScholarGoogle ScholarCross RefCross Ref
  18. J. Dunfield. A Unified System of Type Refinements. PhD thesis, Carnegie Mellon University, 2007. CMU-CS-07-129.Google ScholarGoogle Scholar
  19. J. Dunfield and F. Pfenning. Tridirectional typechecking. In POPL, pages 281--292, 2004. Google ScholarGoogle ScholarDigital LibraryDigital Library
  20. P. Fontaine. Combinations of theories and the Bernays-Schönfinkel-Ramsey class. In VERIFY, 2007.Google ScholarGoogle Scholar
  21. H. Ganzinger, G. Hagen, R. Nieuwenhuis, A. Oliveras, and C. Tinelli. DPLL(T): Fast decision procedures. In CAV, 2004.Google ScholarGoogle Scholar
  22. S. Ghilardi. Model theoretic methods in combined constraint satisfiability. J. Automated Reasoning, 33(3-4):221--249, 2005. Google ScholarGoogle ScholarDigital LibraryDigital Library
  23. M. Gligoric, T. Gvero, V. Jagannath, S. Khurshid, V. Kuncak, and D. Marinov. On test generation through programming in UDITA. Technical Report LARA-REPORT-2009-05, EPFL, Sep. 2009.Google ScholarGoogle Scholar
  24. C.A.R. Hoare. Proof of correctness of data representations. Acta Informatica, 1(4):271--281, 1971.Google ScholarGoogle ScholarDigital LibraryDigital Library
  25. W. Hodges. Model Theory, volume 42 of Encyclopedia of Mathematics and its Applications. Cambridge University Press, 1993.Google ScholarGoogle Scholar
  26. P.F. Hoogendijk and R.C. Backhouse. Relational programming laws in the tree, list, bag, set hierarchy. Sci. Comput. Program., 22(1-2), 1994. Google ScholarGoogle ScholarDigital LibraryDigital Library
  27. C. Ihlemann, S. Jacobs, and V. Sofronie-Stokkermans. On local reasoning in verification. In TACAS, pages 265--281, 2008. Google ScholarGoogle ScholarDigital LibraryDigital Library
  28. J. Jaffar. Minimal and complete word unification. Journal of the ACM, 37(1):47--85, 1990. Google ScholarGoogle ScholarDigital LibraryDigital Library
  29. M. Kawaguchi, P.M. Rondon, and R. Jhala. Type-based data structure verification. In PLDI, pages 304--315, 2009. Google ScholarGoogle ScholarDigital LibraryDigital Library
  30. S. Krstić, A. Goel, J. Grundy, and C. Tinelli. Combined satisfiability modulo parametric theories. In TACAS, 2007. Google ScholarGoogle ScholarDigital LibraryDigital Library
  31. V. Kuncak. Modular Data Structure Verification. PhD thesis, EECS Department, Massachusetts Institute of Technology, February 2007. Google ScholarGoogle ScholarDigital LibraryDigital Library
  32. V. Kuncak, P. Lam, K. Zee, and M. Rinard. Modular pluggable analyses for data structure consistency. IEEE Transactions on Software Engineering, 32(12), December 2006. Google ScholarGoogle ScholarDigital LibraryDigital Library
  33. V. Kuncak, H.H. Nguyen, and M. Rinard. Deciding boolean algebra with presburger arithmetic. J. Automated Reasoning, 2006. Google ScholarGoogle ScholarDigital LibraryDigital Library
  34. V. Kuncak and M. Rinard. Structural subtyping of non-recursive types is decidable. In LICS, 2003. Google ScholarGoogle ScholarDigital LibraryDigital Library
  35. V. Kuncak and M. Rinard. Decision procedures for set-valued fields. In International Workshop on Abstract Interpretation of Object-Oriented Languages, 2005.Google ScholarGoogle ScholarDigital LibraryDigital Library
  36. V. Kuncak and M. Rinard. Towards efficient satisfiability checking for Boolean Algebra with Presburger Arithmetic. In CADE, 2007. Google ScholarGoogle ScholarDigital LibraryDigital Library
  37. S. Lahiri and S. Qadeer. Back to the future: revisiting precise program verification using SMT solvers. In POPL, 2008. Google ScholarGoogle ScholarDigital LibraryDigital Library
  38. S.K. Lahiri and S. Qadeer. Verifying properties of well-founded linked lists. In POPL, 2006. Google ScholarGoogle ScholarDigital LibraryDigital Library
  39. P. Lam, V. Kuncak, and M. Rinard. Generalized typestate checking for data structure consistency. In VMCAI, 2005. Google ScholarGoogle ScholarDigital LibraryDigital Library
  40. P. Maier. Deciding extensions of the theories of vectors and bags. In VMCAI, 2009. Google ScholarGoogle ScholarDigital LibraryDigital Library
  41. G. Makanin. The problem of solvability of equations in a free semigroup. Math. USSR Sbornik, pages 129--198, 1977. (In AMS, (1979)).Google ScholarGoogle ScholarCross RefCross Ref
  42. A.I. Mal'cev. Chapter 23: Axiomatizable classes of locally free algebras of various types. In The Metamathematics of Algebraic Systems, volume 66. North Holland, 1971.Google ScholarGoogle Scholar
  43. Z. Manna, H.B. Sipma, and T. Zhang. Verifying balanced trees. In LFCS, pages 363--378, 2007. Google ScholarGoogle ScholarDigital LibraryDigital Library
  44. J. McCarthy. Recursive functions of symbolic expressions and their computation by machine, part 1. Comm. A.C.M., 3:184--195, 1960. Google ScholarGoogle ScholarDigital LibraryDigital Library
  45. S. McPeak and G.C. Necula. Data structure specifications via local equality axioms. In CAV, pages 476--490, 2005. Google ScholarGoogle ScholarDigital LibraryDigital Library
  46. E. Meijer, M. Fokkinga, and R. Paterson. Functional programming with bananas, lenses, envelopes and barbed wire. In FPCA, volume 523 of LNCS, 1991. Google ScholarGoogle ScholarDigital LibraryDigital Library
  47. A. Møller and M.I. Schwartzbach. The Pointer Assertion Logic Engine. In Proc. PLDI, 2001. Google ScholarGoogle ScholarDigital LibraryDigital Library
  48. G. Nelson and D.C. Oppen. Simplification by cooperating decision procedures. TOPLAS, 1(2):245--257, 1979. Google ScholarGoogle ScholarDigital LibraryDigital Library
  49. G. Nelson and D.C. Oppen. Fast decision procedures based on congruence closure. Journal of the ACM, 27(2):356--364, 1980. Google ScholarGoogle ScholarDigital LibraryDigital Library
  50. H.H. Nguyen, C. David, S. Qin, and W.-N. Chin. Automated verification of shape, size and bag properties via separation logic. In VMCAI, 2007. Google ScholarGoogle ScholarDigital LibraryDigital Library
  51. M. Odersky, L. Spoon, and B. Venners. Programming in Scala: a comprehensive step-by-step guide. Artima Press, 2008. Google ScholarGoogle ScholarDigital LibraryDigital Library
  52. C. Okasaki. Purely Functional Data Structures. Cambridge University Press, 1998. Google ScholarGoogle ScholarDigital LibraryDigital Library
  53. D.C. Oppen. Reasoning about recursively defined data structures. In POPL, pages 151--157, 1978. Google ScholarGoogle ScholarDigital LibraryDigital Library
  54. C.H. Papadimitriou. On the complexity of integer programming. Journal of the ACM, 28(4):765--768, 1981. Google ScholarGoogle ScholarDigital LibraryDigital Library
  55. R. Piskac and V. Kuncak. Decision procedures for multisets with cardinality constraints. In VMCAI, number 4905 in LNCS, 2008. Google ScholarGoogle ScholarDigital LibraryDigital Library
  56. R. Piskac and V. Kuncak. Linear arithmetic with stars. In CAV, 2008. Google ScholarGoogle ScholarDigital LibraryDigital Library
  57. W. Plandowski. Satisfiability of word equations with constants is in PSPACE. Journal of the ACM, 51(3), 2004. Google ScholarGoogle ScholarDigital LibraryDigital Library
  58. J.A. Robinson. A machine-oriented logic based on the resolution principle. J. ACM, 12(1), 1965. Google ScholarGoogle ScholarDigital LibraryDigital Library
  59. P.M. Rondon, M. Kawaguchi, and R. Jhala. Liquid types. In PLDI, pages 159--169, 2008. Google ScholarGoogle ScholarDigital LibraryDigital Library
  60. T. Rybina and A. Voronkov. A decision procedure for term algebras with queues. ACM Transactions on Computational Logic (TOCL), 2(2):155--181, 2001. Google ScholarGoogle ScholarDigital LibraryDigital Library
  61. V. Sofronie-Stokkermans. Locality results for certain extensions of theories with bridging functions. In CADE, 2009. Google ScholarGoogle ScholarDigital LibraryDigital Library
  62. C. Tinelli and C. Zarba. Combining nonstably infinite theories. Journal of Automated Reasoning, 34(3), 2005. Google ScholarGoogle ScholarDigital LibraryDigital Library
  63. D. Walker and G. Morrisett. Alias types for recursive data structures. In Workshop on Types in Compilation, 2000. Google ScholarGoogle ScholarDigital LibraryDigital Library
  64. T. Wies, V. Kuncak, P. Lam, A. Podelski, and M. Rinard. Field constraint analysis. In VMCAI, 2006. Google ScholarGoogle ScholarDigital LibraryDigital Library
  65. T. Wies, R. Piskac, and V. Kuncak. Combining theories with shared set operations. In FroCoS: Frontiers in Combining Systems, 2009. Google ScholarGoogle ScholarDigital LibraryDigital Library
  66. H. Xi. Dependently typed pattern matching. Journal of Universal Computer Science, 9(8):851--872, 2003.Google ScholarGoogle Scholar
  67. K. Zee, V. Kuncak, and M. Rinard. Full functional verification of linked data structures. In PLDI, 2008. Google ScholarGoogle ScholarDigital LibraryDigital Library
  68. T. Zhang, H.B. Sipma, and Z. Manna. The decidability of the first-order theory of Knuth-Bendix order. In CADE, 2005. Google ScholarGoogle ScholarDigital LibraryDigital Library
  69. T. Zhang, H.B. Sipma, and Z. Manna. Decision procedures for term algebras with integer constraints. Inf. Comput., 204(10):1526--1574, 2006. Google ScholarGoogle ScholarDigital LibraryDigital Library
  70. D. Zhu and H. Xi. Safe programming with pointers through stateful views. In PADL, 2005. Google ScholarGoogle ScholarDigital LibraryDigital Library

Index Terms

  1. Decision procedures for algebraic data types with abstractions

            Recommendations

            Comments

            Login options

            Check if you have access through your login credentials or your institution to get full access on this article.

            Sign in
            • Published in

              cover image ACM Conferences
              POPL '10: Proceedings of the 37th annual ACM SIGPLAN-SIGACT symposium on Principles of programming languages
              January 2010
              520 pages
              ISBN:9781605584799
              DOI:10.1145/1706299
              • cover image ACM SIGPLAN Notices
                ACM SIGPLAN Notices  Volume 45, Issue 1
                POPL '10
                January 2010
                500 pages
                ISSN:0362-1340
                EISSN:1558-1160
                DOI:10.1145/1707801
                Issue’s Table of Contents

              Copyright © 2010 ACM

              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 ACM 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: 17 January 2010

              Permissions

              Request permissions about this article.

              Request Permissions

              Check for updates

              Qualifiers

              • research-article

              Acceptance Rates

              Overall Acceptance Rate824of4,130submissions,20%

              Upcoming Conference

              POPL '25

            PDF Format

            View or Download as a PDF file.

            PDF

            eReader

            View online with eReader.

            eReader