mirror of
https://github.com/Z3Prover/z3
synced 2025-04-29 20:05:51 +00:00
Fix crash reported at http://z3.codeplex.com/workitem/11. Fix array rewriter bug, rewriter was producing sort incorrect expression.
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
This commit is contained in:
parent
3cc9d57438
commit
2a286541e0
3 changed files with 16 additions and 8 deletions
|
@ -113,15 +113,14 @@ func_decl * array_decl_plugin::mk_const(sort * s, unsigned arity, sort * const *
|
|||
m_manager->raise_exception("invalid const array definition, invalid domain size");
|
||||
return 0;
|
||||
}
|
||||
unsigned num_parameters = s->get_num_parameters();
|
||||
|
||||
if (num_parameters == 0) {
|
||||
m_manager->raise_exception("parameter mismatch");
|
||||
if (!is_array_sort(s)) {
|
||||
m_manager->raise_exception("invalid const array definition, parameter is not an array sort");
|
||||
return 0;
|
||||
}
|
||||
if (!m_manager->compatible_sorts(get_array_range(s), domain[0])) {
|
||||
m_manager->raise_exception("invalid const array definition, sort mismatch between array range and argument");
|
||||
return 0;
|
||||
}
|
||||
|
||||
// TBD check that range sort corresponds to last parameter.
|
||||
|
||||
parameter param(s);
|
||||
func_decl_info info(m_family_id, OP_CONST_ARRAY, 1, ¶m);
|
||||
info.m_private_parameters = true;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue