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

Correct the logic of dataflow framework. #3414

Merged
merged 6 commits into from Jul 23, 2020

Conversation

xingweitian
Copy link
Member

@xingweitian xingweitian commented Jul 1, 2020

BackwardAnalysis:

  1. Add exception block's predecessor exception block to inputs (fix null pointer exception).
  2. When running runAnalysisFor() with an exception block, pass a copied transfer input to callTransferFunction().

ForwardAnalysis:

  1. When running runAnalysisFor() with an exception block, pass a copied transfer input to callTransferFunction(). In the previous dataflow framework (before Introduce backward analysis to dataflow framework. #3370), we passed a non-copied transfer input (https://github.com/typetools/checker-framework/pull/3370/files#diff-d4108228a0a5407e00c090c2e97d8b6dL401-L402). This seems a bug existing in the old dataflow framework.

Resolves #3447.

1. Add exception block's predecessor exception block to inputs (fix null pointer exception).
2. When running runAnalysisFor() with an exception block, pass a copied transfer input to callTransferFunction().

ForwardAnalysis:
1. When running runAnalysisFor() with an exception block, pass a copied transfer input to callTransferFunction().
@wmdietl wmdietl self-assigned this Jul 1, 2020
@wmdietl
Copy link
Member

wmdietl commented Jul 1, 2020

This can wait until after the release.

@xingweitian xingweitian closed this Jul 1, 2020
@xingweitian xingweitian deleted the typetools-dataflow-fix branch July 1, 2020 16:37
@xingweitian xingweitian restored the typetools-dataflow-fix branch July 1, 2020 19:15
@xingweitian
Copy link
Member Author

Sorry, this is closed by accident.

Copy link
Member

@wmdietl wmdietl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The code changes look good to me.
@smillst Could you have a look at the test setup changes?

dataflow/build.gradle Outdated Show resolved Hide resolved
dataflow/tests/issue3447/Test.java Show resolved Hide resolved
dataflow/build.gradle Show resolved Hide resolved
@wmdietl wmdietl assigned xingweitian and unassigned wmdietl Jul 20, 2020
@xingweitian xingweitian assigned smillst and wmdietl and unassigned xingweitian Jul 20, 2020
@wmdietl wmdietl removed their assignment Jul 20, 2020
dataflow/build.gradle Show resolved Hide resolved
@smillst smillst merged commit bc9a120 into typetools:master Jul 23, 2020
@xingweitian xingweitian deleted the typetools-dataflow-fix branch July 23, 2020 21:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

NullPointerException in backward analysis.
3 participants