Examples of PTA_FSMStructure


Examples of statechum.model.testset.PTA_FSMStructure

  /** Test that it is possible to selectively filter out paths which terminate at specific states. */
  @Test
  public final void test_sequenceSet_testing_shouldBeReturned1c()
  {
    final LearnerGraph machine = buildLearnerGraph("A-a->A-b->B-b->B\nA-d->C-d->C", "test_sequenceSet_testing_shouldBeReturned1c",mainConfiguration,converter);
    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

   */
  @Test
  public final void test_sequenceSet_testing_shouldBeReturned1d()
  {
    final LearnerGraph machine = buildLearnerGraph("A-a->A-b->B-b->B\nA-d->C-d->C\nB-c->D-c->D-a->D-b->D", "test_sequenceSet_testing_shouldBeReturned1d",mainConfiguration,converter);
    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

  /** Test that if I wish to return all paths in a PTA, they will be returned. */
  @Test
  public final void test_sequenceSet_testing_shouldBeReturned1e()
  {
    final LearnerGraph machine = buildLearnerGraph("A-a->A-b->B-b->B\nA-d->C-d->C\nB-c->D-c->D-a->D-b->D", "test_sequenceSet_testing_shouldBeReturned1d",mainConfiguration,converter);
    en = new PTA_FSMStructure(machine,null) {
      {
        init(machine.new FSMImplementation(){
          @Override
          public boolean shouldBeReturned(@SuppressWarnings("unused"Object elem) {
            // elem is null for REJECT states
View Full Code Here

Examples of statechum.model.testset.PTA_FSMStructure

  /** Test for shouldBeReturned from the initial state. */
  @Test
  public final void test_sequenceSet_testing_shouldBeReturned2a() // a test for shouldBeReturned
  {
    final LearnerGraph machine = buildLearnerGraph("A-a->A-b->B", "test_sequenceSet_testing_shouldBeReturned2a",mainConfiguration,converter);
    en = new PTA_FSMStructure(machine,null) {
      {
        init(machine.new FSMImplementation(){
          @Override
          public boolean shouldBeReturned(@SuppressWarnings("unused"Object elem) {
            return false;
View Full Code Here

Examples of statechum.model.testset.PTA_FSMStructure

  /** Test for shouldBeReturned from a non-initial state. */
  @Test
  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)},
View Full Code Here

Examples of statechum.model.testset.PTA_FSMStructure

  @SuppressWarnings("unused")
  @Test
  public final void testCreateFSMStructureFail1()
  {
    final LearnerGraph mach = buildLearnerGraph("D-a->A-a->A-b-#B","testPrecisionRecall2b",mainConfiguration,converter);
    new PTA_FSMStructure(mach,mach.findVertex(VertexID.parseID("A")));
   
    Helper.checkForCorrectException(new whatToRun() { public @Override void run() {
        new PTA_FSMStructure(mach,AbstractLearnerGraph.generateNewCmpVertex(VertexID.parseID("Vert"), mach.config));
      }},IllegalArgumentException.class,"is not a valid state of the graph");
  }
View Full Code Here

Examples of statechum.model.testset.PTA_FSMStructure

  @Test
  public final void testCreateFSMStructureFail2()
  {
    final LearnerGraph mach = buildLearnerGraph("D-a->A-a->A-b-#B","testPrecisionRecall2b",mainConfiguration,converter);
    final LearnerGraph sameMach = buildLearnerGraph("D-a->A-a->A-b-#B","testPrecisionRecall2b",mainConfiguration,converter);
    new PTA_FSMStructure(mach,mach.findVertex(VertexID.parseID("A")));
   
    Helper.checkForCorrectException(new whatToRun() {public @Override void run() {
        new PTA_FSMStructure(mach,sameMach.findVertex(VertexID.parseID("A")));
      }},IllegalArgumentException.class,"is not a valid state of the graph");
  }
View Full Code Here

Examples of statechum.model.testset.PTA_FSMStructure

  @Test
  public final void test_sequenceSet_testing_shouldBeReturned3() // a test for shouldBeReturned
  {
    final LearnerGraph machine = buildLearnerGraph("A-a->A-b->B", "test_sequenceSet_testing_shouldBeReturned3",mainConfiguration,converter);
    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

    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
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.