Package org.ek9lang.compiler.support


package org.ek9lang.compiler.support
Contains critical general components used in the Ek9Compiler listeners.

The SymbolFactory and AggregateManipulator are the primary sources of new Symbols or additions to exiting symbols. There are also other classes like ResolveOrDefineExplicitParameterizedType that take generic types and parameters and create new parameterised types.

So this package is mainly focussed on creation of symbols and validation (to some extent). There are some quite complex processes going on in here, specifically TypeSubstitution.

Another set of classes also deal with the thorny issues around defining and creating parameterised types (but take into account chaining the need to create further dependent parameterised types).

One of the trickiest bits of code is around the creation of parameterised types, this is explained below.

The method ModuleScope.resolveOrDefine(org.ek9lang.compiler.symbols.PossibleGenericSymbol, org.ek9lang.compiler.common.ErrorListener) calls into the CompilableProgram.resolveOrDefine(org.ek9lang.compiler.symbols.PossibleGenericSymbol) This code checks if a parameterised symbol already exists for what is being asked for (the symbol being asked for is not fully defined yet as it is just a form of lookup). This 'lookup' originated in SymbolFactory.newParameterisedSymbol(org.ek9lang.compiler.symbols.PossibleGenericSymbol, java.util.List). That method delegated to ParameterizedSymbolCreator. It was then 'routed via SymbolsAndScopes, this is a critical component used in almost all the 'listeners' that are called when the 'ANTLR' AST is traversed.

Anyway, back to the point; There is a little nuance that needs to be highlighted because it is different from how all other symbols are created. Almost all other symbols are created by the traversal of the AST and then the code that the EK9 developer writes gets pushed into the appropriate symbol (i.e. methods, properties, etc.). But when parameterizing generic types (polymorphic types), we have essentially a 'template' but using conceptual types like 'T' for example.

So when we want to 'define or lookup' a parameterized polymorphic type if that type exists in the appropriate module we just want to reference it. So if the type does exist then we're all good and ResolvedOrDefineResult is returned with the symbol and a flag stating that it is not newly defined.

But if it does not exist, then CompilableProgram will add the 'skeleton' PossibleGenericSymbol to the appropriate module, but will now set the returning flag to new defined. This is really critical, because now that 'skeleton' needs to actually be parameterised. This is done in TypeSubstitution (it is called by ModuleScope and it checks if the type is newly defined or not, if not then it goes about the task of parameterizing it.

The Type Substitution is now driven from the phase of compilation, so the Parameterized Types stay as skeletons for much longer. Only at full resolution are they expanded.

But there's a wrinkle, what if during that parameterization process more parameterized types are needed? The class TypeSubstitution does recursive calls back into the CompilableProgram calling CompilableProgram.resolveOrDefine(org.ek9lang.compiler.symbols.PossibleGenericSymbol) for its needs.

So this is why the construction of parameterized types is in phases, because during parameterization there could (probably will) be references to other parameterized types that are in the process of being created. So by recording the 'skeleton' in the appropriate module, the CompilableProgram will return 'true' for newly defined the first time, but 'false' on additional requests (even though it is still just a skeleton). Eventually (just like any recursive function) the stack of Parameterized types being created will 'unwind', resulting in any newly defined Parameterized types being created/record and then having methods and properties populated with the appropriate types.

The end result is that the first time a Parameterized type is needed it is recorded and populated, but subsequent requests result in that initial type being returned. This is why the recording aspect is done within the CompilableProgram, because access is controlled within a mutex lock.

  • Class
    Description
    Uses the symbol and scope management to traverse back up stack to determine if the outer parent is a generic type or not and also if this symbol passed in is a generic type.
    THE add-if-not-already-there by IDENTITY: item is added to list unless that very object is already in it.
    Deals with the creation of various aggregate types.
    Support for taking one aggregate and manipulating the methods and the like to be applied to another aggregate.
    THE order of the members of an aggregate body (E01086, Steve 2026-10-11): properties first, then constructors and methods, then operators (an explicit operator, override operator or default operator X, in any order among themselves), and a bare default operator as the LAST item of all.
    The first member of a body out of order.
    THE search for the built-in Any through a scope: the fully qualified name, of category ANY - a category only AnyTypeSymbol has, so nothing a user declares can answer it.
    THE declared (target) type an assignmentExpression is given to - use it, do not re-derive the walk.
    THE test for a generic's bare type parameter T itself, as opposed to a generic that HAS type parameters.
    Factory for fairly basic symbols.
    THE body method of a program: the compiler-made _main that holds what was written in the program, and which IS the program wherever a person reads about it.
    THE Boolean truth guard rule (Steve, 2026-10-07, decision D9.2) - use this, do not re-derive it.
    THE rule B of the closeable ownership decision (Steve, 2026-10-21): may a value of this RETURN type hold a borrowed VIEW of a closeable that was passed in - i.e.
    The symbol a recorded symbol BINDS its occurrence to: for a call, the callable it resolved to, never the call itself; anything else (null included) as it is.
    THE identity of a callable in the phase-5 call graph — module::Aggregate.member(T1,T2) for a method, module::Aggregate.member for any other aggregate member, and the plain fully-qualified name for everything else.
    THE short display name of a callable's identity: some.module::Type.method(some.module::ParamType) reads as Type.method(ParamType) - every module qualifier dropped, from the owner and from each parameter type (a parameterised type's Dict of (m::K, m::V) included) - and a compiler-made name made readable (FriendlyInternalName: _List_<digest> reads List, _Function_<digest> reads fn).
    True when the constructor makes an explicit super(...) call (recorded in phase 3).
    THE identity set of a symbol and every copy of it captured inside a fragment of the COMPILED tree - what SymbolUses counts as the same variable.
    Records that a constructor is THE capture constructor of its dynamic class (IsCaptureConstructor, which is the only reader).
    THE copy a dynamic function or class makes from one argument of its capture list (CaptureAliases follows these).
    Records what the captures of a dynamic class are to its constructors (phase 3 only, once the capture constructor is decided).
    THE "is this symbol one of the variables a dynamic function or class captured?" - by IDENTITY, never by name.
    Deals with normal operators (i.e.
    Checks that the use of the variable only if it has a web variable correlation is valid.
    If the aggregate is a generic parameterised type this function triggers a check for duplicated methods.
    Error when the definition of a service is invalid.
    Error when the definition of a service operator is invalid.
    Checks that a service operation has a security posture, either inherited from its parent service or declared on the operation itself.
    THE check that a service is written in its one form (Steve, 2026-10-11): for before every URI - the service's own (Items for :/items open) and each operation's (byId() as GET for :/{id}, operator += for :/) - and as before an HTTP verb.
    THE re-typing of members that were cloned from a template onto their new owner - use this, never a variant.
    THE rule that a closeable type is never a type argument (E81061, Steve 2026-10-06, option A - strict).
    Just for details that are common to all factories.
    For use when looking to find common types.
    Which common type CommonTypeOrError is asked for.
    THE common-type deduction - for collections (List/Dict literals, ranges, stream 'cat') and for the operators that SELECT one of their operands (?:, <? >?, the ternary).
    Given a list of symbols (normally variables), this code will get the type from each of those symbols.
    Fixed set of constants that tend to be used to 'squirrel' away data - these are the keys.
    The canonical vocabulary of EK9 comparison-operator glyphs, as named subsets, so that PRE_IR checks reference a single source instead of hand-spelling (and silently diverging) their own switch/Set each time.
    THE marking of a type whose every member the COMPILER writes - an enumeration and a constrained (or alias) type: each member is synthetic and has a source token, set by the front end where the members are made.
    Evaluates a ConstraintExpr against a compile-time-constant subject value, returning a tri-state verdict.
    PASS = constraint satisfied; FAIL = provably violated; UNKNOWN = cannot determine statically.
    THE record of what a generic's body USES of its conceptual T, and the reading of it.
    How the generic's body asks a type built on its type parameters to order, which decides the verdict where the parameters are replaced: exactly the one the same type gets when it is written directly (phase 5's RetractedComparatorUseOrError).
    One step towards a <=> on a bare type parameter, recorded on that parameter (D89, D91 step 4): the body of a method or function orders the parameter's values itself (into null - a <=> on them, or a value given to a function delegate), or hands them on to another body that may (into, whose own parameter intoParameter they become - the generic's own method, the same parameter; a generic function, the type parameter they are bound to).
    One ordering the generic's body asks of a type built on its type parameters.
    You may think why this mapping.
    THE shared conceptual-to-concrete type replacement - use this, do not re-derive a variant.
    Recursively resolve a type reference to the leaf CONCRETE type symbols it actually couples to, skipping conceptual Ts.
    THE recovery of the base type a CONSTRAINED type narrows — call this, do not re-derive it.
    The base enumeration of a CONSTRAINED enumeration (RedSuit as CardSuit constrain as ...); empty for a base enumeration and for anything not enumeration-based.
    THE display name of a construct - the name a person reads for it at RUN TIME (F2, Steve 2026-10-08, Contract 21 in EK9_BACKEND_IR_CONTRACTS.md).
    THE steps a constructor of an aggregate takes before its own body - use this wherever those steps are generated or modelled, so the generated code and the phase-5 call graph cannot disagree about what construction runs.
    THE properties a constructor of aggregate is responsible for: for a dynamic class its captures first (they live in the capture scope, not the class's own symbol table), then its DeclaredProperties.
    THE single enumeration of the type references a construct makes through its signature — super (extends), traits (implements), field types (composes), method / function parameter and return types (references), and closed-over captured-variable types (captures).
    One signature-level type reference: the relationship kind and the (raw) referenced type.
    THE copy constructor of a type: a PUBLIC constructor taking exactly one argument of EXACTLY that type - Step(Step).
    THE emission of a diagnostic raised by a whole-program analysis, which finds its error listener by LOOKING UP the source its token belongs to (call-graph detectors, the deadlock check, construction recursion, injection reachability).
    THE direct dependencies a defines package block declares, in the order written: every entry of its deps and devDeps Dicts whose key and version are both String literals (a malformed Dict is PackageProperties' E06260, not this class's business).
    One declared dependency: the Dict it is in, its module name, its version and the token of its entry.
    THE properties a type DECLARES itself, the property half of the fields an object of it carries (the other half, for a dynamic class, is CapturedVariables).
    THE inverse of CallableIdentity: the declaring construct of a call-graph identity.
    Useful function that generates the decorated/internal name for generic types that have been parameterized.
    THE decision of which operator a GENERATED comparison is answered by - hold one and use it, do not re-derive it.
    THE test of whether a type already has what a default operator would give it - hold one and apply it, do not re-derive it.
    True when the constructor delegates to a sibling with this(...) (recorded in phase 3, ThisOrSuperCallOrError).
    Just focuses on creating directives, these are used when testing EK9 source code.
    THE single source of truth for the handler set of a dispatcher entry point - hold one and ask it.
    THE single source of truth for "what types can actually arrive at this dispatcher parameter" - hold one and ask it.
    THE single source of truth for "which handler WINS for this concrete type" - hold one and ask it.
    A winning handler and the assignment cost it won at.
    ConstructDisplayName with a dynamic construct among the type arguments left as its mangled name, so two parameterisations over two different dynamic classes never share it (both are Box of cls in ConstructDisplayName).
    Extracts doc comment text from HIDDEN channel tokens.
    Every declaration in this package block that sets a property an earlier one already set - reported (E50050) as DuplicatePackagePropertyMessage, at the later declaration's name.
    The message for a package property set twice (DuplicatePackageProperties), after In '<module>' package: .
    THE edit distance behind the compiler's "did you mean" hints for a misspelt WORD - a keyword (repair/ParseSuggestions) or a package property name (PackageProperties): optimal string alignment, where an insertion, a removal, a change and a transposition of adjacent characters (esle, verison) each count one; case-sensitive.
    THE set of EK9 core modules - the modules only the compiler bootstrap may define.
    THE source for EK9's word keywords (Ek9Keywords.WORD_KEYWORDS); whether a keyword can still be used as a NAME is IsReservedWord.
    THE single source of truth for EK9 literal types — the finite, closed set of built-in types a literal can denote.
    Fixed and Known EK9 types that the compiler needs to know exist.
    THE "which method or operator is this node directly in?" - the declaration whose code runs when this node runs.
    THE "is this node inside a property's initialiser, and which one?" - the PropertyInitialiser a node is in.
    True when the final step of the object-access chain (ObjectAccessFinalStep) is a method/operation call rather than a plain field identifier - e.g.
    THE test "this method or constructor takes exactly these parameter types, in this order" - each by isExactSameType, never by assignability, promotion or a cost-based match.
    THE test "this method or operator takes exactly ONE parameter, and its type is EXACTLY this type" - by isExactSameType, never by assignability.
    THE expansion of the E11031 document tokens: text with NonDescriptiveNames.BANNED_NAMES_TOKEN replaced by NonDescriptiveNames.PROSE and NonDescriptiveNames.ALTERNATIVES_TOKEN by NonDescriptiveNames.ALTERNATIVES - for every loader of a document that publishes the list (rich error messages, message packs, Q&A answers, the CLI/AI help, the site).
    The native footprint of a field-bearing extern base (Exception, Money, ...), or empty for a user type or a field-less extern type.
    THE test for "is this symbol provided from OUTSIDE this workspace's EK9 source?" — a built-in, or any member of an extern construct.
    Extracts the literal an expression resolves to, or null if it is not a (possibly negated) literal.
    THE rule of Q-COMPONENT-? (Steve, 2026-10-07): a type with NO fields, counting inherited ones, is set whenever it is present.
    THE field-slot rule: the index of a property in an object's flat field layout, as every back end lays it out and as the IR's LOAD_FIELD/STORE_FIELD/RELEASE_FIELD index states it (Contract 2: the index is the slot).
     
    THE single source of truth for the gated-type → required-capability mapping and its coverage rules.
    Used to see if it is possible to resolve types, both simple and parametric.
    THE fields a generated operator (?, $, $$, ==, <=>, #?, _fieldSetStatus) walks for one aggregate: its DeclaredProperties, then the variables a dynamic class captured (CapturedVariables; each becomes a field).
    THE test of whether a parameterised type made inside a generic's body is a dependent (generic-in-generic) reference of that generic: it is parameterised, still generic in nature, and every bare type parameter it names (at any depth: List of List of T) is one of the generic's OWN type parameters.
    THE rule for when a call to a generic FUNCTION may infer its type arguments from its arguments (D12, Steve 2026-10-19): only when the function's parameters are exactly its type parameters, in order, and nothing else - the shape of a generic class's inferring constructor (E06050).
    Used to model the scenario where a generic type has another dependent generic type used within it.
    THE mapping from a member of a MONOMORPHISED parameterised type back to the member of the GENERIC it was substituted from.
    The generic template a parameterised type was produced from (List, Dict, a user Cache), or empty when the symbol is not a parameterised type.
    🛑 THE parameter names of a generic type's synthesised inferring constructor, one per type parameter, in order (one of the SyntheticParameterNames; never invent arg/arg1).
    THE cycles of a directed graph: only the components of StronglyConnectedComponents (THE Tarjan - iterative, successors asked lazily, self-loops kept) that are cycles.
    THE test of a guard (PreFlowCanSkipBody) whose skipping skips a WHOLE switch or try - its other cases, default, catch and finally too (D40) - so an analysis records the state there as a skip path and joins it back after the construct.
    THE node whose recorded symbol is a guard's TARGET - the variable its implicit gate set-checks: the variableDeclaration of v <- e(), or the identifier of v :=? e().
    THE "does this type have any fields, counting inherited ones?" (Steve, 2026-10-07, Q-COMPONENT-?): its own fields (GeneratedOperatorFields - properties and a dynamic class's captures) or any property of a super, all the way up.
    THE reading of phase 5's property-cycle mark (phase5/PropertyCycleMarker): can an object of this type reach itself through its properties? Hold one and ask it - never the squirrelled data directly.
    THE HTTP access kind of a service operation's parameter: where in the request its value comes from.
    THE defaulting of a service parameter that declares no HttpAccess: it is a PATH parameter bound to the placeholder of its own name.
    The HttpAccess kind a text names, or empty when it is not one of the six words (the lexer's text, the HTTP_ACCESS squirrel, the IR's binding).
    THE construction step of a function construct (named, dynamic or a parameterisation, generated as a class): its constructor calls its super function's no-argument constructor when that super is a real EK9 super (NotImplicitSuper).
    THE rule for a sub-type that adds handlers to a dispatcher it inherits (front-end rationalisation D2, Steve 2026-10-02: "we have little choice but to do 'A'").
    The slots an aggregate's super chain occupies before its own properties in the flat field layout (FieldSlots): each super's properties, up to the first extern base, which adds its native footprint (ExternFootprint) and ends the walk.
    THE reading and marking of INPUT_VARIETY_RECEIVER: the input-variety FLOOR of this method counts its receiver as dimension p0 (coverage design section 4.5), so the phase-7 numerator probe emits a receiver cell.
    THE marking of INPUT_VARIETY_RECEIVER: the input-variety floor of this method counts its receiver as dimension p0.
    True if the given parse node sits anywhere inside a 'require' or 'assert' statement.
    The call-graph identity of an aggregate's property initialisers - module::Aggregate._i_init(), the method the generated code runs them in, and the name a stack trace shows.
    Holds the details for creating and internal 'decorated name' for a generic type that has been parameterised.
    Given some sort of generic type a function or a type with a set of 'type parameters', create a unique internal name for that combination.
    Error when the definition of an enumerated values could be invalid.
    Is operator a plain store (: := = :=?) rather than a mutation - by the operator's TEXT, as SymbolWrites.Write.operator() carries it.
    THE capture constructor of a dynamic class: the constructor whose parameter types are EXACTLY the capture types, in capture order (TakesExactlyTheTypesOf) - the one the definition site builds the object through, and the only one the captured values are stored by (Steve, 2026-10-28: "we need an exact match").
    THE "is this symbol one of the variables a dynamic function or class captured?" - by IDENTITY against CapturedVariables, never by name: a name join would take an unrelated variable of the same name (an outer local, a property) for the capture; the E08251 check once did.
    THE reader of the concurrent-entry-point mark (MarkConcurrentEntryPoint): has this symbol been marked as a root of the data-race model? Never read the squirrel raw.
    THE rule for "is this expression a whole CONDITION": the control of an if/else if/switch head, of a while, or the expression of a require or assert.
    THE reader of the confined-type fact (phase5 ConfinedTypeMarker; design §13.11 T12): can no value of this type be reached from anything shared between threads? A type with no mark - not yet decided, or not a user aggregate - is shared: fail closed.
    THE test for "does this fully qualified name (module::Name) live in an EK9 core module": the module part, by exact membership (IsCoreModule).
    THE test for "is this module EK9 core": exact membership of Ek9CoreModules.NAMES, never an "org.ek9." prefix (see Ek9CoreModules for why the namespace as a whole is not core).
    THE "is this an enumeration?" - the symbol's genus is SymbolGenus.CLASS_ENUMERATION.
    THE "is this an enumeration TYPE, a base enumeration or a constrained one?" - IsEnumeration, or a constrained type over an enumeration (ConstrainedEnumerationBase).
    THE "fresh value" predicate: true iff an expression evaluates to a NEW object - one nothing else holds a reference to.
    Which reading of "fresh" is asked.
    Predicate to determine if a symbol is a function delegate.
    True when the symbol is a generic TEMPLATE (e.g.
    🛑 THE characters of an EK9 identifier: true when the text is one whole identifier by the lexer's Identifier : Letter LetterOrDigit* with Letter : [a-zA-Z] and LetterOrDigit : [a-zA-Z0-9_] (EK9LexerRules.g4), keywords included.
    True when a character can continue an EK9 identifier: an ASCII letter, a digit or _ - the lexer's LetterOrDigit : [a-zA-Z0-9_] (EK9LexerRules.g4).
    True when a character can begin an EK9 identifier: an ASCII letter - the lexer's Letter : [a-zA-Z] (EK9LexerRules.g4).
    THE "was this entry point synthesised by InheritedDispatcher" (front-end rationalisation D2) - the INHERITED_DISPATCHER squirrel.
    THE test for a layout token (INDENT / DEDENT / NL / EOF, LayoutTokens.LAYOUT_TOKENS): a token whose position is synthetic, never the end of anything a reader sees.
    Predicate that returns true iff the symbol IS the org.ek9.lang::MutexKey generic function itself, or a parameterised form of it (e.g.
    Predicate that returns true iff the call's resolved target is a constructor of MutexLock (or a parameterised MutexLock of T).
    Predicate that returns true iff the symbol IS the org.ek9.lang::MutexLock generic type itself, or a parameterised form of it (e.g.
    🛑 THE E11031 check: true when name is one of the NonDescriptiveNames (case-insensitive), or a positional one followed by digits (arg0, arg1, ...).
    THE reader of the statement-ownership mark (MarkStatementOwned): is this recorded symbol a call whose closeable result its statement owns, and so closes? Phase 5's call graph and phase 7's call generation ask here; never read the squirrel raw.
    THE owners of the closeable temporaries made inside them: a block statement, or what is in no statement - a returning variable's or a property's initialiser, or a text's string.
    True when the symbol is a concrete PARAMETERISATION of a generic (e.g.
    THE "is this a PARTIAL BUILT-IN" (PartialOrdering): a core built-in whose runtime class declares a comparison group (org.ek9.lang.ComparisonGroup) - its <=> is defined only within a group of its own values and unset between groups (a currency for Money, a unit suffix for Dimension).
    Is this type a PRE_BUILT parameterisation - a generic type whose parameterised form ships ready-made in the runtime (Iterator of Integer is _Iterator_2648..., a Java class in ek9-lang and a C struct in the native runtime), marked by phase 6's ParameterizedSymbolCreator.markIfPreBuilt.
    THE reader of MarkPublishedHandler's mark: is this a function handed to runtime threads for the life of a server or of the program (design §13.11, S2)?
    THE reader of the registered-type fact (phase5 RegisteredTypeMarker; design §13.11 S2): can a value of this type be reached from what is published for the life of the program - an application's registrations, a handler given to runtime threads? A type with no mark - not yet decided - is registered: fail closed (a store into it publishes, which costs memory, never safety).
    THE question "is this a keyword that CANNOT be used as a name?" - true only for one of the Ek9Keywords.WORD_KEYWORDS that fails to parse as word <- 1 in a minimal program.
    THE reader of the signal-reached fact (phase5 SignalHandlerNeighbourMarker; design §13.11 S2c, option A): can a signal handler reach a value of this type - through what it captures or injects, never into a MutexLock payload? A field of such a type written by code that runs beside a signal handler is shared state (E08251).
    THE test of whether a pipeline part is a stage's operand (| map with holder.mapper(), | sort with Ranked().comparator(), | head counter.limit(), a tee's transform or side target).
    Is operator (as SymbolWrites.Write.operator() or WritingOperator gives it) the target of a stream - >, >> or SymbolWrites.TEE.
    Was this call completed from its declared target (TargetTypedConstruction, TargetTypedConstructionMarker).
    THE test of whether a pipeline part is the side target of a tee (| tee in target, its last pipelinePart).
    THE test of whether a scope is the BASE of a text construct - genus SymbolGenus.TEXT with no LANG squirrelled data (each defines text for "<lang>" block is a locale variant that carries its LANG; see TextFactory).
    Predicate that returns true iff the call's resolved target is a stdlib method which invokes its function/handler argument on a different thread than the caller.
    Whether a candidate is a legal EK9 module name: true when the grammar's dottedName rule accepts it in full (surrounding whitespace allowed; null and blank are not).
    THE test that an identifier's recorded symbol is a VARIABLE (a local, a parameter, a returning variable, a property), not a call or a type: the occurrences the flow checks follow an object through.
    Does operator write the thing it is applied to - an assignment (IsAssignmentOperator), or a mutating operator (OperatorMap.isThisMutatingOperator(String), never a copied list).
    JVM internal type names and descriptors that the compiler uses when generating bytecode.
    THE true last line of a parse rule: the 1-based line of the LAST real-content token under a node, or -1 when it holds none.
    THE shared knowledge of EK9's LAYOUT tokens — INDENT / DEDENT / NL / EOF — and the one correction every consumer of a parse-rule's END position needs because of them.
    THE types a reference to this type couples to, in order: the generic template it was produced from (empty for a plain type: a built-in container, or a user generic's own module, GenericTemplateOf) and then every leaf concrete type argument (ConcreteTypeArguments).
    THE "must a generated #? on this type leave this field out?" - the reading of phase 5's property-cycle marks (phase5/PropertyCycleMarker) for the hash (Contract 13).
    Compares two multi-line strings line-by-line for equality.
    Generates deterministic internal names using SHA-256 hashing.
    THE location of a symbol for a message: "on line 6 in 'filename.ek9'".
    Extracts a string for the form "on line 6 in 'filename.ek9'".
    THE mark of a CONCURRENT ENTRY POINT - a function or method whose body may run on another thread (a service operation, a handler given to a thread-spawning call such as TCP.accept, an element function of an async stream stage).
    THE mark of a function handed to runtime threads for the life of a server or of the program - the handler given to TCP.accept, acceptUntilComplete, HTTP.serveUntilComplete or Signals.register (design §13.11, S2).
    THE mark that a call's closeable result is owned by the block statement that makes it, so that statement closes it when it finishes (the unnamed half of the closeable ownership rule, Steve 2026-10-05).
    THE tolerant reader for a symbol's measured CommonValues.COMPLEXITY, for consumers that treat "not measured" as zero rather than as an error.
    THE writer of a measured CommonValues.COMPLEXITY for a symbol that phase 5 will never visit; its tolerant reader is MeasuredComplexity.
    A single enforced quality/architecture metric limit, self-describing enough that BOTH the phase-5 checker that fires the error AND the MCP/IDE enquiry layer that reports headroom can read it from the one place — see MetricLimits for the registry and the rationale.
    How a measured value is compared against the limit.
    A compound limit that fires only when an absolute cap AND a relative ratio are BOTH exceeded, and only once the module is at least minConstructs in size (small modules are naturally disconnected and are exempt).
    A per-genus threshold table: byGenus holds explicit limits, fallback covers genera not listed, and exempt genera are not checked at all (so MetricLimit.GenusLimit.limitFor(SymbolGenus) is empty and MetricLimit.GenusLimit.isOver(int, SymbolGenus) is always false for them).
    A gate on a fractional score rather than a count — E11020 multiplies a construct's complexity ratio by its statement ratio and fires above 0.50, so neither operand is a limit in its own right and the threshold cannot be an int.
    A single-threshold limit with a comparator.
    THE single source of truth for EK9's enforced complexity / coupling / cohesion / dependency-injection metric limits — the exact thresholds the phase-5 Acceptable*OrError checkers fire on.
    The mandatory properties this package block does not set: 'version' (E06262), then 'description' (E06261), each reported as MissingPackagePropertyMessage.
    The message for a missing mandatory package property (MissingPackageProperties), after In '<module>' package: .
    THE validator for an EK9 module name — use this (or IsValidModuleName), do not hand-roll a regex.
    THE module a type symbol belongs to, for the module-level quality trackers: the module the symbol was parsed in (phase 1 already resolved and recorded it, so reading it back is immune to the name-shape assumptions a name split makes), else - only for a symbol with no parsed module, such as a built-in reached through a synthesised scope, where there is nothing else to read - the module part of its fully qualified name.
    THE "whose code is running here?" - used when trying to locate the current class, dynamic class or dynamic function, to be able to check if access to fields or methods should be allowed, or even resolve methods without 'this' prefix.
    THE answer to "does this code run every time its enclosing body runs?", read from its position in the parse tree.
    How far the walk climbs: to the enclosing BODY (MustExecutePosition.Scope.BODY, FE77), to the evaluation that owns the code in its statement form (MustExecutePosition.Scope.STATEMENT), or to the nearest conditionally evaluated operand too (MustExecutePosition.Scope.EVALUATION).
    True when the operator mutates, in place, the object its target refers to (+=, :=:, :~:, ...), rather than re-pointing the target (RepointsTarget).
    Rejects parameterising any generic (other than MutexLock itself) with MutexLock (or a parameterised MutexLock of T) as a type argument.
    THE rule that a PriorityQueue ordered by its elements' natural order needs an orderable element type (D63, Steve 2026-10-21, option B).
    THE no-argument constructor of a type, whatever its access - Counter().
    THE check that a construct being defined in a user module does not take the name of a built-in construct (E01090).
    Checks that a name being defined at module scope does not differ ONLY by case from a name already defined in that same module (across every construct kind - class, record, trait, function, component, service, text, program, application and constant).
    Does a simple check (excluding any inheritance) for duplicated operations (methods, operators) on any sort of Aggregate, i.e.
    Designed to check if variable name and method names collide with Type/Function names.
    THE single source of the variable names E11031 (NON_DESCRIPTIVE_VARIABLE_NAME) bans - and of everything published about them.
    One group of banned names with what is published about it.
    THE check that a body which must return a value can do so: a scope whose every path ends in an exception has an unreachable return (E07380).
    THE single predicate for "does this super type need an EK9-style super-init call emitted by the IR?".
    THE final .step of an objectAccessExpression chain - .name in getHolder().name - or null when the chain has no steps.
    Number of .step accesses after the start of an object-access chain - this.code is 1, this.sink.items is 2.
     
    Designed to gather aspect of operator population.
    THE position-independent identity for a dynamic construct: its index among the constructs of the same KIND in the same source file, in document order.
    THE parent declarations a method overrides - hold one and apply it, do not re-derive it.
    THE super's dispatcher entry point that a sub-type's entry point overrides: the super's effective dispatcher method with exactly the same signature - what a synthesised InheritedDispatcher entry point calls.
    THE error listener that owns a symbol: the listener of the source file that DECLARES it.
    THE "is this a property of the object whose code is running?" - use it, never re-derive it.
    THE rule for what a 'defines package' block may hold (E06260 PACKAGE_PROPERTY_INVALID): which property NAMES a package defines, and the SHAPE each one's value must have; which properties it MUST have ('version' E06262, 'description' E06261 - D16, Steve 2026-10-19); and that each is set once (E50050, in the package's own words).
    Where a package property's problem (PackageProperties) is reported: an unusable NAME on the name, a value of the wrong shape on its value (or on the name when the value is not an expression).
    The HttpAccess kind of this parameter: what was stored (StoredHttpAccess), else PATH - the kind an unqualified service parameter is assumed to be (see HttpAccessDefaulting), so a check that runs without having asked for the default first still gets the answer the default would have given.
    THE strict test: target is a parameterisation of EXACTLY this generic - not a sub type or a super type of it - and so the parameterisation itself (List of String for the generic List), else empty.
    Create a new parameterised symbol from a generic type and a set of type arguments.
    To be used when trying to define/resolve a parameterised type.
    Given a parent and a dependent generic type, check that all parameters have been provided with suitable arguments, so that the Parameterized type can be used.
    This will just create an Aggregate/Function 'parameterized type' of the 'generic type' with the 'type arguments' But note it will have not - repeat NOT have - traversed the 'generic type' and cloned over the methods and altered all the 'T', 'K', 'V' - 'type parameters' for each of the 'type arguments' There is a separate function (TypeSubstitution) that does that.
    THE answer to "is this type's <=> PARTIAL?" - unset for some pair of SET values of the type - given as the wording of why, to follow "'X' ...", or empty when it is total (so "is partial" is apply(...).isPresent()).
    THE rule for a copy (:=:) through a super-typed reference (Steve, Q5b, 2026-10-08) - its names here, its parts in support.copy: SelfCopy, IsCopyOwner, HasGeneratedSelfCopy, IsGeneratedCopy, CopyNeedsRuntimeCheck, NeedsCopyAccepts and InheritedCopySignatures.
    You may think why this mapping.
    Just holds a simple set of lists with the appropriate type arguments and their corresponding parameterizing parameters.
    THE single definition of "can this control-flow pre-flow skip the construct body?".
    THE operator token of a pre-flow (<-, :=?, := ...): what PreFlowCanSkipBody classifies, and the error location of a check on the guard itself.
    Check if this type being supplied to the test can be used as a program argument.
    THE reading of a program's body - use it, never a private "_main" test.
    The #^ operator itself that this 'from' type promotes through, or empty if it has none - for a caller that must read the operator, not only its type (what its RETAINS say it does with the object it is called on: the closeable ownership decision, where an argument reaching a callee as its promotion is not the argument itself).
    The single type this 'from' type promotes to via its #^ operator (PromotionOperator's return type), or empty if it has none.
    THE parse half of "is this a property of the object whose code is running?" (OwnProperty is the symbol half): the form this.prop (or alias.prop when the caller's receiver test accepts the start), one step from the receiver, never through a further property or a call, which reach another object.
    THE answer to "is this node inside a property's initialiser, and which properties of that type are set by then?" Use this wherever a check depends on a property initialiser - do not re-walk the tree for it.
    THE hint for a QUALIFIED name 'M::X' that did not resolve, when the X the user probably meant is only IMPORTED with 'references' - by module M, or by the module the name is used in.
    THE detection of a construction that needs a natural order (NaturalOrderQueue, D63): the element type of the queue a written call constructs, when the call resolved to a constructor of a parameterisation of PriorityQueue (QueueElementType) and it is not directly the receiver of .withComparator(...).
    THE element type of a queue type, when it is a parameterisation of PriorityQueue - recognised through the symbol (Ek9Types.ek9PriorityQueue()), never by name (NaturalOrderQueue).
    THE decision of which for-range counter types get a run-time PROGRESS CHECK (Steve, 2026-10-21): after each step the counter must have moved toward the end - ascending new <=> previous > 0, descending < 0 - and when it did not (it wrapped, stayed equal, or the comparison is unset) the range ends.
    True when the receiver of the final step of an object-access chain (ObjectAccessFinalStep) is only reached by CALLING something - the chain starts with a call (getHolder().name, Holder().name) or a step before the last is a call (keeper.holder().name, this.holder().name).
    The friendly name of a type as the symbol gives it, with a compiler-made name made readable (D65): the form a generated refusal message uses for the types it names - cls for a dynamic class, never its digest.
    THE name a GENERATED operator shows for a type in its text (D65, Contract 21 rule 5): a parameterised type by its friendly name (Holder of String), every other type by its simple name, and in either case a compiler-made name by what FriendlyInternalName gives it - a dynamic class is cls, never its _Class_<digest>.
    THE declarations in a fragment of the COMPILED tree, by the symbols the compiler recorded - the declaration half of RecordedSymbols' identity walk.
    THE symbol-identity walk over a parse-tree fragment for the compiler and the mcp.oracle tools - use this (moved down from compiler-services with SymbolWrites, 2026-10-04), never a by-NAME walk (a regex over body text, getText().equals(name) on identifier nodes, a set of names).
    One identifier occurrence the compiler bound to a symbol.
    THE reading of a statement that makes a local variable (never a property) refer to the SAME object an expression evaluates to - a reference copy (an alias), never a value copy.
    THE reading of the ReferenceAssignment (an alias of a LOCAL, never a property) a declaration or an assignment statement makes, if it makes one.
    Utility to determine if an ISymbol represents a reference-counted type that should be included in the traceableFields list during initial IR generation.
    Rather than just check if the actual ISymbols are the same, this code checks if two symbols actually refer to the same source token from the same source file.
    True when the assignment statement RE-POINTS its target at the object the right-hand side evaluates to (a pointer assignment: :=, =, :, :=?, as OperationIsAssignment defines it), rather than handing that object to an operator of the object the target already refers to (MutatesInPlace).
    The bulk of the processing is in the abstract base.
    The bulk of the processing is in the abstract base.
    The bulk of the processing is in the abstract base.
    This is a sort of hybrid resolver or definer function.
    Used as an abstract base for parameterised types.
    get the appropriate return type from functions, methods and function delegates and constructors.
    THE reader of the runs-beside-signal-handlers fact (phase5 SignalHandlerNeighbourMarker; design §13.11 S2c, option A): can this callable run on the program's own thread while a signal handler can run on the dispatcher? Then E08251 holds it to the same rule as concurrent code for what a signal handler can reach.
    Checks to see if the type parameters are the same as the generic arguments.
    THE vocabulary of B18 - "a type defines sameness once" - hold its parts, do not re-derive them.
    THE test that two DIFFERENTLY SPELT operators are one runtime operator - hold one and ask it, do not re-derive it.
    Checks for inappropriate use of 'sanitized' in expression parameters.
    THE reading and marking of SANITIZED_REQUIRED: the as sanitized modifier on a parameter (and, by propagation, on an expression that is one of them).
    THE marking of SANITIZED_REQUIRED: the symbol is a parameter declared as sanitized (or an expression derived from one), so the RECEIVER must clean it.
    Deals with the creation of the service parts for the EK9 language.
    THE normalisation of a service route's URI-template parameters for route-identity comparison — use this, do not re-derive the \{.*?} regex.
    THE shared short display name of a fully qualified name, for the dependency-injection and HTTP wiring diagnostics and the -di report: some.module::Type reads as Type - the text after the last . or : of the name, or the whole name when it has neither.
    THE shared cache of small non-negative int-to-String conversions — use this instead of String.valueOf(int) / Integer.toString(int) when the result is squirrelled or otherwise retained per symbol.
    THE source of a parse rule as the developer wrote it: the characters it spans in the char stream, spaces kept.
    THE source text of an expression as a run-time message shows it (an assert or require failure): SourceTextOnOneLine, cut to SourceText.MESSAGE_LENGTH characters with a ... suffix when longer.
    THE source of a parse rule as written (SourceText), on one line: every run of whitespace, line breaks and indentation included, is one space.
    The HttpAccess kind stored on this parameter, or empty if none has been stored yet.
    Just deals with the creation of Streams parts.
    THE strongly connected components of a directed graph (Tarjan, 1972) - use this wherever a phase needs the cycles of a graph, never a private copy.
    One strongly connected component.
    THE supers-first walk: act on every node of a set of sites AFTER everything it depends on, each node once.
    General utility class that searches in a scope for a symbol to check for duplicates.
    Just a factory for all types of EK9 symbol.
    Given some search criteria and a List of Symbols, this class will find the best match.
    THE re-typing of a single symbol, in place, when it has a type: its type becomes the replacement's answer for it.
    Can be used for a single Simple named search.
    Given a list of arguments (ISymbols), go through and extract the types out.
    THE uses of ONE symbol instance in a fragment of the COMPILED tree, through the identifiers the compiler bound (RecordedSymbols) and the copies dynamic functions and classes captured (CaptureAliases) - never by name.
    THE "where is this symbol written?" for the compiler's own analyses and the mcp.oracle tools - use this, never a by-name test such as body.contains("this." + name) or a set of assigned NAMES.
    One write.
    THE names the compiler gives the parameters of constructors it SYNTHESISES - a constrained type's, an enumeration's, a text's, a generic's required pair and its type parameters'.
    True when method takes exactly the types of variables (VariableTypes), in order (ExactParameterTypes); false when any of the variables has no type.
    THE rule for target-typed generic construction - use it, never add a second inference route (Steve, 2026-10-08, GENERIC CONSTRUCTION a).
    Records that this call was completed from its declared target (TargetTypedConstruction, phase 3); read only by IsTargetTypedConstruction.
    The generic function parameterisation a target-typed call (TargetTypedConstruction) constructs (a function VALUE, never an invocation), or empty when the call is not a target-typed construction of a generic function.
    Deals with the creation of Text parts from the EK9 language.
    Extract the valid language value from the String literal or null and error.
    THE name of a text's generated locale variant: _Base_lang, from the base name and the language.
    THE locale variants of a text base - one per defines text for "<lang>" block of that text, read across ALL the source files of its module (ModuleScope.getSymbolsAcrossModule(); front-end audit FE31: one file's scope missed the languages declared in the others).
    Converts a list of symbol using their friendly names in to a comma separated list.
    THE "does this token index lie within that parse rule?" - inclusive of the rule's first and last tokens, by token INDEX (so by position in the one token stream, never by line or by text).
    THE leaf walk of a type's arguments: descend through every parameterisation (List of (Dict of (K, V))) and collect the leaves isLeaf accepts, in order.
    Given a Symbol that is some form of type, check that it could receive some piped data.
    Can the 'from' type be coerced to the 'to' type.
    Checks that the symbols in list one and list two are each the same for the corresponding position in the list.o
    THE test of whether a holder - a container variable, a stream's target, a call's result - can keep an object of a given type at all (D80 follow-up, 2026-10-21): the walk behind BorrowedViewReturn (rule B), asked about an object of one of heldTypes instead of about a closeable.
    THE constraint of a generic's type parameter: the 'X' of T constrain by X, or empty for an unconstrained 'T' - use this, never "does T have a super?".
    THE reading of "a generic's own hand-written <=> compares values of this conceptual T with <=>" (D89), however it reaches them (D91 step 4): directly, through the generic's own methods, through the generic functions it gives them to (and on through theirs), or by giving them to a function delegate - which is taken to order them, whatever it does (strict, as E06070).
    The single level of type parameters (for a template) or type arguments (for a parameterisation) exactly as declared - for display/inspection.
    Accepts an aggregate or a function that has been parameterized with 'type arguments'.
    THE Union-Find (Disjoint Set Union) - use this for "which things are connected", never hand-roll parent arrays.
    🔑 THE question "does this in-place operator keep an UNSET receiver unset?" - asked of the RESOLVED operator symbol, never of its spelling or the receiver's type name.
    True when the constructor relies on the hidden implicit super(): it neither delegates with this(...) (DelegatesWithThis) nor calls super(...) (CallsSuperExplicitly).
    Does a few checks on a PossibleGenericSymbol in terms of checking types and the generic type it is configured with.
    The types of some variables (or parameters), in order; empty when any of them has no type (an earlier error).
    THE rule that Void is never the type of a value (E10011, the formal specification's WF-VOID-RESTRICTION).
    THE expression inside any number of enclosing parentheses: base for ((base)).
    THE grammar's write positions: which operator, if any, writes the thing an identifier occurrence names (SymbolWrites collects these over a symbol's uses).