Fix snapshot code
[model-checker.git] / scanalysis.h
index 286f73dea6ec00f065af822f66ae4c3baee1f59c..23d127bf686748d8b36589149e44384045e4ea1e 100644 (file)
@@ -3,17 +3,27 @@
 #include "traceanalysis.h"
 #include "hashtable.h"
 
+struct sc_statistics {
+       unsigned long long elapsedtime;
+       unsigned int sccount;
+       unsigned int nonsccount;
+       unsigned long long actions;
+};
+
 class SCAnalysis : public TraceAnalysis {
  public:
        SCAnalysis();
        ~SCAnalysis();
        virtual void setExecution(ModelExecution * execution);
        virtual void analyze(action_list_t *);
-       virtual char * name();
+       virtual const char * name();
        virtual bool option(char *);
+       virtual void finish();
+
 
        SNAPSHOTALLOC
  private:
+       void update_stats();
        void print_list(action_list_t *list);
        int buildVectors(action_list_t *);
        bool updateConstraints(ModelAction *act);
@@ -33,5 +43,10 @@ class SCAnalysis : public TraceAnalysis {
        HashTable<void *, const ModelAction *, uintptr_t, 4 > lastwrmap;
        SnapVector<action_list_t> threadlists;
        ModelExecution *execution;
+       bool print_always;
+       bool print_buggy;
+       bool print_nonsc;
+       bool time;
+       struct sc_statistics *stats;
 };
 #endif