3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-04-27 02:45:51 +00:00

fixed more problems in the new param framework

Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
This commit is contained in:
Leonardo de Moura 2012-12-03 15:02:34 -08:00
parent d634c945bf
commit 6d7d205e13
30 changed files with 185 additions and 168 deletions

View file

@ -223,7 +223,7 @@ def get_option(name):
"""Return the value of a Z3 global (or module) parameter
>>> get_option('nlsat.reorder')
true
'true'
"""
ptr = (ctypes.c_char_p * 1)()
if Z3_global_param_get(str(name), ptr):
@ -4384,8 +4384,8 @@ def args2params(arguments, keywords, ctx=None):
"""Convert python arguments into a Z3_params object.
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)
>>> args2params(['model', True, 'relevancy', 2], {'elim_and' : True})
(params model 1 relevancy 2 elim_and 1)
"""
if __debug__:
_z3_assert(len(arguments) % 2 == 0, "Argument list must have an even number of elements.")
@ -4398,7 +4398,6 @@ def args2params(arguments, keywords, ctx=None):
r.set(prev, a)
prev = None
for k, v in keywords.iteritems():
k = ':' + k.replace('_', '-')
r.set(k, v)
return r