SymbolicExpressions
EPHS.SymbolicExpressions — Module
The SymblicExpressions module provides a simple computer algebra system (CAS). The concrete subtypes of SymExpr provide a mathematical syntax to symbolically represent the relations that define the semantics of primitive and composite systems.
EPHS.SymbolicExpressions.Const — Type
Const(value::Float64)Wraps a Float64 literal as a SymExpr.
EPHS.SymbolicExpressions.Eq — Type
Eq(lhs::SymExpr, rhs::SymExpr)Equation with a SymExpr on both sides of the equal sign.
Fields
lhs: left hand siderhs: right hand side
EPHS.SymbolicExpressions.SymExpr — Type
Abstract supertype for symbolic expressions. Abstract subtypes are SymVal for all leaf nodes (values) that may appear in syntax trees and SymOp for all internal nodes (operations) of a SymExpr.
EPHS.SymbolicExpressions.SymOp — Type
Abstract type for symbolic operations, i.e. internal nodes in a SymExpr syntax tree.
EPHS.SymbolicExpressions.SymVal — Type
Abstract type for symbolic values, i.e. leaf nodes in a SymExpr syntax tree.
EPHS.SymbolicExpressions.SymVar — Type
Abstract subtype of SymVal for symbolic variables, such as port variables, constraint variables, and parameters.
Base.foreach — Method
foreach(f, expr::SymExpr, T::Type{<:SymExpr}) -> nothingGoes from the root into the expression tree and whenever a node::T is encountered, calls f(node).
Base.replace — Method
replace(f, expr::SymExpr, T::Type{<:SymExpr}) -> SymExprTransforms a SymExpr using a function f : T -> SymExpr, where T <: SymExpr. Goes from the root into the expression tree and whenever a node::T is encountered, it is replaced by the new node f(node).
EPHS.SymbolicExpressions.ast — Method
ast(s::SymExpr) -> ExprTransform a SymExpr into a Julia Expr. Together with the methods called in the returned Julia Expr, ast defines the semantics of the mathematical SymExpr syntax.