---
title: Language Feature Matrix
audience: model-authors
kind: reference
status: current
owner: language
source_of_truth:
  - rust/grid-compiler-core/src/language_surface.rs
  - docs/language/grammar.json
last_verified: 2026-08-31
---

# Language Feature Matrix

This page is the checklist for Grid's language surface.

Most entries below are fully supported. Entries marked **syntax-only** are
recognized for compatibility or diagnostics, but should not be used as working
model features yet.

## Status Key

- **supported**: accepted by Grid and available to model authors.
- **syntax-only**: syntax is recognized, but execution is not claimed.
- **diagnostic**: negative syntax that exists to produce a precise error.

## Source And Statements

- <!-- feature:multiple_statements --> **Multiple statements** (**supported**) -
  statements are separated by newlines or semicolons. Example: `A1 = 1`, then
  `B1 = A1 + 1`.
- <!-- feature:model_directives --> **Model directives** (**supported**) -
  metadata headers such as `MODEL "Portfolio"`, `DESCRIPTION "..."`, `VERSION
  "1.0.0"`, `AUTHOR "..."`, and `TAGS "audit"`.
- <!-- feature:module_imports --> **Module imports** (**supported**) -
  `USE "shared/finance.gs" AS finance` imports reusable definitions under a
  namespace; `EXPOSING (...)` selects flat imports. Definitions-only `.gs`
  libraries may import transitively, while cycles, duplicate aliases, and
  executable library statements fail with diagnostics.
- <!-- feature:decision_packages --> **Decision-package declarations**
  (**supported**) - `DECISION PACKAGE` pins a native computation's version,
  domain, dialects, capabilities, and typed artifact contracts in module
  metadata. Resident loading matches the complete declaration against the
  native registry and fails closed on unavailable or mismatched contracts.
- <!-- feature:capability_requirements --> **Capability requirements**
  (**supported**) - `REQUIRES crm = NETWORK("https://api.example.com", GET)`
  and `REQUIRES auth = SECRET("crm.read")` declare exact authority metadata
  for `NETWORK.GET_JSON`. Requirement aliases never become ordinary values or
  captured secrets; compiler-owned call contracts retain the normalized
  origin, method, secret purpose, and effect route.
- <!-- feature:assignment_operators --> **Assignment operators**
  (**supported**) - `=`, `~=`, and `?=` are production-lowered at top level;
  `+=`, `-=`, `*=`, and `/=` are production-lowered in rule actions and their
  documented typed mutation contexts.
- <!-- feature:conditional_assignment --> **Conditional assignment**
  (**supported**) - `A1 ?= MAYBE_FAIL()` preserves the previous value if the RHS
  returns an error.
- <!-- feature:compound_assignment --> **Compound assignment** (**supported**) -
  rule actions perform native read-modify-write updates. Top-level arithmetic
  compound assignment is rejected because a declarative binding has no
  prior-value source; typed mutation contexts retain their own operator
  contracts.
- <!-- feature:typed_assignments --> **Typed assignments** (**supported**) -
  `A1 IS currency = 125000` or `currency A1 = 125000`.
- <!-- feature:tensor_accelerator_language --> **Tensor and accelerator
  declarations** (**supported**) - shaped declarations such as
  `A1 IS Tensor[2, 2] with precision 32 = SQUARE(values)` lower to resident
  Tensor graphs when the optional accelerator is present and retain the same
  typed Workbook result when it is absent. Bounded `ITERATE`, `PARAMETER`, and
  `TRAIN_ADAMW` provide portable inference and training syntax. See
  [Tensor shape, precision, and training](collections.md#tensor-shape-and-precision)
  for axis conventions, bounds, and the non-training array fallback.
- <!-- feature:into_cast_infix --> **Infix `INTO` cast** (**supported**) -
  `amount INTO currency` overlays a type tag on an expression value; lowers to
  `TYPE_TAG(amount, "currency")`. Same semantic overlay as declaration-level
  `IS`, but usable inside expressions.
- <!-- feature:type_tag_hierarchy --> **Type-tag hierarchy** (**supported**) -
  tags refine one another (`USD` is a `currency` is a `number`; `json` is an
  `object`), a leaf implies its ancestors, and currencies take the
  `currency:<code>` qualifier (bare `USD` too) — `unit:` is for physical units.
- <!-- feature:strictness_umbrella --> **Strictness — `strict` / `loose`**
  (**supported**) - one header keyword sets both the dimensional and coercion
  axes; `strict except <axis>` differs on one. Under `strict`, a lossy
  arithmetic coercion or an incompatible type-tag is a `#TYPE!`, and the
  static analyses harden too: matrix-shape mismatches
  (`GRID_MATRIX_SHAPE_MISMATCH`) and refuted `VALIDATE` assertions
  (`GRID_VALIDATE_UNSATISFIABLE`) become compile errors.
- <!-- feature:dimensional_checking_directive --> **Dimensional checking
  directive** (**supported**) - `dimensions strict`, `dimensions warn`, and
  `dimensions off` select the dimensional-analysis policy independently of
  value coercion.
- <!-- feature:declared_presentation --> **Declared presentation —
  `FORMAT` / `VALIDATE` / `##` notes** (**supported**) - trailing
  declarative clauses attach a format pattern, a validation clause, and
  doc notes to the cell in source. `VALIDATE` on an `input` cell is the
  write contract enforced at every write surface; on a computed cell it
  is a static assertion the compiler proves, refutes, or flags
  unverified via interval analysis. Top-level `FORMAT <tag> <expr>`
  declares tag policies; rule `FORMAT` actions and `RESET FORMAT` manage
  the override layer.
- <!-- feature:unary_predicates --> **Unary predicates** (**supported**) -
  `predicate reviewed(by: string)` declares a typed payload schema.
  `x is :reviewed(reviewer) = 1`
  attaches it; the readability articles in `x is a :reviewed(...)` and
  `x is an :reviewed(...)` are optional. Declarations are single-valued by
  default; `many by (id)` permits several instances and defines their identity.
  In rules, `+=` upserts one identity, keyed `-=` removes one, and bare `-=`
  removes all. Read single fields as scalars and many fields as arrays through
  `PREDICATES(x).reviewed.by` or `x.predicates.reviewed.by`. Field contracts fail closed;
  absent fields read as `BLANK`. Fieldless predicates such as `:happy` remain
  open and declaration-free. `MODEL.PREDICATES.NEIGHBORS(:reviewed)` performs
  a reactive reverse lookup through the unified Predicate graph; predicate
  vertices use colon-symbol identity, model symbols use canonical text
  identity, and `many` instances remain parallel `:applies` edges.
- <!-- feature:general_predicates --> **General predicate programs**
  (**supported**) - `predicate releasable means ...` defines a proposition
  about its implicit subject. Facts, natural predicate laws,
  `EXISTS`/`EVERY`, named structural routes (`THEN`, `OR`, `*`, `REVERSE`),
  Boolean `NO path`, result-valued `REACHABLE`, checked `therefore`
  conclusions, and `WHY` share one Predicate engine. Recursive `EVERY`
  components use dependency-SCC-scoped greatest fixed points. General
  modality uses independent support/refutation evidence: `EVIDENCE(atom)`
  returns `neither`, `supported`, `refuted`, or `both`; `MUST` reads support,
  `MAY` means not refuted, and `CANNOT` reads refutation. The `both` state is
  paraconsistent and does not invalidate unrelated inference.
  Structured unary facts retain their declared payload and reactive state.
- <!-- feature:temporal_predicates --> **Qualitative binary predicates**
  (**supported**) - temporal facts such as `design before build` and topology
  facts such as `parcel inside district` share bounded family-local inference
  with conceptual-set facts such as `vip included in active`.
  Topology is authored as `separate from`, `touches`, `partially overlaps`,
  `coincides with`, `inside`, `encloses`, and `intersects`, with optional
  `with boundary contact` / `without boundary contact` refinement.
  Conceptual sets use `included in`, `includes`, `disjoint from`, `overlaps
  with`, and `same members as`, with optional `strictly` refinement. Empty
  extents retain exact equality, inclusion, overlap, and disjointness meaning.
  Plain queries mean `MUST`; `MAY`, `CANNOT`, alternatives, complements,
  reactive `IF`/`UNLESS`, `RELATION`, `RELATION_STATUS`, `WHY`, family
  selection, and contradiction isolation are supported.
- <!-- feature:default_override --> **`default` / `RESET` / `CLEAR`**
  (**supported**) - `default B1 = …` marks an overridable base a rule may
  `set`, `RESET` to the base, or `CLEAR`.
- <!-- feature:model_state --> **`STATE` declarations** (**supported**) -
  `STATE counter = 0` declares model-owned mutable state with an initial/reset
  base and sticky rule-written revisions.
- <!-- feature:input_output_decorators --> **Input/output decorators**
  (**supported**) - `input price = 0`, `output total = price * qty`.
- <!-- feature:target_references --> **Target references** (**supported**) -
  ordinary target cells such as `D5 = 1`.
- <!-- feature:surface_namespace_slots --> **Surface namespace slots**
  (**supported**) - component slots such as `Name!type`, `Name!config`,
  `Name!data`, and `Name!source` are qualified named wires that can be assigned
  and referenced without requiring grid coordinates.
- <!-- feature:range_target_expansion --> **Range target expansion**
  (**supported**) - `A1:A5 = 0` expands to per-cell assignments.
- <!-- feature:destructuring_assignment --> **Destructuring assignment**
  (**supported**) - `[total, avg, ...rest] = SUMMARY(B1:B10)`.
- <!-- feature:schedule_modifiers --> **Schedule modifiers** (**supported**) -
  `A1 = NOW() ONCE`, `A1 = NOW() EVERY 5min`, and `A1 = TRUE AT dt"..."`.
- <!-- feature:rule_blocks --> **Rule blocks** (**supported**) - touch and
  predicate `WHEN`, settled-value `CHANGES` / `BECOMES`, and scheduled `EVERY`
  / `AT` blocks with eager rule-action assignments. `WHEN` supports
  `SERIAL`/bounded `CONCURRENT` admission and `LATEST`, bounded `QUEUE`, or
  durable `LEDGER` event retention using captured event-time inputs.
- <!-- feature:simulation_authoring --> **Simulated-time authoring**
  (**supported**) - `STOCK`, `PREV`, and `DELAY` declare model-time state while
  `SIM_TIME()` and `SIM_STEP()` expose the active simulation clock. Simulation
  resolves use explicit or persisted `t0`/`dt`/step configuration and isolated
  scenario inputs; Euler is the default integrator, while RK4 is available for
  all-`STOCK` models and rejects discrete-state mixtures.
- <!-- feature:solve_statements --> **`SOLVE` statements** (**supported**) -
  declarative goal-seek and bounded optimization over cells:
  `SOLVE Z9 = A2 IN [0, 1] GOAL A3 = 200000`, or `MINIMIZE` / `MAXIMIZE` an
  objective cell. The result cell receives the solved value; solves are
  reactive and never mutate the variable cell. See
  [`assignments.md`](./assignments.md#11-solve-statements).
- <!-- feature:block_comments --> **Block comments** (**supported**) -
  `/* notes */`, including multi-line comments.
- <!-- feature:diagnostics --> **Diagnostics** (**supported**) - parser errors
  carry specific spans and recovery messages.
- <!-- feature:reserved_words --> **Reserved words** (**diagnostic**) -
  Grid's grammar is contextual rather than lexically reserved. Structural and
  operator keywords such as `WHEN`, `END`, `MODEL`, `WITH`, and `NOT` are
  treated as grammar when that parse is available, so ambiguous uses produce a
  diagnostic instead of silently becoming a binding reference. Contextual
  words may remain valid names where no structural parse applies; authors
  should avoid all names listed in the reference.
- <!-- feature:first_class_grammars --> **First-class grammars and parsers**
  (**supported**) - `GRAMMAR name IS CFG|PEG|REGULAR ... END` creates an
  immutable grammar value. `grammar USING LALR|EARLEY|PACKRAT|DFA|AUTO` creates
  a portable parser recipe, `GENERATOR ...` makes the strategy independently
  authorable, and `PARSE(text, parser)` returns a native parse-result value.
  Formalisms retain distinct choice semantics; recipes persist without
  process-local parser tables. `graph syntax = GRAPH(parse_tree)` publishes a
  successful tree through the ordinary resident Graph and Predicate reasoning
  stack with ordered child edges and source-span provenance. The grammar-bound
  tree substrate is available through its complete declaration surface —
  `PATTERN`, `THEORY`, `ALGEBRA`, `TRANSFORM`, `TRANSLATE`, `SOLVER`, and
  `THEOREM` — including bounded solver search, saturation, and checked
  theorems as proved equation sources. See [`grammars.md`](./grammars.md).
- <!-- feature:symbolic_mathematics --> **Grid-native symbolic mathematics**
  (**supported**) - contextual `symbol x` declarations create immutable
  mathematical variables that compose through ordinary Grid operators,
  references, and admitted functions. The `SYMBOLIC.*` family provides exact
  rational construction, canonicalization, simplification, expansion,
  collection, factorization, rational transforms, typed substitution, exact
  evaluation, explicit arbitrary-precision approximation, assumptions,
  four-state decisions, differentiation, and complete admitted univariate
  solving. Results retain conditions, bounded work, completeness, and
  replayable Tree certificates; there is no held-body syntax, string evaluator,
  or alternate public AST. See
  [`symbolic-mathematics.md`](./symbolic-mathematics.md).
- <!-- feature:parser_hardening_edge_cases --> **Parser hardening edge cases**
  (**supported**) - regression coverage for ambiguous token boundaries.
- <!-- feature:multi_line_bracket_continuation --> **Multi-line bracket
  continuation** (**supported**) - calls, arrays, objects, and bracketed
  expressions may span lines while delimiters are open.
- <!-- feature:style_guide_multi_line_patterns --> **Style-guide multi-line
  patterns** (**supported**) - canonical formatting for `MATCH`, objects,
  comprehensions, `DO`, and `CASE`.
- <!-- feature:trailing_commas --> **Trailing commas** (**supported**) -
  allowed in function calls, array literals, object literals, and `MATCH` arms.

## Native Graph Algebra

- <!-- feature:graph_named_bindings --> **Resident graph bindings**
  (**supported**) - `graph roads = GRAPH(...)` creates a typed, immutable,
  revisioned property-graph handle that cannot spill into Workbook cells.
- <!-- feature:model_graph_relationships --> **Model graph relationships**
  (**supported**) - symbols and cells are implicit `MODEL.GRAPH` nodes;
  `relates to` adds directed edges and `connects to` adds bidirectional logical
  relationships, with typed payloads, list expansion, and stable identity.
- <!-- feature:model_tags_graph --> **Unary-predicate compatibility view**
  (**supported**) -
  `MODEL.TAGS` retains the unary-only `:<predicate> -> "model symbol"`
  projection for source compatibility.
- <!-- feature:model_predicates_graph --> **Unified predicate graph view**
  (**supported**) - `MODEL.PREDICATES` combines live unary membership with
  authored binary facts and their temporal/topology/set family, descriptive
  relation set, and condition metadata without materializing inference closure
  into graph topology. Structured unary payloads are edge properties, and rule
  mutations participate in revisioned caching.
- <!-- feature:generic_knowledge_graph --> **Generic knowledge-graph reasoning**
  (**supported**) - `KNOWLEDGE GRAPH knowledge VIA edge.relation` projects an
  arbitrary resident GraphHandle into Predicate v10 with exact string,
  symbol, and integer node identity. `WITH PROPERTIES` adds joinable
  `graph_node`, `graph_edge`, `graph_node_property`, and
  `graph_edge_property` facts for typed scalar properties. `WHY` retains
  the exact graph, revision, node, edge, and property origins used by a proof,
  while inferred closure remains a separate derived view.
- <!-- feature:graph_patch_journal --> **Durable graph patch journal**
  (**supported**) - every accepted resident patch appends a revisioned event;
  append/replay/read APIs support optimistic graph and journal revision guards
  so persistence can replay the exact stream beside the same compiled model.
- <!-- feature:graph_declarative_paths --> **Declarative paths**
  (**supported**) - `path route = path in roads from a to b minimize hops`
  states an objective; the planner selects and explains the physical kernel.
- <!-- feature:graph_partitions --> **First-class partitions**
  (**supported**) - connectivity, core/k-core, and deterministic
  Leiden/Louvain community contracts share a revision-bound partition value.
- <!-- feature:graph_typed_schemas --> **Closed graph schemas and kinds**
  (**supported**) - graph schemas type node/edge properties, named node and
  edge kinds, and endpoint constraints; hydration and atomic patch staging
  revalidate the same closed contract.
- <!-- feature:graph_views_rewrites --> **Graph views and immutable rewrites**
  (**supported**) - bounded comprehensions can fuse into a consumer or
  materialize a derived handle, while bounded edge-deletion rewrites publish
  one validated immutable revision.
- <!-- feature:graph_projections_contraction --> **Graph projections and
  contraction** (**supported**) - path and partition handles expose typed
  scalar/Frame projections, and a revision-matched partition contracts into a
  deterministic quotient graph.
- <!-- feature:graph_bounded_patterns --> **Bounded graph patterns**
  (**supported**) - `frame hits = match roads limit 100: ... return ...`
  provides typed node/edge predicates and Frame projections with a mandatory
  result bound.
- <!-- feature:graph_bounded_fixpoints --> **Bounded graph fixed points**
  (**supported**) - `frame values = fixpoint in roads: ... within 100
  iterations` exposes sum-product, min-plus, max-min, and boolean-or
  propagation with explicit direction, seeds, convergence, and work bounds.
- <!-- feature:graph_explain --> **Graph `EXPLAIN`** (**supported**) - the
  read-only `explainGraph(modelId)` host method reports semantic contracts,
  physical plans, declared/effective budgets, transient/retained/peak memory,
  materialization, lineage, and resident state. See
  [Graph Authoring](./graph-authoring.md).
- <!-- feature:graph_domain_bridges --> **Typed graph domain bridges**
  (**supported**) - the production host projects the current resident graph
  revision into Geo routing, Network Flow, and Sim validators/kernels without
  an untyped intermediate representation.

## Games And Mechanisms

- <!-- feature:declarative_games --> **Declarative game blocks**
  (**supported**) - `game Name { players = P; strategies = S; payoffs = U }`
  validates live normal-form relations through `GAME.NORMAL_FORM`; the
  `extensive = Tree` form validates a perfect-information tree. Both lower to
  ordinary named call assignments and the canonical compiled call form.
- <!-- feature:finite_game_verification --> **Finite strategic verification**
  (**supported**) - exhaustive pure Nash, regret, dominance, Pareto, welfare,
  and evidence-carrying `GAME.VERIFY` claims fail closed on incomplete domains
  or exhausted work.
- <!-- feature:certified_equilibria --> **Certified equilibria**
  (**supported**) - independent zero-sum primal/dual LPs, bounded general
  bimatrix support enumeration, correlated-equilibrium incentive LPs, and
  perfect-information backward induction all replay their defining
  inequalities before publishing a result.
- <!-- feature:declarative_mechanisms --> **Declarative direct mechanisms**
  (**supported**) - `mechanism Name { direct = Specification }` lowers through
  `MECHANISM.DIRECT`; exhaustive DSIC/BIC, ex-post/interim IR, no-deficit, and
  strong-budget-balance checks return concrete counterexamples.
- <!-- feature:mechanism_allocation --> **Allocation and auction mechanisms**
  (**supported**) - exact unit-demand welfare matching with VCG
  counterfactual payments plus deterministic first/second-price auctions with
  reserve and tie evidence. See [`game-theory.md`](./game-theory.md).

## Literals And Values

- <!-- feature:number_literals --> **Number literals** (**supported**) -
  integers, decimals, leading-dot decimals, and scientific notation.
- <!-- feature:numeric_separators --> **Numeric separators** (**supported**) -
  `1_000_000` and `0.000_001`.
- <!-- feature:hex_and_binary_literals --> **Hex and binary literals**
  (**supported**) - `0xFF`, `0b1010`.
- <!-- feature:octal_literals --> **Octal literals** (**supported**) -
  `0o755`.
- <!-- feature:string_literals --> **String literals** (**supported**) -
  double-quoted, triple-quoted, raw, raw-triple, and backtick strings.
- <!-- feature:string_escapes --> **String escapes** (**supported**) -
  newline, tab, quote escaping, and doubled quotes where documented.
- <!-- feature:string_interpolation --> **String interpolation** (**supported**)
  - `` `total={A1}` ``.
- <!-- feature:format_specifiers_in_interpolation --> **Format specifiers in
  interpolation** (**supported**) - `` `total: {A1:"$#,##0.00"}` ``.
- <!-- feature:boolean_literals --> **Boolean literals** (**supported**) -
  `TRUE` and `FALSE`, case-insensitive.
- <!-- feature:wildcard_and_blank_literals --> **Wildcard and blank literals**
  (**supported**) - `glob"*.csv"`, `wild"inv-????"`, and `BLANK`.
- <!-- feature:typed_literals --> **Typed literals** (**supported**) -
  `date"..."`, `dt"..."`, `duration"..."`, `cron"..."`, and domain literals
  such as `url"..."`, `mol"..."`, `dna"..."`, `color"..."`, `note"..."`,
  `bin"..."`, `b64"..."`, and markup typed strings `html"..."`,
  `xhtml"..."`, `svg"..."`, `jsx"..."`; any typed tag may also wrap the payload as
  `<tag>...</tag>`, for example `<dna>ATCG</dna>`.
- <!-- feature:exact_numeric_literals --> **Exact numeric literals**
  (**supported**) - `bigint"123456789012345678901234567890"` for
  arbitrary-precision integers and `decimal"0.1"` for exact fixed-precision
  decimals, plus the `BIGINT(...)` constructor. Exact values keep their
  precision through arithmetic and number-theory functions such as `ISPRIME`,
  `MODPOW`, `GCD`, `ISQRT`, and `RANDPRIME`; `decimal"0.1" + decimal"0.2"`
  equals `decimal"0.3"` exactly. Mixing an exact value with a non-integer
  ordinary number is a `#VALUE!` instead of a silent floating-point rounding.
- <!-- feature:custom_unit_literals --> **Custom unit literals** (**supported**)
  - duration suffixes (`5min`), basis points (`25bps`), percentages (`5pct`),
  angles (`45deg`), data sizes (`512MB`), and 3-letter units (`100USD`).
- <!-- feature:custom_unit_declarations --> **Custom unit declarations**
  (**supported**) - `unit smoot = 1.7018 m` and derived scale-only units extend
  dimensional inference without shadowing built-ins or using affine bases.
  Declarations and inferred dimensions persist in compiled module metadata.
- <!-- feature:fx_rate_declarations --> **Model-owned FX-rate declarations**
  (**supported**) - `fx_rate R1C2 = EUR/USD` marks an ordinary numeric rate
  cell as a directional currency conversion. Dimensional checking accepts the
  declared direction, rejects the reverse use, and retains the declaration in
  compiled module metadata.
- <!-- feature:error_literals --> **Error literals** (**supported**) -
  `#N/A`, `#DIV/0!`, `#VALUE!`, `#REF!`, `#NAME?`, `#NULL!`, `#NUM!`,
  `#CALC!`, and `#SPILL!`.
- <!-- feature:regex_literals --> **Regex literals** (**supported**) -
  `/^INV-\d+$/i`.
- <!-- feature:array_literals --> **Array literals** (**supported**) -
  `[1, 2, 3]`, `[1; 2; 3]`, and `[1, 2; 3, 4]`.
- <!-- feature:spread_in_arrays --> **Spread in arrays** (**supported**) -
  `[0, ...A1:A3, 4]` desugars to `HSTACK` for horizontal concatenation.
- <!-- feature:object_literals --> **Object literals** (**supported**) -
  `{name: "Ada", level: 9}` and `{"first name": "Ada"}`.
- <!-- feature:parenthesized_expressions --> **Parenthesized expressions**
  (**supported**) - `(1 + 2) * 3`.

## References, Ranges, And Access

- <!-- feature:cell_references --> **Cell references** (**supported**) - `A1`,
  `$A$1`, `AA100`, `R1C1`, and `R[1]C[-2]`.
- <!-- feature:named_address_aliases --> **Named address aliases**
  (**supported**) - `Revenue = A1` gives the existing reactive binding a
  semantic address; calculated or decorated named assignments remain distinct
  bindings.
- <!-- feature:ranges --> **Ranges** (**supported**) - `A1:B10` and
  `R1C1:R3C3`.
- <!-- feature:full_column_and_row_ranges --> **Full column and row ranges**
  (**supported**) - `A:A`, `A:C`, `1:1`, and `1:3` in expression positions.
- <!-- feature:spill_references --> **Spill references** (**supported**) -
  `A1#` refers to the full spilled rectangle anchored at `A1`.
- <!-- feature:implicit_intersection --> **Implicit intersection `@`**
  (**diagnostic**) - `@A:A` was removed (it never reduced a range to a
  row/column value — `UnaryOp::At` was pure identity). A prefix `@` on a
  reference now rejects with `GRID_IMPLICIT_INTERSECTION_REMOVED`; reference
  the cell directly. Prefix `@` remains valid for temporal coordinates
  (`@today`), and postfix `@` remains valid for temporal references
  (`A1@-1`) and structured projection (`data@"amount"`,
  `data@["id", "amount"]`).
- <!-- feature:object_dot_bracket_access --> **Object dot/bracket access**
  (**supported**) - `obj.field`, `obj["field"]`, and optional chains.
- <!-- feature:bracket_and_dot_access --> **Bracket and dot access**
  (**supported**) - unified array/object access through `INDEX`.
- <!-- feature:from_end_indexing --> **From-end indexing** (**supported**) -
  `data[-1]` and `data[^1]`.
- <!-- feature:slice_notation --> **Slice notation** (**supported**) -
  `data[2:5]`, `data[:3]`, `data[3:]`, and `data[1:10:2]`.
- <!-- feature:structured_references --> **Structured references**
  (**supported**) - `Sales[Revenue]`.
- <!-- feature:query_function --> **QUERY function** (**supported**) -
  `QUERY(data, "SELECT * WHERE col1 > 5")` for table-like arrays.
- <!-- feature:model_table_declarations --> **Model table declarations**
  (**supported**) - `table Orders = { schema: "orders" }` declares durable
  table state, while `table PaidOrders = SELECT ... FROM Orders` declares a
  continuously maintained live table. Connector-backed table declarations
  retain their authored schema and ingestion contract as model metadata.
- <!-- feature:native_select_expression --> **Native `SELECT … FROM` expression**
  (**supported**) - `SELECT id AS order_id, amount * 1.2 AS gross FROM Orders WHERE status IN
  ("paid", "pending") OR amount BETWEEN 10 AND 30 ORDER BY
  amount DESC LIMIT 25`, plus grouped forms such as `SELECT status,
  SUM(amount) AS total, COUNT(DISTINCT customer) AS customers FROM Orders GROUP
  BY status`, parse and lower to structured relational IR
  (`REL_SELECT(source, projection, predicate, order, limit, group, having)`) instead of a SQL
  string. Header arrays and `Tuple`/`Vector`/`Deque` collections of `Record`
  rows execute natively, preserving the source sequence family. Connector-
  produced Frames also route through native filtering, ordering, limiting, and
  projection and may feed another query without materializing back to cells.
  Warehouse-backed queries push supported clauses to BigQuery, Snowflake,
  Redshift, and Databricks using provider-native parameter binding, with
  relational residuals executed in DataFusion. `WHERE` uses a canonical
  recursive predicate tree with SQL `NOT`/`AND`/`OR` precedence and
  three-valued blank/`NULL` behavior. `LIKE`/`ILIKE` use SQL `%` and `_`
  wildcards. Computed projections use a typed scalar tree and require `AS`;
  arithmetic, searched and simple `CASE`, `COALESCE`, `NULLIF`, `ABS`, `SQRT`, `FLOOR`,
  `CEIL`/`CEILING`, `ROUND`, `POWER`, `LOWER`, `UPPER`, `LENGTH`, `CAST`, `TRY_CAST`, `IN`, and inclusive `BETWEEN`
  share the same backend-neutral
  contract. Cast targets canonicalize to `number`, `string`, or `boolean`;
  `CAST` reports an invalid conversion while `TRY_CAST` returns null. `CASE` is ordered, first-true, and treats unknown conditions as
  fallthrough. `FETCH FIRST|NEXT n ROW|ROWS ONLY` is the SQL-standard spelling
  of the same bounded result stage as `LIMIT n`. `LIMIT n OFFSET m` and
  `OFFSET m [ROW|ROWS] [FETCH FIRST|NEXT n ROW|ROWS ONLY]` share one result-
  window contract across resident values, Frames, Polars, DataFusion, and
  bounded warehouse pushdown. `ORDER BY ... NULLS FIRST|LAST` controls blank/
  null placement for outer and analytic-window ordering; omitted placement
  remains null-last in both directions. Outer `ORDER BY` accepts typed scalar
  expressions and resolves both simple and computed SELECT aliases across
  resident collections, Frames, Polars, DataFusion, and warehouse pushdown;
  sort keys are evaluated once per row. Analytic-window ordering accepts the
  same scalar expressions; ranking, peers, and `RANGE` bounds share cached key
  values across those backends. `COUNT(*)` plus
  `COUNT`, `COUNT(DISTINCT ...)`, `SUM`, `AVG`, `MIN`, and `MAX` over portable
  scalar expressions execute for resident values, Frames, Polars, DataFusion,
  and supported warehouse pushdown. Post-aggregate `HAVING` uses the same
  predicate tree.
  `SELECT DISTINCT` deduplicates typed projected rows before outer ordering and
  limiting across resident relations and source-proven Frames.
  SQL `UNION`, `INTERSECT`, and `EXCEPT`, with optional `ALL`, compose complete
  query results positionally. Typed duplicate/null semantics, SQL multiset
  counts, `INTERSECT` precedence, left-arm column names, and final-result
  ordering/limits are shared by resident collections and source-proven Frames.
  Analytic projections support `ROW_NUMBER`, `RANK`, `DENSE_RANK`, `NTILE`,
  `PERCENT_RANK`, `CUME_DIST`, `LAG`, `LEAD`, `FIRST_VALUE`, `LAST_VALUE`,
  `NTH_VALUE`, and windowed `COUNT`/`SUM`/`AVG`/`MIN`/`MAX` with `PARTITION BY` and
  `ORDER BY`, shared by resident values, Frames, local analytics, and warehouse
  pushdown. `LAG`/`LEAD` accept bounded offsets and scalar defaults; aggregate
  and value windows accept validated explicit `ROWS BETWEEN ... AND ...` and
  `RANGE BETWEEN ... AND ...` frames. Grouped queries stage `WHERE`, aggregation, `HAVING`, windows, outer
  ordering/result-window, and final projection in SQL logical order.
  Parenthesized relation subqueries and non-recursive SQL `WITH name AS
  (SELECT ...) SELECT ...` CTEs compose resident relation values directly and
  source-proven chains fuse into one physical Frame region;
  single-source aliases resolve qualified references without changing the
  source schema. Equality-correlatable `EXISTS`, `NOT EXISTS`, correlated `IN`,
  and null-aware correlated `NOT IN` over explicitly aliased sources lower to
  composite-key hash semi/anti joins while retaining inner-local and trailing
  outer filters. Correlated scalar aggregate projections lower to grouped inner
  relations plus typed lookup joins, with SQL empty-group defaults and no
  per-outer-row subquery evaluation. Multiple aggregate projections compose
  for resident relations and source-proven Frames. `WITH RECURSIVE` executes as
  a bounded fixpoint group over header arrays and native record sequences, with
  column lists, multiple bindings, simultaneous mutual recursion, per-binding
  `UNION`/`UNION ALL`, and explicit 1,000-iteration and 2,000,000-aggregate-row
  limits. Source-proven groups additionally promote to native Frame recursion,
  including explicit column lists, multiple or mutually recursive bindings,
  set expressions, and recursive equi-joins against other resident Frames.
  Explicitly aliased `INNER`, `LEFT`, `RIGHT`, and `FULL` equi-joins lower to
  `REL_JOIN`, execute as bounded typed hash joins for resident values and
  Frames, and support composite keys.
- <!-- feature:postgresql_table_queries --> **PostgreSQL table queries**
  (**supported**) - `PG_TABLE("finance", "public", "orders")` and related
  bounded Postgres helpers.
- <!-- feature:native_polars_frames --> **Native frames**
  (**supported**) - `READ_PARQUET("orders.parquet") |> WHERE("amount > 0")`
  creates a `frame` value for filtering, projections, and columnar analytics.
- <!-- feature:spatial_references --> **Spatial references** (**supported**) -
  `ABOVE`, `BELOW`, `LEFT`, `RIGHT`, and directional offset forms.
- <!-- feature:neighbors_reference --> **NEIGHBORS reference** (**supported**) -
  `NEIGHBORS` and `NEIGHBORS(N)`.
- <!-- feature:temporal_references --> **Temporal references** (**supported**)
  - `A1@-1`, `A1@dt"..."`, and temporal-coordinate shorthands such as
  `A1@today`, `A1@monday`, `A1@january`, `A1@1776`, `A1@5000BCE`, and
  `A1@2026-12-31` read historical values from model history.
- <!-- feature:iteration_context --> **Iteration context** (**supported**) -
  `ROW_INDEX`, `COL_INDEX`, `IS_FIRST`, `IS_LAST`, and `CELL_COUNT` inside
  range-target rule actions, resolved for each materialized target cell.
- <!-- feature:header_selection --> **Header selection** (**supported**) -
  `data@"amount"` for a single header/key.
- <!-- feature:pick_omit_sugar_with_keys_without_keys --> **PICK/OMIT/RENAME sugar**
  (**supported**) - `data@["id", "amount"]`, `data@!["secret"]`,
  `data PICK id, glob"*amount*"`, `data OMIT secret`,
  `data RENAME "old" AS "new"`.

## Operators

- <!-- feature:binary_operators --> **Binary operators** (**supported**) -
  arithmetic, concatenation, comparison, and equality operators.
- <!-- feature:unary_operators --> **Unary operators** (**supported**) - unary
  `+`, unary `-`, logical `!`, and `NOT`.
- <!-- feature:pipeline_operator --> **Pipeline operator `|>`**
  (**supported**) - `frame |> WHERE("x > 0") |> COLLECT()` desugars to nested
  function calls, placing the left expression as the first argument.
  `values |> FILTER(value => predicate [, if_empty])` is the elementwise
  special form and lowers to
  `FILTER(values, MAP(values, value => predicate) [, if_empty])`. Ordinary
  `FILTER(values, include_mask [, if_empty])` is unchanged outside a pipe; the
  legacy `FILTER(_, _ > 0)` pipe spelling remains accepted but is not
  canonical. See [`collections.md`](./collections.md#functional-pipelines).
- <!-- feature:of_apply_operator --> **Infix apply `OF`** (**supported**) -
  function-first mirror of pipe: `ABS() OF A1` ≡ `A1 >> ABS()`;
  `ROUND(_, 2) OF ABS() OF A1` is **right-associative** and ≡
  `A1 >> ABS() >> ROUND(_, 2)`. The left operand must be a **function call**
  (`ABS()`, not bare `ABS`); the right operand must be a **value** (cell, literal,
  or expression without `_` placeholders). Callable `OF` callable is rejected.
  `%OF` is unrelated (percent-of → `PERCENTOF`); `IS MULTIPLE OF` stays on the
  comparison layer. See [`infix-operators.md`](./infix-operators.md#infix-apply-of).
- <!-- feature:percentage_operator --> **Percentage operator** (**supported**) -
  `50%` is `0.5`.
- <!-- feature:right_associative_exponentiation --> **Right-associative
  exponentiation** (**supported**) - `2 ^ 3 ^ 2` parses as `2 ^ (3 ^ 2)`.
- <!-- feature:exponent --> **Exponent `**`** (**supported**) -
  `2 ** 3`.
- <!-- feature:integer_division --> **Integer division** (**supported**) -
  `7 // 2` (floor division). Use `QUOTIENT(n, d)` for truncate-toward-zero
  division (Excel semantics). Backslash `\` is not a division operator.
- <!-- feature:modulo_operator --> **Modulo operator** (**supported**) -
  `10 %% 3`, `10 MOD 3`, or `10 MODULO 3` (all desugar to `MOD`).
- <!-- feature:divides_operator --> **Divides operator** (**supported**) -
  `10 DIVIDES 5`, `10 NOT DIVIDES 3`, or `10 /? 5` (desugar to `MOD(a, b) = 0`).
  See [`infix-operators.md`](./infix-operators.md).
- <!-- feature:coprime_operator --> **Coprime operator** (**supported**) -
  `8 COPRIME 15` (desugar to `GCD(a, b) = 1`).
- <!-- feature:bitwise_infix_operators --> **Bitwise infix operators**
  (**supported**) - `a BITAND b`, `BITOR`, `BITXOR`, `BITLSHIFT`/`SHL`, and
  `BITRSHIFT`/`SHR`.
- <!-- feature:array_append_operator --> **Array append** (**supported**) -
  `[1, 2] ++ [3, 4]` desugars to `VSTACK`.
- <!-- feature:collection_operators --> **Collection operators** (**supported**) -
  `[1, 2, 3] HAS 2`, `[1, 2] SUBSET OF [1, 2, 3]`, `[1, 2, 3] SUPERSET OF [1, 2]`,
  and `[1, 2] OVERLAPS [2, 3]`. Membership and set relations compare direct
  elements without recursively flattening nested arrays; 2-D arrays expose
  rows, while subset/superset are unordered and duplicate-insensitive. Equality
  is type/tag-sensitive, compares errors by code, equates signed zero, never
  equates `NaN`, and distinguishes infinity signs.
- <!-- feature:factorial_operators --> **Factorial operators** (**supported**) -
  `5!` and `7!!`.
- <!-- feature:string_multiplication --> **String multiplication**
  (**supported**) - `"ha" * 3` repeats text.
- <!-- feature:logical_operators --> **Logical operators** (**supported**) -
  `AND`, `OR`, `XOR`, `NOT`, `&&`, and `||`.
- <!-- feature:null_coalescing --> **Null coalescing** (**supported**) -
  `A1 ?? 0`; `DEFAULT` is the canonical spelling.
- <!-- feature:membership_operators --> **Membership operators** (**supported**)
  - `value IN [1, 2, 3]` and `value NOT IN set`.
- <!-- feature:inequality_alias --> **Inequality aliases** (**supported**) -
  both `<>` and `!=`.
- <!-- feature:between_operator --> **BETWEEN operator** (**supported**) -
  `5 BETWEEN 1 AND 10`, plus `NOT BETWEEN`.
- <!-- feature:like_operator --> **LIKE operator** (**supported**) -
  `"Jon" LIKE "J*n"` and `NOT LIKE`.
- <!-- feature:string_predicate_operators --> **String and ordered-containment
  operators** (**supported**) - `STARTS WITH`, `ENDS WITH`, `ILIKE`, and their
  `NOT` forms; `CONTAINS` is case-sensitive contiguous containment for both
  text and ordered arrays/tuples/vectors/deques, with linear sequence matching.
- <!-- feature:is_predicates --> **IS predicates** (**supported**) -
  `value IS NUMBER`, `value IS NOT BLANK`, `value IS EMPTY`, `value IS ODD`,
  `value IS EVEN`, `value IS PRIME`, `value IS MULTIPLE OF 5`, and domain
  predicates such as `value IS URL`.
- <!-- feature:chained_comparisons --> **Chained comparisons** (**supported**) -
  `0 <= score <= 100`.
- <!-- feature:spaceship_operator --> **Spaceship operator** (**supported**) -
  `A1 <=> B1` returns `-1`, `0`, or `1`.
- <!-- feature:set_operators --> **Set operators** (**supported**) - `UNION`,
  `INTERSECT`, `EXCEPT`.
- <!-- feature:exclude_operator --> **EXCLUDE operator** (**supported**) -
  synonym for `EXCEPT`.
- <!-- feature:reduction_operators --> **Reduction operators** (**supported**) -
  `+/ A1:A10`, `*/ A1:A10`, and `&/ A1:A10`.
- <!-- feature:broadcast_dot_syntax --> **Broadcast-dot syntax**
  (**supported**) - `SIN.([1, 2, 3])` and `ROUND.(values, 2)`.
- <!-- feature:domain_operators --> **Domain operators** (**supported**) -
  `25 %OF 200` and `100 TO 200`.
- <!-- feature:combinatoric_operators --> **Combinatoric operators**
  (**supported**) - `n CHOOSE k` → `COMBIN(n, k)`; `n PERMUTE k` →
  `PERMUT(n, k)`; `n MULTICHOOSE k` → `COMBINA(n, k)`. Bind tighter
  than `*`, `/`, `//`, and `%%` (`5 * 3 CHOOSE 2` is `5 *
  COMBIN(3, 2)`). Infix `CHOOSE` is unrelated to the lookup function
  `CHOOSE(index, ...)`.
- <!-- feature:uncertainty_operator --> **Uncertainty operator** (**supported**)
  - `100 +/- 5` and `100 +/- measurement_error`.

## Expressions And Control Flow

- <!-- feature:function_calls --> **Function calls** (**supported**) -
  `SUM(A1:A3)`, dotted function names such as `Z.TEST(...)`, and the full
  generated catalog in `functions.md`.
- <!-- feature:named_arguments --> **Named arguments** (**supported**) -
  `ROUND(3.14159 AS number, 2 AS digits)`.
- <!-- feature:conditional_expression_then_else --> **Conditional expression**
  (**supported**) - `score > 0 THEN "positive" ELSE "non-positive"`.
- <!-- feature:let_function --> **LET function** (**supported**) -
  `LET(x, 2, x + 3)`.
- <!-- feature:do_blocks --> **DO blocks** (**supported**) - multi-line local
  bindings ending in a result expression. Async calls are dependency-aware:
  independent bindings launch concurrently, `AWAIT` adds a barrier, `DO SYNC`
  serializes async bindings, and the result waits for all active stages.
- <!-- feature:effect_traversal --> **Bounded effect traversal** (**supported**)
  - `TRAVERSE` applies one effectful named function serially and
  `PAR_TRAVERSE` applies it with an explicit concurrency bound. Both preserve
  source order, enforce collection and concurrency limits before launching
  work, and fail closed when the function has zero or multiple effect sites.
- <!-- feature:with_expression --> **WITH expression** (**supported**) -
  `WITH data = HTTP_JSON(url), users = data.results THEN users[1] ELSE BLANK`.
- <!-- feature:where_clause --> **WHERE clause** (**supported**) -
  `total + tax WHERE total = SUM(A1:A10), tax = total * 0.21`.
- <!-- feature:using_as_bindings --> **USING...AS bindings** (**supported**) -
  `total + tax USING total AS SUM(A1:A10), tax AS total * 0.21`.
- <!-- feature:unless_modifier --> **UNLESS modifier** (**supported**) -
  `amount UNLESS amount = 0`.
- <!-- feature:assert_guard --> **ASSERT guard** (**supported**) -
  `value ASSERT value > 0 ELSE #N/A`.
- <!-- feature:try_then_else_error_recovery --> **TRY...THEN...ELSE error
  recovery** (**supported**) - `TRY primary() THEN backup() ELSE "n/a"`.
- <!-- feature:case_when_expression --> **CASE WHEN expression** (**supported**)
  - `CASE WHEN score >= 90 THEN "A" ELSE "F" END`.
- <!-- feature:pattern_matching --> **Pattern matching** (**supported**) -
  `MATCH(status, "draft" -> :gray, _ -> :red)`. Error-literal arms match on the
  subject's error kind without propagating —
  `MATCH(risky, #DIV/0! -> 0, #N/A -> BLANK, _ -> risky)`.
- <!-- feature:choice_sets --> **Choice sets** (**supported**) -
  `CHOICE status = :green | :amber | :red` declares a one-of enum that makes
  `MATCH` check exhaustiveness; `CHOICES perms = :read | :write | :exec`
  declares a flag set, where `perms HAS :read + :write` tests membership.
- <!-- feature:algebraic_choices --> **Algebraic choices** (**supported**) -
  `CHOICE Reply = Ok(value: number) | Rejected(reason: string)` declares
  payload-bearing constructors such as `Reply.Ok(7)`. Constructor-pattern
  `MATCH` is exhaustive, fields may recursively reference the enclosing type,
  and nested values are bounded to 64 levels.
- <!-- feature:arrow_lambda --> **Arrow lambda** (**supported**) -
  `x => x * 2`, `(acc, x) => acc + x`.
- <!-- feature:named_trailing_blocks --> **Named trailing blocks** (**supported**)
  - `MAP(rows) WITH row DO ... END` and
  `REDUCE(0, values) WITH total, value DO ... END` lower to the helpers'
  existing final lambda argument. Also supported by `SCAN`, `ITERATE`,
  `BYROW`, `BYCOL`, and `MAKEARRAY`, with checked parameter arity.
- <!-- feature:lambda_function --> **LAMBDA function** (**supported**) -
  `LAMBDA(x, x + 1)`.
- <!-- feature:named_definitions --> **Named definitions** (**supported**) -
  `DEFINE hypot(a, b) = SQRT(a^2 + b^2)` names a reusable, non-recursive
  helper; the `DEFINE` keyword is optional (`hypot(a, b) = …`) and `DEF` is an
  accepted synonym. Definitions receive independently inferred principal
  signatures with fresh per-call polymorphism, open record rows, shared
  collection protocol constraints, and inferred connector effect rows. One
  shared callable body supports direct forward calls and `_` partial
  application in supported callback positions; recursion and storing callable
  values in cells remain unsupported. See [named functions](named-functions.md).
- <!-- feature:named_function_reflection --> **Named-function reflection**
  (**supported**) - `ARGS(fn)`, `BODY(fn)`, and `FUNCTION(fn)` fold at compile
  time to ordinary Grid values. `BODY` exposes a normalized, versionable AST
  shape with exhaustive structural coverage of the expression tree.
- <!-- feature:named_function_calculus --> **Named-function calculus**
  (**supported**) - `D(fn, x[, step])` differentiates a named definition using
  exact autodiff when available and central differences otherwise;
  `INTEGRAL(fn, start, end[, control])` adaptively integrates a one-parameter
  definition. `DERIVATIVE` and `INTEGRATE` are the long-form aliases.
- <!-- feature:named_function_sampling --> **Named-function sampling**
  (**supported**) - `SAMPLE(fn, coordinates)` realizes explicit points;
  `SAMPLE(fn, start, end[, count_or_tolerance])` produces fixed-resolution or
  adaptive `x`/`y` rows whose reactive bounds can be driven by a chart
  viewport. Multi-parameter families select a varying parameter and bind the
  others by name; `SAMPLE_INFO` reports resolution, tolerance,
  discontinuities, and safety-limit metadata.
- <!-- feature:partial_application --> **Partial application** (**supported**) -
  `SUM(5, _)` produces a lambda when used as a value.
- <!-- feature:array_comprehensions --> **Array comprehensions** (**supported**)
  - `[x * 2 FOR x IN A1:A10 IF x > 0]`.
- <!-- feature:sequence_shorthand --> **Sequence shorthand** (**supported**) -
  `1..10`, `1..<10`, `1..2..10`, and date/duration ranges.
- <!-- feature:exclusive_range --> **Exclusive range `..<`** (**supported**) -
  `1..<10` excludes the upper bound.
- <!-- feature:pipe_operator --> **Pipe operator** (**supported**) -
  `A1 >> ABS() >> ROUND(_, 2)`. `>>` and `|>` share the same insertion and
  functional-FILTER lowering rules.
- <!-- feature:with_do_pipeline --> **WITH … DO pipeline** (**supported**) -
  `WITH A1 DO FILTER(value => value > 0) THEN SORT(_, -1) >> TAKE(5)` — same desugar as
  `>>` on `_`; after `DO`, steps may be separated by `THEN`, `>>`, or `|>`.
  Optional `ELSE` wraps the chain in `IFERROR` (classic `WITH name = … THEN`
  bindings are unchanged).
- <!-- feature:tap_pipeline_function --> **TAP pipeline function**
  (**supported**) - `value >> TAP` passes the value through for inspection.
- <!-- feature:conditional_pipeline_if_cond --> **Conditional pipeline**
  (**supported**) - `value >> ABS() IF cond` desugars to
  `IF(cond, ABS(value), value)`. Each pipe step may have its own trailing
  `IF`; see [`infix-operators.md`](./infix-operators.md).

## Function Catalog

The function catalog is the user-callable function reference:

- `functions.md` lists every built-in function, grouped by category, with
  signature, return type, aliases, compatibility notes, and external contracts.
- `function-compatibility.md` lists every canonical name and alias with its
  compatibility label.
