You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The fork maintains a separate full-context start state and incrementally follows
caller return states through context edges before taking the next token edge.
It is disabled by default because retained states, configurations, and contexts
can grow substantially.
Applicability
Applicable. The Rust runtime already performs full-context prediction and
owns compact learned-DFA/context storage, but its ParserDfa
contains only SLL token edges plus local/precedence start states. The adaptive_predict_full_context
path rebuilds and simulates LL configurations rather than learning
caller-context edges.
#207 added a narrower bounded replay memo for predicate-free full-context
resolutions. A full-context DFA is complementary: it can retain intermediate LL
states and context transitions, and it should be evaluated as an opt-in
alternative rather than silently duplicating both caches.
This is source-level applicability research only; no speedup is claimed without
future measurement.
Proposed work
Add an opt-in, default-off full-context DFA mode.
Represent full-context start states and caller-context edges with compact IDs
in the existing hot/cold DFA architecture; do not introduce per-state object
maps.
Consume interned caller return states incrementally, matching the fork's
context-symbol/context-edge model.
Define bounded retention and expose state/context-edge memory statistics.
Source
Tunnel Vision's optimized fork can cache full-context (LL) prediction in the
decision DFA, not only local-context (SLL) prediction:
enable_global_context_dfaand its memory warningDFAStatecontext symbols and context-edge mapThe fork maintains a separate full-context start state and incrementally follows
caller return states through context edges before taking the next token edge.
It is disabled by default because retained states, configurations, and contexts
can grow substantially.
Applicability
Applicable. The Rust runtime already performs full-context prediction and
owns compact learned-DFA/context storage, but its
ParserDfacontains only SLL token edges plus local/precedence start states. The
adaptive_predict_full_contextpath rebuilds and simulates LL configurations rather than learning
caller-context edges.
#207 added a narrower bounded replay memo for predicate-free full-context
resolutions. A full-context DFA is complementary: it can retain intermediate LL
states and context transitions, and it should be evaluated as an opt-in
alternative rather than silently duplicating both caches.
This is source-level applicability research only; no speedup is claimed without
future measurement.
Proposed work
in the existing hot/cold DFA architecture; do not introduce per-state object
maps.
context-symbol/context-edge model.
bound, or replace it, but do not retain two unaccounted caches for the same
work.
import/remapping, and
clear_dfa()behavior.Acceptance criteria
without re-running the complete LL closure.
cannot alias.
ContextIdownership invariants.