Package statechum.model.testset.PTASequenceEngine

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


  public final void test_sequenceSet_testing_shouldBeReturned2b() // a test for shouldBeReturned
  {
    final LearnerGraph machine = buildLearnerGraph("P-a->P\nA-a->A-b->B", "test_sequenceSet_testing_shouldBeReturned2b",mainConfiguration,converter);
    en = new PTA_FSMStructure(machine,machine.findVertex(VertexID.parseID("A")));
    SequenceSet seq = en.new SequenceSet();seq.setIdentity();
    Map<String,String> actual = getDebugDataMap(en,seq.crossWithSet(labelList(new String[] {"b","a"}))
      .crossWithSet(labelList(new String[] {"b","a"})));
    Map<String,String> expected=TestFSMAlgo.buildStringMap(new Object[][] {
        new Object[]{new String[] {"a","a"}, PTASequenceEngine.DebugDataValues.booleanToString(true, true)},
        new Object[]{new String[] {"a","b"}, PTASequenceEngine.DebugDataValues.booleanToString(true, true)}
    });
View Full Code Here


          }     
        });
      }
    };
    SequenceSet seq = en.new SequenceSet();seq.setIdentity();
    Map<String,String> actual = getDebugDataMap(en,seq.crossWithSet(labelList(new String[] {"b","a"}))
      .crossWithSet(labelList(new String[] {"b","a"})));
    vertifyPTA(en, 2, new String[][] {
        new String[] {"a","b"},
        new String[] {"a","a"}
    });
View Full Code Here

  public final void test_stringCollectionSize2()
  {
    fsm = buildLearnerGraph("A-a->A-b->B", "test_sequenceSet3_6",mainConfiguration,converter);
    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

    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

    List<Collection<Label>> sequenceOfSets = merged.paths.COMPAT_computePathsSBetween(merged.getInit(),mergedRed);
    if (sequenceOfSets == null)
      throw new IllegalArgumentException("failed to find the red state in the merge result");
    for(Collection<Label> inputsToMultWith:sequenceOfSets)
      initp = initp.crossWithSet(inputsToMultWith);
    paths.unite(initp);
    //merged.paths.computePathsSBetweenBooleanReduced(merged.init,mergedRed, initp, paths);
   
    Collection<Label> inputsToMultWith = new LinkedList<Label>();
    for(Entry<Label,CmpVertex> loopEntry:merged.transitionMatrix.get(mergedRed).entrySet())
View Full Code Here

          {// 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

    List<Collection<Label>> sequenceOfSets = merged.paths.COMPAT_computePathsSBetween(merged.getInit(),mergedRed);
    if (sequenceOfSets == null)
      throw new IllegalArgumentException("failed to find the red state in the merge result");
    for(Collection<Label> inputsToMultWith:sequenceOfSets)
      initp = initp.crossWithSet(inputsToMultWith);
    paths.unite(initp);
    //merged.paths.computePathsSBetweenBooleanReduced(merged.init,mergedRed, initp, paths);
   
    Collection<Label> inputsToMultWith = new LinkedList<Label>();
    for(Entry<Label,CmpVertex> loopEntry:merged.transitionMatrix.get(mergedRed).entrySet())
View Full Code Here

          {// 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

    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

    List<Collection<String>> sequenceOfSets = merged.paths.COMPAT_computePathsSBetween(merged.getInit(),mergedRed);
    if (sequenceOfSets == null)
      throw new IllegalArgumentException("failed to find the red state in the merge result");
    for(Collection<String> inputsToMultWith:sequenceOfSets)
      initp = initp.crossWithSet(inputsToMultWith);
    paths.unite(initp);
    //merged.paths.computePathsSBetweenBooleanReduced(merged.init,mergedRed, initp, paths);
   
    Collection<String> inputsToMultWith = new LinkedList<String>();
    for(Entry<String,CmpVertex> loopEntry:merged.transitionMatrix.get(mergedRed).entrySet())
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.