Examples of SlowPrefixFreeCollection


Examples of statechum.model.testset.SlowPrefixFreeCollection

   */
  @Test
  public final void testAppendSequence5()
  {
    LearnerGraph fsm = buildLearnerGraph("A-p->A-b->B-c->B-a->C\nQ-d->S","testAppendSequence5",config,converter);
    PrefixFreeCollection sequences = new SlowPrefixFreeCollection();
    sequences.addSequence(labelList(new String[]{"p","b"}));
    Set<List<Label>> expected = buildSet(new String[][]{
        new String[]{"p","b"},
        new String[]{"p","p","p"}
      },config,converter);
   
    fsm.wmethod.appendSequence(sequences, labelList(new String[]{"p"}));
    fsm.wmethod.appendSequence(sequences, labelList(new String[]{"p","p"}));
    fsm.wmethod.appendSequence(sequences, labelList(new String[]{"p","p","p"}));
    Set<List<Label>> actual = new HashSet<List<Label>>();actual.addAll(sequences.getData());
    Assert.assertTrue("expected : "+expected+" got: "+actual,expected.equals(actual));
  }
View Full Code Here

Examples of statechum.model.testset.SlowPrefixFreeCollection

   * Test method for {@link statechum.analysis.learning.rpnicore.WMethod#appendAllSequences(statechum.analysis.learning.TestFSMAlgo.FSMStructure, java.util.Set, java.util.Set)}.
   */
  @Test
  public final void testAppendAllSequences0() {
    LearnerGraph fsm = buildLearnerGraph("A-p->A-b->B-c->B-a->C\nQ-d->S","testAppendAllSequences0",config,converter);
    PrefixFreeCollection sequences = new SlowPrefixFreeCollection();
    Set<List<Label>> expected = buildSet(new String[][]{
        new String[]{"p","p","p"},
        new String[]{"g"}
      },config,converter);
   
    fsm.wmethod.appendAllSequences(sequences, buildList(new String[][] {
        new String[]{"p"},
        new String[]{"p","p"},
        new String[] {},
        new String [] {"g"},
        new String[]{"p","p","p"}}
    ,config,converter));
    Set<List<Label>> actual = new HashSet<List<Label>>();actual.addAll(sequences.getData());
    Assert.assertTrue("expected : "+expected+" got: "+actual,expected.equals(actual));
  }
View Full Code Here

Examples of statechum.model.testset.SlowPrefixFreeCollection

   * Test method for {@link statechum.analysis.learning.rpnicore.WMethod#appendAllSequences(statechum.analysis.learning.TestFSMAlgo.FSMStructure, java.util.Set, java.util.Set)}.
   */
  @Test
  public final void testAppendAllSequences0b() {
    LearnerGraph fsm = buildLearnerGraph("A-p->A-b->B-c->B-a->C\nQ-d->S","testAppendAllSequences0b",config,converter);
    PrefixFreeCollection sequences = new SlowPrefixFreeCollection();
    Set<List<Label>> expected = buildSet(new String[][]{
      },config,converter);
   
    fsm.wmethod.appendAllSequences(sequences, buildList(new String[][] {},config,converter));
    Set<List<Label>> actual = new HashSet<List<Label>>();actual.addAll(sequences.getData());
    Assert.assertTrue("expected : "+expected+" got: "+actual,expected.equals(actual));
  }
View Full Code Here

Examples of statechum.model.testset.SlowPrefixFreeCollection

   * Test method for {@link statechum.analysis.learning.rpnicore.WMethod#appendAllSequences(statechum.analysis.learning.TestFSMAlgo.FSMStructure, java.util.Set, java.util.Set)}.
   */
  @Test
  public final void testAppendAllSequences1() {
    LearnerGraph fsm = buildLearnerGraph("A-p->A-b->B-c->B-a->C\nQ-d->S","testAppendAllSequences1",config,converter);
    PrefixFreeCollection sequences = new SlowPrefixFreeCollection();
    sequences.addSequence(labelList(new String[]{"p","b"}));
    Set<List<Label>> expected = buildSet(new String[][]{
        new String[]{"p","b"},
        new String[]{"g"},
        new String[]{"p","p","p"}
      },config,converter);
   
    fsm.wmethod.appendAllSequences(sequences, buildList(new String[][] {
        new String[]{"p"},
        new String[]{"p","p"},
        new String[] {},
        new String [] {"g"},
        new String[]{"p","p","p"}}
    ,config,converter));
    Set<List<Label>> actual = new HashSet<List<Label>>();actual.addAll(sequences.getData());
    Assert.assertTrue("expected : "+expected+" got: "+actual,expected.equals(actual));
  }
View Full Code Here

Examples of statechum.model.testset.SlowPrefixFreeCollection

    Set<String> alphabet =  coregraph.learnerCache.getAlphabet();
    List<List<String>> partialSet = coregraph.pathroutines.computeStateCover(coregraph.getInit());
    characterisationSet = computeWSet_reducedmemory(coregraph);if (characterisationSet.isEmpty()) characterisationSet.add(Arrays.asList(new String[]{}));
    transitionCover = crossWithSet(partialSet,alphabet);transitionCover.addAll(partialSet);

    SlowPrefixFreeCollection testsequenceCollection = new SlowPrefixFreeCollection();
   
    appendAllSequences(testsequenceCollection, cross(partialSet,characterisationSet));
    for(int i=0;i<=numberOfExtraStates;i++)
    {
      partialSet=crossWithSet(partialSet,alphabet);
      appendAllSequences(testsequenceCollection, cross(partialSet,characterisationSet));
    }
   
    return testsequenceCollection.getData();
  }
View Full Code Here

Examples of statechum.model.testset.SlowPrefixFreeCollection

   */
  @Test
  public final void testAppendSequence0()
  {
    LearnerGraph fsm = buildLearnerGraph("A-p->A-b->B-c->B-a->C\nQ-d->S","testAppendSequence0",config,converter);
    PrefixFreeCollection sequences = new SlowPrefixFreeCollection();
    Set<List<Label>> expected = buildSet(new String[][]{
        new String[]{}
      },config,converter);
   
    fsm.wmethod.appendSequence(sequences, labelList(new String[]{}));
    Set<List<Label>> actual = new HashSet<List<Label>>();actual.addAll(sequences.getData());
    Assert.assertTrue("expected : "+expected+" got: "+actual,expected.equals(actual));
  }
View Full Code Here

Examples of statechum.model.testset.SlowPrefixFreeCollection

   */
  @Test
  public final void testAppendSequence0b()
  {
    LearnerGraph fsm = buildLearnerGraph("A-p->A-b->B-c->B-a->C\nQ-d->S","testAppendSequence0b",config,converter);
    PrefixFreeCollection sequences = new SlowPrefixFreeCollection();
    sequences.addSequence(labelList(new String[]{}));

    Set<List<Label>> expected = buildSet(new String[][]{
        new String[]{}
      },config,converter);
   
    fsm.wmethod.appendSequence(sequences, labelList(new String[]{}));
    Set<List<Label>> actual = new HashSet<List<Label>>();actual.addAll(sequences.getData());
    Assert.assertTrue("expected : "+expected+" got: "+actual,expected.equals(actual));
  }
View Full Code Here

Examples of statechum.model.testset.SlowPrefixFreeCollection

   */
  @Test
  public final void testAppendSequence1()
  {
    LearnerGraph fsm = buildLearnerGraph("A-p->A-b->B-c->B-a->C\nQ-d->S","testAppendSequence1",config,converter);
    PrefixFreeCollection sequences = new SlowPrefixFreeCollection();
    sequences.addSequence(labelList(new String[]{"p","b"}));
    Set<List<Label>> expected = buildSet(new String[][]{
        new String[]{"p","b"}
      },config,converter);
   
    fsm.wmethod.appendSequence(sequences, labelList(new String[]{}));
    Set<List<Label>> actual = new HashSet<List<Label>>();actual.addAll(sequences.getData());
    Assert.assertTrue("expected : "+expected+" got: "+actual,expected.equals(actual));
  }
View Full Code Here

Examples of statechum.model.testset.SlowPrefixFreeCollection

   */
  @Test
  public final void testAppendSequence2()
  {
    LearnerGraph fsm = buildLearnerGraph("A-p->A-b->B-c->B-a->C\nQ-d->S","testAppendSequence2",config,converter);
    PrefixFreeCollection sequences = new SlowPrefixFreeCollection();
    sequences.addSequence(labelList(new String[]{"p","b"}));
    Set<List<Label>> expected = buildSet(new String[][]{
        new String[]{"p","b"}
      },config,converter);
   
    fsm.wmethod.appendSequence(sequences, labelList(new String[]{"p","b"}));
    Set<List<Label>> actual = new HashSet<List<Label>>();actual.addAll(sequences.getData());
    Assert.assertTrue("expected : "+expected+" got: "+actual,expected.equals(actual));
  }
View Full Code Here

Examples of statechum.model.testset.SlowPrefixFreeCollection

   */
  @Test
  public final void testAppendSequence3()
  {
    LearnerGraph fsm = buildLearnerGraph("A-p->A-b->B-c->B-a->C\nQ-d->S","testAppendSequence3",config,converter);
    PrefixFreeCollection sequences = new SlowPrefixFreeCollection();
    sequences.addSequence(labelList(new String[]{"p","b"}));
    Set<List<Label>> expected = buildSet(new String[][]{
        new String[]{"p","b","c"}
      },config,converter);
   
    fsm.wmethod.appendSequence(sequences, labelList(new String[]{"p","b","c"}));
    Set<List<Label>> actual = new HashSet<List<Label>>();actual.addAll(sequences.getData());
    Assert.assertTrue("expected : "+expected+" got: "+actual,expected.equals(actual));
  }
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.