Issue 11732: representation of this-> and this variables that are declared at header of loop needs special care in KDM (kdm-rtf) Source: KDM Analytics (Dr. Nikolai Mansourov, nick@kdmanalytics.com) Nature: Uncategorized Issue Severity: Summary: representation of this-> and this. there should be some sort of addresses to the class or something like that. There is an example (initialization) but it may need some corrections. The example simply writes to the class member. The problem is that this is not distinguishable from simply num=x; (the example has this->num=x;) Maybe there should be a microoperation "this"? Resolution: Revised Text: Actions taken: December 1, 2007: received issue Discussion: This operator is used to resolve the scope of names in situations when the name of the formal parameter is the same as the name of the class member. For example: set(a) {this.a =a; } // Take a const-reference to the right-hand side of the assignment. // Return a non-const reference to the left-hand side. MyClass& MyClass::operator=(const MyClass &rhs) { ... // Do the assignment operation! return *this; // Return a reference to myself. } MyClass& MyClass::operator=(const MyClass &rhs) { // Only do assignment if RHS is a different object from this. if (this != &rhs) { ... // Deallocate, allocate new space, copy values... } return *this; } Add micro operation this no reads or addresses; writes to a data element of the class datatype; This pointer to the current instance of the object none Writes to a DataElement Single flow to the next micro action End of Annotations:===== s is issue 11732 representation of this-> and this representation of this-> and this. there should be some sort of addresses to the class or something like that. There is an example (initialization) but it may need some corrections. The example simply writes to the class member. The problem is that this is not distinguishable from simply num=x; (the example has this->num=x;) Maybe there should be a microoperation "this"?