3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-06-03 21:01:22 +00:00

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

This commit is contained in:
nikolajbjorner 2015-02-23 10:29:10 -08:00
commit f0967c0572
14 changed files with 27 additions and 27 deletions

View file

@ -1782,7 +1782,7 @@ def mk_config():
FOCI2 = False FOCI2 = False
if GIT_HASH: if GIT_HASH:
CPPFLAGS = '%s -DZ3GITHASH=%s' % (CPPFLAGS, GIT_HASH) CPPFLAGS = '%s -DZ3GITHASH=%s' % (CPPFLAGS, GIT_HASH)
CXXFLAGS = '%s -c' % CXXFLAGS CXXFLAGS = '%s -fvisibility=hidden -c' % CXXFLAGS
HAS_OMP = test_openmp(CXX) HAS_OMP = test_openmp(CXX)
if HAS_OMP: if HAS_OMP:
CXXFLAGS = '%s -fopenmp -mfpmath=sse' % CXXFLAGS CXXFLAGS = '%s -fopenmp -mfpmath=sse' % CXXFLAGS
@ -2104,7 +2104,7 @@ def mk_pat_db():
c = get_component(PATTERN_COMPONENT) c = get_component(PATTERN_COMPONENT)
fin = open(os.path.join(c.src_dir, 'database.smt2'), 'r') fin = open(os.path.join(c.src_dir, 'database.smt2'), 'r')
fout = open(os.path.join(c.src_dir, 'database.h'), 'w') fout = open(os.path.join(c.src_dir, 'database.h'), 'w')
fout.write('char const * g_pattern_database =\n') fout.write('static char const g_pattern_database[] =\n')
for line in fin: for line in fin:
fout.write('"%s\\n"\n' % line.strip('\n')) fout.write('"%s\\n"\n' % line.strip('\n'))
fout.write(';\n') fout.write(';\n')

View file

@ -300,7 +300,7 @@ extern "C" {
Z3_CATCH_RETURN(-1); Z3_CATCH_RETURN(-1);
} }
char const * Z3_API Z3_get_symbol_string(Z3_context c, Z3_symbol s) { Z3_API char const * Z3_get_symbol_string(Z3_context c, Z3_symbol s) {
Z3_TRY; Z3_TRY;
LOG_Z3_get_symbol_string(c, s); LOG_Z3_get_symbol_string(c, s);
RESET_ERROR_CODE(); RESET_ERROR_CODE();
@ -823,7 +823,7 @@ extern "C" {
Z3_CATCH_RETURN(0); Z3_CATCH_RETURN(0);
} }
char const * Z3_API Z3_ast_to_string(Z3_context c, Z3_ast a) { Z3_API char const * Z3_ast_to_string(Z3_context c, Z3_ast a) {
Z3_TRY; Z3_TRY;
LOG_Z3_ast_to_string(c, a); LOG_Z3_ast_to_string(c, a);
RESET_ERROR_CODE(); RESET_ERROR_CODE();
@ -866,11 +866,11 @@ extern "C" {
Z3_CATCH_RETURN(0); Z3_CATCH_RETURN(0);
} }
char const * Z3_API Z3_sort_to_string(Z3_context c, Z3_sort s) { Z3_API char const * Z3_sort_to_string(Z3_context c, Z3_sort s) {
return Z3_ast_to_string(c, reinterpret_cast<Z3_ast>(s)); return Z3_ast_to_string(c, reinterpret_cast<Z3_ast>(s));
} }
char const * Z3_API Z3_func_decl_to_string(Z3_context c, Z3_func_decl f) { Z3_API char const * Z3_func_decl_to_string(Z3_context c, Z3_func_decl f) {
return Z3_ast_to_string(c, reinterpret_cast<Z3_ast>(f)); return Z3_ast_to_string(c, reinterpret_cast<Z3_ast>(f));
} }

View file

@ -548,12 +548,12 @@ extern "C" {
} }
} }
char const * Z3_API Z3_get_error_msg(Z3_error_code err) { Z3_API char const * Z3_get_error_msg(Z3_error_code err) {
LOG_Z3_get_error_msg(err); LOG_Z3_get_error_msg(err);
return _get_error_msg_ex(0, err); return _get_error_msg_ex(0, err);
} }
char const * Z3_API Z3_get_error_msg_ex(Z3_context c, Z3_error_code err) { Z3_API char const * Z3_get_error_msg_ex(Z3_context c, Z3_error_code err) {
LOG_Z3_get_error_msg_ex(c, err); LOG_Z3_get_error_msg_ex(c, err);
return _get_error_msg_ex(c, err); return _get_error_msg_ex(c, err);
} }
@ -577,7 +577,7 @@ extern "C" {
}; };
ast_manager & Z3_API Z3_get_manager(__in Z3_context c) { Z3_API ast_manager& Z3_get_manager(__in Z3_context c) {
return mk_c(c)->m(); return mk_c(c)->m();
} }

View file

