Glossary
active encoding module
An encoding module whose symbol table and macro table are available in the current segment of an Ion document.
The sequence of active encoding modules is set by an encoding directive.
argument
The sub-expression(s) within a macro invocation, corresponding to exactly one of the macro's parameters.
declaration
The association of a name with an entity (for example, a module or macro). See also definition.
Not all declarations are definitions: some introduce new names for existing entities.
definition
The specification of a new entity.
directive
A keyword or unit of data in an Ion document that affects the encoding environment, and thus the way the document's data is encoded and decoded.
In Ion 1.0 there are two directives: Ion version markers, and the symbol table directives.
Ion 1.1 adds encoding directives.
document
A stream of octets conforming to either the Ion text or binary specification.
Can consist of multiple segments, perhaps using varying versions of the Ion specification.
A document does not necessarily exist as a file, and is not necessarily finite.
E-expression
See encoding expression.
encoding directive
In an Ion 1.1 segment, a top-level E-expression that invokes the implicit $ion macro.
Defines a new encoding module sequence for the segment immediately following it.
The symbol table directive is effectively a less capable alternative syntax.
encoding environment
The context-specific data maintained by an Ion implementation while encoding or decoding data. In
Ion 1.0 this consists of the current symbol table; in Ion 1.1 this is expanded to also include the Ion
spec version, the current macro table, and a collection of available modules.
encoding expression
The invocation of a macro in encoded data, aka e-expression.
Starts with a macro reference denoting the function to invoke.
The Ion text format uses "smile syntax" (:macro ...) to denote e-expressions.
Ion binary devotes a large number of opcodes to e-expressions, so they can be compact.
encoding module
A module whose symbol table and macro table can be used directly in the user data stream.
encoding tag
A way of conveying the encoding of a value (i.e. its opcode), separated from the value itself.
expression
A serialized syntax element that may produce values.
Encoding expressions and values are both considered expressions, whereas NOP, comments, and IVMs, for example, are not.
inner module
A module that is defined inside another module and only visible inside the definition of that module.
Ion version marker
A keyword directive that denotes the start of a new segment encoded with a specific Ion version.
Also known as "IVM".
macro
A transformation function that accepts some number of streams of values, and produces a stream of values.
macro definition
Specifies a macro in terms of a template.
module
The data entity that defines and exports both symbols and macros.
opcode
A 1-byte, unsigned integer that tells the reader what the next expression represents
and how the bytes that follow should be interpreted.
placeholder
A special-purpose encoding expression that is replaced by a macro argument when evaluating the expansion of a template.
qualified macro reference
A macro reference that consists of a module name and either a macro name exported by that module,
or a numeric address within the range of the module's exported macro table. In text, these look
like :module-name::name-or-address.
segment
A contiguous partition of a document that uses the same encoding module sequence.
Segment boundaries are caused by directives: an IVM, set_symbols, add_symbols, set_macros, add_macros, use, and encoding directives end segments (with a new one starting immediately afterward).
The import and module directives can also end a segment if they are redefining a module binding that was in the encoding module sequence.
shared module
A module that exists independent of the data stream of an Ion document. It is identified by a
name and version so that it can be imported by other modules.
signature
The part of a macro definition that specifies its "calling convention", in terms of the shape and type of arguments it accepts.
The signature is implicit in a macro definition; it is derived from the placeholders that are in the template.
symbol table directive
A top-level struct annotated with $ion_symbol_table. Defines a new encoding environment
without any macros. Valid in Ion 1.0. In Ion 1.1, this is effectively a no-op because it has been replaced by the add_symbols, set_symbols, and use directives.
system module
A standard module named $ion that is provided by the Ion implementation, implicitly installed so
that the system symbols are available at all points within a document.
Subsumes the functionality of the Ion 1.0 system symbol table.
system symbol
A symbol provided by the Ion implementation via the system module $ion.
System symbols are available at all points within an Ion document, though the selection of symbols
varies by segment according to its Ion version.
tagless-element sequence
A list or s-expression that has homogeneous elements, allowing the type descriptor of the elements to be lifted into the
container's definition for more compact representation of the child values.
template
The part of a macro definition that expresses its transformation of inputs to results.
unqualified macro reference
A macro reference that consists of either a macro name or numeric address, without a qualifying module name.
These are resolved using lexical scope and must always be unambiguous.