Package statechum.xmachine.model.testset.PTATestSequenceEngine

Examples of statechum.xmachine.model.testset.PTATestSequenceEngine.sequenceSet.cross()


    characterisationSet = computeWSet(fsm);if (characterisationSet.isEmpty()) characterisationSet.add(Arrays.asList(new String[]{}));
    transitionCover = crossWithSet(stateCover,alphabet);transitionCover.addAll(stateCover);

    PTATestSequenceEngine engine = new PTA_FSMStructure(fsm);
    sequenceSet partialPTA = engine.new sequenceSet();partialPTA.setIdentity();
    partialPTA = partialPTA.cross(stateCover);
   
    partialPTA.cross(characterisationSet);
    for(int i=0;i<=this.numberOfExtraStates;i++)
    {
      partialPTA = partialPTA.crossWithSet(alphabet);
View Full Code Here


    PTATestSequenceEngine engine = new PTA_FSMStructure(fsm);
    sequenceSet partialPTA = engine.new sequenceSet();partialPTA.setIdentity();
    partialPTA = partialPTA.cross(stateCover);
   
    partialPTA.cross(characterisationSet);
    for(int i=0;i<=this.numberOfExtraStates;i++)
    {
      partialPTA = partialPTA.crossWithSet(alphabet);
      partialPTA.cross(characterisationSet);
    }
View Full Code Here

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

  public final void test_1()
  {
    FSMStructure mach = WMethod.getGraphData(TestFSMAlgo.buildGraph("A-a->A-b-#B","tmp graph"));
    PTATestSequenceEngine engine = new PTA_FSMStructure(mach);
    sequenceSet partialPTA = engine.new sequenceSet();partialPTA.setIdentity();
    partialPTA = partialPTA.cross(TestFSMAlgo.buildSet(new String[][] {
        new String[] {"a","a","a"}, new String[]{"b"}
      }));
    PTA_computePrecisionRecall precComputer = new PTA_computePrecisionRecall(fsm);
    precComputer.crossWith(engine);
    assertEquals(3, precComputer.pos_relret);assertEquals(1, precComputer.neg_relret);
View Full Code Here

  public final void test_2()
  {
    FSMStructure mach = WMethod.getGraphData(TestFSMAlgo.buildGraph("A-a->A-b-#B","tmp graph"));
    PTATestSequenceEngine engine = new PTA_FSMStructure(mach);
    sequenceSet partialPTA = engine.new sequenceSet();partialPTA.setIdentity();
    partialPTA = partialPTA.cross(TestFSMAlgo.buildSet(new String[][] {
        new String[] {"a","a","a"}, new String[]{"b"}, new String[]{"a", "b"}
      }));
    PTA_computePrecisionRecall precComputer = new PTA_computePrecisionRecall(fsm);
    precComputer.crossWith(engine);
    assertEquals(3, precComputer.pos_relret);assertEquals(1, precComputer.neg_relret);
View Full Code Here

  public final void test_3()
  {
    FSMStructure mach = WMethod.getGraphData(TestFSMAlgo.buildGraph("A-a->A-b-#B","tmp graph"));
    PTATestSequenceEngine engine = new PTA_FSMStructure(mach);
    sequenceSet partialPTA = engine.new sequenceSet();partialPTA.setIdentity();
    partialPTA = partialPTA.cross(TestFSMAlgo.buildSet(new String[][] {
        new String[] {"a","a","a","a","b"}, new String[]{"b"}, new String[]{"a", "b"}
      }));
    PTA_computePrecisionRecall precComputer = new PTA_computePrecisionRecall(fsm);
    precComputer.crossWith(engine);
    assertEquals(4, precComputer.pos_relret);assertEquals(2, precComputer.neg_relret);
View Full Code Here

  public final void test_4()
  {
    FSMStructure mach = WMethod.getGraphData(TestFSMAlgo.buildGraph("AM-a->BM-a->AM\nBM-b->CM-a->DM","tmp graph"));
    PTATestSequenceEngine engine = new PTA_FSMStructure(mach);
    sequenceSet partialPTA = engine.new sequenceSet();partialPTA.setIdentity();
    partialPTA = partialPTA.cross(TestFSMAlgo.buildSet(new String[][] {
        new String[] {"a","a","a","a","b"}, new String[]{"b"}, new String[]{"a", "b", "c"}, new String[]{"a", "b", "a"}
      }));
    PTA_computePrecisionRecall precComputer = new PTA_computePrecisionRecall(fsm);
    precComputer.crossWith(engine);
    assertEquals(5, precComputer.pos_relret);assertEquals(2, precComputer.neg_relret);
View Full Code Here

  public final void test_5() // long test sequence (which exists) which is rejected part-way
  {
    FSMStructure mach = WMethod.getGraphData(TestFSMAlgo.buildGraph("AM-a->AM-b->AM-c->AM","tmp graph"));
    PTATestSequenceEngine engine = new PTA_FSMStructure(mach);
    sequenceSet partialPTA = engine.new sequenceSet();partialPTA.setIdentity();
    partialPTA = partialPTA.cross(TestFSMAlgo.buildSet(new String[][] {
        new String[] {"a","b","b","c","c"},
      }));
    PTA_computePrecisionRecall precComputer = new PTA_computePrecisionRecall(fsm);
    precComputer.crossWith(engine);
    assertEquals(2, precComputer.pos_relret);assertEquals(0, precComputer.neg_relret);
View Full Code Here

  public final void test_6() // long test sequence (which does not exist) which is rejected part-way
  {
    FSMStructure mach = WMethod.getGraphData(TestFSMAlgo.buildGraph("AM-a->AM-b->AM-c->AM","tmp graph"));
    PTATestSequenceEngine engine = new PTA_FSMStructure(mach);
    sequenceSet partialPTA = engine.new sequenceSet();partialPTA.setIdentity();
    partialPTA = partialPTA.cross(TestFSMAlgo.buildSet(new String[][] {
        new String[] {"a","b","b","c","c","d"},
      }));
    PTA_computePrecisionRecall precComputer = new PTA_computePrecisionRecall(fsm);
    precComputer.crossWith(engine);
    assertEquals(2, precComputer.pos_relret);assertEquals(1, precComputer.neg_relret);
View Full Code Here

  {
    FSMStructure mach = WMethod.getGraphData(TestFSMAlgo.buildGraph("AM-a->AM-b->AM-c->AM","tmp graph"));
    PTATestSequenceEngine engine = new PTA_FSMStructure(mach);

    sequenceSet partialPTA = engine.new sequenceSet();partialPTA.setIdentity();
    partialPTA = partialPTA.cross(TestFSMAlgo.buildSet(new String[][] {
        new String[] {"a"},
      }));
    PTA_computePrecisionRecall precComputer = new PTA_computePrecisionRecall(fsm);
    precComputer.crossWith(engine);
   
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.