@ -651,7 +651,7 @@ extern "C" {
Z3_CATCH_RETURN(Z3_FALSE); Z3_CATCH_RETURN(Z3_FALSE);
} }
char const * Z3_API Z3_model_to_string(Z3_context c, Z3_model m) { Z3_API char const * Z3_model_to_string(Z3_context c, Z3_model m) {
Z3_TRY; Z3_TRY;
LOG_Z3_model_to_string(c, m); LOG_Z3_model_to_string(c, m);
RESET_ERROR_CODE(); RESET_ERROR_CODE();

View file

@ -507,7 +507,7 @@ extern "C" {
return (Z3_ast)(p); return (Z3_ast)(p);
} }
char const * Z3_API Z3_pattern_to_string(Z3_context c, Z3_pattern p) { Z3_API char const * Z3_pattern_to_string(Z3_context c, Z3_pattern p) {
return Z3_ast_to_string(c, reinterpret_cast<Z3_ast>(p)); return Z3_ast_to_string(c, reinterpret_cast<Z3_ast>(p));
} }

View file

@ -297,7 +297,7 @@ extern "C" {
Z3_CATCH; Z3_CATCH;
} }
char const * Z3_API Z3_context_to_string(Z3_context c) { Z3_API char const * Z3_context_to_string(Z3_context c) {
Z3_TRY; Z3_TRY;
LOG_Z3_context_to_string(c); LOG_Z3_context_to_string(c);
RESET_ERROR_CODE(); RESET_ERROR_CODE();

View file

@ -35,7 +35,11 @@
#endif #endif
#ifndef Z3_API #ifndef Z3_API
#define Z3_API # ifdef __GNUC__
# define Z3_API __attribute__ ((visibility ("default")))
# else
# define Z3_API
# endif
#endif #endif
#ifndef DEFINE_TYPE #ifndef DEFINE_TYPE

View file

@ -34,9 +34,9 @@ Revision History:
// --------------------------------------- // ---------------------------------------
// smt_renaming // smt_renaming
const static char* m_predef_names[] = { static const char m_predef_names[][8] = {
"=", ">=", "<=", "+", "-", "*", ">", "<", "!=", "or", "and", "implies", "not", "iff", "xor", "=", ">=", "<=", "+", "-", "*", ">", "<", "!=", "or", "and", "implies", "not", "iff", "xor",
"true", "false", "forall", "exists", "let", "flet", NULL "true", "false", "forall", "exists", "let", "flet"
}; };
symbol smt_renaming::fix_symbol(symbol s, int k) { symbol smt_renaming::fix_symbol(symbol s, int k) {
@ -120,8 +120,8 @@ bool smt_renaming::all_is_legal(char const* s) {
} }
smt_renaming::smt_renaming() { smt_renaming::smt_renaming() {
for (const char **p = m_predef_names; *p; ++p) { for (unsigned i = 0; i < ARRAYSIZE(m_predef_names); ++i) {
symbol s(*p); symbol s(m_predef_names[i]);
m_translate.insert(s, s); m_translate.insert(s, s);
m_rev_translate.insert(s, s); m_rev_translate.insert(s, s);
} }

View file

@ -26,8 +26,6 @@ Notes:
template<typename Config> template<typename Config>
class poly_rewriter : public Config { class poly_rewriter : public Config {
public:
static char const * g_ste_blowup_msg;
protected: protected:
typedef typename Config::numeral numeral; typedef typename Config::numeral numeral;
sort * m_curr_sort; sort * m_curr_sort;

View file

@ -22,9 +22,6 @@ Notes:
#include"ast_ll_pp.h" #include"ast_ll_pp.h"
#include"ast_smt2_pp.h" #include"ast_smt2_pp.h"
template<typename Config>
char const * poly_rewriter<Config>::g_ste_blowup_msg = "sum of monomials blowup";
template<typename Config> template<typename Config>
void poly_rewriter<Config>::updt_params(params_ref const & _p) { void poly_rewriter<Config>::updt_params(params_ref const & _p) {
@ -356,7 +353,7 @@ br_status poly_rewriter<Config>::mk_nflat_mul_core(unsigned num_args, expr * con
TRACE("som", for (unsigned i = 0; i < it.size(); i++) tout << it[i] << " "; TRACE("som", for (unsigned i = 0; i < it.size(); i++) tout << it[i] << " ";
tout << "\n";); tout << "\n";);
if (sum.size() > m_som_blowup) if (sum.size() > m_som_blowup)
throw rewriter_exception(g_ste_blowup_msg); throw rewriter_exception("sum of monomials blowup");
m_args.reset(); m_args.reset();
for (unsigned i = 0; i < num_args; i++) { for (unsigned i = 0; i < num_args; i++) {
expr * const * v = sums[i]; expr * const * v = sums[i];

View file

@ -1185,6 +1185,7 @@ void cmd_context::reset(bool finalize) {
restore_assertions(0); restore_assertions(0);
if (m_solver) if (m_solver)
m_solver = 0; m_solver = 0;
m_scopes.reset();
m_pp_env = 0; m_pp_env = 0;
m_dt_eh = 0; m_dt_eh = 0;
if (m_manager) { if (m_manager) {

View file

@ -1,4 +1,4 @@
static char const * g_pattern_database = static char const g_pattern_database[] =
"(benchmark patterns \n" "(benchmark patterns \n"
" :status unknown \n" " :status unknown \n"
" :logic ALL \n" " :logic ALL \n"

View file

@ -60,7 +60,7 @@ static void throw_out_of_memory() {
} }
#ifdef PROFILE_MEMORY #ifdef PROFILE_MEMORY
unsigned g_synch_counter = 0; static unsigned g_synch_counter = 0;
class mem_usage_report { class mem_usage_report {
public: public:
~mem_usage_report() { ~mem_usage_report() {

View file

@ -19,7 +19,7 @@ Revision History:
#include"util.h" #include"util.h"
unsigned g_verbosity_level = 0; static unsigned g_verbosity_level = 0;
void set_verbosity_level(unsigned lvl) { void set_verbosity_level(unsigned lvl) {
g_verbosity_level = lvl; g_verbosity_level = lvl;
@ -40,7 +40,7 @@ std::ostream& verbose_stream() {
} }
void (*g_fatal_error_handler)(int) = 0; static void (*g_fatal_error_handler)(int) = 0;
void fatal_error(int error_code) { void fatal_error(int error_code) {
if (g_fatal_error_handler) { if (g_fatal_error_handler) {