Expand description
Symoxide provides an Intermediate Representation for Scalar Expressions and abstract visitors (called as mappers) for traversing and transforming these expressions.
primitives
contains the supported expression types.builders
contains routines to build these expressions.parse
contains a parser implementation for these expressions.operations
provides routines for performing common arithmetic operations on these expressions.mappers
provides abstract visitor for common traversal patters over scalar expressions.mapper_impls
usesmappers
to provide helpful analysis tools over the expressions.design_doc
goes 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
cargo-fmt
, adding a new expression type.Macros
Converts a space-delimited string to a tuple of
symoxide::var
calls on individual words.Structs
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
Implements the trait
symoxide::mappers::CachedMapper
for a struct. Requires that struct
contains a field named cache
of type std::collections::HashMap
.