Ejemplo n.º 1
0
// NewSolverForLogic creates a new Z3 solver for a given logic.
func NewSolverForLogic(ctx *Context, logic string) *Solver {
	sym := ctx.NewStringSymbol(logic)
	solver := &Solver{C.Z3_mk_solver_for_logic(ctx.z3val, sym.z3val), ctx}
	C.Z3_solver_inc_ref(ctx.z3val, solver.z3val)
	return solver
}
Ejemplo n.º 2
0
// NewSolver creates a new Z3 solver.
func NewSolver(ctx *Context) *Solver {
	solver := &Solver{C.Z3_mk_solver(ctx.z3val), ctx}
	C.Z3_solver_inc_ref(ctx.z3val, solver.z3val)
	return solver
}