mirror of
https://github.com/Z3Prover/z3
synced 2025-04-06 17:44:08 +00:00
removed front-end-params
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
This commit is contained in:
parent
288a96610f
commit
ffb7e26c75
|
@ -28,7 +28,7 @@ Revision History:
|
|||
#include"datatype_decl_plugin.h"
|
||||
#include"dl_decl_plugin.h"
|
||||
#include"smt_kernel.h"
|
||||
#include"front_end_params.h"
|
||||
#include"smt_params.h"
|
||||
#include"event_handler.h"
|
||||
#include"tactic_manager.h"
|
||||
#include"context_params.h"
|
||||
|
@ -53,7 +53,7 @@ namespace api {
|
|||
datalog::dl_decl_util m_datalog_util;
|
||||
|
||||
// Support for old solver API
|
||||
front_end_params m_fparams;
|
||||
smt_params m_fparams;
|
||||
smt::kernel * m_solver; // General purpose solver for backward compatibility
|
||||
// -------------------------------
|
||||
|
||||
|
@ -172,7 +172,7 @@ namespace api {
|
|||
// Solver interface for backward compatibility
|
||||
//
|
||||
// ------------------------
|
||||
front_end_params & fparams() { return m_fparams; }
|
||||
smt_params & fparams() { return m_fparams; }
|
||||
bool has_solver() const { return m_solver != 0; }
|
||||
smt::kernel & get_smt_kernel();
|
||||
void assert_cnstr(expr * a);
|
||||
|
|
|
@ -32,7 +32,7 @@ Revision History:
|
|||
|
||||
namespace api {
|
||||
|
||||
fixedpoint_context::fixedpoint_context(ast_manager& m, front_end_params& p) :
|
||||
fixedpoint_context::fixedpoint_context(ast_manager& m, smt_params& p) :
|
||||
m_state(0),
|
||||
m_reduce_app(0),
|
||||
m_reduce_assign(0),
|
||||
|
|
|
@ -21,7 +21,7 @@ Revision History:
|
|||
|
||||
#include"z3.h"
|
||||
#include"ast.h"
|
||||
#include"front_end_params.h"
|
||||
#include"smt_params.h"
|
||||
#include"dl_external_relation.h"
|
||||
#include"dl_decl_plugin.h"
|
||||
#include"smt_kernel.h"
|
||||
|
@ -40,7 +40,7 @@ namespace api {
|
|||
datalog::context m_context;
|
||||
ast_ref_vector m_trail;
|
||||
public:
|
||||
fixedpoint_context(ast_manager& m, front_end_params& p);
|
||||
fixedpoint_context(ast_manager& m, smt_params& p);
|
||||
virtual ~fixedpoint_context() {}
|
||||
family_id get_family_id() const { return const_cast<datalog::context&>(m_context).get_decl_util().get_family_id(); }
|
||||
void set_state(void* state);
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
// include "spc_decl_plugin.h"
|
||||
#include "ast_smt_pp.h"
|
||||
#include "arith_decl_plugin.h"
|
||||
#include "front_end_params.h"
|
||||
#include "smt_params.h"
|
||||
#include "th_rewriter.h"
|
||||
#include "var_subst.h"
|
||||
|
||||
|
|
|
@ -36,7 +36,6 @@ public:
|
|||
bool m_validate_model;
|
||||
bool m_unsat_core;
|
||||
unsigned m_timeout;
|
||||
bool m_statistics;
|
||||
|
||||
context_params();
|
||||
void set(char const * param, char const * value);
|
||||
|
|
|
@ -1,51 +0,0 @@
|
|||
/*++
|
||||
Copyright (c) 2006 Microsoft Corporation
|
||||
|
||||
Module Name:
|
||||
|
||||
front_end_params.cpp
|
||||
|
||||
Abstract:
|
||||
|
||||
<abstract>
|
||||
|
||||
Author:
|
||||
|
||||
Leonardo de Moura (leonardo) 2007-05-10.
|
||||
|
||||
Revision History:
|
||||
|
||||
--*/
|
||||
#include"front_end_params.h"
|
||||
|
||||
#if 0
|
||||
|
||||
void front_end_params::register_params(ini_params & p) {
|
||||
preprocessor_params::register_params(p);
|
||||
smt_params::register_params(p);
|
||||
arith_simplifier_params::register_params(p);
|
||||
p.register_bool_param("at_labels_cex", m_at_labels_cex,
|
||||
"only use labels that contain '@' when building multiple counterexamples");
|
||||
p.register_bool_param("check_at_labels", m_check_at_labels,
|
||||
"check that labels containing '@' are used correctly to only produce unique counter examples");
|
||||
p.register_bool_param("type_check", m_well_sorted_check, "enable/disable type checker");
|
||||
p.register_bool_param("well_sorted_check", m_well_sorted_check, "enable/disable type checker");
|
||||
p.register_unsigned_param("soft_timeout", m_soft_timeout, "set approximate timeout for each solver query (milliseconds), the value 0 represents no timeout", true);
|
||||
p.register_double_param("instruction_max", m_instr_out, "set the (approximate) maximal number of instructions per invocation of check", true);
|
||||
|
||||
#ifdef _WINDOWS
|
||||
// The non-windows memory manager does not have access to memory sizes.
|
||||
p.register_unsigned_param("memory_high_watermark", m_memory_high_watermark,
|
||||
"set high watermark for memory consumption (in megabytes)");
|
||||
p.register_unsigned_param("memory_max_size", m_memory_max_size,
|
||||
"set hard upper limit for memory consumption (in megabytes)");
|
||||
#endif
|
||||
|
||||
|
||||
PRIVATE_PARAMS({
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
|
|
@ -1,51 +0,0 @@
|
|||
/*++
|
||||
Copyright (c) 2006 Microsoft Corporation
|
||||
|
||||
Module Name:
|
||||
|
||||
front_end_params.h
|
||||
|
||||
Abstract:
|
||||
|
||||
<abstract>
|
||||
|
||||
Author:
|
||||
|
||||
Leonardo de Moura (leonardo) 2007-05-10.
|
||||
|
||||
Revision History:
|
||||
|
||||
--*/
|
||||
#ifndef _FRONT_END_PARAMS_H_
|
||||
#define _FRONT_END_PARAMS_H_
|
||||
|
||||
#include"ast.h"
|
||||
#include"smt_params.h"
|
||||
|
||||
struct front_end_params : public smt_params {
|
||||
bool m_well_sorted_check;
|
||||
unsigned m_memory_high_watermark;
|
||||
unsigned m_memory_max_size;
|
||||
proof_gen_mode m_proof_mode;
|
||||
bool m_auto_config;
|
||||
|
||||
bool m_debug_ref_count;
|
||||
|
||||
front_end_params():
|
||||
m_well_sorted_check(true),
|
||||
m_memory_high_watermark(0),
|
||||
m_memory_max_size(0),
|
||||
m_proof_mode(PGM_DISABLED),
|
||||
m_auto_config(true),
|
||||
m_debug_ref_count(false) {
|
||||
}
|
||||
|
||||
bool has_auto_config(unsigned idx) { return m_auto_config; }
|
||||
|
||||
private:
|
||||
|
||||
front_end_params& operator=(front_end_params const& other);
|
||||
};
|
||||
|
||||
#endif /* _FRONT_END_PARAMS_H_ */
|
||||
|
|
@ -1,31 +0,0 @@
|
|||
/*++
|
||||
Copyright (c) 2011 Microsoft Corporation
|
||||
|
||||
Module Name:
|
||||
|
||||
params2front_end_params.h
|
||||
|
||||
Abstract:
|
||||
|
||||
Backward compatibility utilities for parameter setting
|
||||
|
||||
Author:
|
||||
|
||||
Leonardo de Moura (leonardo) 2011-05-19.
|
||||
|
||||
Revision History:
|
||||
|
||||
--*/
|
||||
#ifndef _PARAMS2FRONT_END_PARAMS_H_
|
||||
#define _PARAMS2FRONT_END_PARAMS_H_
|
||||
|
||||
class params_ref;
|
||||
struct front_end_params;
|
||||
|
||||
void params2front_end_params(params_ref const & s, front_end_params & t);
|
||||
|
||||
void front_end_params2params(front_end_params const & s, params_ref & t);
|
||||
|
||||
void solver_front_end_params_descrs(param_descrs & r);
|
||||
|
||||
#endif
|
|
@ -3,7 +3,7 @@ Copyright (c) 2011 Microsoft Corporation
|
|||
|
||||
Module Name:
|
||||
|
||||
params2front_end_params.h
|
||||
params2smt_params.h
|
||||
|
||||
Abstract:
|
||||
|
||||
|
@ -16,17 +16,17 @@ Author:
|
|||
Revision History:
|
||||
|
||||
--*/
|
||||
#include"front_end_params.h"
|
||||
#include"smt_params.h"
|
||||
#include"params.h"
|
||||
|
||||
/**
|
||||
Update front_end_params using s.
|
||||
Update smt_params using s.
|
||||
Only the most frequently used options are updated.
|
||||
|
||||
This function is mainly used to allow smt::context to be used in
|
||||
the new strategy framework.
|
||||
*/
|
||||
void params2front_end_params(params_ref const & s, front_end_params & t) {
|
||||
void params2smt_params(params_ref const & s, smt_params & t) {
|
||||
t.m_relevancy_lvl = s.get_uint("relevancy", t.m_relevancy_lvl);
|
||||
TRACE("qi_cost", s.display(tout); tout << "\n";);
|
||||
t.m_qi_cost = s.get_str("qi_cost", t.m_qi_cost.c_str());
|
||||
|
@ -36,7 +36,6 @@ void params2front_end_params(params_ref const & s, front_end_params & t) {
|
|||
t.m_model = s.get_bool("produce_models", t.m_model);
|
||||
if (s.get_bool("produce_proofs", false))
|
||||
t.m_proof_mode = PGM_FINE;
|
||||
t.m_well_sorted_check = s.get_bool("check_sorts", t.m_well_sorted_check);
|
||||
t.m_qi_eager_threshold = s.get_double("qi_eager_threshold", t.m_qi_eager_threshold);
|
||||
t.m_qi_lazy_threshold = s.get_double("qi_lazy_threshold", t.m_qi_lazy_threshold);
|
||||
t.m_preprocess = s.get_bool("preprocess", t.m_preprocess);
|
||||
|
@ -57,7 +56,7 @@ void params2front_end_params(params_ref const & s, front_end_params & t) {
|
|||
It also copies the model construction parameter. Thus, model construction
|
||||
can be enabled at the command line.
|
||||
*/
|
||||
void front_end_params2params(front_end_params const & s, params_ref & t) {
|
||||
void smt_params2params(smt_params const & s, params_ref & t) {
|
||||
if (s.m_model)
|
||||
t.set_bool("produce_models", true);
|
||||
if (!s.m_hi_div0)
|
||||
|
@ -67,7 +66,7 @@ void front_end_params2params(front_end_params const & s, params_ref & t) {
|
|||
/**
|
||||
\brief Bridge for using params_ref with smt::context.
|
||||
*/
|
||||
void solver_front_end_params_descrs(param_descrs & r) {
|
||||
void solver_smt_params_descrs(param_descrs & r) {
|
||||
r.insert("hi_div0", CPK_BOOL, "(default: true) if true, then Z3 uses the usual hardware interpretation for division (rem, mod) by zero. Otherwise, these operations are considered uninterpreted");
|
||||
r.insert("relevancy", CPK_UINT, "relevancy propagation heuristic: 0 - disabled, 1 - relevancy is tracked by only affects quantifier instantiation, 2 - relevancy is tracked, and an atom is only asserted if it is relevant");
|
||||
r.insert("mbqi", CPK_BOOL, "model based quantifier instantiation (MBQI)");
|
31
src/front_end_params/params2smt_params.h
Normal file
31
src/front_end_params/params2smt_params.h
Normal file
|
@ -0,0 +1,31 @@
|
|||
/*++
|
||||
Copyright (c) 2011 Microsoft Corporation
|
||||
|
||||
Module Name:
|
||||
|
||||
params2smt_params.h
|
||||
|
||||
Abstract:
|
||||
|
||||
Backward compatibility utilities for parameter setting
|
||||
|
||||
Author:
|
||||
|
||||
Leonardo de Moura (leonardo) 2011-05-19.
|
||||
|
||||
Revision History:
|
||||
|
||||
--*/
|
||||
#ifndef _PARAMS2SMT_PARAMS_H_
|
||||
#define _PARAMS2SMT_PARAMS_H_
|
||||
|
||||
class params_ref;
|
||||
struct smt_params;
|
||||
|
||||
void params2smt_params(params_ref const & s, smt_params & t);
|
||||
|
||||
void smt_params2params(smt_params const & s, params_ref & t);
|
||||
|
||||
void solver_smt_params_descrs(param_descrs & r);
|
||||
|
||||
#endif
|
|
@ -19,6 +19,7 @@ Revision History:
|
|||
#ifndef _SMT_PARAMS_H_
|
||||
#define _SMT_PARAMS_H_
|
||||
|
||||
#include"ast.h"
|
||||
#include"dyn_ack_params.h"
|
||||
#include"qi_params.h"
|
||||
#include"theory_arith_params.h"
|
||||
|
@ -205,6 +206,24 @@ struct smt_params : public preprocessor_params,
|
|||
bool m_at_labels_cex; // only use labels which contains the @ symbol when building multiple counterexamples.
|
||||
bool m_check_at_labels; // check that @ labels are inserted to generate unique counter-examples.
|
||||
bool m_dump_goal_as_smt;
|
||||
proof_gen_mode m_proof_mode;
|
||||
bool m_auto_config;
|
||||
|
||||
#if 0
|
||||
unsigned m_memory_high_watermark;
|
||||
unsigned m_memory_max_size;
|
||||
|
||||
bool m_auto_config;
|
||||
|
||||
bool m_debug_ref_count;
|
||||
|
||||
m_well_sorted_check(true),
|
||||
m_memory_high_watermark(0),
|
||||
m_memory_max_size(0),
|
||||
|
||||
m_auto_config(true),
|
||||
m_debug_ref_count(false) {
|
||||
#endif
|
||||
|
||||
smt_params():
|
||||
m_display_proof(false),
|
||||
|
@ -272,7 +291,9 @@ struct smt_params : public preprocessor_params,
|
|||
m_soft_timeout(0),
|
||||
m_at_labels_cex(false),
|
||||
m_check_at_labels(false),
|
||||
m_dump_goal_as_smt(false) {
|
||||
m_dump_goal_as_smt(false),
|
||||
m_proof_mode(PGM_DISABLED),
|
||||
m_auto_config(true) {
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
@ -32,7 +32,7 @@ namespace datalog {
|
|||
class bmc {
|
||||
context& m_ctx;
|
||||
ast_manager& m;
|
||||
front_end_params m_fparams;
|
||||
smt_params m_fparams;
|
||||
smt::kernel m_solver;
|
||||
obj_map<func_decl, sort*> m_pred2sort;
|
||||
obj_map<sort, func_decl*> m_sort2pred;
|
||||
|
|
|
@ -33,8 +33,8 @@ Notes:
|
|||
|
||||
|
||||
class dl_context {
|
||||
// PARAM-TODO temp HACK: added m_params field because cmd_context does not have front_end_params anymore
|
||||
front_end_params m_params;
|
||||
// PARAM-TODO temp HACK: added m_params field because cmd_context does not have smt_params anymore
|
||||
smt_params m_params;
|
||||
cmd_context & m_cmd;
|
||||
dl_collected_cmds* m_collected_cmds;
|
||||
unsigned m_ref_count;
|
||||
|
|
|
@ -226,7 +226,7 @@ namespace datalog {
|
|||
//
|
||||
// -----------------------------------
|
||||
|
||||
context::context(ast_manager & m, front_end_params& fp, params_ref const& pa):
|
||||
context::context(ast_manager & m, smt_params& fp, params_ref const& pa):
|
||||
m(m),
|
||||
m_fparams(fp),
|
||||
m_params(pa),
|
||||
|
|
|
@ -24,7 +24,7 @@ Revision History:
|
|||
#undef max
|
||||
#endif
|
||||
#include"arith_decl_plugin.h"
|
||||
#include"front_end_params.h"
|
||||
#include"smt_params.h"
|
||||
#include"map.h"
|
||||
#include"th_rewriter.h"
|
||||
#include"str_hashtable.h"
|
||||
|
@ -78,7 +78,7 @@ namespace datalog {
|
|||
typedef vector<std::pair<func_decl*,relation_fact> > fact_vector;
|
||||
|
||||
ast_manager & m;
|
||||
front_end_params& m_fparams;
|
||||
smt_params& m_fparams;
|
||||
params_ref m_params;
|
||||
dl_decl_util m_decl_util;
|
||||
th_rewriter m_rewriter;
|
||||
|
@ -122,7 +122,7 @@ namespace datalog {
|
|||
|
||||
|
||||
public:
|
||||
context(ast_manager & m, front_end_params& params, params_ref const& p = params_ref());
|
||||
context(ast_manager & m, smt_params& params, params_ref const& p = params_ref());
|
||||
~context();
|
||||
void reset();
|
||||
|
||||
|
@ -149,7 +149,7 @@ namespace datalog {
|
|||
relation_manager & get_rmanager() { return m_rmanager; }
|
||||
const relation_manager & get_rmanager() const { return m_rmanager; }
|
||||
rule_manager & get_rule_manager() { return m_rule_manager; }
|
||||
front_end_params & get_fparams() const { return m_fparams; }
|
||||
smt_params & get_fparams() const { return m_fparams; }
|
||||
params_ref const& get_params() const { return m_params; }
|
||||
DL_ENGINE get_engine() { configure_engine(); return m_engine; }
|
||||
th_rewriter& get_rewriter() { return m_rewriter; }
|
||||
|
|
|
@ -129,7 +129,7 @@ namespace datalog {
|
|||
}
|
||||
IF_VERBOSE(10, verbose_stream() << "Checking emptiness...\n"; );
|
||||
|
||||
front_end_params& params = get_plugin().get_fparams();
|
||||
smt_params& params = get_plugin().get_fparams();
|
||||
// [Leo]: asserted_formulas do not have support for der.
|
||||
// We should use the tactics der.
|
||||
// flet<bool> flet2(params.m_der, true);
|
||||
|
@ -182,7 +182,7 @@ namespace datalog {
|
|||
expr_ref fml_free(m), fml_inst(m);
|
||||
fml_free = m.mk_and(facts, m.mk_not(get_relation()));
|
||||
instantiate(fml_free, fml_inst);
|
||||
front_end_params& params = get_plugin().get_fparams();
|
||||
smt_params& params = get_plugin().get_fparams();
|
||||
// [Leo]: asserted_formulas do not have support for qe nor der.
|
||||
// We should use the tactics qe and der.
|
||||
// BTW, qe at asserted_formulas was disabled when we moved to codeplex, but the field m_quant_elim was not deleted.
|
||||
|
@ -239,7 +239,7 @@ namespace datalog {
|
|||
|
||||
void smt_relation::display_finite(std::ostream & out) const {
|
||||
ast_manager& m = get_manager();
|
||||
front_end_params& params = get_plugin().get_fparams();
|
||||
smt_params& params = get_plugin().get_fparams();
|
||||
expr* r = get_relation();
|
||||
expr_ref tmp(m);
|
||||
expr_ref_vector values(m), eqs(m);
|
||||
|
@ -524,7 +524,7 @@ namespace datalog {
|
|||
|
||||
expr_ref rInst(m), srcInst(m), tmp(m), tmp1(m);
|
||||
expr_ref notR(m), srcGround(m);
|
||||
front_end_params& fparams = get(r).get_plugin().get_fparams();
|
||||
smt_params& fparams = get(r).get_plugin().get_fparams();
|
||||
params_ref const& params = get(r).get_plugin().get_params();
|
||||
|
||||
get(r).instantiate(get(r).get_relation(), rInst);
|
||||
|
@ -730,8 +730,8 @@ namespace datalog {
|
|||
return symbol(m_counter++);
|
||||
}
|
||||
|
||||
front_end_params& smt_relation_plugin::get_fparams() {
|
||||
return const_cast<front_end_params&>(get_manager().get_context().get_fparams());
|
||||
smt_params& smt_relation_plugin::get_fparams() {
|
||||
return const_cast<smt_params&>(get_manager().get_context().get_fparams());
|
||||
}
|
||||
|
||||
params_ref const& smt_relation_plugin::get_params() {
|
||||
|
|
|
@ -20,7 +20,7 @@ Revision History:
|
|||
#define _DL_SMT_RELATION_H_
|
||||
|
||||
#include "dl_base.h"
|
||||
#include "front_end_params.h"
|
||||
#include "smt_params.h"
|
||||
#include "params.h"
|
||||
|
||||
namespace datalog {
|
||||
|
@ -70,7 +70,7 @@ namespace datalog {
|
|||
|
||||
symbol fresh_name();
|
||||
|
||||
front_end_params& get_fparams();
|
||||
smt_params& get_fparams();
|
||||
|
||||
params_ref const& get_params();
|
||||
|
||||
|
|
|
@ -26,7 +26,7 @@ class horn_tactic : public tactic {
|
|||
struct imp {
|
||||
ast_manager& m;
|
||||
datalog::context m_ctx;
|
||||
front_end_params m_fparams;
|
||||
smt_params m_fparams;
|
||||
|
||||
imp(ast_manager & m, params_ref const & p):
|
||||
m(m),
|
||||
|
|
|
@ -72,7 +72,7 @@ namespace nlarith {
|
|||
bool m_enable_linear;
|
||||
app_ref m_zero;
|
||||
app_ref m_one;
|
||||
front_end_params m_params;
|
||||
smt_params m_params;
|
||||
basic_simplifier_plugin m_bs;
|
||||
arith_simplifier_plugin m_rw;
|
||||
arith_rewriter m_rw1;
|
||||
|
|
|
@ -1087,7 +1087,7 @@ namespace pdr {
|
|||
// context
|
||||
|
||||
context::context(
|
||||
front_end_params& fparams,
|
||||
smt_params& fparams,
|
||||
params_ref const& params,
|
||||
ast_manager& m
|
||||
)
|
||||
|
|
|
@ -285,7 +285,7 @@ namespace pdr {
|
|||
void reset() { memset(this, 0, sizeof(*this)); }
|
||||
};
|
||||
|
||||
front_end_params& m_fparams;
|
||||
smt_params& m_fparams;
|
||||
params_ref const& m_params;
|
||||
ast_manager& m;
|
||||
datalog::context* m_context;
|
||||
|
@ -343,13 +343,13 @@ namespace pdr {
|
|||
We check whether there is some reachable state of the relation checked_relation.
|
||||
*/
|
||||
context(
|
||||
front_end_params& fparams,
|
||||
smt_params& fparams,
|
||||
params_ref const& params,
|
||||
ast_manager& m);
|
||||
|
||||
~context();
|
||||
|
||||
front_end_params& get_fparams() const { return m_fparams; }
|
||||
smt_params& get_fparams() const { return m_fparams; }
|
||||
params_ref const& get_params() const { return m_params; }
|
||||
ast_manager& get_manager() const { return m; }
|
||||
manager& get_pdr_manager() { return m_pm; }
|
||||
|
|
|
@ -244,7 +244,7 @@ namespace pdr {
|
|||
}
|
||||
};
|
||||
|
||||
farkas_learner::farkas_learner(front_end_params& params, ast_manager& outer_mgr)
|
||||
farkas_learner::farkas_learner(smt_params& params, ast_manager& outer_mgr)
|
||||
: m_proof_params(get_proof_params(params)),
|
||||
m_pr(PROOF_MODE),
|
||||
p2o(m_pr, outer_mgr),
|
||||
|
@ -254,8 +254,8 @@ namespace pdr {
|
|||
m_ctx = alloc(smt::kernel, m_pr, m_proof_params);
|
||||
}
|
||||
|
||||
front_end_params farkas_learner::get_proof_params(front_end_params& orig_params) {
|
||||
front_end_params res(orig_params);
|
||||
smt_params farkas_learner::get_proof_params(smt_params& orig_params) {
|
||||
smt_params res(orig_params);
|
||||
res.m_proof_mode = PROOF_MODE;
|
||||
res.m_arith_bound_prop = BP_NONE;
|
||||
// temp hack to fix the build
|
||||
|
@ -796,7 +796,7 @@ namespace pdr {
|
|||
|
||||
|
||||
void farkas_learner::test() {
|
||||
front_end_params params;
|
||||
smt_params params;
|
||||
enable_trace("farkas_learner");
|
||||
|
||||
bool res;
|
||||
|
@ -883,7 +883,7 @@ namespace pdr {
|
|||
end = p->get_benchmark()->end_formulas();
|
||||
B = m.mk_and(static_cast<unsigned>(end-it), it);
|
||||
|
||||
front_end_params params;
|
||||
smt_params params;
|
||||
pdr::farkas_learner fl(params, m);
|
||||
expr_ref_vector lemmas(m);
|
||||
bool res = fl.get_lemma_guesses(A, B, lemmas);
|
||||
|
|
|
@ -26,7 +26,7 @@ Revision History:
|
|||
#include "smt_kernel.h"
|
||||
#include "bool_rewriter.h"
|
||||
#include "pdr_util.h"
|
||||
#include "front_end_params.h"
|
||||
#include "smt_params.h"
|
||||
#include "tactic.h"
|
||||
|
||||
namespace pdr {
|
||||
|
@ -39,12 +39,12 @@ class farkas_learner {
|
|||
|
||||
typedef obj_hashtable<expr> expr_set;
|
||||
|
||||
front_end_params m_proof_params;
|
||||
smt_params m_proof_params;
|
||||
ast_manager m_pr;
|
||||
scoped_ptr<smt::kernel> m_ctx;
|
||||
|
||||
|
||||
static front_end_params get_proof_params(front_end_params& orig_params);
|
||||
static smt_params get_proof_params(smt_params& orig_params);
|
||||
|
||||
//
|
||||
// all ast objects passed to private functions have m_proof_mgs as their ast_manager
|
||||
|
@ -72,7 +72,7 @@ class farkas_learner {
|
|||
static void test();
|
||||
|
||||
public:
|
||||
farkas_learner(front_end_params& params, ast_manager& m);
|
||||
farkas_learner(smt_params& params, ast_manager& m);
|
||||
|
||||
/**
|
||||
All ast objects have the ast_manager which was passed as
|
||||
|
|
|
@ -103,7 +103,7 @@ namespace pdr {
|
|||
// weaken predecessor.
|
||||
//
|
||||
|
||||
core_farkas_generalizer::core_farkas_generalizer(context& ctx, ast_manager& m, front_end_params& p):
|
||||
core_farkas_generalizer::core_farkas_generalizer(context& ctx, ast_manager& m, smt_params& p):
|
||||
core_generalizer(ctx),
|
||||
m_farkas_learner(p, m)
|
||||
{}
|
||||
|
|
|
@ -36,7 +36,7 @@ namespace pdr {
|
|||
class core_farkas_generalizer : public core_generalizer {
|
||||
farkas_learner m_farkas_learner;
|
||||
public:
|
||||
core_farkas_generalizer(context& ctx, ast_manager& m, front_end_params& p);
|
||||
core_farkas_generalizer(context& ctx, ast_manager& m, smt_params& p);
|
||||
virtual ~core_farkas_generalizer() {}
|
||||
virtual void operator()(model_node& n, expr_ref_vector& core, bool& uses_level);
|
||||
virtual void collect_statistics(statistics& st) const;
|
||||
|
|
|
@ -306,7 +306,7 @@ lbool interpolant_provider_impl::get_interpolant(expr * f1, expr * f2, expr_ref&
|
|||
return l_undef;
|
||||
}
|
||||
|
||||
front_end_params dummy_params;
|
||||
smt_params dummy_params;
|
||||
cmd_context cctx(&dummy_params, false, &m);
|
||||
for_each_expr(used_symbol_inserter(cctx), f1);
|
||||
|
||||
|
|
|
@ -166,7 +166,7 @@ namespace pdr {
|
|||
return res;
|
||||
}
|
||||
|
||||
manager::manager(front_end_params& fparams, params_ref const& params, ast_manager& manager) :
|
||||
manager::manager(smt_params& fparams, params_ref const& params, ast_manager& manager) :
|
||||
m(manager),
|
||||
m_fparams(fparams),
|
||||
m_params(params),
|
||||
|
|
|
@ -78,7 +78,7 @@ namespace pdr {
|
|||
class manager
|
||||
{
|
||||
ast_manager& m;
|
||||
front_end_params& m_fparams;
|
||||
smt_params& m_fparams;
|
||||
params_ref const& m_params;
|
||||
|
||||
mutable bool_rewriter m_brwr;
|
||||
|
@ -110,11 +110,11 @@ namespace pdr {
|
|||
void add_new_state(func_decl * s);
|
||||
|
||||
public:
|
||||
manager(front_end_params& fparams, params_ref const& params,
|
||||
manager(smt_params& fparams, params_ref const& params,
|
||||
ast_manager & manager);
|
||||
|
||||
ast_manager& get_manager() const { return m; }
|
||||
front_end_params& get_fparams() const { return m_fparams; }
|
||||
smt_params& get_fparams() const { return m_fparams; }
|
||||
params_ref const& get_params() const { return m_params; }
|
||||
bool_rewriter& get_brwr() const { return m_brwr; }
|
||||
|
||||
|
|
|
@ -24,7 +24,7 @@ Revision History:
|
|||
#include "ast_smt2_pp.h"
|
||||
#include "dl_util.h"
|
||||
#include "model_pp.h"
|
||||
#include "front_end_params.h"
|
||||
#include "smt_params.h"
|
||||
#include "datatype_decl_plugin.h"
|
||||
#include "bv_decl_plugin.h"
|
||||
#include "pdr_farkas_learner.h"
|
||||
|
|
|
@ -35,7 +35,7 @@ namespace pdr {
|
|||
class prop_solver {
|
||||
|
||||
private:
|
||||
front_end_params& m_fparams;
|
||||
smt_params& m_fparams;
|
||||
ast_manager& m;
|
||||
manager& m_pm;
|
||||
symbol m_name;
|
||||
|
|
|
@ -206,7 +206,7 @@ namespace pdr {
|
|||
datalog::scoped_fine_proof _scp(m);
|
||||
|
||||
expr_ref_vector fmls(m);
|
||||
front_end_params fparams;
|
||||
smt_params fparams;
|
||||
fparams.m_proof_mode = PGM_FINE;
|
||||
fparams.m_mbqi = true;
|
||||
|
||||
|
|
|
@ -21,7 +21,7 @@ Revision History:
|
|||
#include "has_free_vars.h"
|
||||
#include "ast_pp.h"
|
||||
#include <sstream>
|
||||
#include "front_end_params.h"
|
||||
#include "smt_params.h"
|
||||
|
||||
namespace pdr {
|
||||
|
||||
|
@ -93,7 +93,7 @@ namespace pdr {
|
|||
return m_context.get_proof();
|
||||
}
|
||||
|
||||
smt_context_manager::smt_context_manager(front_end_params& fp, params_ref const& p, ast_manager& m):
|
||||
smt_context_manager::smt_context_manager(smt_params& fp, params_ref const& p, ast_manager& m):
|
||||
m_fparams(fp),
|
||||
m(m),
|
||||
m_max_num_contexts(p.get_uint("max_num_contexts", 500)),
|
||||
|
|
|
@ -88,7 +88,7 @@ namespace pdr {
|
|||
};
|
||||
|
||||
class smt_context_manager {
|
||||
front_end_params& m_fparams;
|
||||
smt_params& m_fparams;
|
||||
ast_manager& m;
|
||||
unsigned m_max_num_contexts;
|
||||
ptr_vector<smt::kernel> m_contexts;
|
||||
|
@ -96,7 +96,7 @@ namespace pdr {
|
|||
app_ref_vector m_predicate_list;
|
||||
func_decl_set m_predicate_set;
|
||||
public:
|
||||
smt_context_manager(front_end_params& fp, params_ref const& p, ast_manager& m);
|
||||
smt_context_manager(smt_params& fp, params_ref const& p, ast_manager& m);
|
||||
~smt_context_manager();
|
||||
smt_context* mk_fresh();
|
||||
void collect_statistics(statistics& st) const;
|
||||
|
|
|
@ -30,7 +30,7 @@ Notes:
|
|||
#include "bool_rewriter.h"
|
||||
#include "dl_util.h"
|
||||
#include "for_each_expr.h"
|
||||
#include "front_end_params.h"
|
||||
#include "smt_params.h"
|
||||
#include "model.h"
|
||||
#include "model_v2_pp.h"
|
||||
#include "ref_vector.h"
|
||||
|
|
|
@ -1319,7 +1319,7 @@ namespace qe {
|
|||
|
||||
public:
|
||||
|
||||
quant_elim_plugin(ast_manager& m, quant_elim& qe, front_end_params& p):
|
||||
quant_elim_plugin(ast_manager& m, quant_elim& qe, smt_params& p):
|
||||
m(m),
|
||||
m_qe(qe),
|
||||
m_rewriter(m),
|
||||
|
@ -1959,7 +1959,7 @@ namespace qe {
|
|||
|
||||
class quant_elim_new : public quant_elim {
|
||||
ast_manager& m;
|
||||
front_end_params& m_fparams;
|
||||
smt_params& m_fparams;
|
||||
expr_ref m_assumption;
|
||||
bool m_produce_models;
|
||||
ptr_vector<quant_elim_plugin> m_plugins;
|
||||
|
@ -1968,7 +1968,7 @@ namespace qe {
|
|||
bool m_eliminate_variables_as_block;
|
||||
|
||||
public:
|
||||
quant_elim_new(ast_manager& m, front_end_params& p) :
|
||||
quant_elim_new(ast_manager& m, smt_params& p) :
|
||||
m(m),
|
||||
m_fparams(p),
|
||||
m_assumption(m),
|
||||
|
@ -2165,7 +2165,7 @@ namespace qe {
|
|||
// ------------------------------------------------
|
||||
// expr_quant_elim
|
||||
|
||||
expr_quant_elim::expr_quant_elim(ast_manager& m, front_end_params const& fp, params_ref const& p):
|
||||
expr_quant_elim::expr_quant_elim(ast_manager& m, smt_params const& fp, params_ref const& p):
|
||||
m(m),
|
||||
m_fparams(fp),
|
||||
m_params(p),
|
||||
|
@ -2212,7 +2212,7 @@ namespace qe {
|
|||
|
||||
void expr_quant_elim::init_qe() {
|
||||
if (!m_qe) {
|
||||
m_qe = alloc(quant_elim_new, m, const_cast<front_end_params&>(m_fparams));
|
||||
m_qe = alloc(quant_elim_new, m, const_cast<smt_params&>(m_fparams));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -2399,7 +2399,7 @@ namespace qe {
|
|||
cache_result(q, r, pr);
|
||||
}
|
||||
|
||||
expr_quant_elim_star1::expr_quant_elim_star1(ast_manager& m, front_end_params const& p):
|
||||
expr_quant_elim_star1::expr_quant_elim_star1(ast_manager& m, smt_params const& p):
|
||||
simplifier(m), m_quant_elim(m, p), m_assumption(m.mk_true())
|
||||
{
|
||||
}
|
||||
|
@ -2437,7 +2437,7 @@ namespace qe {
|
|||
|
||||
class simplify_solver_context : public i_solver_context {
|
||||
ast_manager& m;
|
||||
front_end_params m_fparams;
|
||||
smt_params m_fparams;
|
||||
app_ref_vector* m_vars;
|
||||
expr_ref* m_fml;
|
||||
ptr_vector<contains_app> m_contains;
|
||||
|
@ -2612,7 +2612,7 @@ namespace qe {
|
|||
}
|
||||
|
||||
void simplify_exists(app_ref_vector& vars, expr_ref& fml) {
|
||||
front_end_params params;
|
||||
smt_params params;
|
||||
ast_manager& m = fml.get_manager();
|
||||
simplify_solver_context ctx(m);
|
||||
ctx.solve(fml, vars);
|
||||
|
|
|
@ -22,7 +22,7 @@ Revision History:
|
|||
#define __QE_H__
|
||||
|
||||
#include "ast.h"
|
||||
#include "front_end_params.h"
|
||||
#include "smt_params.h"
|
||||
#include "statistics.h"
|
||||
#include "lbool.h"
|
||||
#include "expr_functors.h"
|
||||
|
@ -221,7 +221,7 @@ namespace qe {
|
|||
|
||||
qe_solver_plugin* mk_array_plugin(i_solver_context& ctx);
|
||||
|
||||
qe_solver_plugin* mk_arith_plugin(i_solver_context& ctx, bool produce_models, front_end_params& p);
|
||||
qe_solver_plugin* mk_arith_plugin(i_solver_context& ctx, bool produce_models, smt_params& p);
|
||||
|
||||
class def_vector {
|
||||
func_decl_ref_vector m_vars;
|
||||
|
@ -275,7 +275,7 @@ namespace qe {
|
|||
|
||||
class expr_quant_elim {
|
||||
ast_manager& m;
|
||||
front_end_params const& m_fparams;
|
||||
smt_params const& m_fparams;
|
||||
params_ref m_params;
|
||||
expr_ref_vector m_trail;
|
||||
obj_map<expr,expr*> m_visited;
|
||||
|
@ -283,7 +283,7 @@ namespace qe {
|
|||
expr* m_assumption;
|
||||
bool m_use_new_qe;
|
||||
public:
|
||||
expr_quant_elim(ast_manager& m, front_end_params const& fp, params_ref const& p = params_ref());
|
||||
expr_quant_elim(ast_manager& m, smt_params const& fp, params_ref const& p = params_ref());
|
||||
~expr_quant_elim();
|
||||
|
||||
void operator()(expr* assumption, expr* fml, expr_ref& result);
|
||||
|
@ -331,7 +331,7 @@ namespace qe {
|
|||
virtual void reduce1_quantifier(quantifier * q);
|
||||
virtual bool is_target(quantifier * q) const { return q->get_num_patterns() == 0 && q->get_num_no_patterns() == 0; }
|
||||
public:
|
||||
expr_quant_elim_star1(ast_manager & m, front_end_params const& p);
|
||||
expr_quant_elim_star1(ast_manager & m, smt_params const& p);
|
||||
virtual ~expr_quant_elim_star1() {}
|
||||
|
||||
void collect_statistics(statistics & st) const {
|
||||
|
|
|
@ -98,7 +98,7 @@ namespace qe {
|
|||
bool_rewriter m_bool_rewriter;
|
||||
arith_rewriter m_arith_rewriter;
|
||||
|
||||
arith_qe_util(ast_manager& m, front_end_params& p, i_solver_context& ctx) :
|
||||
arith_qe_util(ast_manager& m, smt_params& p, i_solver_context& ctx) :
|
||||
m(m),
|
||||
m_ctx(ctx),
|
||||
m_arith(m),
|
||||
|
@ -1511,7 +1511,7 @@ public:
|
|||
subst_cache m_subst;
|
||||
|
||||
public:
|
||||
arith_plugin(i_solver_context& ctx, ast_manager& m, front_end_params& p):
|
||||
arith_plugin(i_solver_context& ctx, ast_manager& m, smt_params& p):
|
||||
qe_solver_plugin(m, m.get_family_id("arith"), ctx),
|
||||
m_util(m, p, ctx),
|
||||
m_trail(m)
|
||||
|
@ -2562,7 +2562,7 @@ public:
|
|||
};
|
||||
|
||||
|
||||
qe_solver_plugin* mk_arith_plugin(i_solver_context& ctx, bool produce_models, front_end_params& p) {
|
||||
qe_solver_plugin* mk_arith_plugin(i_solver_context& ctx, bool produce_models, smt_params& p) {
|
||||
if (p.m_nlquant_elim) {
|
||||
return alloc(nlarith_plugin, ctx, ctx.get_manager(), produce_models);
|
||||
}
|
||||
|
|
|
@ -38,7 +38,7 @@ public:
|
|||
}
|
||||
|
||||
virtual void execute(cmd_context & ctx) {
|
||||
front_end_params par;
|
||||
smt_params par;
|
||||
proof_ref pr(ctx.m());
|
||||
qe::expr_quant_elim_star1 qe(ctx.m(), par);
|
||||
expr_ref result(ctx.m());
|
||||
|
|
|
@ -59,7 +59,7 @@ namespace qe {
|
|||
ast_manager& m;
|
||||
expr_ref m_false;
|
||||
volatile bool m_cancel;
|
||||
front_end_params m_fparams;
|
||||
smt_params m_fparams;
|
||||
params_ref m_params;
|
||||
unsigned m_extrapolate_strategy_param;
|
||||
bool m_projection_mode_param;
|
||||
|
|
|
@ -24,7 +24,7 @@ Revision History:
|
|||
class qe_tactic : public tactic {
|
||||
struct imp {
|
||||
ast_manager & m;
|
||||
front_end_params m_fparams;
|
||||
smt_params m_fparams;
|
||||
volatile bool m_cancel;
|
||||
qe::expr_quant_elim m_qe;
|
||||
|
||||
|
|
|
@ -21,7 +21,7 @@ Author:
|
|||
struct unit_subsumption_tactic : public tactic {
|
||||
ast_manager& m;
|
||||
params_ref m_params;
|
||||
front_end_params m_fparams;
|
||||
smt_params m_fparams;
|
||||
volatile bool m_cancel;
|
||||
smt::context m_context;
|
||||
expr_ref_vector m_clauses;
|
||||
|
|
|
@ -45,7 +45,7 @@ Notes:
|
|||
#include"arith_decl_plugin.h"
|
||||
#include"for_each_expr.h"
|
||||
#include"extension_model_converter.h"
|
||||
#include"params2front_end_params.h"
|
||||
#include"params2smt_params.h"
|
||||
#include"ast_smt2_pp.h"
|
||||
|
||||
class vsubst_tactic : public tactic {
|
||||
|
@ -93,8 +93,8 @@ class vsubst_tactic : public tactic {
|
|||
throw tactic_exception("there are no real variables");
|
||||
}
|
||||
|
||||
front_end_params params;
|
||||
params2front_end_params(p, params);
|
||||
smt_params params;
|
||||
params2smt_params(p, params);
|
||||
params.m_model = false;
|
||||
flet<bool> fl1(params.m_nlquant_elim, true);
|
||||
flet<bool> fl2(params.m_nl_arith_gb, false);
|
||||
|
|
|
@ -37,7 +37,6 @@ Revision History:
|
|||
#include"var_subst.h"
|
||||
#include"well_sorted.h"
|
||||
#include"str_hashtable.h"
|
||||
#include"front_end_params.h"
|
||||
#include"stopwatch.h"
|
||||
|
||||
class id_param_info {
|
||||
|
|
|
@ -25,7 +25,7 @@ Revision History:
|
|||
#undef min
|
||||
#undef max
|
||||
#endif
|
||||
#include"front_end_params.h"
|
||||
#include"smt_params.h"
|
||||
#include"datalog_parser.h"
|
||||
#include"arith_decl_plugin.h"
|
||||
#include"dl_compiler.h"
|
||||
|
@ -43,7 +43,7 @@ static datalog::context * g_ctx = 0;
|
|||
static datalog::rule_set * g_orig_rules;
|
||||
static datalog::instruction_block * g_code;
|
||||
static datalog::execution_context * g_ectx;
|
||||
static front_end_params * g_params;
|
||||
static smt_params * g_params;
|
||||
|
||||
datalog_params::datalog_params():
|
||||
m_default_table("sparse"),
|
||||
|
@ -61,7 +61,7 @@ static void display_statistics(
|
|||
datalog::rule_set& orig_rules,
|
||||
datalog::instruction_block& code,
|
||||
datalog::execution_context& ex_ctx,
|
||||
front_end_params& params,
|
||||
smt_params& params,
|
||||
bool verbose
|
||||
)
|
||||
{
|
||||
|
@ -125,8 +125,10 @@ static void on_ctrl_c(int) {
|
|||
}
|
||||
|
||||
|
||||
unsigned read_datalog(char const * file, datalog_params const& dl_params, front_end_params & front_end_params) {
|
||||
unsigned read_datalog(char const * file) {
|
||||
IF_VERBOSE(1, verbose_stream() << "Z3 Datalog Engine\n";);
|
||||
datalog_params dl_params;
|
||||
smt_params s_params;
|
||||
ast_manager m;
|
||||
g_overall_time.start();
|
||||
register_on_timeout_proc(on_timeout);
|
||||
|
@ -136,11 +138,7 @@ unsigned read_datalog(char const * file, datalog_params const& dl_params, front_
|
|||
params.set_sym("default_table", dl_params.m_default_table);
|
||||
params.set_bool("default_table_checked", dl_params.m_default_table_checked);
|
||||
|
||||
datalog::context ctx(m, front_end_params, params);
|
||||
size_t watermark = front_end_params.m_memory_high_watermark;
|
||||
if (watermark == 0) {
|
||||
memory::set_high_watermark(static_cast<size_t>(UINT_MAX));
|
||||
}
|
||||
datalog::context ctx(m, s_params, params);
|
||||
datalog::relation_manager & rmgr = ctx.get_rmanager();
|
||||
datalog::relation_plugin & inner_plg = *rmgr.get_relation_plugin(symbol("tr_hashtable"));
|
||||
SASSERT(&inner_plg);
|
||||
|
@ -190,7 +188,7 @@ unsigned read_datalog(char const * file, datalog_params const& dl_params, front_
|
|||
g_orig_rules = &original_rules;
|
||||
g_code = &rules_code;
|
||||
g_ectx = &ex_ctx;
|
||||
g_params = &front_end_params;
|
||||
g_params = &s_params;
|
||||
|
||||
try {
|
||||
g_piece_timer.reset();
|
||||
|
@ -262,7 +260,7 @@ unsigned read_datalog(char const * file, datalog_params const& dl_params, front_
|
|||
original_rules,
|
||||
rules_code,
|
||||
ex_ctx,
|
||||
front_end_params,
|
||||
s_params,
|
||||
false);
|
||||
|
||||
}
|
||||
|
@ -274,7 +272,7 @@ unsigned read_datalog(char const * file, datalog_params const& dl_params, front_
|
|||
original_rules,
|
||||
rules_code,
|
||||
ex_ctx,
|
||||
front_end_params,
|
||||
s_params,
|
||||
true);
|
||||
return ERR_MEMOUT;
|
||||
}
|
||||
|
|
|
@ -25,7 +25,7 @@ struct datalog_params {
|
|||
datalog_params();
|
||||
};
|
||||
|
||||
unsigned read_datalog(char const * file, datalog_params const& dl_params, front_end_params & front_end_params);
|
||||
unsigned read_datalog(char const * file);
|
||||
|
||||
|
||||
#endif /* _DATALOG_FRONTEND_H_ */
|
||||
|
|
|
@ -41,7 +41,6 @@ std::string g_aux_input_file;
|
|||
char const * g_input_file = 0;
|
||||
bool g_standard_input = false;
|
||||
input_kind g_input_kind = IN_UNSPECIFIED;
|
||||
front_end_params * g_front_end_params = 0;
|
||||
bool g_display_statistics = false;
|
||||
bool g_display_istatistics = false;
|
||||
|
||||
|
@ -98,36 +97,7 @@ void display_usage() {
|
|||
std::cout << " " << OPT << "dbg:tag enable assertions tagged with <tag>.\n";
|
||||
#endif
|
||||
}
|
||||
|
||||
class extra_params : public datalog_params {
|
||||
bool & m_statistics;
|
||||
public:
|
||||
extra_params():
|
||||
m_statistics(g_display_statistics) {
|
||||
}
|
||||
|
||||
virtual ~extra_params() {}
|
||||
};
|
||||
|
||||
extra_params* g_extra_params = 0;
|
||||
bool g_params_initialized = false;
|
||||
|
||||
void init_params() {
|
||||
if (!g_params_initialized) {
|
||||
z3_bound_num_procs();
|
||||
g_front_end_params = new front_end_params();
|
||||
g_extra_params = new extra_params();
|
||||
g_params_initialized = true;
|
||||
}
|
||||
}
|
||||
|
||||
void del_params() {
|
||||
delete g_extra_params;
|
||||
delete g_front_end_params;
|
||||
g_extra_params = 0;
|
||||
g_front_end_params = 0;
|
||||
}
|
||||
|
||||
|
||||
void parse_cmd_line_args(int argc, char ** argv) {
|
||||
int i = 1;
|
||||
char * eq_pos = 0;
|
||||
|
@ -200,18 +170,9 @@ void parse_cmd_line_args(int argc, char ** argv) {
|
|||
long lvl = strtol(opt_arg, 0, 10);
|
||||
set_verbosity_level(lvl);
|
||||
}
|
||||
else if (strcmp(opt_name, "vldt") == 0) {
|
||||
g_front_end_params->m_model_validate = true;
|
||||
}
|
||||
else if (strcmp(opt_name, "file") == 0) {
|
||||
g_input_file = opt_arg;
|
||||
}
|
||||
else if (strcmp(opt_name, "r") == 0) {
|
||||
if (!opt_arg) {
|
||||
error("optional argument (/r:level) is missing.");
|
||||
}
|
||||
g_front_end_params->m_relevancy_lvl = strtol(opt_arg, 0, 10);
|
||||
}
|
||||
else if (strcmp(opt_name, "T") == 0) {
|
||||
if (!opt_arg)
|
||||
error("option argument (/T:timeout) is missing.");
|
||||
|
@ -221,8 +182,7 @@ void parse_cmd_line_args(int argc, char ** argv) {
|
|||
else if (strcmp(opt_name, "t") == 0) {
|
||||
if (!opt_arg)
|
||||
error("option argument (/t:timeout) is missing.");
|
||||
long tm = strtol(opt_arg, 0, 10);
|
||||
g_front_end_params->m_soft_timeout = tm*1000;
|
||||
gparams::set("timeout", opt_arg);
|
||||
}
|
||||
else if (strcmp(opt_name, "nw") == 0) {
|
||||
enable_warning_messages(false);
|
||||
|
@ -248,7 +208,7 @@ void parse_cmd_line_args(int argc, char ** argv) {
|
|||
else if (strcmp(opt_name, "memory") == 0) {
|
||||
if (!opt_arg)
|
||||
error("option argument (/memory:val) is missing.");
|
||||
g_front_end_params->m_memory_high_watermark = strtoul(opt_arg, 0, 10);
|
||||
gparams::set("memory_max_size", opt_arg);
|
||||
}
|
||||
else {
|
||||
std::cerr << "Error: invalid command line option: " << arg << "\n";
|
||||
|
@ -288,27 +248,10 @@ char const * get_extension(char const * file_name) {
|
|||
}
|
||||
}
|
||||
|
||||
class global_state_initialiser {
|
||||
public:
|
||||
global_state_initialiser() {
|
||||
memory::initialize(0);
|
||||
init_params();
|
||||
}
|
||||
|
||||
void reset() {
|
||||
del_params();
|
||||
memory::finalize();
|
||||
}
|
||||
|
||||
~global_state_initialiser() {
|
||||
reset();
|
||||
}
|
||||
};
|
||||
|
||||
int main(int argc, char ** argv) {
|
||||
try{
|
||||
unsigned return_value = 0;
|
||||
global_state_initialiser global_state;
|
||||
memory::initialize(0);
|
||||
memory::exit_when_out_of_memory(true, "ERROR: out of memory");
|
||||
parse_cmd_line_args(argc, argv);
|
||||
env_params::updt_params();
|
||||
|
@ -353,7 +296,7 @@ int main(int argc, char ** argv) {
|
|||
return_value = read_dimacs(g_input_file);
|
||||
break;
|
||||
case IN_DATALOG:
|
||||
read_datalog(g_input_file, *g_extra_params, *g_front_end_params);
|
||||
read_datalog(g_input_file);
|
||||
break;
|
||||
case IN_Z3_LOG:
|
||||
replay_z3_log(g_input_file);
|
||||
|
@ -361,7 +304,6 @@ int main(int argc, char ** argv) {
|
|||
default:
|
||||
UNREACHABLE();
|
||||
}
|
||||
global_state.reset();
|
||||
#ifdef _WINDOWS
|
||||
_CrtDumpMemoryLeaks();
|
||||
#endif
|
||||
|
|
|
@ -19,8 +19,6 @@ Revision History:
|
|||
#ifndef _SMTLIB_FRONTEND_H_
|
||||
#define _SMTLIB_FRONTEND_H_
|
||||
|
||||
#include"front_end_params.h"
|
||||
|
||||
unsigned read_smtlib_file(char const * benchmark_file);
|
||||
unsigned read_smtlib2_commands(char const * command_file);
|
||||
|
||||
|
|
|
@ -40,7 +40,7 @@ Revision History:
|
|||
#include"distribute_forall.h"
|
||||
#include"quasi_macros.h"
|
||||
|
||||
asserted_formulas::asserted_formulas(ast_manager & m, front_end_params & p):
|
||||
asserted_formulas::asserted_formulas(ast_manager & m, smt_params & p):
|
||||
m_manager(m),
|
||||
m_params(p),
|
||||
m_pre_simplifier(m),
|
||||
|
|
|
@ -19,7 +19,7 @@ Revision History:
|
|||
#ifndef _ASSERTED_FORMULAS_H_
|
||||
#define _ASSERTED_FORMULAS_H_
|
||||
|
||||
#include"front_end_params.h"
|
||||
#include"smt_params.h"
|
||||
#include"simplifier.h"
|
||||
#include"basic_simplifier_plugin.h"
|
||||
#include"static_features.h"
|
||||
|
@ -36,7 +36,7 @@ class bv_simplifier_plugin;
|
|||
|
||||
class asserted_formulas {
|
||||
ast_manager & m_manager;
|
||||
front_end_params & m_params;
|
||||
smt_params & m_params;
|
||||
simplifier m_pre_simplifier;
|
||||
simplifier m_simplifier;
|
||||
basic_simplifier_plugin * m_bsimp;
|
||||
|
@ -100,7 +100,7 @@ class asserted_formulas {
|
|||
bool canceled() { return m_cancel_flag; }
|
||||
|
||||
public:
|
||||
asserted_formulas(ast_manager & m, front_end_params & p);
|
||||
asserted_formulas(ast_manager & m, smt_params & p);
|
||||
~asserted_formulas();
|
||||
|
||||
void setup();
|
||||
|
|
|
@ -310,7 +310,7 @@ bool expr_context_simplifier::is_false(expr* e) const {
|
|||
// it occurs in the context (on the path) where it was inserted.
|
||||
//
|
||||
|
||||
expr_strong_context_simplifier::expr_strong_context_simplifier(front_end_params& p, ast_manager& m):
|
||||
expr_strong_context_simplifier::expr_strong_context_simplifier(smt_params& p, ast_manager& m):
|
||||
m_manager(m), m_params(p), m_arith(m), m_id(0), m_fn(0,m), m_solver(m, p) {
|
||||
sort* i_sort = m_arith.mk_int();
|
||||
m_fn = m.mk_func_decl(symbol(0xbeef101), i_sort, m.mk_bool_sort());
|
||||
|
|
|
@ -22,7 +22,7 @@ Revision History:
|
|||
#include "ast.h"
|
||||
#include "obj_hashtable.h"
|
||||
#include "basic_simplifier_plugin.h"
|
||||
#include "front_end_params.h"
|
||||
#include "smt_params.h"
|
||||
#include "smt_kernel.h"
|
||||
#include "arith_decl_plugin.h"
|
||||
|
||||
|
@ -57,7 +57,7 @@ private:
|
|||
|
||||
class expr_strong_context_simplifier {
|
||||
ast_manager& m_manager;
|
||||
front_end_params & m_params;
|
||||
smt_params & m_params;
|
||||
arith_util m_arith;
|
||||
unsigned m_id;
|
||||
func_decl_ref m_fn;
|
||||
|
@ -70,7 +70,7 @@ class expr_strong_context_simplifier {
|
|||
bool is_forced(expr* e, expr* v);
|
||||
|
||||
public:
|
||||
expr_strong_context_simplifier(front_end_params& p, ast_manager& m);
|
||||
expr_strong_context_simplifier(smt_params& p, ast_manager& m);
|
||||
void operator()(expr* e, expr_ref& result) { simplify(e, result); }
|
||||
void operator()(expr_ref& result) { simplify(result.get(), result); }
|
||||
void push() { m_solver.push(); }
|
||||
|
|
|
@ -278,7 +278,7 @@ namespace smt {
|
|||
};
|
||||
typedef int_hashtable<int_hash, default_eq<int> > bool_var_set;
|
||||
context & m_context;
|
||||
front_end_params &m_params;
|
||||
smt_params &m_params;
|
||||
ast_manager & m_manager;
|
||||
ptr_vector<expr> m_queue;
|
||||
unsigned m_head;
|
||||
|
@ -287,7 +287,7 @@ namespace smt {
|
|||
unsigned m_head2;
|
||||
svector<scope> m_scopes;
|
||||
public:
|
||||
rel_case_split_queue(context & ctx, front_end_params & p):
|
||||
rel_case_split_queue(context & ctx, smt_params & p):
|
||||
m_context(ctx),
|
||||
m_params(p),
|
||||
m_manager(ctx.get_manager()),
|
||||
|
@ -465,14 +465,14 @@ namespace smt {
|
|||
typedef int_hashtable<int_hash, default_eq<int> > bool_var_set;
|
||||
context & m_context;
|
||||
ast_manager & m_manager;
|
||||
front_end_params &m_params;
|
||||
smt_params &m_params;
|
||||
ptr_vector<expr> m_queue;
|
||||
unsigned m_head;
|
||||
int m_bs_num_bool_vars; //!< Number of boolean variable before starting to search.
|
||||
bool_var_act_queue m_delayed_queue;
|
||||
svector<scope> m_scopes;
|
||||
public:
|
||||
rel_act_case_split_queue(context & ctx, front_end_params & p):
|
||||
rel_act_case_split_queue(context & ctx, smt_params & p):
|
||||
m_context(ctx),
|
||||
m_manager(ctx.get_manager()),
|
||||
m_params(p),
|
||||
|
@ -694,7 +694,7 @@ namespace smt {
|
|||
|
||||
typedef int_hashtable<int_hash, default_eq<int> > bool_var_set;
|
||||
context & m_context;
|
||||
front_end_params & m_params;
|
||||
smt_params & m_params;
|
||||
ast_manager & m_manager;
|
||||
ptr_vector<expr> m_queue;
|
||||
unsigned m_head;
|
||||
|
@ -714,7 +714,7 @@ namespace smt {
|
|||
|
||||
|
||||
public:
|
||||
rel_goal_case_split_queue(context & ctx, front_end_params & p):
|
||||
rel_goal_case_split_queue(context & ctx, smt_params & p):
|
||||
m_context(ctx),
|
||||
m_params(p),
|
||||
m_manager(ctx.get_manager()),
|
||||
|
@ -1088,7 +1088,7 @@ namespace smt {
|
|||
};
|
||||
|
||||
|
||||
case_split_queue * mk_case_split_queue(context & ctx, front_end_params & p) {
|
||||
case_split_queue * mk_case_split_queue(context & ctx, smt_params & p) {
|
||||
if (p.m_relevancy_lvl < 2 && (p.m_case_split_strategy == CS_RELEVANCY || p.m_case_split_strategy == CS_RELEVANCY_ACTIVITY ||
|
||||
p.m_case_split_strategy == CS_RELEVANCY_GOAL)) {
|
||||
warning_msg("relevacy must be enabled to use option CASE_SPLIT=3, 4 or 5");
|
||||
|
|
|
@ -48,7 +48,7 @@ namespace smt {
|
|||
virtual ~case_split_queue() {}
|
||||
};
|
||||
|
||||
case_split_queue * mk_case_split_queue(context & ctx, front_end_params & p);
|
||||
case_split_queue * mk_case_split_queue(context & ctx, smt_params & p);
|
||||
};
|
||||
|
||||
#endif /* _SMT_CASE_SPLIT_QUEUE_H_ */
|
||||
|
|
|
@ -32,7 +32,7 @@ namespace smt {
|
|||
conflict_resolution::conflict_resolution(ast_manager & m,
|
||||
context & ctx,
|
||||
dyn_ack_manager & dyn_ack_manager,
|
||||
front_end_params const & params,
|
||||
smt_params const & params,
|
||||
literal_vector const & assigned_literals,
|
||||
vector<watch_list> & watches
|
||||
):
|
||||
|
@ -1419,7 +1419,7 @@ namespace smt {
|
|||
conflict_resolution * mk_conflict_resolution(ast_manager & m,
|
||||
context & ctx,
|
||||
dyn_ack_manager & dack_manager,
|
||||
front_end_params const & params,
|
||||
smt_params const & params,
|
||||
literal_vector const & assigned_literals,
|
||||
vector<watch_list> & watches) {
|
||||
return alloc(conflict_resolution, m, ctx, dack_manager, params, assigned_literals, watches);
|
||||
|
|
|
@ -25,7 +25,7 @@ Revision History:
|
|||
#include"smt_enode.h"
|
||||
#include"dyn_ack.h"
|
||||
#include"obj_pair_hashtable.h"
|
||||
#include"front_end_params.h"
|
||||
#include"smt_params.h"
|
||||
#include"obj_pair_hashtable.h"
|
||||
#include"map.h"
|
||||
#include"watch_list.h"
|
||||
|
@ -46,7 +46,7 @@ namespace smt {
|
|||
typedef obj_pair_set<enode, enode> enode_pair_set;
|
||||
|
||||
ast_manager & m_manager;
|
||||
front_end_params const & m_params;
|
||||
smt_params const & m_params;
|
||||
context & m_ctx;
|
||||
dyn_ack_manager & m_dyn_ack_manager;
|
||||
literal_vector const & m_assigned_literals;
|
||||
|
@ -204,7 +204,7 @@ namespace smt {
|
|||
conflict_resolution(ast_manager & m,
|
||||
context & ctx,
|
||||
dyn_ack_manager & dack_manager,
|
||||
front_end_params const & params,
|
||||
smt_params const & params,
|
||||
literal_vector const & assigned_literals,
|
||||
vector<watch_list> & watches
|
||||
);
|
||||
|
@ -266,7 +266,7 @@ namespace smt {
|
|||
conflict_resolution * mk_conflict_resolution(ast_manager & m,
|
||||
context & ctx,
|
||||
dyn_ack_manager & dack_manager,
|
||||
front_end_params const & params,
|
||||
smt_params const & params,
|
||||
literal_vector const & assigned_literals,
|
||||
vector<watch_list> & watches
|
||||
);
|
||||
|
|
|
@ -39,7 +39,7 @@ Revision History:
|
|||
|
||||
namespace smt {
|
||||
|
||||
context::context(ast_manager & m, front_end_params & p, params_ref const & _p):
|
||||
context::context(ast_manager & m, smt_params & p, params_ref const & _p):
|
||||
m_manager(m),
|
||||
m_fparams(p),
|
||||
m_params(_p),
|
||||
|
@ -102,7 +102,7 @@ namespace smt {
|
|||
flush();
|
||||
}
|
||||
|
||||
context * context::mk_fresh(symbol const * l, front_end_params * p) {
|
||||
context * context::mk_fresh(symbol const * l, smt_params * p) {
|
||||
context * new_ctx = alloc(context, m_manager, p == 0 ? m_fparams : *p);
|
||||
new_ctx->set_logic(l == 0 ? m_setup.get_logic() : *l);
|
||||
// copy missing simplifier_plugins
|
||||
|
|
|
@ -71,7 +71,7 @@ namespace smt {
|
|||
|
||||
protected:
|
||||
ast_manager & m_manager;
|
||||
front_end_params & m_fparams;
|
||||
smt_params & m_fparams;
|
||||
params_ref m_params;
|
||||
setup m_setup;
|
||||
volatile bool m_cancel_flag;
|
||||
|
@ -220,7 +220,7 @@ namespace smt {
|
|||
return m_asserted_formulas.get_simplifier();
|
||||
}
|
||||
|
||||
front_end_params & get_fparams() {
|
||||
smt_params & get_fparams() {
|
||||
return m_fparams;
|
||||
}
|
||||
|
||||
|
@ -1314,7 +1314,7 @@ namespace smt {
|
|||
void assert_expr_core(expr * e, proof * pr);
|
||||
|
||||
public:
|
||||
context(ast_manager & m, front_end_params & fp, params_ref const & p = params_ref());
|
||||
context(ast_manager & m, smt_params & fp, params_ref const & p = params_ref());
|
||||
|
||||
virtual ~context();
|
||||
|
||||
|
@ -1325,7 +1325,7 @@ namespace smt {
|
|||
If l == 0, then the logic of this context is used in the new context.
|
||||
If p == 0, then this->m_params is used
|
||||
*/
|
||||
context * mk_fresh(symbol const * l = 0, front_end_params * p = 0);
|
||||
context * mk_fresh(symbol const * l = 0, smt_params * p = 0);
|
||||
|
||||
app * mk_eq_atom(expr * lhs, expr * rhs);
|
||||
|
||||
|
|
|
@ -19,7 +19,7 @@ Revision History:
|
|||
#include"smt_kernel.h"
|
||||
#include"smt_context.h"
|
||||
#include"ast_smt2_pp.h"
|
||||
#include"params2front_end_params.h"
|
||||
#include"params2smt_params.h"
|
||||
|
||||
namespace smt {
|
||||
|
||||
|
@ -27,12 +27,12 @@ namespace smt {
|
|||
smt::context m_kernel;
|
||||
params_ref m_params;
|
||||
|
||||
imp(ast_manager & m, front_end_params & fp, params_ref const & p):
|
||||
imp(ast_manager & m, smt_params & fp, params_ref const & p):
|
||||
m_kernel(m, fp, p),
|
||||
m_params(p) {
|
||||
}
|
||||
|
||||
front_end_params & fparams() {
|
||||
smt_params & fparams() {
|
||||
return m_kernel.get_fparams();
|
||||
}
|
||||
|
||||
|
@ -179,11 +179,11 @@ namespace smt {
|
|||
}
|
||||
|
||||
void updt_params(params_ref const & p) {
|
||||
params2front_end_params(p, fparams());
|
||||
params2smt_params(p, fparams());
|
||||
}
|
||||
};
|
||||
|
||||
kernel::kernel(ast_manager & m, front_end_params & fp, params_ref const & p) {
|
||||
kernel::kernel(ast_manager & m, smt_params & fp, params_ref const & p) {
|
||||
m_imp = alloc(imp, m, fp, p);
|
||||
}
|
||||
|
||||
|
@ -237,7 +237,7 @@ namespace smt {
|
|||
|
||||
void kernel::reset() {
|
||||
ast_manager & _m = m();
|
||||
front_end_params & fps = m_imp->fparams();
|
||||
smt_params & fps = m_imp->fparams();
|
||||
params_ref ps = m_imp->params();
|
||||
#pragma omp critical (smt_kernel)
|
||||
{
|
||||
|
@ -343,7 +343,7 @@ namespace smt {
|
|||
}
|
||||
|
||||
void kernel::collect_param_descrs(param_descrs & d) {
|
||||
solver_front_end_params_descrs(d);
|
||||
solver_smt_params_descrs(d);
|
||||
}
|
||||
|
||||
context & kernel::get_context() {
|
||||
|
|
|
@ -34,7 +34,7 @@ Revision History:
|
|||
#include"statistics.h"
|
||||
#include"smt_failure.h"
|
||||
|
||||
struct front_end_params;
|
||||
struct smt_params;
|
||||
class progress_callback;
|
||||
|
||||
namespace smt {
|
||||
|
@ -46,7 +46,7 @@ namespace smt {
|
|||
struct imp;
|
||||
imp * m_imp;
|
||||
public:
|
||||
kernel(ast_manager & m, front_end_params & fp, params_ref const & p = params_ref());
|
||||
kernel(ast_manager & m, smt_params & fp, params_ref const & p = params_ref());
|
||||
|
||||
~kernel();
|
||||
|
||||
|
|
|
@ -281,7 +281,7 @@ namespace smt {
|
|||
|
||||
void model_checker::init_aux_context() {
|
||||
if (!m_fparams) {
|
||||
m_fparams = alloc(front_end_params, m_context->get_fparams());
|
||||
m_fparams = alloc(smt_params, m_context->get_fparams());
|
||||
m_fparams->m_relevancy_lvl = 0; // no relevancy since the model checking problems are quantifier free
|
||||
}
|
||||
if (!m_aux_context) {
|
||||
|
|
|
@ -24,7 +24,7 @@ Revision History:
|
|||
#include"ast.h"
|
||||
#include"obj_hashtable.h"
|
||||
#include"qi_params.h"
|
||||
#include"front_end_params.h"
|
||||
#include"smt_params.h"
|
||||
#include"region.h"
|
||||
|
||||
class proto_model;
|
||||
|
@ -39,9 +39,9 @@ namespace smt {
|
|||
class model_checker {
|
||||
ast_manager & m_manager;
|
||||
qi_params const & m_params;
|
||||
// copy of front_end_params for auxiliary context.
|
||||
// copy of smt_params for auxiliary context.
|
||||
// the idea is to use a different configuration for the aux context (e.g., disable relevancy)
|
||||
scoped_ptr<front_end_params> m_fparams;
|
||||
scoped_ptr<smt_params> m_fparams;
|
||||
quantifier_manager * m_qm;
|
||||
context * m_context; // owner of the model checker
|
||||
obj_map<enode, app *> const * m_root2value; // temp field to store mapping received in the check method.
|
||||
|
|
|
@ -33,7 +33,7 @@ namespace smt {
|
|||
struct quantifier_manager::imp {
|
||||
quantifier_manager & m_wrapper;
|
||||
context & m_context;
|
||||
front_end_params & m_params;
|
||||
smt_params & m_params;
|
||||
qi_queue m_qi_queue;
|
||||
obj_map<quantifier, quantifier_stat *> m_quantifier_stat;
|
||||
quantifier_stat_gen m_qstat_gen;
|
||||
|
@ -41,7 +41,7 @@ namespace smt {
|
|||
scoped_ptr<quantifier_manager_plugin> m_plugin;
|
||||
unsigned m_num_instances;
|
||||
|
||||
imp(quantifier_manager & wrapper, context & ctx, front_end_params & p, quantifier_manager_plugin * plugin):
|
||||
imp(quantifier_manager & wrapper, context & ctx, smt_params & p, quantifier_manager_plugin * plugin):
|
||||
m_wrapper(wrapper),
|
||||
m_context(ctx),
|
||||
m_params(p),
|
||||
|
@ -242,7 +242,7 @@ namespace smt {
|
|||
|
||||
};
|
||||
|
||||
quantifier_manager::quantifier_manager(context & ctx, front_end_params & fp, params_ref const & p) {
|
||||
quantifier_manager::quantifier_manager(context & ctx, smt_params & fp, params_ref const & p) {
|
||||
m_imp = alloc(imp, *this, ctx, fp, mk_default_plugin());
|
||||
m_imp->m_plugin->set_manager(*this);
|
||||
}
|
||||
|
@ -355,7 +355,7 @@ namespace smt {
|
|||
#pragma omp critical (quantifier_manager)
|
||||
{
|
||||
context & ctx = m_imp->m_context;
|
||||
front_end_params & p = m_imp->m_params;
|
||||
smt_params & p = m_imp->m_params;
|
||||
quantifier_manager_plugin * plugin = m_imp->m_plugin->mk_fresh();
|
||||
dealloc(m_imp);
|
||||
m_imp = alloc(imp, *this, ctx, p, plugin);
|
||||
|
@ -395,7 +395,7 @@ namespace smt {
|
|||
// The default plugin uses E-matching, MBQI and quick-checker
|
||||
class default_qm_plugin : public quantifier_manager_plugin {
|
||||
quantifier_manager * m_qm;
|
||||
front_end_params * m_fparams;
|
||||
smt_params * m_fparams;
|
||||
context * m_context;
|
||||
scoped_ptr<mam> m_mam;
|
||||
scoped_ptr<mam> m_lazy_mam;
|
||||
|
|
|
@ -25,7 +25,7 @@ Revision History:
|
|||
#include"smt_types.h"
|
||||
|
||||
class proto_model;
|
||||
struct front_end_params;
|
||||
struct smt_params;
|
||||
|
||||
namespace smt {
|
||||
class quantifier_manager_plugin;
|
||||
|
@ -35,7 +35,7 @@ namespace smt {
|
|||
struct imp;
|
||||
imp * m_imp;
|
||||
public:
|
||||
quantifier_manager(context & ctx, front_end_params & fp, params_ref const & p);
|
||||
quantifier_manager(context & ctx, smt_params & fp, params_ref const & p);
|
||||
~quantifier_manager();
|
||||
|
||||
context & get_context() const;
|
||||
|
|
|
@ -33,7 +33,7 @@ Revision History:
|
|||
|
||||
namespace smt {
|
||||
|
||||
setup::setup(context & c, front_end_params & params):
|
||||
setup::setup(context & c, smt_params & params):
|
||||
m_context(c),
|
||||
m_manager(c.get_manager()),
|
||||
m_params(params),
|
||||
|
|
|
@ -20,7 +20,7 @@ Revision History:
|
|||
#define _SMT_SETUP_H_
|
||||
|
||||
#include"ast.h"
|
||||
#include"front_end_params.h"
|
||||
#include"smt_params.h"
|
||||
|
||||
struct static_features;
|
||||
namespace smt {
|
||||
|
@ -42,7 +42,7 @@ namespace smt {
|
|||
class setup {
|
||||
context & m_context;
|
||||
ast_manager & m_manager;
|
||||
front_end_params & m_params;
|
||||
smt_params & m_params;
|
||||
symbol m_logic;
|
||||
bool m_already_configured;
|
||||
void setup_auto_config();
|
||||
|
@ -96,7 +96,7 @@ namespace smt {
|
|||
void setup_i_arith();
|
||||
void setup_mi_arith();
|
||||
public:
|
||||
setup(context & c, front_end_params & params);
|
||||
setup(context & c, smt_params & params);
|
||||
void mark_already_configured() { m_already_configured = true; }
|
||||
bool already_configured() const { return m_already_configured; }
|
||||
bool set_logic(symbol logic) {
|
||||
|
|
|
@ -19,12 +19,12 @@ Notes:
|
|||
#include"solver_na2as.h"
|
||||
#include"smt_kernel.h"
|
||||
#include"reg_decl_plugins.h"
|
||||
#include"front_end_params.h"
|
||||
#include"smt_params.h"
|
||||
|
||||
namespace smt {
|
||||
|
||||
class solver : public solver_na2as {
|
||||
front_end_params m_params;
|
||||
smt_params m_params;
|
||||
smt::kernel * m_context;
|
||||
progress_callback * m_callback;
|
||||
public:
|
||||
|
|
|
@ -19,7 +19,7 @@ Notes:
|
|||
|
||||
#include"ctx_solver_simplify_tactic.h"
|
||||
#include"arith_decl_plugin.h"
|
||||
#include"front_end_params.h"
|
||||
#include"smt_params.h"
|
||||
#include"smt_kernel.h"
|
||||
#include"ast_pp.h"
|
||||
#include"mk_simplified_app.h"
|
||||
|
@ -28,7 +28,7 @@ Notes:
|
|||
class ctx_solver_simplify_tactic : public tactic {
|
||||
ast_manager& m;
|
||||
params_ref m_params;
|
||||
front_end_params m_front_p;
|
||||
smt_params m_front_p;
|
||||
smt::kernel m_solver;
|
||||
arith_util m_arith;
|
||||
mk_simplified_app m_mk_app;
|
||||
|
|
|
@ -19,12 +19,12 @@ Notes:
|
|||
#include"tactic.h"
|
||||
#include"tactical.h"
|
||||
#include"smt_kernel.h"
|
||||
#include"front_end_params.h"
|
||||
#include"params2front_end_params.h"
|
||||
#include"smt_params.h"
|
||||
#include"params2smt_params.h"
|
||||
#include"rewriter_types.h"
|
||||
|
||||
class smt_tactic : public tactic {
|
||||
front_end_params m_params;
|
||||
smt_params m_params;
|
||||
params_ref m_params_ref;
|
||||
statistics m_stats;
|
||||
std::string m_failure;
|
||||
|
@ -51,7 +51,7 @@ public:
|
|||
SASSERT(m_ctx == 0);
|
||||
}
|
||||
|
||||
front_end_params & fparams() {
|
||||
smt_params & fparams() {
|
||||
return m_params;
|
||||
}
|
||||
|
||||
|
@ -64,15 +64,15 @@ public:
|
|||
TRACE("smt_tactic", tout << this << "\nupdt_params: " << p << "\n";);
|
||||
updt_params_core(p);
|
||||
m_params_ref = p;
|
||||
// PARAM-TODO update params2front_end_params p ---> m_params
|
||||
params2front_end_params(m_params_ref, fparams());
|
||||
// PARAM-TODO update params2smt_params p ---> m_params
|
||||
params2smt_params(m_params_ref, fparams());
|
||||
SASSERT(p.get_bool("auto_config", fparams().m_auto_config) == fparams().m_auto_config);
|
||||
}
|
||||
|
||||
virtual void collect_param_descrs(param_descrs & r) {
|
||||
r.insert("candidate_models", CPK_BOOL, "(default: false) create candidate models even when quantifier or theory reasoning is incomplete.");
|
||||
r.insert("fail_if_inconclusive", CPK_BOOL, "(default: true) fail if found unsat (sat) for under (over) approximated goal.");
|
||||
solver_front_end_params_descrs(r);
|
||||
solver_smt_params_descrs(r);
|
||||
}
|
||||
|
||||
virtual void set_cancel(bool f) {
|
||||
|
|
|
@ -32,7 +32,7 @@ Revision History:
|
|||
#include"arith_decl_plugin.h"
|
||||
#include"smt_justification.h"
|
||||
#include"map.h"
|
||||
#include"front_end_params.h"
|
||||
#include"smt_params.h"
|
||||
#include"arith_eq_adapter.h"
|
||||
#include"smt_model_generator.h"
|
||||
#include"numeral_factory.h"
|
||||
|
@ -251,7 +251,7 @@ namespace smt {
|
|||
}
|
||||
};
|
||||
|
||||
front_end_params & m_params;
|
||||
smt_params & m_params;
|
||||
arith_util m_util;
|
||||
arith_eq_adapter m_arith_eq_adapter;
|
||||
theory_diff_logic_statistics m_stats;
|
||||
|
@ -305,7 +305,7 @@ namespace smt {
|
|||
void del_clause_eh(clause* cls);
|
||||
|
||||
public:
|
||||
theory_diff_logic(ast_manager& m, front_end_params & params):
|
||||
theory_diff_logic(ast_manager& m, smt_params & params):
|
||||
theory(m.get_family_id("arith")),
|
||||
m_params(params),
|
||||
m_util(m),
|
||||
|
|
|
@ -230,12 +230,12 @@ namespace smt {
|
|||
class clause_subsumption {
|
||||
ast_manager& m;
|
||||
grounder m_grounder;
|
||||
front_end_params m_params;
|
||||
smt_params m_params;
|
||||
context m_ctx;
|
||||
quantifier_ref_vector m_assumptions;
|
||||
unsigned_vector m_limit;
|
||||
public:
|
||||
clause_subsumption(ast_manager& m, front_end_params& p):
|
||||
clause_subsumption(ast_manager& m, smt_params& p):
|
||||
m(m), m_grounder(m), m_params(p), m_ctx(m,m_params), m_assumptions(m) {
|
||||
m_params.m_instgen = false;
|
||||
}
|
||||
|
@ -1131,7 +1131,7 @@ namespace smt {
|
|||
};
|
||||
|
||||
ast_manager& m_manager;
|
||||
front_end_params& m_params;
|
||||
smt_params& m_params;
|
||||
fo_clause_internalizer m_internalizer;
|
||||
instantiator m_instantiator;
|
||||
clause_subsumption m_subsumer;
|
||||
|
@ -1184,7 +1184,7 @@ namespace smt {
|
|||
|
||||
|
||||
public:
|
||||
theory_instgen_impl(ast_manager& m, front_end_params& p):
|
||||
theory_instgen_impl(ast_manager& m, smt_params& p):
|
||||
theory_instgen(m.get_family_id("inst_gen")),
|
||||
m_manager(m),
|
||||
m_params(p),
|
||||
|
@ -1277,7 +1277,7 @@ namespace smt {
|
|||
|
||||
};
|
||||
|
||||
theory_instgen* mk_theory_instgen(ast_manager& m, front_end_params& p) {
|
||||
theory_instgen* mk_theory_instgen(ast_manager& m, smt_params& p) {
|
||||
return alloc(theory_instgen_impl, m, p);
|
||||
}
|
||||
|
||||
|
|
|
@ -25,7 +25,7 @@ Revision History:
|
|||
#define _THEORY_INST_GEN_H_
|
||||
|
||||
#include "smt_theory.h"
|
||||
#include "front_end_params.h"
|
||||
#include "smt_params.h"
|
||||
|
||||
namespace smt {
|
||||
|
||||
|
@ -37,7 +37,7 @@ namespace smt {
|
|||
virtual char const * get_name() const { return "instgen"; }
|
||||
};
|
||||
|
||||
theory_instgen* mk_theory_instgen(ast_manager& m, front_end_params& p);
|
||||
theory_instgen* mk_theory_instgen(ast_manager& m, smt_params& p);
|
||||
|
||||
};
|
||||
|
||||
|
|
|
@ -44,7 +44,7 @@ namespace smt {
|
|||
{}
|
||||
};
|
||||
|
||||
user_theory::user_theory(ast_manager & m, front_end_params const& p, void * ext_context, void * ext_data, char const * name, family_id fid, user_decl_plugin * dp, user_simplifier_plugin * sp):
|
||||
user_theory::user_theory(ast_manager & m, smt_params const& p, void * ext_context, void * ext_data, char const * name, family_id fid, user_decl_plugin * dp, user_simplifier_plugin * sp):
|
||||
theory(fid),
|
||||
m_params(p),
|
||||
m_ext_context(ext_context),
|
||||
|
|
|
@ -43,7 +43,7 @@ namespace smt {
|
|||
typedef union_find<user_theory> th_union_find;
|
||||
typedef std::pair<theory_var, theory_var> var_pair;
|
||||
|
||||
front_end_params const& m_params;
|
||||
smt_params const& m_params;
|
||||
void * m_ext_context;
|
||||
void * m_ext_data;
|
||||
std::string m_name;
|
||||
|
@ -134,7 +134,7 @@ namespace smt {
|
|||
void assert_axiom_core(app* axiom);
|
||||
|
||||
public:
|
||||
user_theory(ast_manager & m, front_end_params const& p, void * ext_context, void * ext_data, char const * name, family_id fid, user_decl_plugin * dp, user_simplifier_plugin * sp);
|
||||
user_theory(ast_manager & m, smt_params const& p, void * ext_context, void * ext_data, char const * name, family_id fid, user_decl_plugin * dp, user_simplifier_plugin * sp);
|
||||
virtual ~user_theory();
|
||||
|
||||
virtual theory * mk_fresh(context * new_ctx);
|
||||
|
|
|
@ -23,8 +23,6 @@ Notes:
|
|||
#include"progress_callback.h"
|
||||
#include"params.h"
|
||||
|
||||
struct front_end_params;
|
||||
|
||||
/**
|
||||
\brief Abstract interface for making solvers available in the Z3
|
||||
API and front-ends such as SMT 2.0 and (legacy) SMT 1.0.
|
||||
|
|
|
@ -29,7 +29,6 @@ Notes:
|
|||
#include"tactic_exception.h"
|
||||
#include"lbool.h"
|
||||
|
||||
struct front_end_params;
|
||||
class progress_callback;
|
||||
|
||||
typedef ptr_buffer<goal> goal_buffer;
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
#include "arith_eq_solver.h"
|
||||
#include "front_end_params.h"
|
||||
#include "smt_params.h"
|
||||
|
||||
typedef rational numeral;
|
||||
typedef vector<numeral> row;
|
||||
|
@ -24,7 +24,7 @@ static void test_solve_integer_equations(
|
|||
}
|
||||
|
||||
void tst_arith_simplifier_plugin() {
|
||||
front_end_params params;
|
||||
smt_params params;
|
||||
ast_manager m;
|
||||
arith_eq_solver asimp(m);
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
#include "memory_manager.h"
|
||||
#include "front_end_params.h"
|
||||
#include "smt_params.h"
|
||||
#include "ast.h"
|
||||
#include "arith_decl_plugin.h"
|
||||
#include "bv_decl_plugin.h"
|
||||
|
@ -9,7 +9,7 @@
|
|||
void tst_check_assumptions()
|
||||
{
|
||||
memory::initialize(0);
|
||||
front_end_params params;
|
||||
smt_params params;
|
||||
ast_manager mgr;
|
||||
reg_decl_plugins(mgr);
|
||||
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
#include "ast_pp.h"
|
||||
#include "arith_decl_plugin.h"
|
||||
#include "dl_context.h"
|
||||
#include "front_end_params.h"
|
||||
#include "smt_params.h"
|
||||
#include "reg_decl_plugins.h"
|
||||
|
||||
using namespace datalog;
|
||||
|
@ -10,7 +10,7 @@ using namespace datalog;
|
|||
|
||||
static void dparse_string(char const* str) {
|
||||
ast_manager m;
|
||||
front_end_params params;
|
||||
smt_params params;
|
||||
reg_decl_plugins(m);
|
||||
|
||||
context ctx(m, params);
|
||||
|
@ -37,7 +37,7 @@ static void dparse_string(char const* str) {
|
|||
|
||||
static void dparse_file(char const* file) {
|
||||
ast_manager m;
|
||||
front_end_params params;
|
||||
smt_params params;
|
||||
reg_decl_plugins(m);
|
||||
|
||||
context ctx(m, params);
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
#include "ast_pp.h"
|
||||
#include "arith_decl_plugin.h"
|
||||
#include "dl_context.h"
|
||||
#include "front_end_params.h"
|
||||
#include "smt_params.h"
|
||||
|
||||
using namespace datalog;
|
||||
|
||||
|
@ -27,7 +27,7 @@ static void dl_context_simple_query_test(params_ref & params) {
|
|||
ast_manager m;
|
||||
dl_decl_util decl_util(m);
|
||||
|
||||
front_end_params fparams;
|
||||
smt_params fparams;
|
||||
context ctx(m, fparams);
|
||||
ctx.updt_params(params);
|
||||
|
||||
|
@ -49,7 +49,7 @@ static void dl_context_simple_query_test(params_ref & params) {
|
|||
void dl_context_saturate_file(params_ref & params, const char * f) {
|
||||
ast_manager m;
|
||||
dl_decl_util decl_util(m);
|
||||
front_end_params fparams;
|
||||
smt_params fparams;
|
||||
context ctx(m, fparams);
|
||||
ctx.updt_params(params);
|
||||
|
||||
|
|
|
@ -19,7 +19,7 @@ namespace datalog {
|
|||
};
|
||||
|
||||
|
||||
void test_functional_columns(front_end_params fparams, params_ref& params) {
|
||||
void test_functional_columns(smt_params fparams, params_ref& params) {
|
||||
ast_manager m;
|
||||
context ctx(m, fparams);
|
||||
ctx.updt_params(params);
|
||||
|
@ -121,7 +121,7 @@ namespace datalog {
|
|||
}
|
||||
}
|
||||
|
||||
void test_finite_product_relation(front_end_params fparams, params_ref& params) {
|
||||
void test_finite_product_relation(smt_params fparams, params_ref& params) {
|
||||
ast_manager m;
|
||||
context ctx(m, fparams);
|
||||
ctx.updt_params(params);
|
||||
|
@ -338,7 +338,7 @@ namespace datalog {
|
|||
using namespace datalog;
|
||||
|
||||
void tst_dl_product_relation() {
|
||||
front_end_params fparams;
|
||||
smt_params fparams;
|
||||
params_ref params;
|
||||
|
||||
test_functional_columns(fparams, params);
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
#include "ast_pp.h"
|
||||
#include "dl_table_relation.h"
|
||||
#include "dl_context.h"
|
||||
#include "front_end_params.h"
|
||||
#include "smt_params.h"
|
||||
#include "stopwatch.h"
|
||||
#include "reg_decl_plugins.h"
|
||||
|
||||
|
@ -43,7 +43,7 @@ void dl_query_ask_for_last_arg(context & ctx, func_decl * pred, relation_fact &
|
|||
}
|
||||
}
|
||||
|
||||
void dl_query_test(ast_manager & m, front_end_params & fparams, params_ref& params,
|
||||
void dl_query_test(ast_manager & m, smt_params & fparams, params_ref& params,
|
||||
context & ctx_b, char const* problem_file, unsigned test_count,
|
||||
bool use_magic_sets) {
|
||||
|
||||
|
@ -124,7 +124,7 @@ void dl_query_test(ast_manager & m, front_end_params & fparams, params_ref& para
|
|||
}
|
||||
}
|
||||
|
||||
void dl_query_test_wpa(front_end_params & fparams, params_ref& params) {
|
||||
void dl_query_test_wpa(smt_params & fparams, params_ref& params) {
|
||||
params.set_bool(":magic-sets-for-queries", true);
|
||||
ast_manager m;
|
||||
reg_decl_plugins(m);
|
||||
|
@ -183,7 +183,7 @@ void dl_query_test_wpa(front_end_params & fparams, params_ref& params) {
|
|||
}
|
||||
|
||||
void tst_dl_query() {
|
||||
front_end_params fparams;
|
||||
smt_params fparams;
|
||||
params_ref params;
|
||||
params.set_sym(":default-table", symbol("sparse"));
|
||||
params.set_sym(":default-relation", symbol("tr_sparse"));
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
namespace datalog {
|
||||
|
||||
static void test_interval_relation() {
|
||||
front_end_params params;
|
||||
smt_params params;
|
||||
ast_manager ast_m;
|
||||
context ctx(ast_m, params);
|
||||
arith_util autil(ast_m);
|
||||
|
@ -111,7 +111,7 @@ namespace datalog {
|
|||
|
||||
std::cout << "bound relation\n";
|
||||
|
||||
front_end_params params;
|
||||
smt_params params;
|
||||
ast_manager ast_m;
|
||||
context ctx(ast_m, params);
|
||||
arith_util autil(ast_m);
|
||||
|
|
|
@ -14,7 +14,7 @@ namespace datalog {
|
|||
arith_util a(m);
|
||||
sort* int_sort = a.mk_int();
|
||||
sort* real_sort = a.mk_real();
|
||||
front_end_params params;
|
||||
smt_params params;
|
||||
context ctx(m, params);
|
||||
relation_manager & rm = ctx.get_rmanager();
|
||||
relation_signature sig1;
|
||||
|
|
|
@ -24,7 +24,7 @@ static void test_table(mk_table_fn mk_table) {
|
|||
sig.push_back(4);
|
||||
sig.push_back(8);
|
||||
sig.push_back(4);
|
||||
front_end_params params;
|
||||
smt_params params;
|
||||
ast_manager ast_m;
|
||||
datalog::context ctx(ast_m, params);
|
||||
datalog::relation_manager & m = ctx.get_rmanager();
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
|
||||
#include "ast.h"
|
||||
#include "front_end_params.h"
|
||||
#include "smt_params.h"
|
||||
#include "smt_context.h"
|
||||
#include "arith_decl_plugin.h"
|
||||
#include "bv_decl_plugin.h"
|
||||
|
@ -11,7 +11,7 @@
|
|||
void tst_model_retrieval()
|
||||
{
|
||||
memory::initialize(0);
|
||||
front_end_params params;
|
||||
smt_params params;
|
||||
params.m_model = true;
|
||||
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
#include "ast.h"
|
||||
#include "front_end_params.h"
|
||||
#include "smt_params.h"
|
||||
#include "simplifier.h"
|
||||
#include "qe.h"
|
||||
#include "basic_simplifier_plugin.h"
|
||||
|
@ -33,7 +33,7 @@ static void test_qe(ast_manager& m, lbool expected_outcome, expr* fml, char cons
|
|||
// enable_trace("bv_bit_prop");
|
||||
|
||||
simplifier simp(m);
|
||||
front_end_params params;
|
||||
smt_params params;
|
||||
// params.m_quant_elim = true;
|
||||
|
||||
std::cout << mk_pp(fml, m) << "\n";
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
#include "ast.h"
|
||||
#include "front_end_params.h"
|
||||
#include "smt_params.h"
|
||||
#include "qe.h"
|
||||
#include "arith_decl_plugin.h"
|
||||
#include "ast_pp.h"
|
||||
|
@ -28,7 +28,7 @@ static void validate_quant_solution(ast_manager& m, expr* fml, expr* guard, qe::
|
|||
(*rep)(fml1);
|
||||
expr_ref tmp(m);
|
||||
tmp = m.mk_not(m.mk_implies(guard, fml1));
|
||||
front_end_params fp;
|
||||
smt_params fp;
|
||||
smt::kernel solver(m, fp);
|
||||
solver.assert_expr(tmp);
|
||||
lbool res = solver.check();
|
||||
|
@ -63,7 +63,7 @@ static void validate_quant_solutions(app* x, expr* fml, expr_ref_vector& guards)
|
|||
std::cout << mk_pp(fml2, m) << "\n";
|
||||
tmp = m.mk_not(m.mk_iff(fml2, tmp));
|
||||
std::cout << mk_pp(tmp, m) << "\n";
|
||||
front_end_params fp;
|
||||
smt_params fp;
|
||||
smt::kernel solver(m, fp);
|
||||
solver.assert_expr(tmp);
|
||||
lbool res = solver.check();
|
||||
|
@ -78,7 +78,7 @@ static void validate_quant_solutions(app* x, expr* fml, expr_ref_vector& guards)
|
|||
|
||||
|
||||
static void test_quant_solver(ast_manager& m, unsigned sz, app*const* xs, expr* fml, bool validate) {
|
||||
front_end_params params;
|
||||
smt_params params;
|
||||
qe::expr_quant_elim qe(m, params);
|
||||
qe::guarded_defs defs(m);
|
||||
bool success = qe.solve_for_vars(sz, xs, fml, defs);
|
||||
|
@ -98,8 +98,7 @@ static void test_quant_solver(ast_manager& m, unsigned sz, app*const* xs, expr*
|
|||
|
||||
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(false, &m);
|
||||
ctx.set_ignore_check(true);
|
||||
std::ostringstream buffer;
|
||||
buffer << "(declare-const x Int)\n"
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
|
||||
void tst_smt_context()
|
||||
{
|
||||
front_end_params params;
|
||||
smt_params params;
|
||||
|
||||
ast_manager m;
|
||||
reg_decl_plugins(m);
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
#include "expr_substitution.h"
|
||||
#include "front_end_params.h"
|
||||
#include "smt_params.h"
|
||||
#include "substitution.h"
|
||||
#include "unifier.h"
|
||||
#include "bv_decl_plugin.h"
|
||||
|
@ -10,7 +10,7 @@
|
|||
void tst_substitution()
|
||||
{
|
||||
memory::initialize(0);
|
||||
front_end_params params;
|
||||
smt_params params;
|
||||
params.m_model = true;
|
||||
|
||||
enable_trace("subst_bug");
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
|
||||
void tst_theory_dl() {
|
||||
ast_manager m;
|
||||
front_end_params params;
|
||||
smt_params params;
|
||||
params.m_model = true;
|
||||
datalog::dl_decl_util u(m);
|
||||
smt::context ctx(m, params);
|
||||
|
|
|
@ -27,10 +27,12 @@ void env_params::updt_params() {
|
|||
set_verbosity_level(p.get_uint("verbose", get_verbosity_level()));
|
||||
enable_warning_messages(p.get_bool("warning", true));
|
||||
memory::set_max_size(p.get_uint("memory_max_size", 0));
|
||||
memory::set_high_watermark(p.get_uint("memory_high_watermark", 0));
|
||||
}
|
||||
|
||||
void env_params::collect_param_descrs(param_descrs & d) {
|
||||
d.insert("verbose", CPK_UINT, "be verbose, where the value is the verbosity level", "0");
|
||||
d.insert("warning", CPK_BOOL, "enable/disable warning messages", "true");
|
||||
d.insert("memory_max_size", CPK_UINT, "set hard upper limit for memory consumption (in megabytes), if 0 then there is no bound.", "0");
|
||||
d.insert("memory_max_size", CPK_UINT, "set hard upper limit for memory consumption (in megabytes), if 0 then there is no limit", "0");
|
||||
d.insert("memory_high_watermark", CPK_UINT, "set high watermark for memory consumption (in megabytes), if 0 then there is no limit", "0");
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue