typetools / typetools/checker-framework
Result of a comparison operator should not be lub of the argument types
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 1.1k
- Forks
- 440
- Avg merge
- 1d 12h
- Merged PRs (30d)
- 134
Description
Currently, the propagate... methods make the result of a comparison operator (<, <=, >, >=, ==, !=) be the lub of the argument types.
By default, the boolean result of a comparison operator should have no relationship to the values being compared.
This will enable us to clean up quite a few existing checkers, removing special-case code that appears in them. However, we will need to add special-case code to the tainting and information flow checkers. The tradeoff seems like a good one overall.
For string concatenation; leave its result as the lub of the argument types, just as it currently is.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by locating the propagate... methods that determine comparison results, then inspect how the tainting and information flow checkers handle those operators. The change is complete when comparison results no longer use the argument-type lub by default, while string concatenation still does.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- compilers
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100