You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using default builders, the jimple does not initialize the attributes with defult values. Thus, in cases where we expect a defult assignment to the contractor to detect possible conflicts, the analysis does not work.
... {
public void m() {
this.instanceAttributeSample = new InstanceAttributeSample(); // LEFT
instanceAttributeSample.setFoo(2); // RIGHT
}
}
class InstanceAttributeSample {
private int att;
public void setFoo(int foo) {
this.att = foo;
}
}
In the example above, a conflict is expected because the execution of the LEFT line writes to instanceAttributeSample.att, and the execution of the RIGHT line also writes to instanceAttributeSample.att, so both change the same component.
So we're going to have a problem.
In this case, using the default constructor, the generated jimple has no assignment to the "att" attribute on the left line.
As a solution, in this case, whenever we find a default constructor, we must add in the abstraction all the attributes of the class.
The text was updated successfully, but these errors were encountered:
When using default builders, the jimple does not initialize the attributes with defult values. Thus, in cases where we expect a defult assignment to the contractor to detect possible conflicts, the analysis does not work.
In the example above, a conflict is expected because the execution of the LEFT line writes to instanceAttributeSample.att, and the execution of the RIGHT line also writes to instanceAttributeSample.att, so both change the same component.
So we're going to have a problem.
In this case, using the default constructor, the generated jimple has no assignment to the "att" attribute on the left line.
As a solution, in this case, whenever we find a default constructor, we must add in the abstraction all the attributes of the class.
The text was updated successfully, but these errors were encountered: