Package statechum.model.testset

Examples of statechum.model.testset.PTASequenceSetAutomaton


  /** Checks that concatenation works for real paths, using the new routine. */
  @Test
  public final void testComputePathsSBetween16()
  {
    LearnerGraph s = buildLearnerGraph(complexGraphA, "ComputePathsSBetween_complexGraphA", testConfig,getLabelConverter());
    PTASequenceEngine engine = new PTASequenceEngine();engine.init(new PTASequenceSetAutomaton());
    PTASequenceEngine.SequenceSet initSet = engine.new SequenceSet();initSet.setIdentity();
    PTASequenceEngine.SequenceSet pathsA = engine.new SequenceSet();
    s.paths.ORIGcomputePathsSBetween(s.findVertex("F"), s.findVertex("D"),initSet,pathsA);
    PTASequenceEngine.SequenceSet pathsB = engine.new SequenceSet();
    s.paths.ORIGcomputePathsSBetween(s.findVertex("B"), s.findVertex("C"),pathsA,pathsB);
View Full Code Here


   
    IllegalArgumentException exORIG = null;
   
    {// testing the orig part
      LearnerGraph s = new LearnerGraph(TestFSMAlgo.buildGraph(machine, testName), testConfig);
      PTASequenceEngine engine = new PTASequenceEngine();engine.init(new PTASequenceSetAutomaton());
      PTASequenceEngine.SequenceSet initSet = engine.new SequenceSet();initSet.setIdentity();
      PTASequenceEngine.SequenceSet paths = engine.new SequenceSet();
      if (initSeq != null) initSet=initSet.cross(TestFSMAlgo.buildSet(initSeq));
      try
      {
        s.paths.ORIGcomputePathsSBetween(s.findVertex(FirstState), s.findVertex(SecondState),initSet,paths);
        Map<String,String> actual = engine.getDebugDataMapDepth(paths);
        Assert.assertTrue("expected: "+expected+", actual: "+actual, expected.equals(actual));
      }
      catch(IllegalArgumentException ex)
      { exORIG = ex; }
     
    }

    IllegalArgumentException exNew = null;
   
    {// testing the new part
      LearnerGraph s = new LearnerGraph(TestFSMAlgo.buildGraph(machine, testName), testConfig);
      PTASequenceEngine engine = new PTASequenceEngine();engine.init(new PTASequenceSetAutomaton());
      PTASequenceEngine.SequenceSet initSet = engine.new SequenceSet();initSet.setIdentity();
      PTASequenceEngine.SequenceSet paths = engine.new SequenceSet();
      if (initSeq != null) initSet=initSet.cross(TestFSMAlgo.buildSet(initSeq));
      try
      {
        s.pathroutines.computePathsSBetween(s.findVertex(FirstState), s.findVertex(SecondState),initSet,paths);
        Map<String,String> actual = engine.getDebugDataMapDepth(paths);
        Assert.assertTrue("expected: "+expected+", actual: "+actual, expected.equals(actual));
      }
      catch(IllegalArgumentException ex)
      { exNew = ex; }
    }

    IllegalArgumentException exCaching = null;
   
    {// testing the latest part with caching.
      LearnerGraph s = new LearnerGraph(TestFSMAlgo.buildGraph(machine, testName), testConfig);
      PTASequenceEngine engine = new PTASequenceEngine();engine.init(new PTASequenceSetAutomaton());
      PTASequenceEngine.SequenceSet initSet = engine.new SequenceSet();initSet.setIdentity();
      if (initSeq != null) initSet=initSet.cross(TestFSMAlgo.buildSet(initSeq));
      try
      {
        Map<CmpVertex,PTASequenceEngine.SequenceSet> map = s.pathroutines.computePathsSBetween_All(s.findVertex(FirstState), engine,initSet);
View Full Code Here

  /** Checks that concatenation works for real paths, using the new routine. */
  @Test
  public final void testComputePathsSBetween16()
  {
    LearnerGraph s = new LearnerGraph(TestFSMAlgo.buildGraph(complexGraphA, "ComputePathsSBetween_complexGraphA"), testConfig);
    PTASequenceEngine engine = new PTASequenceEngine();engine.init(new PTASequenceSetAutomaton());
    PTASequenceEngine.SequenceSet initSet = engine.new SequenceSet();initSet.setIdentity();
    PTASequenceEngine.SequenceSet pathsA = engine.new SequenceSet();
    s.paths.ORIGcomputePathsSBetween(s.findVertex("F"), s.findVertex("D"),initSet,pathsA);
    PTASequenceEngine.SequenceSet pathsB = engine.new SequenceSet();
    s.paths.ORIGcomputePathsSBetween(s.findVertex("B"), s.findVertex("C"),pathsA,pathsB);
View Full Code Here

   
    // Here we are building a PTA which consists of accept states for plusStrings and reject-states
    // for minusStrings. This way if a plus string is a prefix of a plusString, the prefix will
    // be labelled with Boolean(true) states and the suffix - with Boolean(false) states.
    // Note that the suffix may contain many states.
    allSequences.init(new PTASequenceSetAutomaton()
    {
      @Override
      public Object getTheOnlyState() {
        return statesAccept.get()?accept:reject;
      }
View Full Code Here

   
    IllegalArgumentException exORIG = null;
   
    {// testing the orig part
      LearnerGraph s = buildLearnerGraph(machine, testName, testConfig,getLabelConverter());
      PTASequenceEngine engine = new PTASequenceEngine();engine.init(new PTASequenceSetAutomaton());
      PTASequenceEngine.SequenceSet initSet = engine.new SequenceSet();initSet.setIdentity();
      PTASequenceEngine.SequenceSet paths = engine.new SequenceSet();
      if (initSeq != null) initSet=initSet.cross(TestFSMAlgo.buildSet(initSeq, testConfig,getLabelConverter()));
      try
      {
        s.paths.ORIGcomputePathsSBetween(s.findVertex(FirstState), s.findVertex(SecondState),initSet,paths);
        Map<String,String> actual = engine.getDebugDataMapDepth(paths);
        Assert.assertTrue("expected: "+expected+", actual: "+actual, expected.equals(actual));
      }
      catch(IllegalArgumentException ex)
      { exORIG = ex; }
     
    }

    IllegalArgumentException exNew = null;
   
    {// testing the new part
      LearnerGraph s = buildLearnerGraph(machine, testName, testConfig,getLabelConverter());
      PTASequenceEngine engine = new PTASequenceEngine();engine.init(new PTASequenceSetAutomaton());
      PTASequenceEngine.SequenceSet initSet = engine.new SequenceSet();initSet.setIdentity();
      PTASequenceEngine.SequenceSet paths = engine.new SequenceSet();
      if (initSeq != null) initSet=initSet.cross(TestFSMAlgo.buildSet(initSeq, testConfig,getLabelConverter()));
      try
      {
        s.pathroutines.computePathsSBetween(s.findVertex(FirstState), s.findVertex(SecondState),initSet,paths);
        Map<String,String> actual = engine.getDebugDataMapDepth(paths);
        Assert.assertTrue("expected: "+expected+", actual: "+actual, expected.equals(actual));
      }
      catch(IllegalArgumentException ex)
      { exNew = ex; }
    }

    IllegalArgumentException exCaching = null;
   
    {// testing the latest part with caching.
      LearnerGraph s = buildLearnerGraph(machine, testName, testConfig,getLabelConverter());
      PTASequenceEngine engine = new PTASequenceEngine();engine.init(new PTASequenceSetAutomaton());
      PTASequenceEngine.SequenceSet initSet = engine.new SequenceSet();initSet.setIdentity();
      if (initSeq != null) initSet=initSet.cross(TestFSMAlgo.buildSet(initSeq, testConfig,getLabelConverter()));
      try
      {
        Map<CmpVertex,PTASequenceEngine.SequenceSet> map = s.pathroutines.computePathsSBetween_All(s.findVertex(FirstState), engine,initSet);
View Full Code Here

  /** Checks that concatenation works for real paths, using the new routine. */
  @Test
  public final void testComputePathsSBetween16()
  {
    LearnerGraph s = buildLearnerGraph(complexGraphA, "ComputePathsSBetween_complexGraphA", testConfig,getLabelConverter());
    PTASequenceEngine engine = new PTASequenceEngine();engine.init(new PTASequenceSetAutomaton());
    PTASequenceEngine.SequenceSet initSet = engine.new SequenceSet();initSet.setIdentity();
    PTASequenceEngine.SequenceSet pathsA = engine.new SequenceSet();
    s.paths.ORIGcomputePathsSBetween(s.findVertex("F"), s.findVertex("D"),initSet,pathsA);
    PTASequenceEngine.SequenceSet pathsB = engine.new SequenceSet();
    s.paths.ORIGcomputePathsSBetween(s.findVertex("B"), s.findVertex("C"),pathsA,pathsB);
View Full Code Here

   
    // Here we are building a PTA which consists of accept states for plusStrings and reject-states
    // for minusStrings. This way if a plus string is a prefix of a plusString, the prefix will
    // be labelled with Boolean(true) states and the suffix - with Boolean(false) states.
    // Note that the suffix may contain many states.
    allSequences.init(new PTASequenceSetAutomaton()
    {
      @Override
      public Object getTheOnlyState() {
        return statesAccept.get()?accept:reject;
      }
View Full Code Here

   
    IllegalArgumentException exORIG = null;
   
    {// testing the orig part
      LearnerGraph s = buildLearnerGraph(machine, testName, testConfig,getLabelConverter());
      PTASequenceEngine engine = new PTASequenceEngine();engine.init(new PTASequenceSetAutomaton());
      PTASequenceEngine.SequenceSet initSet = engine.new SequenceSet();initSet.setIdentity();
      PTASequenceEngine.SequenceSet paths = engine.new SequenceSet();
      if (initSeq != null) initSet=initSet.cross(TestFSMAlgo.buildSet(initSeq, testConfig,getLabelConverter()));
      try
      {
        s.paths.ORIGcomputePathsSBetween(s.findVertex(FirstState), s.findVertex(SecondState),initSet,paths);
        Map<String,String> actual = engine.getDebugDataMapDepth(paths);
        Assert.assertTrue("expected: "+expected+", actual: "+actual, expected.equals(actual));
      }
      catch(IllegalArgumentException ex)
      { exORIG = ex; }
     
    }

    IllegalArgumentException exNew = null;
   
    {// testing the new part
      LearnerGraph s = buildLearnerGraph(machine, testName, testConfig,getLabelConverter());
      PTASequenceEngine engine = new PTASequenceEngine();engine.init(new PTASequenceSetAutomaton());
      PTASequenceEngine.SequenceSet initSet = engine.new SequenceSet();initSet.setIdentity();
      PTASequenceEngine.SequenceSet paths = engine.new SequenceSet();
      if (initSeq != null) initSet=initSet.cross(TestFSMAlgo.buildSet(initSeq, testConfig,getLabelConverter()));
      try
      {
        s.pathroutines.computePathsSBetween(s.findVertex(FirstState), s.findVertex(SecondState),initSet,paths);
        Map<String,String> actual = engine.getDebugDataMapDepth(paths);
        Assert.assertTrue("expected: "+expected+", actual: "+actual, expected.equals(actual));
      }
      catch(IllegalArgumentException ex)
      { exNew = ex; }
    }

    IllegalArgumentException exCaching = null;
   
    {// testing the latest part with caching.
      LearnerGraph s = buildLearnerGraph(machine, testName, testConfig,getLabelConverter());
      PTASequenceEngine engine = new PTASequenceEngine();engine.init(new PTASequenceSetAutomaton());
      PTASequenceEngine.SequenceSet initSet = engine.new SequenceSet();initSet.setIdentity();
      if (initSeq != null) initSet=initSet.cross(TestFSMAlgo.buildSet(initSeq, testConfig,getLabelConverter()));
      try
      {
        Map<CmpVertex,PTASequenceEngine.SequenceSet> map = s.pathroutines.computePathsSBetween_All(s.findVertex(FirstState), engine,initSet);
View Full Code Here

  /** Checks that concatenation works for real paths, using the new routine. */
  @Test
  public final void testComputePathsSBetween16()
  {
    LearnerGraph s = buildLearnerGraph(complexGraphA, "ComputePathsSBetween_complexGraphA", testConfig,getLabelConverter());
    PTASequenceEngine engine = new PTASequenceEngine();engine.init(new PTASequenceSetAutomaton());
    PTASequenceEngine.SequenceSet initSet = engine.new SequenceSet();initSet.setIdentity();
    PTASequenceEngine.SequenceSet pathsA = engine.new SequenceSet();
    s.paths.ORIGcomputePathsSBetween(s.findVertex("F"), s.findVertex("D"),initSet,pathsA);
    PTASequenceEngine.SequenceSet pathsB = engine.new SequenceSet();
    s.paths.ORIGcomputePathsSBetween(s.findVertex("B"), s.findVertex("C"),pathsA,pathsB);
View Full Code Here

   
    // Here we are building a PTA which consists of accept states for plusStrings and reject-states
    // for minusStrings. This way if a plus string is a prefix of a plusString, the prefix will
    // be labelled with Boolean(true) states and the suffix - with Boolean(false) states.
    // Note that the suffix may contain many states.
    allSequences.init(new PTASequenceSetAutomaton()
    {
      @Override
      public Object getTheOnlyState() {
        return statesAccept.get()?accept:reject;
      }
View Full Code Here

TOP

Related Classes of statechum.model.testset.PTASequenceSetAutomaton

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.