Expression package for Fōrmulæ — the visual environment for composing, conversing, and computing with tree-structured expressions.
This repository contains the source code for the expression package. It is intended to contain operations applicable to most (or all) other expressions, or expression related to reflection.
Part of the formulae-org organization: the web application plus one repository per package.
▶ Showcase — worked examples of this package.
-
Expressions applicable universally
-
Subexpression expression. It retrieves the i-th subexpression of a given expression. It is shown as
$x_i$ - Tag expression. It retrieves the tag of a given expression
-
Cardinality expression. It retrieves to number of subexpressions of a given expression. It is shown as
$|x|$ - Appends/prepends a subexpression after/before the last/first subexpression of a given expression
- Insertion of a subexpression at a given position
- Deletion of a subexpression at a given position
-
Subexpression expression. It retrieves the i-th subexpression of a given expression. It is shown as
-
Expressions related to reduction
- Protect expression. It prevents a given expression to be reduced
- Reduce expression. Forces reduction of an expression.
-
Expressions related to programatic creation of expressions
- Serializeation expression. It converts a given expression to XML text.
- Deserialization expression. It creates an expression from XML text
- Create expression expression. Creation of an expression from its tag
- Create expression tree expression. Creation of an expression from its subexpressions
-
Others
- Group expression. Create groups of expressions