Package-level declarations
Types
Link copied to clipboard
Link copied to clipboard
class BoundParameterNode(val name: VariableNode, val sourceLocation: SourceLocation) : Node, VariableDeclarationNode
Link copied to clipboard
A sequence of circuit statements.
Link copied to clipboard
class CircuitDeclarationNode(val name: FunctionNameNode, val protocol: ProtocolNode, val bounds: Arguments<BoundParameterNode>, val inputs: Arguments<ParameterNode>, val outputs: Arguments<ParameterNode>, val body: CircuitBlockNode, val sourceLocation: SourceLocation) : TopLevelDeclarationNode
A simple block of statements with no control flow, all on one protocol
Link copied to clipboard
Link copied to clipboard
A computation that produces a result.
Link copied to clipboard
class HostDeclarationNode(val name: HostNode, val sourceLocation: SourceLocation) : TopLevelDeclarationNode
Declaration of a participant and their authority.
Link copied to clipboard
Link copied to clipboard
class IndexParameterNode(val name: VariableNode, val bound: IndexExpressionNode, val sourceLocation: SourceLocation) : Node, VariableDeclarationNode
Link copied to clipboard
class LetNode(val name: VariableNode, val indices: Arguments<IndexParameterNode>, val value: ExpressionNode, val sourceLocation: SourceLocation) : CircuitStatementNode, VariableDeclarationNode
Binding the result of an expression to a variable. Note that scalars are represented as arrays of dimension zero: val x = 5 ===> val x[] = 5
Link copied to clipboard
A literal constant.
Link copied to clipboard
class LookupNode(variable: VariableNode, indices: Arguments<IndexExpressionNode>, val sourceLocation: SourceLocation) : PureExpressionNode
Link copied to clipboard
Link copied to clipboard
class OperatorApplicationNode(val operator: Operator, val arguments: Arguments<PureExpressionNode>, val sourceLocation: SourceLocation) : PureExpressionNode
An n-ary operator applied to n arguments.
Link copied to clipboard
Link copied to clipboard
class ParameterNode(val name: VariableNode, val type: ArrayTypeNode, val protocol: ProtocolNode, val sourceLocation: SourceLocation) : Node, VariableDeclarationNode
A parameter to a function declaration.
Link copied to clipboard
class ProgramNode(val declarations: PersistentList<TopLevelDeclarationNode>, val sourceLocation: SourceLocation) : Node, List<TopLevelDeclarationNode>
The circuit representation of a program.
Link copied to clipboard
Link copied to clipboard
class ReduceNode(val operator: OperatorNode, val defaultValue: PureExpressionNode, val indices: Arguments<IndexParameterNode>, val body: PureExpressionNode, val sourceLocation: SourceLocation) : PureExpressionNode
Link copied to clipboard
class ReferenceNode(val name: VariableNode, val sourceLocation: SourceLocation) : IndexExpressionNode
Link copied to clipboard
class ReturnNode(val values: Arguments<PureExpressionNode>, val sourceLocation: SourceLocation) : StatementNode
Link copied to clipboard
A computation with side effects.
Link copied to clipboard
A declaration at the top level of a file.
Link copied to clipboard
interface VariableDeclarationNode
A node that declares a Variable.
Link copied to clipboard
Functions
Link copied to clipboard
fun SourceFile.parse(protocolParsers: Map<ProtocolName, ProtocolParser<Protocol>> = defaultProtocolParsers): ProgramNode
Parses this source file to IR and returns the IR.
fun String.parse(path: String = "<string>", protocolParsers: Map<ProtocolName, ProtocolParser<Protocol>> = defaultProtocolParsers): ProgramNode
Parses this string and returns the AST.