Class ConstraintCombiner
- java.lang.Object
-
- ru.ispras.fortress.solver.constraint.ConstraintCombiner
-
public final class ConstraintCombiner extends java.lang.Object
TheConstraintCombiner
class provides methods to create new constraints by combining existing ones (by performing negation, logical conjunction and logical disjunction).
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static Constraint
makeConjunction(Constraint first, Constraint second)
Creates a new constraint by performing logical conjunction on the specified constraints.static Constraint
makeDisjunction(Constraint first, Constraint second)
Creates a new constraint by performing logical disjunction on the specified constraints.static Constraint
makeNegation(Constraint constraint)
Creates a new constraint by performing logical negation on the specified constraint.
-
-
-
Method Detail
-
makeNegation
public static Constraint makeNegation(Constraint constraint)
Creates a new constraint by performing logical negation on the specified constraint.- Parameters:
constraint
- A constraint object.- Returns:
- A new constraint object.
- Throws:
java.lang.IllegalArgumentException
- if the parameter equalsnull
; if the parameter is not a formula-based constraint (its type is not ConstraintKind.FORMULA_BASED).
-
makeConjunction
public static Constraint makeConjunction(Constraint first, Constraint second)
Creates a new constraint by performing logical conjunction on the specified constraints.- Parameters:
first
- A constraint object.second
- A constraint object.- Returns:
- A new constraint object.
- Throws:
java.lang.IllegalArgumentException
- if any of the parameters equalsnull
; if any of the parameters is not a formula-based constraint (its type is not ConstraintKind.FORMULA_BASED).
-
makeDisjunction
public static Constraint makeDisjunction(Constraint first, Constraint second)
Creates a new constraint by performing logical disjunction on the specified constraints.- Parameters:
first
- A constraint object.second
- A constraint object.- Returns:
- A new constraint object.
- Throws:
java.lang.IllegalArgumentException
- if any of the parameters equalsnull
; if any of the parameters is not a formula-based constraint (its type is not ConstraintKind.FORMULA_BASED).
-
-