Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Convert between IR variable numbers to JDTs' IVariableBinding/ITypeBinding #33

Closed
vazexqi opened this issue Mar 19, 2013 · 1 comment
Closed

Comments

@vazexqi
Copy link
Owner

vazexqi commented Mar 19, 2013

These conversions are necessary for the code generation part to work.

@vazexqi
Copy link
Owner Author

vazexqi commented Mar 19, 2013

JDTIdentityMapper seems to go from JDT -> Wala. Can we use it to get back?

vazexqi pushed a commit that referenced this issue Mar 22, 2013
The variable names are the only way to map back to IVariableBindings
later by walking the tree.

See #33 and #35.
vazexqi pushed a commit that referenced this issue Mar 22, 2013
The algorithm is as follows:

1) Determine all the def (basically writes) that are in the selected
statements.
2) For all those defs, return the ones that are not already part of the
parameter list.

This is very similar to the algorithm used in Extract Method.

See #33 and #35.
vazexqi pushed a commit that referenced this issue Mar 22, 2013
vazexqi pushed a commit that referenced this issue Mar 25, 2013
The test will still work since we have zipped the workspace up but
for furture analysis we do need this file.

See #33 and #35.
vazexqi pushed a commit that referenced this issue Mar 25, 2013
vazexqi pushed a commit that referenced this issue Mar 25, 2013
Makes it more convenient than having to create a new instance of
SimpleNameBindingFinder each time.

See #33.
vazexqi pushed a commit that referenced this issue Mar 25, 2013
We add a convenience method for transforming from DataDependence ->
IBinding (regardless of the type) for now.

See #33.
vazexqi pushed a commit that referenced this issue Mar 25, 2013
vazexqi pushed a commit that referenced this issue Mar 25, 2013
vazexqi pushed a commit that referenced this issue Mar 25, 2013
Previously we were using the entire CompilationUnit. While this works,
it is too coarse-grained. We should start looking for bindings at the
smallest encompassing unit, i.e, a MethodDeclaration for our case.

See #33.
vazexqi pushed a commit that referenced this issue Apr 5, 2013
Now we look for the bindings only from the selected statements.

Previously, we look starting from the methoddeclaration. This caused
problems when we have this situation:

method {
	for(int i = …)
      // Select this statement
	  call(i);

    for(int i =…)
}

which i variable would it bind to?

See #33.
@vazexqi vazexqi closed this as completed Apr 5, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant