summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAina Niemetz <aina.niemetz@gmail.com>2021-09-10 10:47:10 -0700
committerGitHub <noreply@github.com>2021-09-10 17:47:10 +0000
commit9dd4f07a560c4d4b44b81bd021466966d3b494e9 (patch)
treed691d894f7f523360ac7c1f41675466257770645
parentfd4b373b9a66a590e0d9618c744312e1050472a0 (diff)
FP: Use EnvObj::rewrite() and options() in theory_fp. (#7169)
-rw-r--r--src/theory/fp/theory_fp.cpp24
1 files changed, 12 insertions, 12 deletions
diff --git a/src/theory/fp/theory_fp.cpp b/src/theory/fp/theory_fp.cpp
index 075a6633f..5e0752f0d 100644
--- a/src/theory/fp/theory_fp.cpp
+++ b/src/theory/fp/theory_fp.cpp
@@ -27,7 +27,6 @@
#include "theory/fp/fp_converter.h"
#include "theory/fp/theory_fp_rewriter.h"
#include "theory/output_channel.h"
-#include "theory/rewriter.h"
#include "theory/theory_model.h"
#include "util/floatingpoint.h"
@@ -313,7 +312,7 @@ bool TheoryFp::refineAbstraction(TheoryModel *m, TNode abstract, TNode concrete)
Node evaluate =
nm->mkNode(kind::FLOATINGPOINT_TO_REAL_TOTAL, floatValue, undefValue);
- Node concreteValue = Rewriter::rewrite(evaluate);
+ Node concreteValue = rewrite(evaluate);
Assert(concreteValue.isConst());
Trace("fp-refineAbstraction")
@@ -359,7 +358,7 @@ bool TheoryFp::refineAbstraction(TheoryModel *m, TNode abstract, TNode concrete)
handleLemma(fl, InferenceId::FP_PREPROCESS);
// Then the backwards constraints
- Node floatAboveAbstract = Rewriter::rewrite(
+ Node floatAboveAbstract = rewrite(
nm->mkNode(kind::FLOATINGPOINT_TO_FP_REAL,
nm->mkConst(FloatingPointToFPReal(
concrete[0].getType().getConst<FloatingPointSize>())),
@@ -376,7 +375,7 @@ bool TheoryFp::refineAbstraction(TheoryModel *m, TNode abstract, TNode concrete)
nm->mkNode(kind::GEQ, abstract, abstractValue)));
handleLemma(bg, InferenceId::FP_PREPROCESS);
- Node floatBelowAbstract = Rewriter::rewrite(
+ Node floatBelowAbstract = rewrite(
nm->mkNode(kind::FLOATINGPOINT_TO_FP_REAL,
nm->mkConst(FloatingPointToFPReal(
concrete[0].getType().getConst<FloatingPointSize>())),
@@ -429,7 +428,7 @@ bool TheoryFp::refineAbstraction(TheoryModel *m, TNode abstract, TNode concrete)
concrete.getType().getConst<FloatingPointSize>())),
rmValue,
realValue);
- Node concreteValue = Rewriter::rewrite(evaluate);
+ Node concreteValue = rewrite(evaluate);
Assert(concreteValue.isConst());
Trace("fp-refineAbstraction")
@@ -473,9 +472,9 @@ bool TheoryFp::refineAbstraction(TheoryModel *m, TNode abstract, TNode concrete)
if (!abstractValue.getConst<FloatingPoint>().isInfinite())
{
Node realValueOfAbstract =
- Rewriter::rewrite(nm->mkNode(kind::FLOATINGPOINT_TO_REAL_TOTAL,
- abstractValue,
- nm->mkConst(Rational(0U))));
+ rewrite(nm->mkNode(kind::FLOATINGPOINT_TO_REAL_TOTAL,
+ abstractValue,
+ nm->mkConst(Rational(0U))));
Node bg = nm->mkNode(
kind::IMPLIES,
@@ -656,7 +655,7 @@ void TheoryFp::registerTerm(TNode node)
/* When not word-blasting lazier, we word-blast every term on
* registration. */
- if (!options::fpLazyWb())
+ if (!options().fp.fpLazyWb)
{
convertAndEquateTerm(node);
}
@@ -671,7 +670,7 @@ bool TheoryFp::isRegistered(TNode node)
void TheoryFp::preRegisterTerm(TNode node)
{
- if (!options::fpExp())
+ if (!options().fp.fpExp)
{
TypeNode tn = node.getType();
if (tn.isFloatingPoint())
@@ -757,7 +756,8 @@ bool TheoryFp::preNotifyFact(
TNode atom, bool pol, TNode fact, bool isPrereg, bool isInternal)
{
/* Word-blast lazier if configured. */
- if (options::fpLazyWb() && d_wbFactsCache.find(atom) == d_wbFactsCache.end())
+ if (options().fp.fpLazyWb
+ && d_wbFactsCache.find(atom) == d_wbFactsCache.end())
{
d_wbFactsCache.insert(atom);
convertAndEquateTerm(atom);
@@ -790,7 +790,7 @@ bool TheoryFp::preNotifyFact(
void TheoryFp::notifySharedTerm(TNode n)
{
/* Word-blast lazier if configured. */
- if (options::fpLazyWb() && d_wbFactsCache.find(n) == d_wbFactsCache.end())
+ if (options().fp.fpLazyWb && d_wbFactsCache.find(n) == d_wbFactsCache.end())
{
d_wbFactsCache.insert(n);
convertAndEquateTerm(n);
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback