Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/hopv/hoice
An ICE-based predicate synthesizer for Horn clauses.
https://github.com/hopv/hoice
horn-clauses ice inference verify
Last synced: 3 months ago
JSON representation
An ICE-based predicate synthesizer for Horn clauses.
- Host: GitHub
- URL: https://github.com/hopv/hoice
- Owner: hopv
- License: apache-2.0
- Created: 2017-07-25T06:09:40.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2024-04-20T09:21:43.000Z (7 months ago)
- Last Synced: 2024-05-22T20:30:50.537Z (6 months ago)
- Topics: horn-clauses, ice, inference, verify
- Language: Rust
- Homepage:
- Size: 3.02 MB
- Stars: 47
- Watchers: 5
- Forks: 11
- Open Issues: 7
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-rust-formalized-reasoning - hoice - ICE-based Constrained Horn Clause (CHC) solver. (Projects / Provers and Solvers)
README
![CI](https://github.com/hopv/hoice/workflows/ci/badge.svg)
`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](https://www.rust-lang.org) on your system. The recommended way to do this is to use [`rustup`](https://www.rustup.rs/).
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.
```bash
rustup update stable
```Installing hoice with `cargo`:
```bash
cargo install --git https://github.com/hopv/hoice
```To build hoice manually, clone this repository, `cd` in the directory and run
```bash
cargo build --release
```
The binary file will be in `target/release/hoice`.To get the fastest version, compile hoice with
```bash
cargo build --release --features "bench"
```Note that this disables some features such as verbose output, profiling...
## z3
`hoice` relies on the [z3](https://github.com/Z3Prover/z3) SMT-solver. Make sure you have a relatively recent version of the z3 binary in your path.
# Language
[Consult the wiki](https://github.com/hopv/hoice/wiki/Language) for a description of `hoice`'s language.
# Features
- [x] `define-fun`s
- [x] `Bool`
- [x] `Int`
- [x] `Real`
- [x] `Array` (naive)
- [x] `List`
- [x] (mutually recursive) ADTsFuture features:
- [ ] user-specified qualifiers through `define-fun`s
# 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
```bash
hoice | tee
```and use the `--check` option to verify that the predicates inferred verify all the horn clauses:
```bash
hoice --check
```# Latest version
This repository hosts the latest stable version of hoice. See the [main
developer's fork][main dev fork] for a cutting edge, although unstable,
version.# Contributing
We welcome any help, please the [contribution guidelines](https://github.com/hopv/hoice/wiki/Contributing) if you are not familiar with the github pull request workflow to get started.
# License
`hoice` is released under the [Apache 2 license](./LICENSE.md). Please note in particular that the [`NOTICE.md`](./NOTICE.md) file from this repository must be available if you redistribute `hoice` in a source or binary format.
[benchs]: https://github.com/hopv/benchmarks/tree/master/clauses (hopv benchmarks)
[main dev fork]: https://github.com/AdrienChampion/hoice (AdrienChampion's fork of hoice on github)