3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2026-02-28 19:01:29 +00:00

Add missing API methods: dimacs, translate, proof, addSimplifier, getLower/getUpper, etc.

Co-authored-by: NikolajBjorner <3085284+NikolajBjorner@users.noreply.github.com>
This commit is contained in:
copilot-swe-agent[bot] 2026-02-24 17:22:17 +00:00
parent 08addfa654
commit 9802b32a3e
9 changed files with 280 additions and 6 deletions

View file

@ -566,6 +566,29 @@ public class Solver extends Z3Object {
return new Solver(ctx, Native.solverTranslate(getContext().nCtx(), getNativeObject(), ctx.nCtx()));
}
/**
* Create a new solver with pre-processing simplification attached.
*
* @param simplifier The simplifier to attach for pre-processing
* @return A new solver with the simplifier applied
**/
public Solver addSimplifier(Simplifier simplifier)
{
return new Solver(getContext(), Native.solverAddSimplifier(
getContext().nCtx(), getNativeObject(), simplifier.getNativeObject()));
}
/**
* Convert the solver's Boolean formula to DIMACS CNF format.
*
* @param includeNames If true, include variable names in the DIMACS output
* @return A string containing the DIMACS CNF representation
**/
public String toDimacs(boolean includeNames)
{
return Native.solverToDimacsString(getContext().nCtx(), getNativeObject(), includeNames);
}
/**
* Solver statistics.
*