# Packages
Package functions defines the standard builtin functions supported by the interpreter and as declared within the checker#StandardDeclarations.
# Functions
CompileRegexConstants compiles regex pattern string constants at program creation time and reports any regex pattern compile errors.
CostObserver provides an observer that tracks runtime cost.
CostTrackerLimit sets the runtime limit on the evaluation cost during execution and will terminate the expression evaluation if the limit is exceeded.
EmptyActivation returns a variable-free activation.
EnableErrorOnBadPresenceTest error generation when a presence test or optional field selection is performed on a primitive type.
EvalStateObserver provides an observer which records the value associated with the given expression id.
ExhaustiveEval replaces operations that short-circuit with versions that evaluate expressions and couples this behavior with the TrackState() decorator to provide insight into the evaluation state of the entire expression.
ExtendDispatcher returns a Dispatcher which inherits the overloads of its parent, and provides an isolation layer between built-ins and extension functions which is useful for forward compatibility.
InterruptableEval annotates comprehension loops with information that indicates they should check the `#interrupted` state within a custom Activation.
NewActivation returns an activation based on a map-based binding where the map keys are expected to be qualified names used with ResolveName calls.
NewAttributeFactory returns a default AttributeFactory which is produces Attribute values capable of resolving types by simple names and qualify the values using the supported qualifier types: bool, int, string, and uint.
NewAttributePattern produces a new mutable AttributePattern based on a variable name.
NewCall creates a new call Interpretable.
NewConstValue creates a new constant valued Interpretable.
NewCostTracker creates a new CostTracker with a given estimator and a set of functional CostTrackerOption values.
NewDispatcher returns an empty Dispatcher instance.
NewEvalState returns an EvalState instanced used to observe the intermediate evaluations of an expression.
NewHierarchicalActivation takes two activations and produces a new one which prioritizes resolution in the child first and parent(s) second.
NewInterpreter builds an Interpreter from a Dispatcher and TypeProvider which will be used throughout the Eval of all Interpretable instances generated from it.
NewPartialActivation returns an Activation which contains a list of AttributePattern values representing field and index operations that should result in a 'types.Unknown' result.
NewPartialAttributeFactory returns an AttributeFactory implementation capable of performing AttributePattern matches with PartialActivation inputs.
Observe constructs a decorator that calls all the provided observers in order after evaluating each Interpretable or Qualifier during program evaluation.
Optimize will pre-compute operations such as list and map construction and optimize call arguments to set membership tests.
OverloadCostTracker binds an overload ID to a runtime FunctionTracker implementation.
PresenceTestHasCost determines whether presence testing has a cost of one or zero.
PruneAst prunes the given AST based on the given EvalState and generates a new AST.
TrackState decorates each expression node with an observer which records the value associated with the given expression id.
# Constants
ContextCancelled indicates that the operation was cancelled in response to a Golang context cancellation.
CostLimitExceeded indicates that the operation was cancelled in response to the actual cost limit being exceeded.
# Variables
MatchesRegexOptimization optimizes the 'matches' standard library function by compiling the regex pattern and reporting any compilation errors at program creation time, and using the compiled regex pattern for all function call invocations.
# Structs
AttributePattern represents a top-level variable with an optional set of qualifier patterns.
AttributeQualifierPattern holds a wildcard or valued qualifier pattern.
CostTracker represents the information needed for tracking runtime cost.
EvalCancelledError represents a cancelled program evaluation operation.
RegexOptimization provides a way to replace an InterpretableCall for a regex function when the RegexIndex argument is a string constant.
# Interfaces
Activation used to resolve identifiers by name and references by id.
ActualCostEstimator provides function call cost estimations at runtime CallCost returns an estimated cost for the function overload invocation with the given args, or nil if it has no estimate to provide.
Attribute values are a variable or value with an optional set of qualifiers, such as field, key, or index accesses.
AttributeFactory provides methods creating Attribute and Qualifier values.
ConstantQualifier interface embeds the Qualifier interface and provides an option to inspect the qualifier's constant value.
Dispatcher resolves function calls to their appropriate overload.
EvalState tracks the values associated with expression ids during execution.
Interpretable can accept a given Activation and produce a value along with an accompanying EvalState which can be used to inspect whether additional data might be necessary to complete the evaluation.
InterpretableAttribute interface for tracking whether the Interpretable is an attribute.
InterpretableCall interface for inspecting Interpretable instructions related to function calls.
InterpretableConst interface for tracking whether the Interpretable is a constant value.
InterpretableConstructor interface for inspecting Interpretable instructions that initialize a list, map or struct.
Interpreter generates a new Interpretable from a checked or unchecked expression.
NamespacedAttribute values are a variable within a namespace, and an optional set of qualifiers such as field, key, or index accesses.
PartialActivation extends the Activation interface with a set of UnknownAttributePatterns.
Qualifier marker interface for designating different qualifier values and where they appear within field selections and index call expressions (`_[_]`).
# Type aliases
AttrFactoryOption specifies a functional option for configuring an attribute factory.
CancellationCause enumerates the ways a program evaluation operation can be cancelled.
CostTrackerOption configures the behavior of CostTracker objects.
EvalObserver is a functional interface that accepts an expression id and an observed value.
FunctionTracker computes the actual cost of evaluating the functions with the given arguments and result.
InterpretableDecorator is a functional interface for decorating or replacing Interpretable expression nodes at construction time.