Skip to content

Latest commit

 

History

History
102 lines (60 loc) · 3.06 KB

README.md

File metadata and controls

102 lines (60 loc) · 3.06 KB

CI

hoice is an ICE-based Constrained Horn Clause (CHC) solver.

Given some CHCs mentioning some undefined predicates, hoice infers definitions for these predicate that respect all CHCs or prove none exist. Hoice supports the Bool, Int and Real sorts. It also supports user-defined ADTs, although it is still in an experimental stage.

Install

If you haven't already, install Rust on your system. The recommended way to do this is to use rustup.

Hoice generally uses the latest rust features available. Make sure the rust ecosystem is up to date by running the following command before building hoice.

rustup update stable

Installing hoice with cargo:

cargo install --git https://github.com/hopv/hoice

To build hoice manually, clone this repository, cd in the directory and run

cargo build --release

The binary file will be in target/release/hoice.

To get the fastest version, compile hoice with

cargo build --release --features "bench"

Note that this disables some features such as verbose output, profiling...

z3

hoice relies on the z3 SMT-solver. Make sure you have a relatively recent version of the z3 binary in your path.

Language

Consult the wiki for a description of hoice's language.

Features

  • define-funs
  • Bool
  • Int
  • Real
  • Array (naive)
  • List
  • (mutually recursive) ADTs

Future features:

  • user-specified qualifiers through define-funs

Checking the result

hoice can check its own results. The code performing this feature is completely separated from the code doing the actual inference so that the check is meaningful.

In fact, the code for this is almost implemented as some string substitutions followed by an SMT query for each clause of the problem.

For now, this feature is completely off-line. Put hoice's result in a file, for instance with

hoice <horn_clause_file> | tee <output_file>

and use the --check option to verify that the predicates inferred verify all the horn clauses:

hoice --check <output_file> <horn_clause_file>

Latest version

This repository hosts the latest stable version of hoice. See the main developer's fork for a cutting edge, although unstable, version.

Contributing

We welcome any help, please the contribution guidelines if you are not familiar with the github pull request workflow to get started.

License

hoice is released under the Apache 2 license. Please note in particular that the NOTICE.md file from this repository must be available if you redistribute hoice in a source or binary format.