Skip to content

Commit 0f89650

Browse files
Add initial value setting API for solver and optimize contexts and update related function signatures
1 parent 48712b4 commit 0f89650

File tree

3 files changed

+6
-3
lines changed

3 files changed

+6
-3
lines changed

RELEASE_NOTES.md

+4-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,10 @@ Version 4.13.1
1515
- single-sample cell projection in nlsat was designed by Haokun Li and Bican Xia.
1616
- using simple-checker together with and variable ordering supported by qfnra_tactic was developed by Mengyu Zhao (Linxi) and Shaowei Cai.
1717

18-
The projection is described in paper by Haokun Li and Bican Xia, [Solving Satisfiability of Polynomial Formulas By Sample - Cell Projection](https://arxiv.org/abs/2003.00409). The code ported from https://github.com./hybridSMT/hybridSMT.git
18+
The projection is described in paper by Haokun Li and Bican Xia, [Solving Satisfiability of Polynomial Formulas By Sample - Cell Projection](https://arxiv.org/abs/2003.00409). The code ported from https://github.com./hybridSMT/hybridSMT.git
19+
20+
- Add API for providing hints for the solver/optimize contexts for which initial values to attempt to use for variables.
21+
The new API function are Z3_solver_set_initial_value and Z3_optimize_set_initial_value, respectively. Supply these functions with a Boolean or numeric variable, and a value. The solver will then attempt to use these values in the initial phase of search. The feature is aimed at resolving nearly similar problems, or problems with a predicted model and the intent is that restarting the solver based on a near solution can avoid prune the space of constraints that are initially infeasible.
1922

2023
Version 4.13.0
2124
==============

src/api/z3_api.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -7250,7 +7250,7 @@ extern "C" {
72507250
def_API('Z3_solver_set_initial_value', VOID, (_in(CONTEXT), _in(SOLVER), _in(AST), _in(AST)))
72517251
*/
72527252

7253-
void Z3_API Z3_solver_set_initial_value(Z3_context c, Z3_solver s, Z3_ast var, Z3_ast value);
7253+
void Z3_API Z3_solver_set_initial_value(Z3_context c, Z3_solver s, Z3_ast v, Z3_ast val);
72547254

72557255

72567256
/**

src/api/z3_optimization.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ extern "C" {
149149
def_API('Z3_optimize_set_initial_value', VOID, (_in(CONTEXT), _in(OPTIMIZE), _in(AST), _in(AST)))
150150
*/
151151

152-
void Z3_API Z3_optimize_set_initial_value(Z3_context c, Z3_optimize o, Z3_ast var, Z3_ast value);
152+
void Z3_API Z3_optimize_set_initial_value(Z3_context c, Z3_optimize o, Z3_ast v, Z3_ast val);
153153

154154
/**
155155
\brief Check consistency and produce optimal values.

0 commit comments

Comments
 (0)