Package statechum.model.testset.PTASequenceEngine

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


    SequenceSet temp2 = temp.crossWithSet(Arrays.asList(new String[] {"u","a","d"}))
    .crossWithSet(Arrays.asList(new String[] {"a"}))
    .crossWithSet(Arrays.asList(new String[] {"b"}))
    .crossWithSet(Arrays.asList(new String[] {"c"}));
    Map<String,String> actual3_1 = getDebugDataMap(en,temp2);// before PTA is updated, the long path should be a leaf ...
    Map<String,String> actual4 = getDebugDataMap(en,temp2.crossWithSet(Arrays.asList(new String[] {"b","a"})));
    Map<String,String> actual3_2 = getDebugDataMap(en,temp2);// after it is updated, that path should no longer be a leaf.
    Map<String,String> actual1 = getDebugDataMap(en,temp_0);
    Map<String,String> actual2 = getDebugDataMap(en,temp_1);
    vertifyPTA(en, 11, new String[][] {
        new String[] {"b"},
View Full Code Here


    fsm = new LearnerGraph(TestFSMAlgo.buildGraph("A-a->B-a->A-b-#C\nA-d->M-a->N\nB-b->D-c->E", "test_sequenceSet3_5"),config);
    en = new PTA_FSMStructure(fsm);   
    SequenceSet seq = en.new SequenceSet();seq.setIdentity();
    SequenceSet temp2 = seq.crossWithSet(Arrays.asList(new String[] {"b","a","d"}))
      .crossWithSet(Arrays.asList(new String[] {"b","a","d"}));
    Map<String,String> actual2 = getDebugDataMap(en,temp2.crossWithSet(Arrays.asList(new String[] {"a"})));
    Map<String,String> actual1 = getDebugDataMap(en,temp2);
    vertifyPTA(en, 7, new String[][] {
        new String[] {"b"},
        new String[] {"a","a","a"},
        new String[] {"a","b","a"},
View Full Code Here

  public final void test_sequenceSet3_6() // a more complex composition
  {
    fsm = new LearnerGraph(TestFSMAlgo.buildGraph("A-a->A-b->B", "test_sequenceSet3_6"),config);
    en = new PTA_FSMStructure(fsm);   
    SequenceSet seq = en.new SequenceSet();seq.setIdentity();
    Map<String,String> actual = getDebugDataMap(en,seq.crossWithSet(Arrays.asList(new String[] {"b","a"}))
      .crossWithSet(Arrays.asList(new String[] {"b","a"}))
      .crossWithSet(Arrays.asList(new String[] {"a","b"})));
    vertifyPTA(en, 6, new String[][] {
        new String[] {"b","b"},
        new String[] {"b","a"},
View Full Code Here

          }     
        });
      }
    };
    SequenceSet seq = en.new SequenceSet();seq.setIdentity();
    Map<String,String> actual = getDebugDataMap(en,seq.crossWithSet(Arrays.asList(new String[] {"b","a"}))
      .crossWithSet(Arrays.asList(new String[] {"b","a"})));
    vertifyPTA(en, 1, new String[][] {
        new String[] {"a","b"}
    });
    Map<String,String> expected=TestFSMAlgo.buildStringMap(new Object[][] {
View Full Code Here

    vertifyPTA(filtered, 2, new String[][] {
        new String[] {"a","b"},
        new String[] {"b","b"}
    });
    // now modify the original PTA
    nodeD.crossWithSet(Arrays.asList(new String[]{"a","c"}));
    vertifyPTA(en, 2, new String[][] {
        new String[] {"a","b","c"},
        new String[] {"b","b","c"}
    });
    // and check that filtered version is not affected
View Full Code Here

          }     
        });
      }
    };
    SequenceSet seq = en.new SequenceSet();seq.setIdentity();
    Map<String,String> actual = getDebugDataMap(en,seq.crossWithSet(Arrays.asList(new String[] {"b","a"}))
      .crossWithSet(Arrays.asList(new String[] {"b","a"})));
    vertifyPTA(en, 0, new String[][] {
    });
    Map<String,String> expected=TestFSMAlgo.buildStringMap(new Object[][] {
        new Object[]{new String[] {"a","a"}, PTASequenceEngine.DebugDataValues.booleanToString(true, false)},
View Full Code Here

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

   
    for(Entry<CmpVertex,Map<String,CmpVertex>> entry:what.transitionMatrix.entrySet())
    {// for all states in our new machine, compute paths to them.
      SequenceSet result = engine.new SequenceSet();
      what.paths.computePathsSBetween(what.init, entry.getKey(), initSet, result);
      result.crossWithSet(entry.getValue().keySet());
    }
   
    // Now engine contains a sort of a transition cover of "what", except that only
    // transitions present in "what" will be covered. All sequences in this set have
    // initPath prepended to them, so that I can merge the result into g directly.
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.getData();
  }
View Full Code Here

    List<Collection<String>> sequenceOfSets = merged.paths.computePathsSBetween(merged.init,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.