Changelog for hasmtlib-2.8.1
Changelog
All notable changes to the hasmtlib library will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to PVP versioning.
v2.8.1 (2024-11-29)
Added
- Added instances
Semigroup,MonoidandContravariantforDebugger
v2.8.0 (2024-11-28)
Changed
- Replaced representation of
RealSortvalues in Haskell withRationalinstead ofDouble
v2.7.2 (2024-11-27)
Added
- Added dependency
constrained-some
Changed
- Replaced internal usages of custom existential
SomeSMTSortwithSome1fromconstrained-some
Removed
- Removed module
Language.Hasmtlib.Internal.Constraint
v2.7.1 (2024-10-05)
Changed
- Cardinality constraints in
Language.Hasmtlib.Countingnow use specialized and more efficient encodings for a few cases. - Debugging with debugger
statisticallynow prints a more comprehensive overview about the problem size. - Fixed bug where setting multiple custom
SMTOptions would only set the most recent. - Fixed bug where timeout for
SMT/OMTwould not work. - Added smart constructors for
ite.
v2.7.0 (2024-09-12)
Added
- Added helpful instances for standard types for
Codecto ease deriving. - Added decorator
timingoutinLanguage.Hasmtlib.Type.Solverto set a time-out for solvers. Unfortunately as of SMTLib standard v2.6 there is no SMT-Option for this. Although some solvers likeZ3(unreliably) support it, we instead do it by internally coordinating the kill of the solver process from Haskell usingSystem.Timeout.Lifted#timeout. Works like a charme. - Added
Language.Hasmtlib.Type.Debuggerfor debugging problem construction and solver interaction.
Changed
- (breaking change) Completely revised the way solver process-configurations are handled and debugged.
Solvers which previously had the type
Process.Configfromsmtlib-backendsnow have the typeSolverConfigfromLanguage.Hasmtlib.Type.Solver. This bundles information on the executable of the solver with additional information such as debugging and time-outs. Actual solver creation still is done by funtionsolver. Therefore this change is only breaking, if you created custom solvers or debugged solvers. - Debugging solvers changed from
solveWith (debug z3 def) $ ...tosolveWith (solver $ debugging z3 def) $ .... Also note that there are plenty debugging configurations besidesdefexisting inLanguage.Hasmtlib.Type.Debuggernow. - Interactive solving before was a two-stepper like
iZ3 <- interactiveSolver z3 ; interactiveWith iZ3 $ .... LeveragingSolverConfigthis has been changed to a more uniform way withinteractiveWith z3 $ do .... Also note thatdebugInteractiveWith z3 $ ...now is replaced byinteractiveWith (debugging def z3) $ ....
Removed
- Removed
Language.Hasmtlib.Solver.Common. Contents are now inLanguage.Hasmtlib.Type.Solver.
v2.6.3 (2024-09-07)
Added
- Added a solver configuration
bitwuzlaKissatforBitwuzlawith underlying SAT-SolverKissat.
Changed
- Removed
solveMinimizedDebug&solveMaximizedDebug. Use the modifiedsolveMinimized&solveMaximizedinstead. You can also provide a step-size now. - Fixed a bug where
MonadOMT#solvewould runget-modelalthough the solver did not necessarily respond withSat. SharingModefor sharing common (sub-)expressions now defaults toNone. The previous defaultStableNamesin general is only worth using, when your program can benefit a lot from sharing. Otherwise it may drastically downgrade solver performance due to abundance of sharing-variables. If you still want to use it, runsetSharingMode StableNameswithin the problems monad.
v2.6.2 (2024-09-04)
Changed
- Functions for enconding cardinality-constraints in
Language.Hasmtlib.Countingnow use specialized encodings for some cardinalities - improving solvers efficiency.
v2.6.1 (2024-09-02)
Added
- Added module 'Language.Hasmtlib.Type.Relation' for encoding binary relations
- Added rich documentation and usage examples for all public modules
v2.6.0 (2024-08-27)
Added
- Support for signed BitVec operations.
- Added constructor
RemforExpr t.
Changed
- (breaking change) Enhanced the type of
BvSort NattoBvSort BvEnc NatwhereBvEnc = Unsigned | Signed. Before, the API only allowed unsigned BitVec, thereforeBvSort nnow becomesBvSort Unsigned n. The promoted typeBvEncis phantom and only used for differentiating instances forNum, ... - Moved
Language.Hasmtlib.Internal.BitvectoLanguage.Hasmtlib.Type.Bitvec, exported API withLanguage.Hasmtlib - Removed constructors
StrLTandStrLTHEfromExpr t. - Fixed wrong implementation of Num for
Bitvec.(+),(-)and(*)had invalid definitions.
v2.5.1 (2024-08-26)
Added
- Added
SharingMode = None | StableNamesinLanguage.Hasmtlib.Internal.Sharing. Defaults toStableNames. - Added function
setSharingModewhich allows you to change theSharingMode.
Changed
runSharinginLanguage.Hasmtlib.Internal.Sharingnow differentiates sharing behavior based on newly given argument of typeSharingMode
v2.5.0 (2024-08-25)
Added
- added instances
Eq,Ord,GEqandGCompareforExpr t - added instances
RealandEnumforExpr IntSort,Expr RealSortandExpr (BvSort n) - added instance
IntegralforExpr IntSortandExpr (BvSort n) - added instance
BitsforExpr BoolSortandExpr (BvSort n)
Changed
- Removed
Language.Hasmtlib.Integraled: use the addedIntegralinstance instead - Removed redundant BitVec constructors from
Exprand replaced usage in instances with the more generic existing ones. For example: WhereBvNotwas used previously, we now useNotwhich is already used for Expr BoolSort. Differentiation between such operations now takes place inLanguage.Hasmtlib.Internal.Render#renderwhen rendering expressions, e.g. renderingbvnotforBvSortandnotforBoolSort. Therefore there is no behavioral change for the solver. - Removed functions
bvRotLandbvRotRfromLanguage.Hasmtlib.Type.Expr: use the addedBitsinstance instead withrotateLandrotateR
v2.4.0 (2024-08-21)
Added
- Added observable sharing with
Language.Hasmtlib.Internal.Sharing. Thank you fabeulous@github for the great help! - Added
Language.Hasmtlib.Internal.Uniplate1for plating GADTs
Changed
- Deleted and moved
Language.Hasmtlib.Equatable,Language.Hasmtlib.Orderable,Language.Hasmtlib.Iteable&Language.Hasmtlib.Internal.ExprintoLanguage.Hasmtlib.Type.Expr
v2.3.2 (2024-08-17)
Changed
- Internal replacement of
Prelude.liftA2for backwards compatiblity - Fixed bug where
solveMaximizedDebugwould solve minimized instead of maximized
v2.3.1 (2024-08-16)
Changed
- Instances for
Boolean,Num&FractionalonExprnow use smart constructors
v2.3.0 (2024-08-12)
Added
- Added full SMTLib2.6-standard support for sort String
- Added module
Language.Hasmtlib.Lensfeaturinginstance Plated (Expr t)for rewriting
Changed
- Export constructors of
Expr t instance Show (Expr t)now displays expressions in SMTLib2-Syntax
v2.2.0 (2024-08-09)
Added
- Added multiple basic instances for
Equatable,Orderable,Iteable,Variable&Codec
Changed
- (breaking change)
Variable&Codecnow ship with aGenericdefault implementation instead of relying onApplicative. This will break your instances if the type does not have an instance forGeneric.
v2.1.0 (2024-07-26)
Added
- Added solver Bitwuzla
- Added debugging capabilities for
Pipeby introducingdebugInteractiveWith
Changed
- Yices now uses flag
--incrementalby default - (breaking change) Removed functional dependency
m -> sfromMonadIncrSMT s m. This forces you to specify the underlying state when usinginteractiveWith. ThereforeinteractiveWith cvc5Living $ do ...now becomesinteractiveWith @Pipe cvc5Living $ do .... - (breaking change) Removed
newtype ProcessSolverand replaced it with underlyingSMTLIB.Backends.Process.Config. This may only affect you if you instantiated custom solvers.
v2.0.1 (2024-07-23)
Added
- Added more documentation
Changed
(<==>)now hasinfixr 4(<==)now hasinfixl 0
v2.0.0 (2024-07-23)
Added
- Arithmetic functions:
isIntSort,toIntSort&toRealSort - Asserting maybe-formulas:
assertMaybe :: MonadSMT s m => Maybe (Expr BoolSort) -> m () - Logical equivalence
(<==>)& reverse logical implication(<==) - Solvers: OpenSMT, OptiMathSAT
- Iterative refinement optimizations utilizing incremental stack
- Custom solver options via
Custom String String :: SMTOption - Optimization Modulo Theories (OMT) / MaxSMT support with:
minimize,maximize&assertSoft
Changed
- (breaking change) The functions
solveranddebugwhich createSolvers fromProcessSolvers are polymorph in the statesnow. This requires you to annotate the mentioned functions with the targetted state. These areSMTandOMT. For example,solverWith (solver cvc5) $ do ...becomessolverWith (solver @SMT cvc5) $ do .... - Prefix
xornow has aninfix 4
v1.3.1 (2024-07-12)
Added
- Added
countinLanguage.Hasmtlib.Counting
v1.3.0 (2024-07-12)
Added
- Added cardinality constraints with
Language.Hasmtlib.Counting
v1.2.0 (2024-07-11)
Added
- Added n-ary comparisons
distinct&equal
Changed
- (breaking change) When using
interactiveWiththeSMTOptionIncrementalis no longer set by default anymore
v1.1.2 (2024-07-02)
Changed
- Minor internal changes
v1.1.1 (2024-06-25)
Added
- Added this
CHANGELOG.mdfile
v1.1.0 (2024-06-21)
Added
- Added
ArraySortand full support for its SMTLib2 standard specification