Examples of FSMStructure


Examples of statechum.analysis.learning.TestFSMAlgo.FSMStructure

  }

  @Test
  public final void test_6() // long test sequence (which does not exist) which is rejected part-way
  {
    FSMStructure mach = WMethod.getGraphData(TestFSMAlgo.buildGraph("AM-a->AM-b->AM-c->AM","tmp graph"));
    PTATestSequenceEngine engine = new PTA_FSMStructure(mach);
    sequenceSet partialPTA = engine.new sequenceSet();partialPTA.setIdentity();
    partialPTA = partialPTA.cross(TestFSMAlgo.buildSet(new String[][] {
        new String[] {"a","b","b","c","c","d"},
      }));
View Full Code Here

Examples of statechum.analysis.learning.TestFSMAlgo.FSMStructure

  }

  @Test
  public final void test_ign_1() // long test sequence (which exists) which is rejected part-way, but first element of it is ignored.
  {
    FSMStructure mach = WMethod.getGraphData(TestFSMAlgo.buildGraph("AM-a->AM-b->AM-c->AM","tmp graph"));
    PTATestSequenceEngine engine = new PTA_FSMStructure(mach);

    sequenceSet partialPTA = engine.new sequenceSet();partialPTA.setIdentity();
    partialPTA = partialPTA.cross(TestFSMAlgo.buildSet(new String[][] {
        new String[] {"a"},
View Full Code Here

Examples of statechum.analysis.learning.TestFSMAlgo.FSMStructure

  }

  @Test
  public final void test_ign2() // a complex structure, most of which gets ignored.
  {
    FSMStructure mach = WMethod.getGraphData(TestFSMAlgo.buildGraph("AM-a->BM-a->AM\nBM-b->CM-a->DM","tmp graph"));
    PTATestSequenceEngine engine = new PTA_FSMStructure(mach);
    sequenceSet partialPTA = engine.new sequenceSet();partialPTA.setIdentity();
    partialPTA = partialPTA.cross(TestFSMAlgo.buildSet(new String[][] {
        new String[] {"a","a","a","a","b"}, new String[]{"b"}, new String[]{"a", "b", "c"}, new String[]{"a", "b", "a"}
      }));
View Full Code Here

Examples of statechum.analysis.learning.TestFSMAlgo.FSMStructure

  }

  @Test
  public final void test_ign3() // long test sequence (which does not exist) which is rejected part-way
  {
    FSMStructure mach = WMethod.getGraphData(TestFSMAlgo.buildGraph("AM-a->AM-b->AM-c->AM","tmp graph"));
    PTATestSequenceEngine engine = new PTA_FSMStructure(mach);
    sequenceSet partialPTA = engine.new sequenceSet();partialPTA.setIdentity();
    partialPTA = partialPTA.cross(TestFSMAlgo.buildSet(new String[][] {
        new String[] {"a","b","b","c","c","d"},
      }));
View Full Code Here

Examples of statechum.analysis.learning.TestFSMAlgo.FSMStructure

   *
   * @param graph the outcome of learning.
   */
  protected void writeResult(DirectedSparseGraph graph)
  {
    Element finalGraphXMLNode = new FSMStructure(graph,null).transform322.createGraphMLNode(doc);
    finalGraphXMLNode.setAttribute(ELEM_KINDS.ATTR_GRAPHKIND.name(),ELEM_KINDS.ATTR_LEARNINGOUTCOME.name());
    writeElement(finalGraphXMLNode);
  }
View Full Code Here

Examples of statechum.analysis.learning.TestFSMAlgo.FSMStructure

  }
 
  public computeStateScores MergeAndDeterminize(computeStateScores original, StatePair pair)
  {
    computeStateScores result = decoratedLearner.MergeAndDeterminize(original, pair);
    Element mergedGraph = new FSMStructure(result.getGraph(),null).transform322.createGraphMLNode(doc);
    Element mergeNode = doc.createElement(ELEM_KINDS.ELEM_MERGEANDDETERMINIZE.name());
    mergeNode.appendChild(mergedGraph);mergeNode.appendChild(writePair(new PairScore(pair.getQ(),pair.getR(),0,0)));
    writeElement(mergeNode);
    return result;
  }
View Full Code Here

Examples of statechum.analysis.learning.TestFSMAlgo.FSMStructure

  }
 
  @Test
  public final void testTruncateSeq1()
  {
    FSMStructure fsm = getGraphData(buildGraph("A-p->A-b->B-c->B-a->C\nQ-d->S","testTruncateSeq1"));
    Assert.assertEquals(Arrays.asList(new String[]{"p","b"}), WMethod.truncateSequence(fsm, Arrays.asList(new String[]{"p","b"})));
  }
View Full Code Here

Examples of statechum.analysis.learning.TestFSMAlgo.FSMStructure

  }

  @Test
  public final void testTruncateSeq2()
  {
    FSMStructure fsm = getGraphData(buildGraph("A-p->A-b->B-c->B-a->C\nQ-d->S","testTruncateSeq2"));
    Assert.assertEquals(Arrays.asList(new String[]{"p","b","c"}), WMethod.truncateSequence(fsm, Arrays.asList(new String[]{"p","b","c"})));
  }
View Full Code Here

Examples of statechum.analysis.learning.TestFSMAlgo.FSMStructure

  }
 
  @Test
  public final void testTruncateSeq3()
  {
    FSMStructure fsm = getGraphData(buildGraph("A-p->A-b->B-c->B-a->C\nQ-d->S","testTruncateSeq3"));
    Assert.assertEquals(Arrays.asList(new String[]{}), WMethod.truncateSequence(fsm, Arrays.asList(new String[]{})));
  }
View Full Code Here

Examples of statechum.analysis.learning.TestFSMAlgo.FSMStructure

  }

  @Test
  public final void testTruncateSeq4()
  {
    FSMStructure fsm = getGraphData(buildGraph("A-p->A-b->B-c->B-a->C\nQ-d->S","testTruncateSeq4"));
    Assert.assertEquals(Arrays.asList(new String[]{"p","b","z"}), WMethod.truncateSequence(fsm, Arrays.asList(new String[]{"p","b","z","e"})));
  }
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.