org.sat4j.specs.TimeoutException Java Examples

The following examples show how to use org.sat4j.specs.TimeoutException. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: SRAMove.java    From symbolicautomata with Apache License 2.0 6 votes vote down vote up
/**
 * @return true iff <code>input</code> can trigger the transition
 * @throws TimeoutException 
 */
public boolean hasModel(S input, BooleanAlgebra<P, S> ba, LinkedList<S> registerValues) throws TimeoutException {
	Set<Integer> registersWithInput = new HashSet<Integer>();

	for (Integer registerE : E)
	{
		boolean regIsNull = registerValues.get(registerE) == null;
		boolean regNotNullAndNotInput = registerValues.get(registerE) != null &&
				!registerValues.get(registerE).equals(input);

		if (regIsNull || regNotNullAndNotInput)
			return false;
	}

	for (Integer registerI : I)
		if (registerValues.get(registerI) != null && registerValues.get(registerI).equals(input))
			return false;

	return ba.HasModel(guard, input);
}
 
Example #2
Source File: SRAUnitTest.java    From symbolicautomata with Apache License 2.0 6 votes vote down vote up
@Test
public void testEmptinessFreshEnable() throws TimeoutException {
    LinkedList<Character> registers = new LinkedList<Character>();
    registers.add(null);
    registers.add(null);

    CharPred abPred = ba.MkOr(new CharPred('a'), new CharPred('b'));

    Collection<SRAMove<CharPred, Character>> transitions = new LinkedList<SRAMove<CharPred, Character>>();
    transitions.add(new SRAFreshMove<CharPred, Character>(0, 1, abPred, 0, registers.size()));
    transitions.add(new SRAFreshMove<CharPred, Character>(1, 2, abPred, 1, registers.size()));
    transitions.add(new SRAFreshMove<CharPred, Character>(2, 3, alpha, 1, registers.size()));


    SRA<CharPred, Character> testSRA = SRA.MkSRA(transitions, 0, Collections.singleton(3), registers, ba);
    assertFalse(SRA.isLanguageEmpty(testSRA, ba, Long.MAX_VALUE));
}
 
Example #3
Source File: BinaryEqualityPredicate.java    From symbolicautomata with Apache License 2.0 6 votes vote down vote up
public void normalize(BooleanAlgebra<P, S> ba) throws TimeoutException{
	ArrayList<Pair<P,P>> newNotEqual = new ArrayList<Pair<P,P>>();
	
	ArrayList<P> firstProj = new ArrayList<>();
	for(Pair<P,P> pair: notEqual)
		firstProj.add(pair.first);
	
	Collection<Pair<P,ArrayList<Integer>>> minterms = ba.GetMinterms(firstProj);		
	for(Pair<P,ArrayList<Integer>> minterm:minterms){
		P currA = minterm.first;
		P currB = ba.False();
		for (int bit = 0; bit < notEqual.size(); bit++) 					
			if (minterm.second.get(bit) == 1)
				currB = ba.MkOr(currB, notEqual.get(bit).second);
			
		newNotEqual.add(new Pair<>(currA, currB));
	}
	
	notEqual = newNotEqual;
}
 
Example #4
Source File: Until.java    From symbolicautomata with Apache License 2.0 6 votes vote down vote up
@Override
protected LTLFormula<P, S> pushNegations(boolean isPositive, BooleanAlgebra<P, S> ba,
		HashMap<String, LTLFormula<P, S>> posHash, HashMap<String, LTLFormula<P, S>> negHash) throws TimeoutException {
	String key = this.toString();

	LTLFormula<P, S> out = new False<>();

	if (isPositive) {
		if (posHash.containsKey(key)) {
			return posHash.get(key);
		}
		out = new Until<>(left.pushNegations(isPositive, ba, posHash, negHash),
				right.pushNegations(isPositive, ba, posHash, negHash));
		posHash.put(key, out);
		return out;
	} else {
		if (negHash.containsKey(key))
			return negHash.get(key);
		
		// not (A U B) == (not B) W (not A /\ not B) 
		LTLFormula<P, S> rightNeg = right.pushNegations(isPositive, ba, posHash, negHash);
		out = new WeakUntil<>(rightNeg, new And<>(left.pushNegations(isPositive, ba, posHash, negHash), rightNeg));
		negHash.put(key, out);
		return out;
	}
}
 
