21 lines
1.1 KiB
Markdown
21 lines
1.1 KiB
Markdown
# Architecture
|
|
|
|
The framework-independent engine applies a deterministic sequence of reductions:
|
|
normalization, structure-aware JSON/XML candidates, line chunks, lexical-token
|
|
chunks, and Unicode code-point chunks. Every smaller candidate must independently
|
|
satisfy the async predicate before it replaces the current result. Candidate
|
|
outcomes are memoized, accepted transitions are recorded, and an AbortSignal,
|
|
test budget, and deadline are checked throughout.
|
|
|
|
JSON candidates are parsed with depth/node/key limits. XML rejects DOCTYPE and
|
|
is manipulated as inert DOM nodes. The focused JSON Schema validator returns a
|
|
stable first-issue signature. Regex work runs in a disposable module worker; a
|
|
non-returning expression causes worker termination. Restricted XSLT evaluation
|
|
uses the browser API on the main thread, so it has smaller source/test limits and
|
|
explicitly rejects resource-loading constructs.
|
|
|
|
Limits are 2 MiB input, 2,000 predicate tests, 30 seconds per run, 100,000 JSON
|
|
nodes, 128 KiB XSLT, 200 XSLT tests, and at most one second of regex worker time.
|
|
The engine reports budget exhaustion instead of claiming a globally minimal
|
|
result.
|