Package statechum.analysis.learning

Examples of statechum.analysis.learning.RPNIUniversalLearner


    public static void main(String[] args) {
        QSMTool tool = new QSMTool();
        tool.loadConfig(args[0]);
        if (tool.showLTL) {
            Learner l = new RPNIUniversalLearner(null, tool.learnerInitConfiguration);
            LTL_to_ba ba = new LTL_to_ba(tool.learnerInitConfiguration.config, tool.learnerInitConfiguration.getLabelConverter());
            if (ba.ltlToBA(tool.learnerInitConfiguration.ifthenSequences, l.init(tool.sPlus, tool.sMinus), true,
                    GlobalConfiguration.getConfiguration().getProperty(GlobalConfiguration.G_PROPERTIES.LTL2BA))) {
                try {
                    LearnerGraph graph = Transform.ltlToIfThenAutomaton(ba.getLTLgraph().pathroutines.buildDeterministicGraph());
                    DirectedSparseGraph gr = graph.pathroutines.getGraph();
                    PathRoutines.convertPairAssociationsToTransitions(gr, graph, tool.learnerInitConfiguration.config,tool.learnerInitConfiguration.getLabelConverter());
View Full Code Here


  public static void main(String[] args)
  {
    QSMTool tool = new QSMTool();tool.loadConfig(args[0]);
    if (tool.showLTL)
    {
      Learner l = new RPNIUniversalLearner(null,tool.learnerInitConfiguration);
      LTL_to_ba ba = new LTL_to_ba(tool.learnerInitConfiguration.config);ba.ltlToBA(tool.learnerInitConfiguration.ltlSequences, l.init(tool.sPlus, tool.sMinus));
      Visualiser.updateFrame(ba.augmentGraph(new LearnerGraph(tool.learnerInitConfiguration.config)), null);
    }
    else
      tool.runExperiment();
  }
View Full Code Here

      final LearnerEvaluationConfiguration bfLearnerInitConfiguration = new LearnerEvaluationConfiguration(conf);bfLearnerInitConfiguration.ifthenSequences = PaperUAS.this.learnerInitConfiguration.ifthenSequences;
      config = bfLearnerInitConfiguration.config;// our config is a copy of the one supplied as an argument.
      config.setAskQuestions(false);
      if (choice == pairchoiceMAX || choice == pairchoiceMIN) rnd = null;else rnd = new Random(choice);
     
      learner = new DummyLearner(new RPNIUniversalLearner(null, bfLearnerInitConfiguration))
      {
        @Override
        public LearnerGraph MergeAndDeterminize(LearnerGraph original, StatePair pair)
        {// Use the old and limited version to compute the merge because the general one is too slow on large graphs and we do not need either to merge arbitrary states or to handle "incompatibles".
          return MergeStates.mergeAndDeterminize(original, pair);
View Full Code Here

      if (lc != null) listOfPairsToCheckAgainstIterator = lc.iterator();else listOfPairsToCheckAgainstIterator = null;
      final LearnerEvaluationConfiguration bfLearnerInitConfiguration = new LearnerEvaluationConfiguration(conf);bfLearnerInitConfiguration.ifthenSequences = PaperUAS.this.learnerInitConfiguration.ifthenSequences;
      bfLearnerInitConfiguration.setLabelConverter(PaperUAS.this.learnerInitConfiguration.getLabelConverter());
      config = bfLearnerInitConfiguration.config;// our config is a copy of the one supplied as an argument.
      config.setAskQuestions(false);
      learner = new DummyLearner(new RPNIUniversalLearner(null, bfLearnerInitConfiguration))
      {
       
        @Override
        public LearnerGraph MergeAndDeterminize(LearnerGraph original, StatePair pair)
        {
View Full Code Here

    //Visualiser.updateFrame(new LearnerGraph(FsmParser.buildGraph("A-e->A-c->B-b->C-p->G-e->A\nB-a->D-a->E-a->D\nE-b->F-p->G\n"+
    //"B-e->A\nC-e->A\nD-e->A\nE-e->A\nF-e->A\nG-e->A\n","testAutoAnswers0"),Configuration.getDefaultConfiguration()),null);
    config.setGdFailOnDuplicateNames(false);
    config.setLearnerIdMode(IDMode.POSITIVE_NEGATIVE);

    RPNILearner learner = new RPNIUniversalLearner(null,new LearnerEvaluationConfiguration(null,null,config,null,null))
    {
      @Override
      public Pair<Integer,String> CheckWithEndUser(
          @SuppressWarnings("unused"LearnerGraph model,
          List<Label> question, @SuppressWarnings("unused") int responseForNoRestart,
View Full Code Here

    final AutoAnswers semiUser = new AutoAnswers(null);
    semiUser.loadAnswers(new StringReader(
        partA
    ),config);
   
    RPNILearner learner = new RPNIUniversalLearner(null,new LearnerEvaluationConfiguration(null,null,config,null,null))
    {
      @Override
      public Pair<Integer,String> CheckWithEndUser(
          @SuppressWarnings("unused"LearnerGraph model,
          List<Label> question, @SuppressWarnings("unused") int responseForNoRestart,
View Full Code Here

  public void testAuto2()
  {
    config.setGdFailOnDuplicateNames(false);
    config.setLearnerIdMode(IDMode.POSITIVE_NEGATIVE);

    RPNILearner learner = new RPNIUniversalLearner(null,new LearnerEvaluationConfiguration(null,null,config,null,null))
    {
      @Override
      public Pair<Integer,String> CheckWithEndUser(
          @SuppressWarnings("unused"LearnerGraph model,
          @SuppressWarnings("unused"List<Label> question, @SuppressWarnings("unused") int responseForNoRestart,
View Full Code Here

  public void testAuto3()
  {
    config.setGdFailOnDuplicateNames(false);
    config.setLearnerIdMode(IDMode.POSITIVE_NEGATIVE);

    RPNILearner learner = new RPNIUniversalLearner(null,new LearnerEvaluationConfiguration(null,null,config,null,null))
    {
      @Override
      public Pair<Integer,String> CheckWithEndUser(
          @SuppressWarnings("unused"LearnerGraph model,
          @SuppressWarnings("unused"List<Label> question, @SuppressWarnings("unused") int responseForNoRestart,
View Full Code Here

  public void testAuto4()
  {
    config.setGdFailOnDuplicateNames(false);
    config.setLearnerIdMode(IDMode.POSITIVE_NEGATIVE);

    RPNILearner learner = new RPNIUniversalLearner(null,new LearnerEvaluationConfiguration(null,null,config,null,null))
    {
      @Override
      public Pair<Integer,String> CheckWithEndUser(
          @SuppressWarnings("unused"LearnerGraph model,
          @SuppressWarnings("unused"List<Label> question, @SuppressWarnings("unused") int responseForNoRestart,
View Full Code Here

      final LearnerEvaluationConfiguration bfLearnerInitConfiguration = new LearnerEvaluationConfiguration(conf);bfLearnerInitConfiguration.ifthenSequences = PaperUAS.this.learnerInitConfiguration.ifthenSequences;
      config = bfLearnerInitConfiguration.config;// our config is a copy of the one supplied as an argument.
      config.setAskQuestions(false);
      if (choice == pairchoiceMAX || choice == pairchoiceMIN) rnd = null;else rnd = new Random(choice);
     
      learner = new DummyLearner(new RPNIUniversalLearner(null, bfLearnerInitConfiguration))
      {
        @Override
        public LearnerGraph MergeAndDeterminize(LearnerGraph original, StatePair pair)
        {// Use the old and limited version to compute the merge because the general one is too slow on large graphs and we do not need either to merge arbitrary states or to handle "incompatibles".
          return MergeStates.mergeAndDeterminize(original, pair);
View Full Code Here

TOP

Related Classes of statechum.analysis.learning.RPNIUniversalLearner

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.