Package statechum.model.testset.PTASequenceEngine

Examples of statechum.model.testset.PTASequenceEngine.SequenceSet.crossWithSet()


          {// Note an input corresponding to any loop in temp can be followed in the original machine, since
           // a loop in temp is either due to the merge or because it was there in the first place.
            inputsToMultWith.add(loopEntry.getKey());
          }
        SequenceSet pathsToMergedRed = data.getPathsToLearnt();
        pathsToMergedRed.unite(pathsToMergedRed.crossWithSet(inputsToMultWith));// the resulting path does a "transition cover" on all transitions leaving the red state.
       
        // Now we limit the number of elements in pathsToMerged to the value specified in the configuration.
        // This will not affect the underlying graph, but it does not really matter since all
        // elements in that graph are accept-states by construction of pathsToMergedRed and hence
        // not be returned.
View Full Code Here


 
  @Test
  public final void testPrecisionRecall0()
  {
    SequenceSet seq = en.new SequenceSet();
    seq.crossWithSet(Arrays.asList(new String[] {"a"})); // appending anything to an empty sequence produces an empty sequence.
    TestPTASequenceEngine.vertifyPTA(en, 1, new String[][] {
        new String[] {}
    });
  }
 
View Full Code Here

   
    PTASequenceEngine sequences = new PTA_FSMStructureAccept(buildLearnerGraph("A-a->A-b->B-b->B-a-#X / B-c->C-c->C-a-#X / C-b->D-a->D-c->D","testCheckPrecisionRecallBruteForce_reference",config));
    PTASequenceEngine.SequenceSet initSet = sequences.new SequenceSet();initSet.setIdentity();
    Set<Label> alphabet = graph.pathroutines.computeAlphabet();
    for(int i=0;i < 12;++i)
      initSet = initSet.crossWithSet(alphabet);
   
    // Second, we run them on both graphs
   
    PosNegPrecisionRecall bruteForcePR = computePrecisionRecall(graph, sequences);
    PTA_computePrecisionRecall precRec = new PTA_computePrecisionRecall(graph);
View Full Code Here

  @Test
  public final void testPrecisionRecall0()
  {
    PTASequenceEngine en = new PTA_FSMStructure(fsm,null);
    SequenceSet seq = en.new SequenceSet();
    seq.crossWithSet(labelList(new String[] {"a"})); // appending anything to an empty sequence produces an empty sequence.
    TestPTASequenceEngine.vertifyPTA(en, 1, new String[][] {
        new String[] {}
    },fsm.config);
  }
 
View Full Code Here

    partialPTA = partialPTA.cross(stateCover);
   
    partialPTA.cross(characterisationSet);
    for(int i=0;i<=numberOfExtraStates;i++)
    {
      partialPTA = partialPTA.crossWithSet(alphabet);
      partialPTA.cross(characterisationSet);
    }
   
    return engine;
  }
View Full Code Here

  public final void test_stringCollectionSize2()
  {
    fsm = buildLearnerGraph("A-a->A-b->B", "test_sequenceSet3_6",config);
    en = new PTA_FSMStructure(fsm,null);   
    SequenceSet seq = en.new SequenceSet();seq.setIdentity();
    seq.crossWithSet(labelList(new String[] {"b","a"}))
      .crossWithSet(labelList(new String[] {"b","a"}))
      .crossWithSet(labelList(new String[] {"a","b"}));
    vertifyPTA(en, 6, new String[][] {
        new String[] {"b","b"},
        new String[] {"b","a"},
View Full Code Here

 
  @Test
  public final void test_sequenceSet1()
  {
    SequenceSet seq = en.new SequenceSet();
    Map<String,String> actual = getDebugDataMap(en,seq.crossWithSet(labelList(new String[] {"a"}))); // appending anything to an empty sequence produces an empty sequence.
    vertifyPTA(en, 1, new String[][] {
        new String[] {} // there is only an empty path but since reject-nodes are returned, this path is returned.
    });
    Map<String,String>  expected=TestFSMAlgo.buildStringMap(new Object[][] {
    });
View Full Code Here

 
  @Test
  public final void test_sequenceSet2() // an input which exists
  {
    SequenceSet seq = en.new SequenceSet();seq.setIdentity();
    Map<String,String> actual = getDebugDataMap(en,seq.crossWithSet(labelList(new String[] {"a"})));
    vertifyPTA(en, 1, new String[][] {
        new String[] {"a"}
    });
    Map<String,String>  expected=TestFSMAlgo.buildStringMap(new Object[][] {
        new Object[]{new String[] {"a"}, PTASequenceEngine.DebugDataValues.booleanToString(true, true)}
View Full Code Here

 
  @Test
  public final void test_sequenceSet3() // the one which does not exist
  {
    SequenceSet seq = en.new SequenceSet();seq.setIdentity();
    Map<String,String> actual = getDebugDataMap(en,seq.crossWithSet(labelList(new String[] {"c"})));
    vertifyPTA(en, 1, new String[][] {
        new String[] {"c"}
    });
    Map<String,String>  expected=TestFSMAlgo.buildStringMap(new Object[][] {
    });
View Full Code Here

 
  @Test
  public final void test_sequenceSet4() // the one which enters a reject state
  {
    SequenceSet seq = en.new SequenceSet();seq.setIdentity();
    Map<String,String> actual = getDebugDataMap(en,seq.crossWithSet(labelList(new String[] {"b"})));
    vertifyPTA(en, 1, new String[][] {
        new String[] {"b"}
    });
    Map<String,String>  expected=TestFSMAlgo.buildStringMap(new Object[][] {
    });
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.