projects
/
cvc5.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
3e7c441
)
Fix case of non-constant value for sygus sampling (#4051)
author
Andrew Reynolds
<andrew.j.reynolds@gmail.com>
Fri, 13 Mar 2020 16:52:13 +0000
(11:52 -0500)
committer
GitHub
<noreply@github.com>
Fri, 13 Mar 2020 16:52:13 +0000
(09:52 -0700)
Fixes #4050.
src/theory/quantifiers/sygus_sampler.cpp
patch
|
blob
|
history
diff --git
a/src/theory/quantifiers/sygus_sampler.cpp
b/src/theory/quantifiers/sygus_sampler.cpp
index 10af0d703a5af5c528323323d03fbe0129ae809b..d2c2a238019b6ece5b522483e7b6b6da3ed89680 100644
(file)
--- a/
src/theory/quantifiers/sygus_sampler.cpp
+++ b/
src/theory/quantifiers/sygus_sampler.cpp
@@
-713,8
+713,12
@@
Node SygusSampler::getSygusRandomValue(TypeNode tn,
Trace("sygus-sample-grammar") << "...returned " << ret << std::endl;
ret = Rewriter::rewrite(ret);
Trace("sygus-sample-grammar") << "...after rewrite " << ret << std::endl;
- Assert(ret.isConst());
- return ret;
+ // A rare case where we generate a non-constant value from constant
+ // leaves is (/ n 0).
+ if(ret.isConst())
+ {
+ return ret;
+ }
}
}
Trace("sygus-sample-grammar") << "...resort to random value" << std::endl;