Examples of SlowPrefixFreeCollection


Examples of statechum.model.testset.SlowPrefixFreeCollection

    Set<String> alphabet =  coregraph.learnerCache.getAlphabet();
    List<List<String>> partialSet = computeStateCover();
    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 = new LearnerGraph(buildGraph("A-p->A-b->B-c->B-a->C\nQ-d->S","testAppendSequence0"),config);
    PrefixFreeCollection sequences = new SlowPrefixFreeCollection();
    Set<List<String>> expected = buildSet(new String[][]{
        new String[]{}
      });
   
    fsm.wmethod.appendSequence(sequences, Arrays.asList(new String[]{}));
    Set<List<String>> actual = new HashSet<List<String>>();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 = new LearnerGraph(buildGraph("A-p->A-b->B-c->B-a->C\nQ-d->S","testAppendSequence0b"),config);
    PrefixFreeCollection sequences = new SlowPrefixFreeCollection();
    sequences.addSequence(Arrays.asList(new String[]{}));

    Set<List<String>> expected = buildSet(new String[][]{
        new String[]{}
      });
   
    fsm.wmethod.appendSequence(sequences, Arrays.asList(new String[]{}));
    Set<List<String>> actual = new HashSet<List<String>>();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 = new LearnerGraph(buildGraph("A-p->A-b->B-c->B-a->C\nQ-d->S","testAppendSequence1"),config);
    PrefixFreeCollection sequences = new SlowPrefixFreeCollection();
    sequences.addSequence(Arrays.asList(new String[]{"p","b"}));
    Set<List<String>> expected = buildSet(new String[][]{
        new String[]{"p","b"}
      });
   
    fsm.wmethod.appendSequence(sequences, Arrays.asList(new String[]{}));
    Set<List<String>> actual = new HashSet<List<String>>();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 = new LearnerGraph(buildGraph("A-p->A-b->B-c->B-a->C\nQ-d->S","testAppendSequence2"),config);
    PrefixFreeCollection sequences = new SlowPrefixFreeCollection();
    sequences.addSequence(Arrays.asList(new String[]{"p","b"}));
    Set<List<String>> expected = buildSet(new String[][]{
        new String[]{"p","b"}
      });
   
    fsm.wmethod.appendSequence(sequences, Arrays.asList(new String[]{"p","b"}));
    Set<List<String>> actual = new HashSet<List<String>>();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 = new LearnerGraph(buildGraph("A-p->A-b->B-c->B-a->C\nQ-d->S","testAppendSequence3"),config);
    PrefixFreeCollection sequences = new SlowPrefixFreeCollection();
    sequences.addSequence(Arrays.asList(new String[]{"p","b"}));
    Set<List<String>> expected = buildSet(new String[][]{
        new String[]{"p","b","c"}
      });
   
    fsm.wmethod.appendSequence(sequences, Arrays.asList(new String[]{"p","b","c"}));
    Set<List<String>> actual = new HashSet<List<String>>();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 testAppendSequence4()
  {
    LearnerGraph fsm = new LearnerGraph(buildGraph("A-p->A-b->B-c->B-a->C\nQ-d->S","testAppendSequence4"),config);
    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"}
      });
   
    fsm.wmethod.appendSequence(sequences, Arrays.asList(new String[]{"p","p"}));
    Set<List<String>> actual = new HashSet<List<String>>();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 testAppendSequence5()
  {
    LearnerGraph fsm = new LearnerGraph(buildGraph("A-p->A-b->B-c->B-a->C\nQ-d->S","testAppendSequence5"),config);
    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"}
      });
   
    fsm.wmethod.appendSequence(sequences, Arrays.asList(new String[]{"p"}));
    fsm.wmethod.appendSequence(sequences, Arrays.asList(new String[]{"p","p"}));
    fsm.wmethod.appendSequence(sequences, Arrays.asList(new String[]{"p","p","p"}));
    Set<List<String>> actual = new HashSet<List<String>>();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 = new LearnerGraph(buildGraph("A-p->A-b->B-c->B-a->C\nQ-d->S","testAppendAllSequences0"),config);
    PrefixFreeCollection sequences = new SlowPrefixFreeCollection();
    Set<List<String>> expected = buildSet(new String[][]{
        new String[]{"p","p","p"},
        new String[]{"g"}
      });
   
    fsm.wmethod.appendAllSequences(sequences, buildList(new String[][] {
        new String[]{"p"},new String[]{"p","p"},new String[] {}, new String [] {"g"},new String[]{"p","p","p"}}));
    Set<List<String>> actual = new HashSet<List<String>>();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 = new LearnerGraph(buildGraph("A-p->A-b->B-c->B-a->C\nQ-d->S","testAppendAllSequences0b"),config);
    PrefixFreeCollection sequences = new SlowPrefixFreeCollection();
    Set<List<String>> expected = buildSet(new String[][]{
      });
   
    fsm.wmethod.appendAllSequences(sequences, buildList(new String[][] {}));
    Set<List<String>> actual = new HashSet<List<String>>();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.