|
|
|
@ -21,9 +21,9 @@ public enum RelOp |
|
|
|
} |
|
|
|
|
|
|
|
@Override |
|
|
|
public RelOp negate() throws PrismLangException |
|
|
|
public RelOp negate(boolean keepStrictness) throws PrismLangException |
|
|
|
{ |
|
|
|
return LEQ; |
|
|
|
return (keepStrictness ? LT : LEQ); |
|
|
|
} |
|
|
|
}, |
|
|
|
GEQ(">=") { |
|
|
|
@ -34,9 +34,9 @@ public enum RelOp |
|
|
|
} |
|
|
|
|
|
|
|
@Override |
|
|
|
public RelOp negate() throws PrismLangException |
|
|
|
public RelOp negate(boolean keepStrictness) throws PrismLangException |
|
|
|
{ |
|
|
|
return LT; |
|
|
|
return (keepStrictness ? LEQ : LT); |
|
|
|
} |
|
|
|
}, |
|
|
|
MIN("min=") { |
|
|
|
@ -47,7 +47,7 @@ public enum RelOp |
|
|
|
} |
|
|
|
|
|
|
|
@Override |
|
|
|
public RelOp negate() throws PrismLangException |
|
|
|
public RelOp negate(boolean keepStrictness) throws PrismLangException |
|
|
|
{ |
|
|
|
return MAX; |
|
|
|
} |
|
|
|
@ -66,9 +66,9 @@ public enum RelOp |
|
|
|
} |
|
|
|
|
|
|
|
@Override |
|
|
|
public RelOp negate() throws PrismLangException |
|
|
|
public RelOp negate(boolean keepStrictness) throws PrismLangException |
|
|
|
{ |
|
|
|
return GEQ; |
|
|
|
return (keepStrictness ? GT : GEQ); |
|
|
|
} |
|
|
|
}, |
|
|
|
LEQ("<=") { |
|
|
|
@ -79,9 +79,9 @@ public enum RelOp |
|
|
|
} |
|
|
|
|
|
|
|
@Override |
|
|
|
public RelOp negate() throws PrismLangException |
|
|
|
public RelOp negate(boolean keepStrictness) throws PrismLangException |
|
|
|
{ |
|
|
|
return GT; |
|
|
|
return (keepStrictness ? GEQ : GT); |
|
|
|
} |
|
|
|
}, |
|
|
|
MAX("max=") { |
|
|
|
@ -92,14 +92,14 @@ public enum RelOp |
|
|
|
} |
|
|
|
|
|
|
|
@Override |
|
|
|
public RelOp negate() throws PrismLangException |
|
|
|
public RelOp negate(boolean keepStrictness) throws PrismLangException |
|
|
|
{ |
|
|
|
return MIN; |
|
|
|
} |
|
|
|
}, |
|
|
|
EQ("=") { |
|
|
|
@Override |
|
|
|
public RelOp negate() throws PrismLangException |
|
|
|
public RelOp negate(boolean keepStrictness) throws PrismLangException |
|
|
|
{ |
|
|
|
throw new PrismLangException("Cannot negate " + this); |
|
|
|
} |
|
|
|
@ -162,8 +162,23 @@ public enum RelOp |
|
|
|
|
|
|
|
/** |
|
|
|
* Returns the negated form of this operator. |
|
|
|
* <br> |
|
|
|
* Equivalent to {@code negate(false)}. |
|
|
|
*/ |
|
|
|
public abstract RelOp negate() throws PrismLangException; |
|
|
|
public RelOp negate() throws PrismLangException |
|
|
|
{ |
|
|
|
return negate(false); |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
|
* Returns the negated form of this operator. |
|
|
|
* Depending on the flag {@code keepStrictness}, |
|
|
|
* the strictness is preserved. E.g., with |
|
|
|
* {@code keepStrictness == true} the operator "<" |
|
|
|
* is turned into ">", with {@code keepStrictness == false} |
|
|
|
* the operator "<" is turned into ">=;" |
|
|
|
*/ |
|
|
|
public abstract RelOp negate(boolean keepStrictness) throws PrismLangException; |
|
|
|
|
|
|
|
/** |
|
|
|
* Returns the RelOp object corresponding to a (string) symbol, |
|
|
|
|