refactor: modernize Morse Tree Decoder - #1
Merged
Merged
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.
Summary
Incrementally modernize the original 2019 C project without replacing its
file-backed binary trie algorithm. Preserve dot-left/dash-right traversal,
standard-input decoding,
/word separators, and optional preorder output whilemaking the project easier to build, understand, and verify.
Changes
into English-named directories, with a root Makefile and consistent formatting.
with explicit ownership, status returns, and relevant English comments.
test, sanitizer, coverage, and static-analysis profiles.
uniqueness, codes, bytes, CLI options, allocation failures, and stream errors.
--helpand--print-tree, retaining the original-aflag.static analysis, and coverage, with read-only permissions and SHA-pinned checkout.
in English, including a new partial-trie diagram and executable README examples.
Intentional behavior changes
the final message.
and an unterminated final line. Spaces and tabs delimit tokens.
bytes fail with English diagnostics instead of being ignored or interpreted unsafely.
already have been emitted, following the documented streaming contract.
Historical evidence
The original report and tree image are preserved byte-for-byte, and the original
mapping/output fixtures remain archived separately from corrected expectations.
The unchanged report input reproduces
OS MEDOS QUEwith the original table andOS NETOS QIEwith international mappings. Neither output nor benchmark measurementswere recorded in the 2019 report; these outputs were reproduced during modernization.
Local verification
2,296 fault-injection checks, and 77 CLI cases passed.
2,592 ordered-character-pair/separator combinations.
with complete project-owned-memory cleanup verified.
executable lines, 242 branches, and 24 functions.
relative links, SVG mappings/edges, workflow timeouts, and archival hashes passed.
These are local results, not a hosted CI status or proof for all unbounded inputs.
Hosted CI must be confirmed after pushing the completed branch.
Scope and follow-up
The supported alphabet remains uppercase
A-Zand digits0-9. This change doesnot add encoding, audio, punctuation, lowercase, a GUI, or a legacy decoding mode.
The executable remains
morse. Repository renaming tomorse-tree-decoderandremote repointing are deferred until after the reviewed branch is merged/closed.