A ternary between arrays crashes: Sorts (Array Int Int) and Bool are incompatible
I maintainer di solito rispondono entro 1 giorno
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 15/100
Direzione di ricerca
Start from the Tern reproducer in the issue, which uses a ternary over int[] branches checked against a length(a) == 1 refinement, and reproduce both the Sorts (Array Int Int) and Bool are incompatible error and the args not-found variant. The verifier code that handles conditional expressions is not named in the payload, so locate it by searching for the ternary handling. Work is already under way in linked pull request #561, so check that before starting. Done means the reproducer passes with each branch's facts holding under its condition.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Description
A conditional expression (c ? x : y) whose branches are arrays crashes the verifier when the result is checked against a length refinement.
Minimal reproducer
import liquidjava.specification.Refinement;
public class Tern {
static void one(@Refinement("length(a) == 1") int[] a) {}
static void pick(boolean b) {
int[] a = b ? new int[1] : new int[1];
one(a); // should pass
}
}
Result on main:
Error: Sorts (Array Int Int) and Bool are incompatible
If the condition mentions args (boolean b = args.length > 0; inside main), the same program instead fails with Not Found Error: Variable 'args' could not be found, which also only happens with the array ternary.
Expected
The program passes: both branches have length 1. A branch array's facts should hold for the result under that branch's condition. Found while reviewing #540.
- Lingua principale
- Java
- Stelle
- 73
- Fork
- 38
- Merge medio
- 12h 32m
- PR unite (30g)
- 45
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Ha un modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di liquid-java/liquidjava
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 90/100
liquid-java/liquidjava#562 ·
I maintainer di solito rispondono entro 1 giorno
-
A float ghost crashes the verifier: "Ghost not implemented for type float"Forse già presa @MohammedZaid1740 l’ha presa 7 giorni fa. Apertabug good first issue
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
liquid-java/liquidjava#443 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
bug real-world-finding
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
liquid-java/liquidjava#395 ·
I maintainer di solito rispondono entro 1 giorno
-
new T[a][b] gets length b instead of a (unsound)Forse già presa @CatarinaGamboa l’ha presa 4 giorni fa. Apertabug
Difficoltà 2/5 1-3 ore Idoneità per principianti 30/100
liquid-java/liquidjava#557 ·
I maintainer di solito rispondono entro 1 giorno
-
Invariant inference: mark inferred facts in diagnostics, and a hint to state a loop invariantForse già presa Una pull request collegata a questa issue è aperta o già unita. Apertaenhancement error messages
Difficoltà 4/5 3-5 giorni Idoneità per principianti 35/100
liquid-java/liquidjava#554 ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di liquid-java/liquidjava
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 65/100
avaje/avaje-metrics#139 ·
-
documentation good first issue help wanted
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 90/100
-
Attachment upload accepts a file part with no file chosen and stores an empty comp_attachmentForse già presa Una pull request collegata a questa issue è aperta o già unita. Apertabug
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
eclipse-sw360/sw360#4849 ·
I maintainer di solito rispondono entro 2 giorni
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 85/100
exoego/keycloak-fuhito#888 ·
I maintainer di solito rispondono entro 1 giorno
-
[Bug]: Skip cross-field checkpointing validation rules when checkpointing is disabledForse già presa @hutiefang76 l’ha presa oggi. Apertaaccepted bug good first issue java
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
Sekelenao/Flinkboot#473 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno