public override void Run() { if (!this.problemIsOn) { return; } // Map the set of clauses from parser to one set of intrinsic clauses. ConstructIntrinsicSet(); // Create the analyzer HardCodedShadedAreaMain analyzer = new HardCodedShadedAreaMain(intrinsic, given, known, goalRegions, this.parser.implied, GetSolutionArea()); // Perform and time the analysis figureStats = analyzer.AnalyzeFigure(); // // If we know it's complete, keep that overridden completeness. // Otherwise, determine completeness through analysis of the nodes in the hypergraph. // if (!this.isComplete) { this.isComplete = figureStats.isComplete; } //System.Diagnostics.Debug.WriteLine("Resultant Complete: " + this.isComplete +"\n"); if (this.isComplete) { } else { } // Add to the cumulative statistics ActualShadedAreaProblem.TotalTime = ActualShadedAreaProblem.TotalTime.Add(figureStats.stopwatch.Elapsed); ActualShadedAreaProblem.TotalPoints += figureStats.numPoints; ActualShadedAreaProblem.TotalSegments += figureStats.numPoints; ActualShadedAreaProblem.TotalInMiddle += figureStats.numInMiddle; ActualShadedAreaProblem.TotalAngles += figureStats.numAngles; ActualShadedAreaProblem.TotalTriangles += figureStats.numTriangles; ActualShadedAreaProblem.TotalIntersections += figureStats.numIntersections; ActualShadedAreaProblem.TotalTotalProperties += figureStats.totalProperties; ActualShadedAreaProblem.TotalExplicitFacts += figureStats.totalExplicitFacts; }
public override void Run() { if (!this.problemIsOn) return; // Map the set of clauses from parser to one set of intrinsic clauses. ConstructIntrinsicSet(); // Create the analyzer HardCodedShadedAreaMain analyzer = new HardCodedShadedAreaMain(intrinsic, given, known, goalRegions, this.parser.implied, GetSolutionArea()); // Perform and time the analysis figureStats = analyzer.AnalyzeFigure(); // // If we know it's complete, keep that overridden completeness. // Otherwise, determine completeness through analysis of the nodes in the hypergraph. // if (!this.isComplete) this.isComplete = figureStats.isComplete; //System.Diagnostics.Debug.WriteLine("Resultant Complete: " + this.isComplete +"\n"); if (this.isComplete) { } else { } // Add to the cumulative statistics ActualShadedAreaProblem.TotalTime = ActualShadedAreaProblem.TotalTime.Add(figureStats.stopwatch.Elapsed); ActualShadedAreaProblem.TotalPoints += figureStats.numPoints; ActualShadedAreaProblem.TotalSegments += figureStats.numPoints; ActualShadedAreaProblem.TotalInMiddle += figureStats.numInMiddle; ActualShadedAreaProblem.TotalAngles += figureStats.numAngles; ActualShadedAreaProblem.TotalTriangles += figureStats.numTriangles; ActualShadedAreaProblem.TotalIntersections += figureStats.numIntersections; ActualShadedAreaProblem.TotalTotalProperties += figureStats.totalProperties; ActualShadedAreaProblem.TotalExplicitFacts += figureStats.totalExplicitFacts; }
public override void Run() { if (!this.problemIsOn) { return; } // We have already parsed the figure; acquire the timing. ImplicitTiming = this.parser.implied.GetTiming(); // Map the set of clauses from parser to one set of intrinsic clauses. ConstructIntrinsicSet(); // Create the analyzer HardCodedShadedAreaMain analyzer = new HardCodedShadedAreaMain(intrinsic, given, known, goalRegions, this.parser.implied, GetSolutionArea()); // Perform and time the analysis figureStats = analyzer.AnalyzeFigure(); // Get the deduction and solving times. DeductionTiming = analyzer.GetDeductionTiming(); SolverTiming = analyzer.GetSolverTiming(); // Determine completeness this.isComplete = analyzer.IsComplete(); // // Determine the number of interesting problems from this figure. // int interestingComputable = 0; int uninterestingComputable = 0; int interestingIncomputable = 0; int uninterestingIncomputable = 0; analyzer.GetComputableInterestingCount(out interestingComputable, out uninterestingComputable, out interestingIncomputable, out uninterestingIncomputable); if (Utilities.SHADED_AREA_SOLVER_DEBUG) { System.Diagnostics.Debug.WriteLine("Interesting Computable: " + interestingComputable); System.Diagnostics.Debug.WriteLine("UNinteresting Computable: " + uninterestingComputable); System.Diagnostics.Debug.WriteLine("Interesting INcomputable: " + interestingIncomputable); } numInteresting = interestingComputable; // // Add to the cumulative statistics // ActualShadedAreaProblem.TotalTime = ActualShadedAreaProblem.TotalTime.Add(figureStats.stopwatch.Elapsed); ActualShadedAreaProblem.TotalImplicitTime = ActualShadedAreaProblem.TotalImplicitTime.Add(ImplicitTiming); ActualShadedAreaProblem.TotalDeductionTime = ActualShadedAreaProblem.TotalDeductionTime.Add(DeductionTiming); ActualShadedAreaProblem.TotalSolverTime = ActualShadedAreaProblem.TotalSolverTime.Add(SolverTiming); ActualShadedAreaProblem.TotalPoints += figureStats.numPoints; ActualShadedAreaProblem.TotalSegments += figureStats.numPoints; ActualShadedAreaProblem.TotalInMiddle += figureStats.numInMiddle; ActualShadedAreaProblem.TotalAngles += figureStats.numAngles; ActualShadedAreaProblem.TotalTriangles += figureStats.numTriangles; ActualShadedAreaProblem.TotalIntersections += figureStats.numIntersections; ActualShadedAreaProblem.TotalImplicitFacts += figureStats.totalImplicitFacts; ActualShadedAreaProblem.TotalExplicitFacts += figureStats.totalExplicitFacts; ActualShadedAreaProblem.TotalShapes += figureStats.numShapes; ActualShadedAreaProblem.TotalRootShapes += figureStats.numRootShapes; ActualShadedAreaProblem.TotalAtomicRegions += figureStats.numAtomicRegions; ActualShadedAreaProblem.TotalInteresting += numInteresting; if (isComplete) { ActualShadedAreaProblem.TotalComplete++; } if (figureStats.originalProblemInteresting) { ActualShadedAreaProblem.TotalOriginalInteresting++; } #if !HARD_CODED_UI AppendToFiles(figureStats); #endif }
private void AppendToFiles(StatisticsGenerator.ShadedAreaFigureStatisticsAggregator figureStats) { using (System.IO.StreamWriter file = new System.IO.StreamWriter(@"C:\Users\ctalvin\Desktop\output\impFacts.txt", true)) { file.WriteLine(figureStats.totalImplicitFacts); } using (System.IO.StreamWriter file = new System.IO.StreamWriter(@"C:\Users\ctalvin\Desktop\output\expFacts.txt", true)) { file.WriteLine(figureStats.totalExplicitFacts); } using (System.IO.StreamWriter file = new System.IO.StreamWriter(@"C:\Users\ctalvin\Desktop\output\atomData.txt", true)) { file.WriteLine(figureStats.numAtomicRegions); } using (System.IO.StreamWriter file = new System.IO.StreamWriter(@"C:\Users\ctalvin\Desktop\output\numInteresting.txt", true)) { file.WriteLine(numInteresting); } using (System.IO.StreamWriter file = new System.IO.StreamWriter(@"C:\Users\ctalvin\Desktop\output\numShapes.txt", true)) { file.WriteLine(figureStats.numShapes); } using (System.IO.StreamWriter file = new System.IO.StreamWriter(@"C:\Users\ctalvin\Desktop\output\numRootShapes.txt", true)) { file.WriteLine(figureStats.numRootShapes); } using (System.IO.StreamWriter file = new System.IO.StreamWriter(@"C:\Users\ctalvin\Desktop\output\implicitTiming.txt", true)) { file.WriteLine(ImplicitTiming); } using (System.IO.StreamWriter file = new System.IO.StreamWriter(@"C:\Users\ctalvin\Desktop\output\geoTutorTiming.txt", true)) { file.WriteLine(DeductionTiming); } using (System.IO.StreamWriter file = new System.IO.StreamWriter(@"C:\Users\ctalvin\Desktop\output\solverTiming.txt", true)) { file.WriteLine(SolverTiming); } using (System.IO.StreamWriter file = new System.IO.StreamWriter(@"C:\Users\ctalvin\Desktop\output\length.txt", true)) { file.WriteLine(figureStats.length); } using (System.IO.StreamWriter file = new System.IO.StreamWriter(@"C:\Users\ctalvin\Desktop\output\width.txt", true)) { file.WriteLine(figureStats.width); } using (System.IO.StreamWriter file = new System.IO.StreamWriter(@"C:\Users\ctalvin\Desktop\output\areaFacts.txt", true)) { file.WriteLine(figureStats.numAreaFacts); } using (System.IO.StreamWriter file = new System.IO.StreamWriter(@"C:\Users\ctalvin\Desktop\output\geometricFacts.txt", true)) { file.WriteLine(figureStats.numGeometricFacts); } using (System.IO.StreamWriter file = new System.IO.StreamWriter(@"C:\Users\ctalvin\Desktop\output\numDeductions.txt", true)) { file.WriteLine(figureStats.numDeductions); } }
public override void Run() { if (!this.problemIsOn) return; // We have already parsed the figure; acquire the timing. ImplicitTiming = this.parser.implied.GetTiming(); // Map the set of clauses from parser to one set of intrinsic clauses. ConstructIntrinsicSet(); // Create the analyzer HardCodedShadedAreaMain analyzer = new HardCodedShadedAreaMain(intrinsic, given, known, goalRegions, this.parser.implied, GetSolutionArea()); // Perform and time the analysis figureStats = analyzer.AnalyzeFigure(); // Get the deduction and solving times. DeductionTiming = analyzer.GetDeductionTiming(); SolverTiming = analyzer.GetSolverTiming(); // Determine completeness this.isComplete = analyzer.IsComplete(); // // Determine the number of interesting problems from this figure. // int interestingComputable = 0; int uninterestingComputable = 0; int interestingIncomputable = 0; int uninterestingIncomputable = 0; analyzer.GetComputableInterestingCount(out interestingComputable, out uninterestingComputable, out interestingIncomputable, out uninterestingIncomputable); if (Utilities.SHADED_AREA_SOLVER_DEBUG) { System.Diagnostics.Debug.WriteLine("Interesting Computable: " + interestingComputable); System.Diagnostics.Debug.WriteLine("UNinteresting Computable: " + uninterestingComputable); System.Diagnostics.Debug.WriteLine("Interesting INcomputable: " + interestingIncomputable); } numInteresting = interestingComputable; // // Add to the cumulative statistics // ActualShadedAreaProblem.TotalTime = ActualShadedAreaProblem.TotalTime.Add(figureStats.stopwatch.Elapsed); ActualShadedAreaProblem.TotalImplicitTime = ActualShadedAreaProblem.TotalImplicitTime.Add(ImplicitTiming); ActualShadedAreaProblem.TotalDeductionTime = ActualShadedAreaProblem.TotalDeductionTime.Add(DeductionTiming); ActualShadedAreaProblem.TotalSolverTime = ActualShadedAreaProblem.TotalSolverTime.Add(SolverTiming); ActualShadedAreaProblem.TotalPoints += figureStats.numPoints; ActualShadedAreaProblem.TotalSegments += figureStats.numPoints; ActualShadedAreaProblem.TotalInMiddle += figureStats.numInMiddle; ActualShadedAreaProblem.TotalAngles += figureStats.numAngles; ActualShadedAreaProblem.TotalTriangles += figureStats.numTriangles; ActualShadedAreaProblem.TotalIntersections += figureStats.numIntersections; ActualShadedAreaProblem.TotalImplicitFacts += figureStats.totalImplicitFacts; ActualShadedAreaProblem.TotalExplicitFacts += figureStats.totalExplicitFacts; ActualShadedAreaProblem.TotalShapes += figureStats.numShapes; ActualShadedAreaProblem.TotalRootShapes += figureStats.numRootShapes; ActualShadedAreaProblem.TotalAtomicRegions += figureStats.numAtomicRegions; ActualShadedAreaProblem.TotalInteresting += numInteresting; if (isComplete) ActualShadedAreaProblem.TotalComplete++; if (figureStats.originalProblemInteresting) ActualShadedAreaProblem.TotalOriginalInteresting++; #if !HARD_CODED_UI AppendToFiles(figureStats); #endif }