Package statechum.analysis.learning.rpnicore.WMethod

Examples of statechum.analysis.learning.rpnicore.WMethod.DifferentFSMException


    fsm.pairscores.computePairCompatibilityScore_general(null,Arrays.asList(new StatePair[]{
        new StatePair(fsm.findVertex("I"),fsm.findVertex("A1")),new StatePair(fsm.findVertex("I"),fsm.findVertex("B1")),new StatePair(fsm.findVertex("I"),fsm.findVertex("C1"))
        }), verticesToMerge);
    LearnerGraph mergeOutcome =  MergeStates.mergeCollectionOfVertices(fsm, null, verticesToMerge);
    LearnerGraph expected = FsmParser.buildLearnerGraph("I-d->I-b->I-c->I / I-a->B2-b->B3-c->C1", "testPairCompatible_general_Eb",config,getLabelConverter());
    DifferentFSMException diffEx = WMethod.checkM(expected, mergeOutcome);
    if (diffEx != null)
      throw diffEx;
  }
View Full Code Here


    fsm.pairscores.computePairCompatibilityScore_general(null,Arrays.asList(new StatePair[]{
        new StatePair(fsm.findVertex("I"),fsm.findVertex("A1")),new StatePair(fsm.findVertex("I"),fsm.findVertex("B1")),new StatePair(fsm.findVertex("I"),fsm.findVertex("C1"))
        }), verticesToMerge);
    LearnerGraph mergeOutcome =  MergeStates.mergeCollectionOfVertices(fsm, null, verticesToMerge);
    LearnerGraph expected = FsmParser.buildLearnerGraph("I-b->I-c->I / I-a->I", "testPairCompatible_general_Fb",config,getLabelConverter());
    DifferentFSMException diffEx = WMethod.checkM(expected, mergeOutcome);
    if (diffEx != null)
      throw diffEx;
  }
View Full Code Here

    fsm.pairscores.computePairCompatibilityScore_general(null,Arrays.asList(new StatePair[]{
        new StatePair(fsm.findVertex("I"),fsm.findVertex("A1")),new StatePair(fsm.findVertex("I"),fsm.findVertex("B1")),new StatePair(fsm.findVertex("I"),fsm.findVertex("C1"))
        }), verticesToMerge);
    LearnerGraph mergeOutcome =  MergeStates.mergeCollectionOfVertices(fsm, null, verticesToMerge);
    LearnerGraph expected = FsmParser.buildLearnerGraph("I-d->I-b->I-c->I / I-a->B2-b->B3-c->C1 / I-e->B2", "testPairCompatible_general_Gb",config,getLabelConverter());
    DifferentFSMException diffEx = WMethod.checkM(expected, mergeOutcome);
    if (diffEx != null)
      throw diffEx;
  }
View Full Code Here

    fsm.pairscores.computePairCompatibilityScore_general(null,Arrays.asList(new StatePair[]{
        new StatePair(fsm.findVertex("I"),fsm.findVertex("A1")),new StatePair(fsm.findVertex("I"),fsm.findVertex("B1")),new StatePair(fsm.findVertex("I"),fsm.findVertex("C1"))
        }), verticesToMerge);
    LearnerGraph mergeOutcome =  MergeStates.mergeCollectionOfVertices(fsm, null, verticesToMerge);
    LearnerGraph expected = FsmParser.buildLearnerGraph("I-b->I-c->I / I-a->I-d->I", "testPairCompatible_general_Hb",config,getLabelConverter());
    DifferentFSMException diffEx = WMethod.checkM(expected, mergeOutcome);
    if (diffEx != null)
      throw diffEx;
  }
View Full Code Here

   */
  protected final boolean compareInDepth;

  protected void checkGraphEquality(LearnerGraph what, LearnerGraph with)
  {
    DifferentFSMException ex = null;
    if (compareInDepth)
    {
      //if (!what.equals(with))
      //  ex = new DifferentFSMException("machines differ");
      ex = WMethod.checkM_and_colours(what,with,VERTEX_COMPARISON_KIND.DEEP);
View Full Code Here

  }

  /** Converts the existing checkM into its eqivalent in version 322. */
  public static DifferentFSMException checkM(LearnerGraph A, CmpVertex Ainit, LearnerGraph B, CmpVertex Binit)
  {
    DifferentFSMException result = null;
    try {
      WMethod.checkM(A, B, Ainit, Binit);
    } catch (DifferentFSMException e) {
      result = e;
    }
View Full Code Here

  }
 
  /** Converts the existing checkM into its eqivalent in version 322. */
  public static DifferentFSMException checkM(LearnerGraph A, LearnerGraph B)
  {
    DifferentFSMException result = null;
    try {
      WMethod.checkM(A, B);
    } catch (DifferentFSMException e) {
      result = e;
    }
View Full Code Here

    graph.config.setLearnerIdMode(Configuration.IDMode.POSITIVE_NEGATIVE);
    graph.paths.augmentPTA(minusStrings, false,true);

    final LearnerGraph expected = new LearnerGraph(mainConfiguration.copy());
    expected.getVertex(new LinkedList<Label>()).setAccept(false);
    DifferentFSMException result = WMethod.checkM(expected,graph);
    Assert.assertNull(result);
    checkDepthLabelling(graph);
  }
View Full Code Here

        }
    }
   
    // the learning of the pairs experiment should always produce the correct outcome since decisions to merge pairs are guaranteed to be correct.
         LearnerGraph learntWithoutNegatives = new LearnerGraph(learnerInitConfiguration.config);AbstractPathRoutines.removeRejectStates(actualAutomaton,learntWithoutNegatives);
    DifferentFSMException diff = WMethod.checkM(referenceGraph, learntWithoutNegatives);if (diff != null) throw diff;
    System.out.println(new Date().toString()+" arff written");
    return actualAutomaton;
  }
View Full Code Here

    fsm.pairscores.computePairCompatibilityScore_general(null,Arrays.asList(new StatePair[]{
        new StatePair(fsm.findVertex("I"),fsm.findVertex("A1")),new StatePair(fsm.findVertex("I"),fsm.findVertex("B1")),new StatePair(fsm.findVertex("I"),fsm.findVertex("C1"))
        }), verticesToMerge);
    LearnerGraph mergeOutcome =  MergeStates.mergeCollectionOfVertices(fsm, null, verticesToMerge);
    LearnerGraph expected = FsmParser.buildLearnerGraph("I-d->I-b->I-c->I / I-a->B2-b->B3-c->C1", "testPairCompatible_general_Eb",config,getLabelConverter());
    DifferentFSMException diffEx = WMethod.checkM(expected, mergeOutcome);
    if (diffEx != null)
      throw diffEx;
  }
View Full Code Here

TOP

Related Classes of statechum.analysis.learning.rpnicore.WMethod.DifferentFSMException

Copyright © 2018 www.massapicom. 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.