package ast
Provides AST definitions for Inox.
The core language supported by Inox is defined in inox.ast.Expressions, inox.ast.Definitions and inox.ast.Types. The trait inox.ast.Trees provides all these definitions and one of the integral parts of a Program.
- Alphabetic
- By Inheritance
- ast
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Type Members
- trait CallGraph extends AnyRef
-
trait
Constructors
extends AnyRef
Provides constructors for Expressions.
Provides constructors for Expressions.
The constructors implement some logic to simplify the tree and potentially use a different expression node if one is more suited.
-
trait
DSL
extends AnyRef
This trait provides a DSL to create Inox trees.
This trait provides a DSL to create Inox trees.
The two following principles are followed (hopefully with some consistency): 1) When a fresh identifier needs to be introduced, the API provides constructors which are passed the fresh identifiers in the form of ValDefs (construct them with TypeToValDef), and then a context (in the form of a function) to which the newly created identifiers will be passed. 2) No implicit conversions are provided where there would be ambiguity. This refers mainly to Identifiers, which can be transformed to ADTType or FunctionInvocation or ... . Instead one-letter constructors are provided.
-
trait
Definitions
extends AnyRef
Provides types that describe Inox definitions.
-
trait
ExprOps
extends GenTreeOps
Provides functions to manipulate Expressions.Expr.
Provides functions to manipulate Expressions.Expr.
This object provides a few generic operations on Inox expressions, as well as some common operations.
The generic operations lets you apply operations on a whole tree expression. You can look at:
These operations usually take a higher order function that gets applied to the expression tree in some strategy. They provide an expressive way to build complex operations on Inox expressions.
-
trait
Expressions
extends AnyRef
Expression definitions for Pure Scala.
Expression definitions for Pure Scala.
Every expression in Inox inherits from Expressions.Expr. Expressions can be manipulated with functions in Constructors and ExprOps.
If you are looking for things such as function or class definitions, please have a look in inox.ast.Definitions.
-
trait
Extractors
extends AnyRef
Provides extraction capabilities to Trees based on a TreeDeconstructor instance.
-
trait
GenTreeOps
extends AnyRef
Generic tree traversals based on a deconstructor of a specific tree type
-
class
Identifier
extends Ordered[Identifier] with Positioned
Represents a unique symbol in Inox.
Represents a unique symbol in Inox.
The name is stored in the decoded (source code) form rather than encoded (JVM) form. The type may be left blank (Untyped) for Identifiers that are not variables.
- trait Paths extends AnyRef
- trait Printer extends AnyRef
- trait Printers extends AnyRef
- trait ProgramEncoder extends ProgramTransformer
- trait ProgramTransformer extends AnyRef
- trait SimpleSymbolTransformer extends SymbolTransformer
- trait SimpleSymbols extends AnyRef
-
trait
SymbolOps
extends AnyRef
Provides functions to manipulate Expressions.Expr in cases where a symbol table is available (and required: see ExprOps for simpler tree manipulations).
-
trait
SymbolTransformer
extends AnyRef
Symbol table transformer base type
-
trait
TreeDeconstructor
extends AnyRef
Meat and bones of tree deconstruction/reconstruction.
Meat and bones of tree deconstruction/reconstruction.
Implementations provide methods to extract all useful subtrees from a given tree (Expressions.Expr, Types.Type, ...) as well as a closure that can reconstruct the initial tree based on appropriate arguments.
Instances of Trees must provide a TreeDeconstructor as a means of applying generic transformations to arbitrary extensions of the Trees.Tree interface.
- See also
Extractors for some interesting use cases
-
trait
TreeExtractor
extends AnyRef
A type that pattern matches agains a type of
Sources
and extracts its components, and a builder that given a set ofTarget
components, reconstructs aTarget
tree that corresponds to the initially deconstructed tree. - trait TreeOps extends AnyRef
- trait TreeTransformer extends AnyRef
- trait Trees extends Expressions with Constructors with Extractors with Types with Definitions with Printers with TreeOps
- trait TypeOps extends AnyRef
- trait Types extends AnyRef
Value Members
- object DebugSectionTrees extends DebugSection with Product with Serializable
- object FreshIdentifier
- object ProgramEncoder
- object SymbolTransformer
- object optPrintPositions extends FlagOptionDef
- object optPrintTypes extends FlagOptionDef
- object optPrintUniqueIds extends FlagOptionDef