hal/shader/language.lisp
Translate backend-neutral quantity failures into shader source errors.
A represented shader value with optional backend-neutral semantic meaning.
A descriptor resource and, for textures, the represented meaning and colour transfer of the value returned by sampling.
One descriptor-backed uniform block with ordered, inspectable members.
A named value inside a shader-uniform-block, not a separate resource.
One descriptor-backed read-only array of uniformly typed elements.
The array has no declared length: a shader indexes it with buffer-element
and the host decides how many elements it uploads. #HFX2LI
The named ABI shared by one task shader and its mesh shader consumers.
One scalar/vector field or fixed array in a task payload ABI.
Return the task-payload ABI named by name, or NIL.
Define a durable, inspectable task-to-mesh payload ABI.
An inspectable semantic map whose dense representation is supplied at use.
A four-row homogeneous map with a separately checked sampling projection.
Return the shader semantic map named by name, or NIL.
The host byte size implied by block's shader-visible vec4-lane layout.
Hosts allocating a backing buffer should derive their size here rather than repeating the lane arithmetic as a literal.
A lexical alias for one already parsed shader-function argument.
Whether semantic quantity checking is active at expression.
Annotations enter checked arithmetic; an explicit representation boundary
leaves it again while retaining the semantic operand in the expression graph.
Whether expression directly denotes one lowerable represented value.
Reusable shader source parsed into the typed graph at each call site.
An inspectable typed call whose body is inlined during backend lowering.
A typed value conditional from the shared language.
A typed bounded fold lowered as structured target control flow.
The homogeneous result of applying a represented semantic map.
A virtual sampling product projected from a homogeneous map application.
A checked semantic name for a represented value, with no codegen effect.
An explicitly meaningful value constructed from semantically raw source.
An explicit assumption that an opaque represented value has a meaning.
An explicit exposure of a semantic value's raw machine representation.
An explicit linear unit conversion that may emit numerical scaling.
Exact fields lower directly from cached components; no intermediate vec3 exists solely for compiler convenience.
This boundary is deliberately the one way for checked source to enter an opaque representation-level calculation. Its operand remains visible in the graph, but arithmetic above the node is raw until meaning is assumed again at another explicit boundary.
One ordered shader effect or structured group of shader effects.
An ldb call whose byte specifier is part of the operator, not an operand.
Buffer elements are raw representations until a shader interprets them.
Reconstruct the compact mathematical form of expression.
The immediate subexpressions expression computes from.
Virtual projective-map values retain their semantic source relationships even when a backend chooses not to materialize intermediate vectors.
Return the virtual map application denoted by expression, or NIL.
Return a virtual map application carried by reference target, or NIL.
Return the virtual sampling projection denoted by expression, or NIL.
Return the expressions directly or recursively owned by statement.
Return the expression graph in source order, without duplicate objects.
Return :WORKGROUP or :INVOCATION for the expression's finest variation.
Check operands against operator's contract and return the call's type.
Derive semantic meaning for one shader call once annotations enter it.
Derive a packed semantic layout for one shader call, or return NIL.
Derive semantics totally once any operand descends from an annotation.
An entirely unannotated graph remains valid legacy shader source. Once an annotation enters a calculation, however, a missing operand specification or an operator without a backend-neutral rule is a source error rather than a silent loss of meaning.
The shared + and - contract: every operand carries one common type.
The extended-math family shares one componentwise contract: a fixed or open operand count, every operand carrying the same scalar or vector type, and a result of that type. Each operator states its accepted signature explicitly instead of promising every GLSL overload.
Operators are named by ordinary symbols, treating the shader language as a small compiled subset of Common Lisp plus a vector library. Where CL already has the word with the right meaning the operator IS that symbol:
- is CL:+, exactly as SBCL's own compiler keys IR knowledge off standard
names it never funcalls. Where CL is silent (dot, mix, swizzle, ...) the
operator is an exported symbol of this package. A shader-call stores the
symbol, never a resolved behavior object, so redefining an operator's
methods reaches every existing specification on its next compile.
Whether operator names an operator of the shader language.
Membership is an open set of EQL methods: define-shader-operator admits a
name, and the operator's behavior arrives as further EQL methods on
parse-shader-operator-call, infer-shader-call-type, and lower-shader-call.
Admit name into the shader operator vocabulary, with its documentation.
Documentation lives under the SHADER-OPERATOR doc-type, so shader meaning
never collides with a standard symbol's function documentation:
(documentation 'CL:+ 'SHADER-OPERATOR) answers for shaders alone.
The transcendental and lattice family: what procedural image mathematics needs to build hashes, value noise, and periodic shaping without a table.
Shader functions are typed source composition. Authors write an ordinary
expression body, including lexical LET*, and every call is parsed against
its actual arguments into an inspectable shader-function-call. Backends
inline the resulting expression graph; no shader author constructs forms.
Return the live typed shader function named by name, or NIL.
Define a reusable typed shader expression with ordinary source syntax.
The body is parsed at each call site, so argument types and quantity meanings flow through the same operator protocol as handwritten shader expressions. LET* is lexical inside the function. The definition macro records source; its body does not execute as Lisp and does not return generated S-expressions. #RO74NL
Abstractions are source vocabulary, not core operators. They rewrite into
ordinary shader forms before parsing. Keep them for genuinely syntactic
generation, such as unrolling host-known data; ordinary reusable
calculations belong in define-shader-function above.
Return the revision of reusable shader functions and source abstractions.
Record that reusable shader source named by name may have changed.
Prefer newly shared source over any shader-only source of the same name.
Whether operator names source vocabulary expanded before shader parsing.
Expand one source abstraction call into core shader-language forms.
Remove an old source-rewriter definition when name becomes a function.
Remove an old typed-function definition when name becomes an abstraction.
Define name as a source-level shader abstraction.
The expansion body receives the destructured call operands and returns a raw shader source form made from core operators or other abstractions.
Expand all shader abstraction calls nested inside form.
An inner, heavier ring gives the footprint a Gaussian-like core.
Rotate the outer ring by half a sector so no square sample border
is reinforced along the light-space axes.
Parse one (operator . ARGUMENTS) form into a typed shader-call.
The default method parses every argument as an expression and asks
infer-shader-call-type for the result type; an operator with special
syntax, such as swizzle's component designator, replaces parsing wholesale.
Return form's integer value when it is an integer literal or a constant
symbol naming one, else NIL.
Parse (ldb (BYTE SIZE position) VALUE).
SIZE is a positive integer. position is an integer, or a 32-bit unsigned
expression for a field whose place is only known at run time; then the field
must still fit the operand's width, which is checked by the caller's data
rather than the language.
Parse one expression body, optionally beginning with lexical LET*.
Parse a COUNTED-FOLD's :UNTIL test in the fold's environment.
The test is evaluated at the head of every iteration, seeing the index and the carried state, and must be a straight-line boolean: it lowers into the loop header, so it may not itself fold.
A live named value -- a knob, in the application's word -- may stand in shader source as a symbol. It folds to a literal at parse time, and the parse records what was folded, so a live pipeline can tell when the source it was built from has quietly moved.
The live value name stands for in shader source, or NIL when name names
none. Returns (VALUES VALUE declaration FOUND-P): VALUE is a real, and
declaration, when given, is a represented-value declaration whose quantity
the literal takes on.
When bound to a cons cell, its car collects (NAME . VALUE) for every live named value folded while parsing, so the parser's caller can remember what its artifact depends on.
form as a folded literal when it names a live shader source value.
Whether every (NAME . VALUE) in references still names that value.
Merge the historical :affine-p and the general :character source keywords
into one designator for parse-declaration-quantity-specification.
Translate a source character designator into constructor options.
NIL leaves the character to the named definition; T is the historical :AFFINE-P spelling of a point; a keyword names the character directly.
Construct a checked projective map definition from declarative semantics.
Define an inspectable projective map behind an EQL-specialized protocol.
Return a compile-time unsigned value and true, or NIL and false.
This intentionally models the renderer's current camera ABI: an aggregate of aligned vec4 lanes. Do not imply general std140 packing until the language owns that calculation explicitly.
Parse one stage effect, dispatching on its source operator and stage.
LET* is CL:LET* by identity: the language is a compiled subset of CL, and its binding form is the standard symbol, not a look-alike.
Hoist inline-function lexical bindings in dependency order.
The bindings remain typed objects owned by each shader-function-call. Values
needed by the entry block are flattened there, while expressions inside a
structured conditional remain owned by that arm so backends do not eagerly
evaluate work which the condition excludes.
COUNT and INITIAL belong to the preheader. UPDATE owns its lexical work inside the loop body.
A non-hoisted call is lowered where it occurs; its owned bindings and any nested calls travel with it.
Define name as a function returning a durable, inspectable shader graph.
Define name as a function that reparses its shader source on every call.
Where define-shader parses once at load, this parses each time it is asked,
so live named values (shader-source-value) folded into the body are read
afresh -- and noted in *SHADER-SOURCE-VALUE-REFERENCES* -- by every pipeline
build, exactly as a define-shader-method's body is. Parsing at load still
happens once, to fail early on a broken source.
Live definitions ---------------------------------------------------------
Return the current durable shader specification for role and stage.
Define a shader-producing method with ordinary DEFMETHOD identity.
Calling the method reparses its small source form so changes to source-level abstractions participate in live rebuilding. Method replacement remains the role/stage identity watched by the MOP; abstraction revisions are tracked separately by live artifacts.
A narrow MOP subscription for one generic-function argument tuple.
update-dependent only records a monotonically increasing revision. Consumers
perform compilation, GPU work, and calls back into the generic function after
the method mutation has completed and outside the generic function's lock.
SBCL/Closer-MOP may also announce generic-function reinitialization with no event arguments. ADD-METHOD and REMOVE-METHOD contain the affected method and are sufficient; replacement naturally coalesces to one pending revision before the next consumer turn.
Subscribe a revision source to generic-function changes for arguments.
Return the current definition revision and its most recent MOP event.
Record that the consumer finished attempting revision.
A newer concurrent notification remains pending.
Remove dependent from its generic function. This operation is idempotent.
Lowering protocols -------------------------------------------------------
Lower specification for target without changing its source graph.
target participates in ordinary CLOS dispatch so each backend can own its
structured product and source provenance. #JDLQPN
Lower expression into context's target product and return its value.
Target context deliberately precedes operator identity in method selection: an operator implemented only for one backend must not capture another backend's context before its source-located unsupported-operation method.
((source-form reason) &body body)((call tool-call) stream)Headings, paragraphs, figures and their IDs, mentions, marks.
(name &key component-count scalar-kind bit-width opaque-kind
sample-result-type image-depth-p)(designator &optional source-form)Logical disjunction of tests and raw truth values.
Logical conjunction of tests and raw truth values.
(left right)Test whether two compatible scalars are equal.
(type)Test whether one compatible scalar is greater than another.
(object)The shared source identity of a reusable expression-language function.
A represented shader value with optional backend-neutral semantic meaning.
The semantic meaning of a value, separate from its machine representation.
Semantic quantities packed into disjoint positions of one representation.
(declaration)Return DECLARATION's backend or Common Lisp representation type, or NIL.
PROPERTY: VALUES; -- the property a keyword, the values a list written space-separated.
(declaration)Return DECLARATION's homogeneous quantity specification, or NIL.
(declaration)Return DECLARATION's heterogeneous quantity layout, or NIL.
(declaration)Return the source form which established DECLARATION.
A descriptor resource and, for textures, the represented meaning and colour transfer of the value returned by sampling.
One descriptor-backed uniform block with ordered, inspectable members.
A named value inside a SHADER-UNIFORM-BLOCK, not a separate resource.
One descriptor-backed read-only array of uniformly typed elements. The array has no declared length: a shader indexes it with BUFFER-ELEMENT and the host decides how many elements it uploads. #HFX2LI
Read one indexed element of a storage buffer resource.
Multiplication and scalar scaling.
The named ABI shared by one task shader and its mesh shader consumers.
One scalar/vector field or fixed array in a task payload ABI.
(left right)(name field-forms source-form)Construct a meaningful literal.
A canonical product of symbolic base dimensions raised to rational powers.
(quantity dimension unit character type source-form)(affine-p character)Merge the historical :AFFINE-P and the general :CHARACTER source keywords into one designator for PARSE-DECLARATION-QUANTITY-SPECIFICATION.
(components type source-form &optional whole)(name &body fields)An inspectable semantic map whose dense representation is supplied at use.
A four-row homogeneous map with a separately checked sampling projection.
(block)The host byte size implied by BLOCK's shader-visible vec4-lane layout. Hosts allocating a backing buffer should derive their size here rather than repeating the lane arithmetic as a literal.
Addition over compatible quantities.
A lexical alias for one already parsed shader-function argument.
A lexical alias binding one function argument inside an application.
(binding)A source expression with semantic meaning but no chosen machine form.
(expression)(expression)(expression)(expression)Whether semantic quantity checking is active at EXPRESSION. Annotations enter checked arithmetic; an explicit REPRESENTATION boundary leaves it again while retaining the semantic operand in the expression graph.
Expose a quantity's raw representation.
(expression)Whether EXPRESSION directly denotes one lowerable represented value.
(literal)(reference)Reusable shader source parsed into the typed graph at each call site.
(definition)One top-level defining form of a source file.
(definition)An inspectable typed call whose body is inlined during backend lowering.
One inspectable application of shared function source to checked values.
A typed value conditional from the shared language.
A value conditional shared by every arithmetic realization.
A typed bounded fold lowered as structured target control flow.
A bounded value-producing fold over an index and one carried state. The binding list is (INDEX COUNT STATE INITIAL), optionally followed by :UNTIL TEST, whose TEST sees INDEX and STATE and ends the fold early.
The homogeneous result of applying a represented semantic map.
A virtual sampling product projected from a homogeneous map application.
(expression)A checked semantic name for a represented value, with no codegen effect.
(expression)An explicitly meaningful value constructed from semantically raw source.
(expression)An explicit assumption that an opaque represented value has a meaning.
(expression)An explicit exposure of a semantic value's raw machine representation.
(expression)An explicit linear unit conversion that may emit numerical scaling.
(expression)(expression)(target)Return the source name denoted by reference TARGET.
(target)Whether semantic checking is active at reference TARGET.
(target)Return TARGET's homogeneous quantity specification, or NIL.
(target)Return TARGET's packed quantity layout, or NIL.
(expression)Whether semantic quantity checking is active at EXPRESSION.
One ordered shader effect or structured group of shader effects.
((assignment shader-output-assignment))An LDB call whose byte specifier is part of the operator, not an operand.
Extract the unsigned bit field (BYTE SIZE POSITION) of one unsigned scalar.
(expression)Reconstruct the compact mathematical form of EXPRESSION.
(expression)The immediate subexpressions EXPRESSION computes from.
(expression)Return the virtual map application denoted by EXPRESSION, or NIL.
(target)Return a virtual map application carried by reference TARGET, or NIL.
(expression)Return the virtual sampling projection denoted by EXPRESSION, or NIL.
(statement)Return the expressions directly or recursively owned by STATEMENT.
(specification)(expression)Return :WORKGROUP or :INVOCATION for the expression's finest variation.
(&rest uniformities)(expression)(name environment)(name environment source-form)(name environment source-form)Logical negation of one test or raw truth value.
(predicate operands source-form reason)(operator operands source-form)Check OPERANDS against OPERATOR's contract and return the call's type.
(operator operands source-form)Derive semantic meaning for one shader call once annotations enter it.
(operator operands source-form)Derive a packed semantic layout for one shader call, or return NIL.
(operator operands source-form)(operands source-form indices)(specification source-form)(dimension)(unit)Sample a two-dimensional texture through a sampler at a UV coordinate.
Load one exact two-dimensional texel at an unsigned integer coordinate.
Convert one scalar float or unsigned value to a 32-bit unsigned integer.
Convert one scalar float or unsigned value to a 64-bit unsigned integer.
Convert one scalar float or unsigned value to a 32-bit float.
Compare a depth reference through a comparison sampler at a UV coordinate.
(name &key (dimension nil dimension-supplied-p) unit
(tensor-order 0)
(affine-p nil affine-p-supplied-p)
(character nil character-supplied-p))(operator operands source-form)(left right)(left right)(operator operands source-form)(operator operands source-form)Subtraction or unary negation.
Division of two represented quantities.
(operands source-form)(operator)Test whether one compatible scalar is less than another.
Test whether one compatible scalar is at most another.
Test whether one compatible scalar is at least another.
(designator source-form)(width source-form &optional (scalar-kind :float))(operands source-form)The inner product of two vectors.
The non-negative remainder of integer division.
Interpolate compatible quantities by a scalar amount.
(operator operands source-form minimum maximum)The minimum of compatible quantities.
The maximum of compatible quantities.
The componentwise absolute value of a raw value.
The componentwise square root of a raw value.
Raise a dimensionless value to a dimensionless power.
Constrain a quantity between compatible bounds.
Produce dimensionless progress across compatible edges.
Compare compatible quantities and produce dimensionless values.
Normalize a dimensionless vector.
(type-name width operands source-form)Select and reorder vector components by a designator such as :XYZ or :RGB.
((name symbol) (type (eql 'arithmetic-operator)))(operator)Whether OPERATOR names an operator of the shader language. Membership is an open set of EQL methods: DEFINE-SHADER-OPERATOR admits a name, and the operator's behavior arrives as further EQL methods on PARSE-SHADER-OPERATOR-CALL, INFER-SHADER-CALL-TYPE, and LOWER-SHADER-CALL.
(name &optional documentation)Admit NAME into the shader operator vocabulary, with its documentation. Documentation lives under the SHADER-OPERATOR doc-type, so shader meaning never collides with a standard symbol's function documentation: (DOCUMENTATION 'CL:+ 'SHADER-OPERATOR) answers for shaders alone.
(operator form environment)Parse one (OPERATOR . ARGUMENTS) form into a typed SHADER-CALL. The default method parses every argument as an expression and asks INFER-SHADER-CALL-TYPE for the result type; an operator with special syntax, such as SWIZZLE's component designator, replaces parsing wholesale.
(operator context expression)Lower EXPRESSION into CONTEXT's target product and return its value. Target context deliberately precedes operator identity in method selection: an operator implemented only for one backend must not capture another backend's context before its source-located unsupported-operation method.
Read one indexed element of the task payload shared with a mesh shader.
State external meaning for a raw value.
Name a compatible derived quantity.
Apply a named projective map to a semantic affine point.
Project a homogeneous map application into its declared sampling product.
Convert a quantity to a compatible unit.
(name)Return the live typed shader function named by NAME, or NIL.
(name parameters body)(name parameters &body body)Define a reusable typed shader expression with ordinary source syntax. The body is parsed at each call site, so argument types and quantity meanings flow through the same operator protocol as handwritten shader expressions. LET* is lexical inside the function. The definition macro records source; its body does not…
(name)Notify loaded realizations that reusable arithmetic source changed.
(operator)Whether OPERATOR names source vocabulary expanded before shader parsing.
(operator form)Expand one source abstraction call into core shader-language forms.
(generic-function-name name)(name lambda-list &body body)Define NAME as a source-level shader abstraction. The expansion body receives the destructured call operands and returns a raw shader source form made from core operators or other abstractions.
(form environment)How the children of a list are arranged.
(layout positions)(specification positions extent)Derive the quantity selected from a homogeneous represented quantity. Selecting every position in order preserves the whole. A single component of an anonymous quantity remains anonymous. A named quantity must explicitly publish ordered component names; no default silently calls one axis the whole.
(expression)(form)Return FORM's integer value when it is an integer literal or a constant symbol naming one, else NIL.
(definition call-index role name &optional ordinal)(body environment &key binding-name-function)(definition form environment)(form environment)(form)Destructure a COUNTED-FOLD FORM into (VALUES INDEX-NAME COUNT-FORM STATE-NAME INITIAL-FORM UPDATE-FORM UNTIL-FORM), or return NIL when the shape is not (COUNTED-FOLD (INDEX COUNT STATE INITIAL [:UNTIL TEST]) UPDATE).
(left right)(form environment)Parse a COUNTED-FOLD's :UNTIL test in the fold's ENVIRONMENT. The test is evaluated at the head of every iteration, seeing the index and the carried state, and must be a straight-line boolean: it lowers into the loop header, so it may not itself fold.
(form environment)(form environment)(name)Return the live arithmetic definition named by NAME, or NIL.
(name)The live value NAME stands for in shader source, or NIL when NAME names none. Returns (VALUES VALUE DECLARATION FOUND-P): VALUE is a real, and DECLARATION, when given, is a represented-value declaration whose quantity the literal takes on.
When bound to a cons cell, its car collects (NAME . VALUE) for every live named value folded while parsing, so the parser's caller can remember what its artifact depends on.
(references)(type source-form)(character)Translate a source character designator into constructor options. NIL leaves the character to the named definition; T is the historical :AFFINE-P spelling of a point; a keyword names the character directly.
(options &key (default-tensor-order 0))Parse one source declaration plist into a quantity specification. Return NIL when OPTIONS contains no quantity attributes. This is the common source seam used by arithmetic parameters, shader interfaces, and semantic storage declarations; callers retain ownership of their source-specific error conditions and…
(positions specification)(extent projections)(name &key domain-type domain-quantity domain-dimension domain-unit
domain-affine-p sample-type sample-components
coordinate-scale coordinate-offset source-form)(specification)(name &key domain-type domain-quantity domain-dimension domain-unit
domain-affine-p sample-type sample-components
coordinate-scale coordinate-offset)(left right)(derived interpretation)Give a compatible anonymous DERIVED specification an explicit meaning. This is a semantic interpretation, never a numerical unit conversion. An already named quantity may only retain its name; anonymous derived results may acquire one when their dimension, exact unit, and tensor order agree with INTERPRETATION. …
(source target-unit)Return SOURCE expressed in TARGET-UNIT and its required numeric factor. The operation preserves semantic name, dimension, tensor order, and affine character. It is a linear unit conversion, not a semantic interpretation.
(expression)(class form environment &key constant-only-p)(form direction)A block-level piece of an Org document.
(form environment outputs)(left right)(declaration value form type-reason quantity-reason layout-reason)(operator stage form environment context)Parse one stage effect, dispatching on its source operator and stage.
A MuPDF context: its allocator, its store, and its error stack.
(forms declarations environment source-form)(&body body)The declarations BODY makes, read as a rule body, for a rule to include: the way to write a mixin.
(topology)(name payload source-form)(form stage environment context)(body environment context)(bindings statements)Hoist inline-function lexical bindings in dependency order. The bindings remain typed objects owned by each SHADER-FUNCTION-CALL. Values needed by the entry block are flattened there, while expressions inside a structured conditional remain owned by that arm so backends do not eagerly evaluate work which the…
(form options)(built-in)(inputs options)(statements class)(stage statements source-form &optional mesh-output)(name options body)(name options &body body)(name options &body body)Define NAME as a function that reparses its shader source on every call. Where DEFINE-SHADER parses once at load, this parses each time it is asked, so live named values (SHADER-SOURCE-VALUE) folded into the body are read afresh -- and noted in *SHADER-SOURCE-VALUE-REFERENCES* -- by every pipeline build, exactly as a…
(generic-function name specialized-lambda-list options &body body)Define a shader-producing method with ordinary DEFMETHOD identity. Calling the method reparses its small source form so changes to source-level abstractions participate in live rebuilding. Method replacement remains the role/stage identity watched by the MOP; abstraction revisions are tracked separately by live…
(role stage)Return the current durable shader specification for ROLE and STAGE.
A narrow MOP subscription for one generic-function argument tuple. UPDATE-DEPENDENT only records a monotonically increasing revision. Consumers perform compilation, GPU work, and calls back into the generic function after the method mutation has completed and outside the generic function's lock.
((generic-function standard-generic-function)
(dependent shader-definition-dependent)
&rest event)(specializer argument)(method arguments)(generic-function arguments)(dependent)(dependent)(dependent revision)Record that the consumer finished attempting REVISION. A newer concurrent notification remains pending.
(dependent)(target specification)Lower SPECIFICATION for TARGET without changing its source graph. TARGET participates in ordinary CLOS dispatch so each backend can own its structured product and source provenance. #JDLQPN
The mathematical shader language of #S4H8DR had textures, samplers, and a vec4-only uniform block, and no way to read an array of 64-bit words. Two additions carry a site into a shader: – A :storage-buffer resource with an :element type, indexed by buffer-element; the array has no declared length, and a bare…
Slug exposed a missing layer in the language. The core operators were typed objects and a complete shader could have top-level let* bindings, but the only reusable source vocabulary was define-shader-abstraction. Its method ran as host Lisp before parsing and returned a newly constructed S-expression. That is…
The CLOS seam is target × source construct, not one growing target switch. The intended relationship is illustrated by: Target objects are justified when they carry version, capability, platform, or binding-layout policy; an EQL keyword is enough while target choice is only a closed setting. Dense instruction and…
Typed mathematical shader expressions and their backend-neutral protocols.
This is the pleasant source language: declarations, bindings, and every expression are CLOS objects which retain their source forms. Sibling lowering systems implement the protocols at the bottom of this file while keeping their target products and construction state backend-owned.
The language itself is a small compiled subset of Common Lisp plus a vector library. Operators are named by ordinary symbols — CL's own where CL has the word, this package's where it does not — and each operator's parsing and typing are EQL-specialized methods. Backend implementations add lowering methods to the shared protocol without entering this package.