rv/rvgen: Robustness, modernization, and fixes
Get series with b4
b4 am [email protected]Versions newest first · linked by author and title
- v3 Latest19 patches 2 repliesIn review
- v220 patches 15 repliesSuperseded
- v126 patches 68 repliesSuperseded
Changes in v3 from the cover letter
- Dropped patch "add missing return type annotations" as per Gabriele Monaco's feedback that annotations on stub methods are not needed at this stage.
- Expanded AutomataError exception class patch to also replace generic ValueError exceptions in HA and LTL modules, as suggested by Gabriele Monaco.
- Updated typo fix patch to also correct singular/plural inconsistencies ("automata" to "automaton"), as noted by Gabriele Monaco.
- Included additional f-string conversion in dot2k.py found by Gabriele Monaco after rebase.
Patches in v3 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/19 | rv/rvgen: introduce AutomataError exception classtools/ tools/ tools/ +4 more | +43 | 1 reply | |
| 2/19 | rv/rvgen: remove bare except clauses in generatortools/ | +1 | 0 replies | |
| 3/19 | rv/rvgen: replace % string formatting with f-stringstools/ tools/ tools/ +3 more | +83 | 0 replies | |
| 4/19 | rv/rvgen: replace __len__() calls with len()tools/ tools/ | +9 | 0 replies | |
| 5/19 | rv/rvgen: remove unnecessary semicolonstools/ | +3 | 0 replies | |
| 6/19 | rv/rvgen: use context managers for file operationstools/ tools/ | +6 | 0 replies | |
| 7/19 | rv/rvgen: fix typos in automata and generator docstring and commentstools/ tools/ tools/ +1 more | +8 | 1 reply | |
| 8/19 | rv/rvgen: fix PEP 8 whitespace violationstools/ tools/ tools/ +1 more | +8 | 0 replies | |
| 9/19 | rv/rvgen: fix DOT file validation logic errortools/ | +1 | 0 replies | |
| 10/19 | rv/rvgen: use class constant for init markertools/ | +3 | 0 replies | |
| 11/19 | rv/rvgen: refactor automata.py to use iterator-based parsingtools/ | +71 | 0 replies | |
| 12/19 | rv/rvgen: remove unused sys import from dot2ctools/ | +0 | 0 replies | |
| 13/19 | rv/rvgen: remove unused __get_main_name methodtools/ | +0 | 0 replies | |
| 14/19 | rv/rvgen: make monitor arguments required in rvgentools/ | +4 | 0 replies | |
| 15/19 | rv/rvgen: fix isinstance check in Variable.expand()tools/ | +1 | 0 replies | |
| 16/19 | rv/rvgen: extract node marker string to class constanttools/ | +5 | 0 replies | |
| 17/19 | rv/rvgen: enforce presence of initial statetools/ | +4 | 0 replies | |
| 18/19 | rv/rvgen: fix unbound loop variable warningtools/ | +9 | 0 replies | |
| 19/19 | rv/rvgen: fix _fill_states() return type annotationtools/ | +1 | 0 replies |
Reviews trailers per patch
All 19 patches have a Reviewed-by or Acked-by.
| Patch | Gabriele Monaco | Nam Cao |
|---|---|---|
| 1/19 | Co-authored-by R-b | |
| 2/19 | R-b | R-b |
| 3/19 | R-b | R-b |
| 4/19 | R-b | R-b |
| 5/19 | R-b | R-b |
| 6/19 | R-b | R-b |
| 7/19 | R-b | |
| 8/19 | R-b | R-b |
| 9/19 | R-b | R-b |
| 10/19 | R-b | R-b |
| 11/19 | R-b | |
| 12/19 | R-b | |
| 13/19 | R-b | |
| 14/19 | R-b | R-b |
| 15/19 | R-b | |
| 16/19 | R-b | |
| 17/19 | R-b | |
| 18/19 | R-b | |
| 19/19 | R-b |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [PATCH v3 00/19] rv/rvgen: Robustness, modernization, and fixes
This patch series introduces fixes and improvements to the RV Generator (rvgen) tool in tools/verification. The primary goal is to enhance the tool's robustness, maintainability, and correctness by addressing several latent bugs, modernizing the Python codebase, and improving its overall structure and error handling.
The changes include fixing logic errors in DOT file validation, resolving unbound variable errors that could lead to runtime crashes, and improving exception handling by removing dangerous bare except clauses. The codebase is updated to use contemporary Python idioms such as f-strings and context managers. Additionally, type annotations are added to resolve static analysis errors.
Changes in v3:
- Dropped patch "add missing return type annotations" as per Gabriele Monaco's feedback that annotations on stub methods are not needed at this stage.
- Expanded AutomataError exception class patch to also replace generic ValueError exceptions in HA and LTL modules, as suggested by Gabriele Monaco.
- Updated typo fix patch to also correct singular/plural inconsistencies ("automata" to "automaton"), as noted by Gabriele Monaco.
- Included additional f-string conversion in dot2k.py found by Gabriele Monaco after rebase.
Changes in v2:
- Dropped patches related to the @not_implemented decorator and abstract method stubs (v1 patches 9, 18, 19) to address class hierarchy improvements in a separate series.
- Dropped trivial cleanup patches (boolean simplification, __contains__) as they were already fixed after rebasing from linux-trace/latency/for-next.
- Merged typo fix patches into a single patch.
- Changed the fix for the unbound loop variable warning in abbreviate_atoms pyright report.
- Reworked initial state validation to strictly enforce the presence of an initial state.
Wander Lairson Costa (19):
rv/rvgen: introduce AutomataError exception class rv/rvgen: remove bare except clauses in generator rv/rvgen: replace % string formatting with f-strings rv/rvgen: replace __len__() calls with len()
rv/rvgen: remove unnecessary semicolons
rv/rvgen: use context managers for file operations rv/rvgen: fix typos in automata and generator docstring and comments rv/rvgen: fix PEP 8 whitespace violations
rv/rvgen: fix DOT file validation logic error
rv/rvgen: use class constant for init marker
rv/rvgen: refactor automata.py to use iterator-based parsing rv/rvgen: remove unused sys import from dot2c
rv/rvgen: remove unused __get_main_name method
rv/rvgen: make monitor arguments required in rvgen rv/rvgen: fix isinstance check in Variable.expand() rv/rvgen: extract node marker string to class constant rv/rvgen: enforce presence of initial state
rv/rvgen: fix unbound loop variable warning
rv/rvgen: fix _fill_states() return type annotation
tools/verification/rvgen/__main__.py | 19 +-- tools/verification/rvgen/dot2c | 1 - tools/verification/rvgen/rvgen/automata.py | 155 ++++++++++++-------- tools/verification/rvgen/rvgen/dot2c.py | 58 ++++---- tools/verification/rvgen/rvgen/dot2k.py | 61 ++++---- tools/verification/rvgen/rvgen/generator.py | 91 +++++------- tools/verification/rvgen/rvgen/ltl2ba.py | 11 +- tools/verification/rvgen/rvgen/ltl2k.py | 54 ++++--- 8 files changed, 237 insertions(+), 213 deletions(-)
Signature · 1 line
2.53.0