diff options
author | Andrew Reynolds <andrew.j.reynolds@gmail.com> | 2017-10-28 09:13:13 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-10-28 09:13:13 -0500 |
commit | 34e84a25a044e3af192bb69089467c2125911900 (patch) | |
tree | 924a3ae0894bfec136f91949a1bf55e19c4125da /src/theory/quantifiers/full_model_check.cpp | |
parent | 675e82e32a34911163f9de0e6389eb107be5b0f1 (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.cpp | 8 |
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 ); |