Browse Source

AcceptanceGeneric: add and() and or() methods

git-svn-id: https://www.prismmodelchecker.org/svn/prism/prism/trunk@11826 bbc10eb1-c90d-0410-af57-cb519fbb1720
master
Joachim Klein 9 years ago
parent
commit
30ed75086f
  1. 24
      prism/src/acceptance/AcceptanceGeneric.java

24
prism/src/acceptance/AcceptanceGeneric.java

@ -255,6 +255,30 @@ public class AcceptanceGeneric implements AcceptanceOmega {
throw new UnsupportedOperationException("Unsupported operator in generic acceptance condition");
}
/**
* Returns a new generic acceptance condition that corresponds to the conjunction
* of this and the other acceptance condition. Both conditions are <b>not</b>
* cloned; take care not to modify the conditions or clone beforehand.
* @param other the other generic acceptance condition
* @return new AcceptanceRabin, conjunction of this and other
*/
public AcceptanceGeneric and(AcceptanceGeneric other)
{
return new AcceptanceGeneric(ElementType.AND, this, other);
}
/**
* Returns a new generic acceptance condition that corresponds to the disjunction
* of this and the other acceptance condition. Both conditions are <b>not</b>
* cloned; take care not to modify the conditions or clone beforehand.
* @param other the other generic acceptance condition
* @return new AcceptanceGeneric, disjunction of this and other
*/
public AcceptanceGeneric or(AcceptanceGeneric other)
{
return new AcceptanceGeneric(ElementType.OR, this, other);
}
/** Complement this acceptance condition, return as AcceptanceGeneric. */
public AcceptanceGeneric complementToGeneric()
{

Loading…
Cancel
Save