mirror of
https://github.com/Z3Prover/z3
synced 2025-05-11 09:44:43 +00:00
fix bug reported in issue #193: MBQI needs to avoid instantiating data-types that contain model values in nested positions
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
parent
702af71a2d
commit
cd838e5cf4
7 changed files with 100 additions and 40 deletions
|
@ -68,17 +68,10 @@ namespace smt {
|
|||
|
||||
|
||||
bool theory_opt::is_numeral(arith_util& a, expr* term) {
|
||||
while (true) {
|
||||
if (a.is_uminus(term) || a.is_to_real(term) || a.is_to_int(term)) {
|
||||
term = to_app(term)->get_arg(0);
|
||||
}
|
||||
else if (a.is_numeral(term)) {
|
||||
return true;
|
||||
}
|
||||
else {
|
||||
return false;
|
||||
}
|
||||
while (a.is_uminus(term) || a.is_to_real(term) || a.is_to_int(term)) {
|
||||
term = to_app(term)->get_arg(0);
|
||||
}
|
||||
return a.is_numeral(term);
|
||||
}
|
||||
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue