Package statechum.analysis.learning.rpnicore.WMethod

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


    Assert.assertEquals(1,newTransitions.get(graph.findVertex("B")).size());
   
    Assert.assertSame(MarkovOutcome.positive, newTransitions.get(graph.findVertex("B")).get(lblB));

    final LearnerGraph expected = FsmParser.buildLearnerGraph("A-a->B / A-c->B / B-b->C / T-b->T-u->T","testConstructExtendedGraph6b",config, converter);
    DifferentFSMException ex = WMethod.checkM(expected, m.get_extension_model());
    if (ex != null)
      throw ex;
    Assert.assertNotSame(graph, m.get_extension_model());
  }
View Full Code Here


   
    Assert.assertSame(MarkovOutcome.positive, newTransitions.get(graph.findVertex("B")).get(lblB));
    Assert.assertSame(MarkovOutcome.positive, newTransitions.get(graph.findVertex("Z")).get(lblU));

    final LearnerGraph expected = FsmParser.buildLearnerGraph("A-a->B / A-c->B-c->Z-u->Y / B-b->C / T-b->T-u->T","testConstructExtendedGraph7b",config, converter);
    DifferentFSMException ex = WMethod.checkM(expected, m.get_extension_model());
    if (ex != null)
      throw ex;
    Assert.assertNotSame(graph, m.get_extension_model());
  }
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

      }
    }
   
    if (GlobalConfiguration.getConfiguration().isAssertEnabled() && checkWasModified)
    {// if graphModified is true the graph should not have been modified and vice-versa
      DifferentFSMException ex = WMethod.checkM(graph, result);
      assert graphModified == (ex != null);
    }
    return graphModified?result:null;
  }
View Full Code Here

    {
      StatePair statePair = currentExplorationBoundary.remove();
      assert big.transitionMatrix.containsKey(statePair.firstElem) : "state "+statePair.firstElem+" is not known to the first graph";
      assert small.transitionMatrix.containsKey(statePair.secondElem) : "state "+statePair.secondElem+" is not known to the second graph";
      if (statePair.firstElem.isAccept() != statePair.secondElem.isAccept())
        throw new DifferentFSMException("states "+statePair.firstElem+" and " + statePair.secondElem+" have a different acceptance labelling between the machines");

      Map<String,CmpVertex> targetsBig = big.transitionMatrix.get(statePair.firstElem);
      Map<String,CmpVertex> targetsSmall = small.transitionMatrix.get(statePair.secondElem);
         
      for(Entry<String,CmpVertex> labelstate:targetsSmall.entrySet())
View Full Code Here

      }
    }
   
    if (GlobalConfiguration.getConfiguration().isAssertEnabled() && checkWasModified)
    {// if graphModified is true the graph should not have been modified and vice-versa
      DifferentFSMException ex = WMethod.checkM(graph, result);
      assert graphModified == (ex != null);
    }
    return graphModified?result:null;
  }
View Full Code Here

    {
      StatePair statePair = currentExplorationBoundary.remove();
      assert big.transitionMatrix.containsKey(statePair.firstElem) : "state "+statePair.firstElem+" is not known to the first graph";
      assert small.transitionMatrix.containsKey(statePair.secondElem) : "state "+statePair.secondElem+" is not known to the second graph";
      if (statePair.firstElem.isAccept() != statePair.secondElem.isAccept())
        throw new DifferentFSMException("states "+statePair.firstElem+" and " + statePair.secondElem+" have a different acceptance labelling between the machines");

      Map<Label,CmpVertex> targetsBig = big.transitionMatrix.get(statePair.firstElem);
      Map<Label,CmpVertex> targetsSmall = small.transitionMatrix.get(statePair.secondElem);
         
      for(Entry<Label,CmpVertex> labelstate:targetsSmall.entrySet())
View Full Code Here

   
    System.out.println("Huge: "+hugeGraph.getStateNumber()+" states, "+(hugeGraph.getStateNumber()-hugeGraph.getAcceptStateNumber())+" reject states");
    System.out.println("Small: "+smallGraph.getStateNumber()+" states, "+(smallGraph.getStateNumber()-smallGraph.getAcceptStateNumber())+" reject states");
    Label labelToMerge = AbstractLearnerGraph.generateNewLabel("Waypoint_Selected",mainConfiguration,converter);
    LearnerGraph mergedHuge = PairQualityLearner.mergeStatesForUnique(hugeGraph, labelToMerge);
    DifferentFSMException diffFSM = WMethod.checkM(smallGraph, mergedHuge);
    if (diffFSM != null)
      throw diffFSM;

    LearnerGraph mergedSmall = PairQualityLearner.mergeStatesForUnique(smallGraph,labelToMerge);
    diffFSM = WMethod.checkM(smallGraph,mergedSmall);
View Full Code Here

      gd.computeDifference(patcher);

      ChangesRecorder.applyGD_WithRelabelling(graph, patcher.writeGD(TestGD.createDoc()),outcome);
      Assert.assertNull(testDetails(),WMethod.checkM(grB,graph));
      Assert.assertEquals(testDetails(),grB.getStateNumber(),graph.getStateNumber());
      DifferentFSMException ex= WMethod.checkM_and_colours(grB,outcome,VERTEX_COMPARISON_KIND.DEEP);
      Assert.assertNull(testDetails()+ex,WMethod.checkM_and_colours(grB,outcome,VERTEX_COMPARISON_KIND.DEEP));Assert.assertEquals(grB.getStateNumber(),graph.getStateNumber());
      Assert.assertEquals(grB,outcome);
    }
    catch(IOException ex)
    {
View Full Code Here

      }
    }
   
    if (GlobalConfiguration.getConfiguration().isAssertEnabled() && checkWasModified)
    {// if graphModified is true the graph should not have been modified and vice-versa
      DifferentFSMException ex = WMethod.checkM(graph, result);
      assert graphModified == (ex != null);
    }
    return graphModified?result:null;
  }
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.