Examples of AutomatonSpecification


Examples of pl.edu.amu.wmi.daut.base.AutomatonSpecification

     *     postaci {(ab)^n : n>0}
     * automaton2 - automatu pustego.
     */
    public final void testCreateAutomatonFromTwoAutomata2() {

        AutomatonSpecification automaton1 = new NaiveAutomatonSpecification();

        State q0 = automaton1.addState();
        State q1 = automaton1.addState();
        State q2 = automaton1.addState();
        automaton1.addTransition(q0, q1, new CharTransitionLabel('a'));
        automaton1.addTransition(q1, q2, new CharTransitionLabel('b'));
        automaton1.addTransition(q2, q1, new CharTransitionLabel('a'));

        automaton1.markAsInitial(q0);
        automaton1.markAsFinal(q2);

        AutomatonSpecification automaton2 = new NaiveAutomatonSpecification();

        AlternativeOperator oper = new AlternativeOperator();
        NondeterministicAutomatonByThompsonApproach result =
        new NondeterministicAutomatonByThompsonApproach(
                oper.createAutomatonFromTwoAutomata(automaton1, automaton2));
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.