Package statechum

Examples of statechum.ProgressIndicator


                learnerRunner.setPickUniqueFromInitial(useUnique);learnerRunner.setOnlyUsePositives(onlyPositives);learnerRunner.setIfdepth(ifDepth);learnerRunner.setLengthMultiplier(lengthMultiplier);
                learnerRunner.setSelectionID(selection+"_states"+states+"_sample"+sample);
                runner.submit(learnerRunner);
                ++numberOfTasks;
              }
            ProgressIndicator progress = new ProgressIndicator("running "+numberOfTasks+" tasks for "+selection, numberOfTasks);
            for(int count=0;count < numberOfTasks;++count)
            {
              ThreadResult result = runner.take().get();// this will throw an exception if any of the tasks failed.
              samples.addAll(result.samples);
              progress.next();
            }
          }
          catch(Exception ex)
          {
            IllegalArgumentException e = new IllegalArgumentException("failed to compute, the problem is: "+ex);e.initCause(ex);
            if (executorService != null) { executorService.shutdown();executorService = null; }
            throw e;
          }

          int nonZeroes = 0;
          long numberOfValues = 0;
          System.out.println("number of instances: "+dataCollector.trainingData.numInstances());
          int freqData[] = new int[dataCollector.attributesOfAnInstance.length];
          for(int i=0;i<dataCollector.trainingData.numInstances();++i)
            for(int attrNum=0;attrNum<dataCollector.attributesOfAnInstance.length;++attrNum)
            {
              assert dataCollector.attributesOfAnInstance[attrNum].index() == attrNum;
              if (dataCollector.trainingData.instance(i).stringValue(attrNum) != WekaDataCollector.ZERO)
              {
                ++freqData[attrNum];++numberOfValues;
              }
            }
          for(int attrNum=0;attrNum<dataCollector.attributesOfAnInstance.length;++attrNum)
            if (freqData[attrNum]>0)
              ++nonZeroes;
         
          System.out.println("Total instances: "+dataCollector.trainingData.numInstances()+" with "+dataCollector.attributesOfAnInstance.length+" attributes, non-zeroes are "+nonZeroes+" with average of "+((double)numberOfValues)/nonZeroes);
          Arrays.sort(freqData);
          int numOfcolumns=20;
          int stepWidth = dataCollector.attributesOfAnInstance.length/numOfcolumns;
         
          final RBoxPlot<Long> gr_HistogramOfAttributeValues = new RBoxPlot<Long>("Attributes","Number of values",new File("attributes_use"+selection+".pdf"));
          for(int i=0;i<numOfcolumns;++i)
          {
            int columnData=0;
            for(int j=i*stepWidth;j<(i+1)*stepWidth;++j)
              if (j < dataCollector.attributesOfAnInstance.length)
                columnData+=freqData[j];
           
            gr_HistogramOfAttributeValues.add(new Long(numOfcolumns-i),new Double(columnData>0?Math.log10(columnData):0));
          }
          //gr_HistogramOfAttributeValues.drawInteractive(gr);
          gr_HistogramOfAttributeValues.drawPdf(gr);
          /*
          // write arff
          FileWriter wekaInstances = null;
          String whereToWrite = "qualityLearner_"+selection+".arff";
          try
          {
            wekaInstances = new FileWriter(whereToWrite);
            // This chunk is almost verbatim from Weka's Instances.toString()
            wekaInstances.append(Instances.ARFF_RELATION).append(" ").append(Utils.quote(dataCollector.trainingData.relationName())).append("\n\n");
              for (int i = 0; i < dataCollector.trainingData.numAttributes(); i++) {
                wekaInstances.append(dataCollector.trainingData.attribute(i).toString()).append("\n");
              }
              wekaInstances.append("\n").append(Instances.ARFF_DATA).append("\n");
              for (int i = 0; i < dataCollector.trainingData.numInstances(); i++) {
                wekaInstances.append(dataCollector.trainingData.instance(i).toString());
                  if (i < dataCollector.trainingData.numInstances() - 1) {
                    wekaInstances.append('\n');
                  }
                }
          }
          catch(Exception ex)
          {
            Helper.throwUnchecked("failed to create a file with training data for "+whereToWrite, ex);
          }
          finally
          {
            if (wekaInstances != null)
              try {
                wekaInstances.close();
              } catch (IOException e) {
                // ignore this, we are not proceeding anyway due to an earlier exception so whether the file was actually written does not matter
              }
          }
          */
          // Run the evaluation
          final weka.classifiers.trees.REPTree repTree = new weka.classifiers.trees.REPTree();repTree.setMaxDepth(4);
          //repTree.setNoPruning(true);// since we only use the tree as a classifier (as a conservative extension of what is currently done) and do not actually look at it, elimination of pruning is not a problem.
          // As part of learning, we also prune some of the nodes where the ratio of correctly-classified pairs to those incorrectly classified is comparable.
          // The significant advantage of not pruning is that the result is no longer sensitive to the order of elements in the tree and hence does not depend on the order in which elements have been obtained by concurrent threads.
          //final weka.classifiers.lazy.IB1 ib1 = new weka.classifiers.lazy.IB1();
          //final weka.classifiers.trees.J48 classifier = new weka.classifiers.trees.J48();
          final Classifier classifier = repTree;
          classifier.buildClassifier(dataCollector.trainingData);
          System.out.println("Entries in the classifier: "+dataCollector.trainingData.numInstances());
          System.out.println(classifier);
          dataCollector=null;// throw all the training data away.
         
          {// serialise the classifier, this is the only way to store it.
            OutputStream os = new FileOutputStream(selection+".ser");
            ObjectOutputStream oo = new ObjectOutputStream(os);
                      oo.writeObject(classifier);
                      os.close();
          }
                   
          for(final boolean selectingRed:new boolean[]{false})
          for(final boolean classifierToBlockAllMergers:new boolean[]{true})
          //for(final boolean zeroScoringAsRed:(classifierToBlockAllMergers?new boolean[]{true,false}:new boolean[]{false}))// where we are not using classifier to rule out all mergers proposed by pair selection, it does not make sense to use two values configuring this classifier.
          for(final double threshold:new double[]{1})
          {
            final boolean zeroScoringAsRed = false;
            selection = "TRUNK;EVALUATION;"+"ifDepth="+ifDepth+";threshold="+threshold+// ";useUnique="+useUnique+";onlyPositives="+onlyPositives+
                ";selectingRed="+selectingRed+";classifierToBlockAllMergers="+classifierToBlockAllMergers+";zeroScoringAsRed="+zeroScoringAsRed+";traceQuantity="+traceQuantity+";lengthMultiplier="+lengthMultiplier+";trainingDataMultiplier="+trainingDataMultiplier+";";

            final int totalTaskNumber = traceQuantity;
            final RBoxPlot<Long> gr_PairQuality = new RBoxPlot<Long>("Correct v.s. wrong","%%",new File("percentage_score"+selection+".pdf"));
            final RBoxPlot<String> gr_QualityForNumberOfTraces = new RBoxPlot<String>("traces","%%",new File("quality_traces"+selection+".pdf"));
            SquareBagPlot gr_NewToOrig = new SquareBagPlot("orig score","score with learnt selection",new File("new_to_orig"+selection+".pdf"),0,1,true);
            final Map<Long,TrueFalseCounter> pairQualityCounter = new TreeMap<Long,TrueFalseCounter>();
            try
            {
              int numberOfTasks = 0;
              for(int states=minStateNumber;states < minStateNumber+rangeOfStateNumbers;states+=stateNumberIncrement)
                for(int sample=0;sample<samplesPerFSM;++sample)
                {
                  LearnerRunner learnerRunner = new LearnerRunner(dataCollector,states,sample,totalTaskNumber+numberOfTasks,traceQuantity, config, converter)
                  {
                    @Override
                    public LearnerThatCanClassifyPairs createLearner(LearnerEvaluationConfiguration evalCnf,LearnerGraph argReferenceGraph,@SuppressWarnings("unused") WekaDataCollector argDataCollector,  LearnerGraph argInitialPTA)
                    {
                      LearnerThatUsesWekaResults l = new LearnerThatUsesWekaResults(ifDepth,evalCnf,argReferenceGraph,classifier,argInitialPTA);
                      if (gr_PairQuality != null)
                        l.setPairQualityCounter(pairQualityCounter);
                     
                      l.setUseClassifierForRed(selectingRed);l.setUseClassifierToChooseNextRed(classifierToBlockAllMergers);
                      l.setBlacklistZeroScoringPairs(zeroScoringAsRed);
                      l.setThreshold(threshold);
                      return l;
                    }
                   
                  };
                  learnerRunner.setPickUniqueFromInitial(useUnique);learnerRunner.setEvaluateAlsoUsingReferenceLearner(true);
                  learnerRunner.setOnlyUsePositives(onlyPositives);learnerRunner.setIfdepth(ifDepth);learnerRunner.setLengthMultiplier(lengthMultiplier);
                  learnerRunner.setSelectionID(selection+"_states"+states+"_sample"+sample);
                  runner.submit(learnerRunner);
                  ++numberOfTasks;
                }
              ProgressIndicator progress = new ProgressIndicator(new Date()+" evaluating "+numberOfTasks+" tasks for "+selection, numberOfTasks);
              for(int count=0;count < numberOfTasks;++count)
              {
                ThreadResult result = runner.take().get();// this will throw an exception if any of the tasks failed.
                if (gr_NewToOrig != null)
                {
                  for(SampleData sample:result.samples)
                    gr_NewToOrig.add(sample.differenceForReferenceLearner.getValue(),sample.difference.getValue());
                }
               
                for(SampleData sample:result.samples)
                  if (sample.differenceForReferenceLearner.getValue() > 0)
                    gr_QualityForNumberOfTraces.add(traceQuantity+"",sample.difference.getValue()/sample.differenceForReferenceLearner.getValue());
                progress.next();
              }
              if (gr_PairQuality != null)
              {
                synchronized(pairQualityCounter)
                {
View Full Code Here


 
  private ErlangModule(Configuration config) throws IOException {
    final File f = config.getErlangSourceFile();
    name = ErlangRunner.getName(f, ERL.MOD,config.getErlangCompileIntoBeamDirectory());
    sourceFolder = f.getParentFile();
    ProgressIndicator progress = new ProgressIndicator(name, 7);
    // launch Erlang by calling a test method.
    ErlangRunner.getRunner().call(
        new OtpErlangObject[] { new OtpErlangAtom("echo2Tuple"),
            new OtpErlangAtom("aaa") }, "echo2Tuple");
    progress.next();// 1

    // Compile and typecheck the module...
    ErlangRunner.compileErl(f, ErlangRunner.getRunner(),config.getErlangCompileIntoBeamDirectory());
    progress.next();// 2
    sigs = new TreeMap<String, FuncSignature>();ignoredFunctions = new TreeSet<String>();ignoredBehaviours = new TreeSet<String>();

    File pltFile = new File(ErlangRunner.getName(f, ERL.PLT,config.getErlangCompileIntoBeamDirectory()));

    // Almost the same arguments for dialyzer and typer, the first argument
    // determines which of the two to run.
    OtpErlangObject otpArgs[] = new OtpErlangObject[] {
        null, // either Dialyzer or typer

        new OtpErlangList(new OtpErlangObject[] { new OtpErlangString(
            ErlangRunner.getName(f, ERL.BEAM,config.getErlangCompileIntoBeamDirectory())) }),
        new OtpErlangString(ErlangRunner.getName(f, ERL.PLT,config.getErlangCompileIntoBeamDirectory())),
        new OtpErlangList(new OtpErlangObject[] { new OtpErlangString(
            ErlangRunner.getName(f, ERL.ERL,false))}),
        new OtpErlangAtom("types") };

    if (!pltFile.canRead() || f.lastModified() > pltFile.lastModified()) {// rebuild the PLT file since the source was modified or the plt file does not exist
      pltFile.delete();
      otpArgs[0] = new OtpErlangAtom("dialyzer");
      ErlangRunner.getRunner().call(otpArgs, "Could not run dialyzer");
    }
    progress.next();// 3

    // Typer always has to be run
    otpArgs[0] = new OtpErlangAtom("typer");
    OtpErlangTuple response = null;
    try
    {
      response = ErlangRunner.getRunner().call(otpArgs,"Could not run typer");
     
      progress.next();// 4
      progress.next();// 5
    }
    catch(ErlangThrownException ex)
    {
      pltFile.delete();
      otpArgs[0] = new OtpErlangAtom("dialyzer");
      progress.next();// 4
      ErlangRunner.getRunner().call(otpArgs, "Could not run dialyzer");
      otpArgs[0] = new OtpErlangAtom("typer");
      progress.next();// 5
      response = ErlangRunner.getRunner().call(otpArgs,"Could not run typer for the second time");     
    }
    progress.next();// 6

    OtpErlangList analysisResults = (OtpErlangList) response.elementAt(1);
    Assert.assertEquals(1, analysisResults.arity());
    OtpErlangTuple fileDetails = (OtpErlangTuple) analysisResults.elementAt(0);
    OtpErlangList typeInformation = (OtpErlangList) fileDetails.elementAt(3);
    for (int i = 0; i < typeInformation.arity(); ++i) {
      //System.out.print("\n" + typeInformation.elementAt(i).toString());
      OtpErlangTuple functionDescr = (OtpErlangTuple) typeInformation.elementAt(i);
      if (functionDescr.arity() > 3)
      {
        FuncSignature s = new FuncSignature(config,typeInformation.elementAt(i), null);
        sigs.put(s.getQualifiedName(), s);
      }
      else
      {// if not a function signature, it is an error message. The first two elements are function name and arity, we add this module name.
        String fullName = FuncSignature.qualifiedNameFromFunction(getName(),
            ((OtpErlangAtom)functionDescr.elementAt(0)).atomValue(),
            ((OtpErlangLong)functionDescr.elementAt(1)).longValue());
        ignoredFunctions.add( fullName );
        System.out.println("Ignoring: "+fullName+", "+functionDescr.elementAt(2));
      }
    }
   
    behaviour = OTPBehaviour.obtainDeclaredBehaviour(f, config, this,ignoredBehaviours);
    progress.next();// 7
  }
View Full Code Here

      {
        return name.startsWith("N_");
    }});
    Arrays.sort(files);
    int threads[]=new int[]{8};
    ProgressIndicator progress = new ProgressIndicator("eNDT:", (files.length+1)*threads.length);

    // N_1320.xml+N_502.xml v.s. N_2070.xml+N_2232.xml takes a long while.
    addFilesToCollection(new File(testFilePath+"N_1320.xml"),new File(testFilePath+"N_502.xml"),
        new File(testFilePath+"N_2070.xml"),new File(testFilePath+"N_2232.xml"),result,threads,progress);
    for(int fileNum = 0;fileNum < files.length;++fileNum)
View Full Code Here

          int states=initStates+graphComplexity*50;
          int alphabet = states/2;
         
          MachineGenerator mg = new MachineGenerator(states, 40, states/10);
          int mutationsPerStage = (states/2) / 2;
          ProgressIndicator progress = new ProgressIndicator(""+states, mutationStages*experimentsPerMutationCategory);
          for(int mutationStage = 0;mutationStage<mutationStages;mutationStage++)
          {
            for(int experiment=0;experiment<experimentsPerMutationCategory;experiment++)
            {
              ExperimentResult outcome = new ExperimentResult();
              final double perfectLowToHigh=0.7,perfectThreshold=0.5;
   
              config.setAttenuationK(0.5);
              config.setGdKeyPairThreshold(perfectThreshold);
              config.setGdLowToHighRatio(perfectLowToHigh);
              config.setGdPropagateDet(false);// this is to ensure that if we removed a transition 0 from to a state and then added one from that state to a different one, det-propagation will not force the two very different states into a key-pair relation.
   
              int mutations = mutationsPerStage * (mutationStage+1);
              LearnerGraphND origGraph = mg.nextMachine(alphabet, experiment,config);
              GraphMutator<List<CmpVertex>,LearnerGraphNDCachedData> mutator = new GraphMutator<List<CmpVertex>,LearnerGraphNDCachedData>(origGraph,new Random(mutationStage*experimentsPerMutationCategory+experiment));
              mutator.mutate(mutations);
              LearnerGraphND origAfterRenaming = new LearnerGraphND(origGraph.config);
              Map<CmpVertex,CmpVertex> origToNew = copyStatesAndTransitions(origGraph,origAfterRenaming);
              LearnerGraphND mutated = (LearnerGraphND)mutator.getMutated();
              mutated.setName(origAfterRenaming.getName()+"_mutated");origAfterRenaming.setName(origAfterRenaming.getName()+"_orig");
              Set<Transition> appliedMutations = new HashSet<Transition>();
              for(Transition tr:mutator.getDiff())
              {
                CmpVertex renamedFrom = origToNew.get(tr.getFrom());if (renamedFrom == null) renamedFrom = tr.getFrom();
                CmpVertex renamedTo = origToNew.get(tr.getTo());if (renamedTo == null) renamedTo = tr.getTo();
                appliedMutations.add(new Transition(renamedFrom,renamedTo,tr.getLabel()));
              }
             
              linearDiff(origAfterRenaming,mutated, appliedMutations,outcome);
             
              LearnerGraph fromDet = null, toDet = null;
              try {
                fromDet = mergeAndDeterminize(origAfterRenaming);
                toDet = mergeAndDeterminize(mutated);
              } catch (IncompatibleStatesException e) {
                Helper.throwUnchecked("failed to build a deterministic graph from a nondet one", e);
              }
              languageDiff(fromDet,toDet,states, graphComplexity,outcome);
             
              // zero the times.
              outcome.setValue(LONG_V.DURATION_GD, 0);
              outcome.setValue(LONG_V.DURATION_RAND, 0);
              outcome.setValue(LONG_V.DURATION_W, 0);
             
              outcome.experimentValid = true;
              processor.process(outcome);
             
              progress.next();
            }
          }
        }
      }
      finally
View Full Code Here

        return name.startsWith("N_");
      }
    });
    Arrays.sort(files);
    int threads[]=new int[]{1,8};
    ProgressIndicator progress = new ProgressIndicator("e:", files.length*threads.length);
   
    for(int fileNum = 0;fileNum < files.length;++fileNum)
    {
      File
      fileA=files[fileNum],
      fileB=files[(fileNum+1)%files.length];
      boolean fallback = detectFallbackToInitialPair(fileA, null, fileB, null);
      Assert.assertFalse(fallback);// our test files are very small hence must fit in memory

      for(int threadNo:threads)
      {
        for(double ratio:new double[]{0.6,0.9})
          for(int pairs:new int[]{0,40})
            result.add(new Object[]{new Integer(threadNo), new Integer(pairs),ratio,fileA,fileB});

        // -1. should be floating-point number otherwise it is turned into Integer and our parametersToString fails to match the resulting list of values.
        result.add(new Object[]{new Integer(threadNo), new Integer(0),-1.,fileA,fileB});
       
        progress.next();
      }
    }
    return result;
  }
View Full Code Here

        return name.startsWith("N_");
      }
    });
    Arrays.sort(files);
    int threads[] = new int[]{1,8};
    ProgressIndicator progress = new ProgressIndicator("eT:", files.length*threads.length);

    for(int fileNum = 0;fileNum < files.length;++fileNum)
    {
      File
      fileA=files[fileNum],
      fileB=files[(fileNum+1)%files.length];
      boolean fallback = TestGD_ExistingGraphs.detectFallbackToInitialPair(fileA, null, fileB, null);
      Assert.assertFalse(fallback);// our test files are very small hence must fit in memory

      for(int threadNo:threads)
      {
        for(double ratio:new double[]{0.3,0.9})
          for(int pairs:new int[]{0})
            result.add(new Object[]{new Integer(threadNo), new Integer(pairs),ratio,fileA,fileB});

        // -1. should be floating-point number otherwise it is turned into Integer and our parametersToString fails to match the resulting list of values.
        result.add(new Object[]{new Integer(threadNo), new Integer(0),-1.,fileA,fileB});
        progress.next();
      }
    }
    return result;
  }
View Full Code Here

      {
        return name.startsWith("N_");
    }});
    Arrays.sort(files);
    int threads[]=new int[]{1,8};
    ProgressIndicator progress = new ProgressIndicator("eND:", (files.length+1)*threads.length);

    // N_1320.xml+N_502.xml v.s. N_2070.xml+N_2232.xml takes a long while.
    addFilesToCollection(new File(testFilePath+"N_1320.xml"),new File(testFilePath+"N_502.xml"),
        new File(testFilePath+"N_2070.xml"),new File(testFilePath+"N_2232.xml"),result,threads,progress);
    for(int fileNum = 0;fileNum < files.length;++fileNum)
View Full Code Here

                  learnerRunner.setOnlyUsePositives(onlyPositives);learnerRunner.setLengthMultiplier(lengthMultiplier);
                  learnerRunner.setSelectionID(selection+"_states"+states+"_sample"+sample);
                  runner.submit(learnerRunner);
                  ++numberOfTasks;
                }
              ProgressIndicator progress = new ProgressIndicator(new Date()+" evaluating "+numberOfTasks+" tasks for "+selection, numberOfTasks);
              for(int count=0;count < numberOfTasks;++count)
              {
                ThreadResult result = runner.take().get();// this will throw an exception if any of the tasks failed.
                if (gr_NewToOrig != null)
                {
                  for(SampleData sample:result.samples)
                    gr_NewToOrig.add(sample.referenceLearner.getValue(),sample.actualLearner.getValue());
                }
               
                for(SampleData sample:result.samples)
                  if (sample.referenceLearner.getValue() > 0)
                    gr_QualityForNumberOfTraces.add(traceQuantity+"",sample.actualLearner.getValue()/sample.referenceLearner.getValue());
                progress.next();
              }
              if (gr_PairQuality != null)
              {
                synchronized(pairQualityCounter)
                {
View Full Code Here

                  learnerRunner.setOnlyUsePositives(onlyPositives);learnerRunner.setLengthMultiplier(lengthMultiplier);
                  learnerRunner.setSelectionID(selection+"_states"+states+"_sample"+sample);
                  runner.submit(learnerRunner);
                  ++numberOfTasks;
                }
              ProgressIndicator progress = new ProgressIndicator(new Date()+" evaluating "+numberOfTasks+" tasks for "+selection, numberOfTasks);
              for(int count=0;count < numberOfTasks;++count)
              {
                ThreadResult result = runner.take().get();// this will throw an exception if any of the tasks failed.
                if (gr_NewToOrig != null)
                {
                  for(SampleData sample:result.samples)
                    gr_NewToOrig.add(sample.referenceLearner.getValue(),sample.actualLearner.getValue());
                }
               
                for(SampleData sample:result.samples)
                  if (sample.referenceLearner.getValue() > 0)
                    gr_QualityForNumberOfTraces.add(traceQuantity+"",sample.actualLearner.getValue()/sample.referenceLearner.getValue());
                progress.next();
              }
              if (gr_PairQuality != null)
              {
                synchronized(pairQualityCounter)
                {
View Full Code Here

          int states=initStates+graphComplexity*50;
          int alphabet = states/2;
         
          MachineGenerator mg = new MachineGenerator(states, 40, states/10);
          int mutationsPerStage = (states/2) / 2;
          ProgressIndicator progress = new ProgressIndicator(""+states, mutationStages*experimentsPerMutationCategory);
          for(int mutationStage = 0;mutationStage<mutationStages;mutationStage++)
          {
            for(int experiment=0;experiment<experimentsPerMutationCategory;experiment++)
            {
              ExperimentResult outcome = new ExperimentResult();
              final double perfectLowToHigh=0.7,perfectThreshold=0.5;
   
              config.setAttenuationK(0.5);
              config.setGdKeyPairThreshold(perfectThreshold);
              config.setGdLowToHighRatio(perfectLowToHigh);
              config.setGdPropagateDet(false);// this is to ensure that if we removed a transition 0 from to a state and then added one from that state to a different one, det-propagation will not force the two very different states into a key-pair relation.
   
              int mutations = mutationsPerStage * (mutationStage+1);
              LearnerGraphND origGraph = mg.nextMachine(alphabet, experiment,config);
              GraphMutator<List<CmpVertex>,LearnerGraphNDCachedData> mutator = new GraphMutator<List<CmpVertex>,LearnerGraphNDCachedData>(origGraph,new Random(mutationStage*experimentsPerMutationCategory+experiment));
              mutator.mutate(mutations);
              LearnerGraphND origAfterRenaming = new LearnerGraphND(origGraph.config);
              Map<CmpVertex,CmpVertex> origToNew = copyStatesAndTransitions(origGraph,origAfterRenaming);
              LearnerGraphND mutated = (LearnerGraphND)mutator.getMutated();
              mutated.setName(origAfterRenaming.getName()+"_mutated");origAfterRenaming.setName(origAfterRenaming.getName()+"_orig");
              Set<Transition> appliedMutations = new HashSet<Transition>();
              for(Transition tr:mutator.getDiff())
              {
                CmpVertex renamedFrom = origToNew.get(tr.getFrom());if (renamedFrom == null) renamedFrom = tr.getFrom();
                CmpVertex renamedTo = origToNew.get(tr.getTo());if (renamedTo == null) renamedTo = tr.getTo();
                appliedMutations.add(new Transition(renamedFrom,renamedTo,tr.getLabel()));
              }
             
              linearDiff(origAfterRenaming,mutated, appliedMutations,outcome);
             
              LearnerGraph fromDet = null, toDet = null;
              try {
                fromDet = mergeAndDeterminize(origAfterRenaming);
                toDet = mergeAndDeterminize(mutated);
              } catch (IncompatibleStatesException e) {
                Helper.throwUnchecked("failed to build a deterministic graph from a nondet one", e);
              }
              languageDiff(fromDet,toDet,states, graphComplexity,outcome);
             
              // zero the times.
              outcome.setValue(LONG_V.DURATION_GD, 0);
              outcome.setValue(LONG_V.DURATION_RAND, 0);
              outcome.setValue(LONG_V.DURATION_W, 0);
             
              outcome.experimentValid = true;
              processor.process(outcome);
             
              progress.next();
            }
          }
        }
      }
      finally
View Full Code Here

TOP

Related Classes of statechum.ProgressIndicator

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.