Examples of PTA_FSMStructure


Examples of statechum.model.testset.PTA_FSMStructure

    System.out.println(pr.getPosprecision()+", "+pr.getPosrecall()+", "+pr.getNegprecision()+", "+pr.getNegrecall());
  }
 
  public static PosNegPrecisionRecall compare(LearnerGraph specfsm, LearnerGraph imp){
    PTA_computePrecisionRecall precRec = new PTA_computePrecisionRecall(imp);
    PTASequenceEngine engine = new PTA_FSMStructure(specfsm,null);
    SequenceSet partialPTA = engine.new SequenceSet();partialPTA.setIdentity();
    partialPTA = partialPTA.cross(specfsm.wmethod.getFullTestSet(1));
    precRec.crossWith(engine);return precRec.getPosNegPrecisionRecallNum();
  }
View Full Code Here

Examples of statechum.model.testset.PTA_FSMStructure

    precRec.crossWith(engine);return precRec.getPosNegPrecisionRecallNum();
  }
 
  public static PosNegPrecisionRecall compare(Collection<List<String>> tests, LearnerGraph specfsm, LearnerGraph imp){
    PTA_computePrecisionRecall precRec = new PTA_computePrecisionRecall(imp);
    PTASequenceEngine engine = new PTA_FSMStructure(specfsm,null);
    SequenceSet partialPTA = engine.new SequenceSet();partialPTA.setIdentity();
    partialPTA = partialPTA.cross(tests);
    precRec.crossWith(engine);return precRec.getPosNegPrecisionRecallNum();
  }
View Full Code Here

Examples of statechum.model.testset.PTA_FSMStructure

    l.init(sMinus, ptaSize,ptaSize);// our imaginary positives are prefixes of negatives.
    DirectedSparseGraph learningOutcome = l.learnMachine();
    l.setQuestionCounter(0);
    LearnerGraph learned = new LearnerGraph(learningOutcome,config);
    PTA_computePrecisionRecall precRec = new PTA_computePrecisionRecall(learned);
    PTASequenceEngine engine = new PTA_FSMStructure(graph);
    precRec.crossWith(sMinus);
    SequenceSet ptaTestSet = engine.new SequenceSet();ptaTestSet.setIdentity();
    ptaTestSet = ptaTestSet.cross(graph.wmethod.getFullTestSet(1));
    PosNegPrecisionRecall prNeg = precRec.crossWith(engine);
    System.out.println("pre: "+prNeg.getPrecision()+" rec: "+prNeg.getRecall());
View Full Code Here

Examples of statechum.model.testset.PTA_FSMStructure

    System.out.println(pr.getPosprecision()+", "+pr.getPosrecall()+", "+pr.getNegprecision()+", "+pr.getNegrecall());
  }
 
  public static PosNegPrecisionRecall compare(LearnerGraph specfsm, LearnerGraph imp){
    PTA_computePrecisionRecall precRec = new PTA_computePrecisionRecall(imp);
    PTASequenceEngine engine = new PTA_FSMStructure(specfsm);
    SequenceSet partialPTA = engine.new SequenceSet();partialPTA.setIdentity();
    partialPTA = partialPTA.cross(specfsm.wmethod.getFullTestSet(1));
    return precRec.crossWith(engine);
  }
View Full Code Here

Examples of statechum.model.testset.PTA_FSMStructure

    return precRec.crossWith(engine);
  }
 
  public static PosNegPrecisionRecall compare(Collection<List<String>> tests, LearnerGraph specfsm, LearnerGraph imp){
    PTA_computePrecisionRecall precRec = new PTA_computePrecisionRecall(imp);
    PTASequenceEngine engine = new PTA_FSMStructure(specfsm);
    SequenceSet partialPTA = engine.new SequenceSet();partialPTA.setIdentity();
    partialPTA = partialPTA.cross(tests);
    return precRec.crossWith(engine);
  }
View Full Code Here

Examples of statechum.model.testset.PTA_FSMStructure

    Set<String> alphabet =  computeAlphabet();
    List<List<String>> stateCover = computeStateCover();
    characterisationSet = computeWSet_reducedmemory(coregraph);if (characterisationSet.isEmpty()) characterisationSet.add(Arrays.asList(new String[]{}));
    transitionCover = crossWithSet(stateCover,alphabet);transitionCover.addAll(stateCover);

    PTASequenceEngine engine = new PTA_FSMStructure(coregraph);
    SequenceSet partialPTA = engine.new SequenceSet();partialPTA.setIdentity();
    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

Examples of statechum.model.testset.PTA_FSMStructure

    init.addUserDatum(JUConstants.INITIAL, true, UserData.SHARED);
    init.addUserDatum(JUConstants.ACCEPTED, false, UserData.SHARED);
    init.addUserDatum(JUConstants.LABEL, "A", UserData.SHARED);
    g.addVertex(init);
    final LearnerGraph machine = new LearnerGraph(g,mainConfiguration);
    en = new PTA_FSMStructure(machine,null) {
      {
        init(machine.new FSMImplementation(){
          @Override
          public boolean shouldBeReturned(Object elem) {
            // elem is null for REJECT states
View Full Code Here

Examples of statechum.model.testset.PTA_FSMStructure

  public final void test_sequenceSet_equality_differentcontainer()
  {
    SequenceSet seqStart1 = en.new SequenceSet();
    SequenceSet seqStart2 = en.new SequenceSet();
    SequenceSet seqDifferent1 = en.new SequenceSet();seqDifferent1.setIdentity();
    PTA_FSMStructure engine2 = new PTA_FSMStructure(fsm,null);   
    equalityTestingHelper(seqStart1,seqStart2,seqDifferent1,engine2.new SequenceSet(), true);
  }
View Full Code Here

Examples of statechum.model.testset.PTA_FSMStructure

    DirectedSparseVertex init = new DirectedSparseVertex();
    init.addUserDatum(JUConstants.INITIAL, true, UserData.SHARED);
    init.addUserDatum(JUConstants.ACCEPTED, false, UserData.SHARED);
    init.addUserDatum(JUConstants.LABEL, "A", UserData.SHARED);
    g.addVertex(init);
    PTASequenceEngine engine = new PTA_FSMStructure(new LearnerGraph(g,mainConfiguration),null);
    engine.containsSequence(new ArrayList<Label>());
  }
View Full Code Here

Examples of statechum.model.testset.PTA_FSMStructure

    SequenceSet seqStart = en.new SequenceSet();seqStart.setIdentity();
    SequenceSet seqOne = seqStart.cross(TestFSMAlgo.buildList(new String[][] {
        new String[] {"a","a"},
        new String[] {"c"}
    },mainConfiguration,converter));
    SequenceSet seqTwo = new PTA_FSMStructure(fsm,null).new SequenceSet();
    seqTwo.unite(seqOne);
  }
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.