3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-04-23 17:15:31 +00:00

dealing with issues #402 #399 #258

Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
Nikolaj Bjorner 2016-01-09 13:29:44 -08:00
parent fc4260e018
commit 20cfbcd66b
6 changed files with 51 additions and 5 deletions

View file

@ -162,6 +162,11 @@ extern "C" {
ptr_vector<expr> bound_asts;
if (num_patterns > 0 && num_no_patterns > 0) {
SET_ERROR_CODE(Z3_INVALID_USAGE);
RETURN_Z3(0);
}
if (num_bound == 0) {
SET_ERROR_CODE(Z3_INVALID_USAGE);
RETURN_Z3(0);
}
for (unsigned i = 0; i < num_bound; ++i) {
app* a = to_app(bound[i]);

View file

@ -1815,6 +1815,8 @@ def _mk_quantifier(is_forall, vs, body, weight=1, qid="", skid="", patterns=[],
if is_app(vs):
vs = [vs]
num_vars = len(vs)
if num_vars == 0:
raise Z3Exception("Quantification requires a non-empty list of variables.")
_vs = (Ast * num_vars)()
for i in range(num_vars):
## TODO: Check if is constant