3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-04-13 20:38:43 +00:00

Sane indentation + removing extra spaces for Optimize.java

This commit is contained in:
George Karpenkov 2017-02-27 18:48:44 +01:00
parent d6c79facc7
commit b3be83e7c5

View file

@ -14,7 +14,6 @@ Author:
Nikolaj Bjorner (nbjorner) 2015-07-16
Notes:
**/
package com.microsoft.z3;
@ -23,10 +22,10 @@ import com.microsoft.z3.enumerations.Z3_lbool;
/**
* Object for managing optimizization context
* Object for managing optimization context
**/
public class Optimize extends Z3Object
{
public class Optimize extends Z3Object {
/**
* A string that describes all available optimize solver parameters.
**/
@ -76,10 +75,11 @@ public class Optimize extends Z3Object
/**
* Handle to objectives returned by objective functions.
**/
public class Handle
{
Optimize opt;
int handle;
public class Handle {
private final Optimize opt;
private final int handle;
Handle(Optimize opt, int h)
{
this.opt = opt;
@ -149,7 +149,6 @@ public class Optimize extends Z3Object
* Return an objective which associates with the group of constraints.
*
**/
public Handle AssertSoft(BoolExpr constraint, int weight, String group)
{
getContext().checkContextMatch(constraint);
@ -157,13 +156,11 @@ public class Optimize extends Z3Object
return new Handle(this, Native.optimizeAssertSoft(getContext().nCtx(), getNativeObject(), constraint.getNativeObject(), Integer.toString(weight), s.getNativeObject()));
}
/**
* Check satisfiability of asserted constraints.
* Produce a model that (when the objectives are bounded and
* don't use strict inequalities) meets the objectives.
**/
public Status Check()
{
Z3_lbool r = Z3_lbool.fromInt(Native.optimizeCheck(getContext().nCtx(), getNativeObject()));
@ -185,13 +182,11 @@ public class Optimize extends Z3Object
Native.optimizePush(getContext().nCtx(), getNativeObject());
}
/**
* Backtrack one backtracking point.
*
* Note that an exception is thrown if Pop is called without a corresponding Push.
**/
public void Pop()
{
Native.optimizePop(getContext().nCtx(), getNativeObject());
@ -241,7 +236,6 @@ public class Optimize extends Z3Object
return (ArithExpr)Expr.create(getContext(), Native.optimizeGetLower(getContext().nCtx(), getNativeObject(), index));
}
/**
* Retrieve an upper bound for the objective handle.
**/
@ -295,7 +289,6 @@ public class Optimize extends Z3Object
getNativeObject());
}
/**
* Print the context to a String (SMT-LIB parseable benchmark).
**/