Package statechum.analysis.learning.rpnicore.Transform

Examples of statechum.analysis.learning.rpnicore.Transform.ConvertALabel


  public static void runExperiment() throws Exception
  {
    DrawGraphs gr = new DrawGraphs();
    Configuration config = Configuration.getDefaultConfiguration().copy();config.setAskQuestions(false);config.setDebugMode(false);config.setGdLowToHighRatio(0.7);config.setRandomPathAttemptFudgeThreshold(1000);
    config.setTransitionMatrixImplType(STATETREE.STATETREE_ARRAY);config.setLearnerScoreMode(ScoreMode.ONLYOVERRIDE);
    ConvertALabel converter = new Transform.InternStringLabel();
    GlobalConfiguration.getConfiguration().setProperty(G_PROPERTIES.LINEARWARNINGS, "false");
    final int ThreadNumber = ExperimentRunner.getCpuNumber()
    ExecutorService executorService = Executors.newFixedThreadPool(ThreadNumber);
    final int minStateNumber = 20;
    final int samplesPerFSM = 10;
View Full Code Here


            @Override
            public void actionPerformed(@SuppressWarnings("unused") ActionEvent e) {
              try {
                LearnerGraphND grOrig = graphsOrig.get(currentGraph);LearnerGraphND grNew = new LearnerGraphND(grOrig,grOrig.config);
                final String moduleName = grOrig.config.getErlangModuleName()+":";
                final ConvertALabel converter = ErlangModule.loadModule(grOrig.config).behaviour.new ConverterModToErl();
              AbstractLearnerGraph.interpretLabelsOnGraph(grOrig,grNew,new Transform.ConvertLabel(new ConvertALabel() {
           
            @Override
            public Label convertLabelToLabel(Label label) {
              ErlangLabel lbl = (ErlangLabel)converter.convertLabelToLabel(label);
              return new ErlangLabel(null, lbl.callName.replace(moduleName, ""), lbl.input, lbl.expectedOutput);
            }
          }));
              grNew.setName(grOrig.getNameNotNull()+"-nomodule");
              updateFrameWithPos(grNew, strippedFrameNumber++);
View Full Code Here

  public static void runExperiment() throws Exception
  {
    DrawGraphs gr = new DrawGraphs();
    Configuration config = Configuration.getDefaultConfiguration().copy();config.setAskQuestions(false);config.setDebugMode(false);config.setGdLowToHighRatio(0.7);config.setRandomPathAttemptFudgeThreshold(1000);
    config.setTransitionMatrixImplType(STATETREE.STATETREE_LINKEDHASH);config.setLearnerScoreMode(ScoreMode.COMPATIBILITY);
    ConvertALabel converter = new Transform.InternStringLabel();
    GlobalConfiguration.getConfiguration().setProperty(G_PROPERTIES.LINEARWARNINGS, "false");
    final int ThreadNumber = ExperimentRunner.getCpuNumber()
    ExecutorService executorService = Executors.newFixedThreadPool(ThreadNumber);
    final int minStateNumber = 20;
    final int samplesPerFSM = 5;
View Full Code Here

      });
    }

    public static <TARGET_TYPE,CACHE_TYPE extends CachedData<TARGET_TYPE,CACHE_TYPE>> void convertLabelsToStrings(AbstractLearnerGraph<TARGET_TYPE,CACHE_TYPE> grFrom, AbstractLearnerGraph<TARGET_TYPE,CACHE_TYPE> grTo)
    {
        AbstractLearnerGraph.interpretLabelsOnGraph(grFrom,grTo,new Transform.ConvertLabel(new ConvertALabel() {
       
        @Override
        public Label convertLabelToLabel(Label label) {
          ErlangLabel lbl = (ErlangLabel)label;
          return new StringLabel(lbl.function.getName()+"/"+lbl.function.getArity()+","+lbl.input+","+lbl.expectedOutput);
View Full Code Here

 
  public static int runExperiment(String args[]) throws Exception
  {
    Configuration config = Configuration.getDefaultConfiguration().copy();config.setAskQuestions(false);config.setDebugMode(false);config.setGdLowToHighRatio(0.7);config.setRandomPathAttemptFudgeThreshold(1000);
    config.setTransitionMatrixImplType(STATETREE.STATETREE_ARRAY);config.setLearnerScoreMode(ScoreMode.GENERAL);
    ConvertALabel converter = new Transform.InternStringLabel();
    GlobalConfiguration.getConfiguration().setProperty(G_PROPERTIES.LINEARWARNINGS, "false");
    final int minStateNumber = 10;
    final int samplesPerFSM = 5;
    final int stateNumberIncrement = 5;
    final int rangeOfStateNumbers = stateNumberIncrement;
View Full Code Here

  // AbstractLearnerGraph is polymorphic in this context: I can use both deterministic and non-deterministic graphs.
  @Parameters
  public static Collection<Object[]> data()
  {
    Configuration config = Configuration.getDefaultConfiguration().copy();config.setTransitionMatrixImplType(STATETREE.STATETREE_SLOWTREE);
    ConvertALabel converter = new Transform.InternStringLabel();
    final String fsmA = "S-a->S1-b->"+"A-a->A1-a-#AR\nA1-d->A2-d->A3\nA1-c->A2-c->A3"+TestRpniLearner.PTA3;
    final String fsmB = "S-a->S\nA1-a->A2\nS-a->S1-b->"+"A-a->A1-a-#AR\nA1-d->A2-d->A3\nA1-c->A2-c->A3"+TestRpniLearner.PTA3;
    LearnerGraph graphD=FsmParser.buildLearnerGraph(fsmA, "testCopyGraph2",config,converter);
    LearnerGraphND graphND=FsmParser.buildLearnerGraphND(fsmB, "testCopyGraph4",config,converter);
    LearnerGraph graphDNotIntern=FsmParser.buildLearnerGraph(fsmA, "testCopyGraph2",config,null);
View Full Code Here

        }
      }
    }
   

    ConvertALabel converter = new Transform.InternStringLabel();
    LearnerGraph differentGraphA = new LearnerGraph(graphD,graphD.config);differentGraphA.transitionMatrix.get(differentGraphA.findVertex("A2"))
      .put(AbstractLearnerGraph.generateNewLabel("t",differentGraphA.config,converter),
          differentGraphA.findVertex("A3"));
    differentGraphA.setName("differentA");
    LearnerGraphND differentGraphB = new LearnerGraphND(graphND,graphD.config);differentGraphB.transitionMatrix.get(differentGraphB.findVertex("A2"))
View Full Code Here

 
  public static void main(String []args)
  {
    Configuration config = Configuration.getDefaultConfiguration().copy();config.setAskQuestions(false);config.setDebugMode(false);config.setGdLowToHighRatio(0.7);config.setRandomPathAttemptFudgeThreshold(1000);
    config.setTransitionMatrixImplType(STATETREE.STATETREE_ARRAY);
    ConvertALabel converter = new Transform.InternStringLabel();
    final RBoxPlot<String> gr_ErrorsAndDeadends = null;//new RBoxPlot<String>("Errors and deadends","Red states",new File("errors_deadends.pdf"));
    //gr_NewToOrig.setLimit(7000);
    GlobalConfiguration.getConfiguration().setProperty(G_PROPERTIES.LINEARWARNINGS, "false");
    final int ThreadNumber = ExperimentRunner.getCpuNumber();
   
View Full Code Here

 
  public static int runExperiment(String args[]) throws Exception
  {
    Configuration config = Configuration.getDefaultConfiguration().copy();config.setAskQuestions(false);config.setDebugMode(false);config.setGdLowToHighRatio(0.7);config.setRandomPathAttemptFudgeThreshold(1000);
    config.setTransitionMatrixImplType(STATETREE.STATETREE_ARRAY);config.setLearnerScoreMode(ScoreMode.GENERAL);
    ConvertALabel converter = new Transform.InternStringLabel();
    GlobalConfiguration.getConfiguration().setProperty(G_PROPERTIES.LINEARWARNINGS, "false");
    final int minStateNumber = 10;
    final int samplesPerFSM = 5;
    final int stateNumberIncrement = 5;
    final int rangeOfStateNumbers = stateNumberIncrement;
View Full Code Here

  public static void runExperiment() throws Exception
  {
    DrawGraphs gr = new DrawGraphs();
    Configuration config = Configuration.getDefaultConfiguration().copy();config.setAskQuestions(false);config.setDebugMode(false);config.setGdLowToHighRatio(0.7);config.setRandomPathAttemptFudgeThreshold(1000);
    config.setTransitionMatrixImplType(STATETREE.STATETREE_LINKEDHASH);config.setLearnerScoreMode(ScoreMode.ONLYOVERRIDE);
    ConvertALabel converter = new Transform.InternStringLabel();
    GlobalConfiguration.getConfiguration().setProperty(G_PROPERTIES.LINEARWARNINGS, "false");
    final int ThreadNumber = ExperimentRunner.getCpuNumber()
    ExecutorService executorService = Executors.newFixedThreadPool(ThreadNumber);
    final int minStateNumber = 20;
    final int samplesPerFSM = 10;
View Full Code Here

TOP

Related Classes of statechum.analysis.learning.rpnicore.Transform.ConvertALabel

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.