mirror of
https://github.com/Z3Prover/z3
synced 2025-04-15 13:28:47 +00:00
include timeout/rlimit parameters in optmize
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
parent
48638c6f1e
commit
e4b9080165
|
@ -128,7 +128,7 @@ extern "C" {
|
||||||
lbool r = l_undef;
|
lbool r = l_undef;
|
||||||
cancel_eh<reslimit> eh(mk_c(c)->m().limit());
|
cancel_eh<reslimit> eh(mk_c(c)->m().limit());
|
||||||
unsigned timeout = to_optimize_ptr(o)->get_params().get_uint("timeout", mk_c(c)->get_timeout());
|
unsigned timeout = to_optimize_ptr(o)->get_params().get_uint("timeout", mk_c(c)->get_timeout());
|
||||||
unsigned rlimit = mk_c(c)->get_rlimit();
|
unsigned rlimit = to_optimize_ptr(o)->get_params().get_uint("rlimit", mk_c(c)->get_rlimit());
|
||||||
api::context::set_interruptable si(*(mk_c(c)), eh);
|
api::context::set_interruptable si(*(mk_c(c)), eh);
|
||||||
{
|
{
|
||||||
scoped_timer timer(timeout, &eh);
|
scoped_timer timer(timeout, &eh);
|
||||||
|
|
|
@ -2024,13 +2024,21 @@ public class Context implements AutoCloseable {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Take the bounded Kleene star of a regular expression.
|
* Take the lower and upper-bounded Kleene star of a regular expression.
|
||||||
*/
|
*/
|
||||||
public ReExpr mkLoop(ReExpr re, uint lo, uint hi = 0)
|
public ReExpr mkLoop(ReExpr re, uint lo, uint hi)
|
||||||
{
|
{
|
||||||
return (ReExpr) Expr.create(this, Native.mkReLoop(nCtx(), re.getNativeObject(), lo, hi));
|
return (ReExpr) Expr.create(this, Native.mkReLoop(nCtx(), re.getNativeObject(), lo, hi));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Take the lower-bounded Kleene star of a regular expression.
|
||||||
|
*/
|
||||||
|
public ReExpr mkLoop(ReExpr re, uint lo)
|
||||||
|
{
|
||||||
|
return (ReExpr) Expr.create(this, Native.mkReLoop(nCtx(), re.getNativeObject(), lo, 0));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Take the Kleene plus of a regular expression.
|
* Take the Kleene plus of a regular expression.
|
||||||
|
|
|
@ -5,6 +5,8 @@ def_module_params('opt',
|
||||||
('maxsat_engine', SYMBOL, 'maxres', "select engine for maxsat: 'core_maxsat', 'wmax', 'maxres', 'pd-maxres'"),
|
('maxsat_engine', SYMBOL, 'maxres', "select engine for maxsat: 'core_maxsat', 'wmax', 'maxres', 'pd-maxres'"),
|
||||||
('priority', SYMBOL, 'lex', "select how to priortize objectives: 'lex' (lexicographic), 'pareto', or 'box'"),
|
('priority', SYMBOL, 'lex', "select how to priortize objectives: 'lex' (lexicographic), 'pareto', or 'box'"),
|
||||||
('dump_benchmarks', BOOL, False, 'dump benchmarks for profiling'),
|
('dump_benchmarks', BOOL, False, 'dump benchmarks for profiling'),
|
||||||
|
('timeout', UINT, UINT_MAX, 'timeout (in milliseconds) (UINT_MAX and 0 mean no timeout)'),
|
||||||
|
('rlimit', UINT, 0, 'resource limit (0 means no limit)'),
|
||||||
('print_model', BOOL, False, 'display model for satisfiable constraints'),
|
('print_model', BOOL, False, 'display model for satisfiable constraints'),
|
||||||
('enable_sls', BOOL, False, 'enable SLS tuning during weighted maxsast'),
|
('enable_sls', BOOL, False, 'enable SLS tuning during weighted maxsast'),
|
||||||
('enable_sat', BOOL, True, 'enable the new SAT core for propositional constraints'),
|
('enable_sat', BOOL, True, 'enable the new SAT core for propositional constraints'),
|
||||||
|
|
Loading…
Reference in a new issue