laser.regularlanguage.fsa.util.test
Class StringFSAsTests

java.lang.Object
  extended by junit.framework.Assert
      extended by junit.framework.TestCase
          extended by laser.regularlanguage.fsa.util.test.FSAsTests<StringLabel>
              extended by laser.regularlanguage.fsa.util.test.StringFSAsTests
All Implemented Interfaces:
junit.framework.Test

public class StringFSAsTests
extends FSAsTests<StringLabel>


Field Summary
protected  AlphabetFactoryInterface<StringLabel> alphabetFactory_
           
protected  int nextID_
           
 
Fields inherited from class laser.regularlanguage.fsa.util.test.FSAsTests
emptyFSA_, epsilonFSA_, fsasInstance_, labelFSA_, starFSA_
 
Constructor Summary
StringFSAsTests()
           
 
Method Summary
protected  FSAs<StringLabel> _createFSAsInstance()
          Creates the appropriate FSAs.
protected  void _setUp()
           
protected  AlphabetInterface<StringLabel> createAlphabetInstance()
          Creates a new empty alphabet.
protected  FSAEpsilonTransitionInterface<StringLabel> createFSAEpsilonTransitionInstance(MutableFSAInterface<StringLabel> fsa, FSAStateInterface<StringLabel> source, FSAStateInterface<StringLabel> target)
          Creates a new FSAEpsilonTransitionInterface from the given source to the given target within the specified FSA.
protected  FSALabelTransitionInterface<StringLabel> createFSALabelTransitionInstance(MutableFSAInterface<StringLabel> fsa, FSAStateInterface<StringLabel> source, FSAStateInterface<StringLabel> target, StringLabel l)
          Creates a new FSALabelTransitionInterface from the given source to the given target on the given label within the specified FSA.
protected  FSAStateInterface<StringLabel> createFSAStateInstance(MutableFSAInterface<StringLabel> fsa)
          Creates a new FSAStateInterface within the given FSA.
protected  StringLabel createLabelInstance()
          Creates a new label.
protected  MutableFSAInterface<StringLabel> createMutableDFAInstance()
          Creates a new mutable DFA.
protected  MutableFSAInterface<StringLabel> createMutableFSAInstance()
          Creates a new mutable FSA.
protected  java.lang.Object[] getCreateArgsForFSA()
          Gets any necessary arguments for the fsa factory method.
protected  java.lang.Object[] getCreateArgsForLabelTransition()
          Gets any necessary arguments for the label transition factory method.
protected  java.lang.Object[] getCreateArgsForState()
          Gets any necessary arguments for the state factory method.
 
Methods inherited from class laser.regularlanguage.fsa.util.test.FSAsTests
getRunnableEmptyFSA, getRunnableEpsilonFSA, getRunnableFSA, getRunnableLabelFSA, getRunnableStarFSA, setUp, testComplement, testComplementDeMorgansLawIntersect, testComplementDeMorgansLawUnion, testComplementEmptyIsEpsilon, testComplementFSAIntersectComplementFSAIsEmpty, testComplementFSAIsComplementComplementFSA, testComplementFSAUnionComplementFSAIsUniveral, testConcatenation, testConcatenationDFABecomesNFA, testConcatenationEmptyIsEmpty, testConcatenationEpsilonIsEquivalent, testDeleteUnnecessaryStatesReturnsFalse, testDeleteUnnecessaryStatesReturnsTrue, testDeterminizeDFA, testDeterminizeEpsilonFreeNFA, testDeterminizeNFA, testDifferenceAsymmetricLabelFSAEmptyFSANotSameAlphabet, testDifferenceAsymmetricLabelFSAEmptyFSASameAlphabet, testDifferenceAsymmetricLabelFSALabelFSA, testDifferenceSymmetricLabelFSAEmptyFSANotSameAlphabet, testDifferenceSymmetricLabelFSAEmptyFSASameAlphabet, testDifferenceSymmetricLabelFSALabelFSA, testInflateDestructiveAlphabetIsEquals, testInflateDestructiveAlphabetIsSubset, testInflateDestructiveAlphabetIsSuperset, testInflateDestructiveNullAlphabet, testInflateDestructiveNullFSA, testIntersect, testIntersectEmptyIsEmpty, testIntersectSameIsEquivalent, testIsEmptyReturnsFalse, testIsEmptyReturnsTrue, testIsEqivalentReturnsFalse, testIsEqivalentReturnsTrue, testMinimizeMinimalFSA, testMinimizeNotMinimalFSA, testProductAsIntersect, testProductEmptyIsEmpty, testProductSameIsEquivalent, testReplaceLabelsWithEpsilonLabelNotInSigma, testReplaceLabelsWithEpsilonLabelTransitions, testReplaceLabelsWithEpsilonNotLabelTransitions, testReplaceLabelsWithEpsilonNullLabel, testReplaceLabelsWithEpsilonNullLabels, testReverseDFABecomesNFA, testReverseReturnsIsEquivalent, testReverseReturnsNotIsEquivalent, testStar, testStarDFABecomesNFA, testStarEmptyIsEpsilon, testStarEpsilonIsEquivalent, testUnion, testUnionEmptyIsEquivalent, testUnionSameIsEquivalent
 
Methods inherited from class junit.framework.TestCase
countTestCases, createResult, getName, run, run, runBare, runTest, setName, tearDown, toString
 
Methods inherited from class junit.framework.Assert
assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertFalse, assertFalse, assertNotNull, assertNotNull, assertNotSame, assertNotSame, assertNull, assertNull, assertSame, assertSame, assertTrue, assertTrue, fail, fail, failNotEquals, failNotSame, failSame
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

alphabetFactory_

protected AlphabetFactoryInterface<StringLabel> alphabetFactory_

nextID_

protected int nextID_
Constructor Detail

StringFSAsTests

public StringFSAsTests()
Method Detail

_setUp

protected void _setUp()
               throws java.lang.Exception
Overrides:
_setUp in class FSAsTests<StringLabel>
Throws:
java.lang.Exception

_createFSAsInstance

protected FSAs<StringLabel> _createFSAsInstance()
Description copied from class: FSAsTests
Creates the appropriate FSAs. POSTCONDITION:

Specified by:
_createFSAsInstance in class FSAsTests<StringLabel>
Returns:
The appropriate FSAs

createMutableDFAInstance

protected MutableFSAInterface<StringLabel> createMutableDFAInstance()
Creates a new mutable DFA. POSTCONDITION:

Specified by:
createMutableDFAInstance in class FSAsTests<StringLabel>
Returns:
A new mutable DFA

createMutableFSAInstance

protected MutableFSAInterface<StringLabel> createMutableFSAInstance()
Creates a new mutable FSA. POSTCONDITION:

Specified by:
createMutableFSAInstance in class FSAsTests<StringLabel>
Returns:
A new mutable FSA

getCreateArgsForFSA

protected java.lang.Object[] getCreateArgsForFSA()
Description copied from class: FSAsTests
Gets any necessary arguments for the fsa factory method.

Specified by:
getCreateArgsForFSA in class FSAsTests<StringLabel>
Returns:
Any necessary arguments

getCreateArgsForState

protected java.lang.Object[] getCreateArgsForState()
Description copied from class: FSAsTests
Gets any necessary arguments for the state factory method.

Specified by:
getCreateArgsForState in class FSAsTests<StringLabel>
Returns:
Any necessary arguments

getCreateArgsForLabelTransition

protected java.lang.Object[] getCreateArgsForLabelTransition()
Gets any necessary arguments for the label transition factory method.

Specified by:
getCreateArgsForLabelTransition in class FSAsTests<StringLabel>
Returns:
Any necessary arguments

createAlphabetInstance

protected AlphabetInterface<StringLabel> createAlphabetInstance()
Description copied from class: FSAsTests
Creates a new empty alphabet. NOTE: This is the alphabet factory method.

POSTCONDITIONS:

Specified by:
createAlphabetInstance in class FSAsTests<StringLabel>
Returns:
A new empty alphabet

createLabelInstance

protected StringLabel createLabelInstance()
Description copied from class: FSAsTests
Creates a new label. NOTE: This is the label factory method.

POSTCONDITIONS:

Specified by:
createLabelInstance in class FSAsTests<StringLabel>
Returns:
A new label

createFSAStateInstance

protected FSAStateInterface<StringLabel> createFSAStateInstance(MutableFSAInterface<StringLabel> fsa)
Description copied from class: FSAsTests
Creates a new FSAStateInterface within the given FSA. NOTE: This is the state factory method.

POSTCONDITIONS:

Specified by:
createFSAStateInstance in class FSAsTests<StringLabel>
Parameters:
fsa - The FSA that will contain the new state
Returns:
The new state

createFSAEpsilonTransitionInstance

protected FSAEpsilonTransitionInterface<StringLabel> createFSAEpsilonTransitionInstance(MutableFSAInterface<StringLabel> fsa,
                                                                                        FSAStateInterface<StringLabel> source,
                                                                                        FSAStateInterface<StringLabel> target)
Creates a new FSAEpsilonTransitionInterface from the given source to the given target within the specified FSA.

Specified by:
createFSAEpsilonTransitionInstance in class FSAsTests<StringLabel>
Parameters:
fsa - The FSA that will contain the new epsilon transition
source - The source for the new epsilon transition
target - The target for the new epsilon transition
Returns:
The new epsilon transition

createFSALabelTransitionInstance

protected FSALabelTransitionInterface<StringLabel> createFSALabelTransitionInstance(MutableFSAInterface<StringLabel> fsa,
                                                                                    FSAStateInterface<StringLabel> source,
                                                                                    FSAStateInterface<StringLabel> target,
                                                                                    StringLabel l)
Creates a new FSALabelTransitionInterface from the given source to the given target on the given label within the specified FSA.

Specified by:
createFSALabelTransitionInstance in class FSAsTests<StringLabel>
Parameters:
fsa - The FSA that will contain the new label transition
source - The source for the new label transition
target - The target for the new label transition
l - The label for the new label transition
Returns:
The new label transition