# logicaffeine_language > The LOGOS front end: English sentences to first-order logic, and the parser for LOGOS programs and LGX pages Every public module and item of `logicaffeine_language`, module by module, each with its one-line summary and its address. Item pages hold the full signature, documentation, trait implementations and a link to the source. - Crate page: [logicaffeine_language](https://docs.logicaffeine.com/logicaffeine_language/) - All items on one page: [logicaffeine_language/all](https://docs.logicaffeine.com/logicaffeine_language/all) - Source: [src/logicaffeine_language/lib.rs](https://docs.logicaffeine.com/src/logicaffeine_language/lib.rs) - Every crate: [llms.txt](https://docs.logicaffeine.com/llms.txt) ## logicaffeine_language - [mod analysis](https://docs.logicaffeine.com/logicaffeine_language/analysis/): Static analysis passes for type and policy discovery. - [mod arena](https://docs.logicaffeine.com/logicaffeine_language/arena/) - [mod arena_ctx](https://docs.logicaffeine.com/logicaffeine_language/arena_ctx/): Arena context for AST allocation. - [mod ast](https://docs.logicaffeine.com/logicaffeine_language/ast/): Abstract Syntax Tree types for both logical expressions and imperative statements. - [mod ast_depth](https://docs.logicaffeine.com/logicaffeine_language/ast_depth/): The AST depth gate — “parsed ⇒ bounded”. - [mod ast_map](https://docs.logicaffeine.com/logicaffeine_language/ast_map/): An exhaustive, rebuilding traversal of the imperative AST. - [mod compile](https://docs.logicaffeine.com/logicaffeine_language/compile/): Compilation API - [mod debug](https://docs.logicaffeine.com/logicaffeine_language/debug/): Debug display utilities for AST types with interner access. - [mod diagnostic](https://docs.logicaffeine.com/logicaffeine_language/diagnostic/): The canonical machine-readable diagnostic surface: `logos-diagnostic/1`. - [mod drs](https://docs.logicaffeine.com/logicaffeine_language/drs/): Discourse Representation Structure (DRS) for anaphora resolution and scope tracking. - [mod error](https://docs.logicaffeine.com/logicaffeine_language/error/): Error types and display formatting for parse errors. - [mod formatter](https://docs.logicaffeine.com/logicaffeine_language/formatter/): Output formatters for logical expressions. - [mod import_format](https://docs.logicaffeine.com/logicaffeine_language/import_format/): Canonical formatting of a module’s `Import` statements — the pit-of-success default so import blocks never need manual bikeshedding. - [mod intern](https://docs.logicaffeine.com/logicaffeine_language/intern/) - [mod lambda](https://docs.logicaffeine.com/logicaffeine_language/lambda/): Lambda calculus transformations for Montague-style compositional semantics. - [mod lexer](https://docs.logicaffeine.com/logicaffeine_language/lexer/): Two-stage lexer for LOGOS natural language input. - [mod lexicon](https://docs.logicaffeine.com/logicaffeine_language/lexicon/): Lexicon: Vocabulary lookup functions - [mod lgx](https://docs.logicaffeine.com/logicaffeine_language/lgx/): LGX — the LOGOS web framework’s template layer: real HTML with Jinja-style `{…}` tags, component-scoped CSS, and the structural checks a template needs before any LOGOS expression inside it is parsed. - [mod lint](https://docs.logicaffeine.com/logicaffeine_language/lint/): The value-semantics copy lint. - [mod mwe](https://docs.logicaffeine.com/logicaffeine_language/mwe/): Multi-Word Expression (MWE) processing. - [mod ontology](https://docs.logicaffeine.com/logicaffeine_language/ontology/): Ontology module for bridging anaphora and sort compatibility checking. - [mod optimization](https://docs.logicaffeine.com/logicaffeine_language/optimization/): The registry of compiler optimization toggles. - [mod parser](https://docs.logicaffeine.com/logicaffeine_language/parser/): Recursive descent parser for natural language to first-order logic. - [mod pragmatics](https://docs.logicaffeine.com/logicaffeine_language/pragmatics/): Post-parse pragmatic inference transformations. - [mod printer](https://docs.logicaffeine.com/logicaffeine_language/printer/): English rendering of imperative expressions — the shared surface behind power-assert failure messages, property counterexamples, and mutation survivor reports. - [mod proof_convert](https://docs.logicaffeine.com/logicaffeine_language/proof_convert/): Conversion from parser AST to proof engine representation. - [mod registry](https://docs.logicaffeine.com/logicaffeine_language/registry/): Symbol registry for consistent variable naming in FOL output. - [mod runtime_lexicon](https://docs.logicaffeine.com/logicaffeine_language/runtime_lexicon/): Runtime JSON-based lexicon loading (requires `dynamic-lexicon` feature). - [mod scope](https://docs.logicaffeine.com/logicaffeine_language/scope/): Scope stack for variable binding during code generation. - [mod semantics](https://docs.logicaffeine.com/logicaffeine_language/semantics/): Semantic transformations for logical expressions. - [mod session](https://docs.logicaffeine.com/logicaffeine_language/session/): Session Manager for Incremental Evaluation - [mod source_format](https://docs.logicaffeine.com/logicaffeine_language/source_format/): The canonical LOGOS source formatter. - [mod style](https://docs.logicaffeine.com/logicaffeine_language/style/): ANSI terminal color styling for error messages. - [mod suggest](https://docs.logicaffeine.com/logicaffeine_language/suggest/): Spelling suggestions for unknown words. - [mod symbol_dict](https://docs.logicaffeine.com/logicaffeine_language/symbol_dict/): Symbol Dictionary Extraction - [mod teach](https://docs.logicaffeine.com/logicaffeine_language/teach/): The lesson table for LOGOS constructs: every lesson a surface shows (LSP hover, completion documentation, the REPL’s `:explain`) comes from this table, so the editor and the terminal always teach the same thing. - [mod token](https://docs.logicaffeine.com/logicaffeine_language/token/): Token types for the LOGOS lexer and parser. - [mod token_class](https://docs.logicaffeine.com/logicaffeine_language/token_class/): How LOGOS tokens are classified for highlighting: parts of speech are the syntax — verbs paint as functions, nouns as types, adjectives as modifiers. Every highlighting surface (LSP semantic tokens, the terminal REPL, any future renderer) derives its colors from this mapping, so they can never disagree. - [mod transpile](https://docs.logicaffeine.com/logicaffeine_language/transpile/): Transpilation from AST to first-order logic notation. - [mod view](https://docs.logicaffeine.com/logicaffeine_language/view/): Owned view types for AST serialization and display. - [mod visitor](https://docs.logicaffeine.com/logicaffeine_language/visitor/): AST visitor pattern for traversing logical expressions. - [struct Arena](https://docs.logicaffeine.com/logicaffeine_language/struct.Arena): An owning arena for stable references. - [struct BaseSpan](https://docs.logicaffeine.com/logicaffeine_language/struct.BaseSpan): A byte-offset range in source text. - [struct CompileOptions](https://docs.logicaffeine.com/logicaffeine_language/struct.CompileOptions) - [struct Interner](https://docs.logicaffeine.com/logicaffeine_language/struct.Interner): A string interner providing O(1) equality comparison via `Symbol` handles. - [struct Symbol](https://docs.logicaffeine.com/logicaffeine_language/struct.Symbol): A lightweight handle to an interned string. - [struct TranspileContext](https://docs.logicaffeine.com/logicaffeine_language/struct.TranspileContext) - [enum Case](https://docs.logicaffeine.com/logicaffeine_language/enum.Case): Grammatical case (for pronouns). - [enum Gender](https://docs.logicaffeine.com/logicaffeine_language/enum.Gender): Grammatical gender (for pronouns and agreement). - [enum Number](https://docs.logicaffeine.com/logicaffeine_language/enum.Number): Grammatical number for nouns and agreement. - [enum OutputFormat](https://docs.logicaffeine.com/logicaffeine_language/enum.OutputFormat) - [trait SymbolEq](https://docs.logicaffeine.com/logicaffeine_language/trait.SymbolEq): Convenience trait for comparing a `Symbol` to a string literal. ## logicaffeine_language::analysis Static analysis passes for type and policy discovery. - [mod dependencies](https://docs.logicaffeine.com/logicaffeine_language/analysis/dependencies/): Dependency Scanner for the Hyperlink Module System. - [mod discovery](https://docs.logicaffeine.com/logicaffeine_language/analysis/discovery/): Discovery pass for type and policy extraction. - [mod policy](https://docs.logicaffeine.com/logicaffeine_language/analysis/policy/): Security Policy Registry. - [mod registry](https://docs.logicaffeine.com/logicaffeine_language/analysis/registry/): Type registry for tracking user-defined types during parsing. ## logicaffeine_language::analysis::dependencies Dependency Scanner for the Hyperlink Module System. - [struct Dependency](https://docs.logicaffeine.com/logicaffeine_language/analysis/dependencies/struct.Dependency): A dependency declaration found in the document’s abstract. - [struct SelectedName](https://docs.logicaffeine.com/logicaffeine_language/analysis/dependencies/struct.SelectedName): One name selected by a per-name import (`Import double as dbl from Util.`). - [fn first_section_header](https://docs.logicaffeine.com/logicaffeine_language/analysis/dependencies/fn.first_section_header): A file’s first `## ` section header outside a ``` fence, as its 1-based line and its text: the line above which an `Import` must stand to import anything. - [fn misplaced_imports](https://docs.logicaffeine.com/logicaffeine_language/analysis/dependencies/fn.misplaced_imports): Every `Import` sentence below a file’s first `## ` header, each with its byte span. That is where `scan_dependencies` does not read, so such a sentence imports nothing: the module is never spliced and the program runs on without it. A caller refuses each at its own line. A line inside a - [fn scan_dependencies](https://docs.logicaffeine.com/logicaffeine_language/analysis/dependencies/fn.scan_dependencies): Scans the first paragraph (Abstract) of a LOGOS file for `[Alias](URI)` links. ## logicaffeine_language::analysis::discovery Discovery pass for type and policy extraction. - [struct DiscoveryPass](https://docs.logicaffeine.com/logicaffeine_language/analysis/discovery/struct.DiscoveryPass): Discovery pass that scans tokens before main parsing to build a TypeRegistry. - [struct DiscoveryResult](https://docs.logicaffeine.com/logicaffeine_language/analysis/discovery/struct.DiscoveryResult): Result of running the discovery pass ## logicaffeine_language::analysis::policy Security Policy Registry. - [struct CapabilityDef](https://docs.logicaffeine.com/logicaffeine_language/analysis/policy/struct.CapabilityDef): A capability definition: `A User can publish the Document if...` - [struct PolicyRegistry](https://docs.logicaffeine.com/logicaffeine_language/analysis/policy/struct.PolicyRegistry): Registry for security policies defined in `## Policy` blocks. - [struct PredicateDef](https://docs.logicaffeine.com/logicaffeine_language/analysis/policy/struct.PredicateDef): A predicate definition: `A User is admin if the user's role equals "admin".` - [enum PolicyCondition](https://docs.logicaffeine.com/logicaffeine_language/analysis/policy/enum.PolicyCondition): Condition in a policy definition. Represents the predicate logic for security rules. ## logicaffeine_language::analysis::registry Type registry for tracking user-defined types during parsing. - [struct FieldDef](https://docs.logicaffeine.com/logicaffeine_language/analysis/registry/struct.FieldDef): Field definition within a struct - [struct TypeRegistry](https://docs.logicaffeine.com/logicaffeine_language/analysis/registry/struct.TypeRegistry) - [struct VariantDef](https://docs.logicaffeine.com/logicaffeine_language/analysis/registry/struct.VariantDef): Phase 33: Variant definition for sum types - [enum FieldType](https://docs.logicaffeine.com/logicaffeine_language/analysis/registry/enum.FieldType): Type reference for struct fields (avoids circular deps with ast::TypeExpr) - [enum TypeDef](https://docs.logicaffeine.com/logicaffeine_language/analysis/registry/enum.TypeDef) - [const BUILTIN_STRUCT_NAMES](https://docs.logicaffeine.com/logicaffeine_language/analysis/registry/constant.BUILTIN_STRUCT_NAMES): The structs the compiler hands to author code fully formed, rather than one an `## An X has:` declaration writes — the one list `TypeRegistry::with_primitives` registers them from and `TypeRegistry::is_builtin_struct` answers against, so a consumer never has to know their names itself. `crates/logicaffeine_compile/src/vm/wasm/kind.rs`’s `builtin_struct_types()` carries the same two shapes for the wasm backend’s own boundary-type resolution. - [fn builtin_generic_param_count](https://docs.logicaffeine.com/logicaffeine_language/analysis/registry/fn.builtin_generic_param_count): How many type parameters a BUILT-IN generic takes — the one table the whole compiler asks. ## logicaffeine_language::arena - [struct Arena](https://docs.logicaffeine.com/logicaffeine_language/arena/struct.Arena): An owning arena for stable references. ## logicaffeine_language::arena_ctx Arena context for AST allocation. - [struct AstContext](https://docs.logicaffeine.com/logicaffeine_language/arena_ctx/struct.AstContext): Collection of typed arenas for AST allocation during parsing. ## logicaffeine_language::ast Abstract Syntax Tree types for both logical expressions and imperative statements. - [mod axiom](https://docs.logicaffeine.com/logicaffeine_language/ast/axiom/): AST nodes for the formal-logic vernacular: `## Axiom` and `## Theory` blocks. - [mod component](https://docs.logicaffeine.com/logicaffeine_language/ast/component/): The LGX component model — the first-class AST for a page, a component, a store, and the sections they own: `State:` (the record), `Actions:` (the only mutators, plus the English event sentences that trigger them), `View:` (the template, already parsed into the view IR), and `Style:` (the component’s CSS). - [mod definition](https://docs.logicaffeine.com/logicaffeine_language/ast/definition/): `## Define` block AST — a vernacular-logic predicate definition (Rung 0a). - [mod logic](https://docs.logicaffeine.com/logicaffeine_language/ast/logic/): Logic expression AST types for first-order logic with modal and event extensions. - [mod stmt](https://docs.logicaffeine.com/logicaffeine_language/ast/stmt/): Imperative statement AST types for the LOGOS language. - [mod theorem](https://docs.logicaffeine.com/logicaffeine_language/ast/theorem/): Theorem and proof block AST types. - [mod view](https://docs.logicaffeine.com/logicaffeine_language/ast/view/): The LGX view IR — what a template PARSES INTO before anything is lowered. ## logicaffeine_language::ast::axiom AST nodes for the formal-logic vernacular: `## Axiom` and `## Theory` blocks. - [struct AxiomBlock](https://docs.logicaffeine.com/logicaffeine_language/ast/axiom/struct.AxiomBlock): A `## Axiom` block: a named first-order axiom in formal notation. - [struct TheoryBlock](https://docs.logicaffeine.com/logicaffeine_language/ast/axiom/struct.TheoryBlock): A `## Theory` block: a named development that groups the axioms and theorems that follow it (`## Theory Tarski`). Its body is the formal development text — a sequence of `Axiom …` and `Theorem …` declarations parsed downstream. ## logicaffeine_language::ast::component The LGX component model — the first-class AST for a page, a component, a store, and the sections they own: `State:` (the record), `Actions:` (the only mutators, plus the English event sentences that trigger them), `View:` (the template, already parsed into the view IR), and `Style:` (the component’s CSS). - [struct ActionDef](https://docs.logicaffeine.com/logicaffeine_language/ast/component/struct.ActionDef): `To name (params):` in `Actions:`. - [struct ComponentDef](https://docs.logicaffeine.com/logicaffeine_language/ast/component/struct.ComponentDef): One `## Page` / `## Component` / `## Store` / `## Error page` definition. - [struct EventHandler](https://docs.logicaffeine.com/logicaffeine_language/ast/component/struct.EventHandler) - [struct StateField](https://docs.logicaffeine.com/logicaffeine_language/ast/component/struct.StateField): `Let x be .` or `Let x always be .` (derived) in a `State:` section. - [struct StyleBlock](https://docs.logicaffeine.com/logicaffeine_language/ast/component/struct.StyleBlock): A `Style:` section: the dedented CSS text, the file offset of its first character, and the indentation stripped from each of its lines. - [enum ComponentKind](https://docs.logicaffeine.com/logicaffeine_language/ast/component/enum.ComponentKind) - [enum RouteBody](https://docs.logicaffeine.com/logicaffeine_language/ast/component/enum.RouteBody): A `## Route`’s body: ordinary statements, or a template for a `-> View` route. The template is boxed: a `ViewDef` inline would make every `Stmt` as wide as a view route. - [enum StoreMode](https://docs.logicaffeine.com/logicaffeine_language/ast/component/enum.StoreMode) - [enum Trigger](https://docs.logicaffeine.com/logicaffeine_language/ast/component/enum.Trigger): What an English `When …:` sentence in `Actions:` waits for. - [const RENDER_DEPTH_LIMIT](https://docs.logicaffeine.com/logicaffeine_language/ast/component/constant.RENDER_DEPTH_LIMIT): How deeply components may nest while one paint is drawn before the page is refused as one with no finite rendering (`render_depth_message`). - [const STORE_CASCADE_LIMIT](https://docs.logicaffeine.com/logicaffeine_language/ast/component/constant.STORE_CASCADE_LIMIT): How many rounds of `When 's changes:` may cascade — a watcher’s write waking a watcher, which wakes another — before the page is refused as one that never settles. Every tier counts the same rounds and says the same sentence (`store_cascade_message`). - [fn directive_failure_prefix](https://docs.logicaffeine.com/logicaffeine_language/ast/component/fn.directive_failure_prefix): What every tier puts in front of a trap inside a `## Directive`’s block (`removed`: its `When removed:` block): from the page’s side, the directive is what went wrong. - [fn render_depth_message](https://docs.logicaffeine.com/logicaffeine_language/ast/component/fn.render_depth_message): What every tier says when `component` is nested past `RENDER_DEPTH_LIMIT` while drawing. - [fn store_cascade_message](https://docs.logicaffeine.com/logicaffeine_language/ast/component/fn.store_cascade_message): What every tier says of a store-watcher cascade deeper than `STORE_CASCADE_LIMIT`. - [fn timer_period_not_positive](https://docs.logicaffeine.com/logicaffeine_language/ast/component/fn.timer_period_not_positive): What every tier says of a timer whose period, as its instance was drawn, is not positive. - [fn typed_fetch_refusal](https://docs.logicaffeine.com/logicaffeine_language/ast/component/fn.typed_fetch_refusal): What every tier says of `Get … as ` when the derived JSON codec cannot read `ty`: a typed request decodes its answer through `fromJson_` for a declared record, `fromJsonSeq_` for a list of records or scalars, and takes Text verbatim — nothing else. ## logicaffeine_language::ast::definition `## Define` block AST — a vernacular-logic predicate definition (Rung 0a). - [struct DefinitionBlock](https://docs.logicaffeine.com/logicaffeine_language/ast/definition/struct.DefinitionBlock): A `## Define` block: `(params) if and only if `. ## logicaffeine_language::ast::logic Logic expression AST types for first-order logic with modal and event extensions. - [struct CategoricalData](https://docs.logicaffeine.com/logicaffeine_language/ast/logic/struct.CategoricalData): Aristotelian categorical proposition data. - [struct ModalVector](https://docs.logicaffeine.com/logicaffeine_language/ast/logic/struct.ModalVector): Modal operator parameters for Kripke semantics (Kratzer-style). - [struct NeoEventData](https://docs.logicaffeine.com/logicaffeine_language/ast/logic/struct.NeoEventData): Neo-Davidsonian event structure with thematic roles. - [struct NounPhrase](https://docs.logicaffeine.com/logicaffeine_language/ast/logic/struct.NounPhrase): Parsed noun phrase structure for compositional interpretation. - [struct RelationData](https://docs.logicaffeine.com/logicaffeine_language/ast/logic/struct.RelationData): Simple subject-verb-object relation data. - [enum AspectOperator](https://docs.logicaffeine.com/logicaffeine_language/ast/logic/enum.AspectOperator): Grammatical aspect operators for event structure. - [enum BinaryOpKind](https://docs.logicaffeine.com/logicaffeine_language/ast/logic/enum.BinaryOpKind): Binary logical connectives. - [enum BinaryTemporalOp](https://docs.logicaffeine.com/logicaffeine_language/ast/logic/enum.BinaryTemporalOp): Binary temporal operators (LTL). - [enum ComparisonRelation](https://docs.logicaffeine.com/logicaffeine_language/ast/logic/enum.ComparisonRelation): Degree-comparison relation for `LogicExpr::Comparative`. - [enum Dimension](https://docs.logicaffeine.com/logicaffeine_language/ast/logic/enum.Dimension): Physical dimension for degree semantics and unit tracking. - [enum LogicExpr](https://docs.logicaffeine.com/logicaffeine_language/ast/logic/enum.LogicExpr): First-order logic expression with modal, temporal, and event extensions. - [enum LogicalType](https://docs.logicaffeine.com/logicaffeine_language/ast/logic/enum.LogicalType): Montague semantic types for compositional interpretation. - [enum ModalDomain](https://docs.logicaffeine.com/logicaffeine_language/ast/logic/enum.ModalDomain): Modal logic domain classification. - [enum ModalFlavor](https://docs.logicaffeine.com/logicaffeine_language/ast/logic/enum.ModalFlavor): Modal flavor affecting scope interpretation. - [enum NumberKind](https://docs.logicaffeine.com/logicaffeine_language/ast/logic/enum.NumberKind): Numeric literal representation for degree semantics. - [enum QuantifierKind](https://docs.logicaffeine.com/logicaffeine_language/ast/logic/enum.QuantifierKind): Quantifier types for first-order and generalized quantifiers. - [enum TemporalOperator](https://docs.logicaffeine.com/logicaffeine_language/ast/logic/enum.TemporalOperator): Temporal logic operators. - [enum Term](https://docs.logicaffeine.com/logicaffeine_language/ast/logic/enum.Term): First-order logic term representing entities or values. - [enum ThematicRole](https://docs.logicaffeine.com/logicaffeine_language/ast/logic/enum.ThematicRole): Neo-Davidsonian thematic roles for event semantics. - [enum UnaryOpKind](https://docs.logicaffeine.com/logicaffeine_language/ast/logic/enum.UnaryOpKind): Unary logical operators. - [enum VoiceOperator](https://docs.logicaffeine.com/logicaffeine_language/ast/logic/enum.VoiceOperator): Grammatical voice operators. ## logicaffeine_language::ast::stmt Imperative statement AST types for the LOGOS language. - [struct CaseTable](https://docs.logicaffeine.com/logicaffeine_language/ast/stmt/struct.CaseTable): A table-driven test’s case fixture: `For each of these cases:` followed by a markdown pipe table. Columns bind names in the test body’s scope; each data row is a named sub-test. - [struct FailureSite](https://docs.logicaffeine.com/logicaffeine_language/ast/stmt/struct.FailureSite): One entry in `Parser::failure_sites` — everything a runtime failure needs to point BACK at the sentence a `Stmt::Site` marker stood in front of. - [struct MatchArm](https://docs.logicaffeine.com/logicaffeine_language/ast/stmt/struct.MatchArm): Match arm for pattern matching in Inspect statements. - [struct SecurePad](https://docs.logicaffeine.com/logicaffeine_language/ast/stmt/struct.SecurePad): The `with pad "" as ` binding on a `Connect`/`Listen` — activate the PNP one-time-pad session over the pad file at `pad`, with this peer taking `role`. - [struct StmtId](https://docs.logicaffeine.com/logicaffeine_language/ast/stmt/struct.StmtId): A statement’s identity: where it lives. Stable for as long as the AST it was taken from is alive; a statement copied into a new block is a new identity. Diagnostics use it to name the exact statement a finding is about, nested ones included. - [struct TestCapabilities](https://docs.logicaffeine.com/logicaffeine_language/ast/stmt/struct.TestCapabilities): Which sealed-world resources a `## Test` may really touch, granted by capability sentences (`This test may use the real filesystem.`). Everything defaults to sealed; a granted capability moves the test to the `--live` set. - [enum BinaryOpKind](https://docs.logicaffeine.com/logicaffeine_language/ast/stmt/enum.BinaryOpKind): Binary operation kinds for imperative expressions. - [enum ClosureBody](https://docs.logicaffeine.com/logicaffeine_language/ast/stmt/enum.ClosureBody): Body of a closure expression. - [enum CompressionCodec](https://docs.logicaffeine.com/logicaffeine_language/ast/stmt/enum.CompressionCodec): The wire compression codec a `Send compressed [with ]` selects. The transpiler maps this to the runtime’s wire codec; bare `compressed` = `Deflate`. - [enum DomQuery](https://docs.logicaffeine.com/logicaffeine_language/ast/stmt/enum.DomQuery): What `the of ` asks the page. - [enum ExpectedOutput](https://docs.logicaffeine.com/logicaffeine_language/ast/stmt/enum.ExpectedOutput): Where an `Expect output:` snapshot lives: indented in the document, or in an external golden file (`Expect output as in "golden/report.txt".`). - [enum Expr](https://docs.logicaffeine.com/logicaffeine_language/ast/stmt/enum.Expr): Shared expression type for pure computations (LOGOS §15.0.0). - [enum FetchMethod](https://docs.logicaffeine.com/logicaffeine_language/ast/stmt/enum.FetchMethod): The HTTP method of a `Stmt::Fetch`. - [enum Literal](https://docs.logicaffeine.com/logicaffeine_language/ast/stmt/enum.Literal): Literal values in LOGOS. - [enum ObsCategory](https://docs.logicaffeine.com/logicaffeine_language/ast/stmt/enum.ObsCategory): The speech-act category of an observation statement: audience + retention, not a numeric level. - [enum Pattern](https://docs.logicaffeine.com/logicaffeine_language/ast/stmt/enum.Pattern): Pattern for loop variable binding. Supports single identifiers and tuple destructuring for Map iteration. - [enum PropDomain](https://docs.logicaffeine.com/logicaffeine_language/ast/stmt/enum.PropDomain): The domain a property quantifies over (`For all integers a and b:`). Generation draws from this; shrinking minimizes toward the domain’s zero. - [enum ReadSource](https://docs.logicaffeine.com/logicaffeine_language/ast/stmt/enum.ReadSource): Source for Read statements. - [enum Role](https://docs.logicaffeine.com/logicaffeine_language/ast/stmt/enum.Role): Which position a `UiStmt` may be written in — the partition `UiStmt::role` holds to, cross- checked against `action_verb_tier_lock`’s own census (which verbs compile inside `Actions:`) and `page_host::Drive` (which verbs carry a `## Main`/`## Test` statement to a page under test), so the two catalogues cannot silently drift apart. - [enum SecureRole](https://docs.logicaffeine.com/logicaffeine_language/ast/stmt/enum.SecureRole): Imperative statement AST (LOGOS §15.0.0). - [enum SelectBranch](https://docs.logicaffeine.com/logicaffeine_language/ast/stmt/enum.SelectBranch): A branch in a Select statement. - [enum SendLayout](https://docs.logicaffeine.com/logicaffeine_language/ast/stmt/enum.SendLayout): The wire LAYOUT a `Send` modifier picks — the size↔speed dial the sender chooses for their link. The transpiler maps this to the runtime’s numeric codec. The sender knows their use case; this lets them express it in one word. - [enum Stmt](https://docs.logicaffeine.com/logicaffeine_language/ast/stmt/enum.Stmt) - [enum StringPart](https://docs.logicaffeine.com/logicaffeine_language/ast/stmt/enum.StringPart): A segment of an interpolated string. - [enum TypeExpr](https://docs.logicaffeine.com/logicaffeine_language/ast/stmt/enum.TypeExpr): Type expression for explicit type annotations. - [enum UiStmt](https://docs.logicaffeine.com/logicaffeine_language/ast/stmt/enum.UiStmt): What a component action can do to the page, the browser, storage or a store. Each is a sentence in the `Actions:` vocabulary; the selector forms take a selector TEXT or an `Element`. - [enum ZoneSource](https://docs.logicaffeine.com/logicaffeine_language/ast/stmt/enum.ZoneSource): Backing-file source for a memory-mapped zone (`… mapped from `). `Inside a zone called "D" mapped from "f.bin"` is `ZoneSource::Literal`; `… mapped from path` (a runtime `Text` variable) is `ZoneSource::Variable`. - [type Block](https://docs.logicaffeine.com/logicaffeine_language/ast/stmt/type.Block): Block is a sequence of statements. ## logicaffeine_language::ast::theorem Theorem and proof block AST types. - [struct TheoremBlock](https://docs.logicaffeine.com/logicaffeine_language/ast/theorem/struct.TheoremBlock): A theorem block containing premises, goal, and proof strategy. - [enum ProofStrategy](https://docs.logicaffeine.com/logicaffeine_language/ast/theorem/enum.ProofStrategy): Proof strategies for theorem verification. ## logicaffeine_language::ast::view The LGX view IR — what a template PARSES INTO before anything is lowered. - [mod duplicate_keyed_loop_message_parts](https://docs.logicaffeine.com/logicaffeine_language/ast/view/duplicate_keyed_loop_message_parts/): The literal segments of `duplicate_keyed_loop_message`, PUBLIC so a compiled tier’s own lowering of `Each` can build the identical text out of runtime `Expr`s (string concatenation, `loop_desc` baked in as a literal since it is known at lowering time; `key`/the two positions are not) without a second, hand-copied version of the wording that could drift from this one. - [struct ViewArm](https://docs.logicaffeine.com/logicaffeine_language/ast/view/struct.ViewArm): One `{when Pattern:}` arm of a view `{inspect …:}`. - [struct ViewDef](https://docs.logicaffeine.com/logicaffeine_language/ast/view/struct.ViewDef): One complete view: a `Render:` block, a `Render into :` block, or a component’s `View:` — in source order they appear in `crate::parser::Parser::views`. - [enum Attr](https://docs.logicaffeine.com/logicaffeine_language/ast/view/enum.Attr): One attribute-position item of an element, in source order. - [enum BoundInput](https://docs.logicaffeine.com/logicaffeine_language/ast/view/enum.BoundInput): What a `bind={field}` on an element actually WRITES — the one place the whole language decides, so no two walks can disagree about a checkbox. - [enum ViewNode](https://docs.logicaffeine.com/logicaffeine_language/ast/view/enum.ViewNode): One node of a view tree. - [enum ViewRoot](https://docs.logicaffeine.com/logicaffeine_language/ast/view/enum.ViewRoot): The render target of a `ViewDef`. - [const LOOP_INDEX_BASE](https://docs.logicaffeine.com/logicaffeine_language/ast/view/constant.LOOP_INDEX_BASE): The position `{for each x in xs, at index i:}` gives the first item. - [fn bound_input_kind](https://docs.logicaffeine.com/logicaffeine_language/ast/view/fn.bound_input_kind): Decide, from an element’s TAG and attributes, what a `bind` on it writes. See `BoundInput`. - [fn duplicate_keyed_loop_message](https://docs.logicaffeine.com/logicaffeine_language/ast/view/fn.duplicate_keyed_loop_message): The message a `keyed by` loop whose siblings share a key fails with — the SAME wording on every tier, because the lowering of `Each` builds it at run time from the segments this function formats (`duplicate_keyed_loop_message_parts`). `loop_desc` names what is being iterated (`expr_shape` on the loop’s own `iterable`, e.g. `"todos"`); `key` is the colliding key’s own display value (its evaluated VALUE, not source text — two items collide on what a key IS, at runtime, never on how it was spelled). - [fn expr_shape](https://docs.logicaffeine.com/logicaffeine_language/ast/view/fn.expr_shape): A compact expression rendering for shapes: literals verbatim, identifiers by name, calls as `f(args)`, field access as `a's b`, interpolation with `{…}` holes; anything else prints as `_`. ## logicaffeine_language::ast::view::duplicate_keyed_loop_message_parts The literal segments of `duplicate_keyed_loop_message`, PUBLIC so a compiled tier’s own lowering of `Each` can build the identical text out of runtime `Expr`s (string concatenation, `loop_desc` baked in as a literal since it is known at lowering time; `key`/the two positions are not) without a second, hand-copied version of the wording that could drift from this one. - [const AFTER_FIRST_POSITION](https://docs.logicaffeine.com/logicaffeine_language/ast/view/duplicate_keyed_loop_message_parts/constant.AFTER_FIRST_POSITION) - [const AFTER_LOOP_DESC](https://docs.logicaffeine.com/logicaffeine_language/ast/view/duplicate_keyed_loop_message_parts/constant.AFTER_LOOP_DESC) - [const AFTER_SECOND_POSITION](https://docs.logicaffeine.com/logicaffeine_language/ast/view/duplicate_keyed_loop_message_parts/constant.AFTER_SECOND_POSITION) - [const PREFIX](https://docs.logicaffeine.com/logicaffeine_language/ast/view/duplicate_keyed_loop_message_parts/constant.PREFIX) - [const SUFFIX](https://docs.logicaffeine.com/logicaffeine_language/ast/view/duplicate_keyed_loop_message_parts/constant.SUFFIX) ## logicaffeine_language::ast_depth The AST depth gate — “parsed ⇒ bounded”. - [enum Visited](https://docs.logicaffeine.com/logicaffeine_language/ast_depth/enum.Visited): A node `for_each_node` hands its visitor. - [enum Walk](https://docs.logicaffeine.com/logicaffeine_language/ast_depth/enum.Walk): Whether a `walk_nodes` visitor goes on into the children of the node it was handed. - [const DEFAULT_MAX_AST_DEPTH](https://docs.logicaffeine.com/logicaffeine_language/ast_depth/constant.DEFAULT_MAX_AST_DEPTH): The DEFAULT maximum AST nesting depth. - [const MIN_AST_DEPTH](https://docs.logicaffeine.com/logicaffeine_language/ast_depth/constant.MIN_AST_DEPTH): The smallest limit the override accepts — below this, ordinary programs stop parsing. - [fn expr_children](https://docs.logicaffeine.com/logicaffeine_language/ast_depth/fn.expr_children): The expressions an expression evaluates directly — its operands, arguments, elements — in the same exhaustive enumeration the depth gate walks. A closure’s body is not among them: it runs when the closure is called, not when the closure expression is evaluated. - [fn for_each_node](https://docs.logicaffeine.com/logicaffeine_language/ast_depth/fn.for_each_node): Visit every statement and expression in `stmts`, each once — the same exhaustive child enumeration the depth gate walks, so a new variant’s children are reached here the moment the gate reaches them. Iterative, like the gate: visiting must never be what overflows. - [fn limit_from](https://docs.logicaffeine.com/logicaffeine_language/ast_depth/fn.limit_from): Pure resolution of the override value (unit-testable without touching process environment): a parseable value is clamped to at least `MIN_AST_DEPTH`; anything else falls back to the default. - [fn max_ast_depth](https://docs.logicaffeine.com/logicaffeine_language/ast_depth/fn.max_ast_depth): The EFFECTIVE depth limit: `DEFAULT_MAX_AST_DEPTH` unless the `LOGOS_MAX_AST_DEPTH` environment variable overrides it. - [fn max_parse_recursion](https://docs.logicaffeine.com/logicaffeine_language/ast_depth/fn.max_parse_recursion): The parse-time recursion budget: an EIGHTH of the AST limit (min the floor). - [fn program_depth](https://docs.logicaffeine.com/logicaffeine_language/ast_depth/fn.program_depth): Measure the maximum nesting depth of a parsed program, iteratively. - [fn stmt_expr_children](https://docs.logicaffeine.com/logicaffeine_language/ast_depth/fn.stmt_expr_children): The expressions a statement evaluates directly (its value, condition, target, arguments — not the statements of its nested blocks). - [fn validate_program_depth](https://docs.logicaffeine.com/logicaffeine_language/ast_depth/fn.validate_program_depth): Validate a parsed program against the effective limit (`max_ast_depth`). - [fn walk_nodes](https://docs.logicaffeine.com/logicaffeine_language/ast_depth/fn.walk_nodes): `for_each_node`, with the visitor answering for each statement and expression whether the walk goes on into its children. Exhaustive in the same way: a child is left unvisited only because a visitor said so, never because the walk does not know the kind of node it is in. ## logicaffeine_language::ast_map An exhaustive, rebuilding traversal of the imperative AST. - [struct Arenas](https://docs.logicaffeine.com/logicaffeine_language/ast_map/struct.Arenas): Where a rewriting pass allocates the nodes it builds. - [trait AstMap](https://docs.logicaffeine.com/logicaffeine_language/ast_map/trait.AstMap): A rewriting pass over the imperative AST. Each hook’s default rebuilds the node from its mapped children. - [fn walk_arm](https://docs.logicaffeine.com/logicaffeine_language/ast_map/fn.walk_arm) - [fn walk_block](https://docs.logicaffeine.com/logicaffeine_language/ast_map/fn.walk_block) - [fn walk_expr](https://docs.logicaffeine.com/logicaffeine_language/ast_map/fn.walk_expr) - [fn walk_stmt](https://docs.logicaffeine.com/logicaffeine_language/ast_map/fn.walk_stmt) - [fn walk_type](https://docs.logicaffeine.com/logicaffeine_language/ast_map/fn.walk_type) ## logicaffeine_language::compile Compilation API - [const MAX_FOREST_READINGS](https://docs.logicaffeine.com/logicaffeine_language/compile/constant.MAX_FOREST_READINGS): Maximum number of readings in a parse forest. Prevents exponential blowup from ambiguous sentences. - [fn compile](https://docs.logicaffeine.com/logicaffeine_language/compile/fn.compile): Compile natural language input to first-order logic with default options. - [fn compile_all_scopes](https://docs.logicaffeine.com/logicaffeine_language/compile/fn.compile_all_scopes): Returns all possible scope readings for a sentence. For sentences with multiple quantifiers, this returns all permutations. Example: “Every woman loves a man” returns both: - [fn compile_all_scopes_with_options](https://docs.logicaffeine.com/logicaffeine_language/compile/fn.compile_all_scopes_with_options): Returns all scope readings with specified output format. - [fn compile_ambiguous](https://docs.logicaffeine.com/logicaffeine_language/compile/fn.compile_ambiguous): Compile with PP attachment ambiguity detection. Returns multiple readings if structural ambiguity exists. - [fn compile_ambiguous_with_options](https://docs.logicaffeine.com/logicaffeine_language/compile/fn.compile_ambiguous_with_options): Compile with PP attachment ambiguity detection and specified options. - [fn compile_discourse](https://docs.logicaffeine.com/logicaffeine_language/compile/fn.compile_discourse): Compile multiple sentences as a discourse, tracking temporal ordering. - [fn compile_discourse_with_options](https://docs.logicaffeine.com/logicaffeine_language/compile/fn.compile_discourse_with_options): Compile multiple sentences as a discourse with specified options. - [fn compile_forest](https://docs.logicaffeine.com/logicaffeine_language/compile/fn.compile_forest): Compile natural language input, producing all valid parse readings. Handles lexical ambiguity (Noun/Verb) and structural ambiguity (PP attachment). - [fn compile_forest_with_options](https://docs.logicaffeine.com/logicaffeine_language/compile/fn.compile_forest_with_options): Compile natural language input with options, producing all valid parse readings. - [fn compile_kripke](https://docs.logicaffeine.com/logicaffeine_language/compile/fn.compile_kripke): Compile with Kripke semantics lowering. Modal operators are transformed into explicit possible world quantification. - [fn compile_kripke_with](https://docs.logicaffeine.com/logicaffeine_language/compile/fn.compile_kripke_with): Compile to Kripke-lowered FOL and pass the AST to a callback. - [fn compile_pragmatic](https://docs.logicaffeine.com/logicaffeine_language/compile/fn.compile_pragmatic): Compile with conversational (scalar) implicature enrichment (§8.7). The literal `compile` output is unchanged; this adds the `+> Implicature(…)` line. - [fn compile_simple](https://docs.logicaffeine.com/logicaffeine_language/compile/fn.compile_simple): Compile with simple FOL format. - [fn compile_theorem](https://docs.logicaffeine.com/logicaffeine_language/compile/fn.compile_theorem): Compile and prove a theorem block. - [fn compile_with_discourse](https://docs.logicaffeine.com/logicaffeine_language/compile/fn.compile_with_discourse): Compile with shared WorldState AND Interner for proper cross-sentence discourse. Use this when you need pronouns to resolve across multiple sentences. - [fn compile_with_options](https://docs.logicaffeine.com/logicaffeine_language/compile/fn.compile_with_options): Compile natural language input to first-order logic with specified options. - [fn compile_with_world_state](https://docs.logicaffeine.com/logicaffeine_language/compile/fn.compile_with_world_state): Compile with shared WorldState for cross-sentence discourse. - [fn compile_with_world_state_interner_options](https://docs.logicaffeine.com/logicaffeine_language/compile/fn.compile_with_world_state_interner_options): Compile with full control over WorldState, Interner, and options. - [fn compile_with_world_state_options](https://docs.logicaffeine.com/logicaffeine_language/compile/fn.compile_with_world_state_options): Compile with shared WorldState and options. - [fn run_proof_sketch](https://docs.logicaffeine.com/logicaffeine_language/compile/fn.run_proof_sketch): The vernacular `Proof:` line is an English proof SKETCH, not a Lean tactic block. ## logicaffeine_language::debug Debug display utilities for AST types with interner access. - [struct DebugWorld](https://docs.logicaffeine.com/logicaffeine_language/debug/struct.DebugWorld) - [struct WithInterner](https://docs.logicaffeine.com/logicaffeine_language/debug/struct.WithInterner) - [trait DisplayWith](https://docs.logicaffeine.com/logicaffeine_language/debug/trait.DisplayWith): Trait for formatting types that require an interner for symbol resolution. - [fn aspect_symbol](https://docs.logicaffeine.com/logicaffeine_language/debug/fn.aspect_symbol): An aspect operator. - [fn binary_temporal_symbol](https://docs.logicaffeine.com/logicaffeine_language/debug/fn.binary_temporal_symbol): A binary temporal operator: until, release, weak until. - [fn connective_symbol](https://docs.logicaffeine.com/logicaffeine_language/debug/fn.connective_symbol): A connective’s symbol, from the one mapping every printer shares (`Connective::of`). - [fn focus_symbol](https://docs.logicaffeine.com/logicaffeine_language/debug/fn.focus_symbol): A focus particle. - [fn modal_symbol](https://docs.logicaffeine.com/logicaffeine_language/debug/fn.modal_symbol): A modal’s operator. The boundary must match the formatter (formatter.rs) and the Kripke lowering (semantics/kripke.rs): force == 0.5 (ability/epistemic can/could/may) is the weak/possibility side (◇), not necessity. - [fn quantifier_symbol](https://docs.logicaffeine.com/logicaffeine_language/debug/fn.quantifier_symbol): A quantifier’s symbol, with its count for the numeric ones (`∃=2`, `∃≥3`). - [fn temporal_symbol](https://docs.logicaffeine.com/logicaffeine_language/debug/fn.temporal_symbol): A tense operator: `P` past, `F` future or eventually, `G` always, `X` next. - [fn voice_symbol](https://docs.logicaffeine.com/logicaffeine_language/debug/fn.voice_symbol): A voice operator. ## logicaffeine_language::diagnostic The canonical machine-readable diagnostic surface: `logos-diagnostic/1`. - [struct CatalogEntry](https://docs.logicaffeine.com/logicaffeine_language/diagnostic/struct.CatalogEntry): One rendered sample per `ParseErrorKind` variant — the source of the generated error catalog and `largo explain `. - [struct DiagSpan](https://docs.logicaffeine.com/logicaffeine_language/diagnostic/struct.DiagSpan): A source span in both byte offsets and 1-based, char-counted line/column. - [struct Diagnostic](https://docs.logicaffeine.com/logicaffeine_language/diagnostic/struct.Diagnostic): One `logos-diagnostic/1` object. - [struct RelatedInfo](https://docs.logicaffeine.com/logicaffeine_language/diagnostic/struct.RelatedInfo): A secondary location attached to a diagnostic. - [enum DiagSeverity](https://docs.logicaffeine.com/logicaffeine_language/diagnostic/enum.DiagSeverity): How severely a diagnostic should be presented. - [fn catalog](https://docs.logicaffeine.com/logicaffeine_language/diagnostic/fn.catalog): The full rendered catalog, one entry per variant. - [fn catalog_json](https://docs.logicaffeine.com/logicaffeine_language/diagnostic/fn.catalog_json): The catalog as `errors.json` (schema `logos-errors/1`): one object per variant, pretty-printed, newline-terminated. - [fn catalog_markdown](https://docs.logicaffeine.com/logicaffeine_language/diagnostic/fn.catalog_markdown): The catalog as the reference guide `docs/ERROR_CATALOG.md`: one section per code (variants sharing a code share a section), each sample headline fenced as `text`, never as `logos`. - [fn diagnostic_for](https://docs.logicaffeine.com/logicaffeine_language/diagnostic/fn.diagnostic_for): Render one parse error into the canonical `logos-diagnostic/1` shape. - [fn guide_url](https://docs.logicaffeine.com/logicaffeine_language/diagnostic/fn.guide_url): The quickguide URL for an anchor — same rendering the LSP ships in `codeDescription`. - [fn line_col](https://docs.logicaffeine.com/logicaffeine_language/diagnostic/fn.line_col): 1-based `(line, column)` for a byte offset; columns count characters. - [fn sample_kinds](https://docs.logicaffeine.com/logicaffeine_language/diagnostic/fn.sample_kinds): One representative `(variant name, kind)` per `ParseErrorKind` variant. ## logicaffeine_language::drs Discourse Representation Structure (DRS) for anaphora resolution and scope tracking. - [struct Drs](https://docs.logicaffeine.com/logicaffeine_language/drs/struct.Drs) - [struct DrsBox](https://docs.logicaffeine.com/logicaffeine_language/drs/struct.DrsBox) - [struct DrsMark](https://docs.logicaffeine.com/logicaffeine_language/drs/struct.DrsMark): A point in the DRS’s growth: the box the parse was in, and how many referents each box then held. A parse that backtracks rewinds to it, so a referent registered on an abandoned path does not outlive the path — no pronoun finds it, and no conditional quantifies over it. - [struct ModalContext](https://docs.logicaffeine.com/logicaffeine_language/drs/struct.ModalContext): Modal context for tracking hypothetical worlds across sentences. Enables modal subordination: “A wolf might walk in. It would eat you.” - [struct Referent](https://docs.logicaffeine.com/logicaffeine_language/drs/struct.Referent) - [struct TelescopeCandidate](https://docs.logicaffeine.com/logicaffeine_language/drs/struct.TelescopeCandidate): A referent that may be accessed via telescoping across sentence boundaries - [struct TimeConstraint](https://docs.logicaffeine.com/logicaffeine_language/drs/struct.TimeConstraint) - [struct WorldState](https://docs.logicaffeine.com/logicaffeine_language/drs/struct.WorldState): The unified discourse state that persists across sentences. - [enum BoxType](https://docs.logicaffeine.com/logicaffeine_language/drs/enum.BoxType) - [enum Case](https://docs.logicaffeine.com/logicaffeine_language/drs/enum.Case): Grammatical case (for pronouns). - [enum Gender](https://docs.logicaffeine.com/logicaffeine_language/drs/enum.Gender): Grammatical gender (for pronouns and agreement). - [enum Number](https://docs.logicaffeine.com/logicaffeine_language/drs/enum.Number): Grammatical number for nouns and agreement. - [enum OwnershipState](https://docs.logicaffeine.com/logicaffeine_language/drs/enum.OwnershipState) - [enum ReferentSource](https://docs.logicaffeine.com/logicaffeine_language/drs/enum.ReferentSource) - [enum ScopeError](https://docs.logicaffeine.com/logicaffeine_language/drs/enum.ScopeError): Error when pronoun resolution fails due to scope constraints - [enum ScopePath](https://docs.logicaffeine.com/logicaffeine_language/drs/enum.ScopePath): Path segment for navigating to insertion point during AST restructuring - [enum TimeRelation](https://docs.logicaffeine.com/logicaffeine_language/drs/enum.TimeRelation) ## logicaffeine_language::error Error types and display formatting for parse errors. - [struct DiagnosticParts](https://docs.logicaffeine.com/logicaffeine_language/error/struct.DiagnosticParts): The structured pieces a caret-style diagnostic needs — produced by `ParseError::diagnostic_parts` and shared by every renderer (terminal, browser overlay) so their line, caret, message, and hint can never disagree. - [struct ParseError](https://docs.logicaffeine.com/logicaffeine_language/error/struct.ParseError): A parse error with location information. - [enum ParseErrorKind](https://docs.logicaffeine.com/logicaffeine_language/error/enum.ParseErrorKind) - [fn describe_token](https://docs.logicaffeine.com/logicaffeine_language/error/fn.describe_token): A human reading of a token for error prose — never the raw `Debug` name. “a comma (‘,’)” teaches; “Comma” is compiler debris. - [fn socratic_explanation](https://docs.logicaffeine.com/logicaffeine_language/error/fn.socratic_explanation) ## logicaffeine_language::formatter Output formatters for logical expressions. - [struct KripkeFormatter](https://docs.logicaffeine.com/logicaffeine_language/formatter/struct.KripkeFormatter): Formatter for Kripke lowered output with explicit world arguments. Modals are already lowered to quantifiers; this formatter just renders the result with world arguments appended to predicates. - [struct LatexFormatter](https://docs.logicaffeine.com/logicaffeine_language/formatter/struct.LatexFormatter) - [struct RustFormatter](https://docs.logicaffeine.com/logicaffeine_language/formatter/struct.RustFormatter): Formatter that produces Rust boolean expressions for runtime assertions. Used by codegen to convert LogicExpr into debug_assert!() compatible code. - [struct SimpleFOLFormatter](https://docs.logicaffeine.com/logicaffeine_language/formatter/struct.SimpleFOLFormatter) - [struct UnicodeFormatter](https://docs.logicaffeine.com/logicaffeine_language/formatter/struct.UnicodeFormatter) - [enum Connective](https://docs.logicaffeine.com/logicaffeine_language/formatter/enum.Connective): Trait for formatting logical expressions in various notations. The connectives a formula joins its parts with, whatever token the parser read each from: `If`, `Then` and `Implies` are all the implication. Every printer asks this one mapping, so the Logic Output, the Syntax Tree and the generated Rust can never draw a connective differently. - [trait LogicFormatter](https://docs.logicaffeine.com/logicaffeine_language/formatter/trait.LogicFormatter) ## logicaffeine_language::import_format Canonical formatting of a module’s `Import` statements — the pit-of-success default so import blocks never need manual bikeshedding. - [fn normalize_imports](https://docs.logicaffeine.com/logicaffeine_language/import_format/fn.normalize_imports): Rewrite the entry’s abstract `Import` statements into a single canonical block: sorted, de-duplicated, placed where the first import was, with the rest removed. Prose and code are untouched. Idempotent. ## logicaffeine_language::intern - [struct Interner](https://docs.logicaffeine.com/logicaffeine_language/intern/struct.Interner): A string interner providing O(1) equality comparison via `Symbol` handles. - [struct Symbol](https://docs.logicaffeine.com/logicaffeine_language/intern/struct.Symbol): A lightweight handle to an interned string. - [trait SymbolEq](https://docs.logicaffeine.com/logicaffeine_language/intern/trait.SymbolEq): Convenience trait for comparing a `Symbol` to a string literal. ## logicaffeine_language::lambda Lambda calculus transformations for Montague-style compositional semantics. - [struct ScopeIterator](https://docs.logicaffeine.com/logicaffeine_language/lambda/struct.ScopeIterator) - [fn apply_adverb](https://docs.logicaffeine.com/logicaffeine_language/lambda/fn.apply_adverb): Adds an adverbial modifier to an event. - [fn beta_reduce](https://docs.logicaffeine.com/logicaffeine_language/lambda/fn.beta_reduce): Performs beta reduction on lambda applications. - [fn cumulative_reading](https://docs.logicaffeine.com/logicaffeine_language/lambda/fn.cumulative_reading): Builds the CUMULATIVE reading (Scha 1981) for a two-cardinal transitive sentence — the reading irreducible to either nesting: “Three boys lifted five boxes.” → ∃=3 x(Boy(x) ∧ ∃y(Box(y) ∧ Lift(x,y))) ∧ ∃=5 y(Box(y) ∧ ∃x(Boy(x) ∧ Lift(x,y))) i.e. exactly 3 boys each lifted some box AND exactly 5 boxes were each lifted by some boy. This is first-order over the Link lattice (no ⊕ term needed). It is produced only when there are exactly two cardinal quantifiers in the same island over a shared nucleus; otherwise returns `None`. - [fn enumerate_intensional_readings](https://docs.logicaffeine.com/logicaffeine_language/lambda/fn.enumerate_intensional_readings) - [fn enumerate_scopings](https://docs.logicaffeine.com/logicaffeine_language/lambda/fn.enumerate_scopings): Generates all possible quantifier scopings for an expression. - [fn is_opaque_verb](https://docs.logicaffeine.com/logicaffeine_language/lambda/fn.is_opaque_verb): Checks if a verb creates an opaque (intensional) context. - [fn lift_proper_name](https://docs.logicaffeine.com/logicaffeine_language/lambda/fn.lift_proper_name) - [fn lift_quantifier](https://docs.logicaffeine.com/logicaffeine_language/lambda/fn.lift_quantifier) - [fn make_intensional](https://docs.logicaffeine.com/logicaffeine_language/lambda/fn.make_intensional): Wraps an expression in an intensional operator. - [fn substitute_respecting_opacity](https://docs.logicaffeine.com/logicaffeine_language/lambda/fn.substitute_respecting_opacity): Substitutes a variable with a replacement, respecting opacity boundaries. - [fn to_event_semantics](https://docs.logicaffeine.com/logicaffeine_language/lambda/fn.to_event_semantics): Converts a predicate to Neo-Davidsonian event semantics. ## logicaffeine_language::lexer Two-stage lexer for LOGOS natural language input. - [struct Lexer](https://docs.logicaffeine.com/logicaffeine_language/lexer/struct.Lexer) - [struct LineLexer](https://docs.logicaffeine.com/logicaffeine_language/lexer/struct.LineLexer): Stage 1 Lexer: Handles only lines, indentation, and structural tokens. Treats all other text as opaque `Content` for the Stage 2 WordLexer. - [enum LexerMode](https://docs.logicaffeine.com/logicaffeine_language/lexer/enum.LexerMode) - [enum LineToken](https://docs.logicaffeine.com/logicaffeine_language/lexer/enum.LineToken): Tokens emitted by the LineLexer (Stage 1). Handles structural tokens (Indent, Dedent, Newline) while treating all other content as opaque for Stage 2 word classification. ## logicaffeine_language::lexicon Lexicon: Vocabulary lookup functions - [struct AdjectiveMetadata](https://docs.logicaffeine.com/logicaffeine_language/lexicon/struct.AdjectiveMetadata): Static adjective metadata from the lexicon database. - [struct CanonicalMapping](https://docs.logicaffeine.com/logicaffeine_language/lexicon/struct.CanonicalMapping): Maps a word to its canonical form with polarity. - [struct Lexicon](https://docs.logicaffeine.com/logicaffeine_language/lexicon/struct.Lexicon): Lexicon struct for verb lookup with inflection handling - [struct MorphRule](https://docs.logicaffeine.com/logicaffeine_language/lexicon/struct.MorphRule): Morphological derivation rule from lexicon. - [struct MorphologicalRule](https://docs.logicaffeine.com/logicaffeine_language/lexicon/struct.MorphologicalRule): Morphological rule for derivational morphology. - [struct NounMetadata](https://docs.logicaffeine.com/logicaffeine_language/lexicon/struct.NounMetadata): Static noun metadata from the lexicon database. - [struct StaticLexicon](https://docs.logicaffeine.com/logicaffeine_language/lexicon/struct.StaticLexicon): Static lexicon implementation using compile-time generated data - [struct VerbEntry](https://docs.logicaffeine.com/logicaffeine_language/lexicon/struct.VerbEntry): Verb entry returned from irregular verb lookup. - [struct VerbMetadata](https://docs.logicaffeine.com/logicaffeine_language/lexicon/struct.VerbMetadata): Static verb metadata from the lexicon database. - [enum Aspect](https://docs.logicaffeine.com/logicaffeine_language/lexicon/enum.Aspect): Grammatical aspect (viewpoint aspect). - [enum Case](https://docs.logicaffeine.com/logicaffeine_language/lexicon/enum.Case): Grammatical case (for pronouns). - [enum Definiteness](https://docs.logicaffeine.com/logicaffeine_language/lexicon/enum.Definiteness): Article definiteness for noun phrases. - [enum Feature](https://docs.logicaffeine.com/logicaffeine_language/lexicon/enum.Feature): Lexical features that encode grammatical and semantic properties of words. - [enum Gender](https://docs.logicaffeine.com/logicaffeine_language/lexicon/enum.Gender): Grammatical gender (for pronouns and agreement). - [enum Number](https://docs.logicaffeine.com/logicaffeine_language/lexicon/enum.Number): Grammatical number for nouns and agreement. - [enum Polarity](https://docs.logicaffeine.com/logicaffeine_language/lexicon/enum.Polarity): Polarity for canonical mapping (positive = synonym, negative = antonym). - [enum Sort](https://docs.logicaffeine.com/logicaffeine_language/lexicon/enum.Sort): Semantic sorts for type checking. - [enum Time](https://docs.logicaffeine.com/logicaffeine_language/lexicon/enum.Time): Temporal reference for verb tense. - [enum VerbClass](https://docs.logicaffeine.com/logicaffeine_language/lexicon/enum.VerbClass): Vendler’s Lexical Aspect Classes (Aktionsart) - [enum WordAnalysis](https://docs.logicaffeine.com/logicaffeine_language/lexicon/enum.WordAnalysis): Result of smart word analysis for derivational morphology - [static WORD_TABLES](https://docs.logicaffeine.com/logicaffeine_language/lexicon/static.WORD_TABLES): Every word table this module generates, by name, with its sorted, duplicate-free keys. - [static WORD_TABLE_CONFLICTS](https://docs.logicaffeine.com/logicaffeine_language/lexicon/static.WORD_TABLE_CONFLICTS): Every key a table was written with twice, answering differently: `(table, key, kept, dropped)` — the first answer is the one the table gives. - [trait LexiconTrait](https://docs.logicaffeine.com/logicaffeine_language/lexicon/trait.LexiconTrait): Lexicon trait for abstracting over static and dynamic lexicons - [fn analyze_word](https://docs.logicaffeine.com/logicaffeine_language/lexicon/fn.analyze_word): Smart word analysis with derivational morphology support. - [fn get_canonical_noun](https://docs.logicaffeine.com/logicaffeine_language/lexicon/fn.get_canonical_noun): Get the canonical lemma for a noun. - [fn get_canonical_verb](https://docs.logicaffeine.com/logicaffeine_language/lexicon/fn.get_canonical_verb): Get canonical verb form and whether it’s lexically negative. Used at parse time to transform “lacks” → (“Have”, true). Returns (canonical_lemma, is_negative). - [fn get_morphological_rules](https://docs.logicaffeine.com/logicaffeine_language/lexicon/fn.get_morphological_rules): Get morphological derivation rules from lexicon. - [fn is_abbreviation](https://docs.logicaffeine.com/logicaffeine_language/lexicon/fn.is_abbreviation) - [fn is_adjective](https://docs.logicaffeine.com/logicaffeine_language/lexicon/fn.is_adjective) - [fn is_adverb](https://docs.logicaffeine.com/logicaffeine_language/lexicon/fn.is_adverb) - [fn is_agentive_noun](https://docs.logicaffeine.com/logicaffeine_language/lexicon/fn.is_agentive_noun): Check if a noun is agentive (derived from a verb with Agent relation). - [fn is_base_verb](https://docs.logicaffeine.com/logicaffeine_language/lexicon/fn.is_base_verb) - [fn is_base_verb_early](https://docs.logicaffeine.com/logicaffeine_language/lexicon/fn.is_base_verb_early) - [fn is_collective_verb](https://docs.logicaffeine.com/logicaffeine_language/lexicon/fn.is_collective_verb) - [fn is_common_noun](https://docs.logicaffeine.com/logicaffeine_language/lexicon/fn.is_common_noun) - [fn is_decreasing_adjective](https://docs.logicaffeine.com/logicaffeine_language/lexicon/fn.is_decreasing_adjective) - [fn is_degree_adverb](https://docs.logicaffeine.com/logicaffeine_language/lexicon/fn.is_degree_adverb) - [fn is_derivable_noun](https://docs.logicaffeine.com/logicaffeine_language/lexicon/fn.is_derivable_noun): Check if a word is a known common noun or derivable from one. This is used for sentence-initial capitalization disambiguation. - [fn is_disambiguation_not_verb](https://docs.logicaffeine.com/logicaffeine_language/lexicon/fn.is_disambiguation_not_verb) - [fn is_distinct_past_participle](https://docs.logicaffeine.com/logicaffeine_language/lexicon/fn.is_distinct_past_participle) - [fn is_distributive_verb](https://docs.logicaffeine.com/logicaffeine_language/lexicon/fn.is_distributive_verb) - [fn is_ditransitive_verb](https://docs.logicaffeine.com/logicaffeine_language/lexicon/fn.is_ditransitive_verb) - [fn is_event_modifier_adjective](https://docs.logicaffeine.com/logicaffeine_language/lexicon/fn.is_event_modifier_adjective) - [fn is_female_name](https://docs.logicaffeine.com/logicaffeine_language/lexicon/fn.is_female_name) - [fn is_female_noun](https://docs.logicaffeine.com/logicaffeine_language/lexicon/fn.is_female_noun) - [fn is_gradable_adjective](https://docs.logicaffeine.com/logicaffeine_language/lexicon/fn.is_gradable_adjective) - [fn is_infinitive_verb](https://docs.logicaffeine.com/logicaffeine_language/lexicon/fn.is_infinitive_verb) - [fn is_institution_metonym](https://docs.logicaffeine.com/logicaffeine_language/lexicon/fn.is_institution_metonym) - [fn is_intensional_predicate](https://docs.logicaffeine.com/logicaffeine_language/lexicon/fn.is_intensional_predicate) - [fn is_intransitive_verb](https://docs.logicaffeine.com/logicaffeine_language/lexicon/fn.is_intransitive_verb) - [fn is_irregular_plural](https://docs.logicaffeine.com/logicaffeine_language/lexicon/fn.is_irregular_plural) - [fn is_male_name](https://docs.logicaffeine.com/logicaffeine_language/lexicon/fn.is_male_name) - [fn is_male_noun](https://docs.logicaffeine.com/logicaffeine_language/lexicon/fn.is_male_noun) - [fn is_mass_noun](https://docs.logicaffeine.com/logicaffeine_language/lexicon/fn.is_mass_noun) - [fn is_mixed_verb](https://docs.logicaffeine.com/logicaffeine_language/lexicon/fn.is_mixed_verb) - [fn is_month](https://docs.logicaffeine.com/logicaffeine_language/lexicon/fn.is_month) - [fn is_neuter_noun](https://docs.logicaffeine.com/logicaffeine_language/lexicon/fn.is_neuter_noun) - [fn is_non_intersective](https://docs.logicaffeine.com/logicaffeine_language/lexicon/fn.is_non_intersective) - [fn is_not_adverb](https://docs.logicaffeine.com/logicaffeine_language/lexicon/fn.is_not_adverb) - [fn is_noun_pattern](https://docs.logicaffeine.com/logicaffeine_language/lexicon/fn.is_noun_pattern) - [fn is_object_control_verb](https://docs.logicaffeine.com/logicaffeine_language/lexicon/fn.is_object_control_verb) - [fn is_opaque_verb](https://docs.logicaffeine.com/logicaffeine_language/lexicon/fn.is_opaque_verb) - [fn is_particle](https://docs.logicaffeine.com/logicaffeine_language/lexicon/fn.is_particle) - [fn is_perception_verb](https://docs.logicaffeine.com/logicaffeine_language/lexicon/fn.is_perception_verb) - [fn is_performative](https://docs.logicaffeine.com/logicaffeine_language/lexicon/fn.is_performative) - [fn is_preposition](https://docs.logicaffeine.com/logicaffeine_language/lexicon/fn.is_preposition) - [fn is_proper_name](https://docs.logicaffeine.com/logicaffeine_language/lexicon/fn.is_proper_name): Check if a word is a proper name (has Feature::Proper in the lexicon). Used to distinguish “Socrates fears death” from “Birds fly” (bare plurals). Names like “Socrates”, “James”, “Chris” end in ‘s’ but aren’t plural nouns. - [fn is_quantificational_adverb](https://docs.logicaffeine.com/logicaffeine_language/lexicon/fn.is_quantificational_adverb) - [fn is_raising_verb](https://docs.logicaffeine.com/logicaffeine_language/lexicon/fn.is_raising_verb) - [fn is_relational_adjective](https://docs.logicaffeine.com/logicaffeine_language/lexicon/fn.is_relational_adjective): Check whether an adjective is relational/pertainymic. - [fn is_relevance_verb](https://docs.logicaffeine.com/logicaffeine_language/lexicon/fn.is_relevance_verb) - [fn is_resultative_verb](https://docs.logicaffeine.com/logicaffeine_language/lexicon/fn.is_resultative_verb) - [fn is_scopal_adverb](https://docs.logicaffeine.com/logicaffeine_language/lexicon/fn.is_scopal_adverb) - [fn is_stemming_exception](https://docs.logicaffeine.com/logicaffeine_language/lexicon/fn.is_stemming_exception) - [fn is_subject_control_verb](https://docs.logicaffeine.com/logicaffeine_language/lexicon/fn.is_subject_control_verb) - [fn is_subsective](https://docs.logicaffeine.com/logicaffeine_language/lexicon/fn.is_subsective) - [fn is_temporal_adverb](https://docs.logicaffeine.com/logicaffeine_language/lexicon/fn.is_temporal_adverb) - [fn is_transitive_verb](https://docs.logicaffeine.com/logicaffeine_language/lexicon/fn.is_transitive_verb) - [fn is_vague_adjective](https://docs.logicaffeine.com/logicaffeine_language/lexicon/fn.is_vague_adjective) - [fn lookup_adjective_db](https://docs.logicaffeine.com/logicaffeine_language/lexicon/fn.lookup_adjective_db) - [fn lookup_agentive_noun](https://docs.logicaffeine.com/logicaffeine_language/lexicon/fn.lookup_agentive_noun): Lookup the base verb for an agentive noun (e.g., dancer -> Dance). - [fn lookup_article](https://docs.logicaffeine.com/logicaffeine_language/lexicon/fn.lookup_article) - [fn lookup_auxiliary](https://docs.logicaffeine.com/logicaffeine_language/lexicon/fn.lookup_auxiliary) - [fn lookup_canonical](https://docs.logicaffeine.com/logicaffeine_language/lexicon/fn.lookup_canonical): Look up canonical form for a word (synonym/antonym normalization). Returns the canonical lemma and polarity (Negative for antonyms). - [fn lookup_irregular_verb](https://docs.logicaffeine.com/logicaffeine_language/lexicon/fn.lookup_irregular_verb) - [fn lookup_keyword](https://docs.logicaffeine.com/logicaffeine_language/lexicon/fn.lookup_keyword) - [fn lookup_negative_contraction](https://docs.logicaffeine.com/logicaffeine_language/lexicon/fn.lookup_negative_contraction): The lexicon’s expansion for a negative n’t-contraction stem (“isn” → “is not”, “can” → “cannot”). - [fn lookup_noun_db](https://docs.logicaffeine.com/logicaffeine_language/lexicon/fn.lookup_noun_db) - [fn lookup_noun_derivation](https://docs.logicaffeine.com/logicaffeine_language/lexicon/fn.lookup_noun_derivation): Lookup the derivation info for a noun (e.g., dancer -> (Dance, Verb, Agent)) Returns (root, pos, relation) if the noun has a derivation. - [fn lookup_phrasal_verb](https://docs.logicaffeine.com/logicaffeine_language/lexicon/fn.lookup_phrasal_verb) - [fn lookup_presup_trigger](https://docs.logicaffeine.com/logicaffeine_language/lexicon/fn.lookup_presup_trigger) - [fn lookup_pronoun](https://docs.logicaffeine.com/logicaffeine_language/lexicon/fn.lookup_pronoun) - [fn lookup_relational_adjective](https://docs.logicaffeine.com/logicaffeine_language/lexicon/fn.lookup_relational_adjective): Lookup relational-adjective metadata (e.g., dental -> (Tooth, Pertains, Kind)). Returns (base, relation, level) where level is “Kind” or “Instance”. - [fn lookup_sort](https://docs.logicaffeine.com/logicaffeine_language/lexicon/fn.lookup_sort) - [fn lookup_unit_dimension](https://docs.logicaffeine.com/logicaffeine_language/lexicon/fn.lookup_unit_dimension) - [fn lookup_verb_class](https://docs.logicaffeine.com/logicaffeine_language/lexicon/fn.lookup_verb_class) - [fn lookup_verb_db](https://docs.logicaffeine.com/logicaffeine_language/lexicon/fn.lookup_verb_db) - [fn needs_e_ed](https://docs.logicaffeine.com/logicaffeine_language/lexicon/fn.needs_e_ed) - [fn needs_e_ing](https://docs.logicaffeine.com/logicaffeine_language/lexicon/fn.needs_e_ing) - [fn singularize](https://docs.logicaffeine.com/logicaffeine_language/lexicon/fn.singularize) - [fn word_to_number](https://docs.logicaffeine.com/logicaffeine_language/lexicon/fn.word_to_number) ## logicaffeine_language::lgx LGX — the LOGOS web framework’s template layer: real HTML with Jinja-style `{…}` tags, component-scoped CSS, and the structural checks a template needs before any LOGOS expression inside it is parsed. - [mod check](https://docs.logicaffeine.com/logicaffeine_language/lgx/check/): Structural and accessibility checks over a parsed template tree — the questions a template can answer before any LOGOS expression inside it is parsed. - [mod css](https://docs.logicaffeine.com/logicaffeine_language/lgx/css/): Component-scoped CSS for the `Style:` section — a real tokenizer, not string surgery. - [mod deps](https://docs.logicaffeine.com/logicaffeine_language/lgx/deps/): The static dependency graph a fine-grained DOM update is compiled from. - [mod entities](https://docs.logicaffeine.com/logicaffeine_language/lgx/entities/): The WHATWG named character references — GENERATED, do not hand-edit. - [mod html](https://docs.logicaffeine.com/logicaffeine_language/lgx/html/): The LGX HTML tokenizer — real markup for the `View:` section of a component. - [mod raw](https://docs.logicaffeine.com/logicaffeine_language/lgx/raw/): Offsets inside a captured section body, mapped back to the file. - [mod selector](https://docs.logicaffeine.com/logicaffeine_language/lgx/selector/): The CSS selector subset LGX understands — parsed ONCE, here. - [mod template](https://docs.logicaffeine.com/logicaffeine_language/lgx/template/): The LGX template parser — HTML tokens plus Jinja-style `{…}` tags into a template tree. ## logicaffeine_language::lgx::check Structural and accessibility checks over a parsed template tree — the questions a template can answer before any LOGOS expression inside it is parsed. - [struct Finding](https://docs.logicaffeine.com/logicaffeine_language/lgx/check/struct.Finding) - [enum FindingKind](https://docs.logicaffeine.com/logicaffeine_language/lgx/check/enum.FindingKind) - [enum ParserRewrite](https://docs.logicaffeine.com/logicaffeine_language/lgx/check/enum.ParserRewrite): What a browser’s HTML parser does to markup it does not keep as written — see `FindingKind::RewrittenByParser`. - [enum Severity](https://docs.logicaffeine.com/logicaffeine_language/lgx/check/enum.Severity) - [fn check](https://docs.logicaffeine.com/logicaffeine_language/lgx/check/fn.check): Run every check over a template tree. - [fn first_non_head_element](https://docs.logicaffeine.com/logicaffeine_language/lgx/check/fn.first_non_head_element): The first element in `nodes` that does not belong in a document’s head, with its span — `None` when every element is head-legal. ## logicaffeine_language::lgx::css Component-scoped CSS for the `Style:` section — a real tokenizer, not string surgery. - [struct CssError](https://docs.logicaffeine.com/logicaffeine_language/lgx/css/struct.CssError) - [enum CssErrorKind](https://docs.logicaffeine.com/logicaffeine_language/lgx/css/enum.CssErrorKind) - [enum CssItem](https://docs.logicaffeine.com/logicaffeine_language/lgx/css/enum.CssItem): One item of a rule list. - [const GROUP_AT_RULES](https://docs.logicaffeine.com/logicaffeine_language/lgx/css/constant.GROUP_AT_RULES): Conditional-group at-rules whose body is a nested rule list. - [fn parse_items](https://docs.logicaffeine.com/logicaffeine_language/lgx/css/fn.parse_items): Split a stylesheet into its top-level items (comments removed). - [fn scope](https://docs.logicaffeine.com/logicaffeine_language/lgx/css/fn.scope) - [fn scope_selector](https://docs.logicaffeine.com/logicaffeine_language/lgx/css/fn.scope_selector): Scope one complex selector: stamp `.class` on the last non-`:global` compound and unwrap every `:global(…)`. ## logicaffeine_language::lgx::deps The static dependency graph a fine-grained DOM update is compiled from. - [struct ComponentDeps](https://docs.logicaffeine.com/logicaffeine_language/lgx/deps/struct.ComponentDeps): The whole graph for one component. - [struct SiteDeps](https://docs.logicaffeine.com/logicaffeine_language/lgx/deps/struct.SiteDeps): One addressable place in a view that can change, and what it depends on. - [enum DepError](https://docs.logicaffeine.com/logicaffeine_language/lgx/deps/enum.DepError): Why a component has no dependency graph. - [enum SiteKind](https://docs.logicaffeine.com/logicaffeine_language/lgx/deps/enum.SiteKind): What kind of thing a site is — which decides what the patcher emits for it. - [fn block_prop_writes](https://docs.logicaffeine.com/logicaffeine_language/lgx/deps/fn.block_prop_writes): The PROPS a block writes — every one a mistake, since a prop is the parent’s value. `bound` are the names the block’s own header binds (an action’s parameters, a trigger’s values), which shadow a prop of the same name. The same walk as `block_writes`, so a verb that writes state is a verb that writes a prop. - [fn block_writes](https://docs.logicaffeine.com/logicaffeine_language/lgx/deps/fn.block_writes): The state fields one block of statements writes — the same walk `component_deps` uses for an action, exposed so a lowering can ask about a body it is about to emit. - [fn component_deps](https://docs.logicaffeine.com/logicaffeine_language/lgx/deps/fn.component_deps): Build the dependency graph for one component. ## logicaffeine_language::lgx::entities The WHATWG named character references — GENERATED, do not hand-edit. - [const LONGEST_NAME](https://docs.logicaffeine.com/logicaffeine_language/lgx/entities/constant.LONGEST_NAME): The longest name in `NAMED`, excluding the `&` and `;`. The tokenizer scans no further than this looking for the closing `;`, so a stray `&` in prose costs a bounded look-ahead. - [static NAMED](https://docs.logicaffeine.com/logicaffeine_language/lgx/entities/static.NAMED): Every named reference the HTML standard defines, sorted by name for binary search. - [fn named](https://docs.logicaffeine.com/logicaffeine_language/lgx/entities/fn.named): The text a named reference stands for, or `None` when the name is not one the standard defines (in which case the source text was never a reference and must survive as typed). ## logicaffeine_language::lgx::html The LGX HTML tokenizer — real markup for the `View:` section of a component. - [struct HtmlAttr](https://docs.logicaffeine.com/logicaffeine_language/lgx/html/struct.HtmlAttr): One attribute of a start tag. - [struct HtmlError](https://docs.logicaffeine.com/logicaffeine_language/lgx/html/struct.HtmlError) - [enum AttrPart](https://docs.logicaffeine.com/logicaffeine_language/lgx/html/enum.AttrPart): One piece of a dynamic attribute value. - [enum AttrValue](https://docs.logicaffeine.com/logicaffeine_language/lgx/html/enum.AttrValue): An attribute’s value. - [enum Behaviour](https://docs.logicaffeine.com/logicaffeine_language/lgx/html/enum.Behaviour): The behavioural qualifiers: they shape what happens to the event, not which event it is. - [enum EventModifier](https://docs.logicaffeine.com/logicaffeine_language/lgx/html/enum.EventModifier): What an `on-.` qualifier asks for. Every tier reads a handler’s modifiers through this type; the words themselves live only in the tables below. - [enum HtmlErrorKind](https://docs.logicaffeine.com/logicaffeine_language/lgx/html/enum.HtmlErrorKind) - [enum HtmlToken](https://docs.logicaffeine.com/logicaffeine_language/lgx/html/enum.HtmlToken): One flat token of a view body. - [enum KeyName](https://docs.logicaffeine.com/logicaffeine_language/lgx/html/enum.KeyName): A key a keyboard qualifier names: one from `KEY_MODIFIERS`, or a single printable character. - [enum ModifierError](https://docs.logicaffeine.com/logicaffeine_language/lgx/html/enum.ModifierError): Why a handler’s qualifiers cannot be accepted. - [enum SystemKey](https://docs.logicaffeine.com/logicaffeine_language/lgx/html/enum.SystemKey): The system keys a qualifier may require to be held. - [const ATTR_ESCAPES](https://docs.logicaffeine.com/logicaffeine_language/lgx/html/constant.ATTR_ESCAPES): The same, plus the quote that delimits an attribute value. - [const BEHAVIOUR_MODIFIERS](https://docs.logicaffeine.com/logicaffeine_language/lgx/html/constant.BEHAVIOUR_MODIFIERS): `(qualifier, behaviour)` — the behavioural modifiers. - [const BOOLEAN_ATTRIBUTES](https://docs.logicaffeine.com/logicaffeine_language/lgx/html/constant.BOOLEAN_ATTRIBUTES): The HTML BOOLEAN attributes: their state is their PRESENCE, and the value is ignored. - [const EXECUTABLE_SCHEMES](https://docs.logicaffeine.com/logicaffeine_language/lgx/html/constant.EXECUTABLE_SCHEMES): Schemes a browser EXECUTES rather than fetches. A URL carrying one is script, not a location. - [const HTML_ELEMENTS](https://docs.logicaffeine.com/logicaffeine_language/lgx/html/constant.HTML_ELEMENTS): The HTML elements, as the WHATWG HTML standard names them (plus the `svg` and `math` roots of the foreign content it embeds). - [const KEY_EVENTS](https://docs.logicaffeine.com/logicaffeine_language/lgx/html/constant.KEY_EVENTS): The events that carry a key. A key qualifier on any other event could never match. - [const KEY_MODIFIERS](https://docs.logicaffeine.com/logicaffeine_language/lgx/html/constant.KEY_MODIFIERS): `(qualifier, KeyboardEvent.key)` — the named keys a keyboard handler may wait for. The second column is what a browser reports for the key and what a driving `Press` names; the two are compared case-insensitively. - [const SYSTEM_KEY_MODIFIERS](https://docs.logicaffeine.com/logicaffeine_language/lgx/html/constant.SYSTEM_KEY_MODIFIERS): `(qualifier, key)` — the system keys. - [const TEXT_ESCAPES](https://docs.logicaffeine.com/logicaffeine_language/lgx/html/constant.TEXT_ESCAPES): The attributes whose value is a URL the BROWSER will follow, fetch or submit to. - [const URL_ATTRIBUTES](https://docs.logicaffeine.com/logicaffeine_language/lgx/html/constant.URL_ATTRIBUTES) - [const VOID_ELEMENTS](https://docs.logicaffeine.com/logicaffeine_language/lgx/html/constant.VOID_ELEMENTS): The HTML void elements: they never take an end tag. - [fn classify_modifiers](https://docs.logicaffeine.com/logicaffeine_language/lgx/html/fn.classify_modifiers): Classify every qualifier of one `on-.<…>` directive against the catalogue. - [fn decode_entities](https://docs.logicaffeine.com/logicaffeine_language/lgx/html/fn.decode_entities) - [fn escape_attr](https://docs.logicaffeine.com/logicaffeine_language/lgx/html/fn.escape_attr): Escape `s` for an HTML ATTRIBUTE value. - [fn escape_text](https://docs.logicaffeine.com/logicaffeine_language/lgx/html/fn.escape_text): Escape `s` for HTML TEXT content. - [fn is_boolean_attribute](https://docs.logicaffeine.com/logicaffeine_language/lgx/html/fn.is_boolean_attribute) - [fn is_component_name](https://docs.logicaffeine.com/logicaffeine_language/lgx/html/fn.is_component_name): Whether `name` names a component use (``) rather than an HTML element: LGX components are Capitalized, HTML tags are lowercase. - [fn is_executable_url](https://docs.logicaffeine.com/logicaffeine_language/lgx/html/fn.is_executable_url): Whether `url` would execute if a browser followed it. - [fn is_html_element](https://docs.logicaffeine.com/logicaffeine_language/lgx/html/fn.is_html_element) - [fn is_key_event](https://docs.logicaffeine.com/logicaffeine_language/lgx/html/fn.is_key_event): Whether `event` is one of `KEY_EVENTS`. - [fn is_raw_text](https://docs.logicaffeine.com/logicaffeine_language/lgx/html/fn.is_raw_text): The HTML RAW TEXT elements: their content is not markup, and escaping it CORRUPTS it. - [fn is_selector_shaped](https://docs.logicaffeine.com/logicaffeine_language/lgx/html/fn.is_selector_shaped): Whether `target` reads as a CSS selector for a mount point rather than a file path: an id (`#root`), a class (`.app`), an attribute test (`[data-app]`), or exactly an element name (`main`, `body`). - [fn is_url_attribute](https://docs.logicaffeine.com/logicaffeine_language/lgx/html/fn.is_url_attribute) - [fn is_void](https://docs.logicaffeine.com/logicaffeine_language/lgx/html/fn.is_void) - [fn scan_brace](https://docs.logicaffeine.com/logicaffeine_language/lgx/html/fn.scan_brace): Scan the `{…}` group opening at byte `open`; returns the index just past its `}`. String-aware (a `"…"` may contain braces; `\"` is an escaped quote) and nesting-aware. - [fn tokenize](https://docs.logicaffeine.com/logicaffeine_language/lgx/html/fn.tokenize): Tokenize a raw view body. ## logicaffeine_language::lgx::raw Offsets inside a captured section body, mapped back to the file. - [struct RawMap](https://docs.logicaffeine.com/logicaffeine_language/lgx/raw/struct.RawMap): A dedented raw body and where it came from. ## logicaffeine_language::lgx::selector The CSS selector subset LGX understands — parsed ONCE, here. - [struct Compound](https://docs.logicaffeine.com/logicaffeine_language/lgx/selector/struct.Compound): One compound selector: everything that must hold of a SINGLE element (`li#a.done[x=1]`). - [const UNSUPPORTED_SYNTAX](https://docs.logicaffeine.com/logicaffeine_language/lgx/selector/constant.UNSUPPORTED_SYNTAX): The CSS syntax this engine deliberately does not read, and what to write instead. - [fn compound](https://docs.logicaffeine.com/logicaffeine_language/lgx/selector/fn.compound): Parse one compound. - [fn parse](https://docs.logicaffeine.com/logicaffeine_language/lgx/selector/fn.parse): Parse a selector, or `None` when it is empty, malformed, or outside the subset. - [fn unsupported](https://docs.logicaffeine.com/logicaffeine_language/lgx/selector/fn.unsupported): Why `selector` is outside the subset, or `None` when it is inside it. - [type Selector](https://docs.logicaffeine.com/logicaffeine_language/lgx/selector/type.Selector): A descendant chain: `.card li.done` is “a `li.done` anywhere inside a `.card`”. ## logicaffeine_language::lgx::template The LGX template parser — HTML tokens plus Jinja-style `{…}` tags into a template tree. - [struct TExpr](https://docs.logicaffeine.com/logicaffeine_language/lgx/template/struct.TExpr): A LOGOS expression kept as text, with the byte offset of `text` in the template source. - [struct TFilter](https://docs.logicaffeine.com/logicaffeine_language/lgx/template/struct.TFilter): One filter application: `| name arg arg…`. - [struct TemplateError](https://docs.logicaffeine.com/logicaffeine_language/lgx/template/struct.TemplateError) - [enum RetiredForm](https://docs.logicaffeine.com/logicaffeine_language/lgx/template/enum.RetiredForm): A line of the retired `Render:` dialect, which a view no longer reads. - [enum TAttr](https://docs.logicaffeine.com/logicaffeine_language/lgx/template/enum.TAttr): An attribute or directive on an element / a prop on a component. - [enum TNode](https://docs.logicaffeine.com/logicaffeine_language/lgx/template/enum.TNode): One node of the template tree. - [enum TemplateErrorKind](https://docs.logicaffeine.com/logicaffeine_language/lgx/template/enum.TemplateErrorKind) - [const TAG_ALIASES](https://docs.logicaffeine.com/logicaffeine_language/lgx/template/constant.TAG_ALIASES): Tag words other template languages use, and the LGX tag each one means. Each is refused with the LGX spelling rather than read as a hole naming a variable called `elif`. - [fn parse](https://docs.logicaffeine.com/logicaffeine_language/lgx/template/fn.parse): Parse a raw view body into template nodes. - [fn print](https://docs.logicaffeine.com/logicaffeine_language/lgx/template/fn.print): Print a template tree back to LGX source. `parse(print(t))` yields `t` again (spans aside), and printing is idempotent; text and attribute values are escaped so that no character can be re-read as markup or a hole. - [fn retired_view_form](https://docs.logicaffeine.com/logicaffeine_language/lgx/template/fn.retired_view_form): The retired form `line` is written in, read from the WHOLE line and only in the dialect’s exact shapes, so text that merely mentions a tag word (`a: first option`, `Note: see below`) is not one: an HTML element name, optionally a bracketed attribute list, then `:` and nothing, a string literal, or a call; or `css` followed by a string literal. ## logicaffeine_language::lint The value-semantics copy lint. - [struct CopyLintScope](https://docs.logicaffeine.com/logicaffeine_language/lint/struct.CopyLintScope): One function/action/handler body’s worth of tracking state — see the module doc comment. - [struct Finding](https://docs.logicaffeine.com/logicaffeine_language/lint/struct.Finding) - [enum FindingKind](https://docs.logicaffeine.com/logicaffeine_language/lint/enum.FindingKind) - [enum Severity](https://docs.logicaffeine.com/logicaffeine_language/lint/enum.Severity) ## logicaffeine_language::mwe Multi-Word Expression (MWE) processing. - [struct MweTarget](https://docs.logicaffeine.com/logicaffeine_language/mwe/struct.MweTarget) - [struct MweTrie](https://docs.logicaffeine.com/logicaffeine_language/mwe/struct.MweTrie) - [fn apply_mwe_pipeline](https://docs.logicaffeine.com/logicaffeine_language/mwe/fn.apply_mwe_pipeline): Apply MWE collapsing to a token stream. Matches on lemmas (not raw strings) to handle morphological variants. - [fn build_mwe_trie](https://docs.logicaffeine.com/logicaffeine_language/mwe/fn.build_mwe_trie): Build the MWE trie from lexicon data. ## logicaffeine_language::ontology Ontology module for bridging anaphora and sort compatibility checking. - [static WORD_TABLES](https://docs.logicaffeine.com/logicaffeine_language/ontology/static.WORD_TABLES): Every word table this module generates, by name, with its sorted, duplicate-free keys. - [static WORD_TABLE_CONFLICTS](https://docs.logicaffeine.com/logicaffeine_language/ontology/static.WORD_TABLE_CONFLICTS): Every key a table was written with twice, answering differently: `(table, key, kept, dropped)` — the first answer is the one the table gives. - [fn check_sort_compatibility](https://docs.logicaffeine.com/logicaffeine_language/ontology/fn.check_sort_compatibility): Check if a predicate is compatible with a subject’s sort. Returns true if compatible or no sort requirement exists. - [fn find_bridging_wholes](https://docs.logicaffeine.com/logicaffeine_language/ontology/fn.find_bridging_wholes): Find possible whole objects for a given part noun. Returns None if the noun is not a known part of any whole. - [fn get_possible_wholes](https://docs.logicaffeine.com/logicaffeine_language/ontology/fn.get_possible_wholes): Get possible whole objects for a given part noun. - [fn get_predicate_sort](https://docs.logicaffeine.com/logicaffeine_language/ontology/fn.get_predicate_sort): Get the required sort for a predicate (adjective or verb). - [fn required_sort](https://docs.logicaffeine.com/logicaffeine_language/ontology/fn.required_sort): Get the required sort for a predicate, if any. ## logicaffeine_language::optimization The registry of compiler optimization toggles. - [mod path](https://docs.logicaffeine.com/logicaffeine_language/optimization/path/): Execution-path tags (bitmask) recording where an optimization applies. - [struct BackendOptimizationTrace](https://docs.logicaffeine.com/logicaffeine_language/optimization/struct.BackendOptimizationTrace): Stage-separated optimization evidence for one backend compile/run. - [struct FiredOptimizations](https://docs.logicaffeine.com/logicaffeine_language/optimization/struct.FiredOptimizations): Which optimizations actually FIRED during a single compile — one bit per `Opt`, the same bit layout as `OptimizationConfig`. An optimization is “fired” when it actually changed the program or emitted its optimized form for this compile, as distinct from merely being enabled. Populated only while a firing trace is active (see `logicaffeine_compile`’s traced compile entry points); the normal compile path never records into it. - [struct HotswapConfig](https://docs.logicaffeine.com/logicaffeine_language/optimization/struct.HotswapConfig): “When does each allowed opt run” — the sibling to `OptimizationConfig` (HOTSWAP §8). `mode` picks the escalation policy, `thresholds` the rungs, `force_tier` pins a fixed tier for deterministic tests, and `pins` overrides individual opts. - [struct NormalizeReport](https://docs.logicaffeine.com/logicaffeine_language/optimization/struct.NormalizeReport): What `normalize` changed, so a UI can explain auto-disabled toggles. - [struct OptBits](https://docs.logicaffeine.com/logicaffeine_language/optimization/struct.OptBits): A set of optimizations, one bit per `Opt` (its discriminant), in as many 64-bit words as the registry needs. `OptimizationConfig` keeps the enabled set in one and `FiredOptimizations` the fired set, in the same layout, so the two relate bit for bit. - [struct OptMeta](https://docs.logicaffeine.com/logicaffeine_language/optimization/struct.OptMeta): One row of the optimization registry — the complete static description of a single optimization. Adding an optimization means adding one `Opt` variant and one row here; nothing else hardcodes the list. - [struct OptNode](https://docs.logicaffeine.com/logicaffeine_language/optimization/struct.OptNode): One node of a program’s optimization relationship tree: an optimization that is in play for that program, with its nesting depth and its edges. - [struct OptimizationConfig](https://docs.logicaffeine.com/logicaffeine_language/optimization/struct.OptimizationConfig): A live choice of which optimizations are enabled — one bit per `Opt`. - [struct OptimizationDecline](https://docs.logicaffeine.com/logicaffeine_language/optimization/struct.OptimizationDecline): A supported optimization that a backend deliberately chose not to apply. - [struct OptimizationFallback](https://docs.logicaffeine.com/logicaffeine_language/optimization/struct.OptimizationFallback): An explicit backend escape hatch taken while lowering. A fallback is data, never a silent control-flow edge: benchmark tooling can ratchet this list to zero without pretending the fallback backend performed the requested work. - [struct PinSet](https://docs.logicaffeine.com/logicaffeine_language/optimization/struct.PinSet): Per-opt tier pins, indexed by `Opt` discriminant. `None` ⇒ use the cost-derived tier. `Copy` so `HotswapConfig` stays cheap to thread through the run path. - [struct TierThresholds](https://docs.logicaffeine.com/logicaffeine_language/optimization/struct.TierThresholds): Call/back-edge counts at which a unit enters each tier (HOTSWAP §5). Defaults: don’t optimize code that runs once (T1 at 8); amortize whole-function analyses only once recurring (T2 at 32); pay the cloning passes only on genuinely hot kernels (T3 at 100, aligned with the existing native-tier threshold). - [enum MemClass](https://docs.logicaffeine.com/logicaffeine_language/optimization/enum.MemClass): How an optimization trades memory against speed. - [enum Opt](https://docs.logicaffeine.com/logicaffeine_language/optimization/enum.Opt): Every optimization the compiler can toggle. The discriminant is the bit index used by `OptimizationConfig`, so the order here is stable and must not be reordered casually (it also defines conflict-resolution precedence: an earlier variant wins a conflict against a later one). - [enum OptCost](https://docs.logicaffeine.com/logicaffeine_language/optimization/enum.OptCost): How expensive an optimization pass is to RUN on the live path — the lever the tiered optimizer uses to decide WHEN (at which hotness tier) to pay for it. Orthogonal to `MemClass` (which is about the OUTPUT’s memory cost). The derived `Ord` makes a tier gate a single comparison: `Cheap < Medium < Heavy` is exactly the tier-inclusion order T1 ⊂ T2 ⊂ T3. - [enum OptRole](https://docs.logicaffeine.com/logicaffeine_language/optimization/enum.OptRole): Why an optimization appears in a program’s `relationship_tree`. - [enum OptWork](https://docs.logicaffeine.com/logicaffeine_language/optimization/enum.OptWork): What an optimization does to the WORK a program performs, as opposed to how fast it performs it. - [enum OptimizationBackend](https://docs.logicaffeine.com/logicaffeine_language/optimization/enum.OptimizationBackend): The benchmark-visible execution backend whose optimization decisions are being traced. This is deliberately independent of `path`: `path` says where an optimization is allowed statically, while this identifies the concrete lowering that was asked to consume the optimized program. - [enum Pin](https://docs.logicaffeine.com/logicaffeine_language/optimization/enum.Pin): A per-opt tier override (HOTSWAP §8 `## Tier `). - [enum Profile](https://docs.logicaffeine.com/logicaffeine_language/optimization/enum.Profile): A named optimization preset. - [enum Reason](https://docs.logicaffeine.com/logicaffeine_language/optimization/enum.Reason): Why `normalize` flipped an optimization off. - [enum Scope](https://docs.logicaffeine.com/logicaffeine_language/optimization/enum.Scope): Where a `## No ` decorator for this optimization may legitimately appear. - [enum Tier](https://docs.logicaffeine.com/logicaffeine_language/optimization/enum.Tier): A hotness tier — how much optimization budget a unit has earned (HOTSWAP §4.1). Each tier pays for strictly more than the one below; `T3` with an all-on config reproduces today’s whole-program `optimize_for_run`, bit-for-bit (the compatibility + soundness anchor). The mechanism that escalates a unit through the tiers (call/back-edge counters, thresholds) lives in the VM; this is just the policy the optimizer reads. - [enum TierMode](https://docs.logicaffeine.com/logicaffeine_language/optimization/enum.TierMode): WHEN each allowed optimization runs, as opposed to WHICH are allowed (`OptimizationConfig`). The sibling policy of HOTSWAP §8: the bitset says what is permitted; this says at what hotness tier each permitted opt is paid for. Kept separate from `OptimizationConfig` (which is serialized / merged per-function / normalized) so tier state never pollutes the “which opts” bitset. - [const OPT_COUNT](https://docs.logicaffeine.com/logicaffeine_language/optimization/constant.OPT_COUNT): The number of `Opt` variants — the width of a `PinSet`. Derived from the last variant so it tracks the enum automatically (guarded by a test against `REGISTRY.len()`). - [const OPT_WORDS](https://docs.logicaffeine.com/logicaffeine_language/optimization/constant.OPT_WORDS): The 64-bit words an `OptBits` set holds: one bit per registered optimization. - [static REGISTRY](https://docs.logicaffeine.com/logicaffeine_language/optimization/static.REGISTRY): The complete optimization registry: exactly one row per `Opt`, in discriminant order. Earlier rows win conflicts against later rows. - [fn admits](https://docs.logicaffeine.com/logicaffeine_language/optimization/fn.admits): Whether `opt` runs at `tier` under `cfg`: it must be enabled in the config AND cost no more than the tier’s budget. The tier→opt-set mapping is therefore DERIVED from the registry, never hardcoded — adding an opt with a cost slots it into the right tier automatically (HOTSWAP §4.2). - [fn admits_pinned](https://docs.logicaffeine.com/logicaffeine_language/optimization/fn.admits_pinned): `admits` with per-opt pins applied: a pin overrides the cost-derived tier (HOTSWAP §8). A disabled opt (`!cfg.is_on`) never runs regardless of pin, so `## No ` always wins over `## Tier eager`. - [fn by_keyword](https://docs.logicaffeine.com/logicaffeine_language/optimization/fn.by_keyword): Look up an optimization by its decorator keyword (case-insensitive). - [fn decorate_source](https://docs.logicaffeine.com/logicaffeine_language/optimization/fn.decorate_source): Produce a copy of `src` with a file-level `## No ` decorator inserted (just before `## Main`, where the parser folds it into the program-wide config) for each disabled-optimization keyword. This is what the benchmarks UI shows on the Logos source when a toggle is flipped off; compiling the result applies the same config the toggle represents. - [fn decorate_tiers](https://docs.logicaffeine.com/logicaffeine_language/optimization/fn.decorate_tiers): Produce a copy of `src` with a file-level `## Tier ` decorator inserted (just before `## Main`, where the parser collects program-level tier pins) for each `(keyword, value)` pair. The tiering analog of `decorate_source`: the benchmarks UI injects these to pin an optimization to a tier exactly as it injects `## No ` to disable one. `value` is one of `eager|t1|t2|t3|never`. - [fn pin_from_str](https://docs.logicaffeine.com/logicaffeine_language/optimization/fn.pin_from_str): Parse one pin value: `eager`, `never`, or a tier token (see `parse_tier`). The surface the `## Tier ` parser and `LOGOS_TIER_PIN` both resolve. - [fn relationship_tree](https://docs.logicaffeine.com/logicaffeine_language/optimization/fn.relationship_tree): The complete optimization chain for one program, derived deterministically from a single all-optimizations-on evaluation plus the static registry graph — no differential toggling in the hot path. `fired` is the set that fired; `preempted` is the `(winner, loser)` BLOCKER pairs that occurred; `dependencies` is the `(dependent, dep)` per-program DEPENDENCY pairs (one optimization only fired because another was on) — all three come from the baked per-program graph (`compile::optimization_graph`). ## logicaffeine_language::optimization::path Execution-path tags (bitmask) recording where an optimization applies. - [const AOT](https://docs.logicaffeine.com/logicaffeine_language/optimization/path/constant.AOT): Ahead-of-time Rust codegen pipeline (`optimize_program`). - [const CODEGEN](https://docs.logicaffeine.com/logicaffeine_language/optimization/path/constant.CODEGEN): Rust source emission (`codegen_program`). - [const JIT](https://docs.logicaffeine.com/logicaffeine_language/optimization/path/constant.JIT): Forge JIT tier. - [const RUN](https://docs.logicaffeine.com/logicaffeine_language/optimization/path/constant.RUN): Live run-path optimizer (`optimize_for_run`). - [const VM](https://docs.logicaffeine.com/logicaffeine_language/optimization/path/constant.VM): Bytecode VM. ## logicaffeine_language::parser Recursive descent parser for natural language to first-order logic. - [mod lgx_lower](https://docs.logicaffeine.com/logicaffeine_language/parser/lgx_lower/): Lowering a component’s `View:` into the DOM calls every tier already runs. - [struct EventTemplate](https://docs.logicaffeine.com/logicaffeine_language/parser/struct.EventTemplate): Template for constructing Neo-Davidsonian events. - [struct NestedStmtSpans](https://docs.logicaffeine.com/logicaffeine_language/parser/struct.NestedStmtSpans): Where each statement read inside a block sits in the source — a function’s body, a loop’s, a branch’s — by `StmtId`. Top-level statements are in `Parser::stmt_spans` instead: they live in the returned `Vec`, whose buffer may be freed and reused, while a block lives in the arena for as long as the AST does. A statement the parser wrote itself (a desugaring’s) has no entry, so a finding in it falls back to the statement the author wrote around it. - [struct Parser](https://docs.logicaffeine.com/logicaffeine_language/parser/struct.Parser) - [struct ParserGuard](https://docs.logicaffeine.com/logicaffeine_language/parser/struct.ParserGuard): RAII guard for speculative parsing with automatic rollback. - [enum ModalPreference](https://docs.logicaffeine.com/logicaffeine_language/parser/enum.ModalPreference): Controls interpretation of polysemous modals (may, can, could). Used by compile_forest to generate multiple semantic readings. - [enum NegativeScopeMode](https://docs.logicaffeine.com/logicaffeine_language/parser/enum.NegativeScopeMode): Controls scope of negation for lexically negative verbs (lacks, miss). “user who lacks a key” can mean: - [enum ParserMode](https://docs.logicaffeine.com/logicaffeine_language/parser/enum.ParserMode): Determines how the parser interprets sentences. - [enum ResolvedPronoun](https://docs.logicaffeine.com/logicaffeine_language/parser/enum.ResolvedPronoun): a deictic constant (referring to an entity outside the discourse). - [trait ClauseParsing](https://docs.logicaffeine.com/logicaffeine_language/parser/trait.ClauseParsing): Trait for parsing clause-level structures. - [trait ImperativeVerbParsing](https://docs.logicaffeine.com/logicaffeine_language/parser/trait.ImperativeVerbParsing): Trait for parsing verb phrases in imperative (LOGOS) mode. - [trait LogicVerbParsing](https://docs.logicaffeine.com/logicaffeine_language/parser/trait.LogicVerbParsing): Trait for parsing verb phrases in declarative (logic) mode. - [trait ModalParsing](https://docs.logicaffeine.com/logicaffeine_language/parser/trait.ModalParsing): Trait for parsing modal verbs and aspect chains. - [trait NounParsing](https://docs.logicaffeine.com/logicaffeine_language/parser/trait.NounParsing): Trait for parsing noun phrases. - [trait PragmaticsParsing](https://docs.logicaffeine.com/logicaffeine_language/parser/trait.PragmaticsParsing): Trait for parsing pragmatic and focus-sensitive constructions. - [trait QuantifierParsing](https://docs.logicaffeine.com/logicaffeine_language/parser/trait.QuantifierParsing): Trait for parsing quantified expressions and managing scope. - [trait QuestionParsing](https://docs.logicaffeine.com/logicaffeine_language/parser/trait.QuestionParsing): Trait for parsing interrogative sentences. ## logicaffeine_language::parser::lgx_lower Lowering a component’s `View:` into the DOM calls every tier already runs. - [struct HostEntry](https://docs.logicaffeine.com/logicaffeine_language/parser/lgx_lower/struct.HostEntry): A function a host enters a compiled program by name. - [struct NotLowerable](https://docs.logicaffeine.com/logicaffeine_language/parser/lgx_lower/struct.NotLowerable): Why a component cannot be lowered — the message the VM refuses a `Mount` with, and WHERE. - [struct VdomFeature](https://docs.logicaffeine.com/logicaffeine_language/parser/lgx_lower/struct.VdomFeature): A `vdom.lg` path only some pages take: every `vdom.lg` function named with `prefix` runs only on a tape holding records one of `writers` laid down, so the module’s dead-code analysis follows a call into it once a writer is reached (`vm::reach`) — a page that never calls a writer ships none of the feature. A new function of the feature is pruned by being named for it. - [enum EntryHost](https://docs.logicaffeine.com/logicaffeine_language/parser/lgx_lower/enum.EntryHost): Who enters an `LGX_ENTRIES` function by name. - [enum ListenerSite](https://docs.logicaffeine.com/logicaffeine_language/parser/lgx_lower/enum.ListenerSite): One attached listener, as the dispatcher needs to call it back. - [enum ParamFrom](https://docs.logicaffeine.com/logicaffeine_language/parser/lgx_lower/enum.ParamFrom): Where a route parameter’s value comes from at dispatch. - [enum SessionFieldKind](https://docs.logicaffeine.com/logicaffeine_language/parser/lgx_lower/enum.SessionFieldKind): ★ `components` IS NOT OPTIONAL CONTEXT — IT DECIDES THE ANSWER. - [const CSRF_FIELD](https://docs.logicaffeine.com/logicaffeine_language/parser/lgx_lower/constant.CSRF_FIELD): The form field and the header a token may arrive in. `_csrf` is the one `csrf_lock` already requires of every state-changing `
`; the header is how a scripted `fetch` sends one. - [const CSRF_FN](https://docs.logicaffeine.com/logicaffeine_language/parser/lgx_lower/constant.CSRF_FN): What a page calls to get its own token: `value={csrf()}`. - [const CSRF_HEADER](https://docs.logicaffeine.com/logicaffeine_language/parser/lgx_lower/constant.CSRF_HEADER) - [const CSRF_TOKEN_PATH](https://docs.logicaffeine.com/logicaffeine_language/parser/lgx_lower/constant.CSRF_TOKEN_PATH): Where a server with a `## Session` answers the visitor’s own CSRF token — the value a page composed around it (``) hands its scripted requests. The path is the router’s own, never a route an author declares. - [const DROP_TARGET_CANCELS](https://docs.logicaffeine.com/logicaffeine_language/parser/lgx_lower/constant.DROP_TARGET_CANCELS): The drag events a `When a file is dropped on "":` target cancels at registration. A browser makes an element a drop target only while `dragenter` and `dragover` are cancelled on it, and performs its own default for an uncancelled `drop` (it opens the file in the tab). - [const LGX_ENTRIES](https://docs.logicaffeine.com/logicaffeine_language/parser/lgx_lower/constant.LGX_ENTRIES): ★ EVERY FUNCTION A HOST ENTERS BY NAME, ONCE. A page’s wasm module exports its page entries under these names and nothing else of the lowering’s, the dead-code walk roots at them, `runtime.js` enters the module only through them and the in-process page host calls only them — `lgx_entry_abi_lock` reads each of those sides against this table. - [const PRERENDERED_ATTR](https://docs.logicaffeine.com/logicaffeine_language/parser/lgx_lower/constant.PRERENDERED_ATTR): The attribute a pre-rendered document’s `` carries: its markup is the page’s own first paint, which the mount adopts (`vdHydrate`) rather than clearing and drawing again. Written by the build’s pre-render, read by the mount, and taken off by the host as the hydration opens. - [const ROUTE_BODY_WALK](https://docs.logicaffeine.com/logicaffeine_language/parser/lgx_lower/constant.ROUTE_BODY_WALK): The three walks over the route table. Each takes the WHOLE `Request` — see the wrappers at the end of `lower_lgx_routes` for why the three-argument conveniences are built on top of these rather than the other way around. - [const ROUTE_CTYPE_WALK](https://docs.logicaffeine.com/logicaffeine_language/parser/lgx_lower/constant.ROUTE_CTYPE_WALK) - [const ROUTE_HANDLER](https://docs.logicaffeine.com/logicaffeine_language/parser/lgx_lower/constant.ROUTE_HANDLER): The function one of a component’s actions lowers to. The `Request -> Response` the route table synthesizes, and what a bare `Serve on port N.` serves with. Named here so the parser and the lowering cannot spell it differently. - [const ROUTE_HEADERS_WALK](https://docs.logicaffeine.com/logicaffeine_language/parser/lgx_lower/constant.ROUTE_HEADERS_WALK): The FOURTH walk: the headers of the response the matched route answered. - [const ROUTE_RESPONSE_WALK](https://docs.logicaffeine.com/logicaffeine_language/parser/lgx_lower/constant.ROUTE_RESPONSE_WALK): ★ THE SERVING WALK — the ONE `__lgx_route_handler` runs, answering a whole `Response`. - [const ROUTE_STATUS_WALK](https://docs.logicaffeine.com/logicaffeine_language/parser/lgx_lower/constant.ROUTE_STATUS_WALK) - [const SESSION_COOKIE](https://docs.logicaffeine.com/logicaffeine_language/parser/lgx_lower/constant.SESSION_COOKIE): The one cookie. See `lower_session` for why there is exactly one. - [const SESSION_LOADED_VAR](https://docs.logicaffeine.com/logicaffeine_language/parser/lgx_lower/constant.SESSION_LOADED_VAR) - [const SESSION_LOAD_FN](https://docs.logicaffeine.com/logicaffeine_language/parser/lgx_lower/constant.SESSION_LOAD_FN) - [const SESSION_NONCE_FIELD](https://docs.logicaffeine.com/logicaffeine_language/parser/lgx_lower/constant.SESSION_NONCE_FIELD): The hidden field every session carries, whether the author declared it or not: the value a visitor’s CSRF token is derived from. - [const SESSION_PAYLOAD_FN](https://docs.logicaffeine.com/logicaffeine_language/parser/lgx_lower/constant.SESSION_PAYLOAD_FN) - [const SESSION_SAVE_FN](https://docs.logicaffeine.com/logicaffeine_language/parser/lgx_lower/constant.SESSION_SAVE_FN) - [const SESSION_SECRET_VAR](https://docs.logicaffeine.com/logicaffeine_language/parser/lgx_lower/constant.SESSION_SECRET_VAR) - [const SESSION_VAR](https://docs.logicaffeine.com/logicaffeine_language/parser/lgx_lower/constant.SESSION_VAR): The module global a `## Session` lives in. Named `session` on purpose: it makes `the session's user` an ordinary possessive rather than a sentence form of its own. - [const SHARED_AREA](https://docs.logicaffeine.com/logicaffeine_language/parser/lgx_lower/constant.SHARED_AREA): The storage area a `shared on` store’s fields live in, keyed `"."`: the topics every page on them shares. - [const UNUSED_LOOKUP](https://docs.logicaffeine.com/logicaffeine_language/parser/lgx_lower/constant.UNUSED_LOOKUP): The lookup no listener ever has: the seed entry of every map keyed by lookup, which types the map’s key and is never looked up. - [const VDOM_CALLS](https://docs.logicaffeine.com/logicaffeine_language/parser/lgx_lower/constant.VDOM_CALLS): Every `vdom.lg` function a lowered page calls — the tape it writes, the commit, the sites and fragments it finds its nodes by. None of them appears in the author’s source, so the prelude splices vdom.lg for a page and the pruner keeps exactly these as roots (`loader.rs`); `vdom_calls_lock` holds this list to the calls the lowering writes. - [const VDOM_FEATURES](https://docs.logicaffeine.com/logicaffeine_language/parser/lgx_lower/constant.VDOM_FEATURES): Every `VdomFeature`: firm-key checks, matching by key, range resolution, hydration. - [fn action_fn_name](https://docs.logicaffeine.com/logicaffeine_language/parser/lgx_lower/fn.action_fn_name) - [fn answer_fn_name](https://docs.logicaffeine.com/logicaffeine_language/parser/lgx_lower/fn.answer_fn_name): `__lgx_answer(lookup, value) -> Bool` — run the listener one listener-table entry names, for the instance that registered it; the node dispatcher asks it for the entry waiting for the pressed key and for the one waiting for any. - [fn appear_at_binding](https://docs.logicaffeine.com/logicaffeine_language/parser/lgx_lower/fn.appear_at_binding): `__LGX_APPEAR_AT` — the next owed entry `appear_fn_name` runs. - [fn appear_fn_name](https://docs.logicaffeine.com/logicaffeine_language/parser/lgx_lower/fn.appear_fn_name): `__lgx_appear()` — every owed `When this component appears:`, first drawn first, each a turn of its own; run where a paint ends, never inside one. - [fn appear_key_binding](https://docs.logicaffeine.com/logicaffeine_language/parser/lgx_lower/fn.appear_key_binding): `__LGX_APPEAR_KEY` — the instance each owed `When this component appears:` belongs to. - [fn appear_who_binding](https://docs.logicaffeine.com/logicaffeine_language/parser/lgx_lower/fn.appear_who_binding): `__LGX_APPEAR_WHO` — which component each owed `When this component appears:` belongs to, as its place (from 1) among the components that have one; beside `appear_key_binding`, one entry per instance a paint drew for the first time, in the order it drew them. - [fn authored_construct](https://docs.logicaffeine.com/logicaffeine_language/parser/lgx_lower/fn.authored_construct): The construct an author wrote that the compiler-written function `name` was lowered from, named as the author knows it: ``## Route GET /agent``, `the `add` action of `## Component Counter``, ``## Directive focus``, or `the `## Route` table` for the walks that serve every route. Built on the forward helpers above over the constructs the program declares, so there is no inverse mapping to keep in step. `None` for a name no construct owns — a synthesized name never becomes text an author reads. - [fn bind_fn_name](https://docs.logicaffeine.com/logicaffeine_language/parser/lgx_lower/fn.bind_fn_name): The binding holding where a component last rendered, so a turn can repaint it. `__bind__(v)` — the write-back a bound input performs. - [fn block_slot_param](https://docs.logicaffeine.com/logicaffeine_language/parser/lgx_lower/fn.block_slot_param): The parameter a layout’s render reads its `{block }` out of: the node holding what the extending view drew for that block in its own scope, or `0` when it filled none and the layout draws its default. - [fn callback_arg_binding](https://docs.logicaffeine.com/logicaffeine_language/parser/lgx_lower/fn.callback_arg_binding): Where a callback prop’s own declared parameters are kept, per instance — the twin of `listener_arg_binding` for a handler whose target varies by placement instead of being fixed at the component’s own declaration. Typed by the prop’s own function type, which every action bound to it is required to match exactly, so one map serves every target the tag can name. - [fn callback_key_binding](https://docs.logicaffeine.com/logicaffeine_language/parser/lgx_lower/fn.callback_key_binding): The twin of `callback_tag_binding`: whose own instance the tag’s action runs against — the placing component’s key, recorded beside the tag so the two travel together. - [fn callback_tag_binding](https://docs.logicaffeine.com/logicaffeine_language/parser/lgx_lower/fn.callback_tag_binding): The module binding holding a CALLBACK PROP’s own identity, per instance: which `(component, action)` pair to run when the prop is called, as that pair’s tag (`events.rs::action_tag`) — never the pair itself, because the two scalars a map CAN hold are an index and a key, never a function reference. - [fn callback_trampoline_fn_name](https://docs.logicaffeine.com/logicaffeine_language/parser/lgx_lower/fn.callback_trampoline_fn_name): `__cb__(key, a…)` — the one function every call of a callback prop goes through: it reads the instance’s recorded identity and runs the action it names. - [fn cascade_binding](https://docs.logicaffeine.com/logicaffeine_language/parser/lgx_lower/fn.cascade_binding): `__LGX_CASCADE` — how many rounds of store watchers are running inside one another: a round that has watchers to run enters before they run and leaves after, and a round past `crate::ast::component::STORE_CASCADE_LIMIT` fails the page as one that never settles. - [fn commit_fn_name](https://docs.logicaffeine.com/logicaffeine_language/parser/lgx_lower/fn.commit_fn_name): `__lgx_commit(node)` — commits the tape into `node`’s retained children and hands the stream to the host, or fails the turn with the commit’s refusal and the document untouched. - [fn construct_heading](https://docs.logicaffeine.com/logicaffeine_language/parser/lgx_lower/fn.construct_heading): How an LGX construct is named in a refusal: by the header its author wrote. - [fn declares_session](https://docs.logicaffeine.com/logicaffeine_language/parser/lgx_lower/fn.declares_session): Whether a lowered program declares a `## Session` — read off the program itself, because the session’s loader is defined exactly when one is. A serving tier that composes page documents asks the router for the visitor’s token (`CSRF_TOKEN_PATH`) only then: without a session there is no token to ask for, and asking would run the handler for every page served. - [fn descends_fn_name](https://docs.logicaffeine.com/logicaffeine_language/parser/lgx_lower/fn.descends_fn_name): `__lgx_descends(k, under)` — whether instance key `k` was placed inside the instance keyed by `under` (a key and its trailing `/`); what a repaint of a placed component sweeps within. - [fn directive_fn_name](https://docs.logicaffeine.com/logicaffeine_language/parser/lgx_lower/fn.directive_fn_name): The function a `## Directive` lowers to. A directive is behavior attached to an element, and on this tier that is exactly what a function call is. - [fn directive_keys_binding](https://docs.logicaffeine.com/logicaffeine_language/parser/lgx_lower/fn.directive_keys_binding): `__DIRK_` — every attached occurrence of a directive with a `When removed:` block, by its identity (the instance key, `\u{1}`, its static site, and its row in every enclosing loop). - [fn directive_node_binding](https://docs.logicaffeine.com/logicaffeine_language/parser/lgx_lower/fn.directive_node_binding): `__DIRN_` — the element each attached occurrence was last drawn on. - [fn directive_queue_key_binding](https://docs.logicaffeine.com/logicaffeine_language/parser/lgx_lower/fn.directive_queue_key_binding): `__DIRQK_` — the identity of each queued occurrence of a directive with `When removed:`. - [fn directive_queue_site_binding](https://docs.logicaffeine.com/logicaffeine_language/parser/lgx_lower/fn.directive_queue_site_binding): `__DIRQS_` — the sites of the elements directive `d` sits on, queued by the render for the commit. - [fn directive_queue_value_binding](https://docs.logicaffeine.com/logicaffeine_language/parser/lgx_lower/fn.directive_queue_value_binding): `__DIRQV_` — the value each queued occurrence of directive `d` is drawn with. - [fn directive_removed_fn_name](https://docs.logicaffeine.com/logicaffeine_language/parser/lgx_lower/fn.directive_removed_fn_name): `__dir___removed` — a directive’s `When removed:` block, run with the element and value its occurrence was last attached with, once that occurrence is no longer drawn. - [fn directive_stamp_binding](https://docs.logicaffeine.com/logicaffeine_language/parser/lgx_lower/fn.directive_stamp_binding): `__DIRS_` — the paint pass each attached occurrence was last drawn in. - [fn directive_value_binding](https://docs.logicaffeine.com/logicaffeine_language/parser/lgx_lower/fn.directive_value_binding): `__DIRV_` — the value each attached occurrence was last drawn with. - [fn dispatch_fn_name](https://docs.logicaffeine.com/logicaffeine_language/parser/lgx_lower/fn.dispatch_fn_name): The program-wide event dispatcher: `__lgx_dispatch(selector, event)`. A driving verb on the bytecode tier calls it, and it routes to the action the view attached — decided here, as data, because a page has no way to call a closure it found at run time. - [fn dispatch_node_fn_name](https://docs.logicaffeine.com/logicaffeine_language/parser/lgx_lower/fn.dispatch_node_fn_name): The dispatcher’s node half: `__lgx_dispatch_node(node, event, value)` — a host that already holds the element (a focus change: the element that lost focus, the one that gained it) raises an event on it without a selector naming it. - [fn drain_directives_fn_name](https://docs.logicaffeine.com/logicaffeine_language/parser/lgx_lower/fn.drain_directives_fn_name): `__lgx_drain_directives()` — runs every directive occurrence the committed paint drew. - [fn draw_depth_param](https://docs.logicaffeine.com/logicaffeine_language/parser/lgx_lower/fn.draw_depth_param): The parameter a drawing takes how deep it is nested in its own kind in: a template among templates (`__view_`), a served component among served components (`__serve_`). Past `RENDER_DEPTH_LIMIT` the drawing fails in the render-depth words. - [fn due_binding](https://docs.logicaffeine.com/logicaffeine_language/parser/lgx_lower/fn.due_binding): `__DUE__` — the page time (`__LGX_NOW`’s clock) at which handler `i` of `C` next fires, per instance. `-1` is “not running”, which is what a `Stop the … timer.` writes and what a one-shot leaves behind. - [fn empty_view_variant_name](https://docs.logicaffeine.com/logicaffeine_language/parser/lgx_lower/fn.empty_view_variant_name): `__View_none` — the empty view: what a View prop holds before anything is handed to it. - [fn failing_component_binding](https://docs.logicaffeine.com/logicaffeine_language/parser/lgx_lower/fn.failing_component_binding): `__LGX_FAIL_C` / `__LGX_FAIL_K` — WHICH turn is running right now: a component id and an instance key, written at the top of every turn. - [fn failing_key_binding](https://docs.logicaffeine.com/logicaffeine_language/parser/lgx_lower/fn.failing_key_binding) - [fn failure_context_binding](https://docs.logicaffeine.com/logicaffeine_language/parser/lgx_lower/fn.failure_context_binding): `__LGX_CONTEXT` — what the page is doing that a trap should be named by (a directive’s block), in the words every tier puts in front of the trap’s message; `""` outside any. - [fn failure_context_fn_name](https://docs.logicaffeine.com/logicaffeine_language/parser/lgx_lower/fn.failure_context_fn_name): `__lgx_failure_context() -> Text` — the context a trap left open, taken (the page is back outside any once a host has read it). - [fn forget_listener_fn_name](https://docs.logicaffeine.com/logicaffeine_language/parser/lgx_lower/fn.forget_listener_fn_name): `__lgx_forget_listener(lookup)` — retire one registration: its entry in every map keyed by lookup and its place in a spilled slot’s list; or, while a delivery holds it, mark it to go when the delivery lets go. - [fn forwarded_binding](https://docs.logicaffeine.com/logicaffeine_language/parser/lgx_lower/fn.forwarded_binding): `__LGX_HEARD__` — whether the page already forwards what handler `i` of `C` waits for (a window event, a relay topic) to its dispatcher; the forwarder is attached once per page. - [fn frag_key_binding](https://docs.logicaffeine.com/logicaffeine_language/parser/lgx_lower/fn.frag_key_binding): `__LGX_FRAGK` — the instance key each fragment id is drawn for. - [fn frag_owner_binding](https://docs.logicaffeine.com/logicaffeine_language/parser/lgx_lower/fn.frag_owner_binding): `__LGX_FRAGC` — the component (its position among the lowered components, from 1) each fragment id is an instance of; `0` for an id no instance holds. - [fn gone_fn_name](https://docs.logicaffeine.com/logicaffeine_language/parser/lgx_lower/fn.gone_fn_name): `__lgx_gone()` — the unmount sweep: every instance whose fragment the last commit removed loses its registries, tells its `When this component disappears:` handler, and hands its sites back. - [fn host_entry_of](https://docs.logicaffeine.com/logicaffeine_language/parser/lgx_lower/fn.host_entry_of): The `LGX_ENTRIES` row `name` enters by: its own row, or its family’s. - [fn html_fn_name](https://docs.logicaffeine.com/logicaffeine_language/parser/lgx_lower/fn.html_fn_name): `__html_()` — component `C`’s markup, as `html of C` asks for it: `C` drawn by its server render into a root no host holds, serialized, and the root discarded. - [fn instance_key_param](https://docs.logicaffeine.com/logicaffeine_language/parser/lgx_lower/fn.instance_key_param): The module-level binding a component’s state field lives in. Prefixed with the component’s name so two components’ `n` are two different bindings. The parameter every instance-aware synthesized function carries: WHICH instance it is acting for. A component’s state is a map from this key to that instance’s value, so two placements of one component keep separate records, each instance addressed by its key path. - [fn is_browser_only_lowering](https://docs.logicaffeine.com/logicaffeine_language/parser/lgx_lower/fn.is_browser_only_lowering): ★ WHICH SYNTHESIZED FUNCTIONS NEED A DOCUMENT — the one place the answer lives. - [fn is_compiler_written](https://docs.logicaffeine.com/logicaffeine_language/parser/lgx_lower/fn.is_compiler_written): Is this a name the COMPILER wrote, rather than one the author typed? - [fn json_bare_scalar_name](https://docs.logicaffeine.com/logicaffeine_language/parser/lgx_lower/fn.json_bare_scalar_name): Why a `## Route` cannot be lowered to a plain function yet. - [fn keeps_instance_registry](https://docs.logicaffeine.com/logicaffeine_language/parser/lgx_lower/fn.keeps_instance_registry): Whether this component keeps a live-instance registry (`__KEYS_` / `__SEEN_`). - [fn keys_binding](https://docs.logicaffeine.com/logicaffeine_language/parser/lgx_lower/fn.keys_binding): `__KEYS_` — every instance key of `C` that has ever rendered, in first-render order. - [fn listener_arg_binding](https://docs.logicaffeine.com/logicaffeine_language/parser/lgx_lower/fn.listener_arg_binding): Where a registered listener’s ARGUMENTS are kept, per instance. - [fn listener_fn_binding](https://docs.logicaffeine.com/logicaffeine_language/parser/lgx_lower/fn.listener_fn_binding): `__LISTENER_FN` — the site each registered listener runs, by its lookup: its slot for the first listener waiting there, a spilled lookup (`listener_spill_binding`) for each one after it. - [fn listener_held_binding](https://docs.logicaffeine.com/logicaffeine_language/parser/lgx_lower/fn.listener_held_binding): `__LISTENER_HELD` — how many deliveries in flight hold each lookup. A delivery fixes the listeners it will run before running any, as a browser does, so a listener whose element an earlier listener’s turn redrew still answers: retiring a held lookup waits for its last holder. - [fn listener_key_binding](https://docs.logicaffeine.com/logicaffeine_language/parser/lgx_lower/fn.listener_key_binding): The instance key each registered listener belongs to — the twin of `listener_fn_binding`. - [fn listener_left_binding](https://docs.logicaffeine.com/logicaffeine_language/parser/lgx_lower/fn.listener_left_binding): `__LISTENER_LEFT` — the held lookups retired while held, forgotten when their last holder lets go. - [fn listener_once_binding](https://docs.logicaffeine.com/logicaffeine_language/parser/lgx_lower/fn.listener_once_binding): `__LISTENER_ONCE` — the `.once` identity of each registered listener, keyed like `listener_fn_binding`, so the dispatcher can spend the listener it resolved. - [fn listener_sites_binding](https://docs.logicaffeine.com/logicaffeine_language/parser/lgx_lower/fn.listener_sites_binding): `__LISTENER_SITES_` — every listener lookup THIS instance registered in its LAST paint. - [fn listener_space_binding](https://docs.logicaffeine.com/logicaffeine_language/parser/lgx_lower/fn.listener_space_binding): `__LISTENER_SPACE` — how many listener entries (event names, and event-and-key pairs) the program registers. A listener’s SLOT is `node * __LISTENER_SPACE + code`, so every (element, entry) pair has a slot of its own however many entries the program has; declared once every entry is known. - [fn listener_spill_binding](https://docs.logicaffeine.com/logicaffeine_language/parser/lgx_lower/fn.listener_spill_binding): `__LISTENER_MORE` — the lookups of every listener past the first waiting on one slot, in the order they registered: one element can wait for one event several times over (a directive and a sentence, two sentences, two instances naming it), and each answers. Empty unless a slot has several listeners, so the common slot costs nothing here. - [fn listener_spill_count_binding](https://docs.logicaffeine.com/logicaffeine_language/parser/lgx_lower/fn.listener_spill_count_binding): `__LISTENER_SPILLED` — how many listeners have ever spilled. The n-th spilled listener’s lookup is `-1 - n`: below every slot (slots are never negative), never reused, and never `UNUSED_LOOKUP`, which the listener maps are seeded with. - [fn listener_spill_slot_binding](https://docs.logicaffeine.com/logicaffeine_language/parser/lgx_lower/fn.listener_spill_slot_binding): `__LISTENER_MORE_AT` — the slot each spilled listener waits on, so retiring it finds its list. - [fn loop_placed_components](https://docs.logicaffeine.com/logicaffeine_language/parser/lgx_lower/fn.loop_placed_components) - [fn lowerable](https://docs.logicaffeine.com/logicaffeine_language/parser/lgx_lower/fn.lowerable): Whether this component’s view is expressible as plain DOM calls. - [fn mount_binding](https://docs.logicaffeine.com/logicaffeine_language/parser/lgx_lower/fn.mount_binding) - [fn mount_fn_name](https://docs.logicaffeine.com/logicaffeine_language/parser/lgx_lower/fn.mount_fn_name): The entry point a `Mount` calls: record where the component renders, run its load handlers once, then paint. Distinct from the render function, which runs again on every repaint — a load handler that ran on each repaint would not be a load handler. - [fn moved_binding](https://docs.logicaffeine.com/logicaffeine_language/parser/lgx_lower/fn.moved_binding): `__LGX_MOVED` — set when a turn moved the location within the page, and taken by that turn’s epilogue, which delivers the move to the page’s route listeners. - [fn now_binding](https://docs.logicaffeine.com/logicaffeine_language/parser/lgx_lower/fn.now_binding): `__LGX_NOW` — the page’s own clock, in milliseconds since the page started, moved only by `__lgx_tick(ms)`. - [fn on_failure_fn_name](https://docs.logicaffeine.com/logicaffeine_language/parser/lgx_lower/fn.on_failure_fn_name): `__lgx_on_failure(message)` — run the failure handler of whichever component was mid-turn. The browser host calls it from the one place that catches. - [fn once_record_binding](https://docs.logicaffeine.com/logicaffeine_language/parser/lgx_lower/fn.once_record_binding): `__ONCE_` — every `.once` identity an instance of `C` has spent, per instance key, so the unmount sweep can forget them when the instance leaves and a remount starts with its listeners armed. - [fn once_spent_binding](https://docs.logicaffeine.com/logicaffeine_language/parser/lgx_lower/fn.once_spent_binding): `__LGX_ONCE` — the identity of every `.once` listener that has answered, mapped to `true`. An identity is the listener’s author-level address — its instance key, its static site, and its row in every enclosing `{for each}` — so it survives a repaint that draws the element again with a fresh node, and a spent listener stays spent however its element is redrawn. - [fn open_keys_binding](https://docs.logicaffeine.com/logicaffeine_language/parser/lgx_lower/fn.open_keys_binding): `__LGX_OPEN_KEYS` — the journal instance of each open turn, beside its name in `open_turns_binding`. - [fn open_turns_binding](https://docs.logicaffeine.com/logicaffeine_language/parser/lgx_lower/fn.open_turns_binding): `__LGX_OPEN_TURNS` — the journal names of the turns in progress, innermost last: a turn pushes its name first and pops it just before it journals itself, so a trap leaves exactly the turns it interrupted here, for the failure door to journal innermost-first. - [fn outbox_count_binding](https://docs.logicaffeine.com/logicaffeine_language/parser/lgx_lower/fn.outbox_count_binding): The page’s OUTBOX: the element events turns have asked for and not yet had delivered — how many (`outbox_count_binding`) and, at positions `1..=count`, three parallel `Int`-keyed maps of selector, event and carried value — appended where the asking statement RUNS and emptied by the flush that follows a turn’s write-back. - [fn outbox_event_binding](https://docs.logicaffeine.com/logicaffeine_language/parser/lgx_lower/fn.outbox_event_binding) - [fn outbox_flush_event](https://docs.logicaffeine.com/logicaffeine_language/parser/lgx_lower/fn.outbox_flush_event): The reserved event a turn’s epilogue dispatches to flush the outbox (`lower_lgx_dispatcher`’s first arm). - [fn outbox_selector_binding](https://docs.logicaffeine.com/logicaffeine_language/parser/lgx_lower/fn.outbox_selector_binding) - [fn outbox_value_binding](https://docs.logicaffeine.com/logicaffeine_language/parser/lgx_lower/fn.outbox_value_binding) - [fn own_frag_fn_name](https://docs.logicaffeine.com/logicaffeine_language/parser/lgx_lower/fn.own_frag_fn_name): `__lgx_own_frag(frag, who, key)` — records which instance a fresh fragment id is drawn for. - [fn owns_fn_name](https://docs.logicaffeine.com/logicaffeine_language/parser/lgx_lower/fn.owns_fn_name): `__lgx_owns(path) -> Bool` — whether this module’s `## Page` serves `path` (its query and fragment set aside): the one rule deciding whether a move to `path` stays in the page (`navigate`, a pushState) or loads another document (`assignLocation`). `Navigate to` branches on it, and a host’s link-following asks it. - [fn pass_binding](https://docs.logicaffeine.com/logicaffeine_language/parser/lgx_lower/fn.pass_binding): The paint-pass counter every instance stamps itself with. One per program. - [fn patch_fn_name](https://docs.logicaffeine.com/logicaffeine_language/parser/lgx_lower/fn.patch_fn_name): The per-turn patcher: `__patch__`. - [fn period_binding](https://docs.logicaffeine.com/logicaffeine_language/parser/lgx_lower/fn.period_binding): `__PERIOD__` — handler `i` of `C`’s period in milliseconds on each instance, as its sentence read when the instance was drawn: what a repeating timer re-arms by and what `Start the timer …` restarts it from. - [fn place_view_fn_name](https://docs.logicaffeine.com/logicaffeine_language/parser/lgx_lower/fn.place_view_fn_name): `__lgx_place_view(view, scope, depth)` — draw whichever template a View value is a call of. - [fn placed_components](https://docs.logicaffeine.com/logicaffeine_language/parser/lgx_lower/fn.placed_components) - [fn prop_binding](https://docs.logicaffeine.com/logicaffeine_language/parser/lgx_lower/fn.prop_binding): The module binding holding a component’s PROP values, per instance. - [fn raise_fn_name](https://docs.logicaffeine.com/logicaffeine_language/parser/lgx_lower/fn.raise_fn_name): `Raise "offline".` on the bytecode tier. - [fn rearm_fn_name](https://docs.logicaffeine.com/logicaffeine_language/parser/lgx_lower/fn.rearm_fn_name): `__lgx_rearm()` — ask the host to wake the page when its earliest running timer comes due (`wakeAfter`), or to wake it for none. Called after every arming, stop and start, and at the end of every tick. - [fn render_depth_binding](https://docs.logicaffeine.com/logicaffeine_language/parser/lgx_lower/fn.render_depth_binding): `__LGX_RENDER_DEPTH` — how many renders of components that can be drawn inside themselves are running inside one another; one past `crate::ast::component::RENDER_DEPTH_LIMIT` fails the paint as one with no finite rendering. - [fn render_fn_name](https://docs.logicaffeine.com/logicaffeine_language/parser/lgx_lower/fn.render_fn_name): The name of a component’s render function: `__render_`. The VM builds the same name from a `Mount`, so the two sides agree without a table between them. - [fn render_frag_param](https://docs.logicaffeine.com/logicaffeine_language/parser/lgx_lower/fn.render_frag_param): The render function’s parameter holding the fragment its instance is drawn as — what the sites its paint hands out are kept against (`vdAnchor`). - [fn render_slot_param](https://docs.logicaffeine.com/logicaffeine_language/parser/lgx_lower/fn.render_slot_param): `__html_()` — the server-rendered markup of a component’s view. The parameter a rendered component reads its `{children}` out of in a BROWSER: the node holding the caller’s children, or `0` for a placement that gave none. - [fn repaint_root_fn_name](https://docs.logicaffeine.com/logicaffeine_language/parser/lgx_lower/fn.repaint_root_fn_name): `__lgx_repaint_root()` — repaint the page from its root (the instance keyed `""`), the answer to a change any component may show: what a turn that moved a store paints, and what a shared store runs when another replica’s write arrives. - [fn route_changed_fn_name](https://docs.logicaffeine.com/logicaffeine_language/parser/lgx_lower/fn.route_changed_fn_name): `__lgx_route_changed()` — deliver a move of the location to every live instance of every component with a `When the route changes:` handler. The page registers it with the host once, at start (`onRoute`), and a turn whose own `Navigate to` moved the location calls it at its epilogue, so a placed component hears the move exactly as a mounted one does. - [fn route_fn_name](https://docs.logicaffeine.com/logicaffeine_language/parser/lgx_lower/fn.route_fn_name): `__route__` — the function a `## Route` becomes. - [fn route_heading](https://docs.logicaffeine.com/logicaffeine_language/parser/lgx_lower/fn.route_heading): A route’s own heading, as its author wrote it — the one place a route names itself in a refusal, called by both the tree-walker and the VM compiler so the wording cannot diverge. - [fn route_lowerable](https://docs.logicaffeine.com/logicaffeine_language/parser/lgx_lower/fn.route_lowerable) - [fn route_refusals](https://docs.logicaffeine.com/logicaffeine_language/parser/lgx_lower/fn.route_refusals): Every `## Route` this program cannot lower, and why — computed ONCE where the whole program is visible, for the tiers whose per-statement walk cannot see it. - [fn scope_class](https://docs.logicaffeine.com/logicaffeine_language/parser/lgx_lower/fn.scope_class) - [fn seed_key](https://docs.logicaffeine.com/logicaffeine_language/parser/lgx_lower/fn.seed_key): The key the per-instance maps are SEEDED with, purely to give themselves a type. - [fn seen_binding](https://docs.logicaffeine.com/logicaffeine_language/parser/lgx_lower/fn.seen_binding): `__SEEN_` — the key of every instance of `C` that has ever rendered, mapped to the PAINT PASS it last rendered in. - [fn seq_binding](https://docs.logicaffeine.com/logicaffeine_language/parser/lgx_lower/fn.seq_binding): `__SEQ__` — when handler `i` of `C` was armed on each instance, in arming order across the page: two timers due at one moment fire in the order they were armed. - [fn serve_fn_name](https://docs.logicaffeine.com/logicaffeine_language/parser/lgx_lower/fn.serve_fn_name): `__serve_(props…, slot, blocks…)` — component `C` drawn onto the tape to be serialized: the same walk as its `__render_` over its initial state, writing only the records its markup is made of (`LowerTrail::serving`). - [fn shared_arrival_fn_name](https://docs.logicaffeine.com/logicaffeine_language/parser/lgx_lower/fn.shared_arrival_fn_name): `__lgx_shared(topic, key, frame)` — the relay’s entry: a frame another page published. - [fn shared_base_binding](https://docs.logicaffeine.com/logicaffeine_language/parser/lgx_lower/fn.shared_base_binding): The plain value a convergent field of shared store `store` last adopted — what the next action’s change to `field` is read against. - [fn shared_clock_binding](https://docs.logicaffeine.com/logicaffeine_language/parser/lgx_lower/fn.shared_clock_binding): This page’s Lamport clock for its shared stores. - [fn shared_ids_binding](https://docs.logicaffeine.com/logicaffeine_language/parser/lgx_lower/fn.shared_ids_binding): The node id behind each element of shared sequence `field` of `store`, in its order. - [fn shared_join_fn_name](https://docs.logicaffeine.com/logicaffeine_language/parser/lgx_lower/fn.shared_join_fn_name): `__join_()` — the replica joins its topic: it adopts what the topic holds and publishes the rest. Runs before the first statement that reads one of its fields. - [fn shared_joined_binding](https://docs.logicaffeine.com/logicaffeine_language/parser/lgx_lower/fn.shared_joined_binding): Whether the shared-store replica `store` has joined its topic. - [fn shared_publish_fn_name](https://docs.logicaffeine.com/logicaffeine_language/parser/lgx_lower/fn.shared_publish_fn_name): `__publish_()` — publish every field the replica’s action moved, then refresh the topic’s other joined replicas. - [fn shared_refresh_fn_name](https://docs.logicaffeine.com/logicaffeine_language/parser/lgx_lower/fn.shared_refresh_fn_name): `__refresh_()` — a joined replica adopts what its topic holds. - [fn shared_replica_binding](https://docs.logicaffeine.com/logicaffeine_language/parser/lgx_lower/fn.shared_replica_binding): This page’s replica id, drawn once per page load by a page with a convergent shared field: the part of every tag and node id that no other page’s can share. - [fn site_binding](https://docs.logicaffeine.com/logicaffeine_language/parser/lgx_lower/fn.site_binding): The module binding that remembers WHERE one updatable site’s node landed. - [fn state_binding](https://docs.logicaffeine.com/logicaffeine_language/parser/lgx_lower/fn.state_binding) - [fn stateful](https://docs.logicaffeine.com/logicaffeine_language/parser/lgx_lower/fn.stateful) - [fn store_area](https://docs.logicaffeine.com/logicaffeine_language/parser/lgx_lower/fn.store_area): Whether a store’s state can be given a record type here. A derived field or a field whose type cannot be named from its annotation or its initializer means it cannot. The storage AREA a store keeps its state in between page loads, or `None` for one that keeps nothing there. The area is the lifetime the author asked for, spelled the way the browser spells it — the one decision every tier reads, so every tier puts a persisted store in the same place. - [fn store_moved_binding](https://docs.logicaffeine.com/logicaffeine_language/parser/lgx_lower/fn.store_moved_binding): `__MOVED__` — set by a store action whose commit moved a field some component watches, and taken by the next store-watcher round (`wake_stores_fn_name`). - [fn store_type_name](https://docs.logicaffeine.com/logicaffeine_language/parser/lgx_lower/fn.store_type_name): The record type a `## Store` lowers to. A store is a singleton with named fields, which is what a record is — so `Session's name` stays an ORDINARY field access on both tiers and no expression anywhere needs rewriting. - [fn stores_dirty_binding](https://docs.logicaffeine.com/logicaffeine_language/parser/lgx_lower/fn.stores_dirty_binding): `__LGX_STORES_DIRTY` — set by every store action’s commit and cleared by every repaint from the page root: whether the page may still show a store as it was before a commit. A turn that moved a store repaints from the root; one that trapped first never did, and the failure door repaints for it. - [fn styled_binding](https://docs.logicaffeine.com/logicaffeine_language/parser/lgx_lower/fn.styled_binding): The class a component’s `Style:` is scoped to, and which its own elements carry. The server walk stamps the same class, or the two would render the same page with different class lists. The module binding holding whether this component’s stylesheet has been emitted in the CURRENT paint. A `Style:` block is one `