3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-04-23 17:15:31 +00:00

Merge branch 'unstable' of https://git01.codeplex.com/z3 into fpa-api

Conflicts:
	scripts/mk_project.py
	src/api/z3.h
	src/ast/float_decl_plugin.cpp
	src/ast/float_decl_plugin.h
	src/ast/fpa/fpa2bv_converter.cpp
	src/ast/fpa/fpa2bv_rewriter.h
	src/ast/rewriter/float_rewriter.cpp
	src/ast/rewriter/float_rewriter.h

Signed-off-by: Christoph M. Wintersteiger <cwinter@microsoft.com>
This commit is contained in:
Christoph M. Wintersteiger 2014-11-11 11:53:39 +00:00
commit 8d3ef92383
240 changed files with 4848 additions and 2395 deletions

View file

@ -1,5 +1,7 @@
#include<vector>
#include"z3++.h"
using namespace z3;
/**
@ -19,6 +21,7 @@ void demorgan() {
// adding the negation of the conjecture as a constraint.
s.add(!conjecture);
std::cout << s << "\n";
std::cout << s.to_smt2() << "\n";
switch (s.check()) {
case unsat: std::cout << "de-Morgan is valid\n"; break;
case sat: std::cout << "de-Morgan is not valid\n"; break;

View file

@ -90,12 +90,12 @@ int main(int argc, const char **argv) {
/* Read an interpolation problem */
int num;
unsigned num;
Z3_ast *constraints;
int *parents = 0;
unsigned *parents = 0;
const char *error;
bool ok;
int num_theory;
unsigned num_theory;
Z3_ast *theory;
ok = Z3_read_interpolation_problem(ctx, &num, &constraints, tree_mode ? &parents : 0, filename, &error, &num_theory, &theory);
@ -144,7 +144,7 @@ int main(int argc, const char **argv) {
if(!incremental_mode){
/* In non-incremental mode, we just pass the constraints. */
result = Z3_interpolate(ctx, num, constraints, (unsigned int *)parents, options, interpolants, &model, 0, false, num_theory, theory);
result = Z3_L_UNDEF; // FIXME: Z3_interpolate(ctx, num, constraints, parents, options, interpolants, &model, 0, false, num_theory, theory);
}
else {
@ -165,7 +165,7 @@ int main(int argc, const char **argv) {
for(int i = 0; i < num; i++){
asserted[i] = constraints[i];
Z3_assert_cnstr(ctx,constraints[i]); // assert one constraint
result = Z3_interpolate(ctx, num, &asserted[0], (unsigned int *)parents, options, interpolants, &model, 0, true, 0, 0);
result = Z3_L_UNDEF; // FIXME: Z3_interpolate(ctx, num, &asserted[0], parents, options, interpolants, &model, 0, true, 0, 0);
if(result == Z3_L_FALSE){
for(unsigned j = 0; j < num-1; j++)
/* Since we want the interpolant formulas to survive a "pop", we

View file

@ -1,7 +1,6 @@
### This is work-in-progress and does not work yet.
A small example using the Z3 Java bindings.
Small example using the Z3 Java bindings.
To build the example execute
To build the example, configure Z3 with the --java option to scripts/mk_make.py, build via
make examples
in the build directory.
@ -11,5 +10,5 @@ which can be run on Windows via
On Linux and FreeBSD, we must use
LD_LIBRARY_PATH=. java -cp com.microsoft.z3.jar:. JavaExample
On OSX, the corresponding option is DYLD_LIBRARY_PATH:
DYLD_LIBRARY_PATH=. java -cp com.microsoft.z3.jar:. JavaExample