public Measurement.MeasurementResultSet RunBenchmark(Testcase testcase, VariableCache.ConstraintMode constraintMode, PdlFilter.Filtermode filtermode, IDictionary <PDLPred, Measurement.SingleMeasurementResult> cache, IDictionary <Automaton <BDD>, Measurement.SingleMeasurementResult> automatonCache)
        {
            ICollection <PDLPred> bareResults = new LinkedList <PDLPred>();

            System.Diagnostics.Stopwatch stopwatch = new System.Diagnostics.Stopwatch();
            stopwatch.Start();
            foreach (PDLPred result in AutomataPDL.ProblemGeneration.GeneratePDLWithEDn(testcase.language, testcase.alphabet, constraintMode, filtermode))
            {
                bareResults.Add(result);
            }
            stopwatch.Stop();

            return(new Measurement.MeasurementResultSet(testcase.language, bareResults, stopwatch.ElapsedMilliseconds, constraintMode, filtermode, new HashSet <char>(testcase.alphabet), cache, automatonCache));
        }
        public void RunAndOutputBenchmarkSet(Testcase testcase)
        {
            IDictionary <PDLPred, Measurement.SingleMeasurementResult>         cache          = new Dictionary <PDLPred, Measurement.SingleMeasurementResult>();
            IDictionary <Automaton <BDD>, Measurement.SingleMeasurementResult> automatonCache = new Dictionary <Automaton <BDD>, Measurement.SingleMeasurementResult>();

            foreach (VariableCache.ConstraintMode constraintMode in System.Enum.GetValues(typeof(VariableCache.ConstraintMode)))
            {
                foreach (PdlFilter.Filtermode filtermode in System.Enum.GetValues(typeof(PdlFilter.Filtermode)))
                {
                    Measurement.MeasurementResultSet resultSet = this.RunBenchmark(testcase, constraintMode, filtermode, cache, automatonCache);
                    using (System.IO.StreamWriter writer = new System.IO.StreamWriter(this.GetFilenameTest(testcase, constraintMode, filtermode)))
                    {
                        resultSet.Output(writer);
                    }
                }
            }
        }
 private string GetFilenameTest(Testcase testcase, VariableCache.ConstraintMode constraintMode, PdlFilter.Filtermode filtermode)
 {
     return String.Format("C:/Users/alexander/Desktop/results/{0}.{1}.{2}.csv", testcase.id, constraintMode, filtermode);
 }
        public Measurement.MeasurementResultSet RunBenchmark(Testcase testcase, VariableCache.ConstraintMode constraintMode, PdlFilter.Filtermode filtermode, IDictionary<PDLPred, Measurement.SingleMeasurementResult> cache, IDictionary<Automaton<BDD>, Measurement.SingleMeasurementResult> automatonCache)
        {
            ICollection<PDLPred> bareResults = new LinkedList<PDLPred>();

            System.Diagnostics.Stopwatch stopwatch = new System.Diagnostics.Stopwatch();
            stopwatch.Start();
            foreach(PDLPred result in ProblemGeneration.GeneratePDLWithEDn(testcase.language, testcase.alphabet, constraintMode, filtermode)) {
                bareResults.Add(result);
            }
            stopwatch.Stop();

            return new Measurement.MeasurementResultSet(testcase.language, bareResults, stopwatch.ElapsedMilliseconds, constraintMode, filtermode, new HashSet<char>(testcase.alphabet), cache, automatonCache);
        }
 public void RunAndOutputBenchmarkSet(Testcase testcase)
 {
     IDictionary<PDLPred, Measurement.SingleMeasurementResult> cache = new Dictionary<PDLPred, Measurement.SingleMeasurementResult>();
     IDictionary<Automaton<BDD>, Measurement.SingleMeasurementResult> automatonCache = new Dictionary<Automaton<BDD>, Measurement.SingleMeasurementResult>();
     foreach (VariableCache.ConstraintMode constraintMode in System.Enum.GetValues(typeof(VariableCache.ConstraintMode)))
     {
         foreach (PdlFilter.Filtermode filtermode in System.Enum.GetValues(typeof(PdlFilter.Filtermode)))
         {
             Measurement.MeasurementResultSet resultSet = this.RunBenchmark(testcase, constraintMode, filtermode, cache, automatonCache);
             using (System.IO.StreamWriter writer = new System.IO.StreamWriter(this.GetFilenameTest(testcase, constraintMode, filtermode)))
             {
                 resultSet.Output(writer);
             }
         }
     }
 }
        public void Measure_2()
        {
            Testcase testcase = TestPredicateFactory.createTestFormula2();

            RunAndOutputBenchmarkSet(testcase);
        }
 private string GetFilenameTest(Testcase testcase, VariableCache.ConstraintMode constraintMode, PdlFilter.Filtermode filtermode)
 {
     return(String.Format("C:/Users/alexander/Desktop/results/{0}.{1}.{2}.csv", testcase.id, constraintMode, filtermode));
 }