00001
00002
00003
00004
00005
00006
00007 #ifndef __Statistics__
00008 #define __Statistics__
00009
00010
00011
00012
00013 #include "VampireKernel.hpp"
00014
00015
00016 using namespace std;
00017
00018
00019
00020
00021
00025 class Statistics {
00026 public:
00027
00028 Statistics (const VampireKernel &);
00029 void output (ostream&) const;
00030 void toXML (ostream&) const;
00031 void tabulate (ostream&) const;
00032
00033 private:
00034
00035 const float _versionNumber;
00036 const char* _versionDescription;
00037 const VampireKernel::TerminationReason _terminationReason;
00038 const float _time;
00039 const long _memory;
00040
00041 const long _generated;
00042 const long _retained;
00043 const long _used;
00044 const long _currentlyActive;
00045 const long _currentlyPassive;
00046
00047 const long _resolutions;
00048 const long _forwardSuperpositions;
00049 const long _backwardSuperpositions;
00050 const long _equalityResolutions;
00051 const long _equalityFactorings;
00052 const long _preprocessed;
00053 const long _reanimated;
00054 bool anyGeneratingInference () const;
00055
00056 const long _forwardSubsumptionResolutions;
00057 const long _forwardDemodulated;
00058 const long _backwardDemodulated;
00059 const long _theoryInferences;
00060 bool anySimplifyingInference () const;
00061
00062 const long _forwardSubsumed;
00063 const long _backwardSubsumed;
00064 const long _discardedPropositionalTautologies;
00065 const long _discardedEquationalTautologies;
00066 const long _murderedPassiveOrphans;
00067 const long _murderedActiveOrphans;
00068 bool anyRedundantClause () const;
00069
00070 const long _splittingInferences;
00071 const long _differentSplitComponents;
00072 const float _averageLiteralsPerComponent;
00073 const long _forwardDemodulatedOnBranches;
00074 const long _backwardDemodulatedOnBranches;
00075 bool anySplitting () const;
00076
00077 const long _discardedWithTooHeavyLiterals;
00078 const long _discardedTooDeep;
00079 const long _discardedTooHeavy;
00080 const long _discardedWithTooManyVariables;
00081 const long _newClausesDiscardedDueToLackOfMemory;
00082 const long _recycledDueToLackOfResources;
00083 bool anyDiscarded () const;
00084
00085
00086 static void tabulate (ostream&, const char* field, const char* value);
00087 static void tabulate (ostream&, const char* field, int value);
00088 static void tabulate (ostream&, const char* field, long value);
00089 static void tabulate (ostream&, const char* field, float value);
00090 static void startTab (ostream&, const char* field);
00091 static void endTab (ostream&);
00092
00093 static void toXML (ostream&, const char* field, const char* value);
00094 static void toXML (ostream&, const char* field, int value);
00095 static void toXML (ostream&, const char* field, long value);
00096 static void toXML (ostream&, const char* field, float value);
00097 static void startXML (ostream&, const char* field);
00098 static void endXML (ostream&);
00099 void outputTerminationReason (ostream& str) const;
00100 };
00101
00102
00103
00104
00111 inline
00112 ostream& operator << (ostream& str, const Statistics& stat)
00113 {
00114 stat.output (str);
00115 return str;
00116 }
00117
00118
00119 #endif // __Statistics__