Invariant inference: mark inferred facts in diagnostics, and a hint to state a loop invariant

Abierto
#554 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 1 día

@CatarinaGamboa ya está trabajando en esto.

Desde el 24/11/2026.

  • #560 de @CatarinaGamboa — abierto

Evaluación

Dificultad
4/5
Tiempo estimado
3-5 días
Aptitud para principiantes
35/100
Tipo de issue
Nueva funcionalidad
Claridad
Bastante claro
Estado de actividad
Activo
Stack tecnológico
java

Línea de trabajo

Start by reading the decisions in #548 and the loop-invariant plan in #542; the payload names no files, so locate where loop-head instances receive inferred conjuncts in Found and where diagnostic data is assembled for the IDE. Then trace the counterexample/error path that would carry the new hint, and use the loops from #537 as the real-example check. Done means inferred facts are identifiable with their loop line in diagnostics while the terminal/hover message stays unchanged, and the hint is validated or dropped after review.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

enhancement error messages

Part of #548 (decisions in its comments) and the loop invariant plan #542.

1. Mark inferred facts. The facts that loop invariant inference adds to a loop-head instance must be recognisable in the diagnostic data sent to the IDE: which conjuncts of Found are inferred invariants and the line of their loop. The terminal/hover message does not change: inferred facts stay inside Found as ordinary facts.

2. Hint (prototype). When an error's counterexample involves a variable that an enclosing loop changes, and inference could not prove what is needed, add a hint: the variable changes in the loop at line N, LiquidJava only keeps what holds on every iteration, and the invariant can be stated on the declaration, e.g. @Refinement("_ >= 0") int total = 0; (the suggested refinement is the expected refinement rewritten for the variable, when that is possible). Judge it on real examples (#537's loops, study-like code) before keeping it; drop it if it misleads.

Lenguaje dominante
Java
Estrellas
73
Forks
38
Merge medio
12 h 32 min
PR fusionados (30 d)
45

Preparar el entorno

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de liquid-java/liquidjava

Todos los issues de liquid-java/liquidjava

Issues similares

Más issues de Java

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.