Changelog
View SourceAll notable changes to this project are documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
0.3.0 - 2026-08-12
Fixed
from_list/2silently dropped the empty word:DawgEx.from_list([""])built a DAWG that answeredmember?(dawg, "")withfalse. The empty word is now a valid entry that costs no edges.- Internal
DawgEx.Buildertypespecs drifted from the runtime values:stack()described a frame's third element as a list of nested stacks where it holds the node's accumulated child edges (now[edge()]), andt()described a bare map that its required associations kept the%DawgEx.Builder{}struct — and the initial emptyregister/nodesmaps — from inhabiting (now a struct type withoptional(...)keys). Typespec-only, no behavior change.
Changed
- Breaking: the header now mirrors an edge's shape and is incompatible
with binaries built by 0.2.0. The root offset spends
offset_widthbits instead ofoffset_width + 2, and the two freed bits carry flags —<<offset_width::8, root_offset::size(offset_width), empty?::1, 0::1>>— whereempty?records whether the empty word is a member and the final bit is always clear.
0.2.0 - 2026-08-11
Changed
- Breaking: the binary encoding is denser and incompatible with binaries
built by 0.1.0. An edge's two flag bits are packed into the same bytes as
its child offset instead of a padded trailing byte, and all nodes without
outgoing edges share a single sentinel slot at offset 0 rather than each
occupying a placeholder edge. Consequently
offset_widthmust now satisfyrem(offset_width + 2, 8) == 0(6, 14, 22, …) instead of being a multiple of 8, and the default is 14 — 3 bytes per edge with room for 16_384 edges, down from 16 — 4 bytes per edge with room for 65_536.
0.1.0 - 2026-08-11
Added
DawgEx.from_list/2— builds a minimal DAWG from a list of binaries and encodes it as a flat binary. Takes an optionaloffset_width(a positive multiple of 8, defaulting to 16) that sets how many bits each edge spends addressing its child, trading encoded size against the number of edges the automaton can hold. RaisesArgumentErrorrather than emitting a binary whose offsets wrap when the width is too narrow for the word list.DawgEx.member?/2— set-membership query directly against the encoded binary, with no intermediate decoding step. Reads the offset width from the binary's header, so the build-time width does not have to be threaded back in.