Repository navigation
Conversation
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.
Works through items 5–10 of the refactor list (the P1 "valid HOA that is rejected" group plus lexer/header validation). One commit per item;
./scripts/checkpasses after each.Changes
HeaderItem::Unknown(name, Vec<UnknownValue>)instead of failing, and written back out. Uppercase unknown names log atracingwarning. Header names may contain.(e.g.spot.state-player).properties:/acc-name:: newProperty::OtherandAcceptanceName::Other.TryFrom<String>became an infallibleFrom<String>(breaking).AbstractLabelExpression::Alias,@namein labels and aliases, andHoaRepresentation::unalias(recursive, detects undefined and cyclic aliases, leaves the automaton untouched on error). Parsing does not unalias; BDD conversion of an unresolved alias returns an error.2^|AP|edges; a state label is copied onto its edges; mixing labelled and unlabelled edges is an error. These parse to the sameHoaRepresentationas the explicit form. Label resolution happens in theHoaRepresentationparser, where the AP count is known.\"and\\decoded, other escapes kept verbatim), nested comments, and--ABORT--lexes asToken::Abort.Token::Boolremoved. Abort handling is token-based:from_hoa,parse_hoa_automataandfirst_automaton_split_positionno longer match substrings, so--ABORT--inside a string orfoo--ABORT--are not aborts, and a valid automaton after an aborted one in the same chunk is returned.HoaRepresentation::validate(run by the parser) withFromHoaError::Invalid(ValidationError). It checks the version (v1,v1.x; otherwiseUnsupportedVersion), a missingAcceptance:, header multiplicities, and state, acceptance-set and AP indices against their declared counts.Notes
CHANGELOG.mdis updated.parse_hoa_automatanow yields no automata at all (previously each--END--chunk was lexed separately).validatereturns the first violation only.