Package statechum.analysis.learning.rpnicore

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


    grA.addToCompatibility(grA.findVertex("U"), grA.findVertex("R"),JUConstants.PAIRCOMPATIBILITY.INCOMPATIBLE);
    LearnerGraphND grB = buildLearnerGraphND("A-a->G-u->G\nA-a->H-t->H\nC-q->T\n"+common,name+"B",configND5, converter);
    VertexID origID = VertexID.parseID("test orig");
    grB.findVertex("B").setColour(JUConstants.GRAY);grB.findVertex("B").setOrigState(origID);grB.findVertex("B").setDepth(3);
    grB.addToCompatibility(grB.findVertex("D"), grB.findVertex("T"),JUConstants.PAIRCOMPATIBILITY.INCOMPATIBLE);
    grB.addToCompatibility(grB.findVertex("U"), grB.findVertex("T"),JUConstants.PAIRCOMPATIBILITY.INCOMPATIBLE);
 
    LearnerGraphND result = checkDiffBetweenND(grA, grB, 8,0,threadNumber,configND5,converter);
    Assert.assertEquals(JUConstants.GRAY,result.findVertex("B").getColour());
    Assert.assertEquals(origID,result.findVertex("B").getOrigState());
    Assert.assertTrue(result.pairCompatibility.compatibility.get(result.findVertex("T")).get(result.findVertex("D")) == JUConstants.PAIRCOMPATIBILITY.INCOMPATIBLE);
View Full Code Here


    grB.findVertex("B").setColour(JUConstants.GRAY);grB.findVertex("B").setOrigState(origID);grB.findVertex("B").setDepth(3);
    grB.addToCompatibility(grB.findVertex("D"), grB.findVertex("T"),JUConstants.PAIRCOMPATIBILITY.INCOMPATIBLE);
    grB.addToCompatibility(grB.findVertex("U"), grB.findVertex("T"),JUConstants.PAIRCOMPATIBILITY.INCOMPATIBLE);
 
    LearnerGraphND result = checkDiffBetweenND(grA, grB, 8,0,threadNumber,configND5,converter);
    Assert.assertEquals(JUConstants.GRAY,result.findVertex("B").getColour());
    Assert.assertEquals(origID,result.findVertex("B").getOrigState());
    Assert.assertTrue(result.pairCompatibility.compatibility.get(result.findVertex("T")).get(result.findVertex("D")) == JUConstants.PAIRCOMPATIBILITY.INCOMPATIBLE);
    Assert.assertTrue(result.pairCompatibility.compatibility.get(result.findVertex("U")).get(result.findVertex("T")) == JUConstants.PAIRCOMPATIBILITY.INCOMPATIBLE);
  }
View Full Code Here

    grB.addToCompatibility(grB.findVertex("D"), grB.findVertex("T"),JUConstants.PAIRCOMPATIBILITY.INCOMPATIBLE);
    grB.addToCompatibility(grB.findVertex("U"), grB.findVertex("T"),JUConstants.PAIRCOMPATIBILITY.INCOMPATIBLE);
 
    LearnerGraphND result = checkDiffBetweenND(grA, grB, 8,0,threadNumber,configND5,converter);
    Assert.assertEquals(JUConstants.GRAY,result.findVertex("B").getColour());
    Assert.assertEquals(origID,result.findVertex("B").getOrigState());
    Assert.assertTrue(result.pairCompatibility.compatibility.get(result.findVertex("T")).get(result.findVertex("D")) == JUConstants.PAIRCOMPATIBILITY.INCOMPATIBLE);
    Assert.assertTrue(result.pairCompatibility.compatibility.get(result.findVertex("U")).get(result.findVertex("T")) == JUConstants.PAIRCOMPATIBILITY.INCOMPATIBLE);
  }

  /** A non-deterministic graph with a slightly different graph where not all states match exactly and
View Full Code Here

    grB.addToCompatibility(grB.findVertex("U"), grB.findVertex("T"),JUConstants.PAIRCOMPATIBILITY.INCOMPATIBLE);
 
    LearnerGraphND result = checkDiffBetweenND(grA, grB, 8,0,threadNumber,configND5,converter);
    Assert.assertEquals(JUConstants.GRAY,result.findVertex("B").getColour());
    Assert.assertEquals(origID,result.findVertex("B").getOrigState());
    Assert.assertTrue(result.pairCompatibility.compatibility.get(result.findVertex("T")).get(result.findVertex("D")) == JUConstants.PAIRCOMPATIBILITY.INCOMPATIBLE);
    Assert.assertTrue(result.pairCompatibility.compatibility.get(result.findVertex("U")).get(result.findVertex("T")) == JUConstants.PAIRCOMPATIBILITY.INCOMPATIBLE);
  }

  /** A non-deterministic graph with a slightly different graph where not all states match exactly and
   * there are some incompatible vertices.
View Full Code Here

    grB.addToCompatibility(grB.findVertex("U"), grB.findVertex("T"),JUConstants.PAIRCOMPATIBILITY.INCOMPATIBLE);
 
    LearnerGraphND result = checkDiffBetweenND(grA, grB, 8,0,threadNumber,configND5,converter);
    Assert.assertEquals(JUConstants.GRAY,result.findVertex("B").getColour());
    Assert.assertEquals(origID,result.findVertex("B").getOrigState());
    Assert.assertTrue(result.pairCompatibility.compatibility.get(result.findVertex("T")).get(result.findVertex("D")) == JUConstants.PAIRCOMPATIBILITY.INCOMPATIBLE);
    Assert.assertTrue(result.pairCompatibility.compatibility.get(result.findVertex("U")).get(result.findVertex("T")) == JUConstants.PAIRCOMPATIBILITY.INCOMPATIBLE);
  }

  /** A non-deterministic graph with a slightly different graph where not all states match exactly and
   * there are some incompatible vertices.
View Full Code Here

 
    LearnerGraphND result = checkDiffBetweenND(grA, grB, 8,0,threadNumber,configND5,converter);
    Assert.assertEquals(JUConstants.GRAY,result.findVertex("B").getColour());
    Assert.assertEquals(origID,result.findVertex("B").getOrigState());
    Assert.assertTrue(result.pairCompatibility.compatibility.get(result.findVertex("T")).get(result.findVertex("D")) == JUConstants.PAIRCOMPATIBILITY.INCOMPATIBLE);
    Assert.assertTrue(result.pairCompatibility.compatibility.get(result.findVertex("U")).get(result.findVertex("T")) == JUConstants.PAIRCOMPATIBILITY.INCOMPATIBLE);
  }

  /** A non-deterministic graph with a slightly different graph where not all states match exactly and
   * there are some incompatible vertices.
   */
 
View Full Code Here

 
    LearnerGraphND result = checkDiffBetweenND(grA, grB, 8,0,threadNumber,configND5,converter);
    Assert.assertEquals(JUConstants.GRAY,result.findVertex("B").getColour());
    Assert.assertEquals(origID,result.findVertex("B").getOrigState());
    Assert.assertTrue(result.pairCompatibility.compatibility.get(result.findVertex("T")).get(result.findVertex("D")) == JUConstants.PAIRCOMPATIBILITY.INCOMPATIBLE);
    Assert.assertTrue(result.pairCompatibility.compatibility.get(result.findVertex("U")).get(result.findVertex("T")) == JUConstants.PAIRCOMPATIBILITY.INCOMPATIBLE);
  }

  /** A non-deterministic graph with a slightly different graph where not all states match exactly and
   * there are some incompatible vertices.
   */
 
View Full Code Here

    final String name = "testComputeGD_ND2";
    Configuration configND6 = config.copy();
    Configuration cloneConfig = configND6.copy();cloneConfig.setLearnerCloneGraph(true);
    String common = "A-a->B-p->B\nA-a->C-q->C\nA-a->D-r->D\nU-a->U-b->R";
    LearnerGraphND grA = buildLearnerGraphND("A-a->E-s->E\nA-a->F-v->F\nC-p->S\n"+common,name+"A",configND6, converter);
    grA.findVertex("F").setColour(JUConstants.RED);grA.findVertex("B").setColour(JUConstants.AMBER);grA.findVertex("B").setDepth(3);
    grA.addToCompatibility(grA.findVertex("D"), grA.findVertex("S"),JUConstants.PAIRCOMPATIBILITY.INCOMPATIBLE);
    grA.addToCompatibility(grA.findVertex("U"), grA.findVertex("S"),JUConstants.PAIRCOMPATIBILITY.INCOMPATIBLE);
    grA.addToCompatibility(grA.findVertex("U"), grA.findVertex("R"),JUConstants.PAIRCOMPATIBILITY.INCOMPATIBLE);
    LearnerGraphND grB = buildLearnerGraphND("A-a->G-u->G\nA-a->H-t->H\nC-q->T\n"+common,name+"B",configND6, converter);
    VertexID origID = VertexID.parseID("test orig");
View Full Code Here

 
  void checkContainsTransition(String from, String to, String labelAsString)
  {
    LearnerGraphND mut = (LearnerGraphND)mutator.getMutated();Map<CmpVertex,Map<Label,List<CmpVertex>>> matrix = mut.getTransitionMatrix();
    Label label = AbstractLearnerGraph.generateNewLabel(labelAsString, mut.config,converter);
    Assert.assertTrue(matrix.get(mut.findVertex(VertexID.parseID(from))).get(label).contains(mut.findVertex(VertexID.parseID(to))));
  }
 
  /** Attempts to add a transition once. */
  @Test
  public void testAddTransition1()
View Full Code Here

    final String name = "testComputeGD_ND2";
    Configuration configND6 = config.copy();
    Configuration cloneConfig = configND6.copy();cloneConfig.setLearnerCloneGraph(true);
    String common = "A-a->B-p->B\nA-a->C-q->C\nA-a->D-r->D\nU-a->U-b->R";
    LearnerGraphND grA = buildLearnerGraphND("A-a->E-s->E\nA-a->F-v->F\nC-p->S\n"+common,name+"A",configND6, converter);
    grA.findVertex("F").setColour(JUConstants.RED);grA.findVertex("B").setColour(JUConstants.AMBER);grA.findVertex("B").setDepth(3);
    grA.addToCompatibility(grA.findVertex("D"), grA.findVertex("S"),JUConstants.PAIRCOMPATIBILITY.INCOMPATIBLE);
    grA.addToCompatibility(grA.findVertex("U"), grA.findVertex("S"),JUConstants.PAIRCOMPATIBILITY.INCOMPATIBLE);
    grA.addToCompatibility(grA.findVertex("U"), grA.findVertex("R"),JUConstants.PAIRCOMPATIBILITY.INCOMPATIBLE);
    LearnerGraphND grB = buildLearnerGraphND("A-a->G-u->G\nA-a->H-t->H\nC-q->T\n"+common,name+"B",configND6, converter);
    VertexID origID = VertexID.parseID("test orig");
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.