add traceanalysis support
[model-checker.git] / scanalysis.h
index e8afc18949aaa1b25b931bcfd46f42a5225fde72..ffa933ad5e2b872769199ca81fbcec9d7afd8333 100644 (file)
@@ -5,25 +5,33 @@
 
 class SCAnalysis : public TraceAnalysis {
  public:
-       SCAnalysis(const ModelExecution *execution);
+       SCAnalysis();
        ~SCAnalysis();
+       virtual void setExecution(ModelExecution * execution);
        virtual void analyze(action_list_t *);
+       virtual char * name();
+
 
        SNAPSHOTALLOC
  private:
        void print_list(action_list_t *list);
-       void buildVectors(action_list_t *);
+       int buildVectors(action_list_t *);
        bool updateConstraints(ModelAction *act);
        void computeCV(action_list_t *);
        action_list_t * generateSC(action_list_t *);
        bool processRead(ModelAction *read, ClockVector *cv);
-       ModelAction * getNextAction();
-       bool merge(ClockVector *cv, const ModelAction *act, ClockVector *cv2);
+       int getNextActions(ModelAction **array);
+       bool merge(ClockVector *cv, const ModelAction *act, const ModelAction *act2);
+       void check_rf(action_list_t *list);
+       void reset(action_list_t *list);
+       ModelAction* pruneArray(ModelAction**, int);
 
        int maxthreads;
        HashTable<const ModelAction *, ClockVector *, uintptr_t, 4 > cvmap;
-       HashTable<const ModelAction *, const ModelAction *, uintptr_t, 4 > cycleset;
+       bool cyclic;
+       HashTable<const ModelAction *, const ModelAction *, uintptr_t, 4 > badrfset;
+       HashTable<void *, const ModelAction *, uintptr_t, 4 > lastwrmap;
        SnapVector<action_list_t> threadlists;
-       const ModelExecution *execution;
+       ModelExecution *execution;
 };
 #endif