Repository navigation
Conversation
…ixtures and baselines
…p test walks hoa/ recursively
…ice for token alternatives
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
P2 (performance) of REFACTOR.md, preceded by a benchmark suite so the claims are reproducible.
HoaRepresentation::try_from, 200k states / 15 MBverify(), 200k statesFull tables, one per step:
BENCHMARKS.md.Commits
parse,verify,write; deterministic, same setup asautomata) and a criterion wall-clock target (HOARS_BENCH_XL=1adds the 200k-state input). Inputs: the generator from REFACTOR.md plus fixtures inhoa/bench(the DPAs fromautomata, and 8 Spot-generated Büchi/generalized-Büchi/Rabin/Streett/nondeterministic/state-acc automata, script included).scripts/checknow also builds the benches.Cheaperrors): 6.7×. Chumsky's expected-token bookkeeping for failed alternatives was ~22 % of the time although no error occurs.EmptyErr, re-parse withRichonly on failure) andchoice.&str, every token parser skips trailing whitespace/nested comments (smallcustomparser).lexer.rsremains for splitting multi-automaton files and for classifying failures (lexical error /--ABORT--).verify()sorts ids instead ofVec::contains(+ test with an unsorted body).alias_iter(),get_version() -> Option<&str>, exact-size merge of acceptance, no per-parse timing calls.Also:
round_trip_fixture_filesnow walkshoa/recursively.Behaviour changes to review
parser()functions are public and now have chumsky 0.13 /&strtypes;Header::get_versionreturnsOption<&str>.[0 &]reports expected'1', '2', … '!', '@', '('instead of token names); locations are unchanged. Lexical errors report the offending character but no longer a list of expected tokens. "Unclosed delimiter" reports are gone (Richhas no such variant).parse_hoa_automatarefer to the text of the single automaton, not the whole file.lexer.rsgrammar is now a second copy of the token grammar (used only for splitting/diagnosis); a future change to token syntax must touch both. Folding the splitting into the fused parser would remove it.Verification
./scripts/check(fmt, clippy-D warnings, doc, benches compile, 45 tests) passes. Instruction counts are reproducible; wall-clock numbers are from one machine. Not done:automata'sautomata-bench comparewith a patchedhoars(CLAUDE.md describes how), and nowritemeasurement at 200k after the changes.