hsmt-0.1.0.0: CHANGELOG.md
# Revision history for hsmt
## 0.1.0.0 -- unreleased
* Core term language: sorts, operators, dynamic sort checking, hash-consing.
* Reference evaluator implementing SMT-LIB semantics for integers,
bit-vectors, arrays, strings and records.
* Type-safe API (`HSMT`): type-level sorts, records with labels,
uninterpreted functions, typed models, push/pop.
* CDCL SAT solver with DPLL(T) hooks, assumptions and failed-assumption cores.
* DPLL(T) engine with Tseitin encoding and model validation.
* EUF theory: congruence closure with explanations and transitivity lemmas.
* SMT-LIB 2 printer, parser and script runner; the `hsmt` executable
accepts `.smt2` files.
* Differential test suite against Z3 (`hsmt-diff`): results, models,
incremental sequences and ground-term semantics; divergences are saved as
`.smt2` regressions replayed by `hsmt-test`.
* Linear integer arithmetic: general simplex with backtrackable bounds,
branch-and-bound and Gomory cuts; division and remainder by literals,
`abs`, and division by zero as an uninterpreted function.
* Model-based combination of EUF and LIA.
* Bit-vectors by bit-blasting, with SMT-LIB semantics for division by zero,
and model-based combination with EUF.
* Arrays: read-over-write and constant-array axioms instantiated on demand,
extensionality with fresh indices, default values for infinite index sorts
and full expansion of small finite index sorts; nested arrays, arrays as
arguments of uninterpreted functions, and array models.
* Simplex only inspects basic variables whose value or bounds changed; EUF
checks disequalities only when one of their sides changes class.
* Records as single-constructor datatypes in congruence closure: selection
axioms, eta axioms (`r = mk(get_f1 r, ...)`) and functional update; record
fields of every supported sort, nested records, records in arrays and as
array indices, records as arguments and results of uninterpreted functions.
* Strings (without regular expressions): bounded encoding with an integer
length and 18-bit characters per string term; constraints are valid for
strings of any length, so refutations that do not use the length bound are
proofs, and the bound grows from 8 up to 32 characters before answering
`unknown`. All SMT-LIB string operators of the core: concatenation,
`len`, `at`, `substr`, `contains`, `prefixof`, `suffixof`, `indexof`,
`replace`, `to_int`, `from_int`, `<` and `<=`; ground string terms are
evaluated.
* Incremental solving: each solver instance keeps one engine session across
checks (terms, clauses, learnt clauses and theory lemmas are reused);
formulas are SAT assumptions, so `push`/`pop` only change which formulas
are assumed.
* Unsatisfiable cores (`Unsat (Core ctx)`, `coreAssertions`,
`coreAssumptions`), optionally minimal (`cfgMinimizeCores`), and
`checkSatAssuming`.
* Resource limits per check: `cfgTimeout` (milliseconds) and
`cfgConflictLimit`.
* SMT-LIB: named assertions, `check-sat-assuming`, `get-unsat-core`, and the
options `:timeout` and `:smt.core.minimize`.
* Floating point (SMT-LIB `FloatingPoint` theory) by bit-blasting: every
format, the five rounding modes, arithmetic, `fma`, `sqrt`, `rem`,
`roundToIntegral`, `min`/`max`, comparisons, classification, `fp`, and
conversions between formats and to and from bit-vectors; unspecified
results are functions of their arguments. Exact reference semantics in
`HSMT.Core.Float`; typed API with `'FPS eb sb`, `'RoundingModeS`,
`Float16S`/`Float32S`/`Float64S` and `FloatingPoint` values.
* SMT-LIB front end: `let`, `define-sort`, `define-const`, scoped
declarations (`pop` removes them), `reset`, `reset-assertions`,
`get-model`, `get-value`, `get-assertions`, `get-info`, `get-option`,
`:print-success`, and `bvnand`, `bvnor`, `bvxnor`, `bvcomp`, `rotate_left`,
`rotate_right` and `repeat`. Scripts run command by command
(`runScriptWith`): an error answers `(error ...)` and the script goes on.
* The `hsmt` executable reads the standard input and accepts `--timeout`,
`--minimize-cores`, `--validate`, `--help` and `--version`.
* Benchmarks in `bench/smtlib` with `:status` annotations, checked by the
test suite; `cabal bench` compares answers and times with Z3.
* Haddock for every module and a tutorial (`HSMT.Tutorial`) whose examples
are tested.
* Regular expressions (SMT-LIB `RegLan`): `str.to_re`, `str.in_re`, `re.none`,
`re.all`, `re.allchar`, `re.++`, `re.union`, `re.inter`, `re.*`, `re.+`,
`re.opt`, `re.range`, `re.comp`, `re.diff`, `re.loop` and `re.^`, for
ground expressions. Reference semantics by Brzozowski derivatives
(`HSMT.Core.Regex`); membership is encoded by running the automaton of the
expression over the bounded string encoding, with length lemmas and
lemmas from the relations between the languages of atoms on the same
string. Typed API: `'RegLanS`, `toRe`, `inRe`, `reConcat`, `reUnion`...
* External backend (`HSMT.Backend`, `HSMT.Backend.External`): `cfgBackend`
selects the Haskell engine or an external solver process (`z3Backend`,
or any `ExternalSolver`) behind the same API and SMT-LIB runner; answers,
cores and models (read from `get-model` and `get-value`) come back as
with the engine. The executable takes `--solver=CMD`. The API,
incremental and SMT-LIB file tests also run with Z3, and `hsmt-diff`
compares both backends through the API.