Package statechum.analysis.learning.rpnicore

Examples of statechum.analysis.learning.rpnicore.LearnerGraphND.findVertex()


              "'P1000',"+
              "[d,b,c,a]}");
    Synapse.StatechumProcess.parseStatemachine(grAerlang,grA,null,true);
    Assert.assertTrue(grA.getInit().isAccept());
    Assert.assertFalse(grA.findVertex("N1000").isAccept());
    grA.findVertex("N1000").setAccept(true);
   
    LearnerGraphND grB = new LearnerGraphND(config);
    Synapse.StatechumProcess.parseStatemachine(ErlangLabel.parseText("{statemachine,['P1000','P1001','N1000'],"+
              "[{'P1000',a,'P1001'},"+
              "{'P1000',c,'P1001'},"+
View Full Code Here


              "{'P1001',b,'P1000'},"+
              "{'P1001',d,'P1001'}],"+
              "'P1000',"+
              "[d,b,c,a]}"),grB,null,true);
    Assert.assertTrue(grB.getInit().isAccept());
    Assert.assertFalse(grB.findVertex("N1000").isAccept());
    grB.findVertex("N1000").setAccept(true);
   
    OtpErlangObject difference = DifferenceVisualiser.ChangesToGraph.computeGD(grA, grB, config);
    Assert.assertEquals("{'statemachinedifference',[{'P1003','a','P1001'},"+
                                                 "{'P1003','c','P1001'},"+
View Full Code Here

              "{'P1001',d,'P1001'}],"+
              "'P1000',"+
              "[d,b,c,a]}"),grB,null,true);
    Assert.assertTrue(grB.getInit().isAccept());
    Assert.assertFalse(grB.findVertex("N1000").isAccept());
    grB.findVertex("N1000").setAccept(true);
   
    OtpErlangObject difference = DifferenceVisualiser.ChangesToGraph.computeGD(grA, grB, config);
    Assert.assertEquals("{'statemachinedifference',[{'P1003','a','P1001'},"+
                                                 "{'P1003','c','P1001'},"+
                                                 "{'P1001','a','P1000'},"+
View Full Code Here

              " {'P1002',d,'P1002'}],"+
              "'P1000',"+
              "[d,b,c,a]}");
    Synapse.StatechumProcess.parseStatemachine(grAerlang,grA,null,true);
    Assert.assertTrue(grA.getInit().isAccept());
    Assert.assertFalse(grA.findVertex("N1000").isAccept());
   
    LearnerGraphND grB = new LearnerGraphND(config);
    Synapse.StatechumProcess.parseStatemachine(ErlangLabel.parseText("{statemachine,['P1000','P1001','N1000'],"+
              "[{'P1000',a,'P1001'},"+
              "{'P1000',c,'P1001'},"+
View Full Code Here

              "{'P1001',b,'P1000'},"+
              "{'P1001',d,'P1001'}],"+
              "'P1000',"+
              "[d,b,c,a]}"),grB,null,true);
    Assert.assertTrue(grB.getInit().isAccept());
    Assert.assertFalse(grB.findVertex("N1000").isAccept());
   
    OtpErlangObject difference = DifferenceVisualiser.ChangesToGraph.computeGD(grA, grB, config);
    Assert.assertEquals("{'statemachinedifference',[{'P1000','a','P1002'},{'P1000','c','P1002'},{'P1002','a','N1000'},{'P1002','b','P1000'}],[{'P1000','a','P1000'},{'P1000','b','P1002'},{'P1000','c','N1000'},{'P1002','c','P1002'}],[],[],[{'P1002','P1001'}],'P1000'}" , ErlangLabel.dumpErlangObject(difference));
  }
 
View Full Code Here

  {
    LearnerGraphND ptaInverse = new LearnerGraphND(graph.config);
    AbstractPathRoutines.buildInverse(graph, new StatesToConsider() {
      @Override public boolean stateToConsider(@SuppressWarnings("unused") CmpVertex v) { return true; }}
      , ptaInverse);
    CmpVertex v=ptaInverse.findVertex(vert);
    for(int i=0;i<10;++i)
    {
      Map<Label,List<CmpVertex>> transitions = ptaInverse.transitionMatrix.get(v);
      if (transitions.size() > 1)
      {
View Full Code Here

      if (jungVertex != null)
      {
        Object label = jungVertex.getUserDatum(JUConstants.LABEL);
        assert label != null;
        LearnerGraphND gr = graphsOrig.get(currentGraph);
        result = gr.findVertex(label.toString());
        assert result != null;
      }
     
      return result;
    }
View Full Code Here

  {
    final String name = "testComputeGD_ND2";
    Configuration cloneConfig = argConfig.copy();cloneConfig.setLearnerCloneGraph(true);
    String common = "A-a->B-p->B\nA-a->C-q->C\nA-a->D-r->D";
    LearnerGraphND grA = buildLearnerGraphND("A-a->E-s->E\nA-a->F-v->F\n"+common,name+"A",argConfig, converter);
    grA.findVertex("F").setColour(JUConstants.RED);grA.findVertex("B").setColour(JUConstants.AMBER);grA.findVertex("B").setDepth(3);
    CmpVertex newStateA = AbstractLearnerGraph.generateNewCmpVertex(VertexID.parseID(testA), argConfig),
      newStateB = AbstractLearnerGraph.generateNewCmpVertex(VertexID.parseID(testB), argConfig);
    newStateA.setHighlight(true);newStateB.setDepth(45);
    grA.transitionMatrix.put(newStateA,grA.createNewRow());grA.transitionMatrix.put(newStateB,grA.createNewRow());
View Full Code Here

  {
    final String name = "testComputeGD_ND2";
    Configuration cloneConfig = argConfig.copy();cloneConfig.setLearnerCloneGraph(true);
    String common = "A-a->B-p->B\nA-a->C-q->C\nA-a->D-r->D";
    LearnerGraphND grA = buildLearnerGraphND("A-a->E-s->E\nA-a->F-v->F\n"+common,name+"A",argConfig, converter);
    grA.findVertex("F").setColour(JUConstants.RED);grA.findVertex("B").setColour(JUConstants.AMBER);grA.findVertex("B").setDepth(3);
    CmpVertex newStateA = AbstractLearnerGraph.generateNewCmpVertex(VertexID.parseID(testA), argConfig),
      newStateB = AbstractLearnerGraph.generateNewCmpVertex(VertexID.parseID(testB), argConfig);
    newStateA.setHighlight(true);newStateB.setDepth(45);
    grA.transitionMatrix.put(newStateA,grA.createNewRow());grA.transitionMatrix.put(newStateB,grA.createNewRow());
View Full Code Here

  {
    final String name = "testComputeGD_ND2";
    Configuration cloneConfig = argConfig.copy();cloneConfig.setLearnerCloneGraph(true);
    String common = "A-a->B-p->B\nA-a->C-q->C\nA-a->D-r->D";
    LearnerGraphND grA = buildLearnerGraphND("A-a->E-s->E\nA-a->F-v->F\n"+common,name+"A",argConfig, converter);
    grA.findVertex("F").setColour(JUConstants.RED);grA.findVertex("B").setColour(JUConstants.AMBER);grA.findVertex("B").setDepth(3);
    CmpVertex newStateA = AbstractLearnerGraph.generateNewCmpVertex(VertexID.parseID(testA), argConfig),
      newStateB = AbstractLearnerGraph.generateNewCmpVertex(VertexID.parseID(testB), argConfig);
    newStateA.setHighlight(true);newStateB.setDepth(45);
    grA.transitionMatrix.put(newStateA,grA.createNewRow());grA.transitionMatrix.put(newStateB,grA.createNewRow());
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.