projects
/
cvc5.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
d35d44f
)
Evaluate cast-to-real operator (#7599)
author
Andrew Reynolds
<andrew.j.reynolds@gmail.com>
Mon, 8 Nov 2021 18:57:12 +0000
(12:57 -0600)
committer
GitHub
<noreply@github.com>
Mon, 8 Nov 2021 18:57:12 +0000
(18:57 +0000)
Fixes cvc5/cvc5-projects#341.
src/theory/evaluator.cpp
patch
|
blob
|
history
diff --git
a/src/theory/evaluator.cpp
b/src/theory/evaluator.cpp
index 2d6c3de55c50e3e399d9869841bbe71500fe3dd0..f7c5ddf0f2dd68908eb42b87a251014b6f06dbe1 100644
(file)
--- a/
src/theory/evaluator.cpp
+++ b/
src/theory/evaluator.cpp
@@
-491,6
+491,13
@@
EvalResult Evaluator::evalInternal(
results[currNode] = EvalResult(x.abs());
break;
}
+ case kind::CAST_TO_REAL:
+ {
+ // casting to real is a no-op
+ const Rational& x = results[currNode[0]].d_rat;
+ results[currNode] = EvalResult(x);
+ break;
+ }
case kind::CONST_STRING:
results[currNode] = EvalResult(currNodeVal.getConst<String>());
break;