Skip to content

jSMTLIB 0.17.0

Choose a tag to compare

@github-actions github-actions released this 02 Nov 03:39
2992662

Changes since the 0.16.0 release.

This release adds an alt-ergo adapter and solver capability descriptions, and brings jSMTLIB's checking much closer to the SMT-LIB standard: logic restrictions are now enforced, and a review of the expression classes and of the source's FIXMEs fixed many conformance gaps. It also fixes two unsound translations in the Simplify adapter.

API changes

  • SolverCapabilities describes what each solver supports (#157).
  • IParameterizedIdentifier.head() returns ISymbol, and the ParameterizedIdentifier constructor takes an ISymbol. A nested indexed head was accepted before and its inner indices silently lost.
  • ICommand extends IPosable (every implementation already did).
  • SMT.Configuration.isOKKeyword: a keyword is a colon followed by a simple symbol. The standard's own :56 example contradicts its definition (#185).
  • An SMTLIB version enum, and errors reading the properties files are reported (#155).
  • Removed: the unused Sexpr.Expr wrapper and TypeChecker.convert.
  • The test solver reports jSMTLIB's own version for :version.

Solvers

  • New alt-ergo 2.6.3 adapter, using no-success pipelining with echo barriers. It runs in CI on Linux x86_64.
  • --seed reaches z3 4.5+, yices2 and smtinterpol, and is reported where a solver has no seed.
  • Simplify:
    • Two unsound translations are fixed. let lifted its bindings out as top-level equations, so two lets binding the same name could give a false unsat; bindings are now substituted. A :named name was left undefined, so a later use of it could give a false sat.
    • Bool values can be used as terms (#160). A define-fun with parameters is defined by a quantified axiom (#95).
    • Logics, sorts and operators Simplify cannot decide are rejected. Invalid. means sat only in QF_UF; elsewhere the answer is unknown, with :reason-unknown incomplete.
  • bitwuzla answers unsupported for datatype, recursive-function and sort-parameter commands. Every adapter has assert-mode guards.
  • yices2: -t maps to its per-check-sat timeout, get-info :status conforms, and models print as SMT-LIB.
  • z3 4.3 and 4.5:
    • check-sat-assuming is sent as a legacy check-sat, with matching error columns.
    • z3 4.3.2's extra success lines no longer misalign replies.
    • The z3-4.3 adapter sends get-option to the solver.

Solver output

  • Once the solver process has exited, every command gets one error: The solver process has exited. A pipelined exit reports any output read with its response.
  • A reply on standard output is no longer displaced by standard-error text written with it. Standard error is drained before replying once standard output ends.
  • Line numbers in solver error messages are those of the source file.
  • An empty reply is an error. get-model's (model ...) wrapper is stripped. Response kinds are checked with and without pipelining (#149). get-info replies keep every attribute.

Type checking and conformance

  • Logic restrictions are enforced:
    • AUFNIRA and AUFLIRA implicit Int-to-Real casts.
    • Array sorts in QF_AUFBV and related logics.
    • The atom forms of QF_UFIDL, QF_IDL and QF_RDL.
    • Linearity of n-ary products.
    • QF_RDL constants follow QF_RDL.smt2: a decimal is an error, and only a warning under --relax.
    • get-value terms are checked against the logic.
  • Expression syntax:
    • (! t) needs at least one attribute.
    • (_ char #xH) takes a hexadecimal index.
    • Non-ASCII characters are accepted in quoted symbols (SMT-LIB 2.5 and later), and symbols containing them print with bars.
    • Binary and hexadecimal literals are equal only when width and value are both equal.
    • (as f S) is allowed for a non-overloaded f, and an ambiguous overloaded use is reported as ambiguous.
    • Duplicate define-funs-rec parameters are errors.
    • Sorts of one family with different arities are not equal.
    • match finds the constructors of bar-quoted datatype sorts.
  • The test solver supports parametric datatypes and testers (#167, #168). reset-assertions keeps a primary frame and scopes datatype constructors (#166). set-info takes any attribute.
  • Start-mode options after set-logic are errors (allowed with --relax). --logics "" is an error. ((nil) 0) is an error (a warning under --relax).
  • For API callers, errors for commands issued before set-logic carry the command's position. After exit, the test solver answers further commands as a process-based solver does.

Command line

  • Ctrl-X aborts the command being read or executed. Interactive --abort resumes on the next line.
  • An empty --exec, --solver, --out or --diag argument is an error.
  • A failed solver start is reported once.
  • Exit codes are documented in SMT.exec.

Tests, CI and documentation

  • A golden whose only fault is that the solver accepts what the standard forbids is now .lenient, not .bad. That covers about 150 goldens, and the rule is stated in the README.
  • tests/logics has one folder per logic, and duplicated tests are removed.
  • RunTests is removed (#152). Script tests run with a private home directory (#171). New tests come from a coverage assessment.

The suite passes in CI on Linux x86_64 and ARM64, macOS ARM64 and x86_64, and Windows (release commit 2992662).