typetools / typetools/checker-framework

Result of a comparison operator should not be lub of the argument types

Open
#743 0 comments 0 reactions 0 assignees View on GitHub

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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.