Expand description
Symoxide provides an Intermediate Representation for Scalar Expressions and abstract visitors (called as mappers) for traversing and transforming these expressions.
primitivescontains the supported expression types.builderscontains routines to build these expressions.parsecontains a parser implementation for these expressions.operationsprovides routines for performing common arithmetic operations on these expressions.mappersprovides abstract visitor for common traversal patters over scalar expressions.mapper_implsusesmappersto provide helpful analysis tools over the expressions.design_docgoes over the key design decisions that were baked into Symoxide’s architecture.
Re-exports§
pub use builders::var;pub use mapper_impls::deduplicator::deduplicate_nodes;pub use mapper_impls::dependency::get_dependencies;pub use mapper_impls::equality::are_structurally_equal;pub use mapper_impls::graphvizifier::show_dot;pub use mapper_impls::hasher::get_hasher;pub use mapper_impls::node_counter::get_num_nodes;pub use parse::parse_expr as parse;pub use primitives::BinaryOpType;pub use primitives::Expression;pub use primitives::LiteralT;pub use primitives::SmallVecExprT;pub use primitives::UnaryOpType;
Modules§
- builders
- design_
doc - TODO: Decisions taken to ensure that the traversal costs are
low/transparent to the mapper
writer.TODO: Contribution guidelines,
cargo-fmt, adding a new expression type. - display
- macros
- mapper_
impls - mappers
- operations
- parse
- primitives
Macros§
- define_
binary_ op - impl_
scalar_ to_ expr - rust_
ty_ to_ scalar_ type - scalar
- Converts an
i32orf64literal into an instance ofsymoxide::Expression::Scalar. - variables
- Converts a space-delimited string to a tuple of
symoxide::varcalls on individual words.
Structs§
- Expression
RawPointer - Wrap a reference of an expression as a raw pointer
to get trivialize comparison and hashing. Tries to
reproduce the effect of
id(x)from Python world.
Derive Macros§
- Cached
Mapper - Implements the trait
symoxide::mappers::CachedMapperfor a struct. Requires that struct contains a field namedcacheof type [std::collections::HashMap].