Higher-Order Constrained Horn Clauses and Refinement Types

Motivated by applications in automated verification of higher-order functional programs, we develop a notion of constrained Horn clauses in higher-order logic and a decision problem concerning their satisfiability. We show that, although satisfiable systems of higher-order clauses do not generally have least models, there is a notion of canonical model obtained through a reduction to a problem concerning a kind of monotone logic program. Following work in higher-order program verification, we develop a refinement type system in order to reason about and automate the search for models. This provides a sound but incomplete method for solving the decision problem. Finally, we show that there is a sense in which we can use refinement types to express properties of terms whilst staying within the higher-order constrained Horn clause framework.

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

[2]  Andrey Rybalchenko,et al.  Solving Existentially Quantified Horn Clauses , 2013, CAV.

[3]  E. Börger Computation Theory and Logic , 1987, Lecture Notes in Computer Science.

[4]  S. Lane Categories for the Working Mathematician , 1971 .

[5]  C.-H. Luke Ong,et al.  A type-directed abstraction refinement approach to higher-order model checking , 2014, POPL.

[6]  Olivier Serre,et al.  C-SHORe: A collapsible approach to verifying higher-order programs , 2013, ICFP 2013.

[7]  Jorge A. Navas,et al.  The SeaHorn Verification Framework , 2015, CAV.

[8]  William W. Wadge Higher-Order Horn Logic Programming , 1991, ISLP.

[9]  Naoki Kobayashi,et al.  Saturation-Based Model Checking of Higher-Order Recursion Schemes , 2013, CSL.

[10]  Michael Kifer,et al.  HILOG: A Foundation for Higher-Order Logic Programming , 1993, J. Log. Program..

[11]  Mary Sheeran,et al.  Lava: hardware design in Haskell , 1998, ICFP '98.

[12]  C.-H. Luke Ong,et al.  A Type System Equivalent to the Modal Mu-Calculus Model Checking of Higher-Order Recursion Schemes , 2009, 2009 24th Annual IEEE Symposium on Logic In Computer Science.

[13]  Ranjit Jhala,et al.  Abstract Refinement Types , 2013, ESOP.

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

[15]  Rupak Majumdar,et al.  HMC: Verifying Functional Programs Using Abstract Interpreters , 2011, CAV.

[16]  Naoki Kobayashi,et al.  Dependent type inference with interpolants , 2009, PPDP '09.

[17]  Ashutosh Gupta,et al.  HSF(C): A Software Verifier Based on Horn Clauses - (Competition Contribution) , 2012, TACAS.

[18]  Naoki Kobayashi,et al.  Model Checking Higher-Order Programs , 2013, JACM.

[19]  Alwen Tiu,et al.  Programming in Higher-Order Logic , 2009 .

[20]  Ranjit Jhala,et al.  Refinement types for Haskell , 2014, ICFP.

[21]  Gopalan Nadathur,et al.  Higher-order Horn clauses , 1990, JACM.

[22]  Michael J. Maher,et al.  Constraint Logic Programming: A Survey , 1994, J. Log. Program..

[23]  John C. Reynolds,et al.  Definitional Interpreters for Higher-Order Programming Languages , 1972, ACM '72.

[24]  C.-H. Luke Ong,et al.  On Model-Checking Trees Generated by Higher-Order Recursion Schemes , 2006, 21st Annual IEEE Symposium on Logic in Computer Science (LICS'06).

[25]  William W. Wadge,et al.  Extensional Higher-Order Logic Programming , 2013, TOCL.

[26]  Nikolaj Bjørner,et al.  Program Verification as Satisfiability Modulo Theories , 2013, SMT@IJCAR.

[27]  Nikolaj Bjørner,et al.  Higher-order Program Verification as Satisfiability Modulo Theories with Algebraic Data-types , 2013, ArXiv.

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

[29]  Patrick Maxim Rondon,et al.  Liquid types , 2008, PLDI '08.

[30]  Tachio Terauchi Dependent types from counterexamples , 2010, POPL '10.

[31]  Nikolaj Bjørner,et al.  On Solving Universally Quantified Horn Clauses , 2013, SAS.

[32]  Suresh Jagannathan,et al.  Compositional and Lightweight Dependent Type Inference for ML , 2013, VMCAI.

[33]  Ranjit Jhala,et al.  Bounded refinement types , 2015, ICFP.

[34]  Nikolaj Bjørner,et al.  μZ- An Efficient Engine for Fixed Points with Constraints , 2011, CAV.

[35]  Naoki Kobayashi,et al.  Automating relatively complete verification of higher-order functional programs , 2013, POPL.

[36]  James Lipton,et al.  Higher-Order Logic Programming Languages with Constraints: A Semantics , 2007, TLCA.

[37]  Zoltán Ésik,et al.  Minimum Model Semantics for Extensional Higher-order Logic Programming with Negation , 2014, Theory Pract. Log. Program..