mirror of
https://github.com/Z3Prover/z3
synced 2025-06-22 22:03:39 +00:00
Reorganizing the code
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
This commit is contained in:
parent
d8cd3fc3ab
commit
6bdb009c3e
74 changed files with 67 additions and 27 deletions
41
src/old_params/bit_blaster_params.h
Normal file
41
src/old_params/bit_blaster_params.h
Normal file
|
@ -0,0 +1,41 @@
|
|||
/*++
|
||||
Copyright (c) 2006 Microsoft Corporation
|
||||
|
||||
Module Name:
|
||||
|
||||
bit_blaster_params.h
|
||||
|
||||
Abstract:
|
||||
|
||||
<abstract>
|
||||
|
||||
Author:
|
||||
|
||||
Leonardo de Moura (leonardo) 2008-10-02.
|
||||
|
||||
Revision History:
|
||||
|
||||
--*/
|
||||
#ifndef _BIT_BLASTER_PARAMS_H_
|
||||
#define _BIT_BLASTER_PARAMS_H_
|
||||
|
||||
#include"ini_file.h"
|
||||
|
||||
struct bit_blaster_params {
|
||||
bool m_bb_eager;
|
||||
bool m_bb_ext_gates;
|
||||
bool m_bb_quantifiers;
|
||||
bit_blaster_params():
|
||||
m_bb_eager(false),
|
||||
m_bb_ext_gates(false),
|
||||
m_bb_quantifiers(false) {
|
||||
}
|
||||
void register_params(ini_params & p) {
|
||||
p.register_bool_param("BB_EAGER", m_bb_eager, "eager bit blasting");
|
||||
p.register_bool_param("BB_EXT_GATES", m_bb_ext_gates, "use extended gates during bit-blasting");
|
||||
p.register_bool_param("BB_QUANTIFIERS", m_bb_quantifiers, "convert bit-vectors to Booleans in quantifiers");
|
||||
}
|
||||
};
|
||||
|
||||
#endif /* _BIT_BLASTER_PARAMS_H_ */
|
||||
|
26
src/old_params/cnf_params.cpp
Normal file
26
src/old_params/cnf_params.cpp
Normal file
|
@ -0,0 +1,26 @@
|
|||
/*++
|
||||
Copyright (c) 2006 Microsoft Corporation
|
||||
|
||||
Module Name:
|
||||
|
||||
cnf_params.cpp
|
||||
|
||||
Abstract:
|
||||
|
||||
<abstract>
|
||||
|
||||
Author:
|
||||
|
||||
Leonardo de Moura (leonardo) 2008-01-23.
|
||||
|
||||
Revision History:
|
||||
|
||||
--*/
|
||||
|
||||
#include"cnf_params.h"
|
||||
|
||||
void cnf_params::register_params(ini_params & p) {
|
||||
p.register_unsigned_param("CNF_FACTOR", m_cnf_factor, "the maximum number of clauses that can be created when converting a subformula");
|
||||
p.register_int_param("CNF_MODE", 0, 3, reinterpret_cast<int&>(m_cnf_mode), "CNF translation mode: 0 - disabled, 1 - quantifiers in CNF, 2 - 0 + opportunistic, 3 - full");
|
||||
}
|
||||
|
56
src/old_params/cnf_params.h
Normal file
56
src/old_params/cnf_params.h
Normal file
|
@ -0,0 +1,56 @@
|
|||
/*++
|
||||
Copyright (c) 2006 Microsoft Corporation
|
||||
|
||||
Module Name:
|
||||
|
||||
cnf_params.h
|
||||
|
||||
Abstract:
|
||||
|
||||
<abstract>
|
||||
|
||||
Author:
|
||||
|
||||
Leonardo de Moura (leonardo) 2008-01-23.
|
||||
|
||||
Revision History:
|
||||
|
||||
--*/
|
||||
#ifndef _CNF_PARAMS_H_
|
||||
#define _CNF_PARAMS_H_
|
||||
|
||||
#include"ini_file.h"
|
||||
|
||||
/**
|
||||
\brief CNF translation mode. The cheapest mode is CNF_QUANT, and
|
||||
the most expensive is CNF_FULL.
|
||||
*/
|
||||
enum cnf_mode {
|
||||
CNF_DISABLED, /* CNF translator is disabled.
|
||||
This mode is sufficient when using E-matching.
|
||||
*/
|
||||
CNF_QUANT, /* A subformula is put into CNF if it is inside of a
|
||||
quantifier.
|
||||
|
||||
This mode is sufficient when using Superposition
|
||||
Calculus.
|
||||
*/
|
||||
CNF_OPPORTUNISTIC, /* a subformula is also put in CNF if it is cheap. */
|
||||
CNF_FULL /* Everything is put into CNF, new names are introduced
|
||||
if it is too expensive. */
|
||||
};
|
||||
|
||||
struct cnf_params {
|
||||
cnf_mode m_cnf_mode;
|
||||
unsigned m_cnf_factor;
|
||||
cnf_params():
|
||||
m_cnf_mode(CNF_DISABLED),
|
||||
m_cnf_factor(4) {
|
||||
}
|
||||
|
||||
void register_params(ini_params & p);
|
||||
};
|
||||
|
||||
|
||||
#endif /* _CNF_PARAMS_H_ */
|
||||
|
31
src/old_params/dyn_ack_params.cpp
Normal file
31
src/old_params/dyn_ack_params.cpp
Normal file
|
@ -0,0 +1,31 @@
|
|||
/*++
|
||||
Copyright (c) 2006 Microsoft Corporation
|
||||
|
||||
Module Name:
|
||||
|
||||
dyn_ack_params.cpp
|
||||
|
||||
Abstract:
|
||||
|
||||
<abstract>
|
||||
|
||||
Author:
|
||||
|
||||
Leonardo de Moura (leonardo) 2007-05-18.
|
||||
|
||||
Revision History:
|
||||
|
||||
--*/
|
||||
#include"dyn_ack_params.h"
|
||||
|
||||
void dyn_ack_params::register_params(ini_params & p) {
|
||||
p.register_int_param("DACK", 0, 2, reinterpret_cast<int&>(m_dack),
|
||||
"0 - disable dynamic ackermannization, 1 - expand Leibniz's axiom if a congruence is the root of a conflict, 2 - expand Leibniz's axiom if a congruence is used during conflict resolution.");
|
||||
p.register_bool_param("DACK_EQ", m_dack_eq, "enable dynamic ackermannization for transtivity of equalities");
|
||||
p.register_unsigned_param("DACK_THRESHOLD", m_dack_threshold, "number of times the congruence rule must be used before Leibniz's axiom is expanded");
|
||||
p.register_double_param("DACK_FACTOR", m_dack_factor, "number of instance per conflict");
|
||||
p.register_unsigned_param("DACK_GC", m_dack_gc, "Dynamic ackermannization garbage collection frequency (per conflict).");
|
||||
p.register_double_param("DACK_GC_INV_DECAY", m_dack_gc_inv_decay);
|
||||
}
|
||||
|
||||
|
53
src/old_params/dyn_ack_params.h
Normal file
53
src/old_params/dyn_ack_params.h
Normal file
|
@ -0,0 +1,53 @@
|
|||
/*++
|
||||
Copyright (c) 2006 Microsoft Corporation
|
||||
|
||||
Module Name:
|
||||
|
||||
dyn_ack_params.h
|
||||
|
||||
Abstract:
|
||||
|
||||
<abstract>
|
||||
|
||||
Author:
|
||||
|
||||
Leonardo de Moura (leonardo) 2007-05-18.
|
||||
|
||||
Revision History:
|
||||
|
||||
--*/
|
||||
#ifndef _DYN_ACK_PARAMS_H_
|
||||
#define _DYN_ACK_PARAMS_H_
|
||||
|
||||
#include"ini_file.h"
|
||||
|
||||
enum dyn_ack_strategy {
|
||||
DACK_DISABLED,
|
||||
DACK_ROOT, // congruence is the root of the conflict
|
||||
DACK_CR // congruence used during conflict resolution
|
||||
};
|
||||
|
||||
struct dyn_ack_params {
|
||||
dyn_ack_strategy m_dack;
|
||||
bool m_dack_eq;
|
||||
double m_dack_factor;
|
||||
unsigned m_dack_threshold;
|
||||
unsigned m_dack_gc;
|
||||
double m_dack_gc_inv_decay;
|
||||
|
||||
public:
|
||||
dyn_ack_params():
|
||||
m_dack(DACK_ROOT),
|
||||
m_dack_eq(false),
|
||||
m_dack_factor(0.1),
|
||||
m_dack_threshold(10),
|
||||
m_dack_gc(2000),
|
||||
m_dack_gc_inv_decay(0.8) {
|
||||
}
|
||||
|
||||
void register_params(ini_params & p);
|
||||
};
|
||||
|
||||
|
||||
#endif /* _DYN_ACK_PARAMS_H_ */
|
||||
|
108
src/old_params/front_end_params.cpp
Normal file
108
src/old_params/front_end_params.cpp
Normal file
|
@ -0,0 +1,108 @@
|
|||
/*++
|
||||
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"
|
||||
|
||||
void front_end_params::register_params(ini_params & p) {
|
||||
p.register_param_vector(m_param_vector.get());
|
||||
preprocessor_params::register_params(p);
|
||||
spc_params::register_params(p);
|
||||
smt_params::register_params(p);
|
||||
parser_params::register_params(p);
|
||||
arith_simplifier_params::register_params(p);
|
||||
p.register_int_param("ENGINE", 0, 2, reinterpret_cast<int&>(m_engine), "0: SMT solver, 1: Superposition prover, 2: EPR solver, true");
|
||||
z3_solver_params::register_params(p);
|
||||
model_params::register_params(p);
|
||||
p.register_unsigned_param("MAX_COUNTEREXAMPLES", m_max_num_cex,
|
||||
"set the maximum number of counterexamples when using Simplify front end");
|
||||
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("DEFAULT_QID", m_default_qid, "create a default quantifier id based on its position, the id is used to report profiling information (see QI_PROFILE)");
|
||||
|
||||
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_bool_param("INTERACTIVE", m_interactive, "enable interactive mode using Simplify input format");
|
||||
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);
|
||||
p.register_bool_param("AUTO_CONFIG", m_auto_config, "use heuristics to set Z3 configuration parameters, it is only available for the SMT-LIB input format");
|
||||
p.register_int_param("PROOF_MODE", 0, 2, reinterpret_cast<int&>(m_proof_mode), "select proof generation mode: 0 - disabled, 1 - coarse grain, 2 - fine grain");
|
||||
p.register_bool_param("TRACE", m_trace, "enable tracing for the Axiom Profiler tool");
|
||||
p.register_string_param("TRACE_FILE_NAME", m_trace_file_name, "tracing file name");
|
||||
p.register_bool_param("IGNORE_SETPARAMETER", m_ignore_setparameter, "ignore (SETPARAMETER ...) commands in Simplify format input");
|
||||
p.register_bool_param("ASYNC_COMMANDS", m_async_commands, "enable/disable support for asynchronous commands in the Simplify front-end.");
|
||||
p.register_bool_param("DISPLAY_CONFIG", m_display_config, "display configuration used by Z3");
|
||||
|
||||
#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
|
||||
|
||||
#ifndef _EXTERNAL_RELEASE
|
||||
// external users should not have access to it.
|
||||
p.register_bool_param("PREPROCESS", m_preprocess);
|
||||
#endif
|
||||
|
||||
p.register_bool_param("USER_THEORY_PREPROCESS_AXIOMS",
|
||||
m_user_theory_preprocess_axioms,
|
||||
"Apply full pre-processing to user theory axioms",
|
||||
true);
|
||||
|
||||
p.register_bool_param("USER_THEORY_PERSIST_AXIOMS",
|
||||
m_user_theory_persist_axioms,
|
||||
"Persist user axioms to the base level",
|
||||
true);
|
||||
|
||||
p.register_bool_param("SMTLIB2_COMPLIANT", m_smtlib2_compliant);
|
||||
|
||||
p.register_bool_param("IGNORE_BAD_PATTERNS", m_ignore_bad_patterns);
|
||||
|
||||
PRIVATE_PARAMS({
|
||||
p.register_bool_param("IGNORE_CHECKSAT", m_ignore_checksat);
|
||||
p.register_bool_param("DEBUG_REF_COUNT", m_debug_ref_count);
|
||||
p.register_bool_param("IGNORE_USER_PATTERNS", m_ignore_user_patterns);
|
||||
p.register_bool_param("INCREMENTAL_CORE_ASSERT", m_incremental_core_assert);
|
||||
DEBUG_CODE(p.register_int_param("COPY_PARAMS", m_copy_params););
|
||||
});
|
||||
|
||||
// temporary hack until strategic_solver is ported to new tactic framework
|
||||
PRIVATE_PARAMS({
|
||||
p.register_bool_param("NLSAT", m_nlsat);
|
||||
});
|
||||
}
|
||||
|
||||
void front_end_params::open_trace_file() {
|
||||
if (m_trace) {
|
||||
m_trace_stream = alloc(std::fstream, m_trace_file_name.c_str(), std::ios_base::out);
|
||||
}
|
||||
}
|
||||
|
||||
void front_end_params::close_trace_file() {
|
||||
if (m_trace_stream != NULL) {
|
||||
std::fstream &tmp = *m_trace_stream;
|
||||
m_trace_stream = NULL;
|
||||
tmp << "[eof]\n";
|
||||
tmp.close();
|
||||
// do not delete it, this might be called from a Ctrl-C signal handler
|
||||
// and there might be someone writing to it
|
||||
}
|
||||
}
|
138
src/old_params/front_end_params.h
Normal file
138
src/old_params/front_end_params.h
Normal file
|
@ -0,0 +1,138 @@
|
|||
/*++
|
||||
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"ini_file.h"
|
||||
#include"ast.h"
|
||||
#include"preprocessor_params.h"
|
||||
#include"spc_params.h"
|
||||
#include"smt_params.h"
|
||||
#include"pp_params.h"
|
||||
#include"parser_params.h"
|
||||
#include"arith_simplifier_params.h"
|
||||
#include"z3_solver_params.h"
|
||||
#include"model_params.h"
|
||||
|
||||
enum engine {
|
||||
ENG_SMT,
|
||||
ENG_SPC,
|
||||
ENG_EPR
|
||||
};
|
||||
|
||||
struct front_end_params : public preprocessor_params, public spc_params, public smt_params, public parser_params,
|
||||
public arith_simplifier_params, public z3_solver_params, public model_params
|
||||
{
|
||||
ref<param_vector> m_param_vector;
|
||||
engine m_engine;
|
||||
unsigned m_max_num_cex; // maximum number of counterexamples
|
||||
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_default_qid;
|
||||
bool m_interactive;
|
||||
bool m_well_sorted_check;
|
||||
bool m_ignore_bad_patterns;
|
||||
bool m_ignore_user_patterns;
|
||||
bool m_incremental_core_assert; // assert conditions to the core incrementally
|
||||
unsigned m_soft_timeout;
|
||||
double m_instr_out;
|
||||
unsigned m_memory_high_watermark;
|
||||
unsigned m_memory_max_size;
|
||||
proof_gen_mode m_proof_mode;
|
||||
bool m_auto_config;
|
||||
bool m_smtlib2_compliant;
|
||||
#ifdef Z3DEBUG
|
||||
int m_copy_params; // used for testing copy params... Invoke method copy_params(m_copy_params) in main.cpp when diff -1.
|
||||
#endif
|
||||
bool m_preprocess; // temporary hack for disabling all preprocessing..
|
||||
bool m_ignore_checksat; // abort before checksat... for internal debugging
|
||||
bool m_debug_ref_count;
|
||||
bool m_trace;
|
||||
std::string m_trace_file_name;
|
||||
std::fstream* m_trace_stream;
|
||||
bool m_ignore_setparameter;
|
||||
bool m_async_commands;
|
||||
bool m_display_config;
|
||||
bool m_user_theory_preprocess_axioms;
|
||||
bool m_user_theory_persist_axioms;
|
||||
bool m_nlsat; // temporary hack until strategic_solver is ported to new tactic framework
|
||||
|
||||
front_end_params():
|
||||
m_param_vector(alloc(param_vector, this)),
|
||||
m_engine(ENG_SMT),
|
||||
m_max_num_cex(1),
|
||||
m_at_labels_cex(false),
|
||||
m_check_at_labels(false),
|
||||
m_default_qid(false),
|
||||
m_interactive(false),
|
||||
m_well_sorted_check(true),
|
||||
m_ignore_bad_patterns(true),
|
||||
m_ignore_user_patterns(false),
|
||||
m_incremental_core_assert(true),
|
||||
m_soft_timeout(0),
|
||||
m_instr_out(0.0),
|
||||
m_memory_high_watermark(0),
|
||||
m_memory_max_size(0),
|
||||
m_proof_mode(PGM_DISABLED),
|
||||
#if defined(SMTCOMP) || defined(_EXTERNAL_RELEASE)
|
||||
m_auto_config(true),
|
||||
#else
|
||||
m_auto_config(false),
|
||||
#endif
|
||||
#if 0
|
||||
m_smtlib2_compliant(true),
|
||||
#else
|
||||
m_smtlib2_compliant(false),
|
||||
#endif
|
||||
#ifdef Z3DEBUG
|
||||
m_copy_params(-1),
|
||||
#endif
|
||||
m_preprocess(true), // temporary hack for disabling all preprocessing..
|
||||
m_ignore_checksat(false),
|
||||
m_debug_ref_count(false),
|
||||
m_trace(false),
|
||||
m_trace_file_name("z3.log"),
|
||||
m_trace_stream(NULL),
|
||||
m_ignore_setparameter(false),
|
||||
m_async_commands(true),
|
||||
m_display_config(false),
|
||||
m_user_theory_preprocess_axioms(false),
|
||||
m_user_theory_persist_axioms(false),
|
||||
m_nlsat(false) {
|
||||
}
|
||||
|
||||
void register_params(ini_params & p);
|
||||
|
||||
void open_trace_file();
|
||||
|
||||
void close_trace_file();
|
||||
|
||||
void copy_params(unsigned idx) {
|
||||
m_param_vector->copy_params(this, idx);
|
||||
}
|
||||
|
||||
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_ */
|
||||
|
26
src/old_params/nnf_params.cpp
Normal file
26
src/old_params/nnf_params.cpp
Normal file
|
@ -0,0 +1,26 @@
|
|||
/*++
|
||||
Copyright (c) 2006 Microsoft Corporation
|
||||
|
||||
Module Name:
|
||||
|
||||
nnf_params.cpp
|
||||
|
||||
Abstract:
|
||||
|
||||
<abstract>
|
||||
|
||||
Author:
|
||||
|
||||
Leonardo de Moura (leonardo) 2008-01-14.
|
||||
|
||||
Revision History:
|
||||
|
||||
--*/
|
||||
#include"nnf_params.h"
|
||||
|
||||
void nnf_params::register_params(ini_params & p) {
|
||||
p.register_unsigned_param("NNF_FACTOR", m_nnf_factor, "the maximum growth factor during NNF translation (auxiliary definitions are introduced if the threshold is reached)");
|
||||
p.register_int_param("NNF_MODE", 0, 3, reinterpret_cast<int&>(m_nnf_mode), "NNF translation mode: 0 - skolem normal form, 1 - 0 + quantifiers in NNF, 2 - 1 + opportunistic, 3 - full");
|
||||
p.register_bool_param("NNF_IGNORE_LABELS", m_nnf_ignore_labels, "remove/ignore labels in the input formula, this option is ignored if proofs are enabled");
|
||||
p.register_bool_param("NNF_SK_HACK", m_nnf_sk_hack, "hack for VCC");
|
||||
}
|
74
src/old_params/nnf_params.h
Normal file
74
src/old_params/nnf_params.h
Normal file
|
@ -0,0 +1,74 @@
|
|||
/*++
|
||||
Copyright (c) 2006 Microsoft Corporation
|
||||
|
||||
Module Name:
|
||||
|
||||
nnf_params.h
|
||||
|
||||
Abstract:
|
||||
|
||||
<abstract>
|
||||
|
||||
Author:
|
||||
|
||||
Leonardo de Moura (leonardo) 2008-01-14.
|
||||
|
||||
Revision History:
|
||||
|
||||
--*/
|
||||
#ifndef _NNF_PARAMS_H_
|
||||
#define _NNF_PARAMS_H_
|
||||
|
||||
#include"ini_file.h"
|
||||
|
||||
/**
|
||||
\brief NNF translation mode. The cheapest mode is NNF_SKOLEM, and
|
||||
the most expensive is NNF_FULL.
|
||||
*/
|
||||
enum nnf_mode {
|
||||
NNF_SKOLEM, /* A subformula is put into NNF only if it contains
|
||||
quantifiers or labels. The result of the
|
||||
transformation will be in skolem normal form.
|
||||
If a formula is too expensive to be put into NNF,
|
||||
then nested quantifiers and labels are renamed.
|
||||
|
||||
This mode is sufficient when using E-matching.
|
||||
*/
|
||||
NNF_QUANT, /* A subformula is put into NNF if it contains
|
||||
quantifiers, labels, or is in the scope of a
|
||||
quantifier. The result of the transformation will be
|
||||
in skolem normal form, and the body of quantifiers
|
||||
will be in NNF. If a ground formula is too expensive to
|
||||
be put into NNF, then nested quantifiers and labels
|
||||
are renamed.
|
||||
|
||||
This mode is sufficient when using Superposition
|
||||
Calculus.
|
||||
|
||||
Remark: If the problem does not contain quantifiers,
|
||||
then NNF_QUANT is identical to NNF_SKOLEM.
|
||||
*/
|
||||
NNF_OPPORTUNISTIC, /* Similar to NNF_QUANT, but a subformula is
|
||||
also put into NNF, if it is
|
||||
cheap. Otherwise, the nested quantifiers and
|
||||
labels are renamed. */
|
||||
NNF_FULL /* Everything is put into NNF. */
|
||||
};
|
||||
|
||||
struct nnf_params {
|
||||
nnf_mode m_nnf_mode;
|
||||
unsigned m_nnf_factor;
|
||||
bool m_nnf_ignore_labels;
|
||||
bool m_nnf_sk_hack;
|
||||
nnf_params():
|
||||
m_nnf_mode(NNF_SKOLEM),
|
||||
m_nnf_factor(4),
|
||||
m_nnf_ignore_labels(false),
|
||||
m_nnf_sk_hack(false) {
|
||||
}
|
||||
|
||||
void register_params(ini_params & p);
|
||||
};
|
||||
|
||||
#endif /* _NNF_PARAMS_H_ */
|
||||
|
27
src/old_params/order_params.cpp
Normal file
27
src/old_params/order_params.cpp
Normal file
|
@ -0,0 +1,27 @@
|
|||
/*++
|
||||
Copyright (c) 2006 Microsoft Corporation
|
||||
|
||||
Module Name:
|
||||
|
||||
order_params.cpp
|
||||
|
||||
Abstract:
|
||||
|
||||
Term ordering parameters.
|
||||
|
||||
Author:
|
||||
|
||||
Leonardo de Moura (leonardo) 2008-01-28.
|
||||
|
||||
Revision History:
|
||||
|
||||
--*/
|
||||
#include"order_params.h"
|
||||
|
||||
void order_params::register_params(ini_params & p) {
|
||||
p.register_symbol_list_param("PRECEDENCE", m_order_precedence, "describe a (partial) precedence for the term ordering used in the Superposition Calculus module. The precedence is lists of function symbols. Example: PRECEDENCE=\"(f, g, h)\"");
|
||||
p.register_symbol_list_param("PRECEDENCE_GEN", m_order_precedence_gen, "describe how a total precedence order is generated. The generator is a sequence of simple (partial) orders with an optional '-' (indicating the next (partial) order should be inverted). The available simple (partial) orders are: user (the order specified by precedence); arity; interpreted (interpreted function symbols are considered smaller); definition (defined function symbols are considered bigger); frequency; arbitrary (total arbitrary order generated by Z3). Example: PRECEDENCE_GEN=\"user interpreted - arity arbitraty\"");
|
||||
p.register_symbol_nat_list_param("ORDER_WEIGHTS", m_order_weights, "describe a (partial) assignment of weights to function symbols for term orderings (e.g., KBO). The assigment is a list of pairs of the form f:n where f is a string and n is a natural. Example: WEIGHTS=\"(f:1, g:2, h:3)\"");
|
||||
p.register_unsigned_param("ORDER_VAR_WEIGHT", m_order_var_weight, "weight of variables in term orderings (e.g., KBO)");
|
||||
p.register_int_param("ORDER", 0, 1, reinterpret_cast<int&>(m_order_kind), "Term ordering: 0 - KBO, 1 - LPO");
|
||||
}
|
44
src/old_params/order_params.h
Normal file
44
src/old_params/order_params.h
Normal file
|
@ -0,0 +1,44 @@
|
|||
/*++
|
||||
Copyright (c) 2006 Microsoft Corporation
|
||||
|
||||
Module Name:
|
||||
|
||||
order_params.h
|
||||
|
||||
Abstract:
|
||||
|
||||
Term ordering parameters.
|
||||
|
||||
Author:
|
||||
|
||||
Leonardo de Moura (leonardo) 2008-01-28.
|
||||
|
||||
Revision History:
|
||||
|
||||
--*/
|
||||
#ifndef _ORDER_PARAMS_H_
|
||||
#define _ORDER_PARAMS_H_
|
||||
|
||||
#include"ini_file.h"
|
||||
|
||||
enum order_kind {
|
||||
ORD_KBO,
|
||||
ORD_LPO
|
||||
};
|
||||
|
||||
struct order_params {
|
||||
svector<symbol> m_order_precedence;
|
||||
svector<symbol> m_order_precedence_gen;
|
||||
svector<symbol_nat_pair> m_order_weights;
|
||||
unsigned m_order_var_weight;
|
||||
order_kind m_order_kind;
|
||||
|
||||
order_params():
|
||||
m_order_var_weight(1),
|
||||
m_order_kind(ORD_KBO) {
|
||||
}
|
||||
|
||||
void register_params(ini_params & p);
|
||||
};
|
||||
|
||||
#endif /* _ORDER_PARAMS_H_ */
|
82
src/old_params/params2front_end_params.cpp
Normal file
82
src/old_params/params2front_end_params.cpp
Normal file
|
@ -0,0 +1,82 @@
|
|||
/*++
|
||||
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:
|
||||
|
||||
--*/
|
||||
#include"front_end_params.h"
|
||||
#include"params.h"
|
||||
|
||||
/**
|
||||
Update front_end_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) {
|
||||
t.m_quant_elim = s.get_bool(":elim-quant", t.m_quant_elim);
|
||||
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());
|
||||
t.m_mbqi = s.get_bool(":mbqi", t.m_mbqi);
|
||||
t.m_mbqi_max_iterations = s.get_uint(":mbqi-max-iterations", t.m_mbqi_max_iterations);
|
||||
t.m_random_seed = s.get_uint(":random-seed", t.m_random_seed);
|
||||
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_solver = s.get_bool(":solver", t.m_solver);
|
||||
t.m_preprocess = s.get_bool(":preprocess", t.m_preprocess);
|
||||
t.m_hi_div0 = s.get_bool(":hi-div0", t.m_hi_div0);
|
||||
t.m_auto_config = s.get_bool(":auto-config", t.m_auto_config);
|
||||
t.m_array_simplify = s.get_bool(":array-old-simplifier", t.m_array_simplify);
|
||||
t.m_arith_branch_cut_ratio = s.get_uint(":arith-branch-cut-ratio", t.m_arith_branch_cut_ratio);
|
||||
t.m_arith_expand_eqs = s.get_bool(":arith-expand-eqs", t.m_arith_expand_eqs);
|
||||
|
||||
if (s.get_bool(":arith-greatest-error-pivot", false))
|
||||
t.m_arith_pivot_strategy = ARITH_PIVOT_GREATEST_ERROR;
|
||||
else if (s.get_bool(":arith-least-error-pivot", false))
|
||||
t.m_arith_pivot_strategy = ARITH_PIVOT_LEAST_ERROR;
|
||||
}
|
||||
|
||||
/**
|
||||
\brief Copy parameters (from s) that affect the semantics of Z3 (e.g., HI_DIV0).
|
||||
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) {
|
||||
if (s.m_model)
|
||||
t.set_bool(":produce-models", true);
|
||||
if (!s.m_hi_div0)
|
||||
t.set_bool(":hi-div0", false);
|
||||
}
|
||||
|
||||
/**
|
||||
\brief Bridge for using params_ref with smt::context.
|
||||
*/
|
||||
void solver_front_end_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)");
|
||||
r.insert(":mbqi-max-iterations", CPK_UINT, "maximum number of rounds of MBQI");
|
||||
r.insert(":random-seed", CPK_UINT, "random seed for smt solver");
|
||||
r.insert(":qi-eager-threshold", CPK_DOUBLE, "threshold for eager quantifier instantiation");
|
||||
r.insert(":qi-lazy-threshold", CPK_DOUBLE, "threshold for lazy quantifier instantiation");
|
||||
r.insert(":auto_config", CPK_BOOL, "use heuristics to automatically configure smt solver");
|
||||
r.insert(":arith-branch-cut-ratio", CPK_UINT, "branch&bound / gomory cut ratio");
|
||||
}
|
31
src/old_params/params2front_end_params.h
Normal file
31
src/old_params/params2front_end_params.h
Normal file
|
@ -0,0 +1,31 @@
|
|||
/*++
|
||||
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
|
14
src/old_params/parser_params.cpp
Normal file
14
src/old_params/parser_params.cpp
Normal file
|
@ -0,0 +1,14 @@
|
|||
#include "parser_params.h"
|
||||
|
||||
parser_params::parser_params() :
|
||||
m_dump_goal_as_smt(false),
|
||||
m_display_error_for_vs(false) {
|
||||
}
|
||||
|
||||
void parser_params::register_params(ini_params & p) {
|
||||
p.register_bool_param("DUMP_GOAL_AS_SMT", m_dump_goal_as_smt, "write goal back to output in SMT format");
|
||||
p.register_bool_param("DISPLAY_ERROR_FOR_VISUAL_STUDIO", m_display_error_for_vs, "display error messages in Visual Studio format");
|
||||
}
|
||||
|
||||
|
||||
|
33
src/old_params/parser_params.h
Normal file
33
src/old_params/parser_params.h
Normal file
|
@ -0,0 +1,33 @@
|
|||
/*++
|
||||
Copyright (c) 2008 Microsoft Corporation
|
||||
|
||||
Module Name:
|
||||
|
||||
parser_params.h
|
||||
|
||||
Abstract:
|
||||
|
||||
<abstract>
|
||||
|
||||
Author:
|
||||
|
||||
Nikolaj Bjorner (nbjorner) 2008-04-21.
|
||||
|
||||
Revision History:
|
||||
|
||||
--*/
|
||||
#ifndef _PARSER_PARAMS_H_
|
||||
#define _PARSER_PARAMS_H_
|
||||
|
||||
#include"ini_file.h"
|
||||
|
||||
struct parser_params {
|
||||
bool m_dump_goal_as_smt; // re-print goal as SMT benchmark.
|
||||
bool m_display_error_for_vs; // print error in vs format.
|
||||
|
||||
parser_params();
|
||||
void register_params(ini_params & p);
|
||||
};
|
||||
|
||||
#endif /* _PARSER_PARAMS_H_ */
|
||||
|
59
src/old_params/pattern_inference_params.h
Normal file
59
src/old_params/pattern_inference_params.h
Normal file
|
@ -0,0 +1,59 @@
|
|||
/*++
|
||||
Copyright (c) 2006 Microsoft Corporation
|
||||
|
||||
Module Name:
|
||||
|
||||
pattern_inference_params.h
|
||||
|
||||
Abstract:
|
||||
|
||||
<abstract>
|
||||
|
||||
Author:
|
||||
|
||||
Leonardo de Moura (leonardo) 2008-03-24.
|
||||
|
||||
Revision History:
|
||||
|
||||
--*/
|
||||
#ifndef _PATTERN_INFERENCE_PARAMS_H_
|
||||
#define _PATTERN_INFERENCE_PARAMS_H_
|
||||
|
||||
#include"ini_file.h"
|
||||
|
||||
enum arith_pattern_inference_kind {
|
||||
AP_NO, // do not infer patterns with arithmetic terms
|
||||
AP_CONSERVATIVE, // only infer patterns with arithmetic terms if there is no other option
|
||||
AP_FULL // always use patterns with arithmetic terms
|
||||
};
|
||||
|
||||
struct pattern_inference_params {
|
||||
unsigned m_pi_max_multi_patterns;
|
||||
bool m_pi_block_loop_patterns;
|
||||
arith_pattern_inference_kind m_pi_arith;
|
||||
bool m_pi_use_database;
|
||||
unsigned m_pi_arith_weight;
|
||||
unsigned m_pi_non_nested_arith_weight;
|
||||
bool m_pi_pull_quantifiers;
|
||||
int m_pi_nopat_weight;
|
||||
bool m_pi_avoid_skolems;
|
||||
bool m_pi_warnings;
|
||||
|
||||
pattern_inference_params():
|
||||
m_pi_max_multi_patterns(0),
|
||||
m_pi_block_loop_patterns(true),
|
||||
m_pi_arith(AP_CONSERVATIVE),
|
||||
m_pi_use_database(false),
|
||||
m_pi_arith_weight(5),
|
||||
m_pi_non_nested_arith_weight(10),
|
||||
m_pi_pull_quantifiers(true),
|
||||
m_pi_nopat_weight(-1),
|
||||
m_pi_avoid_skolems(true),
|
||||
m_pi_warnings(false) {
|
||||
}
|
||||
|
||||
void register_params(ini_params & p);
|
||||
};
|
||||
|
||||
#endif /* _PATTERN_INFERENCE_PARAMS_H_ */
|
||||
|
140
src/old_params/preprocessor_params.h
Normal file
140
src/old_params/preprocessor_params.h
Normal file
|
@ -0,0 +1,140 @@
|
|||
/*++
|
||||
Copyright (c) 2006 Microsoft Corporation
|
||||
|
||||
Module Name:
|
||||
|
||||
preprocessor_params.h
|
||||
|
||||
Abstract:
|
||||
|
||||
Preprocess AST before adding them to the logical context
|
||||
|
||||
Author:
|
||||
|
||||
Leonardo de Moura (leonardo) 2008-01-17.
|
||||
|
||||
Revision History:
|
||||
|
||||
--*/
|
||||
#ifndef _PREPROCESSOR_PARAMS_H_
|
||||
#define _PREPROCESSOR_PARAMS_H_
|
||||
|
||||
#include"nnf_params.h"
|
||||
#include"cnf_params.h"
|
||||
#include"pattern_inference_params.h"
|
||||
#include"bit_blaster_params.h"
|
||||
#include"bv_simplifier_params.h"
|
||||
|
||||
enum lift_ite_kind {
|
||||
LI_NONE,
|
||||
LI_CONSERVATIVE,
|
||||
LI_FULL
|
||||
};
|
||||
|
||||
enum q_arith_kind {
|
||||
QA_NONE,
|
||||
QA_COOPER,
|
||||
QA_OMEGA,
|
||||
QA_ALTERNATE
|
||||
};
|
||||
|
||||
struct preprocessor_params : public nnf_params, public cnf_params, public pattern_inference_params,
|
||||
public bit_blaster_params, public bv_simplifier_params {
|
||||
lift_ite_kind m_lift_ite;
|
||||
lift_ite_kind m_ng_lift_ite; // lift ite for non ground terms
|
||||
bool m_pull_cheap_ite_trees;
|
||||
bool m_pull_nested_quantifiers;
|
||||
bool m_eliminate_term_ite;
|
||||
bool m_eliminate_and; // represent (and a b) as (not (or (not a) (not b)))
|
||||
bool m_reverse_implies; // translate (implies a b) into (or b (not a))
|
||||
bool m_macro_finder;
|
||||
bool m_solver;
|
||||
bool m_propagate_values;
|
||||
bool m_propagate_booleans;
|
||||
bool m_context_simplifier;
|
||||
bool m_strong_context_simplifier;
|
||||
bool m_refine_inj_axiom;
|
||||
bool m_eliminate_bounds;
|
||||
bool m_quant_elim;
|
||||
bool m_nlquant_elim;
|
||||
bool m_der;
|
||||
bool m_simplify_bit2int;
|
||||
bool m_nnf_cnf;
|
||||
bool m_distribute_forall;
|
||||
bool m_reduce_args;
|
||||
bool m_pre_demod;
|
||||
bool m_quasi_macros;
|
||||
bool m_restricted_quasi_macros;
|
||||
bool m_max_bv_sharing;
|
||||
bool m_pre_simplifier;
|
||||
|
||||
public:
|
||||
preprocessor_params():
|
||||
m_lift_ite(LI_NONE),
|
||||
m_ng_lift_ite(LI_NONE),
|
||||
m_pull_cheap_ite_trees(false),
|
||||
m_pull_nested_quantifiers(false),
|
||||
m_eliminate_term_ite(false),
|
||||
m_eliminate_and(true),
|
||||
m_macro_finder(false),
|
||||
m_solver(false),
|
||||
m_propagate_values(true),
|
||||
m_propagate_booleans(false), // TODO << check peformance
|
||||
m_context_simplifier(false),
|
||||
m_strong_context_simplifier(false),
|
||||
m_refine_inj_axiom(true),
|
||||
m_eliminate_bounds(false),
|
||||
m_quant_elim(false),
|
||||
m_nlquant_elim(false),
|
||||
m_der(false),
|
||||
m_simplify_bit2int(false),
|
||||
m_nnf_cnf(true),
|
||||
m_distribute_forall(false),
|
||||
m_reduce_args(false),
|
||||
m_pre_demod(false),
|
||||
m_quasi_macros(false),
|
||||
m_restricted_quasi_macros(false),
|
||||
m_max_bv_sharing(true),
|
||||
m_pre_simplifier(true) {
|
||||
}
|
||||
|
||||
void register_params(ini_params & p) {
|
||||
nnf_params::register_params(p);
|
||||
cnf_params::register_params(p);
|
||||
pattern_inference_params::register_params(p);
|
||||
bit_blaster_params::register_params(p);
|
||||
bv_simplifier_params::register_params(p);
|
||||
p.register_int_param("LIFT_ITE", 0, 2, reinterpret_cast<int&>(m_lift_ite), "ite term lifting: 0 - no lifting, 1 - conservative, 2 - full");
|
||||
p.register_int_param("NG_LIFT_ITE", 0, 2, reinterpret_cast<int&>(m_ng_lift_ite), "ite (non-ground) term lifting: 0 - no lifting, 1 - conservative, 2 - full");
|
||||
p.register_bool_param("ELIM_TERM_ITE", m_eliminate_term_ite, "eliminate term if-then-else in the preprocessor");
|
||||
p.register_bool_param("ELIM_AND", m_eliminate_and, "represent (and a b) as (not (or (not a) (not b)))");
|
||||
p.register_bool_param("MACRO_FINDER", m_macro_finder, "try to find universally quantified formulas that can be viewed as macros");
|
||||
p.register_bool_param("SOLVER", m_solver, "enable solver during preprocessing step", true);
|
||||
p.register_bool_param("PROPAGATE_VALUES", m_propagate_values, "propagate values during preprocessing step");
|
||||
p.register_bool_param("PROPAGATE_BOOLEANS", m_propagate_booleans, "propagate boolean values during preprocessing step");
|
||||
p.register_bool_param("PULL_CHEAP_ITE_TREES", m_pull_cheap_ite_trees);
|
||||
p.register_bool_param("PULL_NESTED_QUANTIFIERS", m_pull_nested_quantifiers, "eliminate nested quantifiers by moving nested quantified variables to the outermost quantifier, it is unnecessary if the formula is converted into CNF");
|
||||
p.register_bool_param("CONTEXT_SIMPLIFIER", m_context_simplifier,
|
||||
"Simplify Boolean sub-expressions if they already appear in context", true);
|
||||
p.register_bool_param("STRONG_CONTEXT_SIMPLIFIER", m_strong_context_simplifier,
|
||||
"Simplify Boolean sub-expressions by using full satisfiability queries", true);
|
||||
p.register_bool_param("REFINE_INJ_AXIOM", m_refine_inj_axiom);
|
||||
p.register_bool_param("ELIM_BOUNDS", m_eliminate_bounds, "cheap Fourier-Motzkin");
|
||||
|
||||
p.register_bool_param("ELIM_QUANTIFIERS", m_quant_elim,
|
||||
"Use quantifier elimination procedures on Boolean, Bit-vector, Arithmetic and Array variables", true);
|
||||
p.register_bool_param("ELIM_NLARITH_QUANTIFIERS", m_nlquant_elim,
|
||||
"Eliminate non-linear quantifiers", true);
|
||||
p.register_bool_param("DER", m_der);
|
||||
p.register_bool_param("BIT2INT", m_simplify_bit2int, "hoist bit2int conversions over arithmetical expressions");
|
||||
p.register_bool_param("DISTRIBUTE_FORALL", m_distribute_forall);
|
||||
p.register_bool_param("REDUCE_ARGS", m_reduce_args);
|
||||
p.register_bool_param("PRE_DEMODULATOR", m_pre_demod, "apply demodulators during preprocessing step");
|
||||
p.register_bool_param("QUASI_MACROS", m_quasi_macros);
|
||||
p.register_bool_param("RESTRICTED_QUASI_MACROS", m_restricted_quasi_macros);
|
||||
p.register_bool_param("BV_MAX_SHARING", m_max_bv_sharing);
|
||||
p.register_bool_param("PRE_SIMPLIFIER", m_pre_simplifier);
|
||||
}
|
||||
};
|
||||
|
||||
#endif /* _PREPROCESSOR_PARAMS_H_ */
|
139
src/old_params/qi_params.h
Normal file
139
src/old_params/qi_params.h
Normal file
|
@ -0,0 +1,139 @@
|
|||
/*++
|
||||
Copyright (c) 2006 Microsoft Corporation
|
||||
|
||||
Module Name:
|
||||
|
||||
qi_params.h
|
||||
|
||||
Abstract:
|
||||
|
||||
<abstract>
|
||||
|
||||
Author:
|
||||
|
||||
Leonardo de Moura (leonardo) 2008-06-15.
|
||||
|
||||
Revision History:
|
||||
|
||||
--*/
|
||||
#ifndef _QI_PARAMS_H_
|
||||
#define _QI_PARAMS_H_
|
||||
|
||||
#include"ini_file.h"
|
||||
|
||||
enum quick_checker_mode {
|
||||
MC_NO, // do not use (cheap) model checking based instantiation
|
||||
MC_UNSAT, // instantiate unsatisfied instances
|
||||
MC_NO_SAT // instantiate unsatisfied and not-satisfied instances
|
||||
};
|
||||
|
||||
struct qi_params {
|
||||
bool m_qi_ematching;
|
||||
std::string m_qi_cost;
|
||||
std::string m_qi_new_gen;
|
||||
double m_qi_eager_threshold;
|
||||
double m_qi_lazy_threshold;
|
||||
unsigned m_qi_max_eager_multipatterns;
|
||||
unsigned m_qi_max_lazy_multipattern_matching;
|
||||
bool m_qi_profile;
|
||||
unsigned m_qi_profile_freq;
|
||||
quick_checker_mode m_qi_quick_checker;
|
||||
bool m_qi_lazy_quick_checker;
|
||||
bool m_qi_promote_unsat;
|
||||
unsigned m_qi_max_instances;
|
||||
bool m_qi_lazy_instantiation;
|
||||
bool m_qi_conservative_final_check;
|
||||
|
||||
bool m_mbqi;
|
||||
unsigned m_mbqi_max_cexs;
|
||||
unsigned m_mbqi_max_cexs_incr;
|
||||
unsigned m_mbqi_max_iterations;
|
||||
bool m_mbqi_trace;
|
||||
unsigned m_mbqi_force_template;
|
||||
|
||||
bool m_instgen;
|
||||
|
||||
qi_params():
|
||||
/*
|
||||
The "weight 0" performance bug
|
||||
------------------------------
|
||||
|
||||
The parameters m_qi_cost and m_qi_new_gen influence quantifier instantiation.
|
||||
- m_qi_cost: specify the cost of a quantifier instantiation. Z3 will block instantiations using m_qi_eager_threshold and m_qi_lazy_threshold.
|
||||
- m_qi_new_gen: specify how the "generation" tag of an enode created by quantifier instantiation is set.
|
||||
|
||||
Enodes in the input problem have generation 0.
|
||||
|
||||
Some combinations of m_qi_cost and m_qi_new_gen will prevent Z3 from breaking matching loops.
|
||||
For example, the "Weight 0" peformace bug was triggered by the following combination:
|
||||
- m_qi_cost: (+ weight generation)
|
||||
- m_qi_new_gen: cost
|
||||
If a quantifier has weight 0, then the cost of instantiating it with a term in the input problem has cost 0.
|
||||
The new enodes created during the instantiation will be tagged with generation = const = 0. So, every enode
|
||||
will have generation 0, and consequently every quantifier instantiation will have cost 0.
|
||||
|
||||
Although dangerous, this feature was requested by the Boogie team. In their case, the patterns are carefully constructred,
|
||||
and there are no matching loops. Moreover, the tag some quantifiers with weight 0 to instruct Z3 to never block their instances.
|
||||
An example is the select-store axiom. They need this feature to be able to analyze code that contains very long execution paths.
|
||||
|
||||
So, unless requested by the user, the default weight must be > 0. Otherwise, Z3 will execute without any
|
||||
matching loop detection.
|
||||
*/
|
||||
m_qi_cost("(+ weight generation)"),
|
||||
m_qi_new_gen("cost"),
|
||||
m_qi_eager_threshold(10.0),
|
||||
m_qi_lazy_threshold(20.0), // reduced to give a chance to MBQI
|
||||
m_qi_max_eager_multipatterns(0),
|
||||
m_qi_max_lazy_multipattern_matching(2),
|
||||
m_qi_profile(false),
|
||||
m_qi_profile_freq(UINT_MAX),
|
||||
m_qi_quick_checker(MC_NO),
|
||||
m_qi_lazy_quick_checker(true),
|
||||
m_qi_promote_unsat(true),
|
||||
m_qi_max_instances(UINT_MAX),
|
||||
m_qi_lazy_instantiation(false),
|
||||
m_qi_conservative_final_check(false),
|
||||
#ifdef _EXTERNAL_RELEASE
|
||||
m_mbqi(true), // enabled by default
|
||||
#else
|
||||
m_mbqi(false), // to avoid Rustan whining that the models are not partial anymore.
|
||||
#endif
|
||||
m_mbqi_max_cexs(1),
|
||||
m_mbqi_max_cexs_incr(1),
|
||||
m_mbqi_max_iterations(1000),
|
||||
m_mbqi_trace(false),
|
||||
m_mbqi_force_template(10),
|
||||
m_instgen(false) {
|
||||
}
|
||||
|
||||
void register_params(ini_params & p) {
|
||||
p.register_unsigned_param("QI_MAX_EAGER_MULTI_PATTERNS", m_qi_max_eager_multipatterns,
|
||||
"Specify the number of extra multi patterns that are processed eagerly. By default, the prover use at most one multi-pattern eagerly when there is no unary pattern. This value should be smaller than or equal to PI_MAX_MULTI_PATTERNS");
|
||||
p.register_unsigned_param("QI_MAX_LAZY_MULTI_PATTERN_MATCHING", m_qi_max_lazy_multipattern_matching, "Maximum number of rounds of matching in a branch for delayed multipatterns. A multipattern is delayed based on the value of QI_MAX_EAGER_MULTI_PATTERNS");
|
||||
p.register_string_param("QI_COST", m_qi_cost, "The cost function for quantifier instantiation");
|
||||
p.register_string_param("QI_NEW_GEN", m_qi_new_gen, "The function for calculating the generation of newly constructed terms");
|
||||
p.register_double_param("QI_EAGER_THRESHOLD", m_qi_eager_threshold, "Threshold for eager quantifier instantiation");
|
||||
p.register_double_param("QI_LAZY_THRESHOLD", m_qi_lazy_threshold, "Threshold for lazy quantifier instantiation");
|
||||
p.register_bool_param("QI_PROFILE", m_qi_profile);
|
||||
p.register_unsigned_param("QI_PROFILE_FREQ", m_qi_profile_freq);
|
||||
p.register_int_param("QI_QUICK_CHECKER", 0, 2, reinterpret_cast<int&>(m_qi_quick_checker), "0 - do not use (cheap) model checker, 1 - instantiate instances unsatisfied by current model, 2 - 1 + instantiate instances not satisfied by current model");
|
||||
p.register_bool_param("QI_LAZY_QUICK_CHECKER", m_qi_lazy_quick_checker);
|
||||
p.register_bool_param("QI_PROMOTE_UNSAT", m_qi_promote_unsat);
|
||||
p.register_unsigned_param("QI_MAX_INSTANCES", m_qi_max_instances);
|
||||
p.register_bool_param("QI_LAZY_INSTANTIATION", m_qi_lazy_instantiation);
|
||||
p.register_bool_param("QI_CONSERVATIVE_FINAL_CHECK", m_qi_conservative_final_check);
|
||||
|
||||
|
||||
p.register_bool_param("MBQI", m_mbqi, "Model Based Quantifier Instantiation (MBQI)");
|
||||
p.register_unsigned_param("MBQI_MAX_CEXS", m_mbqi_max_cexs, "Initial maximal number of counterexamples used in MBQI, each counterexample generates a quantifier instantiation", true);
|
||||
p.register_unsigned_param("MBQI_MAX_CEXS_INCR", m_mbqi_max_cexs_incr, "Increment for MBQI_MAX_CEXS, the increment is performed after each round of MBQI", true);
|
||||
p.register_unsigned_param("MBQI_MAX_ITERATIONS", m_mbqi_max_iterations, "Maximum number of rounds of MBQI", true);
|
||||
p.register_bool_param("MBQI_TRACE", m_mbqi_trace, "Generate tracing messages for Model Based Quantifier Instantiation (MBQI). It will display a message before every round of MBQI, and the quantifiers that were not satisfied.", true);
|
||||
p.register_unsigned_param("MBQI_FORCE_TEMPLATE", m_mbqi_force_template, "Some quantifiers can be used as templates for building interpretations for functions. Z3 uses heuristics to decide whether a quantifier will be used as a template or not. Quantifiers with weight >= MBQI_FORCE_TEMPLATE are forced to be used as a template", true);
|
||||
|
||||
p.register_bool_param("INST_GEN", m_instgen, "Enable Instantiation Generation solver (disables other quantifier reasoning)", false);
|
||||
}
|
||||
};
|
||||
|
||||
#endif /* _QI_PARAMS_H_ */
|
||||
|
108
src/old_params/smt_params.cpp
Normal file
108
src/old_params/smt_params.cpp
Normal file
|
@ -0,0 +1,108 @@
|
|||
/*++
|
||||
Copyright (c) 2006 Microsoft Corporation
|
||||
|
||||
Module Name:
|
||||
|
||||
smt_params.cpp
|
||||
|
||||
Abstract:
|
||||
|
||||
<abstract>
|
||||
|
||||
Author:
|
||||
|
||||
Leonardo de Moura (leonardo) 2008-02-20.
|
||||
|
||||
Revision History:
|
||||
|
||||
--*/
|
||||
#include"smt_params.h"
|
||||
#include"trace.h"
|
||||
|
||||
void smt_params::register_params(ini_params & p) {
|
||||
dyn_ack_params::register_params(p);
|
||||
qi_params::register_params(p);
|
||||
theory_arith_params::register_params(p);
|
||||
theory_array_params::register_params(p);
|
||||
theory_bv_params::register_params(p);
|
||||
theory_datatype_params::register_params(p);
|
||||
|
||||
p.register_bool_param("CHECK_PROOF", m_check_proof);
|
||||
p.register_bool_param("DISPLAY_PROOF", m_display_proof);
|
||||
p.register_bool_param("DISPLAY_DOT_PROOF", m_display_dot_proof);
|
||||
p.register_bool_param("DISPLAY_UNSAT_CORE", m_display_unsat_core);
|
||||
p.register_bool_param("INTERNALIZER_NNF", m_internalizer_nnf);
|
||||
p.register_bool_param("EQ_PROPAGATION", m_eq_propagation);
|
||||
p.register_bool_param("BIN_CLAUSES", m_binary_clause_opt);
|
||||
p.register_unsigned_param("RELEVANCY", m_relevancy_lvl, "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", true);
|
||||
p.register_bool_param("RELEVANCY_LEMMA", m_relevancy_lemma, "true if lemmas are used to propagate relevancy");
|
||||
p.register_unsigned_param("RANDOM_SEED", m_random_seed, "random seed for Z3");
|
||||
p.register_percentage_param("RANDOM_CASE_SPLIT_FREQ", m_random_var_freq, "frequency of random case splits");
|
||||
p.register_int_param("PHASE_SELECTION", 0, 6, reinterpret_cast<int&>(m_phase_selection), "phase selection heuristic: 0 - always false, 1 - always true, 2 - phase caching, 3 - phase caching conservative, 4 - phase caching conservative 2, 5 - random, 6 - number of occurrences");
|
||||
p.register_bool_param("MINIMIZE_LEMMAS", m_minimize_lemmas, "enable/disable lemma minimization algorithm");
|
||||
p.register_unsigned_param("MAX_CONFLICTS", m_max_conflicts, "maximum number of conflicts");
|
||||
|
||||
p.register_unsigned_param("RECENT_LEMMA_THRESHOLD", m_recent_lemmas_size);
|
||||
p.register_unsigned_param("TICK", m_tick);
|
||||
|
||||
PRIVATE_PARAMS({
|
||||
p.register_bool_param("THEORY_RESOLVE", m_theory_resolve, "Apply theory resolution to produce auxiliary conflict clauses", true);
|
||||
});
|
||||
|
||||
p.register_int_param("RESTART_STRATEGY", 0, 4, reinterpret_cast<int&>(m_restart_strategy), "0 - geometric, 1 - inner-outer-geometric, 2 - luby, 3 - fixed, 4 - arithmetic");
|
||||
p.register_unsigned_param("RESTART_INITIAL", m_restart_initial,
|
||||
"inital restart frequency in number of conflicts, it is also the unit for the luby sequence");
|
||||
p.register_double_param("RESTART_FACTOR", m_restart_factor, "when using geometric (or inner-outer-geometric) progression of restarts, it specifies the constant used to multiply the currect restart threshold");
|
||||
p.register_bool_param("RESTART_ADAPTIVE", m_restart_adaptive, "disable restarts based on the search 'agility'");
|
||||
p.register_percentage_param("RESTART_AGILITY_THRESHOLD", m_restart_agility_threshold);
|
||||
|
||||
p.register_int_param("LEMMA_GC_STRATEGY", 0, 2, reinterpret_cast<int&>(m_lemma_gc_strategy), "0 - fixed, 1 - geometric, 2 - at every restart");
|
||||
p.register_bool_param("LEMMA_GC_HALF", m_lemma_gc_half, "true for simple gc algorithm (delete approx. half of the clauses)");
|
||||
p.register_unsigned_param("LEMMA_GC_INITIAL", m_lemma_gc_initial, "lemma initial gc frequency (in number of conflicts), used by fixed or geometric strategies");
|
||||
p.register_double_param("LEMMA_GC_FACTOR", m_lemma_gc_factor, "used by geometric strategy");
|
||||
p.register_unsigned_param("LEMMA_GC_NEW_OLD_RATIO", m_new_old_ratio);
|
||||
p.register_unsigned_param("LEMMA_GC_NEW_CLAUSE_ACTIVITY", m_new_clause_activity);
|
||||
p.register_unsigned_param("LEMMA_GC_OLD_CLAUSE_ACTIVITY", m_old_clause_activity);
|
||||
p.register_unsigned_param("LEMMA_GC_NEW_CLAUSE_RELEVANCY", m_new_clause_relevancy);
|
||||
p.register_unsigned_param("LEMMA_GC_OLD_CLAUSE_RELEVANCY", m_old_clause_activity);
|
||||
|
||||
p.register_bool_param("SIMPLIFY_CLAUSES", m_simplify_clauses);
|
||||
|
||||
p.register_int_param("RANDOM_INITIAL_ACTIVITY", 0, 2, reinterpret_cast<int&>(m_random_initial_activity));
|
||||
|
||||
PRIVATE_PARAMS({
|
||||
|
||||
p.register_double_param("INV_DECAY", m_inv_decay);
|
||||
p.register_unsigned_param("PHASE_CACHING_ON_DURATION", m_phase_caching_on);
|
||||
p.register_unsigned_param("PHASE_CACHING_OFF_DURATION", m_phase_caching_off);
|
||||
});
|
||||
|
||||
p.register_bool_param("SMTLIB_DUMP_LEMMAS", m_smtlib_dump_lemmas);
|
||||
p.register_string_param("SMTLIB_LOGIC", m_smtlib_logic, "Name used for the :logic field when generating SMT-LIB benchmarks");
|
||||
p.register_bool_param("DISPLAY_FEATURES", m_display_features);
|
||||
|
||||
p.register_bool_param("NEW_CORE2TH_EQ", m_new_core2th_eq);
|
||||
p.register_bool_param("EMATCHING", m_ematching, "E-Matching based quantifier instantiation");
|
||||
|
||||
p.register_bool_param("PROFILE_RES_SUB", m_profile_res_sub);
|
||||
#ifndef _EXTERNAL_RELEASE
|
||||
p.register_bool_param("DISPLAY_BOOL_VAR2EXPR", m_display_bool_var2expr);
|
||||
p.register_bool_param("DISPLAY_LL_BOOL_VAR2EXPR", m_display_ll_bool_var2expr);
|
||||
p.register_bool_param("ABORT_AFTER_PREPROC", m_abort_after_preproc, "abort after preprocessing step, this flag is only useful for debugging purposes");
|
||||
p.register_bool_param("DISPLAY_INSTALLED_THEORIES", m_display_installed_theories, "display theories installed at smt::context", true);
|
||||
#endif
|
||||
p.register_int_param("CASE_SPLIT", 0, 5, reinterpret_cast<int&>(m_case_split_strategy), "0 - case split based on variable activity, 1 - similar to 0, but delay case splits created during the search, 2 - similar to 0, but cache the relevancy, 3 - case split based on relevancy (structural splitting), 4 - case split on relevancy and activity, 5 - case split on relevancy and current goal");
|
||||
p.register_unsigned_param("REL_CASE_SPLIT_ORDER", 0, 2, m_rel_case_split_order, "structural (relevancy) splitting order: 0 - left-to-right (default), 1 - random, 2 - right-to-left");
|
||||
p.register_bool_param("LOOKAHEAD_DISEQ", m_lookahead_diseq);
|
||||
|
||||
p.register_bool_param("DELAY_UNITS", m_delay_units);
|
||||
p.register_unsigned_param("DELAY_UNITS_THRESHOLD", m_delay_units_threshold);
|
||||
|
||||
p.register_bool_param("MODEL", m_model, "enable/disable model construction", true);
|
||||
p.register_bool_param("MODEL_VALIDATE", m_model_validate, "validate the model", true);
|
||||
p.register_bool_param("MODEL_ON_TIMEOUT", m_model_on_timeout, "after hitting soft-timeout or memory high watermark, generate a candidate model", true);
|
||||
p.register_bool_param("MODEL_ON_FINAL_CHECK", m_model_on_final_check, "display candidate model (in the standard output) whenever Z3 hits a final check", true);
|
||||
|
||||
p.register_unsigned_param("PROGRESS_SAMPLING_FREQ", m_progress_sampling_freq, "frequency for progress output in miliseconds");
|
||||
}
|
||||
|
257
src/old_params/smt_params.h
Normal file
257
src/old_params/smt_params.h
Normal file
|
@ -0,0 +1,257 @@
|
|||
/*++
|
||||
Copyright (c) 2006 Microsoft Corporation
|
||||
|
||||
Module Name:
|
||||
|
||||
smt_params.h
|
||||
|
||||
Abstract:
|
||||
|
||||
<abstract>
|
||||
|
||||
Author:
|
||||
|
||||
Leonardo de Moura (leonardo) 2008-02-20.
|
||||
|
||||
Revision History:
|
||||
|
||||
--*/
|
||||
#ifndef _SMT_PARAMS_H_
|
||||
#define _SMT_PARAMS_H_
|
||||
|
||||
#include"ini_file.h"
|
||||
#include"dyn_ack_params.h"
|
||||
#include"qi_params.h"
|
||||
#include"theory_arith_params.h"
|
||||
#include"theory_array_params.h"
|
||||
#include"theory_bv_params.h"
|
||||
#include"theory_datatype_params.h"
|
||||
|
||||
enum phase_selection {
|
||||
PS_ALWAYS_FALSE,
|
||||
PS_ALWAYS_TRUE,
|
||||
PS_CACHING,
|
||||
PS_CACHING_CONSERVATIVE,
|
||||
PS_CACHING_CONSERVATIVE2, // similar to the previous one, but alternated default config from time to time.
|
||||
PS_RANDOM,
|
||||
PS_OCCURRENCE
|
||||
};
|
||||
|
||||
enum restart_strategy {
|
||||
RS_GEOMETRIC,
|
||||
RS_IN_OUT_GEOMETRIC,
|
||||
RS_LUBY,
|
||||
RS_FIXED,
|
||||
RS_ARITHMETIC
|
||||
};
|
||||
|
||||
enum lemma_gc_strategy {
|
||||
LGC_FIXED,
|
||||
LGC_GEOMETRIC,
|
||||
LGC_AT_RESTART
|
||||
};
|
||||
|
||||
enum initial_activity {
|
||||
IA_ZERO, // initialized with 0
|
||||
IA_RANDOM_WHEN_SEARCHING, // random when searching
|
||||
IA_RANDOM // always random
|
||||
};
|
||||
|
||||
enum case_split_strategy {
|
||||
CS_ACTIVITY, // case split based on activity
|
||||
CS_ACTIVITY_DELAY_NEW, // case split based on activity but delay new case splits created during the search
|
||||
CS_ACTIVITY_WITH_CACHE, // case split based on activity and cache the activity
|
||||
CS_RELEVANCY, // case split based on relevancy
|
||||
CS_RELEVANCY_ACTIVITY, // case split based on relevancy and activity
|
||||
CS_RELEVANCY_GOAL, // based on relevancy and the current goal
|
||||
};
|
||||
|
||||
struct smt_params : public dyn_ack_params, public qi_params, public theory_arith_params, public theory_array_params, public theory_bv_params,
|
||||
public theory_datatype_params {
|
||||
bool m_display_proof;
|
||||
bool m_display_dot_proof;
|
||||
bool m_display_unsat_core;
|
||||
bool m_check_proof;
|
||||
bool m_internalizer_nnf;
|
||||
bool m_eq_propagation;
|
||||
bool m_binary_clause_opt;
|
||||
unsigned m_relevancy_lvl;
|
||||
bool m_relevancy_lemma;
|
||||
unsigned m_random_seed;
|
||||
double m_random_var_freq;
|
||||
double m_inv_decay;
|
||||
unsigned m_clause_decay;
|
||||
initial_activity m_random_initial_activity;
|
||||
phase_selection m_phase_selection;
|
||||
unsigned m_phase_caching_on;
|
||||
unsigned m_phase_caching_off;
|
||||
bool m_minimize_lemmas;
|
||||
unsigned m_max_conflicts;
|
||||
bool m_simplify_clauses;
|
||||
unsigned m_tick;
|
||||
bool m_display_features;
|
||||
bool m_new_core2th_eq;
|
||||
bool m_ematching;
|
||||
|
||||
// -----------------------------------
|
||||
//
|
||||
// Case split strategy
|
||||
//
|
||||
// -----------------------------------
|
||||
case_split_strategy m_case_split_strategy;
|
||||
unsigned m_rel_case_split_order;
|
||||
bool m_lookahead_diseq;
|
||||
|
||||
// -----------------------------------
|
||||
//
|
||||
// Delay units...
|
||||
//
|
||||
// -----------------------------------
|
||||
bool m_delay_units;
|
||||
unsigned m_delay_units_threshold;
|
||||
|
||||
// -----------------------------------
|
||||
//
|
||||
// Conflict resolution
|
||||
//
|
||||
// -----------------------------------
|
||||
bool m_theory_resolve;
|
||||
|
||||
// -----------------------------------
|
||||
//
|
||||
// Restart
|
||||
//
|
||||
// -----------------------------------
|
||||
restart_strategy m_restart_strategy;
|
||||
unsigned m_restart_initial;
|
||||
double m_restart_factor;
|
||||
bool m_restart_adaptive;
|
||||
double m_agility_factor;
|
||||
double m_restart_agility_threshold;
|
||||
|
||||
// -----------------------------------
|
||||
//
|
||||
// Lemma garbage collection
|
||||
//
|
||||
// -----------------------------------
|
||||
lemma_gc_strategy m_lemma_gc_strategy;
|
||||
bool m_lemma_gc_half;
|
||||
unsigned m_recent_lemmas_size;
|
||||
unsigned m_lemma_gc_initial;
|
||||
double m_lemma_gc_factor;
|
||||
unsigned m_new_old_ratio; //!< the ratio of new and old clauses.
|
||||
unsigned m_new_clause_activity;
|
||||
unsigned m_old_clause_activity;
|
||||
unsigned m_new_clause_relevancy; //!< Max. number of unassigned literals to be considered relevant.
|
||||
unsigned m_old_clause_relevancy; //!< Max. number of unassigned literals to be considered relevant.
|
||||
double m_inv_clause_decay; //!< clause activity decay
|
||||
|
||||
// -----------------------------------
|
||||
//
|
||||
// SMT-LIB (debug) pretty printer
|
||||
//
|
||||
// -----------------------------------
|
||||
bool m_smtlib_dump_lemmas;
|
||||
std::string m_smtlib_logic;
|
||||
|
||||
// -----------------------------------
|
||||
//
|
||||
// Statistics for Profiling
|
||||
//
|
||||
// -----------------------------------
|
||||
bool m_profile_res_sub;
|
||||
bool m_display_bool_var2expr;
|
||||
bool m_display_ll_bool_var2expr;
|
||||
bool m_abort_after_preproc;
|
||||
|
||||
// -----------------------------------
|
||||
//
|
||||
// Model generation
|
||||
//
|
||||
// -----------------------------------
|
||||
bool m_model;
|
||||
bool m_model_validate;
|
||||
bool m_model_on_timeout;
|
||||
bool m_model_on_final_check;
|
||||
|
||||
// -----------------------------------
|
||||
//
|
||||
// Progress sampling
|
||||
//
|
||||
// -----------------------------------
|
||||
unsigned m_progress_sampling_freq;
|
||||
|
||||
// -----------------------------------
|
||||
//
|
||||
// Debugging goodies
|
||||
//
|
||||
// -----------------------------------
|
||||
bool m_display_installed_theories;
|
||||
|
||||
smt_params():
|
||||
m_display_proof(false),
|
||||
m_display_dot_proof(false),
|
||||
m_display_unsat_core(false),
|
||||
m_check_proof(false),
|
||||
m_internalizer_nnf(false),
|
||||
m_eq_propagation(true),
|
||||
m_binary_clause_opt(true),
|
||||
m_relevancy_lvl(2),
|
||||
m_relevancy_lemma(false),
|
||||
m_random_seed(0),
|
||||
m_random_var_freq(0.01),
|
||||
m_inv_decay(1.052),
|
||||
m_clause_decay(1),
|
||||
m_random_initial_activity(IA_RANDOM_WHEN_SEARCHING),
|
||||
m_phase_selection(PS_CACHING_CONSERVATIVE),
|
||||
m_phase_caching_on(400),
|
||||
m_phase_caching_off(100),
|
||||
m_minimize_lemmas(true),
|
||||
m_max_conflicts(UINT_MAX),
|
||||
m_simplify_clauses(true),
|
||||
m_tick(1000),
|
||||
m_display_features(false),
|
||||
m_new_core2th_eq(true),
|
||||
m_ematching(true),
|
||||
m_case_split_strategy(CS_ACTIVITY_DELAY_NEW),
|
||||
m_rel_case_split_order(0),
|
||||
m_lookahead_diseq(false),
|
||||
m_delay_units(false),
|
||||
m_delay_units_threshold(32),
|
||||
m_theory_resolve(false),
|
||||
m_restart_strategy(RS_IN_OUT_GEOMETRIC),
|
||||
m_restart_initial(100),
|
||||
m_restart_factor(1.1),
|
||||
m_restart_adaptive(true),
|
||||
m_agility_factor(0.9999),
|
||||
m_restart_agility_threshold(0.18),
|
||||
m_lemma_gc_strategy(LGC_FIXED),
|
||||
m_lemma_gc_half(false),
|
||||
m_recent_lemmas_size(100),
|
||||
m_lemma_gc_initial(5000),
|
||||
m_lemma_gc_factor(1.1),
|
||||
m_new_old_ratio(16),
|
||||
m_new_clause_activity(10),
|
||||
m_old_clause_activity(500),
|
||||
m_new_clause_relevancy(45),
|
||||
m_old_clause_relevancy(6),
|
||||
m_inv_clause_decay(1),
|
||||
m_smtlib_dump_lemmas(false),
|
||||
m_smtlib_logic("AUFLIA"),
|
||||
m_profile_res_sub(false),
|
||||
m_display_bool_var2expr(false),
|
||||
m_display_ll_bool_var2expr(false),
|
||||
m_abort_after_preproc(false),
|
||||
m_model(true),
|
||||
m_model_validate(false),
|
||||
m_model_on_timeout(false),
|
||||
m_model_on_final_check(false),
|
||||
m_progress_sampling_freq(0),
|
||||
m_display_installed_theories(false) {
|
||||
}
|
||||
|
||||
void register_params(ini_params & p);
|
||||
};
|
||||
|
||||
#endif /* _SMT_PARAMS_H_ */
|
||||
|
37
src/old_params/spc_params.cpp
Normal file
37
src/old_params/spc_params.cpp
Normal file
|
@ -0,0 +1,37 @@
|
|||
/*++
|
||||
Copyright (c) 2006 Microsoft Corporation
|
||||
|
||||
Module Name:
|
||||
|
||||
spc_params.cpp
|
||||
|
||||
Abstract:
|
||||
|
||||
<abstract>
|
||||
|
||||
Author:
|
||||
|
||||
Leonardo de Moura (leonardo) 2008-02-08.
|
||||
|
||||
Revision History:
|
||||
|
||||
--*/
|
||||
#include"spc_params.h"
|
||||
|
||||
void spc_params::register_params(ini_params & p) {
|
||||
order_params::register_params(p);
|
||||
p.register_unsigned_param("SPC_MIN_FUNC_FREQ_SUBSUMPTION_INDEX",m_min_func_freq_subsumption_index,
|
||||
"minimal number of occurrences (in clauses) for a function symbol to be considered for subsumption indexing.");
|
||||
p.register_unsigned_param("SPC_MAX_SUBSUMPTION_INDEX_FEATURES", m_max_subsumption_index_features,
|
||||
"maximum number of features to be used for subsumption index.");
|
||||
p.register_unsigned_param("SPC_INITIAL_SUBSUMPTION_INDEX_OPT", m_initial_subsumption_index_opt,
|
||||
"after how many processed clauses the subsumption index is optimized.");
|
||||
p.register_double_param("SPC_FACTOR_SUBSUMPTION_INDEX_OPT", m_factor_subsumption_index_opt,
|
||||
"after each optimization the threshold for optimization is increased by this factor. See INITIAL_SUBSUMPTION_INDEX_OPT.");
|
||||
p.register_bool_param("SPC_BS", m_backward_subsumption, "Enable/disable backward subsumption in the superposition engine");
|
||||
p.register_bool_param("SPC_ES", m_equality_subsumption, "Enable/disable equality resolution in the superposition engine");
|
||||
p.register_unsigned_param("SPC_NUM_ITERATIONS", m_spc_num_iterations);
|
||||
p.register_bool_param("SPC_TRACE", m_spc_trace);
|
||||
}
|
||||
|
||||
|
49
src/old_params/spc_params.h
Normal file
49
src/old_params/spc_params.h
Normal file
|
@ -0,0 +1,49 @@
|
|||
/*++
|
||||
Copyright (c) 2006 Microsoft Corporation
|
||||
|
||||
Module Name:
|
||||
|
||||
spc_params.h
|
||||
|
||||
Abstract:
|
||||
|
||||
Parameters for the Superposition Calculus Engine
|
||||
|
||||
Author:
|
||||
|
||||
Leonardo de Moura (leonardo) 2008-02-08.
|
||||
|
||||
Revision History:
|
||||
|
||||
--*/
|
||||
#ifndef _SPC_PARAMS_H_
|
||||
#define _SPC_PARAMS_H_
|
||||
|
||||
#include"order_params.h"
|
||||
|
||||
struct spc_params : public order_params {
|
||||
unsigned m_min_func_freq_subsumption_index;
|
||||
unsigned m_max_subsumption_index_features;
|
||||
unsigned m_initial_subsumption_index_opt;
|
||||
double m_factor_subsumption_index_opt;
|
||||
bool m_backward_subsumption;
|
||||
bool m_equality_subsumption;
|
||||
unsigned m_spc_num_iterations;
|
||||
bool m_spc_trace;
|
||||
|
||||
spc_params():
|
||||
m_min_func_freq_subsumption_index(100),
|
||||
m_max_subsumption_index_features(32),
|
||||
m_initial_subsumption_index_opt(1000),
|
||||
m_factor_subsumption_index_opt(1.5),
|
||||
m_backward_subsumption(true),
|
||||
m_equality_subsumption(true),
|
||||
m_spc_num_iterations(1000),
|
||||
m_spc_trace(false) {
|
||||
}
|
||||
|
||||
void register_params(ini_params & p);
|
||||
};
|
||||
|
||||
#endif /* _SPC_PARAMS_H_ */
|
||||
|
76
src/old_params/theory_arith_params.cpp
Normal file
76
src/old_params/theory_arith_params.cpp
Normal file
|
@ -0,0 +1,76 @@
|
|||
/*++
|
||||
Copyright (c) 2006 Microsoft Corporation
|
||||
|
||||
Module Name:
|
||||
|
||||
theory_arith_params.cpp
|
||||
|
||||
Abstract:
|
||||
|
||||
<abstract>
|
||||
|
||||
Author:
|
||||
|
||||
Leonardo de Moura (leonardo) 2008-05-06.
|
||||
|
||||
Revision History:
|
||||
|
||||
--*/
|
||||
|
||||
#include"theory_arith_params.h"
|
||||
|
||||
void theory_arith_params::register_params(ini_params & p) {
|
||||
#ifdef _EXTERNAL_RELEASE
|
||||
p.register_int_param("ARITH_SOLVER", 0, 3, reinterpret_cast<int&>(m_arith_mode), "select arithmetic solver: 0 - no solver, 1 - bellman-ford based solver (diff. logic only), 2 - simplex based solver, 3 - floyd-warshall based solver (diff. logic only) and no theory combination");
|
||||
#else
|
||||
p.register_int_param("ARITH_SOLVER", 0, 4, reinterpret_cast<int&>(m_arith_mode), "select arithmetic solver: 0 - no solver, 1 - bellman-ford based solver (diff. logic only), 2 - simplex based solver, 3 - floyd-warshall based solver (diff. logic only) and no theory combination, 4 - model guided arith_solver");
|
||||
#endif
|
||||
p.register_bool_param("ARITH_FORCE_SIMPLEX", m_arith_auto_config_simplex, "force Z3 to use simplex solver.");
|
||||
p.register_unsigned_param("ARITH_BLANDS_RULE_THRESHOLD", m_arith_blands_rule_threshold);
|
||||
p.register_bool_param("ARITH_PROPAGATE_EQS", m_arith_propagate_eqs);
|
||||
p.register_int_param("ARITH_PROPAGATION_MODE", 0, 2, reinterpret_cast<int&>(m_arith_bound_prop));
|
||||
p.register_bool_param("ARITH_STRONGER_LEMMAS", m_arith_stronger_lemmas);
|
||||
p.register_bool_param("ARITH_SKIP_BIG_COEFFS", m_arith_skip_rows_with_big_coeffs);
|
||||
p.register_unsigned_param("ARITH_MAX_LEMMA_SIZE", m_arith_max_lemma_size);
|
||||
p.register_unsigned_param("ARITH_SMALL_LEMMA_SIZE", m_arith_small_lemma_size);
|
||||
p.register_bool_param("ARITH_REFLECT", m_arith_reflect);
|
||||
p.register_bool_param("ARITH_IGNORE_INT", m_arith_ignore_int);
|
||||
p.register_unsigned_param("ARITH_LAZY_PIVOTING", m_arith_lazy_pivoting_lvl);
|
||||
p.register_unsigned_param("ARITH_RANDOM_SEED", m_arith_random_seed);
|
||||
p.register_bool_param("ARITH_RANDOM_INITIAL_VALUE", m_arith_random_initial_value);
|
||||
p.register_int_param("ARITH_RANDOM_LOWER", m_arith_random_lower);
|
||||
p.register_int_param("ARITH_RANDOM_UPPER", m_arith_random_upper);
|
||||
p.register_bool_param("ARITH_ADAPTIVE", m_arith_adaptive);
|
||||
p.register_double_param("ARITH_ADAPTIVE_ASSERTION_THRESHOLD", m_arith_adaptive_assertion_threshold, "Delay arithmetic atoms if the num-arith-conflicts/total-conflicts < threshold");
|
||||
p.register_double_param("ARITH_ADAPTIVE_PROPAGATION_THRESHOLD", m_arith_adaptive_propagation_threshold, "Disable arithmetic theory propagation if the num-arith-conflicts/total-conflicts < threshold");
|
||||
p.register_bool_param("ARITH_DUMP_LEMMAS", m_arith_dump_lemmas);
|
||||
p.register_bool_param("ARITH_EAGER_EQ_AXIOMS", m_arith_eager_eq_axioms);
|
||||
p.register_unsigned_param("ARITH_BRANCH_CUT_RATIO", m_arith_branch_cut_ratio);
|
||||
|
||||
p.register_bool_param("ARITH_ADD_BINARY_BOUNDS", m_arith_add_binary_bounds);
|
||||
p.register_unsigned_param("ARITH_PROP_STRATEGY", 0, 1, reinterpret_cast<unsigned&>(m_arith_propagation_strategy), "Propagation strategy: 0 - use agility measures based on ration of theory conflicts, 1 - propagate proportional to ratio of theory conflicts (default)");
|
||||
|
||||
p.register_bool_param("ARITH_EQ_BOUNDS", m_arith_eq_bounds);
|
||||
p.register_bool_param("ARITH_LAZY_ADAPTER", m_arith_lazy_adapter);
|
||||
p.register_bool_param("ARITH_GCD_TEST", m_arith_gcd_test);
|
||||
p.register_bool_param("ARITH_EAGER_GCD", m_arith_eager_gcd);
|
||||
p.register_bool_param("ARITH_ADAPTIVE_GCD", m_arith_adaptive_gcd);
|
||||
p.register_unsigned_param("ARITH_PROPAGATION_THRESHOLD", m_arith_propagation_threshold);
|
||||
|
||||
p.register_bool_param("NL_ARITH", m_nl_arith, "enable/disable non linear arithmetic support. This option is ignored when ARITH_SOLVER != 2.");
|
||||
p.register_bool_param("NL_ARITH_GB", m_nl_arith_gb, "enable/disable Grobner Basis computation. This option is ignored when NL_ARITH=false");
|
||||
p.register_bool_param("NL_ARITH_GB_EQS", m_nl_arith_gb_eqs, "enable/disable equations in the Grobner Basis to be copied to the Simplex tableau.");
|
||||
p.register_bool_param("NL_ARITH_GB_PERTURBATE", m_nl_arith_gb_perturbate, "enable/disable perturbation of the variable order in GB when searching for new polynomials.");
|
||||
p.register_unsigned_param("NL_ARITH_GB_THRESHOLD", m_nl_arith_gb_threshold, "Grobner basis computation can be very expensive. This is a threshold on the number of new equalities that can be generated.");
|
||||
p.register_bool_param("NL_ARITH_BRANCHING", m_nl_arith_branching, "enable/disable branching on integer variables in non linear clusters");
|
||||
p.register_unsigned_param("NL_ARITH_ROUNDS", m_nl_arith_rounds, "threshold for number of (nested) final checks for non linear arithmetic.");
|
||||
p.register_unsigned_param("NL_ARITH_MAX_DEGREE", m_nl_arith_max_degree, "max degree for internalizing new monomials.");
|
||||
PRIVATE_PARAMS({
|
||||
p.register_bool_param("ARITH_FIXNUM", m_arith_fixnum);
|
||||
p.register_bool_param("ARITH_INT_ONLY", m_arith_int_only);
|
||||
p.register_bool_param("ARITH_ENUM_CONST_MOD", m_arith_enum_const_mod, "Create axioms for the finite set of equalities for (mod x k) where k is a positive numeral constant");
|
||||
p.register_bool_param("ARITH_INT_EQ_BRANCHING", m_arith_int_eq_branching, "Determine branch predicates based on integer equation solving");
|
||||
});
|
||||
p.register_bool_param("ARITH_EUCLIDEAN_SOLVER", m_arith_euclidean_solver, "");
|
||||
}
|
||||
|
158
src/old_params/theory_arith_params.h
Normal file
158
src/old_params/theory_arith_params.h
Normal file
|
@ -0,0 +1,158 @@
|
|||
/*++
|
||||
Copyright (c) 2006 Microsoft Corporation
|
||||
|
||||
Module Name:
|
||||
|
||||
theory_arith_params.h
|
||||
|
||||
Abstract:
|
||||
|
||||
<abstract>
|
||||
|
||||
Author:
|
||||
|
||||
Leonardo de Moura (leonardo) 2008-05-06.
|
||||
|
||||
Revision History:
|
||||
|
||||
--*/
|
||||
#ifndef _THEORY_ARITH_PARAMS_H_
|
||||
#define _THEORY_ARITH_PARAMS_H_
|
||||
|
||||
#include"ini_file.h"
|
||||
|
||||
enum arith_solver_id {
|
||||
AS_NO_ARITH,
|
||||
AS_DIFF_LOGIC,
|
||||
AS_ARITH,
|
||||
AS_DENSE_DIFF_LOGIC
|
||||
};
|
||||
|
||||
enum bound_prop_mode {
|
||||
BP_NONE,
|
||||
BP_SIMPLE, // only used for implying literals
|
||||
BP_REFINE // refine known bounds
|
||||
};
|
||||
|
||||
enum arith_prop_strategy {
|
||||
ARITH_PROP_AGILITY,
|
||||
ARITH_PROP_PROPORTIONAL
|
||||
};
|
||||
|
||||
enum arith_pivot_strategy {
|
||||
ARITH_PIVOT_SMALLEST,
|
||||
ARITH_PIVOT_GREATEST_ERROR,
|
||||
ARITH_PIVOT_LEAST_ERROR
|
||||
};
|
||||
|
||||
struct theory_arith_params {
|
||||
arith_solver_id m_arith_mode;
|
||||
bool m_arith_auto_config_simplex; //!< force simplex solver in auto_config
|
||||
unsigned m_arith_blands_rule_threshold;
|
||||
bool m_arith_propagate_eqs;
|
||||
bound_prop_mode m_arith_bound_prop;
|
||||
bool m_arith_stronger_lemmas;
|
||||
bool m_arith_skip_rows_with_big_coeffs;
|
||||
unsigned m_arith_max_lemma_size;
|
||||
unsigned m_arith_small_lemma_size;
|
||||
bool m_arith_reflect;
|
||||
bool m_arith_ignore_int;
|
||||
unsigned m_arith_lazy_pivoting_lvl;
|
||||
unsigned m_arith_random_seed;
|
||||
bool m_arith_random_initial_value;
|
||||
int m_arith_random_lower;
|
||||
int m_arith_random_upper;
|
||||
bool m_arith_adaptive;
|
||||
double m_arith_adaptive_assertion_threshold;
|
||||
double m_arith_adaptive_propagation_threshold;
|
||||
bool m_arith_dump_lemmas;
|
||||
bool m_arith_eager_eq_axioms;
|
||||
unsigned m_arith_branch_cut_ratio;
|
||||
bool m_arith_int_eq_branching;
|
||||
bool m_arith_enum_const_mod;
|
||||
|
||||
bool m_arith_gcd_test;
|
||||
bool m_arith_eager_gcd;
|
||||
bool m_arith_adaptive_gcd;
|
||||
unsigned m_arith_propagation_threshold;
|
||||
|
||||
arith_pivot_strategy m_arith_pivot_strategy;
|
||||
|
||||
// used in diff-logic
|
||||
bool m_arith_add_binary_bounds;
|
||||
arith_prop_strategy m_arith_propagation_strategy;
|
||||
|
||||
// used arith_eq_adapter
|
||||
bool m_arith_eq_bounds;
|
||||
bool m_arith_lazy_adapter;
|
||||
|
||||
// performance debugging flags
|
||||
bool m_arith_fixnum;
|
||||
bool m_arith_int_only;
|
||||
|
||||
// non linear support
|
||||
bool m_nl_arith;
|
||||
bool m_nl_arith_gb;
|
||||
unsigned m_nl_arith_gb_threshold;
|
||||
bool m_nl_arith_gb_eqs;
|
||||
bool m_nl_arith_gb_perturbate;
|
||||
unsigned m_nl_arith_max_degree;
|
||||
bool m_nl_arith_branching;
|
||||
unsigned m_nl_arith_rounds;
|
||||
|
||||
// euclidean solver for tighting bounds
|
||||
bool m_arith_euclidean_solver;
|
||||
|
||||
|
||||
theory_arith_params():
|
||||
m_arith_mode(AS_ARITH),
|
||||
m_arith_auto_config_simplex(false),
|
||||
m_arith_blands_rule_threshold(1000),
|
||||
m_arith_propagate_eqs(true),
|
||||
m_arith_bound_prop(BP_REFINE),
|
||||
m_arith_stronger_lemmas(true),
|
||||
m_arith_skip_rows_with_big_coeffs(true),
|
||||
m_arith_max_lemma_size(128),
|
||||
m_arith_small_lemma_size(16),
|
||||
m_arith_reflect(true),
|
||||
m_arith_ignore_int(false),
|
||||
m_arith_lazy_pivoting_lvl(0),
|
||||
m_arith_random_seed(0),
|
||||
m_arith_random_initial_value(false),
|
||||
m_arith_random_lower(-1000),
|
||||
m_arith_random_upper(1000),
|
||||
m_arith_adaptive(false),
|
||||
m_arith_adaptive_assertion_threshold(0.2),
|
||||
m_arith_adaptive_propagation_threshold(0.4),
|
||||
m_arith_dump_lemmas(false),
|
||||
m_arith_eager_eq_axioms(true),
|
||||
m_arith_branch_cut_ratio(2),
|
||||
m_arith_int_eq_branching(false),
|
||||
m_arith_enum_const_mod(false),
|
||||
m_arith_gcd_test(true),
|
||||
m_arith_eager_gcd(false),
|
||||
m_arith_adaptive_gcd(false),
|
||||
m_arith_propagation_threshold(UINT_MAX),
|
||||
m_arith_pivot_strategy(ARITH_PIVOT_SMALLEST),
|
||||
m_arith_add_binary_bounds(false),
|
||||
m_arith_propagation_strategy(ARITH_PROP_PROPORTIONAL),
|
||||
m_arith_eq_bounds(false),
|
||||
m_arith_lazy_adapter(false),
|
||||
m_arith_fixnum(false),
|
||||
m_arith_int_only(false),
|
||||
m_nl_arith(true),
|
||||
m_nl_arith_gb(true),
|
||||
m_nl_arith_gb_threshold(512),
|
||||
m_nl_arith_gb_eqs(false),
|
||||
m_nl_arith_gb_perturbate(true),
|
||||
m_nl_arith_max_degree(6),
|
||||
m_nl_arith_branching(true),
|
||||
m_nl_arith_rounds(1024),
|
||||
m_arith_euclidean_solver(false) {
|
||||
}
|
||||
|
||||
void register_params(ini_params & p);
|
||||
};
|
||||
|
||||
#endif /* _THEORY_ARITH_PARAMS_H_ */
|
||||
|
76
src/old_params/theory_array_params.h
Normal file
76
src/old_params/theory_array_params.h
Normal file
|
@ -0,0 +1,76 @@
|
|||
/*++
|
||||
Copyright (c) 2006 Microsoft Corporation
|
||||
|
||||
Module Name:
|
||||
|
||||
theory_array_params.h
|
||||
|
||||
Abstract:
|
||||
|
||||
<abstract>
|
||||
|
||||
Author:
|
||||
|
||||
Leonardo de Moura (leonardo) 2008-06-01.
|
||||
|
||||
Revision History:
|
||||
|
||||
--*/
|
||||
#ifndef _THEORY_ARRAY_PARAMS_H_
|
||||
#define _THEORY_ARRAY_PARAMS_H_
|
||||
|
||||
#include"ini_file.h"
|
||||
|
||||
enum array_solver_id {
|
||||
AR_NO_ARRAY,
|
||||
AR_SIMPLE,
|
||||
AR_MODEL_BASED,
|
||||
AR_FULL
|
||||
};
|
||||
|
||||
struct theory_array_params {
|
||||
array_solver_id m_array_mode;
|
||||
bool m_array_weak;
|
||||
bool m_array_extensional;
|
||||
unsigned m_array_laziness;
|
||||
bool m_array_delay_exp_axiom;
|
||||
bool m_array_cg;
|
||||
bool m_array_always_prop_upward;
|
||||
bool m_array_lazy_ieq;
|
||||
unsigned m_array_lazy_ieq_delay;
|
||||
bool m_array_canonize_simplify;
|
||||
bool m_array_simplify; // temporary hack for disabling array simplifier plugin.
|
||||
|
||||
theory_array_params():
|
||||
m_array_mode(AR_FULL),
|
||||
m_array_weak(false),
|
||||
m_array_extensional(true),
|
||||
m_array_laziness(1),
|
||||
m_array_delay_exp_axiom(true),
|
||||
m_array_cg(false),
|
||||
m_array_always_prop_upward(true), // UPWARDs filter is broken... TODO: fix it
|
||||
m_array_lazy_ieq(false),
|
||||
m_array_lazy_ieq_delay(10),
|
||||
m_array_canonize_simplify(false),
|
||||
m_array_simplify(true) {
|
||||
}
|
||||
|
||||
void register_params(ini_params & p) {
|
||||
p.register_int_param("ARRAY_SOLVER", 0, 3, reinterpret_cast<int&>(m_array_mode), "0 - no array, 1 - simple, 2 - model based, 3 - full");
|
||||
p.register_bool_param("ARRAY_WEAK", m_array_weak);
|
||||
p.register_bool_param("ARRAY_EXTENSIONAL", m_array_extensional);
|
||||
p.register_unsigned_param("ARRAY_LAZINESS", m_array_laziness);
|
||||
p.register_bool_param("ARRAY_DELAY_EXP_AXIOM", m_array_delay_exp_axiom);
|
||||
p.register_bool_param("ARRAY_CG", m_array_cg);
|
||||
p.register_bool_param("ARRAY_ALWAYS_PROP_UPWARD", m_array_always_prop_upward,
|
||||
"Disable the built-in filter upwards propagation");
|
||||
p.register_bool_param("ARRAY_LAZY_IEQ", m_array_lazy_ieq);
|
||||
p.register_unsigned_param("ARRAY_LAZY_IEQ_DELAY", m_array_lazy_ieq_delay);
|
||||
p.register_bool_param("ARRAY_CANONIZE", m_array_canonize_simplify,
|
||||
"Normalize arrays into normal form during simplification");
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
#endif /* _THEORY_ARRAY_PARAMS_H_ */
|
||||
|
55
src/old_params/theory_bv_params.h
Normal file
55
src/old_params/theory_bv_params.h
Normal file
|
@ -0,0 +1,55 @@
|
|||
/*++
|
||||
Copyright (c) 2006 Microsoft Corporation
|
||||
|
||||
Module Name:
|
||||
|
||||
theory_bv_params.h
|
||||
|
||||
Abstract:
|
||||
|
||||
<abstract>
|
||||
|
||||
Author:
|
||||
|
||||
Leonardo de Moura (leonardo) 2008-06-06.
|
||||
|
||||
Revision History:
|
||||
|
||||
--*/
|
||||
#ifndef _THEORY_BV_PARAMS_H_
|
||||
#define _THEORY_BV_PARAMS_H_
|
||||
|
||||
#include"ini_file.h"
|
||||
|
||||
enum bv_solver_id {
|
||||
BS_NO_BV,
|
||||
BS_BLASTER
|
||||
};
|
||||
|
||||
struct theory_bv_params {
|
||||
bv_solver_id m_bv_mode;
|
||||
bool m_bv_reflect;
|
||||
bool m_bv_lazy_le;
|
||||
bool m_bv_cc;
|
||||
unsigned m_bv_blast_max_size;
|
||||
bool m_bv_enable_int2bv2int;
|
||||
theory_bv_params():
|
||||
m_bv_mode(BS_BLASTER),
|
||||
m_bv_reflect(true),
|
||||
m_bv_lazy_le(false),
|
||||
m_bv_cc(false),
|
||||
m_bv_blast_max_size(INT_MAX),
|
||||
m_bv_enable_int2bv2int(false) {}
|
||||
void register_params(ini_params & p) {
|
||||
p.register_int_param("BV_SOLVER", 0, 2, reinterpret_cast<int&>(m_bv_mode), "0 - no bv, 1 - simple");
|
||||
p.register_unsigned_param("BV_BLAST_MAX_SIZE", m_bv_blast_max_size, "Maximal size for bit-vectors to blast");
|
||||
p.register_bool_param("BV_REFLECT", m_bv_reflect);
|
||||
p.register_bool_param("BV_LAZY_LE", m_bv_lazy_le);
|
||||
p.register_bool_param("BV_CC", m_bv_cc, "enable congruence closure for BV operators");
|
||||
p.register_bool_param("BV_ENABLE_INT2BV_PROPAGATION", m_bv_enable_int2bv2int,
|
||||
"enable full (potentially expensive) propagation for int2bv and bv2int");
|
||||
}
|
||||
};
|
||||
|
||||
#endif /* _THEORY_BV_PARAMS_H_ */
|
||||
|
38
src/old_params/theory_datatype_params.h
Normal file
38
src/old_params/theory_datatype_params.h
Normal file
|
@ -0,0 +1,38 @@
|
|||
/*++
|
||||
Copyright (c) 2006 Microsoft Corporation
|
||||
|
||||
Module Name:
|
||||
|
||||
theory_datatype_params.h
|
||||
|
||||
Abstract:
|
||||
|
||||
<abstract>
|
||||
|
||||
Author:
|
||||
|
||||
Leonardo de Moura (leonardo) 2008-11-04.
|
||||
|
||||
Revision History:
|
||||
|
||||
--*/
|
||||
#ifndef _THEORY_DATATYPE_PARAMS_H_
|
||||
#define _THEORY_DATATYPE_PARAMS_H_
|
||||
|
||||
#include"ini_file.h"
|
||||
|
||||
struct theory_datatype_params {
|
||||
unsigned m_dt_lazy_splits;
|
||||
|
||||
theory_datatype_params():
|
||||
m_dt_lazy_splits(1) {
|
||||
}
|
||||
|
||||
void register_params(ini_params & p) {
|
||||
p.register_unsigned_param("DT_LAZY_SPLITS", m_dt_lazy_splits, "How lazy datatype splits are performed: 0- eager, 1- lazy for infinite types, 2- lazy");
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
#endif /* _THEORY_DATATYPE_PARAMS_H_ */
|
||||
|
30
src/old_params/z3_solver_params.cpp
Normal file
30
src/old_params/z3_solver_params.cpp
Normal file
|
@ -0,0 +1,30 @@
|
|||
/*++
|
||||
Copyright (c) 2006 Microsoft Corporation
|
||||
|
||||
Module Name:
|
||||
|
||||
z3_solver_params.cpp
|
||||
|
||||
Abstract:
|
||||
|
||||
<abstract>
|
||||
|
||||
Author:
|
||||
|
||||
Leonardo de Moura (leonardo) 2007-06-11.
|
||||
|
||||
Revision History:
|
||||
|
||||
--*/
|
||||
|
||||
#include"z3_solver_params.h"
|
||||
|
||||
void z3_solver_params::register_params(ini_params & p) {
|
||||
p.register_bool_param("Z3_SOLVER_LL_PP", m_ast_ll_pp, "pretty print asserted constraints using low-level printer (Z3 input format specific)");
|
||||
p.register_bool_param("Z3_SOLVER_SMT_PP", m_ast_smt_pp, "pretty print asserted constraints using SMT printer (Z3 input format specific)");
|
||||
p.register_bool_param("PRE_SIMPLIFY_EXPR", m_pre_simplify_expr, "pre-simplify expressions when created over the API (example: -x -> (* -1 x))");
|
||||
p.register_string_param("SMTLIB_TRACE_PATH", m_smtlib_trace_path, "path for converting Z3 formulas to SMTLIB benchmarks");
|
||||
p.register_string_param("SMTLIB_SOURCE_INFO", m_smtlib_source_info, "additional source info to add to SMTLIB benchmark");
|
||||
p.register_string_param("SMTLIB_CATEGORY", m_smtlib_category, "additional category info to add to SMTLIB benchmark");
|
||||
}
|
||||
|
44
src/old_params/z3_solver_params.h
Normal file
44
src/old_params/z3_solver_params.h
Normal file
|
@ -0,0 +1,44 @@
|
|||
/*++
|
||||
Copyright (c) 2006 Microsoft Corporation
|
||||
|
||||
Module Name:
|
||||
|
||||
z3_solver_params.h
|
||||
|
||||
Abstract:
|
||||
|
||||
<abstract>
|
||||
|
||||
Author:
|
||||
|
||||
Leonardo de Moura (leonardo) 2007-06-11.
|
||||
|
||||
Revision History:
|
||||
|
||||
--*/
|
||||
#ifndef _Z3_SOLVER_PARAMS_H_
|
||||
#define _Z3_SOLVER_PARAMS_H_
|
||||
|
||||
#include"ini_file.h"
|
||||
|
||||
struct z3_solver_params {
|
||||
bool m_ast_ll_pp;
|
||||
bool m_ast_smt_pp;
|
||||
bool m_pre_simplify_expr;
|
||||
std::string m_smtlib_trace_path;
|
||||
std::string m_smtlib_source_info;
|
||||
std::string m_smtlib_category;
|
||||
|
||||
z3_solver_params():
|
||||
m_ast_ll_pp(false),
|
||||
m_ast_smt_pp(false),
|
||||
m_pre_simplify_expr(false),
|
||||
m_smtlib_trace_path(""),
|
||||
m_smtlib_source_info(""),
|
||||
m_smtlib_category("")
|
||||
{}
|
||||
void register_params(ini_params & p);
|
||||
};
|
||||
|
||||
#endif /* _Z3_SOLVER_PARAMS_H_ */
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue