cout << SetBenchmarkLogicCommand(logicinfo.getLogicString()) << endl;
}
} else {
- logicinfo.enableTheory(theory::THEORY_ARRAY);
+ logicinfo.enableTheory(theory::THEORY_ARRAYS);
// we print logic string only for Quantifiers, for Z3 stuff
// we don't set the logic
}
throw IllegalArgumentException("", "k", __PRETTY_FUNCTION__, "bad type constant");
}
+std::string getStatsPrefix(TheoryId theoryId) {
+ switch(theoryId) {
+${theory_stats_prefixes}
+#line 98 "${template}"
+ default:
+ break;
+ }
+ return "unknown";
+}
+
}/* CVC4::theory namespace */
}/* CVC4 namespace */
std::ostream& operator<<(std::ostream& out, TheoryId theoryId);
TheoryId kindToTheoryId(::CVC4::Kind k) CVC4_PUBLIC;
TheoryId typeConstantToTheoryId(::CVC4::TypeConstant typeConstant) CVC4_PUBLIC;
+std::string getStatsPrefix(TheoryId theoryId) CVC4_PUBLIC;
}/* CVC4::theory namespace */
}/* CVC4 namespace */
theory_enum=
theory_descriptions=
+theory_stats_prefixes=
function theory {
# theory ID T header
theory_enum="${theory_enum} $1,
"
theory_descriptions="${theory_descriptions} case ${theory_id}: out << \"${theory_id}\"; break;
+"
+ prefix=$(echo "$theory_id" | tr '[:upper:]' '[:lower:]')
+ theory_stats_prefixes="${theory_stats_prefixes} case ${theory_id}: return \"theory::${prefix#theory_}\"; break;
"
}
type_constant_groundterms \
type_properties_includes \
theory_descriptions \
+ theory_stats_prefixes \
template \
; do
eval text="\${text//\\\$\\{$var\\}/\${$var}}"
std::getline(iss, statName, ',');
- while( !iss.eof() ) {
-
+ while (!iss.eof())
+ {
std::getline(iss, statValue, '\n');
- double curFloat;
- std::istringstream iss_stat_value (statValue);
- iss_stat_value >> curFloat;
- bool isFloat = iss_stat_value.good();
+ bool skip = false;
+ try
+ {
+ double dval = std::stod(statValue);
+ skip = (dval == 0.0);
+ }
+ // Value can not be converted, don't skip
+ catch (const std::invalid_argument&) {}
+ catch (const std::out_of_range&) {}
- if( (isFloat && curFloat == 0) ||
- statValue == " \"0\"" ||
- statValue == " \"[]\"") {
- // skip
- } else {
+ skip = skip || (statValue == " \"0\"" || statValue == " \"[]\"");
+
+ if (!skip)
+ {
out << statName << "," << statValue << std::endl;
}
std::getline(iss, statName, ',');
}
-
}
void CommandExecutor::flushOutputStreams() {
bool Smt2::isTheoryEnabled(Theory theory) const {
switch(theory) {
case THEORY_ARRAYS:
- return d_logic.isTheoryEnabled(theory::THEORY_ARRAY);
+ return d_logic.isTheoryEnabled(theory::THEORY_ARRAYS);
case THEORY_BITVECTORS:
return d_logic.isTheoryEnabled(theory::THEORY_BV);
case THEORY_CORE:
}
}
- if(d_logic.isTheoryEnabled(theory::THEORY_ARRAY)) {
+ if(d_logic.isTheoryEnabled(theory::THEORY_ARRAYS)) {
addTheory(THEORY_ARRAYS);
}
}
void LFSCArrayProof::printOwnedTerm(Expr term, std::ostream& os, const ProofLetMap& map) {
- Assert (theory::Theory::theoryOf(term) == theory::THEORY_ARRAY);
+ Assert (theory::Theory::theoryOf(term) == theory::THEORY_ARRAYS);
- if (theory::Theory::theoryOf(term) != theory::THEORY_ARRAY) {
+ if (theory::Theory::theoryOf(term) != theory::THEORY_ARRAYS) {
// We can get here, for instance, if there's a (select ite ...), e.g. a non-array term
// hiding as a subterm of an array term. In that case, send it back to the dispatcher.
d_proofEngine->printBoundTerm(term, os, map);
ArrayProof* ProofManager::getArrayProof() {
Assert (options::proof());
- TheoryProof* pf = getTheoryProofEngine()->getTheoryProof(theory::THEORY_ARRAY);
+ TheoryProof* pf = getTheoryProofEngine()->getTheoryProof(theory::THEORY_ARRAYS);
return (ArrayProof*)pf;
}
return;
}
- if (id == theory::THEORY_ARRAY) {
+ if (id == theory::THEORY_ARRAYS) {
d_theoryProofTable[id] = new LFSCArrayProof((theory::arrays::TheoryArrays*)th, this);
return;
}
// A special case: the array theory needs to know of every skolem, even if
// it belongs to another theory (e.g., a BV skolem)
- if (ProofManager::getSkolemizationManager()->isSkolem(term) && theory_id != theory::THEORY_ARRAY) {
+ if (ProofManager::getSkolemizationManager()->isSkolem(term) && theory_id != theory::THEORY_ARRAYS) {
Debug("pf::tp::register") << "TheoryProofEngine::registerTerm: registering a non-array skolem: " << term << std::endl;
- getTheoryProof(theory::THEORY_ARRAY)->registerTerm(term);
+ getTheoryProof(theory::THEORY_ARRAYS)->registerTerm(term);
}
d_registrationCache.insert(term);
}
if (type.isArray()) {
- getTheoryProof(theory::THEORY_ARRAY)->printOwnedSort(type, os);
+ getTheoryProof(theory::THEORY_ARRAYS)->printOwnedSort(type, os);
return;
}
th = new theory::uf::TheoryUF(&fakeContext, &fakeContext, oc, v,
ProofManager::currentPM()->getLogicInfo(),
"replay::");
- } else if (d_theory->getId()==theory::THEORY_ARRAY) {
+ } else if (d_theory->getId()==theory::THEORY_ARRAYS) {
th = new theory::arrays::TheoryArrays(&fakeContext, &fakeContext, oc, v,
ProofManager::currentPM()->getLogicInfo(),
"replay::");
}
bool TheoryProofEngine::supportedTheory(theory::TheoryId id) {
- return (id == theory::THEORY_ARRAY ||
+ return (id == theory::THEORY_ARRAYS ||
id == theory::THEORY_ARITH ||
id == theory::THEORY_BV ||
id == theory::THEORY_UF ||
BVMinisatSatSolver::Statistics::Statistics(StatisticsRegistry* registry,
const std::string& prefix)
: d_registry(registry),
- d_statStarts("theory::bv::" + prefix + "bvminisat::starts"),
- d_statDecisions("theory::bv::" + prefix + "bvminisat::decisions"),
- d_statRndDecisions("theory::bv::" + prefix + "bvminisat::rnd_decisions"),
- d_statPropagations("theory::bv::" + prefix + "bvminisat::propagations"),
- d_statConflicts("theory::bv::" + prefix + "bvminisat::conflicts"),
- d_statClausesLiterals("theory::bv::" + prefix
- + "bvminisat::clauses_literals"),
- d_statLearntsLiterals("theory::bv::" + prefix
- + "bvminisat::learnts_literals"),
- d_statMaxLiterals("theory::bv::" + prefix + "bvminisat::max_literals"),
- d_statTotLiterals("theory::bv::" + prefix + "bvminisat::tot_literals"),
- d_statEliminatedVars("theory::bv::" + prefix
- + "bvminisat::eliminated_vars"),
- d_statCallsToSolve("theory::bv::" + prefix
- + "bvminisat::calls_to_solve", 0),
- d_statSolveTime("theory::bv::" + prefix + "bvminisat::solve_time"),
+ d_statStarts(prefix + "::bvminisat::starts"),
+ d_statDecisions(prefix + "::bvminisat::decisions"),
+ d_statRndDecisions(prefix + "::bvminisat::rnd_decisions"),
+ d_statPropagations(prefix + "::bvminisat::propagations"),
+ d_statConflicts(prefix + "::bvminisat::conflicts"),
+ d_statClausesLiterals(prefix + "::bvminisat::clauses_literals"),
+ d_statLearntsLiterals(prefix + "::bvminisat::learnts_literals"),
+ d_statMaxLiterals(prefix + "::bvminisat::max_literals"),
+ d_statTotLiterals(prefix + "::bvminisat::tot_literals"),
+ d_statEliminatedVars(prefix + "::bvminisat::eliminated_vars"),
+ d_statCallsToSolve(prefix + "::bvminisat::calls_to_solve", 0),
+ d_statSolveTime(prefix + "::bvminisat::solve_time"),
d_registerStats(!prefix.empty())
{
if (!d_registerStats)
d_logic = log;
d_logic.lock();
}
- if(d_logic.isTheoryEnabled(THEORY_ARRAY) || d_logic.isTheoryEnabled(THEORY_DATATYPES) || d_logic.isTheoryEnabled(THEORY_SETS)) {
+ if(d_logic.isTheoryEnabled(THEORY_ARRAYS) || d_logic.isTheoryEnabled(THEORY_DATATYPES) || d_logic.isTheoryEnabled(THEORY_SETS)) {
if(!d_logic.isTheoryEnabled(THEORY_UF)) {
LogicInfo log(d_logic.getUnlockedCopy());
Trace("smt") << "because a theory that permits Boolean terms is enabled, also enabling UF" << endl;
}
// If in arrays, set the UF handler to arrays
- if(d_logic.isTheoryEnabled(THEORY_ARRAY) && ( !d_logic.isQuantified() ||
+ if(d_logic.isTheoryEnabled(THEORY_ARRAYS) && ( !d_logic.isQuantified() ||
(d_logic.isQuantified() && !d_logic.isTheoryEnabled(THEORY_UF)))) {
- Theory::setUninterpretedSortOwner(THEORY_ARRAY);
+ Theory::setUninterpretedSortOwner(THEORY_ARRAYS);
} else {
Theory::setUninterpretedSortOwner(THEORY_UF);
}
// QF_LIA logics. --K [2014/10/15]
if(! options::doITESimp.wasSetByUser()) {
bool qf_aufbv = !d_logic.isQuantified() &&
- d_logic.isTheoryEnabled(THEORY_ARRAY) &&
+ d_logic.isTheoryEnabled(THEORY_ARRAYS) &&
d_logic.isTheoryEnabled(THEORY_UF) &&
d_logic.isTheoryEnabled(THEORY_BV);
bool qf_lia = !d_logic.isQuantified() &&
}
if(! options::simplifyWithCareEnabled.wasSetByUser() ){
bool qf_aufbv = !d_logic.isQuantified() &&
- d_logic.isTheoryEnabled(THEORY_ARRAY) &&
+ d_logic.isTheoryEnabled(THEORY_ARRAYS) &&
d_logic.isTheoryEnabled(THEORY_UF) &&
d_logic.isTheoryEnabled(THEORY_BV);
// Turn off array eager index splitting for QF_AUFLIA
if(! options::arraysEagerIndexSplitting.wasSetByUser()) {
if (not d_logic.isQuantified() &&
- d_logic.isTheoryEnabled(THEORY_ARRAY) &&
+ d_logic.isTheoryEnabled(THEORY_ARRAYS) &&
d_logic.isTheoryEnabled(THEORY_UF) &&
d_logic.isTheoryEnabled(THEORY_ARITH)) {
Trace("smt") << "setting array eager index splitting to false" << endl;
// Turn on model-based arrays for QF_AX (unless models are enabled)
// if(! options::arraysModelBased.wasSetByUser()) {
// if (not d_logic.isQuantified() &&
- // d_logic.isTheoryEnabled(THEORY_ARRAY) &&
- // d_logic.isPure(THEORY_ARRAY) &&
+ // d_logic.isTheoryEnabled(THEORY_ARRAYS) &&
+ // d_logic.isPure(THEORY_ARRAYS) &&
// !options::produceModels() &&
// !options::checkModels()) {
// Trace("smt") << "turning on model-based array solver" << endl;
// Turn on multiple-pass non-clausal simplification for QF_AUFBV
if(! options::repeatSimp.wasSetByUser()) {
bool repeatSimp = !d_logic.isQuantified() &&
- (d_logic.isTheoryEnabled(THEORY_ARRAY) &&
+ (d_logic.isTheoryEnabled(THEORY_ARRAYS) &&
d_logic.isTheoryEnabled(THEORY_UF) &&
d_logic.isTheoryEnabled(THEORY_BV)) &&
!options::unsatCores();
!options::produceAssignments() &&
!options::checkModels() &&
!options::unsatCores() &&
- (d_logic.isTheoryEnabled(THEORY_ARRAY) && d_logic.isTheoryEnabled(THEORY_BV));
+ (d_logic.isTheoryEnabled(THEORY_ARRAYS) && d_logic.isTheoryEnabled(THEORY_BV));
Trace("smt") << "setting unconstrained simplification to " << uncSimp << endl;
options::unconstrainedSimp.set(uncSimp);
}
}
if (! options::bvEagerExplanations.wasSetByUser() &&
- d_logic.isTheoryEnabled(THEORY_ARRAY) &&
+ d_logic.isTheoryEnabled(THEORY_ARRAYS) &&
d_logic.isTheoryEnabled(THEORY_BV)) {
Trace("smt") << "enabling eager bit-vector explanations " << endl;
options::bvEagerExplanations.set(true);
) ||
// QF_AUFBV or QF_ABV or QF_UFBV
(not d_logic.isQuantified() &&
- (d_logic.isTheoryEnabled(THEORY_ARRAY) ||
+ (d_logic.isTheoryEnabled(THEORY_ARRAYS) ||
d_logic.isTheoryEnabled(THEORY_UF)) &&
d_logic.isTheoryEnabled(THEORY_BV)
) ||
// QF_AUFLIA (and may be ends up enabling QF_AUFLRA?)
(not d_logic.isQuantified() &&
- d_logic.isTheoryEnabled(THEORY_ARRAY) &&
+ d_logic.isTheoryEnabled(THEORY_ARRAYS) &&
d_logic.isTheoryEnabled(THEORY_UF) &&
d_logic.isTheoryEnabled(THEORY_ARITH)
) ||
d_logic.hasEverything() || d_logic.isTheoryEnabled(THEORY_STRINGS) ? false :
( // QF_AUFLIA
(not d_logic.isQuantified() &&
- d_logic.isTheoryEnabled(THEORY_ARRAY) &&
+ d_logic.isTheoryEnabled(THEORY_ARRAYS) &&
d_logic.isTheoryEnabled(THEORY_UF) &&
d_logic.isTheoryEnabled(THEORY_ARITH)
) ||
# src/theory/builtin/kinds.
#
-theory THEORY_ARRAY ::CVC4::theory::arrays::TheoryArrays "theory/arrays/theory_arrays.h"
+theory THEORY_ARRAYS ::CVC4::theory::arrays::TheoryArrays "theory/arrays/theory_arrays.h"
typechecker "theory/arrays/theory_arrays_type_rules.h"
properties polite stable-infinite parametric
TheoryArrays::TheoryArrays(context::Context* c, context::UserContext* u,
OutputChannel& out, Valuation valuation,
const LogicInfo& logicInfo, std::string name)
- : Theory(THEORY_ARRAY, c, u, out, valuation, logicInfo, name),
+ : Theory(THEORY_ARRAYS, c, u, out, valuation, logicInfo, name),
d_numRow(name + "theory::arrays::number of Row lemmas", 0),
d_numExt(name + "theory::arrays::number of Ext lemmas", 0),
d_numProp(name + "theory::arrays::number of propagations", 0),
d_numGetModelValConflicts(name + "theory::arrays::number of getModelVal conflicts", 0),
d_numSetModelValSplits(name + "theory::arrays::number of setModelVal splits", 0),
d_numSetModelValConflicts(name + "theory::arrays::number of setModelVal conflicts", 0),
- d_ppEqualityEngine(u, name + "theory::arrays::TheoryArraysPP" , true),
+ d_ppEqualityEngine(u, name + "theory::arrays::pp" , true),
d_ppFacts(u),
// d_ppCache(u),
d_literalsToPropagate(c),
d_literalsToPropagateIndex(c, 0),
d_isPreRegistered(c),
- d_mayEqualEqualityEngine(c, name + "theory::arrays::TheoryArraysMayEqual", true),
+ d_mayEqualEqualityEngine(c, name + "theory::arrays::mayEqual", true),
d_notify(*this),
- d_equalityEngine(d_notify, c, name + "theory::arrays::TheoryArrays", true),
+ d_equalityEngine(d_notify, c, name + "theory::arrays", true),
d_conflict(c, false),
d_backtracker(c),
d_infoMap(c, &d_backtracker, name),
if (node.getType().isArray()) {
d_mayEqualEqualityEngine.addTerm(node);
- d_equalityEngine.addTriggerTerm(node, THEORY_ARRAY);
+ d_equalityEngine.addTriggerTerm(node, THEORY_ARRAYS);
}
else {
d_equalityEngine.addTerm(node);
if (d_equalityEngine.hasTerm(node)) {
break;
}
- d_equalityEngine.addTriggerTerm(node, THEORY_ARRAY);
+ d_equalityEngine.addTriggerTerm(node, THEORY_ARRAYS);
TNode a = d_equalityEngine.getRepresentative(node[0]);
d_infoMap.setConstArr(node, node);
d_mayEqualEqualityEngine.addTerm(node);
Assert(d_mayEqualEqualityEngine.getRepresentative(node) == node);
- d_equalityEngine.addTriggerTerm(node, THEORY_ARRAY);
+ d_equalityEngine.addTriggerTerm(node, THEORY_ARRAYS);
d_defValues[node] = defaultValue;
break;
}
if (node.getType().isArray()) {
// The may equal needs the node
d_mayEqualEqualityEngine.addTerm(node);
- d_equalityEngine.addTriggerTerm(node, THEORY_ARRAY);
+ d_equalityEngine.addTriggerTerm(node, THEORY_ARRAYS);
Assert(d_equalityEngine.getSize(node) == 1);
}
else {
void TheoryArrays::addSharedTerm(TNode t) {
Debug("arrays::sharing") << spaces(getSatContext()->getLevel()) << "TheoryArrays::addSharedTerm(" << t << ")" << std::endl;
- d_equalityEngine.addTriggerTerm(t, THEORY_ARRAY);
+ d_equalityEngine.addTriggerTerm(t, THEORY_ARRAYS);
if (t.getType().isArray()) {
d_sharedArrays.insert(t);
}
TNode x = r1[1];
TNode y = r2[1];
- Assert(d_equalityEngine.isTriggerTerm(x, THEORY_ARRAY));
+ Assert(d_equalityEngine.isTriggerTerm(x, THEORY_ARRAYS));
if (d_equalityEngine.hasTerm(x) && d_equalityEngine.hasTerm(y) &&
(d_equalityEngine.areEqual(x,y) || d_equalityEngine.areDisequal(x,y,false))) {
}
}
- if (!d_equalityEngine.isTriggerTerm(y, THEORY_ARRAY)) {
+ if (!d_equalityEngine.isTriggerTerm(y, THEORY_ARRAYS)) {
Debug("arrays::sharing") << "TheoryArrays::computeCareGraph(): not connected to shared terms, skipping" << std::endl;
return;
}
// Get representative trigger terms
- TNode x_shared = d_equalityEngine.getTriggerTermRepresentative(x, THEORY_ARRAY);
- TNode y_shared = d_equalityEngine.getTriggerTermRepresentative(y, THEORY_ARRAY);
+ TNode x_shared = d_equalityEngine.getTriggerTermRepresentative(x, THEORY_ARRAYS);
+ TNode y_shared = d_equalityEngine.getTriggerTermRepresentative(y, THEORY_ARRAYS);
EqualityStatus eqStatusDomain = d_valuation.getEqualityStatus(x_shared, y_shared);
switch (eqStatusDomain) {
case EQUALITY_TRUE_AND_PROPAGATED:
Assert(d_equalityEngine.hasTerm(r1));
TNode x = r1[1];
- if (!d_equalityEngine.isTriggerTerm(x, THEORY_ARRAY)) {
+ if (!d_equalityEngine.isTriggerTerm(x, THEORY_ARRAYS)) {
Debug("arrays::sharing") << "TheoryArrays::computeCareGraph(): not connected to shared terms, skipping" << std::endl;
continue;
}
- Node x_shared = d_equalityEngine.getTriggerTermRepresentative(x, THEORY_ARRAY);
+ Node x_shared = d_equalityEngine.getTriggerTermRepresentative(x, THEORY_ARRAYS);
// Get the model value of index and find all reads that read from that same model value: these are the pairs we have to check
// Also, insert this read in the list at the proper index
}
AbstractionModule::Statistics::Statistics(const std::string& name)
- : d_numFunctionsAbstracted(name + "theory::bv::AbstractioModule::NumFunctionsAbstracted", 0)
- , d_numArgsSkolemized(name + "theory::bv::AbstractioModule::NumArgsSkolemized", 0)
- , d_abstractionTime(name + "theory::bv::AbstractioModule::AbstractionTime")
+ : d_numFunctionsAbstracted(name + "::abstraction::NumFunctionsAbstracted",
+ 0),
+ d_numArgsSkolemized(name + "::abstraction::NumArgsSkolemized", 0),
+ d_abstractionTime(name + "::abstraction::AbstractionTime")
{
smtStatisticsRegistry()->registerStat(&d_numFunctionsAbstracted);
smtStatisticsRegistry()->registerStat(&d_numArgsSkolemized);
}
QuickXPlain::Statistics::Statistics(const std::string& name)
- : d_xplainTime("theory::bv::"+name+"::QuickXplain::Time")
- , d_numSolved("theory::bv::"+name+"::QuickXplain::NumSolved", 0)
- , d_numUnknown("theory::bv::"+name+"::QuickXplain::NumUnknown", 0)
- , d_numUnknownWasUnsat("theory::bv::"+name+"::QuickXplain::NumUnknownWasUnsat", 0)
- , d_numConflictsMinimized("theory::bv::"+name+"::QuickXplain::NumConflictsMinimized", 0)
- , d_finalPeriod("theory::bv::"+name+"::QuickXplain::FinalPeriod", 0)
- , d_avgMinimizationRatio("theory::bv::"+name+"::QuickXplain::AvgMinRatio")
+ : d_xplainTime(name + "::QuickXplain::Time")
+ , d_numSolved(name + "::QuickXplain::NumSolved", 0)
+ , d_numUnknown(name + "::QuickXplain::NumUnknown", 0)
+ , d_numUnknownWasUnsat(name + "::QuickXplain::NumUnknownWasUnsat", 0)
+ , d_numConflictsMinimized(name + "::QuickXplain::NumConflictsMinimized", 0)
+ , d_finalPeriod(name + "::QuickXplain::FinalPeriod", 0)
+ , d_avgMinimizationRatio(name + "::QuickXplain::AvgMinRatio")
{
smtStatisticsRegistry()->registerStat(&d_xplainTime);
smtStatisticsRegistry()->registerStat(&d_numSolved);
IntStat d_numConflictsMinimized;
IntStat d_finalPeriod;
AverageStat d_avgMinimizationRatio;
- Statistics(const std::string&);
+ Statistics(const std::string& name);
~Statistics();
};
BVQuickCheck* d_solver;
AlgebraicSolver::AlgebraicSolver(context::Context* c, TheoryBV* bv)
: SubtheorySolver(c, bv)
, d_modelMap(NULL)
- , d_quickSolver(new BVQuickCheck("alg", bv))
+ , d_quickSolver(new BVQuickCheck("theory::bv::algebraic", bv))
, d_isComplete(c, false)
, d_isDifficult(c, false)
, d_budget(options::bitvectorAlgebraicBudget())
, d_numSolved(0)
, d_numCalls(0)
, d_ctx(new context::Context())
- , d_quickXplain(options::bitvectorQuickXplain() ? new QuickXPlain("alg", d_quickSolver) : NULL)
+ , d_quickXplain(options::bitvectorQuickXplain() ? new QuickXPlain("theory::bv::algebraic", d_quickSolver) : NULL)
, d_statistics()
{}
}
AlgebraicSolver::Statistics::Statistics()
- : d_numCallstoCheck("theory::bv::AlgebraicSolver::NumCallsToCheck", 0)
- , d_numSimplifiesToTrue("theory::bv::AlgebraicSolver::NumSimplifiesToTrue", 0)
- , d_numSimplifiesToFalse("theory::bv::AlgebraicSolver::NumSimplifiesToFalse", 0)
- , d_numUnsat("theory::bv::AlgebraicSolver::NumUnsat", 0)
- , d_numSat("theory::bv::AlgebraicSolver::NumSat", 0)
- , d_numUnknown("theory::bv::AlgebraicSolver::NumUnknown", 0)
- , d_solveTime("theory::bv::AlgebraicSolver::SolveTime")
- , d_useHeuristic("theory::bv::AlgebraicSolver::UseHeuristic", 0.2)
+ : d_numCallstoCheck("theory::bv::algebraic::NumCallsToCheck", 0)
+ , d_numSimplifiesToTrue("theory::bv::algebraic::NumSimplifiesToTrue", 0)
+ , d_numSimplifiesToFalse("theory::bv::algebraic::NumSimplifiesToFalse", 0)
+ , d_numUnsat("theory::bv::algebraic::NumUnsat", 0)
+ , d_numSat("theory::bv::algebraic::NumSat", 0)
+ , d_numUnknown("theory::bv::algebraic::NumUnknown", 0)
+ , d_solveTime("theory::bv::algebraic::SolveTime")
+ , d_useHeuristic("theory::bv::algebraic::UseHeuristic", 0.2)
{
smtStatisticsRegistry()->registerStat(&d_numCallstoCheck);
smtStatisticsRegistry()->registerStat(&d_numSimplifiesToTrue);
BitblastSolver::BitblastSolver(context::Context* c, TheoryBV* bv)
: SubtheorySolver(c, bv),
- d_bitblaster(new TLazyBitblaster(c, bv, bv->getFullInstanceName() + "lazy")),
+ d_bitblaster(new TLazyBitblaster(c, bv, "theory::bv::lazy")),
d_bitblastQueue(c),
- d_statistics(bv->getFullInstanceName()),
+ d_statistics(),
d_validModelCache(c, true),
d_lemmaAtomsQueue(c),
d_useSatPropagation(options::bitvectorPropagate()),
delete d_bitblaster;
}
-BitblastSolver::Statistics::Statistics(const std::string &instanceName)
- : d_numCallstoCheck(instanceName + "theory::bv::BitblastSolver::NumCallsToCheck", 0)
- , d_numBBLemmas(instanceName + "theory::bv::BitblastSolver::NumTimesLemmasBB", 0)
+BitblastSolver::Statistics::Statistics()
+ : d_numCallstoCheck("theory::bv::BitblastSolver::NumCallsToCheck", 0)
+ , d_numBBLemmas("theory::bv::BitblastSolver::NumTimesLemmasBB", 0)
{
smtStatisticsRegistry()->registerStat(&d_numCallstoCheck);
smtStatisticsRegistry()->registerStat(&d_numBBLemmas);
struct Statistics {
IntStat d_numCallstoCheck;
IntStat d_numBBLemmas;
- Statistics(const std::string &instanceName);
+ Statistics();
~Statistics();
};
/** Bitblaster */
CoreSolver::CoreSolver(context::Context* c, TheoryBV* bv)
: SubtheorySolver(c, bv),
d_notify(*this),
- d_equalityEngine(d_notify, c, "theory::bv::TheoryBV", true),
+ d_equalityEngine(d_notify, c, "theory::bv::ee", true),
d_slicer(new Slicer()),
d_isComplete(c, true),
d_lemmaThreshold(16),
}
BvToBoolPreprocessor::Statistics::Statistics()
- : d_numTermsLifted("theory::bv::BvToBoolPreprocess::NumberOfTermsLifted", 0)
- , d_numAtomsLifted("theory::bv::BvToBoolPreprocess::NumberOfAtomsLifted", 0)
- , d_numTermsForcedLifted("theory::bv::BvToBoolPreprocess::NumberOfTermsForcedLifted", 0)
- , d_numTermsLowered("theory::bv::BvToBoolPreprocess::NumberOfTermsLowered", 0)
- , d_numAtomsLowered("theory::bv::BvToBoolPreprocess::NumberOfAtomsLowered", 0)
- , d_numTermsForcedLowered("theory::bv::BvToBoolPreprocess::NumberOfTermsForcedLowered", 0)
+ : d_numTermsLifted("theory::bv::BvToBool::NumTermsLifted", 0)
+ , d_numAtomsLifted("theory::bv::BvToBool::NumAtomsLifted", 0)
+ , d_numTermsForcedLifted("theory::bv::BvToBool::NumTermsForcedLifted", 0)
+ , d_numTermsLowered("theory::bv::BvToBool::NumTermsLowered", 0)
+ , d_numAtomsLowered("theory::bv::BvToBool::NumAtomsLowered", 0)
+ , d_numTermsForcedLowered("theory::bv::BvToBool::NumTermsForcedLowered", 0)
{
smtStatisticsRegistry()->registerStat(&d_numTermsLifted);
smtStatisticsRegistry()->registerStat(&d_numAtomsLifted);
}
TLazyBitblaster::Statistics::Statistics(const std::string& prefix) :
- d_numTermClauses("theory::bv::"+prefix+"::NumberOfTermSatClauses", 0),
- d_numAtomClauses("theory::bv::"+prefix+"::NumberOfAtomSatClauses", 0),
- d_numTerms("theory::bv::"+prefix+"::NumberOfBitblastedTerms", 0),
- d_numAtoms("theory::bv::"+prefix+"::NumberOfBitblastedAtoms", 0),
- d_numExplainedPropagations("theory::bv::"+prefix+"::NumberOfExplainedPropagations", 0),
- d_numBitblastingPropagations("theory::bv::"+prefix+"::NumberOfBitblastingPropagations", 0),
- d_bitblastTimer("theory::bv::"+prefix+"::BitblastTimer")
+ d_numTermClauses(prefix + "::NumTermSatClauses", 0),
+ d_numAtomClauses(prefix + "::NumAtomSatClauses", 0),
+ d_numTerms(prefix + "::NumBitblastedTerms", 0),
+ d_numAtoms(prefix + "::NumBitblastedAtoms", 0),
+ d_numExplainedPropagations(prefix + "::NumExplainedPropagations", 0),
+ d_numBitblastingPropagations(prefix + "::NumBitblastingPropagations", 0),
+ d_bitblastTimer(prefix + "::BitblastTimer")
{
smtStatisticsRegistry()->registerStat(&d_numTermClauses);
smtStatisticsRegistry()->registerStat(&d_numAtomClauses);
}
UnionFind::Statistics::Statistics():
- d_numNodes("theory::bv::slicer::NumberOfNodes", 0),
- d_numRepresentatives("theory::bv::slicer::NumberOfRepresentatives", 0),
- d_numSplits("theory::bv::slicer::NumberOfSplits", 0),
- d_numMerges("theory::bv::slicer::NumberOfMerges", 0),
+ d_numNodes("theory::bv::slicer::NumNodes", 0),
+ d_numRepresentatives("theory::bv::slicer::NumRepresentatives", 0),
+ d_numSplits("theory::bv::slicer::NumSplits", 0),
+ d_numMerges("theory::bv::slicer::NumMerges", 0),
d_avgFindDepth("theory::bv::slicer::AverageFindDepth"),
- d_numAddedEqualities("theory::bv::slicer::NumberOfEqualitiesAdded", Slicer::d_numAddedEqualities)
+ d_numAddedEqualities("theory::bv::slicer::NumEqualitiesAdded", Slicer::d_numAddedEqualities)
{
smtStatisticsRegistry()->registerStat(&d_numRepresentatives);
smtStatisticsRegistry()->registerStat(&d_numSplits);
d_sharedTermsSet(c),
d_subtheories(),
d_subtheoryMap(),
- d_statistics(getFullInstanceName()),
+ d_statistics(),
d_staticLearnCache(),
d_BVDivByZero(),
d_BVRemByZero(),
d_literalsToPropagateIndex(c, 0),
d_propagatedBy(c),
d_eagerSolver(NULL),
- d_abstractionModule(new AbstractionModule(getFullInstanceName())),
+ d_abstractionModule(new AbstractionModule(getStatsPrefix(THEORY_BV))),
d_isCoreTheory(false),
d_calledPreregister(false),
d_needsLastCallCheck(false),
getOutputChannel().spendResource(amount);
}
-TheoryBV::Statistics::Statistics(const std::string &name):
- d_avgConflictSize(name + "theory::bv::AvgBVConflictSize"),
- d_solveSubstitutions(name + "theory::bv::NumberOfSolveSubstitutions", 0),
- d_solveTimer(name + "theory::bv::solveTimer"),
- d_numCallsToCheckFullEffort(name + "theory::bv::NumberOfFullCheckCalls", 0),
- d_numCallsToCheckStandardEffort(name + "theory::bv::NumberOfStandardCheckCalls", 0),
- d_weightComputationTimer(name + "theory::bv::weightComputationTimer"),
- d_numMultSlice(name + "theory::bv::NumMultSliceApplied", 0)
+TheoryBV::Statistics::Statistics():
+ d_avgConflictSize("theory::bv::AvgBVConflictSize"),
+ d_solveSubstitutions("theory::bv::NumSolveSubstitutions", 0),
+ d_solveTimer("theory::bv::solveTimer"),
+ d_numCallsToCheckFullEffort("theory::bv::NumFullCheckCalls", 0),
+ d_numCallsToCheckStandardEffort("theory::bv::NumStandardCheckCalls", 0),
+ d_weightComputationTimer("theory::bv::weightComputationTimer"),
+ d_numMultSlice("theory::bv::NumMultSliceApplied", 0)
{
smtStatisticsRegistry()->registerStat(&d_avgConflictSize);
smtStatisticsRegistry()->registerStat(&d_solveSubstitutions);
IntStat d_numCallsToCheckStandardEffort;
TimerStat d_weightComputationTimer;
IntStat d_numMultSlice;
- Statistics(const std::string &name);
+ Statistics();
~Statistics();
};
d_infer_exp(c),
d_term_sk( u ),
d_notify( *this ),
- d_equalityEngine(d_notify, c, "theory::datatypes::TheoryDatatypes", true),
+ d_equalityEngine(d_notify, c, "theory::datatypes", true),
d_labels( c ),
d_selector_apps( c ),
//d_consEqc( c ),
const LogicInfo &logicInfo)
: Theory(THEORY_FP, c, u, out, valuation, logicInfo),
d_notification(*this),
- d_equalityEngine(d_notification, c, "theory::fp::TheoryFp", true),
+ d_equalityEngine(d_notification, c, "theory::fp::ee", true),
d_registeredTerms(u),
d_conv(u),
d_expansionRequested(false),
if(!isQuantified()) {
ss << "QF_";
}
- if(d_theories[THEORY_ARRAY]) {
+ if(d_theories[THEORY_ARRAYS]) {
ss << (d_sharingTheories == 1 ? "AX" : "A");
++seen;
}
enableQuantifiers();
}
if(!strncmp(p, "AX", 2)) {
- enableTheory(THEORY_ARRAY);
+ enableTheory(THEORY_ARRAYS);
p += 2;
} else {
if(*p == 'A') {
- enableTheory(THEORY_ARRAY);
+ enableTheory(THEORY_ARRAYS);
++p;
}
if(!strncmp(p, "UF", 2)) {
Theory(THEORY_SEP, c, u, out, valuation, logicInfo),
d_lemmas_produced_c(u),
d_notify(*this),
- d_equalityEngine(d_notify, c, "theory::sep::TheorySep", true),
+ d_equalityEngine(d_notify, c, "theory::sep::ee", true),
d_conflict(c, false),
d_reduce(u),
d_infer(c),
d_var_elim(u),
d_external(external),
d_notify(*this),
- d_equalityEngine(d_notify, c, "theory::sets::TheorySetsPrivate", true),
+ d_equalityEngine(d_notify, c, "theory::sets::ee", true),
d_conflict(c)
{
: Theory(THEORY_STRINGS, c, u, out, valuation, logicInfo),
RMAXINT(LONG_MAX),
d_notify( *this ),
- d_equalityEngine(d_notify, c, "theory::strings::TheoryStrings", true),
+ d_equalityEngine(d_notify, c, "theory::strings", true),
d_conflict(c, false),
d_infer(c),
d_infer_exp(c),
// Stats
TheoryStrings::Statistics::Statistics():
- d_splits("TheoryStrings::NumOfSplitOnDemands", 0),
- d_eq_splits("TheoryStrings::NumOfEqSplits", 0),
- d_deq_splits("TheoryStrings::NumOfDiseqSplits", 0),
- d_loop_lemmas("TheoryStrings::NumOfLoops", 0),
- d_new_skolems("TheoryStrings::NumOfNewSkolems", 0)
+ d_splits("theory::strings::NumOfSplitOnDemands", 0),
+ d_eq_splits("theory::strings::NumOfEqSplits", 0),
+ d_deq_splits("theory::strings::NumOfDiseqSplits", 0),
+ d_loop_lemmas("theory::strings::NumOfLoops", 0),
+ d_new_skolems("theory::strings::NumOfNewSkolems", 0)
{
smtStatisticsRegistry()->registerStat(&d_splits);
smtStatisticsRegistry()->registerStat(&d_eq_splits);
d_careGraph(NULL),
d_quantEngine(NULL),
d_extTheory(NULL),
- d_checkTime(getFullInstanceName() + "::checkTime"),
- d_computeCareGraphTime(getFullInstanceName() + "::computeCareGraphTime"),
+ d_checkTime(getStatsPrefix(id) + "::checkTime"),
+ d_computeCareGraphTime(getStatsPrefix(id) + "::computeCareGraphTime"),
d_sharedTerms(satContext),
d_out(&out),
d_valuation(valuation),
: d_tid(tid) {
}
-std::string Theory::getFullInstanceName() const {
- std::stringstream ss;
- ss << "theory<" << d_id << ">" << d_instanceName;
- return ss.str();
-}
-
EntailmentCheckParameters::~EntailmentCheckParameters(){}
TheoryId EntailmentCheckParameters::getTheoryId() const {
return d_id;
}
- /**
- * Returns a string that uniquely identifies this theory solver w.r.t. the
- * SmtEngine.
- */
- std::string getFullInstanceName() const;
-
-
/**
* Get the SAT context associated to this Theory.
*/
TheoryEngine::Statistics::Statistics(theory::TheoryId theory):
- conflicts(mkName("theory<", theory, ">::conflicts"), 0),
- propagations(mkName("theory<", theory, ">::propagations"), 0),
- lemmas(mkName("theory<", theory, ">::lemmas"), 0),
- requirePhase(mkName("theory<", theory, ">::requirePhase"), 0),
- flipDecision(mkName("theory<", theory, ">::flipDecision"), 0),
- restartDemands(mkName("theory<", theory, ">::restartDemands"), 0)
+ conflicts(getStatsPrefix(theory) + "::conflicts", 0),
+ propagations(getStatsPrefix(theory) + "::propagations", 0),
+ lemmas(getStatsPrefix(theory) + "::lemmas", 0),
+ requirePhase(getStatsPrefix(theory) + "::requirePhase", 0),
+ flipDecision(getStatsPrefix(theory) + "::flipDecision", 0),
+ restartDemands(getStatsPrefix(theory) + "::restartDemands", 0)
{
smtStatisticsRegistry()->registerStat(&conflicts);
smtStatisticsRegistry()->registerStat(&propagations);
/* The strong theory solver can be notified by EqualityEngine::init(),
* so make sure it's initialized first. */
d_thss(NULL),
- d_equalityEngine(d_notify, c, instanceName + "theory::uf::TheoryUF",
- true),
+ d_equalityEngine(d_notify, c, instanceName + "theory::uf::ee", true),
d_conflict(c, false),
d_extensionality_deq(u),
d_uf_std_skolem(u),
out << d_prefix << s_regDelim;
}
s->flushStat(out);
- out << std::endl;
}
+ out << std::endl;
#endif /* CVC4_STATISTICS_ON */
}
safe_print(fd, s_regDelim);
}
s->safeFlushStat(fd);
- safe_print(fd, "\n");
}
+ safe_print(fd, "\n");
#endif /* CVC4_STATISTICS_ON */
}