Commits

Nikolaj Bjorner  committed bdc2876 Merge

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

  • Participants
  • Parent commits 832ade3, c2e95bb

Comments (0)

Files changed (68)

File scripts/mk_util.py

 Z3PY_SRC_DIR=None
 VS_PROJ = False
 TRACE = False
+DOTNET_ENABLED=False
 
 VER_MAJOR=None
 VER_MINOR=None
     IS_WINDOW=True
     # Visual Studio already displays the files being compiled
     SHOW_CPPS=False
+    # Enable .Net bindings by default on windows
+    DOTNET_ENABLED=True
 
 def display_help():
     print "mk_make.py: Z3 Makefile generator\n"
     print "  -c, --showcpp                 display file .cpp file names before invoking compiler."
     print "  -v, --vsproj                  generate Visual Studio Project Files."
     print "  -t, --trace                   enable tracing in release mode."
+    print "  -n, --nodotnet                do not generate Microsoft.Z3.dll make rules."
     exit(0)
 
 # Parse configuration option for mk_make script
 def parse_options():
-    global VERBOSE, DEBUG_MODE, IS_WINDOW, VS_X64, ONLY_MAKEFILES, SHOW_CPPS, VS_PROJ, TRACE
-    options, remainder = getopt.gnu_getopt(sys.argv[1:], 'b:dsxhmcvt', ['build=', 
-                                                                        'debug',
-                                                                        'silent',
-                                                                        'x64',
-                                                                        'help',
-                                                                        'makefiles',
-                                                                        'showcpp',
-                                                                        'vsproj',
-                                                                        'trace'
-                                                                        ])
+    global VERBOSE, DEBUG_MODE, IS_WINDOW, VS_X64, ONLY_MAKEFILES, SHOW_CPPS, VS_PROJ, TRACE, DOTNET_ENABLED
+    options, remainder = getopt.gnu_getopt(sys.argv[1:], 'b:dsxhmcvtn', ['build=', 
+                                                                         'debug',
+                                                                         'silent',
+                                                                         'x64',
+                                                                         'help',
+                                                                         'makefiles',
+                                                                         'showcpp',
+                                                                         'vsproj',
+                                                                         'trace',
+                                                                         'nodotnet'
+                                                                         ])
     for opt, arg in options:
         if opt in ('-b', '--build'):
             if arg == 'src':
             VS_PROJ = True
         elif opt in ('-t', '--trace'):
             TRACE = True
+        elif opt in ('-n', '--nodotnet'):
+            DOTNET_ENABLED = False
         else:
             raise MKException("Invalid command line option '%s'" % opt)
         
         self.assembly_info_dir = assembly_info_dir 
 
     def mk_makefile(self, out):
-        if IS_WINDOW:
+        if DOTNET_ENABLED:
             cs_fp_files = []
             cs_files    = []
             for cs_file in get_cs_files(self.src_dir):
             return
     
     def main_component(self):
-        return IS_WINDOW
+        return DOTNET_ENABLED
 
     def has_assembly_info(self):
         return True
 
     def mk_win_dist(self, build_path, dist_path):
-        # Assuming all DotNET dll should be in the distribution
-        mk_dir('%s/bin' % dist_path)
-        shutil.copy('%s/%s.dll' % (build_path, self.dll_name),
-                    '%s/bin/%s.dll' % (dist_path, self.dll_name))
+        if DOTNET_ENABLED:
+            # Assuming all DotNET dll should be in the distribution
+            mk_dir('%s/bin' % dist_path)
+            shutil.copy('%s/%s.dll' % (build_path, self.dll_name),
+                        '%s/bin/%s.dll' % (dist_path, self.dll_name))
 
 class ExampleComponent(Component):
     def __init__(self, name, path):
         return IS_WINDOW
 
     def mk_makefile(self, out):
-        if IS_WINDOW:
+        if DOTNET_ENABLED:
             dll_name = get_component(DOTNET_COMPONENT).dll_name
             dll = '%s.dll' % dll_name
             exefile = '%s.exe' % self.name

File scripts/update_api.py

 ##
 log_h.write('// Automatically generated file\n')
 log_h.write('#include\"z3.h\"\n')
+log_h.write('#ifdef __GNUC__\n')
+log_h.write('#define _Z3_UNUSED __attribute__((unused))\n')
+log_h.write('#else\n')
+log_h.write('#define _Z3_UNUSED\n')
+log_h.write('#endif\n')
+
 ##
 log_c.write('// Automatically generated file\n')
 log_c.write('#include<iostream>\n')
                 cap = param_array_capacity_pos(p)
                 if cap not in auxs:
                     auxs.add(cap)
-                    file.write("unsigned Z3ARG%s; " % cap)
+                    file.write("unsigned _Z3_UNUSED Z3ARG%s; " % cap)
                 sz  = param_array_size_pos(p)
                 if sz not in auxs:
                     auxs.add(sz)
-                    file.write("unsigned * Z3ARG%s; " % sz)
-            file.write("%s Z3ARG%s; " % (param2str(p), i))
+                    file.write("unsigned * _Z3_UNUSED Z3ARG%s; " % sz)
+            file.write("%s _Z3_UNUSED Z3ARG%s; " % (param2str(p), i))
         i = i + 1
     file.write("if (_LOG_CTX.enabled()) { log_%s(" % name)
     i = 0

File src/api/api_datalog.cpp

         ast_manager& m = m_context.get_manager();
         
         datalog::context ctx(m, m_context.get_fparams());
-        datalog::rule_manager& rm = ctx.get_rule_manager();
+        // datalog::rule_manager& rm = ctx.get_rule_manager();
         for (unsigned i = 0; i < num_rules; ++i) {
             expr* rule = rules[i], *body, *head;
             while (true) {

File src/api/api_parsers.cpp

                                 Z3_symbol const decl_names[],
                                 Z3_func_decl const decls[]) {
         Z3_TRY;
-        cmd_context ctx(mk_c(c)->fparams(), false, &(mk_c(c)->m()));
+        cmd_context ctx(&mk_c(c)->fparams(), false, &(mk_c(c)->m()));
         ctx.set_ignore_check(true);
         if (exec) {
             ctx.set_solver(alloc(z3_context_solver, *mk_c(c)));
                                          Z3_symbol decl_names[],
                                          Z3_func_decl decls[]) { 
         Z3_TRY;
-        cmd_context ctx(mk_c(c)->fparams(), false, &(mk_c(c)->m()));
+        cmd_context ctx(&mk_c(c)->fparams(), false, &(mk_c(c)->m()));
         std::string s(str);
         std::istringstream is(s);
         // No logging for this one, since it private.

File src/ast/macros/macro_util.cpp

    \remark n is a "polynomial".
 */
 bool macro_util::poly_contains_head(expr * n, func_decl * f, expr * exception) const {
-    expr * curr = n;
     unsigned num_args;
     expr * const * args;
     if (is_add(n)) {
 
 void macro_util::collect_poly_args(expr * n, expr * exception, ptr_buffer<expr> & args) {
     args.reset();
-    bool stop = false;
     unsigned num_args;
     expr * const * _args;
     if (is_add(n)) {
 void macro_util::collect_arith_macro_candidates(expr * lhs, expr * rhs, expr * atom, unsigned num_decls, bool is_ineq, macro_candidates & r) {
     if (!is_add(lhs) && m_manager.is_eq(atom)) // this case is a simple macro.
         return;
-    bool stop = false;
     ptr_buffer<expr> args;
     unsigned lhs_num_args;
     expr * const * lhs_args;

File src/ast/normal_forms/cnf.cpp

         if (m_params.m_cnf_mode != CNF_OPPORTUNISTIC || result_size < m_params.m_cnf_factor) {
             expr_ref_buffer  cheap_args(m_manager);
             proof_ref_buffer cheap_args_pr(m_manager);
-            bool named_args;
             if (is_too_expensive(result_size, f_args)) {
-                named_args = true;
                 name_args(f_args, cheap_args, cheap_args_pr);
             }
             else {
-                named_args = false;
                 cheap_args.append(f_args.size(), f_args.c_ptr());
             }
             

File src/ast/pattern/expr_pattern_match.cpp

 
     std::istringstream is(spec_string);
     front_end_params p;
-    cmd_context      ctx(p, true, &m_manager);
+    cmd_context      ctx(&p, true, &m_manager);
     VERIFY(parse_smt2_commands(ctx, is));
 
     ptr_vector<expr>::const_iterator it  = ctx.begin_assertions();

File src/cmd_context/cmd_context.cpp

     }
 };
 
-cmd_context::cmd_context(front_end_params & params, bool main_ctx, ast_manager * m, symbol const & l):
+cmd_context::cmd_context(front_end_params * params, bool main_ctx, ast_manager * m, symbol const & l):
     m_main_ctx(main_ctx),
-    m_params(params),
+    m_params(params == 0 ? alloc(front_end_params) : params),
+    m_params_owner(params == 0),
     m_logic(l),
     m_interactive_mode(false),
-    m_global_decls(!params.m_smtlib2_compliant), // SMTLIB 2.0 uses scoped decls.
+    m_global_decls(!this->params().m_smtlib2_compliant), // SMTLIB 2.0 uses scoped decls.
     m_print_success(false), // params.m_smtlib2_compliant), 
     m_random_seed(0),
     m_produce_unsat_cores(false),
     finalize_cmds();
     finalize_tactic_cmds();
     finalize_probes();
+    m_solver = 0;
+    m_check_sat_result = 0;
+    if (m_params_owner) {
+        dealloc(m_params);
+    }
 }
 
 cmd_context::check_sat_state cmd_context::cs_state() const {
     SASSERT(m_manager == 0);
     SASSERT(m_pmanager == 0);
     m_check_sat_result = 0;
-    m_manager  = alloc(ast_manager, m_params.m_proof_mode, m_params.m_trace_stream);
+    m_manager  = alloc(ast_manager, params().m_proof_mode, params().m_trace_stream);
     m_pmanager = alloc(pdecl_manager, *m_manager);
     init_manager_core(true);
-    if (m_params.m_smtlib2_compliant)
+    if (params().m_smtlib2_compliant)
         m_manager->enable_int_real_coercions(false);
 }
 
         init_manager();
     if (m_solver) {
         m_check_sat_result = m_solver.get(); // solver itself stores the result.
-        m_solver->set_front_end_params(m_params);
+        m_solver->set_front_end_params(params());
         m_solver->set_progress_callback(this);
         m_solver->set_produce_proofs(produce_proofs());
         m_solver->set_produce_models(produce_models());
 void cmd_context::set_solver(solver * s) {
     m_check_sat_result = 0;
     m_solver = s;
-    m_solver->set_front_end_params(m_params);
+    m_solver->set_front_end_params(params());
     if (has_manager() && s != 0) {
         m_solver->init(m(), m_logic);
         // assert formulas and create scopes in the new solver.

File src/cmd_context/cmd_context.h

 
 protected:
     bool                         m_main_ctx;
-    front_end_params &           m_params;
+    front_end_params *           m_params;
+    bool                         m_params_owner;
     symbol                       m_logic;
     bool                         m_interactive_mode;
     bool                         m_global_decls;
     void print_unsupported_info(symbol const& s) { if (s != symbol::null) diagnostic_stream() << "; " << s << std::endl;}
 
 public:
-    cmd_context(front_end_params & params, bool main_ctx = true, ast_manager * m = 0, symbol const & l = symbol::null);
+    cmd_context(front_end_params * params = 0, bool main_ctx = true, ast_manager * m = 0, symbol const & l = symbol::null);
     ~cmd_context(); 
-    bool is_smtlib2_compliant() const { return m_params.m_smtlib2_compliant; }
+    bool is_smtlib2_compliant() const { return params().m_smtlib2_compliant; }
     void set_logic(symbol const & s);
     bool has_logic() const { return m_logic != symbol::null; }
     symbol const & get_logic() const { return m_logic; }
     void set_global_decls(bool flag) { SASSERT(!has_manager()); m_global_decls = flag; }
     unsigned random_seed() const { return m_random_seed; }
     void set_random_seed(unsigned s) { m_random_seed = s; }
-    bool produce_models() const { return m_params.m_model; }
-    bool produce_proofs() const { return m_params.m_proof_mode != PGM_DISABLED; }
+    bool produce_models() const { return params().m_model; }
+    bool produce_proofs() const { return params().m_proof_mode != PGM_DISABLED; }
     bool produce_unsat_cores() const { return m_produce_unsat_cores; }
     void set_produce_unsat_cores(bool flag) { m_produce_unsat_cores = flag; }
     bool produce_assignments() const { return m_produce_assignments; }
     virtual ast_manager & get_ast_manager() { return m(); }
     pdecl_manager & pm() const { if (!m_pmanager) const_cast<cmd_context*>(this)->init_manager(); return *m_pmanager; }
     sexpr_manager & sm() const { if (!m_sexpr_manager) const_cast<cmd_context*>(this)->m_sexpr_manager = alloc(sexpr_manager); return *m_sexpr_manager; }
-    front_end_params & params() const { return m_params; }
+    front_end_params & params() const { return *m_params; }
  
     void set_solver(solver * s);
     solver * get_solver() const { return m_solver.get(); }

File src/muz_qe/datalog_parser.cpp

             uint64_set & sort_content = *sit->m_value;
             //the +1 is for a zero element which happens to appear in the problem files
             uint64 domain_size = sort_content.size()+1;
-            sort * s;
+            // sort * s;
             if(!m_use_map_names) {
-                s = register_finite_sort(sort_name, domain_size, context::SK_UINT64);
+                /* s = */ register_finite_sort(sort_name, domain_size, context::SK_UINT64);
             }
             else {
-                s = register_finite_sort(sort_name, domain_size, context::SK_SYMBOL);
+                /* s = */ register_finite_sort(sort_name, domain_size, context::SK_SYMBOL);
             }
 
             /*

File src/muz_qe/dl_bmc_engine.cpp

     bmc::bmc(context& ctx): 
         m_ctx(ctx), 
         m(ctx.get_manager()), 
-        m_cancel(false), 
         m_solver(m, m_fparams),
         m_pinned(m),
         m_rules(ctx),
         m_query_pred(m),
         m_answer(m),
+        m_cancel(false), 
         m_path_sort(m),
         m_bv(m) {
         }
             sort* pred_sort = m_pred2sort.find(p);
             path_var  = m.mk_var(0, m_path_sort);
             trace_var = m.mk_var(1, pred_sort);            
-            sort* sorts[2] = { pred_sort, m_path_sort };
+            // sort* sorts[2] = { pred_sort, m_path_sort };
             ptr_vector<func_decl> const& cnstrs = *dtu.get_datatype_constructors(pred_sort);
             ptr_vector<func_decl> const& succs  = *dtu.get_datatype_constructors(m_path_sort);
             SASSERT(cnstrs.size() == rls.size());
         datalog::rule_vector const& rules = m_rules.get_predicate_rules(p);
         ptr_vector<func_decl> const& cnstrs = *dtu.get_datatype_constructors(trace_sort);
         ptr_vector<func_decl> const& succs  = *dtu.get_datatype_constructors(m_path_sort);
-        bool found = false;
+        // bool found = false;
         for (unsigned i = 0; i < cnstrs.size(); ++i) {
             if (trace->get_decl() == cnstrs[i]) {
-                found = true;
+                // found = true;
                 svector<std::pair<unsigned, unsigned> > positions;
                 scoped_coarse_proof _sc(m);
                 proof_ref_vector prs(m);

File src/muz_qe/dl_bound_relation.cpp

         uint_set::iterator it = t.lt.begin(), end = t.lt.end();
         unsigned_vector ltv, lev;
         for (; it != end; ++it) {
-            unsigned elem = *it;
             ltv.push_back(renaming[*it]);
         }
         it = t.le.begin(), end = t.le.end();
         for (; it != end; ++it) {
-            unsigned elem = *it;
             lev.push_back(renaming[*it]);
         }
         TRACE("dl", 

File src/muz_qe/dl_cmds.cpp

 private:
     void set_background(cmd_context& ctx) {
         datalog::context& dlctx = m_dl_ctx->get_dl_context();
-        ast_manager& m = ctx.m();                
         ptr_vector<expr>::const_iterator it  = ctx.begin_assertions();
         ptr_vector<expr>::const_iterator end = ctx.end_assertions();
         for (; it != end; ++it) {

File src/muz_qe/dl_compiler.cpp

         
         TRACE("dl", tout << "Adding unbound column " << mk_pp(pred, m_context.get_manager()) << "\n";);
             IF_VERBOSE(3, { 
-                    relation_manager& rm = m_context.get_rmanager(); 
                     expr_ref e(m_context.get_manager()); 
                     compiled_rule->to_formula(e); 
                     verbose_stream() << "Compiling unsafe rule column " << col_idx << "\n" 

File src/muz_qe/dl_context.cpp

                 /*}*/
             }
             SASSERT(!rel_kinds.empty());
-            relation_plugin * rel_plugin; //the aggregate kind of non-table plugins
-            relation_signature rel_sig;
+            // relation_plugin * rel_plugin; //the aggregate kind of non-table plugins
             family_id rel_kind; //the aggregate kind of non-table plugins
             if (rel_kinds.size()==1) {
                 rel_kind = rel_kinds[0];
-                rel_plugin = rel_plugins[0];
+                // rel_plugin = rel_plugins[0];
             }
             else {
                 relation_signature rel_sig;
                 //rmgr.from_predicate(pred, rel_sig);
                 product_relation_plugin & prod_plugin = product_relation_plugin::get_plugin(rmgr);
                 rel_kind = prod_plugin.get_relation_kind(rel_sig, rel_kinds);
-                rel_plugin = &prod_plugin;
+                // rel_plugin = &prod_plugin;
             }
             if (tr_plugin==0) {
                 target_kind = rel_kind;
         rule_ref r(rules[0].get(), rm);
         get_rmanager().reset_saturated_marks();
         rule_ref_vector const& rls = m_rule_set.get_rules();
-        bool found = false;
         rule* old_rule = 0;
         for (unsigned i = 0; i < rls.size(); ++i) {
             if (rls[i]->name() == name) {
             check_existential_tail(r);
             check_positive_predicates(r);
             break;            
+        default:
+            UNREACHABLE();
+            break;
         }
     }
 
         }
     }
     
+#if 0
+    // [Leo] dead code?
     static func_decl* get_head_relation(ast_manager& m, expr* fml) {
         while (is_quantifier(fml)) {
             fml = to_quantifier(fml)->get_expr();            
             return 0;
         }
     }
+#endif
 
     void context::display_smt2(
         unsigned num_queries, 
                 max_vars.insert(s, max_var);
 
                 // index into fresh variable array.
-                unsigned fresh_var_idx = 0;
+                // unsigned fresh_var_idx = 0;
                 obj_map<sort, unsigned_vector>::obj_map_entry* e = var_idxs.insert_if_not_there2(s, unsigned_vector());
                 unsigned_vector& vars = e->get_data().m_value;
                 if (max_var >= vars.size()) {

File src/muz_qe/dl_finite_product_relation.cpp

             }
         };
 
+        // [Leo]: gcc complained about the following class.
+        // It does not have a constructor and uses a reference
+#if 0
         class inner_relation_copier : public table_row_mutator_fn {
             finite_product_relation & m_tgt;
             const finite_product_relation & m_src;
                 return true;
             }
         };
+#endif
 
         scoped_ptr<table_union_fn> m_t_union_fun;
         offset_row_mapper * m_offset_mapper_obj; //initialized together with m_offset_mapper_fun, and deallocated by it

File src/muz_qe/dl_mk_bit_blast.cpp

 
     class mk_bit_blast::impl {
 
-        context &	         m_context;
+        context &	     m_context;
         ast_manager &        m;
         params_ref           m_params;
         rule_ref_vector      m_rules;
         impl(context& ctx):
             m_context(ctx),
             m(ctx.get_manager()),
-            m_rules(ctx.get_rule_manager()),
             m_params(ctx.get_params()),
+            m_rules(ctx.get_rule_manager()),
             m_blaster(ctx.get_manager(), m_params),
             m_rewriter(ctx.get_manager(), ctx, m_rules) {
             m_params.set_bool(":blast-full", true);

File src/muz_qe/dl_mk_coalesce.cpp

         }
         rule_set* rules = alloc(rule_set, m_ctx);
         rule_set::decl2rules::iterator it = source.begin_grouped_rules(), end = source.end_grouped_rules();
-        bool change = false;
+        // bool change = false;
         for (; it != end; ++it) {
-            func_decl* p = it->m_key;
+            // func_decl* p = it->m_key;
             rule_ref_vector d_rules(rm);
             d_rules.append(it->m_value->size(), it->m_value->c_ptr());
             for (unsigned i = 0; i < d_rules.size(); ++i) {
                         merge_rules(r1, *d_rules[j].get());
                         d_rules[j] = d_rules.back();
                         d_rules.pop_back();
-                        change = true;
+                        // change = true;
                         --j;
                     }
                 }

File src/muz_qe/dl_mk_rule_inliner.h

             m_simp(m_context.get_rewriter()),
             m_pinned(m_rm),
             m_inlined_rules(m_context),
-            m_unifier(ctx),
             m_mc(0),
             m_pc(0),
+            m_unifier(ctx),
             m_head_index(m),
             m_tail_index(m),
             m_subst(m),

File src/muz_qe/dl_mk_slice.cpp

             expr* fact0   = m.get_fact(p0);
             TRACE("dl", tout << "fact0: " << mk_pp(fact0, m) << "\n";);
             rule* orig0    = m_sliceform2rule.find(fact0);
-            rule* slice0   = m_rule2slice.find(orig0);
-            unsigned_vector const& renaming0 = m_renaming.find(orig0);
+            /* rule* slice0   = */ m_rule2slice.find(orig0);
+            /* unsigned_vector const& renaming0 = */ m_renaming.find(orig0);
             premises.push_back(p0_new);
             rule_ref r1(rm), r2(rm), r3(rm);
             r1 = orig0;
                 expr* fact1   = m.get_fact(p1);
                 TRACE("dl", tout << "fact1: " << mk_pp(fact1, m) << "\n";);
                 rule* orig1     = m_sliceform2rule.find(fact1);
-                rule* slice1    = m_rule2slice.find(orig1);
-                unsigned_vector const& renaming1 = m_renaming.find(orig1); //TBD
+                /* rule* slice1    = */ m_rule2slice.find(orig1);
+                /* unsigned_vector const& renaming1 = */ m_renaming.find(orig1); //TBD
                 premises.push_back(p1_new);
 
                 // TODO: work with substitutions.

File src/muz_qe/dl_table.cpp

     public:
         eq_iterator(const equivalence_table& eq, bool end):
             m_eq(eq), 
-            m_row_obj(*this),
             m_last(eq.m_uf.get_num_vars()),
             m_current(end?m_last:0),
-            m_next(0)
+            m_next(0),
+            m_row_obj(*this)
         { 
             while (m_current < m_last && !m_eq.is_valid(m_current)) {
                 m_current++;

File src/muz_qe/dl_util.cpp

 
     void del_rule(horn_subsume_model_converter* mc, rule& r) {
         if (mc) {
-            app* head = r.get_head();
+            // app* head = r.get_head();
             ast_manager& m = mc->get_manager();
             expr_ref_vector body(m);
             for (unsigned i = 0; i < r.get_tail_size(); ++i) {

File src/muz_qe/dl_vector_relation.h

 
         void mk_project(vector_relation const& r, unsigned col_cnt, unsigned const* removed_cols) {
             SASSERT(is_full());
-            unsigned j = 0, k = 0;
             unsigned_vector classRep, repNode;
             unsigned result_size = get_signature().size();
             unsigned input_size = r.get_signature().size();

File src/muz_qe/pdr_context.cpp

     // pred_tansformer
 
     pred_transformer::pred_transformer(context& ctx, manager& pm, func_decl* head): 
-        ctx(ctx), pm(pm), m(pm.get_manager()), m_head(head, m), 
+        pm(pm), m(pm.get_manager()),
+        ctx(ctx), m_head(head, m), 
         m_sig(m), m_solver(pm, head->get_name()),
         m_invariants(m), m_transition(m), m_initial_state(m), 
         m_reachable(pm, pm.get_params()) {}
         tactic_ref us = mk_unit_subsumption_tactic(m);
         simplify_formulas(*us, m_invariants);
         for (unsigned i = 0; i < m_levels.size(); ++i) {
-            expr_ref_vector& v = m_levels[i];
             simplify_formulas(*us, m_levels[i]);
         }             
     }

File src/muz_qe/pdr_dl_interface.cpp

     m_pdr_rules.reset();
     m_ctx.get_rmanager().reset_relations();
     ast_manager& m =                      m_ctx.get_manager();
-    datalog::relation_manager& rm =       m_ctx.get_rmanager();
     datalog::rule_manager& rule_manager = m_ctx.get_rule_manager();
     datalog::rule_set        old_rules(m_ctx.get_rules());
     func_decl_ref            query_pred(m);

File src/muz_qe/pdr_generalizers.cpp

             return;
         }
         ast_manager& m = core.get_manager();
-        TRACE("pdr", for (unsigned i = 0; i < core.size(); ++i) { tout << mk_pp(core[i].get(), m) << "\n"; } "\n";);
+        TRACE("pdr", for (unsigned i = 0; i < core.size(); ++i) { tout << mk_pp(core[i].get(), m) << "\n"; });
         unsigned num_failures = 0, i = 0, old_core_size = core.size();
         ptr_vector<expr> processed;
 
     {}
     
     void core_farkas_generalizer::operator()(model_node& n, expr_ref_vector& core, bool& uses_level) {
-        front_end_params& p = m_ctx.get_fparams();
         ast_manager& m  = n.pt().get_manager();
         manager& pm = n.pt().get_pdr_manager();
         if (core.empty()) return;

File src/muz_qe/pdr_interpolant_provider.cpp

 --*/
 
 //disables the warning on deprecation of fgets function -- didn't really find by what it should be replaced
+#ifdef _WINDOWS
 #pragma warning(disable: 4995)
+#endif
 
 #include <sstream>
 #include "ast_smt_pp.h"

File src/muz_qe/pdr_smt_context_manager.cpp

 namespace pdr {
 
     smt_context::smt_context(smt_context_manager& p, ast_manager& m, app* pred):
-        m_parent(p),
         m_pred(pred, m),
+        m_parent(p),
         m_in_delay_scope(false),
         m_pushed(false)
     {}
     }
 
     smt_context_manager::smt_context_manager(front_end_params& fp, params_ref const& p, ast_manager& m):
-        m_fparams(fp), m_max_num_contexts(p.get_uint(":max-num-contexts", 500)), 
-        m(m), m_num_contexts(0), m_predicate_list(m) {}
+        m_fparams(fp), 
+        m(m), 
+        m_max_num_contexts(p.get_uint(":max-num-contexts", 500)), 
+        m_num_contexts(0), 
+        m_predicate_list(m) {
+    }
     
     
     smt_context_manager::~smt_context_manager() {

File src/muz_qe/qe.cpp

     public:
         nnf_normalizer(ast_manager& m, i_expr_pred& is_relevant, i_nnf_atom& mk_atom):
             m_nnf_core(m, is_relevant),
-            m_normalize_literals(m, is_relevant, mk_atom),
-            m_collect_atoms(m, is_relevant)
+            m_collect_atoms(m, is_relevant),
+            m_normalize_literals(m, is_relevant, mk_atom)
         {}
 
         void operator()(expr_ref& fml, atom_set& pos, atom_set& neg) {
 
         void propagate_assignment(model_evaluator& model_eval) {
             if (m_fml) {
-                update_status st = update_current(model_eval, true);
+                /* update_status st = */ update_current(model_eval, true);
             }
         }
 
             ) 
         {
             
-            bool is_forall = old_q->is_forall();
+            // bool is_forall = old_q->is_forall();
             app_ref_vector vars(m);
             TRACE("qe", tout << "simplifying" << mk_pp(new_body, m) << "\n";);
             result = new_body;

File src/muz_qe/qe_arith_plugin.cpp

             m_minus_one_i(m_arith.mk_numeral(numeral(-1), true), m),
             m_zero_r(m_arith.mk_numeral(numeral(0), false), m),
             m_one_r(m_arith.mk_numeral(numeral(1), false), m),
+            m_tmp(m), 
             m_replace(mk_default_expr_replacer(m)),
             m_bool_rewriter(m),
-            m_arith_rewriter(m),
-            m_tmp(m)
-        {
+            m_arith_rewriter(m) {
         }
 
         ast_manager& get_manager() { return m; }
             }
             --v;
             is_strict = e_size <= v;
-            bool is_eq = false;
             
             SASSERT(v < t_size + e_size);
             if (is_strict) {
             }
             else if (m_util.is_real(x)) {
                 SASSERT(0 == (e_size & 0x1));
-                is_eq = (0 == (v & 0x1));
                 v  /= 2;
                 e_size /= 2;
             }
             bounds_proc& bounds = get_bounds(x.x(), fml);
             bool is_lower   = bounds.le_size() + bounds.lt_size() < bounds.ge_size() + bounds.gt_size();
             unsigned e_size = bounds.e_size(is_lower);
-            unsigned t_size = bounds.t_size(is_lower);
             numeral bound1, bound2, vl, x_val;
             unsigned idx1, idx2;
             bool found1 = find_min_max(is_lower, false, bounds, model_eval, bound1, idx1);

File src/muz_qe/qe_sat_tactic.cpp

             m_projection_mode_param(true),
             m_strong_context_simplify_param(true),
             m_ctx_simplify_local_param(false),
+            m_solver(m, m_fparams),
             m_fml(m),
             m_Ms(m),
             m_assignments(m),
             m_rewriter(m),
-            m_ctx_rewriter(m_fparams, m),
-            m_solver(m, m_fparams) {            
+            m_ctx_rewriter(m_fparams, m) {            
             m_fparams.m_model = true;
         }
 

File src/parsers/smt/smtlib_solver.cpp

             // Hack: it seems SMT-LIB allow benchmarks without any :formula
             benchmark.add_formula(m_ast_manager.mk_true());
         }
-        m_ctx = alloc(cmd_context, m_params, true, &m_ast_manager, benchmark.get_logic());
+        m_ctx = alloc(cmd_context, &m_params, true, &m_ast_manager, benchmark.get_logic());
         m_ctx->set_solver(mk_smt_strategic_solver(*m_ctx));
         theory::expr_iterator fit  = benchmark.begin_formulas();
         theory::expr_iterator fend = benchmark.end_formulas();

File src/shell/main.cpp

         m_statistics(g_display_statistics) {
     }
 
+    virtual ~extra_params() {}
+
     virtual void register_params(ini_params & p) {
         datalog_params::register_params(p);
         p.register_bool_param("STATISTICS", m_statistics, "display statistics");

File src/shell/smtlib_frontend.cpp

     g_start_time = clock();
     register_on_timeout_proc(on_timeout);
     signal(SIGINT, on_ctrl_c);
-    cmd_context ctx(front_end_params);
+    cmd_context ctx(&front_end_params);
 
     // temporary hack until strategic_solver is ported to new tactic framework
     if (front_end_params.m_nlsat) {

File src/smt/theory_diff_logic_def.h

     inc_conflicts();
     literal_vector const& lits = m_nc_functor.get_lits();
     context & ctx = get_context();
-    region& r = ctx.get_region();
+    // region& r = ctx.get_region();
     TRACE("arith_conflict", 
           //display(tout);
           tout << "conflict: ";

File src/tactic/fpa/fpa2bv_converter.cpp

         L = m_bv_util.mk_extract(bv_sz/2-1, 0, e);
 
         unsigned H_size = m_bv_util.get_bv_size(H);
-        unsigned L_size = m_bv_util.get_bv_size(L);
+        // unsigned L_size = m_bv_util.get_bv_size(L);
 
         expr_ref lzH(m), lzL(m);
         mk_leading_zeros(H, max_bits, lzH); /* recursive! */
 	}
 
     fu.fm().del(fp_val);
-}
+}

File src/tactic/sls/sls_tactic.cpp

 
             void randomize_local(goal_ref const & g) {
                 ptr_vector<func_decl> & unsat_constants = get_unsat_constants(g);
-                bool did_something = false;
+                // bool did_something = false;
                 for (unsigned i = 0; i < unsat_constants.size(); i++) {
                     func_decl * fd = unsat_constants[i];
                     mpz temp = get_random(fd->get_range());
-                    if (m_mpz_manager.neq(temp, get_value(fd)))
-                        did_something = true;
+                    if (m_mpz_manager.neq(temp, get_value(fd))) {
+                        // did_something = true;
+                    }
                     update(fd, temp);
                     m_mpz_manager.del(temp);
                 }

File src/tactic/smt/ctx_solver_simplify_tactic.cpp

 
     void reduce(goal& g) {
         SASSERT(g.is_well_sorted());
-        bool proofs_enabled = g.proofs_enabled();
         m_num_steps = 0;
         expr_ref fml(m);
         tactic_report report("ctx-solver-simplify", g);
-        unsigned sz = g.size();
         if (g.inconsistent())
             return;
         ptr_vector<expr> fmls;

File src/tactic/ufbv/macro_finder_tactic.cpp

         bool m_cancel;
         bool m_elim_and;
 
-        imp(ast_manager & m, params_ref const & p) : m_manager(m),m_elim_and(false),m_cancel(false) {
+        imp(ast_manager & m, params_ref const & p) : 
+            m_manager(m),
+            m_cancel(false),
+            m_elim_and(false) {
             updt_params(p);
         }
         
             fail_if_unsat_core_generation("macro-finder", g);
 
             bool produce_proofs = g->proofs_enabled();
-            bool produce_models = g->models_enabled();
 
             simplifier simp(m_manager);
             basic_simplifier_plugin * bsimp = alloc(basic_simplifier_plugin, m_manager);

File src/tactic/ufbv/quasi_macros_tactic.cpp

             fail_if_unsat_core_generation("quasi-macros", g);
 
             bool produce_proofs = g->proofs_enabled();
-            bool produce_models = g->models_enabled();
             
             simplifier simp(m_manager);
             basic_simplifier_plugin * bsimp = alloc(basic_simplifier_plugin, m_manager);

File src/tactic/ufbv/ufbv_rewriter_tactic.cpp

             fail_if_unsat_core_generation("ufbv-rewriter", g);
 
             bool produce_proofs = g->proofs_enabled();
-            bool produce_models = g->models_enabled();
             
             basic_simplifier_plugin bsimp(m_manager);
             bsimp.set_eliminate_and(true);

File src/test/bv_simplifier_plugin.cpp

 public:
 
     tst_bv_simplifier_plugin_cls() : 
-        m_bv_util(m_manager), 
         m_bsimp(m_manager),
         m_arith(m_manager),
         m_simp(m_manager, m_bsimp, m_bv_params), 
+        m_bv_util(m_manager), 
         m_fid(m_manager.get_family_id("bv")) {
         reg_decl_plugins(m_manager);
     }
     void test_num(unsigned a) {
         expr_ref e(m_manager), e1(m_manager);
         app_ref ar(m_manager);
-        int sa = static_cast<int>(a);
         uint64 a64 = static_cast<uint64>(a);
 
         e1 = m_bv_util.mk_numeral(rational(a), 32);

File src/test/check_assumptions.cpp

 
     expr * assumpt[] = { nq.get(), nr.get() };
     //here it should crash
-    lbool res2 = ctx.check(2, assumpt);
+    ctx.check(2, assumpt);
 }
 

File src/test/dl_context.cpp

     context ctx(m, fparams);
     ctx.updt_params(params);
 
-    lbool status = dl_context_eval_unary_predicate(m, ctx, "Z 64\n\nP(x:Z)\nP(\"a\").", "P");
+    /* lbool status = */ dl_context_eval_unary_predicate(m, ctx, "Z 64\n\nP(x:Z)\nP(\"a\").", "P");
 
 #if 0
     // TBD:

File src/test/dl_query.cpp

         bool use_magic_sets) {
 
     dl_decl_util decl_util(m);
-    relation_manager & rel_mgr_b = ctx_b.get_rmanager();
 
     context ctx_q(m, fparams);
     params.set_bool(":magic-sets-for-queries", use_magic_sets);

File src/test/dl_smt_relation.cpp

         Z3_ast ffx = Z3_mk_app(ctx, cons_decl, 2, zero_fx);
         Z3_ast xy[2] = { x, y };
         Z3_ast zy[2] = { z, y };
-        Z3_ast ffxy[2] = { ffx, y };
-        Z3_ast fxy[2] = { fx, y };
+        // Z3_ast ffxy[2] = { ffx, y };
+        // Z3_ast fxy[2] = { fx, y };
         Z3_ast zero_nil[2] = { zero, Z3_mk_app(ctx, nil_decl, 0, 0) };
         Z3_ast f0 = Z3_mk_app(ctx, cons_decl, 2, zero_nil);
         Z3_ast zero_f0[2] = { zero, f0 };

File src/test/get_implied_equalities.cpp

     Z3_context ctx = Z3_mk_context(cfg);
     Z3_del_config(cfg);
     Z3_sort int_ty = Z3_mk_int_sort(ctx);
-	Z3_sort a_ty = Z3_mk_array_sort(ctx, int_ty, int_ty);	
     Z3_ast a = mk_int_var(ctx,"a");
     Z3_ast b = mk_int_var(ctx,"b");
-    Z3_ast c = mk_int_var(ctx,"c");
-    Z3_ast d = mk_int_var(ctx,"d");
-	Z3_ast one = Z3_mk_numeral(ctx, "1", int_ty);
-	Z3_ast two = Z3_mk_numeral(ctx, "2", int_ty);
-	Z3_ast x = Z3_mk_const_array(ctx, int_ty, one);
-	Z3_ast y = Z3_mk_store(ctx, x, one, a);
-	Z3_ast z = Z3_mk_store(ctx, y, two , b);
-	Z3_ast u = Z3_mk_store(ctx, x, two , b);
-	Z3_ast v = Z3_mk_store(ctx, u, one , a);
+    Z3_ast one = Z3_mk_numeral(ctx, "1", int_ty);
+    Z3_ast two = Z3_mk_numeral(ctx, "2", int_ty);
+    Z3_ast x = Z3_mk_const_array(ctx, int_ty, one);
+    Z3_ast y = Z3_mk_store(ctx, x, one, a);
+    Z3_ast z = Z3_mk_store(ctx, y, two , b);
+    Z3_ast u = Z3_mk_store(ctx, x, two , b);
+    Z3_ast v = Z3_mk_store(ctx, u, one , a);
     unsigned const num_terms = 5;
     unsigned i;
     Z3_ast terms[5] = { x, y, z, u, v};

File src/test/hwf.cpp

     m.to_rational(a, r);
     ad = m.to_double(a);
     rd = mq.get_double(r);
-    double diff = (ad-rd);
 #ifdef _WINDOWS    
     // CMW: This one depends on the rounding mode,
     // which is implicit in both hwf::set and in mpq::to_double.
+    double diff = (ad-rd);
     SASSERT(diff >= -DBL_EPSILON && diff <= DBL_EPSILON);
 #endif
 }
 
 static void bug_is_int() {
-    unsigned raw_val[2] = { 2147483648, 1077720461 };
+    unsigned raw_val[2] = { 2147483648u, 1077720461u };
     double   val = *(double*)(raw_val);
     std::cout << val << "\n";
     hwf_manager m;

File src/test/inf_rational.cpp

     SASSERT(ceil(inf_rational(rational(1))) == rational(1));
     SASSERT(ceil(inf_rational(rational(1),true)) == rational(2));
 
-    unsigned h = r9.hash();
-
     inf_rational x(rational(1,2),true);
     inf_rational y(1,2);
     x.swap(y);

File src/test/interval.cpp

     out << "))\n";
 }
 
+#if 0
 static bool mk_interval(im_default_config & cfg, interval & a, bool l_inf, bool l_open, int l_val, bool u_inf, bool u_open, int u_val) {
     if (!l_inf && !u_inf) {
         if (l_val > u_val)
     
     return true;
 }
+#endif
 
 static void mk_random_interval(im_default_config & cfg, interval & a, unsigned magnitude) {
     switch (rand()%3) {
 
 #include"im_float_config.h"
 
+#if 0
 static void tst_float() {
     unsynch_mpq_manager   qm;
     mpf_manager           fm;
 
     del_f_interval(ifc, a); del_f_interval(ifc, b); del_f_interval(ifc, c);
 }
+#endif
 
 void tst_pi() {
     unsynch_mpq_manager                 nm;     
     del_interval(imc, r);
 }
 
+#if 0
 static void tst_pi_float() {
     std::cout << "pi float...\n";
     unsynch_mpq_manager   qm;
     }
     del_f_interval(ifc, r);
 }
+#endif 
 
 #define NUM_TESTS 1000
 #define SMALL_MAG 3

File src/test/model_retrieval.cpp

 
     family_id array_fid = m.get_family_id(symbol("array"));
     array_util au(m);
-    array_decl_plugin& ad = *static_cast<array_decl_plugin *>(m.get_plugin(array_fid));
-
-
+    
     // arr_s and select_fn creation copy-pasted from z3.cpp
 
     parameter sparams[2]  = { parameter(to_sort(m.mk_bool_sort())), parameter(to_sort(m.mk_bool_sort())) };

File src/test/mpff.cpp

     m.display_smt2(std::cout, a); std::cout << "\n";
 }
 
-//  if (!qm.le(qa, qt)) { TRACE("mpff_bug", tout << fa << "\n" << qa << "\n" << qt << "\n";); UNREACHABLE(); } \
+//  if (!qm.le(qa, qt)) { TRACE("mpff_bug", tout << fa << "\n" << qa << "\n" << qt << "\n";); UNREACHABLE(); }
 
 
 #define MK_BIN_OP(OP)                                                   \
     SASSERT(!m.is_minus_epsilon(a));
 }
 
+#if 0
 static void tst_add_corner(unsigned prec) {
     mpff_manager m(prec);
     scoped_mpff a(m), b(m);
 }
+#endif
 
 static void tst_decimal(int64 n, uint64 d, bool to_plus_inf, unsigned prec, char const * expected, unsigned decimal_places = UINT_MAX) {
     mpff_manager m(prec);

File src/test/mpq.cpp

     m.del(v3);
 }
 
+#if 0
 static void mk_random_num_str(unsigned buffer_sz, char * buffer) {
     unsigned div_pos;
     unsigned sz = (rand() % (buffer_sz-2)) + 1;
     }
     buffer[sz-1] = 0;
 }
+#endif
 
 static void bug1() {
     synch_mpq_manager m;

File src/test/mpz.cpp

     m.del(v3);
 }
 
+#if 0
 static void mk_random_num_str(unsigned buffer_sz, char * buffer) {
     unsigned sz = (rand() % (buffer_sz-2)) + 1;
     SASSERT(sz < buffer_sz);
         buffer[0] = '-';
     buffer[sz-1] = 0;
 }
+#endif
 
 static void bug1() {
     synch_mpz_manager m;

File src/test/nlsat.cpp

 static void tst5() {
     params_ref      ps;
     nlsat::solver s(ps);
-    unsynch_mpq_manager & qm = s.qm();
     anum_manager & am = s.am();
     nlsat::pmanager & pm = s.pm();
     nlsat::assignment           as(am);

File src/test/object_allocator.cpp

     cell_allocator m;
     
     cell * c1 = m.allocate<true>();
-    cell * c2 = m.allocate<true>();
+    /* cell * c2 = */ m.allocate<true>();
 
     c1->m_coeff = rational(10);
     m.recycle(c1);

File src/test/parray.cpp

           m.display_info(tout, a1); tout << "\n";
           m.display_info(tout, a2); tout << "\n";);
     for (unsigned i = 0; i < m.size(a1); i++) {
-        SASSERT(m.get(a1, i) == i);
+        SASSERT(static_cast<unsigned>(m.get(a1, i)) == i);
     }
     for (unsigned i = 0; i < m.size(a2); i++) {
-        SASSERT(m.get(a2, i) == i);
+        SASSERT(static_cast<unsigned>(m.get(a2, i)) == i);
     }
     TRACE("parray", 
           m.display_info(tout, a1); tout << "\n";
     m.push_back(a4, 30);
     
     for (unsigned i = 0; i < 20; i++) {
-        SASSERT(m.get(a2, i) == i+1);
+        SASSERT(static_cast<unsigned>(m.get(a2, i)) == i+1);
     }
     TRACE("parray", 
           m.display_info(tout, a1); tout << "\n";
     SASSERT(m.size(a3) == 19);
     SASSERT(m.size(a4) == 19);
     for (unsigned i = 0; i < 20; i++) {
-        SASSERT(m.get(a1, i) == i);
-        SASSERT(m.get(a2, i) == i+1);
-        SASSERT(i >= 18 || m.get(a4, i) == i+1);
-        SASSERT(i >= 6 || m.get(a3, i) == i+1);
-        SASSERT(!(6 <= i && i <= 17) || m.get(a3, i) == i);
+        SASSERT(static_cast<unsigned>(m.get(a1, i)) == i);
+        SASSERT(static_cast<unsigned>(m.get(a2, i)) == i+1);
+        SASSERT(i >= 18 || static_cast<unsigned>(m.get(a4, i)) == i+1);
+        SASSERT(i >= 6 ||  static_cast<unsigned>(m.get(a3, i)) == i+1);
+        SASSERT(!(6 <= i && i <= 17) || static_cast<unsigned>(m.get(a3, i)) == i);
     }
     SASSERT(m.get(a4, 18) == 30);
     SASSERT(m.get(a3, 18) == 40);

File src/test/polynomial.cpp

     }
 }
 
+#if 0
 static void tst_psc_perf(polynomial_ref const & p, polynomial_ref const & q, polynomial::var x) {
     polynomial::manager & m = p.m();
     polynomial_ref_vector S(m);
         std::cout << "S_" << i << ": " << m.size(S.get(i)) << std::endl; // polynomial_ref(S.get(i), m) << std::endl;
     }
 }
+#endif
 
 static void tst_psc() {
     polynomial::numeral_manager nm;
     polynomial_ref & d = x3;
     polynomial_ref & e = x4;
     polynomial_ref & f = x5;
-    polynomial_ref & g = x6;
-    polynomial_ref & h = x7;
-    polynomial_ref & i = x8;
     polynomial_ref & x = x9;
     tst_psc((x^4) + a*(x^2) + b*x + c, 4*(x^3) + 2*a*x + b, 9,
             16*(a^4)*c - 4*(a^3)*(b^2) - 128*(a^2)*(c^2) + 144*a*(b^2)*c - 27*(b^4) + 256*(c^3), 8*(a^3) - 32*a*c + 36*(b^2));
                   );
 }
 
+#if 0
 static void tst_p25() {
     unsynch_mpq_manager qm;
     polynomial::manager m(qm);
     p = (x0 + x1 + x2 + x3 + x4 + x5 + x6)^25;
     std::cout << "size(p): " << size(p) << "\n";
 }
+#endif
 
 static void tst_mm() {
     unsynch_mpq_manager qm;
     tst_gcd(p, p_prime, x1^4);
 }
 
+#if 0
 static void tst_gcd3() {
     enable_trace("polynomial_gcd");
     enable_trace("polynomial_gcd_detail");
         (1000000*x + 1)*(333333333*x + 1)*(77777777*x + 1)*(11111111*x + 1)*(x + 128384747)*(x + 82837437)*(x + 22848481);
     tst_gcd(p, derivative(p, 0), (x + 3)^9);
 }
+#endif 
 
 static void tst_newton_interpolation() {
     // enable_trace("newton");

File src/test/polynomial_factorization.cpp

     }
 };
 
+#if 0
 static void tst_square_free_finite_1() {
     polynomial::numeral_manager nm;
     polynomial::manager pm(nm);
         
         // factor it
         upolynomial::zp_factors factors(upm);        
-        bool factorized = upolynomial::zp_factor(upm, K_u, factors);
+        /* bool factorized = */ upolynomial::zp_factor(upm, K_u, factors);
     
         // check the result
         unsigned distinct = factors.distinct_factors();
             cout << "Got " << factors << endl;
             cout << "Thats " << distinct << " distinct factors, " << total << " total" << endl;
 
-            SASSERT(random_polynomial[random_i][0][prime_i] == distinct);
-            SASSERT(random_polynomial[random_i][1][prime_i] == total);
+            // SASSERT(random_polynomial[random_i][0][prime_i] == distinct);
+            // SASSERT(random_polynomial[random_i][1][prime_i] == total);
             
             upolynomial::numeral_vector multiplied;
             factors.multiply(multiplied);
             cout << "factoring "; upm.display(cout, f_u); cout << endl;
             cout << "expecting " << length << " factors ";
             upolynomial::factors factors(upm);
-            bool ok = upolynomial::factor_square_free(upm, f_u, factors);        
+            /* bool ok = */ upolynomial::factor_square_free(upm, f_u, factors); 
             cout << "got " << factors << endl;
             
             SASSERT(factors.distinct_factors() == length);
         
     upm.reset(deg70_u);
 }
+#endif
 
 void tst_factor_swinnerton_dyer_big(unsigned max) {
     polynomial::numeral_manager nm;

File src/test/quant_solve.cpp

 }
 
 
+#if 0
 static void validate_quant_solutions(app* x, expr* fml, expr_ref_vector& guards) {
     return;
     // quant_elim option got removed...
         fatal_error(0);
     }
 }
-
+#endif
 
 
 static void test_quant_solver(ast_manager& m, unsigned sz, app*const* xs, expr* fml) {
 static expr_ref parse_fml(ast_manager& m, char const* str) {
     expr_ref result(m);
     front_end_params fp;
-    cmd_context ctx(fp, false, &m);
+    cmd_context ctx(&fp, false, &m);
     ctx.set_ignore_check(true);
     std::ostringstream buffer;
     buffer << "(declare-const x Int)\n"

File src/test/trigo.cpp

    }
 }
 
+#if 0
 static void tst_mpf_bug() {
     mpf_manager fm;
     scoped_mpf a(fm), b(fm), c(fm);
     fm.mul(MPF_ROUND_TOWARD_NEGATIVE, a, b, c);
     std::cout << "c: " << fm.to_double(c) << "\n";
 }
+#endif
 
 static void tst_e(std::ostream & out) {
     unsynch_mpq_manager                 nm;     

File src/test/upolynomial.cpp

     um.display(std::cout, seq2);
 }
 
+#if 0
 static void tst_isolate_roots2() {
     polynomial::numeral_manager nm;
     polynomial::manager m(nm);
     }
     um.display(std::cout, _p_sqf.size(), _p_sqf.c_ptr()); std::cout << "\n";
 }
+#endif 
 
 static void tst_isolate_roots5() {
     polynomial::numeral_manager nm;

File src/test/vector.cpp

     SASSERT(v1.empty());
     for (unsigned i = 0; i < 1000; i++) {
         v1.push_back(i + 3);
-        SASSERT(v1[i] == i + 3);
+        SASSERT(static_cast<unsigned>(v1[i]) == i + 3);
         SASSERT(v1.capacity() >= v1.size());
         SASSERT(!v1.empty());
     }
     for (unsigned i = 0; i < 1000; i++) {
-        SASSERT(v1[i] == i + 3);
+        SASSERT(static_cast<unsigned>(v1[i]) == i + 3);
     }
     vector<int>::iterator it = v1.begin();
     vector<int>::iterator end = v1.end();
         SASSERT(*it == i + 3);
     }
     for (unsigned i = 0; i < 1000; i++) {
-        SASSERT(v1.back() == 1000 - i - 1 + 3);
+        SASSERT(static_cast<unsigned>(v1.back()) == 1000 - i - 1 + 3);
         SASSERT(v1.size() == 1000 - i);
         v1.pop_back();
     }

File src/util/debug.h

 #define MAKE_NAME2(LINE) zofty_ ## LINE 
 #define MAKE_NAME(LINE) MAKE_NAME2(LINE)
 #define DBG_UNIQUE_NAME MAKE_NAME(__LINE__)
+#ifdef __GNUC__
+#define COMPILE_TIME_ASSERT(expr) extern __attribute__((unused)) char DBG_UNIQUE_NAME[expr]
+#else
 #define COMPILE_TIME_ASSERT(expr) extern char DBG_UNIQUE_NAME[expr]
+#endif
 
 template<class T>
 class class_invariant 

File src/util/diff_logic.h

         for (unsigned i = 0; i < edges.size(); ++i) {
             
             potential0 += m_edges[edges[i]].get_weight();
-            numeral potential1 = potentials[i];
+            // numeral potential1 = potentials[i];
             if (potential0 != potentials[i] || 
                 nodes[i] != m_edges[edges[i]].get_source()) {
                 TRACE("diff_logic_traverse", tout << "checking index " << i << " ";

File src/util/hwf.cpp

 #pragma fp_contract(off)              // contractions off (`contraction' means x*y+z is turned into a fused-mul-add).
 #pragma fenv_access(on)               // fpu environment sensitivity (needed to be allowed to make FPU mode changes).
 #else
+#ifdef _WINDOWS
 #pragma STDC FENV_ACCESS ON
+#endif
 #include <math.h>
 #include <fenv.h>
 #endif

File src/util/mpz.cpp

 #endif    
 }
 
-#ifndef _MP_GMP
-static void display_bits(std::ostream & out, digit_t a) {
-    for (unsigned i = 0; i < sizeof(digit_t) * 8; i++) {
-        if (a % 2 == 0)
-            out << "0";
-        else
-            out << "1";
-        a /= 2;
-    }
-}
-#endif
-
 template<bool SYNCH>
 void mpz_manager<SYNCH>::mul2k(mpz & a, unsigned k) {
     if (k == 0 || is_zero(a))

File src/util/warning.cpp

     g_show_error_msg_prefix = false;
 }
 
+#if 0
+// [Leo]: Do we need this?
 static void string2ostream(std::ostream& out, char const* msg) {
     svector<char>  buff;
     buff.resize(10);
     END_ERR_HANDLER();
     out << buff.c_ptr();
 }
+#endif
 
 void format2ostream(std::ostream & out, char const* msg, va_list args) {
     svector<char>  buff;
 
 void print_msg(std::ostream * out, const char* prefix, const char* msg, va_list args) {
     if (out) {
-        string2ostream(*out, prefix);
+        *out << prefix;
         format2ostream(*out, msg, args);
-        string2ostream(*out, "\n");
+        *out << "\n";
         out->flush();
     }
     else {
         FILE * f = g_use_std_stdout ? stdout : stderr;
-        fprintf(f, prefix);
+        fprintf(f, "%s", prefix);
         vfprintf(f, msg, args);
         fprintf(f, "\n");
         fflush(f);