diff --git a/src/common/MemoryActions.h b/src/common/MemoryActions.h index c615c5b..e54dbd6 100644 --- a/src/common/MemoryActions.h +++ b/src/common/MemoryActions.h @@ -25,7 +25,7 @@ class MemoryActions { Action action; int taskId; - ADDRESS addr; // destination address + ADDRESS destination_address; // Default constructor MemoryActions() { @@ -42,10 +42,10 @@ class MemoryActions { // (b) is last write action inline void storeAction(Action & act) { if ( isEmpty || act.isWrite ) { - action = act; - isEmpty = false; - taskId = action.taskId; - addr = action.addr; + action = act; + isEmpty = false; + taskId = action.taskId; + destination_address = action.destination_address; } } @@ -53,16 +53,16 @@ class MemoryActions { INTEGER & val, INTEGER & linNo, INTEGER & funcID, bool isWrite_) { if ( isEmpty || isWrite_) { - action.taskId = taskID; - action.addr = adr; - action.funcId = funcID; - action.value = val; - action.lineNo = linNo; - action.isWrite = isWrite_; + action.taskId = taskID; + action.destination_address = adr; + action.funcId = funcID; + action.value = val; + action.lineNo = linNo; + action.isWrite = isWrite_; - isEmpty = false; - taskId = action.taskId; - addr = action.addr; + isEmpty = false; + taskId = action.taskId; + destination_address = action.destination_address; } } diff --git a/src/common/action.h b/src/common/action.h index 5dde4ad..7cc094b 100644 --- a/src/common/action.h +++ b/src/common/action.h @@ -23,7 +23,7 @@ class Action { public: INTEGER taskId; // task id of writter - ADDRESS addr; // destination address + ADDRESS destination_address; VALUE value; // value written VALUE lineNo; // source-line number INTEGER funcId; // the identifier of corresponding function @@ -34,10 +34,10 @@ class Action { taskId(tskId), value(val), lineNo(ln), funcId(fuId) {} Action(INTEGER tskId, ADDRESS adr, VALUE val, VALUE ln, INTEGER fuId): - taskId(tskId), addr(adr), value(val), lineNo(ln), funcId(fuId) { } + taskId(tskId), destination_address(adr), value(val), lineNo(ln), funcId(fuId) { } Action(INTEGER tskId, address adr, lint val, int ln, INTEGER fuId ): - taskId(tskId), addr(adr), value(val), lineNo(ln), funcId(fuId) { } + taskId(tskId), destination_address(adr), value(val), lineNo(ln), funcId(fuId) { } Action() { } @@ -53,7 +53,7 @@ class Action { void printActionNN(std::ostringstream & buff) { std::string type = " R "; if ( isWrite ) type = " W "; - buff << taskId << type << addr << " " << value + buff << taskId << type << destination_address << " " << value << " " << lineNo << " " << funcId; } diff --git a/src/detector/determinacy/checker.cc b/src/detector/determinacy/checker.cc index e3a59aa..510e431 100644 --- a/src/detector/determinacy/checker.cc +++ b/src/detector/determinacy/checker.cc @@ -147,11 +147,11 @@ void Checker::saveTaskActions( const MemoryActions & taskActions ) { // write in the parallel writes,update and take it forward // 4.2.1 check conflicts with other parallel tasks - auto perAddrActions = writes.find( taskActions.addr ); + auto perAddrActions = writes.find(taskActions.destination_address); if (perAddrActions == writes.end()) {// 1. first action - writes[taskActions.addr] = std::list(); + writes[taskActions.destination_address] = std::list(); } - std::list & AddrActions = writes[taskActions.addr]; + std::list & AddrActions = writes[taskActions.destination_address]; for (auto lastWrt = AddrActions.begin(); lastWrt != AddrActions.end(); lastWrt++) { // actions of same task @@ -185,7 +185,7 @@ void Checker::saveTaskActions( const MemoryActions & taskActions ) { AddrActions.pop_front(); // remove oldest element } - writes[taskActions.addr].push_back( taskActions ); // save + writes[taskActions.destination_address].push_back( taskActions ); // save } // Records the determinacy race warning to the conflicts table. @@ -227,7 +227,7 @@ void Checker::constructMemoryAction(std::stringstream & ssin, Action & action) { std::string tempBuff; ssin >> tempBuff; // address - action.addr = (ADDRESS)stoul(tempBuff, 0, 16); + action.destination_address = (ADDRESS)stoul(tempBuff, 0, 16); ssin >> tempBuff; // value action.value = stol(tempBuff); diff --git a/src/detector/determinacy/conflict.h b/src/detector/determinacy/conflict.h index a092092..9ebb1eb 100644 --- a/src/detector/determinacy/conflict.h +++ b/src/detector/determinacy/conflict.h @@ -29,7 +29,7 @@ class Conflict { Conflict(const Action& curMemAction, const Action& prevMemAction) { action1 = curMemAction; action2 = prevMemAction; - addr = curMemAction.addr; + addr = curMemAction.destination_address; } inline int getTask1Id() {