Skip to main content

Module ast

Module ast 

Source

Modules§

visit
This module provides infrastructure for the visitor pattern over the AirScript AST

Structs§

BinaryExpr
Represents an expression requiring evaluation of a binary operator
BoundedSymbolAccess
A SymbolAccess on a specific Boundary of a trace column.
Bus
Represents a bus declaration in an AirScript module.
BusOperation
Call
Represents a function call (either a pure function or an evaluator).
ColumnBoundaryFlags
ConstSymbolAccess
Represents a symbol access to a named constant.
Constant
Stores a constant’s name and value. There are three types of constants:
EvaluatorFunction
Evaluator functions take a vector of trace bindings as parameters where each trace binding represents one or a group of columns in the execution trace that are passed to the evaluator function, and enforce integrity constraints on those trace columns.
Function
Functions take a group of expressions as parameters and returns a value.
Identifier
Represents any type of identifier in AirScript
Let
A let statement binds name to the value of expr in body.
Library
This represents a fully parsed AirScript program, with imports resolved/parsed, but not merged.
ListComprehension
Module
This represents the parsed contents of a single AirScript module
PeriodicColumn
Declaration of a periodic column in an AirScript module.
Program
This represents a fully parsed AirScript program, with all imports resolved/parsed/merged.
QualifiedIdentifier
Represents an identifier qualified with both its parent module and namespace.
RangeExpr
SymbolAccess
SymbolAccess represents access to a named item in the source code; one of the following:
TraceBinding
TraceBinding is used to represent one or more columns in the execution trace that are bound to a name. For single columns, the size is 1. For groups, the size is the number of columns in the group. The offset is the column index in the trace where the first column of the binding starts.
TraceSegment

Enums§

AccessType
Represents the way an identifier is accessed/referenced in the source.
BinaryOp
Boundary
Describes the type of boundary in the boundary constraint.
BusOperator
BusType
ConstantExpr
Value of a constant. Constants can be of 3 value types:
Declaration
Represents all of the top-level items permitted at module scope.
Export
Represents an item exported from a module
Expr
Expressions which are valid in the body of a let statement, or in a function call.
FunctionType
Represents the type signature of a function
Import
An import declaration
InvalidAccessError
InvalidExprError
Represents an invalid expression for use in an Expr context
InvalidTypeError
Represents an invalid type for use in a BindingType context
ModuleType
NamespacedIdentifier
Represents an identifier qualified with its namespace.
PublicInput
Declaration of a public input for an AirScript program.
RangeBound
ResolvableIdentifier
Represents an identifier which requires name resolution at some stage during lowering.
ScalarExpr
Scalar expressions are expressions which evaluate to a single scalar value, i.e. they have no vector or matrix elements. Only scalar expressions are valid in a constraint statement.
Source
This structure is used to represent parsing arbitrary AirScript files which may or may not contain a root module.
Statement
Statements are top-level expressions in the body of evaluators, or in the boundary_constraints or integrity_constraints sections. These expressions are called statements because they do not evaluate to a value, instead they are evaluated sequentially.
Type
The types of values which can be represented in an AirScript program

Type Aliases§

ComprehensionContext
Represents the bindings in a comprehension expression.
ModuleId
This is a type alias used to clarify that an identifier refers to a module
Range
A range literal, equivalent to the interval [start, end).
TraceColumnIndex
The index of a column in a particular trace segment
TraceSegmentId
The id of a trace segment is its index in the trace_columns declaration