Package statechum.analysis.learning.linear.GD

Examples of statechum.analysis.learning.linear.GD.ChangesDisplay


   
    A1.setAccept(false);// this is the key part of this test
    A2.setAccept(false);// 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);
    gd.identifyKeyPairs();
    gd.makeSteps();
   
    addToKeyPairs(gd, A1, A2);// in key pairs

    Assert.assertEquals(2,gd.aTOb.size());
    gd.computeDifference(recorder);
    Assert.assertEquals(expectedPatch,recorder.toString());
  }
View Full Code Here


   
    A1.setAccept(false);// this is the key part of this test
    A2.setAccept(true);// 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);
    gd.identifyKeyPairs();
    gd.makeSteps();
   
    Assert.assertEquals(1,gd.aTOb.size());
    gd.computeDifference(recorder);
    Assert.assertEquals(expectedPatch,recorder.toString());
  }
View Full Code Here

   
    A1.setAccept(false);// this is the key part of this test
    A2.setAccept(false);// 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);
    gd.identifyKeyPairs();
    gd.makeSteps();
   
    Assert.assertEquals(1,gd.aTOb.size());
    gd.computeDifference(recorder);
    Assert.assertEquals(expectedPatch,recorder.toString());
  }
View Full Code Here

   
    A1.setAccept(false);// this is the key part of this test
    A2.setAccept(true);// 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);
    gd.identifyKeyPairs();
    gd.makeSteps();
   
    Assert.assertEquals(1,gd.aTOb.size());
    gd.computeDifference(recorder);
    Assert.assertEquals(expectedPatch,recorder.toString());
  }
View Full Code Here

   
    A1.setAccept(false);// this is the key part of this test
    A2.setAccept(true);// 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);
    gd.identifyKeyPairs();
    gd.makeSteps();
   
    Assert.assertEquals(1,gd.aTOb.size());
    gd.computeDifference(recorder);
    Assert.assertEquals(expectedPatch,recorder.toString());
  }
View Full Code Here

    // add C-newF as a new initial key pair.
    gd.frontWave.add(new PairScore(C,newF,1,0));
    gd.statesInKeyPairs.add(C);gd.statesInKeyPairs.add(newF);

    gd.makeSteps();
    ChangesDisplay recorder = new ChangesDisplay(patcher);
    gd.computeDifference(recorder);
    Assert.assertEquals(
        "mapping: A - B\n"+
        "mapping: C - F\n"+
        "initial : A\n"+
        "removed: C - a -> E\n"+
        "removed: C - b -> D\n"+
        "added vertex:C\n",
        recorder.toString());
    ChangesRecorder.applyGD_WithRelabelling(graph, patcher.writeGD(TestGD.createDoc()), converter,outcome);
    Assert.assertNull(WMethod.checkM(grB,graph));
    Assert.assertEquals(grB.getStateNumber(),graph.getStateNumber());
    if (vertexToChange != null) Assert.assertEquals(JUConstants.AMBER,grA.findVertex(VertexID.parseID(vertexToChange)).getColour());
  }
View Full Code Here

  public final void testDisplay()
  {
    LearnerGraph grA = buildLearnerGraph("A-a->B\nA-b->B","testCounterA",config,converter);
    LearnerGraph grB = buildLearnerGraph("@A-a->@B\n@A-c->@B","testCounterB",config,converter);
    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.computeGD(grA, grB, threadNumber, recorder,config);
    Assert.assertEquals("mapping: A - @A\n"+
      "mapping: B - @B\n"+
      "initial : A\n"+
      "removed: A - b -> B\n"+
      "added  : A - c -> B\n",recorder.toString());
    Assert.assertEquals(1,counter.getAdded());Assert.assertEquals(1,counter.getRemoved());
  }
View Full Code Here

TOP

Related Classes of statechum.analysis.learning.linear.GD.ChangesDisplay

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.