/** * Returns the set of live states. A state is "live" if an accept state is * reachable from it and if it is reachable from the initial state. */ private static BitSet getLiveStates(Automaton a) { BitSet live = getLiveStatesFromInitial(a); live.and(getLiveStatesToAccept(a)); return live; }
/** Returns true if there are dead states that reach an accept state. */ public static boolean hasDeadStatesToAccept(Automaton a) { BitSet reachableFromInitial = getLiveStatesFromInitial(a); BitSet reachableFromAccept = getLiveStatesToAccept(a); reachableFromAccept.andNot(reachableFromInitial); return reachableFromAccept.isEmpty() == false; }
/** Returns true if there are dead states reachable from an initial state. */ public static boolean hasDeadStatesFromInitial(Automaton a) { BitSet reachableFromInitial = getLiveStatesFromInitial(a); BitSet reachableFromAccept = getLiveStatesToAccept(a); reachableFromInitial.andNot(reachableFromAccept); return reachableFromInitial.isEmpty() == false; }
/** * Returns the set of live states. A state is "live" if an accept state is * reachable from it and if it is reachable from the initial state. */ private static BitSet getLiveStates(Automaton a) { BitSet live = getLiveStatesFromInitial(a); live.and(getLiveStatesToAccept(a)); return live; }
/** * Returns the set of live states. A state is "live" if an accept state is * reachable from it and if it is reachable from the initial state. */ private static BitSet getLiveStates(Automaton a) { BitSet live = getLiveStatesFromInitial(a); live.and(getLiveStatesToAccept(a)); return live; }
/** * Returns the set of live states. A state is "live" if an accept state is * reachable from it and if it is reachable from the initial state. */ private static BitSet getLiveStates(Automaton a) { BitSet live = getLiveStatesFromInitial(a); live.and(getLiveStatesToAccept(a)); return live; }
/** Returns true if there are dead states that reach an accept state. */ public static boolean hasDeadStatesToAccept(Automaton a) { BitSet reachableFromInitial = getLiveStatesFromInitial(a); BitSet reachableFromAccept = getLiveStatesToAccept(a); reachableFromAccept.andNot(reachableFromInitial); return reachableFromAccept.isEmpty() == false; }
/** Returns true if there are dead states reachable from an initial state. */ public static boolean hasDeadStatesFromInitial(Automaton a) { BitSet reachableFromInitial = getLiveStatesFromInitial(a); BitSet reachableFromAccept = getLiveStatesToAccept(a); reachableFromInitial.andNot(reachableFromAccept); return reachableFromInitial.isEmpty() == false; }
/** Returns true if there are dead states reachable from an initial state. */ public static boolean hasDeadStatesFromInitial(Automaton a) { BitSet reachableFromInitial = getLiveStatesFromInitial(a); BitSet reachableFromAccept = getLiveStatesToAccept(a); reachableFromInitial.andNot(reachableFromAccept); return reachableFromInitial.isEmpty() == false; }
/** Returns true if there are dead states that reach an accept state. */ public static boolean hasDeadStatesToAccept(Automaton a) { BitSet reachableFromInitial = getLiveStatesFromInitial(a); BitSet reachableFromAccept = getLiveStatesToAccept(a); reachableFromAccept.andNot(reachableFromInitial); return reachableFromAccept.isEmpty() == false; }
/** Returns true if there are dead states reachable from an initial state. */ public static boolean hasDeadStatesFromInitial(Automaton a) { BitSet reachableFromInitial = getLiveStatesFromInitial(a); BitSet reachableFromAccept = getLiveStatesToAccept(a); reachableFromInitial.andNot(reachableFromAccept); return reachableFromInitial.isEmpty() == false; }
/** Returns true if there are dead states that reach an accept state. */ public static boolean hasDeadStatesToAccept(Automaton a) { BitSet reachableFromInitial = getLiveStatesFromInitial(a); BitSet reachableFromAccept = getLiveStatesToAccept(a); reachableFromAccept.andNot(reachableFromInitial); return reachableFromAccept.isEmpty() == false; }