Expand description
Math stage is responsible for most if not all of the optimizations the compiler does. It’s at this point where rules are analyzed, expressions normalized, patterns that can be optimized optimized. It’s the final and most important stage of compilation.
Structs§
- Adjusted
- The adjusted (optimized) part of IR.
- Build
- Used explicitly for figure IR building.
- Entity
- An entity along with some metadata.
- Expand
- A context struct for loading unrolled data.
- Expr
- An expression with some metadata and a type.
- Flags
- Compiler flags.
- Index
Map - Constructs a map between two sets of numbers A -> B.
- Intermediate
- The full Math IR, the ultimate result of the entire compiler
- Math
- A math stage context used across the whole compilation process.
- Merge
- A utility iterator for merging two sorted iterators.
- Optimizations
- The
optimizations
flag group. Currently empty. Has nothing to do with the [optimizations
] module. - Reconstruct
Ctx - A context for the recosntruction process.
- Rule
- A rule along if its aggregated information. Note that
entities
is not filled until the final steps of compilation.
Enums§
- Entity
Kind - The kind of an entity.
- Expr
Kind - A mathematical expression with a flattened memory model.
- Expr
Type - The primitive type of an expression.
- Rule
Kind - Represents a rule of the figure. Rules are normalized iff:
Traits§
- Deep
Clone - Deep clone a mathematical expression. This is different from
Clone
in that it works with the math stage’s flattened memory model and deep clones all of an expression’s dependencies (subexpressions). - From
Unrolled - Helper trait for converting unrolled expressions into math expressions.
- GetMath
Type - Helper trait for getting the type of the expression.
- Reconstruct
- The main actor in reconstruction process.
- Reindex
- Helper trait for reindexing process.
Functions§
- load_
script - Loads a
GeoScript
script and compiles it into Math IR. Encapsulates the entire compiler’s work.