X-Git-Url: http://demsky.eecs.uci.edu/git/?a=blobdiff_plain;f=scanalysis.h;h=988c8f75c13ad58f0fdfc44ebd3e936bb59601e1;hb=2d0d4ac38e05905a6633b3f2d5112ccadd45c27f;hp=f9db2db74693d4e4706dc08a2462d1e842f2bb3d;hpb=66a17f91a2fff4c92b686a5524fe0ae920c2a203;p=model-checker.git diff --git a/scanalysis.h b/scanalysis.h index f9db2db..988c8f7 100644 --- a/scanalysis.h +++ b/scanalysis.h @@ -3,25 +3,49 @@ #include "traceanalysis.h" #include "hashtable.h" -class SCAnalysis : public Trace_Analysis { +struct sc_statistics { + unsigned long long elapsedtime; + unsigned int sccount; + unsigned int nonsccount; +}; + +class SCAnalysis : public TraceAnalysis { public: SCAnalysis(); ~SCAnalysis(); + virtual void setExecution(ModelExecution * execution); virtual void analyze(action_list_t *); + virtual const char * name(); + virtual bool option(char *); + virtual void finish(); + SNAPSHOTALLOC private: + void update_stats(); 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 * cvmap; - HashTable * cycleset; - SnapVector * threadlists; + HashTable cvmap; + bool cyclic; + HashTable badrfset; + HashTable lastwrmap; + SnapVector threadlists; + ModelExecution *execution; + bool print_always; + bool print_buggy; + bool print_nonsc; + bool time; + struct sc_statistics *stats; }; #endif