summaryrefslogtreecommitdiff
path: root/src/theory/quantifiers/fmf
diff options
context:
space:
mode:
authorAndrew Reynolds <andrew.j.reynolds@gmail.com>2021-04-07 13:36:15 -0500
committerGitHub <noreply@github.com>2021-04-07 18:36:15 +0000
commit04a494e251a8cc2c90bb429e2858f1c4eb8f88ff (patch)
tree03b1a5792f2f6ca5537353b86682f427090668da /src/theory/quantifiers/fmf
parent5059658ee0d6fc65e4cb1652c605895d016cd274 (diff)
Replace calls to NodeManager::mkSkolem with SkolemManager::mkDummySkolem (#6291)
This is in preparation for refactoring skolem creation throughout the code base to improve proofs and migrate Theory::expandDefinitions to Rewriter::expandDefinitions. This PR also eliminates some unused code in TheoryArithPrivate. Followup PRs will start formalizing/eliminating calls to mkDummySkolem.
Diffstat (limited to 'src/theory/quantifiers/fmf')
-rw-r--r--src/theory/quantifiers/fmf/bounded_integers.cpp9
-rw-r--r--src/theory/quantifiers/fmf/first_order_model_fmc.cpp6
-rw-r--r--src/theory/quantifiers/fmf/full_model_check.cpp4
3 files changed, 13 insertions, 6 deletions
diff --git a/src/theory/quantifiers/fmf/bounded_integers.cpp b/src/theory/quantifiers/fmf/bounded_integers.cpp
index efa3dd160..bbbf820b6 100644
--- a/src/theory/quantifiers/fmf/bounded_integers.cpp
+++ b/src/theory/quantifiers/fmf/bounded_integers.cpp
@@ -18,6 +18,7 @@
#include "expr/dtype_cons.h"
#include "expr/node_algorithm.h"
+#include "expr/skolem_manager.h"
#include "options/quantifiers_options.h"
#include "theory/arith/arith_msum.h"
#include "theory/datatypes/theory_datatypes_utils.h"
@@ -43,7 +44,8 @@ BoundedIntegers::IntRangeDecisionHeuristic::IntRangeDecisionHeuristic(
: DecisionStrategyFmf(c, valuation), d_range(r), d_ranges_proxied(u)
{
if( options::fmfBoundLazy() ){
- d_proxy_range = isProxy ? r : NodeManager::currentNM()->mkSkolem( "pbir", r.getType() );
+ SkolemManager* sm = NodeManager::currentNM()->getSkolemManager();
+ d_proxy_range = isProxy ? r : sm->mkDummySkolem("pbir", r.getType());
}else{
d_proxy_range = r;
}
@@ -315,6 +317,7 @@ void BoundedIntegers::checkOwnership(Node f)
//this needs to be done at preregister since it affects e.g. QuantDSplit's preregister
Trace("bound-int") << "check ownership quantifier " << f << std::endl;
NodeManager* nm = NodeManager::currentNM();
+ SkolemManager* sm = nm->getSkolemManager();
bool success;
do{
@@ -484,8 +487,8 @@ void BoundedIntegers::checkOwnership(Node f)
if (expr::hasBoundVar(r))
{
// introduce a new bound
- Node new_range = NodeManager::currentNM()->mkSkolem(
- "bir", r.getType(), "bound for term");
+ Node new_range =
+ sm->mkDummySkolem("bir", r.getType(), "bound for term");
d_nground_range[f][v] = r;
d_range[f][v] = new_range;
r = new_range;
diff --git a/src/theory/quantifiers/fmf/first_order_model_fmc.cpp b/src/theory/quantifiers/fmf/first_order_model_fmc.cpp
index 515d9fe58..cc2e0fbf1 100644
--- a/src/theory/quantifiers/fmf/first_order_model_fmc.cpp
+++ b/src/theory/quantifiers/fmf/first_order_model_fmc.cpp
@@ -15,6 +15,7 @@
#include "theory/quantifiers/fmf/first_order_model_fmc.h"
#include "expr/attribute.h"
+#include "expr/skolem_manager.h"
#include "theory/quantifiers/fmf/full_model_check.h"
#include "theory/rewriter.h"
@@ -90,8 +91,9 @@ Node FirstOrderModelFmc::getStar(TypeNode tn)
{
return it->second;
}
- Node st = NodeManager::currentNM()->mkSkolem(
- "star", tn, "skolem created for full-model checking");
+ SkolemManager* sm = NodeManager::currentNM()->getSkolemManager();
+ Node st =
+ sm->mkDummySkolem("star", tn, "skolem created for full-model checking");
d_type_star[tn] = st;
st.setAttribute(IsStarAttribute(), true);
return st;
diff --git a/src/theory/quantifiers/fmf/full_model_check.cpp b/src/theory/quantifiers/fmf/full_model_check.cpp
index 7dbc10f57..6f0c13f63 100644
--- a/src/theory/quantifiers/fmf/full_model_check.cpp
+++ b/src/theory/quantifiers/fmf/full_model_check.cpp
@@ -14,6 +14,7 @@
#include "theory/quantifiers/fmf/full_model_check.h"
+#include "expr/skolem_manager.h"
#include "options/quantifiers_options.h"
#include "options/theory_options.h"
#include "options/uf_options.h"
@@ -1349,6 +1350,7 @@ void FullModelChecker::registerQuantifiedFormula(Node q)
return;
}
NodeManager* nm = NodeManager::currentNM();
+ SkolemManager* sm = nm->getSkolemManager();
std::vector<TypeNode> types;
for (const Node& v : q[0])
{
@@ -1363,7 +1365,7 @@ void FullModelChecker::registerQuantifiedFormula(Node q)
types.push_back(tn);
}
TypeNode typ = nm->mkFunctionType(types, nm->booleanType());
- Node op = nm->mkSkolem("qfmc", typ, "op for full-model checking");
+ Node op = sm->mkDummySkolem("qfmc", typ, "op for full-model checking");
d_quant_cond[q] = op;
}
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback