mirror of
https://github.com/Z3Prover/z3
synced 2025-04-12 04:03:39 +00:00
Merge branch 'working' of https://z3-1/gw/git/z3 into working
This commit is contained in:
commit
a50d8d6b6c
29
Makefile.in
29
Makefile.in
|
@ -19,6 +19,7 @@ LIBS=@LIBS@
|
||||||
## -lrt is for timer_create and timer_settime
|
## -lrt is for timer_create and timer_settime
|
||||||
LDFLAGS=@LDFLAGS@ -lpthread -fopenmp
|
LDFLAGS=@LDFLAGS@ -lpthread -fopenmp
|
||||||
LDFLAGS_EXTRA=
|
LDFLAGS_EXTRA=
|
||||||
|
PREFIX=@prefix@
|
||||||
#########################
|
#########################
|
||||||
|
|
||||||
Z3=z3
|
Z3=z3
|
||||||
|
@ -435,3 +436,31 @@ checkgmake:
|
||||||
@ ./gmaketest --make=$(MAKE) || \
|
@ ./gmaketest --make=$(MAKE) || \
|
||||||
(echo "Z3 needs GNU-Make to be built"; exit 1)
|
(echo "Z3 needs GNU-Make to be built"; exit 1)
|
||||||
|
|
||||||
|
################################
|
||||||
|
#
|
||||||
|
# installation/uninstallation
|
||||||
|
#
|
||||||
|
################################
|
||||||
|
|
||||||
|
install: $(BIN_DIR)/$(Z3) $(BIN_DIR)/lib$(Z3).so $(BIN_DIR)/lib$(Z3).a
|
||||||
|
@mkdir -p $(PREFIX)/bin
|
||||||
|
@mkdir -p $(PREFIX)/lib
|
||||||
|
@mkdir -p $(PREFIX)/include
|
||||||
|
@cp $(BIN_DIR)/$(Z3) $(PREFIX)/bin
|
||||||
|
@cp $(BIN_DIR)/lib$(Z3).so $(PREFIX)/lib
|
||||||
|
@cp $(BIN_DIR)/lib$(Z3).a $(PREFIX)/lib
|
||||||
|
@cp lib/z3_api.h $(PREFIX)/include
|
||||||
|
@cp lib/z3.h $(PREFIX)/include
|
||||||
|
@cp lib/z3_v1.h $(PREFIX)/include
|
||||||
|
@cp lib/z3_macros.h $(PREFIX)/include
|
||||||
|
@cp c++/z3++.h $(PREFIX)/include
|
||||||
|
|
||||||
|
uninstall:
|
||||||
|
@rm -f $(PREFIX)/bin/$(Z3)
|
||||||
|
@rm -f $(PREFIX)/lib/lib$(Z3).so
|
||||||
|
@rm -f $(PREFIX)/lib/lib$(Z3).a
|
||||||
|
@rm -f $(PREFIX)/include/z3_api.h
|
||||||
|
@rm -f $(PREFIX)/include/z3.h
|
||||||
|
@rm -f $(PREFIX)/include/z3_v1.h
|
||||||
|
@rm -f $(PREFIX)/include/z3_macros.h
|
||||||
|
@rm -f $(PREFIX)/include/z3++.h
|
||||||
|
|
27
README
27
README
|
@ -19,33 +19,26 @@ Z3 can be built using Visual Studio Command Prompt, Visual Studio and make/gcc.
|
||||||
msbuild z3-prover.sln
|
msbuild z3-prover.sln
|
||||||
All components will be located at /debug
|
All components will be located at /debug
|
||||||
|
|
||||||
1) Building Z3 using g++/make
|
2) Building Z3 using g++/make
|
||||||
Your machine must also have the following commands to be able to build Z3:
|
Your machine must also have the following commands to be able to build Z3:
|
||||||
autoconf, sed, awk, dos2unix commands
|
autoconf, sed, awk, dos2unix commands
|
||||||
|
|
||||||
|
|
||||||
- Open a shell
|
|
||||||
- For building the z3 executable, execute
|
|
||||||
|
|
||||||
autoconf
|
autoconf
|
||||||
./configure
|
./configure
|
||||||
make
|
make
|
||||||
|
sudo make install
|
||||||
|
|
||||||
The z3 executable will be located at bin/external/
|
It will install z3 executable at /usr/local/bin, libraries at /usr/local/lib, and include files at /usr/local/include.
|
||||||
|
Use the following commands to install in a different prefix (e.g., /usr).
|
||||||
|
|
||||||
- If you want a static library for Z3
|
autoconf
|
||||||
|
./configure --prefix=/usr
|
||||||
|
make
|
||||||
|
sudo make install
|
||||||
|
|
||||||
make a
|
To uninstall z3, use
|
||||||
|
|
||||||
- If you also want the z3 shared library, execute
|
sudo make uninstall
|
||||||
|
|
||||||
make so
|
|
||||||
|
|
||||||
for libz3.so (on Linux)
|
|
||||||
|
|
||||||
make dylib
|
|
||||||
|
|
||||||
for libz3.dylib (on OSX)
|
|
||||||
|
|
||||||
Remark: the Z3 makefile imports the source file list from Visual Studio project files.
|
Remark: the Z3 makefile imports the source file list from Visual Studio project files.
|
||||||
To add new source files to the Z3 core, you must include them at: lib/lib.vcxproj
|
To add new source files to the Z3 core, you must include them at: lib/lib.vcxproj
|
||||||
|
|
28
lib/goal.cpp
28
lib/goal.cpp
|
@ -284,6 +284,30 @@ void goal::display_with_dependencies(cmd_context & ctx, std::ostream & out) cons
|
||||||
out << "\n :precision " << prec() << " :depth " << depth() << ")" << std::endl;
|
out << "\n :precision " << prec() << " :depth " << depth() << ")" << std::endl;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void goal::display_with_dependencies(std::ostream & out) const {
|
||||||
|
ptr_vector<expr> deps;
|
||||||
|
out << "(goal";
|
||||||
|
unsigned sz = size();
|
||||||
|
for (unsigned i = 0; i < sz; i++) {
|
||||||
|
out << "\n |-";
|
||||||
|
deps.reset();
|
||||||
|
m().linearize(dep(i), deps);
|
||||||
|
ptr_vector<expr>::iterator it = deps.begin();
|
||||||
|
ptr_vector<expr>::iterator end = deps.end();
|
||||||
|
for (; it != end; ++it) {
|
||||||
|
expr * d = *it;
|
||||||
|
if (is_uninterp_const(d)) {
|
||||||
|
out << " " << mk_ismt2_pp(d, m());
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
out << " #" << d->get_id();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
out << "\n " << mk_ismt2_pp(form(i), m(), 2);
|
||||||
|
}
|
||||||
|
out << "\n :precision " << prec() << " :depth " << depth() << ")" << std::endl;
|
||||||
|
}
|
||||||
|
|
||||||
void goal::display(cmd_context & ctx) const {
|
void goal::display(cmd_context & ctx) const {
|
||||||
display(ctx, ctx.regular_stream());
|
display(ctx, ctx.regular_stream());
|
||||||
}
|
}
|
||||||
|
@ -473,7 +497,7 @@ void goal::elim_redundancies() {
|
||||||
proof * prs[2] = { pr(get_idx(atom)), pr(i) };
|
proof * prs[2] = { pr(get_idx(atom)), pr(i) };
|
||||||
p = m().mk_unit_resolution(2, prs);
|
p = m().mk_unit_resolution(2, prs);
|
||||||
}
|
}
|
||||||
expr_dependency * d = 0;
|
expr_dependency_ref d(m());
|
||||||
if (unsat_core_enabled())
|
if (unsat_core_enabled())
|
||||||
d = m().mk_join(dep(get_idx(atom)), dep(i));
|
d = m().mk_join(dep(get_idx(atom)), dep(i));
|
||||||
push_back(m().mk_false(), p, d);
|
push_back(m().mk_false(), p, d);
|
||||||
|
@ -490,7 +514,7 @@ void goal::elim_redundancies() {
|
||||||
proof * prs[2] = { pr(get_not_idx(f)), pr(i) };
|
proof * prs[2] = { pr(get_not_idx(f)), pr(i) };
|
||||||
p = m().mk_unit_resolution(2, prs);
|
p = m().mk_unit_resolution(2, prs);
|
||||||
}
|
}
|
||||||
expr_dependency * d = 0;
|
expr_dependency_ref d(m());
|
||||||
if (unsat_core_enabled())
|
if (unsat_core_enabled())
|
||||||
d = m().mk_join(dep(get_not_idx(f)), dep(i));
|
d = m().mk_join(dep(get_not_idx(f)), dep(i));
|
||||||
push_back(m().mk_false(), p, d);
|
push_back(m().mk_false(), p, d);
|
||||||
|
|
|
@ -180,6 +180,7 @@ public:
|
||||||
void display_dimacs(std::ostream & out) const;
|
void display_dimacs(std::ostream & out) const;
|
||||||
void display_with_dependencies(cmd_context & ctx, std::ostream & out) const;
|
void display_with_dependencies(cmd_context & ctx, std::ostream & out) const;
|
||||||
void display_with_dependencies(cmd_context & ctx) const;
|
void display_with_dependencies(cmd_context & ctx) const;
|
||||||
|
void display_with_dependencies(std::ostream & out) const;
|
||||||
|
|
||||||
bool sat_preserved() const {
|
bool sat_preserved() const {
|
||||||
return prec() == PRECISE || prec() == UNDER;
|
return prec() == PRECISE || prec() == UNDER;
|
||||||
|
|
|
@ -67,6 +67,7 @@ struct simplify_tactic::imp {
|
||||||
TRACE("after_simplifier_bug", g.display(tout););
|
TRACE("after_simplifier_bug", g.display(tout););
|
||||||
g.elim_redundancies();
|
g.elim_redundancies();
|
||||||
TRACE("after_simplifier", g.display(tout););
|
TRACE("after_simplifier", g.display(tout););
|
||||||
|
TRACE("after_simplifier_detail", g.display_with_dependencies(tout););
|
||||||
SASSERT(g.is_well_sorted());
|
SASSERT(g.is_well_sorted());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue