Defunctionalization of Higher-Order Constrained Horn Clauses

Long Pham, Steven J. Ramsay, C. -H. Luke Ong
10/8/2018
cs.PL

Official code: LongPham7/Defunctionalization-of-monotone-problems (1 star, Haskell, BSD-3-Clause, last commit 2019-05-21).

Abstract

Building on the successes of satisfiability modulo theories (SMT), Bjørner et al. initiated a research programme advocating Horn constraints as a suitable basis for automatic program verification. The notion of first-order constrained Horn clauses has recently been extended to higher-order logic by Cathcart Burn et al.

Show full abstract

To exploit the remarkable efficiency of SMT solving, a natural approach to solve systems of higher-order Horn constraints is to reduce them to systems of first-order Horn constraints. This paper presents a defunctionalization algorithm to achieve the reduction. Given a well-sorted higher-order constrained Horn clause (HoCHC) problem instance, the defunctionalization algorithm constructs a first-order well-sorted constrained Horn clause problem. In addition to well-sortedness of the algorithm's output, we prove that if an input HoCHC is solvable, then the result of its defunctionalization is solvable. The converse also holds, which we prove using a recent result on the continuous semantics of HoCHC. To our knowledge, this defunctionalization algorithm is the first sound and complete reduction from systems of higher-order Horn constraints to systems of first-order Horn constraints. We have constructed DefMono, a prototype implementation of the defunctionalization algorithm. It first defunctionalizes an input HoCHC problem and then feeds the result into a backend SMT solver. We have evaluated the performance of DefMono empirically by comparison with two other higher-order verification tools.

View on arXivView PDF

Code Implementations(1)

BSD-3-Clause

Defunctionalization of monotone logic program safety problems

10Haskell, YaccFeb 12, 20187 years agoBSD-3-Clause
constrained-horn-clausesdefunctionalizationhaskellverification

Similar Papers

Cite this paper

@article{pham2018defunctionalization,
  title  = {Defunctionalization of Higher-Order Constrained Horn Clauses},
  author = {Long Pham and Steven J. Ramsay and C. -H. Luke Ong},
  year   = {2018},
  eprint = {1810.03598},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/abs/1810.03598}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/1810.03598.svg)](https://codeofpaper.com/paper/1810.03598)

Discussion