GithubHelp home page GithubHelp logo

go-z3's People

Contributors

mattn avatar mitchellh avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

go-z3's Issues

build error

...
Checking code with gofmt..
gofmt -s *.go >/dev/null
go test -v
/usr/lib/gcc/x86_64-pc-linux-gnu/7.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: ./libz3.a(hwf.o): undefined reference to symbol 'fesetround@@GLIBC_2.2.5'
/lib64/libm.so.6: error adding symbols: DSO missing from command line
collect2: error: ld returned 1 exit status
FAIL _/home/vyrus/src/go-z3 [build failed]
make: *** [Makefile:25: test] Error 2


Linux 4.9.18-hardened #13 SMP Wed Apr 5 15:04:14 PDT 2017 x86_64 Intel(R) Core(TM) i7-6600U CPU @ 2.60GHz GenuineIntel GNU/Linux

go version devel +03c3bb5f84 Sat Sep 2 21:00:08 2017 +0000 linux/amd64

Error when testing

I built the projekt with make on Mac Os 11.1 BigSur. It builds fine but when testing I get the following error:

=== RUN   TestContextErrorHandler
    error_test.go:29: should call error handler
--- FAIL: TestContextErrorHandler (0.00s)
=== RUN   TestModelAssignments
    model_test.go:20: 
        AST:
        (= (+ x 4) 16)
    model_test.go:38: 
        Model:
        x -> 12
    model_test.go:43: Assignment: 12
--- PASS: TestModelAssignments (0.02s)
=== RUN   TestModelEval
    model_test.go:62: 
        AST:
        (= (+ x 4) 16)
    model_test.go:80: 
        Model:
        x -> 12
    model_test.go:84: Assignment: 12
--- PASS: TestModelEval (0.02s)
=== RUN   TestSolver
    solver_test.go:20: 
        AST:
        (xor x y)
    solver_test.go:38: 
        Model:
        y -> false
        x -> true
--- PASS: TestSolver (0.02s)
=== RUN   TestSymbol
--- PASS: TestSymbol (0.00s)
=== RUN   ExampleBasicMath
--- PASS: ExampleBasicMath (0.02s)
=== RUN   ExampleDemorgan
--- PASS: ExampleDemorgan (0.02s)
=== RUN   ExampleFindModel2
--- FAIL: ExampleFindModel2 (0.02s)
got:
Solving part 1
x = 0
y = 1

Solving part 2
x = (- 1)
y = 0
want:
Solving part 1
x = 0
y = 1

Solving part 2
x = 0
y = 1
FAIL
exit status 1
FAIL    github.com/mitchellh/go-z3      0.501s

Is go-z3 still working now?

Following the instruction, I build Z3 first and then go get this project. However, there is an error saying:
mitchellh\[email protected]\ast.go:4:
./go-z3.h:11:10: fatal error: z3.h: No such file or directory
#include <z3.h>
^~~~~~
Thanks a lot for answering.

build errors

Problem 1

$ go build
# _/.../go-z3
./error.go:53:20: could not determine kind of name for C.Z3_get_error_msg_ex

Solution: rename C.Z3_get_error_msg_ex to C.Z3_get_error_msg

Problem 2

$ go build
# _/.../go-z3
/usr/bin/ld: ./libz3.a(hwf.o): référence au symbole non défini « fma@@GLIBC_2.2.5 »
//lib/x86_64-linux-gnu/libm.so.6: error adding symbols: DSO manquant dans la ligne de commande
collect2: error: ld returned 1 exit status

Solution:

$ ln -s vendor/z3/build/libz3.so ./

$ cat z3.go.patch
-// #cgo LDFLAGS: ${SRCDIR}/libz3.a -lstdc++
+// #cgo LDFLAGS: ${SRCDIR}/libz3.so -lstdc++

Problem 3

$ go build
# _/.../go-z3-fork
./model.go:37:101: cannot convert _Ciconst_Z3_TRUE (type untyped number) to type _Ctype__Bool
./model.go:37:101: invalid operation: (func literal)() != _Ciconst_Z3_TRUE (mismatched types _Ctype__Bool and int)
./model.go:37:57: cannot use _Ciconst_Z3_TRUE (type int) as type _Ctype__Bool in assignment
./optimize.go:73:34: not enough arguments in call to _Cfunc_Z3_optimize_check
	have (_Ctype_Z3_context, _Ctype_Z3_optimize)
	want (*_Ctype_struct__Z3_context, *_Ctype_struct__Z3_optimize, _Ctype_uint, *_Ctype_Z3_ast)

Solution: don't know 😕

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.