projects
/
model-checker.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge demsky's SC analysis fixup
[model-checker.git]
/
scanalysis.cc
diff --git
a/scanalysis.cc
b/scanalysis.cc
index e6cbddc71e4f01f70f176e7c63ad5917c25888b2..98dd8eb43d43bd729a59139dff778a93ceb9fd48 100644
(file)
--- a/
scanalysis.cc
+++ b/
scanalysis.cc
@@
-30,7
+30,7
@@
void SCAnalysis::print_list(action_list_t *list) {
model_print("BRF ");
act->print();
if (badrfset.contains(act)) {
model_print("BRF ");
act->print();
if (badrfset.contains(act)) {
- model_print("Desired Rf: %u \n",badrfset.get(act)->get_seq_number());
+ model_print("Desired Rf: %u \n",
badrfset.get(act)->get_seq_number());
}
}
hash = hash ^ (hash << 3) ^ ((*it)->hash());
}
}
hash = hash ^ (hash << 3) ^ ((*it)->hash());
@@
-49,8
+49,8
@@
void SCAnalysis::check_rf(action_list_t *list) {
for (action_list_t::iterator it = list->begin(); it != list->end(); it++) {
const ModelAction *act = *it;
if (act->is_read()) {
for (action_list_t::iterator it = list->begin(); it != list->end(); it++) {
const ModelAction *act = *it;
if (act->is_read()) {
- if (act->get_reads_from()
!=
lastwrmap.get(act->get_location()))
- badrfset.put(act,lastwrmap.get(act->get_location()));
+ if (act->get_reads_from()
!=
lastwrmap.get(act->get_location()))
+ badrfset.put(act,
lastwrmap.get(act->get_location()));
}
if (act->is_write())
lastwrmap.put(act->get_location(), act);
}
if (act->is_write())
lastwrmap.put(act->get_location(), act);
@@
-58,11
+58,11
@@
void SCAnalysis::check_rf(action_list_t *list) {
}
bool SCAnalysis::merge(ClockVector *cv, const ModelAction *act, const ModelAction *act2) {
}
bool SCAnalysis::merge(ClockVector *cv, const ModelAction *act, const ModelAction *act2) {
- ClockVector *
cv2=
cvmap.get(act2);
- if (cv2
==
NULL)
+ ClockVector *
cv2 =
cvmap.get(act2);
+ if (cv2
==
NULL)
return true;
if (cv2->getClock(act->get_tid()) >= act->get_seq_number() && act->get_seq_number() != 0) {
return true;
if (cv2->getClock(act->get_tid()) >= act->get_seq_number() && act->get_seq_number() != 0) {
- cyclic
=
true;
+ cyclic
=
true;
//refuse to introduce cycles into clock vectors
return false;
}
//refuse to introduce cycles into clock vectors
return false;
}
@@
-332,7
+332,7
@@
bool SCAnalysis::processRead(ModelAction *read, ClockVector *cv) {
write -rf-> R =>
write2 -sc-> write */
if (cv->synchronized_since(write2)) {
write -rf-> R =>
write2 -sc-> write */
if (cv->synchronized_since(write2)) {
- changed |= writecv
==
NULL || merge(writecv, write, write2);
+ changed |= writecv
==
NULL || merge(writecv, write, write2);
break;
}
}
break;
}
}