Package statechum.analysis.learning.rpnicore

Examples of statechum.analysis.learning.rpnicore.LearnerGraph.addToCompatibility()


    if (incompatibles != null)
      for(String [] incompatibleRow:incompatibles)
      {
        assert incompatibleRow.length == 2;
        fsm.addToCompatibility(fsm.findVertex(incompatibleRow[0]), fsm.findVertex(incompatibleRow[1]),JUConstants.PAIRCOMPATIBILITY.INCOMPATIBLE);
      }
    Collection<AMEquivalenceClass<CmpVertex,LearnerGraphCachedData>> result = new LinkedList<AMEquivalenceClass<CmpVertex,LearnerGraphCachedData>>();
    int score = -2;
    score = fsm.pairscores.computePairCompatibilityScore_general(new StatePair(fsm.findVertex(VertexID.parseID("A")),fsm.findVertex(VertexID.parseID("B"))),null,result);
    //Visualiser.updateFrame(g, result);Visualiser.waitForKey();
View Full Code Here


    if (incompatibles != null)
      for(String [] incompatibleRow:incompatibles)
      {
        assert incompatibleRow.length == 2;
        fsm.addToCompatibility(fsm.findVertex(incompatibleRow[0]), fsm.findVertex(incompatibleRow[1]),JUConstants.PAIRCOMPATIBILITY.INCOMPATIBLE);
      }
    Collection<AMEquivalenceClass<CmpVertex,LearnerGraphCachedData>> result = new LinkedList<AMEquivalenceClass<CmpVertex,LearnerGraphCachedData>>();
    int score = -2;
    score = fsm.pairscores.computePairCompatibilityScore_general(new StatePair(fsm.findVertex(new VertexID("A")),fsm.findVertex(new VertexID("B"))),result);
    //Visualiser.updateFrame(g, result);Visualiser.waitForKey();
View Full Code Here

    if (incompatibles != null)
      for(String [] incompatibleRow:incompatibles)
      {
        assert incompatibleRow.length == 2;
        fsm.addToCompatibility(fsm.findVertex(incompatibleRow[0]), fsm.findVertex(incompatibleRow[1]),JUConstants.PAIRCOMPATIBILITY.INCOMPATIBLE);
      }
    Collection<AMEquivalenceClass<CmpVertex,LearnerGraphCachedData>> result = new LinkedList<AMEquivalenceClass<CmpVertex,LearnerGraphCachedData>>();
    int score = -2;
    score = fsm.pairscores.computePairCompatibilityScore_general(new StatePair(fsm.findVertex(VertexID.parseID("A")),fsm.findVertex(VertexID.parseID("B"))),null,result);
    //Visualiser.updateFrame(g, result);Visualiser.waitForKey();
View Full Code Here

    if (incompatibles != null)
      for(String [] incompatibleRow:incompatibles)
      {
        assert incompatibleRow.length == 2;
        fsm.addToCompatibility(fsm.findVertex(incompatibleRow[0]), fsm.findVertex(incompatibleRow[1]),JUConstants.PAIRCOMPATIBILITY.INCOMPATIBLE);
      }
    Collection<AMEquivalenceClass<CmpVertex,LearnerGraphCachedData>> result = new LinkedList<AMEquivalenceClass<CmpVertex,LearnerGraphCachedData>>();
    int score = -2;
    score = fsm.pairscores.computePairCompatibilityScore_general(new StatePair(fsm.findVertex(VertexID.parseID("A")),fsm.findVertex(VertexID.parseID("B"))),result);
    //Visualiser.updateFrame(g, result);Visualiser.waitForKey();
View Full Code Here

    if (incompatibles != null)
      for(String [] incompatibleRow:incompatibles)
      {
        assert incompatibleRow.length == 2;
        fsm.addToCompatibility(fsm.findVertex(incompatibleRow[0]), fsm.findVertex(incompatibleRow[1]),JUConstants.PAIRCOMPATIBILITY.INCOMPATIBLE);
      }
    Collection<AMEquivalenceClass<CmpVertex,LearnerGraphCachedData>> result = new LinkedList<AMEquivalenceClass<CmpVertex,LearnerGraphCachedData>>();
    int score = -2;
    score = fsm.pairscores.computePairCompatibilityScore_general(new StatePair(fsm.findVertex(VertexID.parseID("A")),fsm.findVertex(VertexID.parseID("B"))),null,result);
    //Visualiser.updateFrame(g, result);Visualiser.waitForKey();
View Full Code Here

        A2=AbstractLearnerGraph.generateNewCmpVertex(VertexID.parseID("A"),configNonFail), B2=AbstractLearnerGraph.generateNewCmpVertex(VertexID.parseID("B"),configNonFail)
        ;
    grA.transitionMatrix.put(A1, grA.createNewRow());grA.transitionMatrix.put(B1, grA.createNewRow());
    grB.transitionMatrix.put(A2, grB.createNewRow());grB.transitionMatrix.put(B2, grB.createNewRow());
   
    grA.addToCompatibility(A1, B1, PAIRCOMPATIBILITY.THEN);// this is the key part of this test
   
    ChangesCounter<CmpVertex,CmpVertex,LearnerGraphCachedData,LearnerGraphCachedData> counter = new ChangesCounter<CmpVertex,CmpVertex,LearnerGraphCachedData,LearnerGraphCachedData>(grA,grB,null);
    ChangesDisplay recorder = new ChangesDisplay(counter);
    GD<CmpVertex,CmpVertex,LearnerGraphCachedData,LearnerGraphCachedData> gd = new GD<CmpVertex,CmpVertex,LearnerGraphCachedData,LearnerGraphCachedData>();
    gd.init(grA, grB, threadNumber,configNonFail);
View Full Code Here

  @Test
  public final void testAddIncompatibles1()
  {
    LearnerGraph gr = buildLearnerGraph("T-a-#C\nQ-a->Q\nT-longpath->Q","testAddIncompatibles1a", Configuration.getDefaultConfiguration());
    LearnerGraph expected = buildLearnerGraph("T-a-#C\nQ-a->Q\nT-longpath->Q","testAddIncompatibles1b",Configuration.getDefaultConfiguration());
    expected.addToCompatibility(expected.findVertex("T"), expected.findVertex("Q"),JUConstants.PAIRCOMPATIBILITY.INCOMPATIBLE);
    LearnerGraphMutator<CmpVertex,LearnerGraphCachedData> patcher = new LearnerGraphMutator<CmpVertex,LearnerGraphCachedData>(gr, cloneConfig,null);
    patcher.addToCompatibility(gr.findVertex("T"), gr.findVertex("Q"), JUConstants.PAIRCOMPATIBILITY.INCOMPATIBLE);
    Assert.assertNull(WMethod.checkM_and_colours(expected, gr, VERTEX_COMPARISON_KIND.DEEP));
  }
 
View Full Code Here

  @Test
  public final void testAddIncompatibles2()
  {
    LearnerGraph gr = buildLearnerGraph("T-a-#C\nQ-a->Q\nT-longpath->Q","testAddIncompatibles1a", Configuration.getDefaultConfiguration());
    LearnerGraph expected = buildLearnerGraph("T-a-#C\nQ-a->Q\nT-longpath->Q","testAddIncompatibles1b",Configuration.getDefaultConfiguration());
    expected.addToCompatibility(expected.findVertex("T"), expected.findVertex("Q"),JUConstants.PAIRCOMPATIBILITY.INCOMPATIBLE);
    LearnerGraphMutator<CmpVertex,LearnerGraphCachedData> patcher = new LearnerGraphMutator<CmpVertex,LearnerGraphCachedData>(gr, cloneConfig,null);
    patcher.addToCompatibility(gr.findVertex("T"), gr.findVertex("C"), JUConstants.PAIRCOMPATIBILITY.INCOMPATIBLE);
    patcher.addToCompatibility(gr.findVertex("T"), gr.findVertex("Q"), JUConstants.PAIRCOMPATIBILITY.INCOMPATIBLE);
    patcher.removeFromCompatibility(gr.findVertex("C"), gr.findVertex("T"));
    Assert.assertNull(WMethod.checkM_and_colours(expected, gr, VERTEX_COMPARISON_KIND.DEEP));
View Full Code Here

        A2=AbstractLearnerGraph.generateNewCmpVertex(VertexID.parseID("A"),configNonFail), B2=AbstractLearnerGraph.generateNewCmpVertex(VertexID.parseID("B"),configNonFail)
        ;
    grA.transitionMatrix.put(A1, grA.createNewRow());grA.transitionMatrix.put(B1, grA.createNewRow());
    grB.transitionMatrix.put(A2, grB.createNewRow());grB.transitionMatrix.put(B2, grB.createNewRow());
   
    grA.addToCompatibility(A1, B1, PAIRCOMPATIBILITY.THEN);// this is the key part of this test
   
    ChangesCounter<CmpVertex,CmpVertex,LearnerGraphCachedData,LearnerGraphCachedData> counter = new ChangesCounter<CmpVertex,CmpVertex,LearnerGraphCachedData,LearnerGraphCachedData>(grA,grB,null);
    ChangesDisplay recorder = new ChangesDisplay(counter);
    GD<CmpVertex,CmpVertex,LearnerGraphCachedData,LearnerGraphCachedData> gd = new GD<CmpVertex,CmpVertex,LearnerGraphCachedData,LearnerGraphCachedData>();
    gd.init(grA, grB, threadNumber,configNonFail);
View Full Code Here

        A2=AbstractLearnerGraph.generateNewCmpVertex(VertexID.parseID("A"),configNonFail), B2=AbstractLearnerGraph.generateNewCmpVertex(VertexID.parseID("B"),configNonFail)
        ;
    grA.transitionMatrix.put(A1, grA.createNewRow());grA.transitionMatrix.put(B1, grA.createNewRow());
    grB.transitionMatrix.put(A2, grB.createNewRow());grB.transitionMatrix.put(B2, grB.createNewRow());
   
    grA.addToCompatibility(A1, B1, PAIRCOMPATIBILITY.THEN);// this is the key part of this test
    grB.addToCompatibility(A2, B2, PAIRCOMPATIBILITY.THEN);// this is the key part of this test
   
    ChangesCounter<CmpVertex,CmpVertex,LearnerGraphCachedData,LearnerGraphCachedData> counter = new ChangesCounter<CmpVertex,CmpVertex,LearnerGraphCachedData,LearnerGraphCachedData>(grA,grB,null);
    ChangesDisplay recorder = new ChangesDisplay(counter);
    GD<CmpVertex,CmpVertex,LearnerGraphCachedData,LearnerGraphCachedData> gd = new GD<CmpVertex,CmpVertex,LearnerGraphCachedData,LearnerGraphCachedData>();
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.