• Home
  • Search
  • Verifying Catamorphism-Based Contracts using Constrained Horn Clauses
  • Cite Icon11
  • https://doi.org/10.1017/s1471068422000175Copy DOI Icon

Verifying Catamorphism-Based Contracts using Constrained Horn Clauses

Show More
  • Abstract
  • PDF
  • Literature Map
  • References
  • Citations
  • Similar Papers
Abstract

Abstract We address the problem of verifying that the functions of a program meet their contracts, specified by pre/postconditions. We follow an approach based on constrained Horn clauses (CHCs) by which the verification problem is reduced to the problem of checking satisfiability of a set of clauses derived from the given program and contracts. We consider programs that manipulate algebraic data types (ADTs) and a class of contracts specified by catamorphisms, that is, functions defined by simple recursion schemata on the given ADTs. We show by several examples that state-of-the-art CHC satisfiability tools are not effective at solving the satisfiability problems obtained by direct translation of the contracts into CHCs. To overcome this difficulty, we propose a transformation technique that removes the ADT terms from CHCs and derives new sets of clauses that work on basic sorts only, such as integers and booleans. Thus, when using the derived CHCs there is no need for induction rules on ADTs. We prove that the transformation is sound, that is, if the derived set of CHCs is satisfiable, then so is the original set. We also prove that the transformation always terminates for the class of contracts specified by catamorphisms. Finally, we present the experimental results obtained by an implementation of our technique when verifying many non-trivial contracts for ADT manipulating programs.

Loading PDF

Similar Papers
  • PDF
  • Research Article
  • Citations25

Solving constrained Horn clauses modulo algebraic data types and recursive functions

  • Jan 12, 2022
  • Proceedings of the ACM on Programming Languages
  • Hari Govind V K +2
  • PDF
  • Research Article
  • Citations1

Catamorphic Abstractions for Constrained Horn Clause Satisfiability

  • Oct 29, 2024
  • Theory and Practice of Logic Programming
  • Emanuele De Angelis +3
  • Conference Article
  • Citations19

Constraint Specialisation in Horn Clause Verification

  • Jan 13, 2015
  • Bishoksan Kafle +1
  • Research Article
  • Citations11

Constraint specialisation in Horn clause verification

  • Feb 21, 2017
  • Science of Computer Programming
  • Bishoksan Kafle +1
  • Research Article
  • Citations2

A Fixed-point Theorem for Horn Formula Equations

  • Sep 13, 2021
  • Electronic Proceedings in Theoretical Computer Science
  • Stefan Hetzl +1
  • Research Article
  • Citations16

Ultimate TreeAutomizer (CHC-COMP Tool Description)

  • Jul 09, 2019
  • Electronic Proceedings in Theoretical Computer Science
  • Daniel Dietsch +4
  • Book Chapter

Relatively Complete and Efficient Partial Quantifier Elimination

  • Jan 01, 2025
  • Estifanos Getachew +2
  • Conference Article
  • Citations22

Specification synthesis with constrained Horn clauses

  • Jun 18, 2021
  • Sumanth Prabhu +3
  • Conference Article
  • Citations3

Proactive Synthesis of Recursive Tree-to-String Functions from Examples

  • Jan 01, 2017
  • arXiv (Cornell University)
  • Mikaël Mayer +2
  • Conference Article
  • Citations6

Generating Random Structurally Rich Algebraic Data Type Values

  • Mar 19, 2019
  • Agustin Mista +1
  • Book Chapter
  • Citations3

Towards a Language for Defining Reusable Programming Language Components

  • Jan 01, 2022
  • Cas Van Der Rest +1
  • Conference Article
  • Citations11

Algebraic data types for language-integrated queries

  • Jan 22, 2013
  • George Giorgidze +3
  • Book Chapter
  • Citations3

Algebraic Data Types

  • Jan 01, 2009
  • Barry Jay
  • Conference Article
  • Citations10

RADA: a tool for reasoning about algebraic data types with abstractions

  • Aug 18, 2013
  • Tuan-Hung Pham +1
  • Book Chapter
  • Citations25

A Framework for Extended Algebraic Data Types

  • Jan 01, 2006
  • Martin Sulzmann +2
Cactus Communications logo

Copyright 2026 Cactus Communications. All rights reserved.