projects
/
model-checker.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
e9e73da
)
nodestack: add const
author
Brian Norris
<banorris@uci.edu>
Sat, 15 Dec 2012 00:31:49 +0000
(16:31 -0800)
committer
Brian Norris
<banorris@uci.edu>
Sat, 15 Dec 2012 01:56:27 +0000
(17:56 -0800)
nodestack.cc
patch
|
blob
|
history
nodestack.h
patch
|
blob
|
history
diff --git
a/nodestack.cc
b/nodestack.cc
index 11b83cc1b341145c1ed1faf130afa4bf9ae28d8b..2f99aef24639a9cf128f5083362596aaf0c374e5 100644
(file)
--- a/
nodestack.cc
+++ b/
nodestack.cc
@@
-386,7
+386,8
@@
int Node::get_read_from_size() const
return may_read_from.size();
}
return may_read_from.size();
}
-const ModelAction * Node::get_read_from_at(int i) {
+const ModelAction * Node::get_read_from_at(int i) const
+{
return may_read_from[i];
}
return may_read_from[i];
}
diff --git
a/nodestack.h
b/nodestack.h
index d7c13688e54898dc4fa09d0a532d8866622659a2..94bb58ee1e64d235e4daf0801ee6861491c6b292 100644
(file)
--- a/
nodestack.h
+++ b/
nodestack.h
@@
-89,7
+89,7
@@
public:
bool increment_read_from();
bool read_from_empty() const;
int get_read_from_size() const;
bool increment_read_from();
bool read_from_empty() const;
int get_read_from_size() const;
- const ModelAction * get_read_from_at(int i);
+ const ModelAction * get_read_from_at(int i)
const
;
void set_promise(unsigned int i, bool is_rmw);
bool get_promise(unsigned int i) const;
void set_promise(unsigned int i, bool is_rmw);
bool get_promise(unsigned int i) const;
@@
-114,9
+114,9
@@
public:
private:
void explore(thread_id_t tid);
private:
void explore(thread_id_t tid);
- ModelAction *action;
- Node *parent;
- int num_threads;
+ ModelAction *
const
action;
+ Node *
const
parent;
+
const
int num_threads;
std::vector< bool, ModelAlloc<bool> > explored_children;
std::vector< bool, ModelAlloc<bool> > backtrack;
std::vector< struct fairness_info, ModelAlloc< struct fairness_info> > fairness;
std::vector< bool, ModelAlloc<bool> > explored_children;
std::vector< bool, ModelAlloc<bool> > backtrack;
std::vector< struct fairness_info, ModelAlloc< struct fairness_info> > fairness;