Crate leo_asg[][src]

The abstract semantic graph (ASG) for a Leo program.

This module contains the [Asg] type, an abstract data type that represents a Leo program as a series of graph nodes. The [Asg] type is at a greater level of abstraction than an [Ast].

A new [Asg] type can be created from an [Ast]. Converting to an [Asg] provides greater type safety by canonicalizing and checking program types.

Re-exports

pub use checks::*;
pub use const_value::*;
pub use error::*;
pub use expression::*;
pub use import::*;
pub use node::*;
pub use prelude::*;
pub use program::*;
pub use reducer::*;
pub use scope::*;
pub use statement::*;
pub use type_::*;
pub use variable::*;

Modules

checks

Helper methods to determine the correct return value path in an asg.

const_value
error

Errors encountered when attempting to convert to an asg from an ast.

expression

This module defines an expression node in an asg.

import

Helper methods for resolving imported packages.

node
prelude
program

This module defines the program node for an asg.

reducer

This module contains the reducer which iterates through ast nodes - converting them into asg nodes and saving relevant information.

scope
statement

This module defines a statement node in an asg.

type_
variable

Structs

Identifier

An identifier in the constrained program.

Input

Stores program input values as asg nodes.

Span

Constants

CONTAINER_PSEUDO_CIRCUIT
RECORD_PSEUDO_CIRCUIT
REGISTERS_PSEUDO_CIRCUIT
STATE_LEAF_PSEUDO_CIRCUIT
STATE_PSEUDO_CIRCUIT

Functions

load_asg
load_asg_from_ast
load_ast

The abstract semantic graph (ASG) for a Leo program.