Browse Source

Some more comments for HOAF2DA

git-svn-id: https://www.prismmodelchecker.org/svn/prism/prism/trunk@10253 bbc10eb1-c90d-0410-af57-cb519fbb1720
master
Joachim Klein 11 years ago
parent
commit
45317072c1
  1. 29
      prism/src/automata/HOAF2DA.java

29
prism/src/automata/HOAF2DA.java

@ -53,35 +53,61 @@ import acceptance.AcceptanceRabin.RabinPair;
/** /**
* A HOAConsumer for jhoafparser that constructs a prism.DA from the parsed automaton. * A HOAConsumer for jhoafparser that constructs a prism.DA from the parsed automaton.
* <br>
* The automaton has to be deterministic and complete, with state-based acceptance and
* labels (explicit/implicit) on the edges.
* <br>
* If the automaton has transition-based acceptance, {@code TransitionBasedAcceptanceException}
* is thrown.
* <br>
* There are (currently) more restrictions on the automaton:
* <ul>
* <li>The Start and States headers have to be present</li>
* <li>All explicit edge labels have to be in disjunctive normal form (disjunction of conjunctive clauses)</li>
* </ul>
*/ */
public class HOAF2DA implements HOAConsumer { public class HOAF2DA implements HOAConsumer {
/** An exception that is thrown to indicate that the automaton had transition based acceptance. */
@SuppressWarnings("serial")
public class TransitionBasedAcceptanceException extends HOAConsumerException { public class TransitionBasedAcceptanceException extends HOAConsumerException {
public TransitionBasedAcceptanceException(String e) {super(e);} public TransitionBasedAcceptanceException(String e) {super(e);}
} }
/** The resulting deterministic automaton */
private DA<BitSet, ? extends AcceptanceOmega> da; private DA<BitSet, ? extends AcceptanceOmega> da;
/** The set of atomic propositions of the automaton (in APSet form) */
private APSet aps = new APSet(); private APSet aps = new APSet();
/** Size, i.e. number of states */ /** Size, i.e. number of states */
private int size; private int size;
/** Do we know the number of states? Is provided by the optional HOA States-header */
private boolean knowSize = false; private boolean knowSize = false;
/** Start state (index) */ /** Start state (index) */
private int startState; private int startState;
/** Do we know the start state? Is provided by the HOA Start-header */
private boolean knowStartState = false; private boolean knowStartState = false;
/** The acceptance condition */
private BooleanExpression<AtomAcceptance> accExpr = null; private BooleanExpression<AtomAcceptance> accExpr = null;
/** The condition name from the acc-name header (optional) */
private String accName; private String accName;
/** The extra information from the acc-name header (optional) */
private List<Object> extraInfo; private List<Object> extraInfo;
/** For each acceptance set in the HOA automaton, the set of states that are included in that set */
private List<BitSet> acceptanceSets = null; private List<BitSet> acceptanceSets = null;
// set of acceptance set indizes where state membership has to be inverted
/** The set of acceptance set indizes where state membership has to be inverted */
private Set<Integer> negateAcceptanceSetMembership = null; private Set<Integer> negateAcceptanceSetMembership = null;
/** The list of atomic propositions (in List form) */
private List<String> apList; private List<String> apList;
/** The helper for handling implicit edges */
ImplicitEdgeHelper implicitEdgeHelper = null; ImplicitEdgeHelper implicitEdgeHelper = null;
/** Clear the various state information */
public void clear() { public void clear() {
aps = new APSet(); aps = new APSet();
@ -102,6 +128,7 @@ public class HOAF2DA implements HOAConsumer {
apList = null; apList = null;
} }
/** Constructor */
public HOAF2DA() { public HOAF2DA() {
} }

Loading…
Cancel
Save