Examples of FSMStructure


Examples of statechum.analysis.learning.TestFSMAlgo.FSMStructure

   * Test method for {@link statechum.xmachine.model.testset.WMethod#appendSequence(statechum.analysis.learning.TestFSMAlgo.FSMStructure, java.util.Set, java.util.List)}.
   */
  @Test
  public final void testAppendSequence5()
  {
    FSMStructure fsm = getGraphData(buildGraph("A-p->A-b->B-c->B-a->C\nQ-d->S","testAppendSequence5"));
    PrefixFreeCollection sequences = new SlowPrefixFreeCollection();
    sequences.addSequence(Arrays.asList(new String[]{"p","b"}));
    Set<List<String>> expected = buildSet(new String[][]{
        new String[]{"p","b"},
        new String[]{"p","p","p"}
View Full Code Here

Examples of statechum.analysis.learning.TestFSMAlgo.FSMStructure

  /**
   * Test method for {@link statechum.xmachine.model.testset.WMethod#appendAllSequences(statechum.analysis.learning.TestFSMAlgo.FSMStructure, java.util.Set, java.util.Set)}.
   */
  @Test
  public final void testAppendAllSequences0() {
    FSMStructure fsm = getGraphData(buildGraph("A-p->A-b->B-c->B-a->C\nQ-d->S","testAppendAllSequences0"));
    PrefixFreeCollection sequences = new SlowPrefixFreeCollection();
    Set<List<String>> expected = buildSet(new String[][]{
        new String[]{"p","p","p"},
        new String[]{"g"}
      });
View Full Code Here

Examples of statechum.analysis.learning.TestFSMAlgo.FSMStructure

  /**
   * Test method for {@link statechum.xmachine.model.testset.WMethod#appendAllSequences(statechum.analysis.learning.TestFSMAlgo.FSMStructure, java.util.Set, java.util.Set)}.
   */
  @Test
  public final void testAppendAllSequences0b() {
    FSMStructure fsm = getGraphData(buildGraph("A-p->A-b->B-c->B-a->C\nQ-d->S","testAppendAllSequences0b"));
    PrefixFreeCollection sequences = new SlowPrefixFreeCollection();
    Set<List<String>> expected = buildSet(new String[][]{
      });
   
    WMethod.appendAllSequences(fsm, sequences, buildList(new String[][] {}));
View Full Code Here

Examples of statechum.analysis.learning.TestFSMAlgo.FSMStructure

  /**
   * Test method for {@link statechum.xmachine.model.testset.WMethod#appendAllSequences(statechum.analysis.learning.TestFSMAlgo.FSMStructure, java.util.Set, java.util.Set)}.
   */
  @Test
  public final void testAppendAllSequences1() {
    FSMStructure fsm = getGraphData(buildGraph("A-p->A-b->B-c->B-a->C\nQ-d->S","testAppendAllSequences1"));
    PrefixFreeCollection sequences = new SlowPrefixFreeCollection();
    sequences.addSequence(Arrays.asList(new String[]{"p","b"}));
    Set<List<String>> expected = buildSet(new String[][]{
        new String[]{"p","b"},
        new String[]{"g"},
View Full Code Here

Examples of statechum.analysis.learning.TestFSMAlgo.FSMStructure

  }

  public static void testWsetconstruction(String machine, boolean equivalentExpected, boolean reductionExpected)
  {
    DirectedSparseGraph g = buildGraph(machine,"testWset");
    FSMStructure fsm = getGraphData(g);//visFrame.update(null, g);
    Set<List<String>> origWset = new HashSet<List<String>>();
    try
    {
      origWset.addAll(WMethod.computeWSetOrig(fsm));
      Assert.assertEquals(false, equivalentExpected);
View Full Code Here

Examples of statechum.analysis.learning.TestFSMAlgo.FSMStructure

  }

  @Test
  public final void testWset4()
  {
    FSMStructure fsm = getGraphData(buildGraph("A-a->A","testWset"));
    Assert.assertTrue(WMethod.computeWSet(fsm).isEmpty());
  }
View Full Code Here

Examples of statechum.analysis.learning.TestFSMAlgo.FSMStructure

 
  @Test
  public final void testCheckEquivalentStates1() // equivalent states
  {
    DirectedSparseGraph g = buildGraph("S-a->A\nS-b->B\nS-c->C\nS-d->D\nS-e->E\nS-f->F\nS-h->H-d->H\nA-a->A1-b->A2-a->K1-a->K1\nB-a->B1-z->B2-b->K1\nC-a->C1-b->C2-a->K2-b->K2\nD-a->D1-b->D2-b->K2\nE-a->E1-b->E2-a->K3-c->K3\nF-a->F1-b->F2-b->K3","testCheckEquivalentStates1");
    FSMStructure fsm = getGraphData(g);
    Assert.assertEquals(true, WMethod.checkEquivalentStates(fsm));
  }
View Full Code Here

Examples of statechum.analysis.learning.TestFSMAlgo.FSMStructure

 
  @Test
  public final void testCheckEquivalentStates2() // no equivalent states
  {
    DirectedSparseGraph g = buildGraph("S-a->A\nS-b->B\nS-c->C\nS-d->D\nS-e->E\nS-f->F\nS-h->H-d->H\nA-a->A1-b->A2-a->K1-m->K1\nB-a->B1-b->B2-b->K1\nC-a->C1-b->C2-a->K2-z->K2\nD-a->D1-b->D2-b->K2\nE-a->E1-b->E2-a->K3-c->K3\nF-a->F1-b->F2-b->K3","testCheckEquivalentStates2");
    FSMStructure fsm = getGraphData(g);
    Assert.assertEquals(false, WMethod.checkEquivalentStates(fsm));
  }
View Full Code Here

Examples of statechum.analysis.learning.TestFSMAlgo.FSMStructure

  {
    int [][]table = new int[][] {
        {1,-1},
        {-1,1}
      };
    FSMStructure fsm = TestFSMAlgo.convertTableToFSMStructure(table, new int[]{0,1}, -1);
    Assert.assertEquals(false, WMethod.checkEquivalentStates(fsm));
  }
View Full Code Here

Examples of statechum.analysis.learning.TestFSMAlgo.FSMStructure

  {
    int [][]table = new int[][] {
        {1,-1},
        {1,-1}
      };
    FSMStructure fsm = TestFSMAlgo.convertTableToFSMStructure(table, new int[]{0,1}, -1);
    Assert.assertEquals(true, WMethod.checkEquivalentStates(fsm));
  }
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.