[FEATURE] Improve Error handling for semantic analysis
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 5/5
- Tempo stimato
- Più di una settimana
- Idoneità per principianti
- 18/100
Direzione di ricerca
The payload names no files, so start by finding where the semantic analyser raises and reports its first error in the pyqasm package. The open design questions are how to collect errors up to a threshold, what state to give an invalid variable like a in the example, and how to format codes such as OSA_ERR_123. The issue has no comments or linked work and needs maintainer decisions before any patch. Treat it as a discussion starter, not a first task.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Feature Description
Error Emission
- Currently, the semantic analyser stops at the first error and emits out an error message to the user about the about location and the error.
- This might be good for a small number of semantic errors but for a lot of errors, the user experience would degrade. They would have to run the analyser as many times as the number of errors which is not desirable.
- Moreover, if the user has a very large number of errors, spitting out all errors at once could be confusing.
- A good feature would be to add an error threshold in the analyser. With this, we can keep a list of errors and as soon as the number of errors reach this predefined threshold, we stop and emit all of these errors.
Error Codes
- Adding unique identifiers to the messages would help locate the line of code quicker than parsing through the python traceback. Eg -
OSA_ERR_123: <<error message>>(OSA: openqasm semantic analyser )
Implementation (Optional)
OPENQASM 3.0;
array[int[32], 2, 2] my_arr = { {1,2}, {3,4}};
int[32] a = my_arr[0]; // this is semantically incorrect
qubit q;
if( a == 4) { // what do we refer as "a" here?
for int[32] i in [:a] {
rx(pi * i ) q;
}
}
In the above example, do we treat a as undefined or invalid? What does "invalid" exactly mean here? How to continue semantic analysis in this erroneous state?
- What is a good threshold level for errors?
- Lingua principale
- Python
- Stelle
- 29
- Fork
- 33
- Merge medio
- 2g 4h
- PR unite (30g)
- 15
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 qBraid/pyqasm
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 63/100
I maintainer di solito rispondono entro 1 giorno
-
enhancement error-handling program-validation
Difficoltà 2/5 1-3 ore Idoneità per principianti 65/100
I maintainer di solito rispondono entro 1 giorno
-
Move the QASM 2 printer and its branch pre-processing out of qasm2.pyForse già presa @danielgaskins l’ha presa 7 giorni fa. Apertaenhancement qasm2
Difficoltà 4/5 3-5 giorni Idoneità per principianti 22/100
qBraid/pyqasm#447 · 2 commenti ·
I maintainer di solito rispondono entro 1 giorno
-
[BUG] dumps() emits extern calls without a semicolon, producing unparsable QASMForse già presa @Jah-yee l’ha presa 15 giorni fa. Apertabug
Difficoltà 2/5 1-3 ore Idoneità per principianti 25/100
qBraid/pyqasm#438 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
Parse failures raise ValidationError with an empty message; the ANTLR diagnostic is lostForse già presa @tonycoder-hub l’ha presa 9 giorni fa. Apertabug
Difficoltà 2/5 1-3 ore Idoneità per principianti 22/100
qBraid/pyqasm#436 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di qBraid/pyqasm
Issue simili
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
ansys/pyansys-common-mcp#213 ·
I maintainer di solito rispondono entro 3 giorni
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 67/100
freedomofpress/dangerzone#1594 ·
I maintainer di solito rispondono entro 3 giorni
-
priority:P1 status:in-review type:bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
randomparity/kdive#3317 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
area:ci
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 90/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 66/100
mesonbuild/meson#16281 ·
I maintainer di solito rispondono entro 1 giorno