An ICE-based predicate synthesizer for Horn clauses.
Switch branches/tags
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
rsc
src
tests
.appveyor.yml
.clippy.toml
.gitignore
.travis.yml
Cargo.lock
Cargo.toml
LICENSE
NOTICE.md
README.md
_config.yml

README.md

hoice is a Horn Clause ICE engine.

It infers predicates verifying a set of horn clauses.

linux / macos windows
Build Status Build status codecov

hoice supports the Bool, Int and Real sorts.

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.