EvalOr: x<a || x>a over non-integer types simplifies to true
Los mantenedores suelen responder en 1 día
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 3/5
- Tiempo estimado
- 1-2 días
- Aptitud para principiantes
- 65/100
Línea de trabajo
Start by reading EvalOr.orComparisonTrue and the adjacent notXb1 branch mentioned in the issue. Check how the comparison bounds and allowEquals() are handled for non-integer types, then run the relevant boolean simplifier tests. Done when strict comparisons at an equal bound no longer simplify to true, while the listed integer cases keep their current results.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
`EvalOr.orComparisonTrue` decides `x <= a || x >= b` with the two bounds only. For mathematically integer bounds on integer types that is right, because the strictness is folded into the bound (`k<3` is stored as `k<=2`, `k>3` as `k>=4`). For non-integer bounds, or integer bounds on a non-integer type, it returns `d0 == d1` without looking at `allowEquals`, so two strict comparisons on the same bound pass as a tautology:
- `l<2.5 || l>2.5` (l a double) evaluates to `true`; it is false at l == 2.5
- `l<3.0 || l>3.0` evaluates to `true`
- `k<3 || k>3` (k an int) correctly stays `k<3||k>=4`
- `k<=3 || k>=3` correctly becomes `true`
Found while benchmarking the boolean simplifier (the structural isNegationOf work). Not fixed there, since it changes verdicts: the non-integer branch needs `gt0.allowEquals() || gt1.allowEquals()` when the bounds coincide, and `x<a || x>a` should probably become `x != a` as the `notXb1` branch below it already does for the negated form.
🤖 Generated with Claude Code
- Lenguaje dominante
- Java
- Estrellas
- 1
- Forks
- 1
- Merge medio
- 1 h 55 min
- PR fusionados (30 d)
- 8
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Tiene una plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de CodeLaser/maddi
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
CodeLaser/maddi#166 · 2 comentarios ·
Los mantenedores suelen responder en 1 día
-
build/ci good first issue
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
Los mantenedores suelen responder en 1 día
-
bug
Dificultad 3/5 1-2 días Aptitud para principiantes 67/100
Los mantenedores suelen responder en 1 día
-
bug
Dificultad 3/5 1-2 días Aptitud para principiantes 68/100
Los mantenedores suelen responder en 1 día
-
Java printer: a nested type prints by simple name when the unit imports another type of that nameAbiertobug
Dificultad 3/5 1-2 días Aptitud para principiantes 57/100
Los mantenedores suelen responder en 1 día
Todos los issues de CodeLaser/maddi
Issues similares
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 70/100
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 67/100
quarkiverse/quarkus-google-cloud-services#1188 ·
Los mantenedores suelen responder en 1 día
-
Component: Frontend Component: Web Component Type: Maintenance
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
it-at-m/refarch-templates#1944 ·
Los mantenedores suelen responder en 2 días
-
priority: p2 type: bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
googleapis/java-genai#1372 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 60/100