Example #5
Source File: EqualityAlgebra.java    From symbolicautomata with Apache License 2.0 6 votes vote down vote up
@Override
public boolean HasModel(EqualityPredicate<P,S> p, S s1, S s2) throws TimeoutException {
	if (p instanceof UnaryPredicate<?,?>) 
		return unarySolver.HasModel(((UnaryPredicate<P,S>)p).getPredicate(), s1);
	else{ 
		BinaryEqualityPredicate<P,S> pc = (BinaryEqualityPredicate<P,S>) p;
		P atom1 = unarySolver.MkAtom(s1);
		P atom2 = unarySolver.MkAtom(s2);
		if(unarySolver.AreEquivalent(atom1,atom2)){
			return unarySolver.HasModel(pc.equals,s1);
		}else{
			for(Pair<P,P> pair: pc.notEqual)
				if(unarySolver.HasModel(pair.first, s1) && unarySolver.HasModel(pair.second, s2))
					return true;					
			
			return false;
		}
	}
}
 
Example #6
Source File: Globally.java    From symbolicautomata with Apache License 2.0 6 votes vote down vote up
@Override
protected LTLFormula<P, S> pushNegations(boolean isPositive, BooleanAlgebra<P, S> ba,
		HashMap<String, LTLFormula<P, S>> posHash, HashMap<String, LTLFormula<P, S>> negHash) throws TimeoutException {
	String key = this.toString();

	LTLFormula<P, S> out = new False<>();

	if (isPositive) {
		if (posHash.containsKey(key)) {
			return posHash.get(key);
		}
		out = new Globally<>(phi.pushNegations(isPositive, ba, posHash, negHash));
		posHash.put(key, out);
		return out;
	} else {
		if (negHash.containsKey(key))
			return negHash.get(key);
		out = new Eventually<>(phi.pushNegations(isPositive, ba, posHash, negHash));
		negHash.put(key, out);
		return out;
	}
}
 
Example #7
Source File: SVPA.java    From symbolicautomata with Apache License 2.0 6 votes vote down vote up
/**
 * Returns the SVPA accepting every list for the boolean algebra
 * <code>ba</code>
 */
public static <A, B> SVPA<A, B> getFullSVPA(BooleanAlgebra<A, B> ba) {
	SVPA<A, B> aut = new SVPA<A, B>();
	aut.states = new HashSet<Integer>();
	aut.states.add(0);
	aut.finalStates = new HashSet<Integer>(aut.states);
	aut.initialStates = new HashSet<Integer>(aut.states);
	aut.isDeterministic = true;
	aut.isEmpty = false;
	aut.isEpsilonFree = true;
	aut.stateCount = 1;
	aut.maxStateId = 0;
	aut.maxStackStateId = 0;
	aut.isTotal = true;
	try {
		aut.addTransition(new Internal<A, B>(0, 0, ba.True()), ba, true);	
		aut.addTransition(new Call<A, B>(0, 0, 0, ba.True()), ba, true);
		aut.addTransition(new Return<A, B>(0, 0, 0, ba.True()), ba, true);
		aut.addTransition(new ReturnBS<A, B>(0, 0, ba.True()), ba, true);		
	} catch (TimeoutException e) {
		// TODO Auto-generated catch block
		e.printStackTrace();
	}
	return aut;
}
 
Example #8
Source File: SFA.java    From symbolicautomata with Apache License 2.0 6 votes vote down vote up
/**
 * @return the complement of <code>aut</code> as a new SFA
 * @throws TimeoutException
 */
public static <A, B> SFA<A, B> complementOf(SFA<A, B> aut, BooleanAlgebra<A, B> ba, long timeout)
		throws TimeoutException {

	// make aut total to make sure it has a sink state
	SFA<A, B> autTotal = aut.mkTotal(ba, timeout);

	// the final states of the complement are
	// autTotal.states minus autTotal.finalStates
	Collection<Integer> newFinalStates = new HashSet<Integer>();
	for (Integer st : autTotal.states)
		if (!autTotal.finalStates.contains(st))
			newFinalStates.add(st);

	return MkSFA(autTotal.getTransitions(), autTotal.initialState, newFinalStates, ba, false);
}
 
Example #9
Source File: EqualityAlgebra.java    From symbolicautomata with Apache License 2.0 6 votes vote down vote up
@Override
public boolean IsSatisfiable(EqualityPredicate<P,S> p) throws TimeoutException {
	if (p instanceof UnaryPredicate<?,?>) {
		return unarySolver.IsSatisfiable(((UnaryPredicate<P,S>) p).getPredicate());
	} else {
		BinaryEqualityPredicate<P,S> u = (BinaryEqualityPredicate<P,S>) p;
		if(unarySolver.IsSatisfiable(u.equals))
			return true;
		else{
			for(Pair<P,P> pair: u.notEqual){
				P left = unarySolver.MkAnd(pair.first,unarySolver.MkNot(pair.second));
				if(unarySolver.IsSatisfiable(left))
					return true;
				P right = unarySolver.MkAnd(pair.second,unarySolver.MkNot(pair.first));
				if(unarySolver.IsSatisfiable(right))
					return true;					
				S c1 = unarySolver.generateWitness(pair.first);
				return unarySolver.IsSatisfiable(unarySolver.MkAnd(pair.second,unarySolver.MkNot(unarySolver.MkAtom(c1))));
			}
			return false;
		}
	}
}
 
Example #10
Source File: SAFABooleanAlgebra.java    From symbolicautomata with Apache License 2.0 5 votes vote down vote up
@Override
public boolean IsSatisfiable(SAFA<P, S> p1) {
	try {
		return !SAFA.isEmpty(p1, ba);
	} catch (TimeoutException e) {
		System.exit(-1);
		return false;
	}
}
 
Example #11
Source File: SFAUnitTest.java    From symbolicautomata with Apache License 2.0 5 votes vote down vote up
@Test
public void testGetWitness() throws TimeoutException {
	SFA<CharPred, Character> ca = autA.complement(ba);

	boolean oneIsOk = false;
	for (Character e : ca.getWitness(ba))
		oneIsOk = oneIsOk || ba.HasModel(ba.MkNot(alpha), e);

	assertTrue(oneIsOk);
}
 
Example #12
Source File: SATBooleanAlgebra.java    From symbolicautomata with Apache License 2.0 5 votes vote down vote up
private boolean unsafeIsSatisfiable(VecInt assumptions) {
	try {
		return solver.isSatisfiable(assumptions, false);
	} catch (TimeoutException ex) {
		ex.printStackTrace();
		System.exit(-1);
		return false;
	}
}
 
Example #13
Source File: JFactory.java    From symbolicautomata with Apache License 2.0 5 votes vote down vote up
public BDD applyEx(BDD that, BDDOp opr, BDD var) {
         int x = _index;
         int y = ((bdd) that)._index;
         int z = opr.id;
         int a = ((bdd) var)._index;
         try {
	return makeBDD(bdd_appex(x, y, z, a));
} catch (TimeoutException e) {
	return null;
}
     }
 
Example #14
Source File: DisjointUnionAlgebra.java    From symbolicautomata with Apache License 2.0 5 votes vote down vote up
@Override
public Pair<P1, P2> MkOr(Collection<Pair<P1, P2>> pset) throws TimeoutException {
	Collection<P1> p1set = new ArrayList<P1>();
	Collection<P2> p2set = new ArrayList<P2>();
	for (Pair<P1, P2> p : pset) {
		p1set.add(p.first);
		p2set.add(p.second);
	}
	return new Pair<P1, P2>(ba1.MkOr(p1set), ba2.MkOr(p2set));
}
 
Example #15
Source File: SVPA.java    From symbolicautomata with Apache License 2.0 5 votes vote down vote up
/**
 * Computes <code>aut1</code> minus <code>aut2</code>
 * @throws TimeoutException 
 */
public static <A, B> SVPA<A, B> differnce(SVPA<A, B> aut1, SVPA<A, B> aut2,
		BooleanAlgebra<A, B> ba) throws TimeoutException {

	SVPA<A, B> diff = aut1.intersectionWith(aut2.complement(ba), ba);
	return removeUnreachableStates(diff, ba);
}
 
Example #16
Source File: SFA.java    From symbolicautomata with Apache License 2.0 5 votes vote down vote up
/**
 * Returns the empty SFA for the Boolean algebra <code>ba</code>
 * @throws TimeoutException 
 */
public static <A, B> SFA<A, B> getEmptySFA(BooleanAlgebra<A, B> ba) throws TimeoutException {
	SFA<A, B> aut = new SFA<A, B>();
	aut.states = new HashSet<Integer>();
	aut.states.add(0);
	aut.finalStates = new HashSet<Integer>();
	aut.initialState = 0;
	aut.isDeterministic = true;
	aut.isEmpty = true;
	aut.isEpsilonFree = true;
	aut.maxStateId = 1;
	aut.addTransition(new SFAInputMove<A, B>(0, 0, ba.True()), ba, true);
	return aut;
}
 
Example #17
Source File: SFAInputMove.java    From symbolicautomata with Apache License 2.0 5 votes vote down vote up
@Override
public boolean isDisjointFrom(SFAMove<P,S> t, BooleanAlgebra<P,S> ba) throws TimeoutException{
	if(t.isEpsilonTransition())
		return true;
	if (from.equals(t.from)){			
		SFAInputMove<P, S> ct = (SFAInputMove<P, S>) t;			
		if(ba.IsSatisfiable(ba.MkAnd(guard,ct.guard)))
			return false;
	}
	return true;
}
 
Example #18
Source File: JFactory.java    From symbolicautomata with Apache License 2.0 5 votes vote down vote up
int not_rec(int r) throws TimeoutException {
	 if(Timers.fullTO())
     	throw new TimeoutException("timeout");
	
    BddCacheDataI entry;
    int res;

    if (ISZERO(r))
        return bddtrue;
    if (ISONE(r))
        return bddfalse;

    entry = BddCache_lookupI(applycache, NOTHASH(r));

    if (entry.a == r && entry.c == bddop_not) {
        if (CACHESTATS)
            cachestats.opHit++;
        return entry.res;
    }
    if (CACHESTATS)
        cachestats.opMiss++;

    PUSHREF(not_rec(LOW(r)));
    PUSHREF(not_rec(HIGH(r)));
    res = bdd_makenode(LEVEL(r), READREF(2), READREF(1));
    POPREF(2);

    entry.a = r;
    entry.c = bddop_not;
    entry.res = res;

    return res;
}
 
Example #19
Source File: SRAUnitTest.java    From symbolicautomata with Apache License 2.0 5 votes vote down vote up
@Test
public void testAcceptance() throws TimeoutException {
    assertTrue(autA.accepts(la, ba));
    assertFalse(autA.accepts(lb, ba));
    assertTrue(autA.accepts(lab, ba));
    assertFalse(autA.accepts(lnot, ba));
    assertFalse(autB.accepts(la, ba));
    assertTrue(autB.accepts(lb, ba));
    assertTrue(autB.accepts(lab, ba));
    assertFalse(autB.accepts(lnot, ba));
    assertTrue(autIntOne.accepts(Collections.singletonList(6), intBa));
    assertFalse(autIntOne.accepts(Collections.singletonList(2), intBa));
    assertFalse(autIntTwo.accepts(Collections.singletonList(2), intBa));
    assertTrue(autIntTwo.accepts(Collections.singletonList(1), intBa));
}
 
Example #20
Source File: SVPA.java    From symbolicautomata with Apache License 2.0 5 votes vote down vote up
/**
 * Checks whether the automaton is deterministic
 * 
 * @return true iff the automaton is deterministic
 * @throws TimeoutException 
 */
public boolean isDeterministic(BooleanAlgebra<U, S> ba) throws TimeoutException {

	// Check if we set it before
	if (isDeterministic)
		return isDeterministic;

	// check only one initial state
	if (initialStates.size() != 1)
		return false;		

	// check only one initial state
	if (!isEpsilonFree) 
		return false;		

	// Check transitions out of a state are mutually exclusive
	for (Integer state : states) {
		List<SVPAMove<U, S>> movesFromState = new ArrayList<SVPAMove<U, S>>(
				getTransitionsFrom(state));

		for (int i = 0; i < movesFromState.size(); i++) {
			SVPAMove<U, S> t1 = movesFromState.get(i);
			for (int j = i + 1; j < movesFromState.size(); j++)
				if (!t1.isDisjointFrom(movesFromState.get(j), ba))
					return false;					
		}
	}

	isDeterministic = true;
	return isDeterministic;
}
 
Example #21
Source File: SFAUnitTest.java    From symbolicautomata with Apache License 2.0 5 votes vote down vote up
private SFA<CharPred, Character> getAmbSFA(UnaryCharIntervalSolver ba) {

		Collection<SFAMove<CharPred, Character>> transitionsA = new LinkedList<SFAMove<CharPred, Character>>();
		transitionsA.add(new SFAInputMove<CharPred, Character>(0, 0, alpha));
		transitionsA.add(new SFAInputMove<CharPred, Character>(0, 1, alpha));
		transitionsA.add(new SFAInputMove<CharPred, Character>(1, 1, alpha));
		try {
			return SFA.MkSFA(transitionsA, 0, Arrays.asList(1), ba);
		} catch (TimeoutException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
		return null;
	}
 
Example #22
Source File: Learner.java    From symbolicautomata with Apache License 2.0 5 votes vote down vote up
public boolean consistent(SFA<P, S> sfa, BooleanAlgebra<P, S> ba) throws TimeoutException {
	for (List<S> w : SUR) {
		for (List<S> e : E) {
			List<S> we = new ArrayList<S>(w);
			we.addAll(e);
			if (!f.get(we).equals(sfa.accepts(we, ba))) {
				//System.out.println("inconsistent on " + we);
				return false;
			}
		}
	}
	return true;
}
 
Example #23
Source File: ESFAUnitTest.java    From symbolicautomata with Apache License 2.0 5 votes vote down vote up
@Test
public void testMkESFA() throws TimeoutException {
	assertTrue(autA.stateCount() == 5);
	assertTrue(autA.getTransitionCount() == 5);

	//System.out.println(autA.getAmbiguousInput(ba));
	assertTrue(autA.accepts(la, ba));


	//assertTrue(autB.stateCount() == 2);
	//assertTrue(autB.getTransitionCount() == 2);
}
 
Example #24
Source File: SFTProductInputMove.java    From symbolicautomata with Apache License 2.0 5 votes vote down vote up
@Override
public boolean isDisjointFrom(SFTMove<P, F, S> t, BooleanAlgebra<P,S> ba) throws TimeoutException{
	if(t.isEpsilonTransition())
		return true;
	if (from.equals(t.from)){			
		SFTInputMove<P, F, S> ct = (SFTInputMove<P, F, S>) t;			
		if(ba.IsSatisfiable(ba.MkAnd(guard, ct.guard)))
			return false;
	}
	return true;
}
 
Example #25
Source File: SRAUnitTest.java    From symbolicautomata with Apache License 2.0 5 votes vote down vote up
@Test
public void testEmptinessDisabledBecauseInitAssignment() throws TimeoutException {
    LinkedList<Character> registers = new LinkedList<Character>();
    registers.add('a');
    registers.add('b');
    Collection<SRAMove<CharPred, Character>> transitions = new LinkedList<SRAMove<CharPred, Character>>();
    transitions.add(new SRAFreshMove<CharPred, Character>(0, 1, ba.MkOr(new CharPred('a'), new CharPred('b')), 0, registers.size()));
    SRA<CharPred, Character> testSRA = SRA.MkSRA(transitions, 0, Collections.singleton(1), registers, ba);
    assertTrue(SRA.isLanguageEmpty(testSRA, ba, Long.MAX_VALUE));
}
 
Example #26
Source File: TestRELearning.java    From symbolicautomata with Apache License 2.0 5 votes vote down vote up
public static Integer[] learnREBenchmark(Integer index) throws TimeoutException {
	Integer[] results = new Integer[2];

	if (index < 0 || index >= reBenchmarks.length) {
		return null;
	}
	UnaryCharIntervalSolver solver = new UnaryCharIntervalSolver();
	SFAprovider provider = new SFAprovider(reBenchmarks[index], solver);
	SFA<CharPred, Character> model, sfa = provider.getSFA().minimize(solver);



	//System.out.println(String.valueOf(sfa));

	Learner<CharPred, Character> ell = new Learner<CharPred, Character>();
	SFAOracle<CharPred, Character> o = new SFAOracle<CharPred, Character>(sfa, solver);
	SFA<CharPred, Character> learned = ell.learn(o, solver);

	results[0] = o.getNumMembership();
	results[1] = o.getNumEquivalence();

	SFAMembershipOracle <CharPred, Character> memb = new SFAMembershipOracle<>(sfa, solver);
	SFAEquivalenceOracle <CharPred, Character> equiv = new SFAEquivalenceOracle<>(sfa, solver);
	EqualityAlgebraLearnerFactory <CharPred, Character> eqFactory = new EqualityAlgebraLearnerFactory <>(solver);
	SFAAlgebraLearner <CharPred, Character> learner = new SFAAlgebraLearner<>(memb, solver, eqFactory);
	model = learner.getModelFinal(equiv);

	assert learned.isEquivalentTo(sfa, solver);
	// The results are saved in the order that they are presented in the paper.
	//results[0] = model.stateCount();
	//results[1] = model.getTransitionCount();
	//results[2] = memb.getDistinctQueries();
	//results[3] = equiv.getDistinctCeNum();
	//results[4] = equiv.getCachedCeNum();
	//results[5] = learner.getNumCEGuardUpdates();
	//results[6] = learner.getNumDetCE();
	//results[7] = learner.getNumCompCE();
 		return results;
}
 
Example #27
Source File: SAFA.java    From symbolicautomata with Apache License 2.0 5 votes vote down vote up
/**
 * Checks whether laut and raut are equivalent using bisimulation up to
 * congruence.
 */
public static <P, S, E extends BooleanExpression> Pair<Boolean, List<S>> isEquivalent(SAFA<P, S> laut,
		SAFA<P, S> raut, BooleanAlgebra<P, S> ba, BooleanExpressionFactory<E> boolexpr, long timeout)
				throws TimeoutException {
	Triple<SAFA<P, S>, PositiveBooleanExpression,PositiveBooleanExpression> triple = binaryOp(laut, raut, ba, BoolOp.Union);
	return checkEquivalenceOfTwoConfigurations(triple.getLeft(), triple.getMiddle(), triple.getRight(), ba, boolexpr, timeout);
}
 
Example #28
Source File: LTLUnitTest.java    From symbolicautomata with Apache License 2.0 5 votes vote down vote up
@Test
public void testLargeEmptiness() throws TimeoutException {
	int sizeTot = 4;

	for (int size = 2; size < sizeTot; size++) {

		LTLFormula<CharPred, Character> tot = new True<>();
		for (int i = 100; i < 100 + size; i++) {
			CharPred ch = new CharPred((char) i);
			LTLFormula<CharPred, Character> evch = ev(ba, ch);
			tot = new And<>(evch, tot);
		}
		SAFA<CharPred, Character> safa1 = tot.getSAFA(ba);
		long startTime = System.currentTimeMillis();

		boolean b = true;
		try {
			b = SAFA.isEmpty(safa1, ba);
			assertFalse(b);
		} catch (TimeoutException toe) {
			System.out.println(toe);
		}

		long stopTime = System.currentTimeMillis();
		long elapsedTime = stopTime - startTime;
		//System.out.println(size + " " + elapsedTime);
	}
}
 
Example #29
Source File: SFAUnitTest.java    From symbolicautomata with Apache License 2.0 5 votes vote down vote up
private SFA<CharPred, Character> getSFAc(UnaryCharIntervalSolver ba) {

		Collection<SFAMove<CharPred, Character>> transitionsA = new LinkedList<SFAMove<CharPred, Character>>();
		transitionsA.add(new SFAInputMove<CharPred, Character>(0, 0, alpha));
		try {
			return SFA.MkSFA(transitionsA, 0, Arrays.asList(0), ba);
		} catch (TimeoutException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
		return null;
	}
 
Example #30
Source File: SFAUnitTest.java    From symbolicautomata with Apache License 2.0 5 votes vote down vote up
private SFA<CharPred, Character> getSFAtoMin2(UnaryCharIntervalSolver ba) {

		Collection<SFAMove<CharPred, Character>> transitionsA = new LinkedList<SFAMove<CharPred, Character>>();

		transitionsA.add(new SFAInputMove<CharPred, Character>(0, 1, alpha));
		transitionsA.add(new SFAInputMove<CharPred, Character>(1, 2, alpha));
		transitionsA.add(new SFAInputMove<CharPred, Character>(2, 2, alpha));
		try {
			return SFA.MkSFA(transitionsA, 0, Arrays.asList(1, 2), ba);
		} catch (TimeoutException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
		return null;
	}