summaryrefslogtreecommitdiff
path: root/src/theory/quantifiers/full_model_check.cpp
diff options
context:
space:
mode:
authorAndrew Reynolds <andrew.j.reynolds@gmail.com>2017-10-28 09:13:13 -0500
committerGitHub <noreply@github.com>2017-10-28 09:13:13 -0500
commit34e84a25a044e3af192bb69089467c2125911900 (patch)
tree924a3ae0894bfec136f91949a1bf55e19c4125da /src/theory/quantifiers/full_model_check.cpp
parent675e82e32a34911163f9de0e6389eb107be5b0f1 (diff)
Document term db (#1220)
* Document TermDb and related classes. Minor changes to quantifiers utils and their interface. Address some comments left over from PR 1206. * Minor * Minor * Change namespace style. * Address review * Fix incorrectly merged portion that led to regression failures. * New clang format, fully document relevant domain. * Clang format again. * Minor
Diffstat (limited to 'src/theory/quantifiers/full_model_check.cpp')
-rw-r--r--src/theory/quantifiers/full_model_check.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/theory/quantifiers/full_model_check.cpp b/src/theory/quantifiers/full_model_check.cpp
index db43d8bca..b0f118ad5 100644
--- a/src/theory/quantifiers/full_model_check.cpp
+++ b/src/theory/quantifiers/full_model_check.cpp
@@ -30,9 +30,10 @@ using namespace CVC4::theory::quantifiers::fmcheck;
struct ModelBasisArgSort
{
std::vector< Node > d_terms;
+ // number of arguments that are model-basis terms
+ std::unordered_map<Node, unsigned, NodeHashFunction> d_mba_count;
bool operator() (int i,int j) {
- return (d_terms[i].getAttribute(ModelBasisArgAttribute()) <
- d_terms[j].getAttribute(ModelBasisArgAttribute()) );
+ return (d_mba_count[d_terms[i]] < d_mba_count[d_terms[j]]);
}
};
@@ -502,8 +503,9 @@ bool FullModelChecker::processBuildModel(TheoryModel* m){
std::vector< int > indices;
ModelBasisArgSort mbas;
for (int i=0; i<(int)conds.size(); i++) {
- d_qe->getTermDatabase()->computeModelBasisArgAttribute( conds[i] );
mbas.d_terms.push_back(conds[i]);
+ mbas.d_mba_count[conds[i]] =
+ d_qe->getTermDatabase()->getModelBasisArg(conds[i]);
indices.push_back(i);
}
std::sort( indices.begin(), indices.end(), mbas );
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback