packages feed

linearEqSolver 2.3 → 2.4

raw patch · 4 files changed

+13/−11 lines, 4 filesdep ~sbvPVP ok

version bump matches the API change (PVP)

Dependency ranges changed: sbv

API changes (from Hackage documentation)

+ Math.LinearEquationSolver: Bitwuzla :: Solver
+ Math.LinearEquationSolver: CVC5 :: Solver
+ Math.LinearEquationSolver: DReal :: Solver
+ Math.LinearEquationSolver: OpenSMT :: Solver

Files

CHANGES.md view
@@ -1,9 +1,13 @@ * Hackage: <http://hackage.haskell.org/package/linearEqSolver> * GitHub:  <http://github.com/LeventErkok/linearEqSolver> -* Latest Hackage released version: 2.1+* Latest Hackage released version: 2.4 -### Version 2.1, 2019-5-13+### Version 2.4, 2024-12-24+  * Update to compile with more recent versions of GHC. Thanks to+    Kevin Tew for reporting the breakage.++### Version 2.1-2.3, 2019-5-13   * Update to compile with more recent versions of SBV. Thanks to     Colin McKibben for reporting the breakage. 
Math/LinearEquationSolver.hs view
@@ -13,6 +13,8 @@ -- solution variants are supported. --------------------------------------------------------------------------------- +{-# LANGUAGE FlexibleContexts #-}+ module Math.LinearEquationSolver (        -- * Available SMT solvers        -- $solverInfo@@ -79,7 +81,7 @@ -- We have: -- -- >>> solveIntegerLinearEqsAll Z3 3 [[2, 3, 4],[6, -3, 9]] [20, -6]--- [[-47,-2,30],[-34,0,22],[-21,2,14]]+-- [[-34,0,22],[-21,2,14],[-8,4,6]] -- -- The solutions you get might differ, depending on what the solver returns. (Though they'll be correct!) solveIntegerLinearEqsAll :: Solver          -- ^ SMT Solver to use@@ -125,7 +127,7 @@ -- In this case, the system has infinitely many solutions. We can compute three of them as follows: -- -- >>> solveRationalLinearEqsAll Z3 3 [[2.4, 3.6]] [12]--- [[0 % 1,10 % 3],[3 % 4,17 % 6],[3 % 2,7 % 3]]+-- [[(-1) % 1,4 % 1],[0 % 1,10 % 3],[5 % 1,0 % 1]] -- -- The solutions you get might differ, depending on what the solver returns. (Though they'll be correct!) solveRationalLinearEqsAll :: Solver             -- ^ SMT Solver to use@@ -140,7 +142,7 @@         cfg  = (defaultSolverConfig s) {allSatMaxModelCount = Just maxNo}  -- | Build the constraints as given by the coefficient matrix and the resulting vector-buildConstraints :: (Ord a, Num a, SymVal a) => String -> [[a]] -> [a] -> Symbolic SBool+buildConstraints :: (Ord a, Num a, Num (SBV a), SymVal a) => String -> [[a]] -> [a] -> Symbolic SBool buildConstraints f coeffs res   | m == 0 || any (/= n) ns || m /= length res   = error $ f ++ ": received ill-formed input."
README.md view
@@ -3,7 +3,3 @@ Solve systems of linear equations, using SMT solvers. Both integer only solutions and solutions over rationals are supported. Either single solutions, or all solutions can be computed. See the inline comments in the haddock documentation for example use cases.--### Build Status--[![Build Status](https://secure.travis-ci.org/LeventErkok/linearEqSolver.png?branch=master)](http://travis-ci.org/LeventErkok/linearEqSolver)
linearEqSolver.cabal view
@@ -1,5 +1,5 @@ Name:          linearEqSolver-Version:       2.3+Version:       2.4 Category:      Math, SMT Synopsis:      Use SMT solvers to solve linear systems over integers and rationals Description:   Solve linear systems of equations over integers and rationals, using an SMT solver.@@ -29,5 +29,5 @@ Library   default-language: Haskell2010   ghc-options     : -Wall-  Build-Depends   : base >= 4.9 && < 5, sbv+  Build-Depends   : base >= 4.9 && < 5, sbv >= 11.0   Exposed-modules : Math.LinearEquationSolver