int main_argc;
char **main_argv;
-void install_trace_analyses() {
+static void install_trace_analyses(const ModelExecution *execution)
+{
if (model->params.sc_trace_analysis)
- model->add_trace_analysis(new SCAnalysis());
+ model->add_trace_analysis(new SCAnalysis(execution));
}
/** The model_main function contains the main model checking loop. */
snapshot_stack_init();
model = new ModelChecker(params);
- install_trace_analyses();
+ install_trace_analyses(model->get_execution());
snapshot_record(0);
model->run();
#include "action.h"
#include "threads-model.h"
#include "clockvector.h"
+#include "execution.h"
-SCAnalysis::SCAnalysis() {
+SCAnalysis::SCAnalysis(const ModelExecution *execution) :
+ execution(execution)
+{
cvmap=new HashTable<const ModelAction *, ClockVector *, uintptr_t, 4>();
cycleset=new HashTable<const ModelAction *, const ModelAction *, uintptr_t, 4>();
threadlists=new SnapVector<action_list_t>(1);
class SCAnalysis : public TraceAnalysis {
public:
- SCAnalysis();
+ SCAnalysis(const ModelExecution *execution);
~SCAnalysis();
virtual void analyze(action_list_t *);
HashTable<const ModelAction *,ClockVector *, uintptr_t, 4 > * cvmap;
HashTable<const ModelAction *,const ModelAction *, uintptr_t, 4 > * cycleset;
SnapVector<action_list_t> * threadlists;
+ const ModelExecution *execution;
};
#endif