Decision Tree Learning in CEGIS-Based Termination Analysis

We present a novel decision tree-based synthesis algorithm of ranking functions for verifying program termination. Our algorithm is integrated into the workflow of CounterExample Guided Inductive Synthesis (CEGIS). CEGIS is an iterative learning model where, at each iteration, (1) a synthesizer synthesizes a candidate solution from the current examples, and (2) a validator accepts the candidate solution if it is correct, or rejects it providing counterexamples as part of the next examples. Our main novelty is in the design of a synthesizer: building on top of a usual decision tree learning algorithm, our algorithm detects cycles in a set of example transitions and uses them for refining decision trees. We have implemented the proposed method and obtained promising experimental results on existing benchmark sets of (non-)termination verification problems that require synthesis of piecewise-defined lexicographic affine ranking functions.

[1]  Robert W. Floyd,et al.  Assigning Meanings to Programs , 1993 .

[2]  Matthias Heizmann,et al.  Ranking Templates for Linear Loops , 2014, Log. Methods Comput. Sci..

[3]  Sriram Sankaranarayanan,et al.  Probabilistic Program Analysis with Martingales , 2013, CAV.

[4]  Eric Koskinen,et al.  Constraint-based Relational Verification , 2021, CAV.

[5]  Jürgen Giesl,et al.  Automated Detection of Non-termination and NullPointerExceptions for Java Bytecode , 2011, FoVeOOS.

[6]  Eric Koskinen,et al.  Program Verification via Predicate Constraint Satisfiability Modulo Theories , 2020, ArXiv.

[7]  Dan Roth,et al.  Learning invariants using decision trees and implication counterexamples , 2016, POPL.

[8]  Sanjit A. Seshia,et al.  Combinatorial sketching for finite programs , 2006, ASPLOS XII.

[9]  P. Ezudheen,et al.  Horn-ICE learning for synthesizing invariants and contracts , 2018, Proc. ACM Program. Lang..

[10]  Laure Gonnord,et al.  Synthesis of ranking functions using extremal counterexamples , 2015, PLDI.

[11]  Amir M. Ben-Amram,et al.  Ranking Functions for Linear-Constraint Loops , 2012, JACM.

[12]  Caterina Urban,et al.  The Abstract Domain of Segmented Ranking Functions , 2013, SAS.

[13]  Arie Gurfinkel,et al.  Synthesizing Ranking Functions from Bits and Pieces , 2016, TACAS.

[14]  Christof Löding,et al.  ICE: A Robust Framework for Learning Invariants , 2014, CAV.

[15]  Antoine Miné,et al.  A Decision Tree Abstract Domain for Proving Conditional Termination , 2014, SAS.

[16]  Todd Millstein,et al.  Overfitting in Synthesis: Theory and Practice (Extended Version) , 2019, CAV.

[17]  Suresh Jagannathan,et al.  A data-driven CHC solver , 2018, PLDI.

[18]  Yueling Zhang,et al.  Syntax-Guided Termination Analysis , 2018, CAV.

[19]  Samir Genaim,et al.  On Multiphase-Linear Ranking Functions , 2017, CAV.

[20]  Andreas Podelski,et al.  A Complete Method for the Synthesis of Linear Ranking Functions , 2004, VMCAI.

[21]  Todd D. Millstein,et al.  Data-driven precondition inference with learned features , 2016, PLDI.

[22]  Thomas A. Henzinger,et al.  Proving non-termination , 2008, POPL '08.

[23]  Thomas Wies,et al.  Learning Invariants using Decision Trees , 2015, ArXiv.

[24]  Hiroshi Unno,et al.  Probabilistic Inference for Predicate Constraint Satisfaction , 2020, AAAI.

[25]  Samir Genaim,et al.  Multiphase-Linear Ranking Functions and their Relation to Recurrent Sets , 2018, SAS.

[26]  Paul Feautrier,et al.  Multi-dimensional Rankings, Program Termination, and Complexity Bounds of Flowchart Programs , 2010, SAS.

[27]  Nikolaj Bjørner,et al.  Horn Clause Solvers for Program Verification , 2015, Fields of Logic and Computation II.

[28]  Jochen Hoenicke,et al.  Termination Analysis by Learning Terminating Programs , 2014, CAV.

[29]  Jürgen Giesl,et al.  Proving Non-looping Non-termination Automatically , 2012, IJCAR.

[30]  Antoine Miné,et al.  An Abstract Domain to Infer Ordinal-Valued Ranking Functions , 2014, ESOP.

[31]  Naoki Kobayashi,et al.  ICE-Based Refinement Type Discovery for Higher-Order Functional Programs , 2018, Journal of Automated Reasoning.