Skip to content

API cleanup: errors, state acceptance, Header/Body, helpers, dead code (issues 14-18) - #14

Merged
leonbohn merged 5 commits into
mainfrom
api
Nov 6, 2026
Merged

leonbohn merged 5 commits into
mainfrom
api

Conversation

@leonbohn

@leonbohn leonbohn commented Nov 6, 2026

Copy link
Copy Markdown
Owner

Implements REFACTOR.md issues 14-18, one commit each. All are breaking (see CHANGELOG.md).

  • 14: FromHoaError implements std::error::Error, no ANSI codes in Display, structured Diagnostics (span, expected, found), FromHoaError::render(src, color); unused variants removed.
  • 15: state acceptance stays on State and is written back on the State: line; Edge::effective_acceptance(&State) gives the merged, sorted, deduplicated view.
  • 16: Header is a validated struct with O(1) accessors (input order is not kept, see changelog); Body is sorted, no DerefMut.
  • 17: parity(0) is f, atom removed, docs fixed, tests for parity(0|1|4).
  • 18: removed interpretation.rs, lazy_static, HoaRepr/HoaSymbol/HoaAlphabet, Alphabet; MAX_APS deprecated (used by automata); Start: needs a state; missing_docs enabled.

./scripts/check passes.

automata (hoa feature) needs adapting: Header::iter() -> acceptance()/acceptance_name_info() (tested in a scratch copy), and edge acceptance now needs Edge::effective_acceptance for state-acceptance files. It also already fails on MAX_APS being u8 vs num_aps u16, independent of this PR.

@leonbohn
leonbohn merged commit b611239 into main Nov 6, 2026
3 checks passed
@leonbohn
leonbohn deleted the api branch November 6, 2026 13:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant