projects
/
c11tester.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
3bc5d89
)
model: embed the trace_analyses in the class
author
Brian Norris
<banorris@uci.edu>
Tue, 16 Apr 2013 02:55:37 +0000
(19:55 -0700)
committer
Brian Norris
<banorris@uci.edu>
Tue, 16 Apr 2013 18:38:00 +0000
(11:38 -0700)
model.cc
patch
|
blob
|
history
model.h
patch
|
blob
|
history
diff --git
a/model.cc
b/model.cc
index 03d7ba33b4646f48ed9e5a288ddf66be256c0470..8d5bc0fa3bab813c3a68b5fa149ae95b27c51800 100644
(file)
--- a/
model.cc
+++ b/
model.cc
@@
-30,7
+30,7
@@
ModelChecker::ModelChecker(struct model_params params) :
execution(new ModelExecution(¶ms, scheduler, node_stack)),
diverge(NULL),
earliest_diverge(NULL),
execution(new ModelExecution(¶ms, scheduler, node_stack)),
diverge(NULL),
earliest_diverge(NULL),
- trace_analyses(
new ModelVector<TraceAnalysis *>()
)
+ trace_analyses()
{
}
{
}
@@
-38,9
+38,8
@@
ModelChecker::ModelChecker(struct model_params params) :
ModelChecker::~ModelChecker()
{
delete node_stack;
ModelChecker::~ModelChecker()
{
delete node_stack;
- for (unsigned int i = 0; i < trace_analyses->size(); i++)
- delete (*trace_analyses)[i];
- delete trace_analyses;
+ for (unsigned int i = 0; i < trace_analyses.size(); i++)
+ delete trace_analyses[i];
delete scheduler;
}
delete scheduler;
}
@@
-328,8
+327,8
@@
bool ModelChecker::next_execution()
/** @brief Run trace analyses on complete trace */
void ModelChecker::run_trace_analyses() {
/** @brief Run trace analyses on complete trace */
void ModelChecker::run_trace_analyses() {
- for (unsigned int i = 0; i < trace_analyses
->
size(); i++)
-
(*trace_analyses)
[i]->analyze(execution->get_action_trace());
+ for (unsigned int i = 0; i < trace_analyses
.
size(); i++)
+
trace_analyses
[i]->analyze(execution->get_action_trace());
}
/**
}
/**
diff --git
a/model.h
b/model.h
index cfc652866da765899fa3e6f452b3403fa6bcc03b..7d84f60112c5ef26b8c54cf9e139f016fc05df7b 100644
(file)
--- a/
model.h
+++ b/
model.h
@@
-69,7
+69,7
@@
public:
const model_params params;
void add_trace_analysis(TraceAnalysis *a) {
const model_params params;
void add_trace_analysis(TraceAnalysis *a) {
- trace_analyses
->
push_back(a);
+ trace_analyses
.
push_back(a);
}
action_list_t * get_actions_on_obj(void * obj, thread_id_t tid);
}
action_list_t * get_actions_on_obj(void * obj, thread_id_t tid);
@@
-96,7
+96,7
@@
private:
ucontext_t system_context;
ucontext_t system_context;
- ModelVector<TraceAnalysis *>
*
trace_analyses;
+ ModelVector<TraceAnalysis *> trace_analyses;
/** @brief The cumulative execution stats */
struct execution_stats stats;
/** @brief The cumulative execution stats */
struct execution_stats stats;