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


      if (pathsToCurrentState != null)
      {
        assert state.mergedVertex.getColour() != JUConstants.AMBER;
        //System.out.println(pairOrig+" : "+state.mergedVertex+" inputs are "+learnt.transitionMatrix.get(state.mergedVertex).keySet());
        // if a path from the merged red state to the current one can be found, update the set of questions.
        pathsToCurrentState.crossWithSet(learnt.transitionMatrix.get(state.mergedVertex).keySet());
        // Note that we do not care what the result of crossWithSet is - for those states which
        // do not exist in the underlying graph, reject vertices will be added by the engine and
        // hence will be returned when we do a .getData() on the engine.
      }
    }
View Full Code Here

      }
           
      SequenceSet pathsToCurrentState = fanout.get(state.mergedVertex);
      if (pathsToCurrentState != null)
        // if a path from the merged red state to the current one can be found, update the set of questions.
        pathsToCurrentState.crossWithSet(learnt.transitionMatrix.get(state.mergedVertex).keySet());
        // Note that we do not care what the result of crossWithSet is - for those states which
        // do not exist in the underlying graph, reject vertices will be added by the engine and
        // hence will be returned when we do a .getData() on the engine.
    }
   
View Full Code Here

      {
        SequenceSet pathsToCurrentState = fanout.get(vert);
        if (pathsToCurrentState != null)
        {
          pathsToCurrentState.limitTo(original.config.getQuestionPathUnionLimit());
          pathsToCurrentState.crossWithSet(learnt.transitionMatrix.get(state.mergedVertex).keySet());// attempt all possible continuation vertices
        }
      }
    }
   
  }
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

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

 
  @Test
  public final void test_sequenceSet6() // a composition of sequenceSet with 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"}))
      .crossWithSet(labelList(new String[] {"a"})));
    vertifyPTA(en, 1, new String[][] {
        new String[] {"c"}
    });
    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.