SymbolicExpressions
EPHS.SymbolicExpressions — ModuleThe 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 — TypeConst(value::Float64)Wraps a Float64 literal as a SymExpr.
EPHS.SymbolicExpressions.Eq — TypeEq(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 — TypeAbstract 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 — TypeAbstract type for symbolic operations, i.e. internal nodes in a SymExpr syntax tree.
EPHS.SymbolicExpressions.SymVal — TypeAbstract type for symbolic values, i.e. leaf nodes in a SymExpr syntax tree.
EPHS.SymbolicExpressions.SymVar — TypeAbstract subtype of SymVal for symbolic variables, such as port variables, constraint variables, and parameters.
Base.diff — Methoddiff(expr::SymExpr, var::SymVar) -> SymExprReturns the derivative of the given SymExpr with respect to the given SymVar using symbolic differentiation.
Base.foreach — Methodforeach(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 — Methodreplace(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 — Methodast(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.