Changelog for what4-1.7.1.0
1.7.1 (November 2025)
- Add
asGround :: IsExpr e => e tp -> Maybe (GroundValue tp) - Add
What4.Concretize, a module for concretizing symbolic values using models from solvers. - Expose
ExprBuilder's uninterpreted function cache - Fix a bug in which
sbvToIntegercould erroneously throw anarithmetic underflowexception when called on a length-1 signed bitvector.
1.7 (March 2025)
- The
BoolMapparameter ofConjPredis now aConjMap. This is anewtypewrapper aroundBoolMapthat makes clear that theBoolMapin question represents a conjunction (asBoolMaps may also represent disjunctions). See the Haddocks onConjMapfor more details.
1.6.3 (Feb 2025)
- Fixed a bug where
What4.Protocol.SMTLib2.shutdownSolverwould raise an exception if the solver process had already terminated. This can occur when a solver fails to gracefully time out and the process is killed viaWhat4.Protocol.killSolver.
1.6.2 (Sep 2024)
- Allow building with GHC 9.10.
1.6.1 (Sep 2024)
-
Fix a bug in which
what4's CVC5 adapter would fail to parse models involving structs. (#265) -
Add
What4.Expr.GroundEval.groundToSym, which allows injectingGroundValues back intoSymExprs. (#268)
1.6 (May 2024)
-
Allow building with GHC 9.8.
-
Add more robust support for Constrained Horn Clause (CHC) solving:
- The
IsSymExprBuilderclass now has two additional methods,transformPredBV2LIAandtransformSymFnLIA2BV, which describe how to transform a bitvector (BV) predicate into a linear integer arithmetic (LIA) predicate and vice versa. - The
runZ3HornandwriteZ3HornSMT2Filefunctions now take an additionalBoolargument. When this argument isTrue, Z3 will transform bitvector CHCs into linear integer arithmetic CHCs, which can sometimes help Z3 to solve CHC problems that it couldn't in a bitvector setting.
- The
-
Add support for the
bitwuzlaSMT solver. -
Add
bvZeroandbvOnefunctions, which are convenient shorthand for constructing bitvectors with the values0and1, respectively. -
Add
pushMuxOpsandpushMuxOpsOption. If this option is enabled, What4 will push certainExprBuilderoperations (e.g.,zext) down to the branches ofiteexpressions. In some (but not all) circumstances, this can result in operations that are easier for SMT solvers to reason about. -
annotateTermno longer adds annotations to bound variable expressions, which already have annotations attached to them. This should result in slightly better performance and better pretty-printing.
1.5.1 (October 2023)
- Require building with
versions >= 6.0.2.
1.5 (July 2023)
-
Allow building with GHC 9.6.
-
The
MonadTrans (PartialT sym)instance now has aIsExpr (SymExpr sym)constraint in its instance context. (This is a requirement imposed byMonadTransgaining a quantifiedMonadsuperclass inmtl-2.3.) -
Make
what4simplify expressions of the form(bvult (bvadd a c) (bvadd b c))to(bvult a b)when it is sound to do so.
1.4 (January 2023)
-
Allow building with GHC 9.4.
-
Remove the
MonadFailinstance forVarRecorder, as this instance is no longer straightforward to define due to upstream changes inbase-4.17.0.0. This instance ultimately callederroranyways, so any uses offailat typeVarRecordercan be replaced witherrorwithout any change in behavior. -
Remove a dependency on
data-binary-ieee754, which has been deprecated. -
Deprecate
allSupportedwhich represents the SMT logicALL_SUPPORTED, and addallLogicinstead which represents the SMTLib standard logicALL. -
Add support for the cvc5 SMT solver.
-
Add a
get-abductfeature which is compatible with cvc5. -
Add modules to support serialization and deserialization of what4 terms into an s-expression format that is a superset of SMTLib2. See the
What4.Serialize.Printer,What4.Serialize.Parser, andWhat4.Serialize.FastSExprmodules. Note that these modules have names that conflict with the now deprecated what4-serialize package, from which they were copied. If you are updating to this version of what4, delete your dependency on what4-serialize. -
Add support Syntax-Guided Synthesis (SyGuS) in CVC5 (through the
runCVC5SyGuSfunction) and Constrained Horn Clauses (CHC) in Z3 (through therunZ3Hornfunction). -
Make
what4smarter about simplifyingintMin x yandintMax x yexpressions when eitherx <= yory <= xcan be statically determined.
1.3 (April 2022)
-
Allow building with GHC 9.2.
-
According to this discussion, the
forallidentifier will be claimed, andforallmade into a full keyword. Therefore, theforallandexistscombinators ofWhat4.Protocol.SMTLib2.Syntaxhave been renamed intoforall_andexists_. -
Add operations for increased control over the scope of configuration options, both in the
What4.ConfigandWhat4.Expr.Buildermodules. -
Previously, the
exprCounter,sbUserState,sbUnaryThreshold, andsbCacheStartSizefields ofExprBuilderwere directly exposed; in principle this allows users to modify them, which was not intended in some cases. These have been uniformly renamed to remove thesbprefix, and exposed asGetterorLensvalues instead, as appropriate. -
The
sbBVDomainRangeLimitfields ofExprBuilderwas obsolete and has been removed. -
Allow building with
hashable-1.4.*:- Add
Eqinstances for all data types withHashableinstances that were missing correspondingEqinstances. This is required sincehashable-1.4.0.0adds anEqsuperclass toHashable. - Some
Hashableinstances now have extra constraints to match the constraints in their correspondingEqinstances. For example, theHashableinstance forSymNatnow has an extraTestEqualityconstraint to match itsEqinstance.
- Add
-
Add an
unsafeSetAbstractValuefunction to theIsExprclass which allows one to manually set theAbstractValueused in a symbolic expression. As the name suggests, this function is unsound in the general case, so use this with caution. -
Add a
What4.Utils.ResolveBounds.BVmodule, which provides aresolveSymBVfunction that checks if aSymBVis concrete. If it is not concrete, it returns the lower and upper version bounds, as determined by querying an online SMT solver. -
Add
arrayCopy,arraySet, andarrayRangeEqmethods toIsExprBuilder. -
Add a
getUnannotatedTermmethod toIsExprBuilderfor retrieving the original, unannotated term out of an annotated term. -
IsExprBuildernow hasfloatSpecialFunction{,0,1,2}andrealSpecialFunction{,0,1,2}methods which allow the use of special values or functions such aspi, trigonometric functions, exponentials, or logarithms. Similarly,IsInterpretedFloatExprBuildernow hasiFloatSpecialFunction{,0,1,2}methods. Although little solver support exists for special functions,what4may be able to prove properties about them in limited cases.- The
realPi,realLog,realExp,realSin,realCos,realTan,realSinh,realCosh,realTanh, andrealAtan2methods ofIsExprBuildernow have default implementations in terms ofrealSpecialFunction{,0,1,2}.
- The
-
Add an
exprUninterpConstantsmethod toIsSymExprBuilderwhich returns the set of uninterpreted constants in a symbolic expression. -
Add a
natToIntegerPurefunction which behaves likenatToIntegerbut without usingIO. -
asConcretenow supports concretizing float expressions by way of the newConcreteFloatconstructor inConcreteVal. -
Add a
z3Tacticconfiguration option toWhat4.Solver.Z3that allows specifying a custom tactic to pass toz3. -
safeSymbolnow replaces exclamation marks (!) with underscores (_) so that the generated names are legal in Verilog. -
Add
Foldable,Traversable, andShowinstances forLabeledPred. -
Fix a bug in which
what4would generate incorrect SMTLib code for array lookups and updates when using the CVC4 backend. -
Fix a bug in which
what4would incorrectly attempt to configure Boolector 3.2.2 or later. -
Fix a bug in which strings containing
\uor ending with\would be escaped incorrectly.
1.2.1 (June 2021)
- Include test suite data in the Hackage tarball.
1.2 (June 2021)
This is primarily a bugfix release, but also adds support for GHC 9.x
-
Tweaks to the
SolverEventdata type to remove partial fields. -
Fix issue #126. The shift operations of
What4.SWordwere not correctly handling cases where the shift amount has more bits than the word to be shifted. -
Fix issue #121. The ordering of inputs in generated Verilog files is now more predictable. Previously, it was determined by the order the inputs were encountered during term traversal. Now the user can provide a list of (input, name) pairs which are declared in order. Any additional inputs discovered during traversal will be added after these specified inputs.
-
Fix issue #113. The
bvSliceLEandbvSliceBEfunctions ofWhat4.SWorddid not properly handle size 0 bit-vectors and requests for 0 length slices. They now correctly fail for slice lengths longer than 0 on 0-length vectors, and correctly allow 0 length slices regardless of the length of the input. -
Fix issue #103. Some of the string operations would give incorrect results when string offsets are out-of-bounds. The SMTLib 2.6 standard specifies precise results for these cases, which we now implement.
-
Configuration parameters relative to solvers have been renamed in a more consistent and heirarchical fashion; the old configuration parameters still work but will emit deprecation warnings when used.
default_solver-->solver.defaultabc_path-->solver.abc.pathboolector_path-->solver.boolector.pathcvc4_path-->solver.cvc4.pathcvc4.random-seed-->solver.cvc4.random-seedcvc4_timeout-->solver.cvc4.timeoutdreal_path-->solver.dreal.pathstp_path-->solver.stp.pathstp.random-seed-->solver.stp.random-seedyices_path-->solver.yices.pathyices_enable-mcsat-->solver.yices.enable-mcsatyices_enable-interactive-->solver.yices.enable-interactiveyices_goal_timeout-->solver.yices.goal-timeoutyices.*-->solver.yices.*for many yices internal optionsz3_path-->solver.z3.pathz3_timeout-->solver.z3.timeout
-
Added the
solver.strict_parsingconfiguration parameter. This is enabled by default but could be disabled to allow running solvers in debug mode or to workaround other unexpected output from solver processes.
1.1 (February 2021)
-
Use multithread-safe storage primitive for configuration options, and clarify single-threaded use assumptions for other data structures.
-
Fix issue #63, which caused traversals to include the bodies of defined functions at call sites, which yielded confusing results.
-
Add concrete evaluation and constant folding for floating-point operations via the
libBFlibrary. -
Add min and max operations for integers and reals to the expression interface.
-
Remove
BaseNatTypefrom the set of base types. There were bugs relating to having nat types appear in structs, arrays and functions that were difficult to fix. Natural number values are still available as scalars (where they are represented by integers with nonzero assumptions) via theSymNattype. -
Support for exporting What4 terms to Verilog syntax.
-
Various documentation fixes and improvements.
-
Test coverage improvements.
-
Switch to use the
prettyprinterpackage for user-facing output.
1.0 (July 2020)
- Initial Hackage release