nodestack.o clockvector.o main.o snapshot-interface.o cyclegraph.o \
datarace.o impatomic.o cmodelint.o \
snapshot.o malloc.o mymemory.o common.o mutex.o promise.o conditionvariable.o \
- context.o
+ context.o scanalysis.o
CPPFLAGS += -Iinclude -I.
LDFLAGS = -ldl -lrt -rdynamic
/* global "model" object */
#include "model.h"
#include "snapshot-interface.h"
+#include "scanalysis.h"
static void param_defaults(struct model_params *params)
{
params->maxfuturedelay = 6;
params->fairwindow = 0;
params->yieldon = false;
+ params->sc_trace_analysis = false;
params->enabledcount = 1;
params->bound = 0;
params->maxfuturevalues = 0;
"-b Upper length bound. Default: %d\n"
"-v Print verbose execution information.\n"
"-u Value for uninitialized reads. Default: %u\n"
+"-c Use SC Trace Analysis.\n"
"-- Program arguments follow.\n\n",
params->maxreads, params->maxfuturevalues, params->maxfuturedelay, params->expireslop, params->fairwindow, params->yieldon, params->enabledcount, params->bound, params->uninitvalue);
exit(EXIT_SUCCESS);
static void parse_options(struct model_params *params, int argc, char **argv)
{
- const char *shortopts = "hym:M:s:S:f:e:b:u:v";
+ const char *shortopts = "hymc:M:s:S:f:e:b:u:v";
int opt;
bool error = false;
while (!error && (opt = getopt(argc, argv, shortopts)) != -1) {
case 'u':
params->uninitvalue = atoi(optarg);
break;
+ case 'c':
+ params->sc_trace_analysis = true;
+ break;
case 'y':
params->yieldon = true;
break;
int main_argc;
char **main_argv;
+void install_trace_analyses() {
+ if (model->params.sc_trace_analysis)
+ model->add_trace_analysis(new SCAnalysis());
+}
+
/** The model_main function contains the main model checking loop. */
static void model_main()
{
snapshot_stack_init();
model = new ModelChecker(params);
+ install_trace_analyses();
+
snapshot_record(0);
model->run();
delete model;
int maxreads;
int maxfuturedelay;
bool yieldon;
+ bool sc_trace_analysis;
unsigned int fairwindow;
unsigned int enabledcount;
unsigned int bound;
const model_params params;
Node * get_curr_node() const;
+ void add_trace_analysis(Trace_Analysis * a) {
+ trace_analyses->push_back(a);
+ }
MEMALLOC
private: