3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-04-24 01:25:31 +00:00

move parameter checking to API

Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
Nikolaj Bjorner 2014-10-08 13:32:25 -07:00
parent 28fb266d8c
commit adb9117a9e
6 changed files with 10 additions and 9 deletions

View file

@ -222,6 +222,9 @@ extern "C" {
Z3_TRY;
LOG_Z3_tactic_using_params(c, t, p);
RESET_ERROR_CODE();
param_descrs r;
to_tactic_ref(t)->collect_param_descrs(r);
to_param_ref(p).validate(r);
tactic * new_t = using_params(to_tactic_ref(t), to_param_ref(p));
RETURN_TACTIC(new_t);
Z3_CATCH_RETURN(0);

View file

@ -4467,7 +4467,7 @@ def args2params(arguments, keywords, ctx=None):
A ':' is added to the keywords, and '_' is replaced with '-'
>>> args2params(['model', True, 'relevancy', 2], {'elim_and' : True})
(params model 1 relevancy 2 elim_and 1)
(params model true relevancy 2 elim_and true)
"""
if __debug__:
_z3_assert(len(arguments) % 2 == 0, "Argument list must have an even number of elements.")