Git Product home page Git Product logo

lineareqsolver's People

Contributors

leventerkok avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

lineareqsolver's Issues

Exception when using Z3

I get the following error when trying to solve a system of equations using Z3 and linearEqSolver v2.3:

GHCi, version 8.6.5: http://www.haskell.org/ghc/ :? for help
Prelude> import Math.LinearEquationSolver
Prelude Math.LinearEquationSolver> solveIntegerLinearEqs Z3 [[1,-1],[3,-2]] [0,-1]
*** Exception: Unable to locate executable for Z3
Executable specified: "z3"

CallStack (from HasCallStack):
error, called at ./Data/SBV/SMT/SMT.hs:573:23 in sbv-8.6-4QEWrfdds2bERRyL3UyeG:Data.SBV.SMT.SMT

Cabal install of v2.0 fails

When installing v2.0 of linearEqSolver from Cabal, the build fails with the following error:

Math/LinearEquationSolver.hs:143:29: error: Not in scope: type constructor or class ‘SymWord’ Perhaps you meant ‘SWord’ (imported from Data.SBV) | 143 | buildConstraints :: (Num a, SymWord a) => String -> [[a]] -> [a] -> Symbolic SBool |

building fails against sbv-3.1 /w ghc-7.8.3

As mentioned in the title: building fails for me with sbv-3.1 and with ghc-7.8.3.

[1 of 1] Compiling Math.LinearEquationSolver ( Math/LinearEquationSolver.hs, dist/build/Math/LinearEquationSolver.o )

Math/LinearEquationSolver.hs:36:7:
    Ambiguous occurrence ‘Solver’
    It could refer to either ‘Math.LinearEquationSolver.Solver’,
                             defined at Math/LinearEquationSolver.hs:33:1
                          or ‘Data.SBV.Solver’,
                             imported from ‘Data.SBV’ at Math/LinearEquationSolver.hs:27:1-43
                             (and originally defined in ‘sbv-3.1:Data.SBV.BitVectors.Data’)
[...]

Making this change re-enables compilation:

--- LinearEquationSolver.hs.old 2014-08-27 19:59:24.000000000 +0200
+++ LinearEquationSolver.hs 2014-08-27 19:27:14.000000000 +0200
@@ -24,7 +24,7 @@
     ,  solveRationalLinearEqsAll
     ) where

-import           Data.SBV hiding (z3, cvc4)
+import           Data.SBV hiding (z3, cvc4, Solver)
 import qualified Data.SBV as SBV (z3, cvc4)

 -- | Interface to the SMT solver, via the SBV library. Unless you need to create

Solutions are not computed lazily

Hello Levent!

I may be misunderstanding something, but when I run this example code from the documentation:

>>> take 3 `fmap` solveRationalLinearEqsAll Z3 [[2.4, 3.6]] [12]
[[0 % 1,10 % 3],[(-3) % 2,13 % 3],[(-3) % 4,23 % 6]]

I see no results (in both interpreted and compiled code). Any idea what the problem might be? Thanks!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.