Package statechum.analysis.learning.rpnicore.LearnerGraph

Examples of statechum.analysis.learning.rpnicore.LearnerGraph.NonExistingPaths


  {
    PTASequenceEngine engine = coregraph.learnerCache.getQuestionsPTA();
    if (engine == null)
      throw new IllegalArgumentException("questions PTA has not been computed yet");

    NonExistingPaths nonExisting = (NonExistingPaths) engine.getFSM();
    Map<CmpVertex,Map<String,CmpVertex>> nonexistingMatrix = nonExisting.getNonExistingTransitionMatrix();
    CmpVertex currentState = coregraph.getInit();
    nonExisting.getNonExistingVertices().remove(currentState);
    for(String label:question)
    {
      Map<String,CmpVertex> graphTargets = nonexistingMatrix.get(currentState);
      if (graphTargets == null) // the current state is normal rather than partially or completely non-existent.
        graphTargets = coregraph.transitionMatrix.get(currentState);
      currentState = graphTargets.get(label);
      assert currentState != null;
      nonExisting.getNonExistingVertices().remove(currentState);
    }
    return currentState.isAccept() == accept;
  }
View Full Code Here


  {
    PTASequenceEngine engine = coregraph.learnerCache.getQuestionsPTA();
    if (engine == null)
      throw new IllegalArgumentException("questions PTA has not been computed yet");

    NonExistingPaths nonExisting = (NonExistingPaths) engine.getFSM();
    Map<CmpVertex,Map<Label,CmpVertex>> nonexistingMatrix = nonExisting.getNonExistingTransitionMatrix();
    CmpVertex currentState = coregraph.getInit();
    nonExisting.getNonExistingVertices().remove(currentState);
    for(Label label:question)
    {
      Map<Label,CmpVertex> graphTargets = nonexistingMatrix.get(currentState);
      if (graphTargets == null) // the current state is normal rather than partially or completely non-existent.
        graphTargets = coregraph.transitionMatrix.get(currentState);
      currentState = graphTargets.get(label);
      if (currentState == null)
        return null;
      nonExisting.getNonExistingVertices().remove(currentState);
    }
    return currentState.isAccept() == accept;
  }
View Full Code Here

  {
    PTASequenceEngine engine = coregraph.learnerCache.getQuestionsPTA();
    if (engine == null)
      throw new IllegalArgumentException("questions PTA has not been computed yet");

    NonExistingPaths nonExisting = (NonExistingPaths) engine.getFSM();
    Map<CmpVertex,Map<Label,CmpVertex>> nonexistingMatrix = nonExisting.getNonExistingTransitionMatrix();
    CmpVertex currentState = coregraph.getInit();
    nonExisting.getNonExistingVertices().remove(currentState);
    for(Label label:question)
    {
      Map<Label,CmpVertex> graphTargets = nonexistingMatrix.get(currentState);
      if (graphTargets == null) // the current state is normal rather than partially or completely non-existent.
        graphTargets = coregraph.transitionMatrix.get(currentState);
      currentState = graphTargets.get(label);
      if (currentState == null)
        return null;
      nonExisting.getNonExistingVertices().remove(currentState);
    }
    return currentState.isAccept() == accept;
  }
View Full Code Here

    CmpVertex mergedRed = merged.findVertex(pair.getR());
    if (mergedRed == null)
      throw new IllegalArgumentException("failed to find the red state in the merge result");
   
    PTASequenceEngine engine = new PTASequenceEngine();
    engine.init(original.new NonExistingPaths());
    PTASequenceEngine.SequenceSet paths = engine.new SequenceSet();
    PTASequenceEngine.SequenceSet initp = engine.new SequenceSet();initp.setIdentity();

    merged.pathroutines.computePathsSBetween(merged.getInit(),mergedRed, initp, paths);
   
View Full Code Here

    CmpVertex mergedRed = merged.findVertex(pair.getR());
    if (mergedRed == null)
      throw new IllegalArgumentException("failed to find the red state in the merge result");
   
    PTASequenceEngine engine = new PTASequenceEngine();
    engine.init(original.new NonExistingPaths());
    PTASequenceEngine.SequenceSet paths = engine.new SequenceSet();
    PTASequenceEngine.SequenceSet initp = engine.new SequenceSet();initp.setIdentity();

    List<Collection<Label>> sequenceOfSets = merged.paths.COMPAT_computePathsSBetween(merged.getInit(),mergedRed);
    if (sequenceOfSets == null)
View Full Code Here

    CmpVertex mergedRed = merged.findVertex(pair.getR());
    if (mergedRed == null)
      throw new IllegalArgumentException("failed to find the red state in the merge result");
   
    PTASequenceEngine engine = new PTASequenceEngine();
    engine.init(original.new NonExistingPaths());
    PTASequenceEngine.SequenceSet initp = engine.new SequenceSet();initp.setIdentity();
    merged.questions.buildQuestionsFromPair_Compatible(mergedRed, initp);
    return engine.getData(PTASequenceEngine.truePred);
  }
View Full Code Here

   
    @Override
    public PTASequenceEngine constructEngine(LearnerGraph original, @SuppressWarnings("unused") LearnerGraph learnt)
    {
      engine = new PTASequenceEngine();
      engine.init(original.new NonExistingPaths());
      return engine;
    }
View Full Code Here

    @Override
    public PTASequenceEngine constructEngine(LearnerGraph original, @SuppressWarnings("unused") LearnerGraph learnt)
    {
      engine = new PTASequenceEngine();
      engine.init(original.new NonExistingPaths());
      return engine;
    }
View Full Code Here

    @Override
    public PTASequenceEngine constructEngine(LearnerGraph original, @SuppressWarnings("unused") LearnerGraph learnt)
    {
      engine = new PTASequenceEngine();
      engine.init(original.new NonExistingPaths());
      return engine;
    }
View Full Code Here

   
    @Override
    public PTASequenceEngine constructEngine(LearnerGraph original, @SuppressWarnings("unused") LearnerGraph learnt)
    {
      engine = new PTASequenceEngine();
      engine.init(original.new NonExistingPaths());
      return engine;
    }
View Full Code Here

TOP

Related Classes of statechum.analysis.learning.rpnicore.LearnerGraph.NonExistingPaths

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.