An Improved Unrolling-Based Decision Procedure for Algebraic Data Types

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.

[1]  Michael W. Whalen,et al.  RADA: a tool for reasoning about algebraic data types with abstractions , 2013, ESEC/FSE 2013.

[2]  Cesare Tinelli,et al.  An Abstract Decision Procedure for Satisfiability in the Theory of Recursive Data Types , 2007, PDPAR/PaUL@FLoC.

[3]  Renate A. Schmidt Automated Deduction - CADE-22, 22nd International Conference on Automated Deduction, Montreal, Canada, August 2-7, 2009. Proceedings , 2009, CADE.

[4]  Viktor Kuncak,et al.  Towards Complete Reasoning about Axiomatic Specifications , 2011, VMCAI.

[5]  Philippe Flajolet,et al.  Analytic Combinatorics , 2009 .

[6]  Naoki Kobayashi,et al.  Predicate abstraction and CEGAR for higher-order model checking , 2011, PLDI '11.

[7]  Viorica Sofronie-Stokkermans,et al.  Locality Results for Certain Extensions of Theories with Bridging Functions , 2009, CADE.

[8]  Viktor Kuncak,et al.  Decision procedures for algebraic data types with abstractions , 2010, POPL '10.

[9]  Naoki Kobayashi,et al.  Towards a scalable software model checker for higher-order programs , 2013, PEPM '13.

[10]  P. Flajolet,et al.  Analytic Combinatorics: RANDOM STRUCTURES , 2009 .

[11]  Derek C. Oppen,et al.  Reasoning about recursively defined data structures , 1978, POPL.

[12]  Panagiotis Manolios,et al.  Computer-aided reasoning : ACL2 case studies , 2000 .

[13]  Kenneth H. Rosen,et al.  Discrete Mathematics and its applications , 2000 .

[14]  Rajeev Alur,et al.  A Temporal Logic of Nested Calls and Returns , 2004, TACAS.

[15]  Alan Bundy,et al.  Constructing Induction Rules for Deductive Synthesis Proofs , 2006, CLASE.

[16]  Clark W. Barrett,et al.  The SMT-LIB Standard Version 2.0 , 2010 .

[17]  T. Koshy Catalan Numbers with Applications , 2008 .

[18]  Cesare Tinelli,et al.  DPLL( T): Fast Decision Procedures , 2004, CAV.

[19]  Xiaokang Qiu,et al.  Decidable logics combining heap structures and data , 2011, POPL '11.

[20]  Xiaokang Qiu,et al.  Recursive proofs for inductive tree data-structures , 2012, POPL '12.

[21]  Viktor Kuncak,et al.  Full functional verification of linked data structures , 2008, PLDI '08.

[22]  Viktor Kuncak,et al.  An integrated proof language for imperative programs , 2009, PLDI '09.

[23]  Michael W. Whalen,et al.  Abstractions in Decision Procedures for Algebraic Data Types , 2013 .

[24]  Nikolaj Bjørner,et al.  Z3: An Efficient SMT Solver , 2008, TACAS.

[25]  R. Stanley Enumerative Combinatorics: Volume 1 , 2011 .

[26]  Roberto Bruttomesso,et al.  The OpenSMT Solver , 2010, TACAS.

[27]  Kousha Etessami,et al.  Analysis of Recursive Game Graphs Using Data Flow Equations , 2004, VMCAI.

[28]  Charalambos A. Charalambides,et al.  Enumerative combinatorics , 2018, SIGA.

[29]  Viktor Kuncak,et al.  Satisfiability Modulo Recursive Programs , 2011, SAS.