Work log
Published September 22, 2026
ECMAScript
The ECMAScript research domain of Frontend Analysis focuses on representing JavaScript semantics as explicit, evidence-backed facts suitable for reliable frontend analysis.
The objective is not merely to parse JavaScript source code or reproduce a conventional AST.
Instead, FA investigates which ECMAScript facts must remain observable so that downstream analysis can reason about declarations, bindings, expressions, static semantics, authored source correspondence, and interactions with other frontend domains.
Primary research areas include:
- declarations and bindings
- expression semantics
- static semantics
- Early Errors
- statement and Block behavior
- Automatic Semicolon Insertion
- source correspondence
- contributor ordering
- authored occurrence preservation
- semantic ownership
- cross-domain interaction with HTML and CSS
A central principle is the distinction between authored syntax and the semantic facts derived from that syntax.
For example, an authored declaration may contribute:
- a declared name
- a source occurrence
- an initializer
- a surrounding-scope semantic effect
- a static-semantic conflict
- one or more downstream semantic contributors
These facts do not necessarily require preserving the complete syntax tree that produced them.
FA therefore avoids assuming that a general-purpose ECMAScript AST is the correct production representation.
Instead, each capability is investigated independently.
The research asks questions such as:
- What semantic fact is being observed?
- Which authored source occurrence produced it?
- Which component owns the fact?
- Does source order matter?
- Do duplicate occurrences matter?
- Does the surrounding syntactic context alter the result?
- Can an independent oracle derive the expected behavior?
- Which counterexamples would falsify the proposed representation?
- What information is actually required by downstream consumers?
The current ECMAScript research lineage has progressed through deliberately bounded capabilities including:
- top-level
var - one-level Block-contained
var - 1..N authored declarators
- declaration-name propagation
- source-name correspondence
- decimal integer initializers
- fractional DecimalLiteral forms
- exponent DecimalLiteral forms
- Boolean literals
nullthis- String literals
- direct IdentifierReference
- escaped non-reserved IdentifierReference
- unary
+and- - bounded two-IdentifierReference additive expressions
- limited ASI behavior
Each widening step is treated as a research question rather than as an automatic extension of parser coverage.
The intended workflow remains falsification-first:
ECMAScript authority → bounded semantic question → independent oracle → positive and negative witnesses → attempted falsification → accepted evidence → production representation → regression coverage → next research frontier
Production behavior is not treated as normative authority.
Where practical, expected semantics are derived independently so that production implementation can be tested against an externalized expectation rather than against itself.
Representations also remain intentionally narrow.
If a consumer only requires one or two semantic contributors, FA does not automatically widen that representation into an arbitrary expression tree or unbounded collection.
Additional structure is introduced only when accepted evidence demonstrates that it is required.
The long-term goal of the ECMAScript domain is to provide trustworthy semantic facts for higher-level frontend analysis, including:
- debugging
- refactoring
- migration
- replacement analysis
- dependency reasoning
- semantic comparison
- source transformation
- AI-assisted repository analysis
ECMAScript remains an independent research domain within Frontend Analysis.
Interactions with HTML and CSS should be introduced through explicit semantic boundaries so that ownership, provenance, and evidence remain traceable across the frontend platform.
#ECMAScript #FrontendAnalysis #JavaScript #StaticAnalysis #Rust #Research