projects
/
cvc5.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
08800bd
)
api: Add guard against querying value from term with free vars. (#7529)
author
Mathias Preiner
<mathias.preiner@gmail.com>
Sun, 31 Oct 2021 19:47:28 +0000
(12:47 -0700)
committer
GitHub
<noreply@github.com>
Sun, 31 Oct 2021 19:47:28 +0000
(19:47 +0000)
src/api/cpp/cvc5.cpp
patch
|
blob
|
history
diff --git
a/src/api/cpp/cvc5.cpp
b/src/api/cpp/cvc5.cpp
index addfeb0dae61baffb90a699a0f471e33d15b053f..d1be25bb47f543bdae86fb5ab46fdd90bf570434 100644
(file)
--- a/
src/api/cpp/cvc5.cpp
+++ b/
src/api/cpp/cvc5.cpp
@@
-5056,6
+5056,8
@@
Term Solver::mkBVFromStrHelper(uint32_t size,
Term Solver::getValueHelper(const Term& term) const
{
// Note: Term is checked in the caller to avoid double checks
+ CVC5_API_RECOVERABLE_CHECK(!expr::hasFreeVar(term.getNode()))
+ << "Cannot get value of term containing free variables";
//////// all checks before this line
Node value = d_slv->getValue(*term.d_node);
Term res = Term(this, value);