https://github.com/formulae-org/package-expression-js
Expression package for Fōrmulæ, in JavaScript
https://github.com/formulae-org/package-expression-js
cardinality create-expression deserialization expression formulae javascript protect reduce serialization
Last synced: 10 months ago
JSON representation
Expression package for Fōrmulæ, in JavaScript
- Host: GitHub
- URL: https://github.com/formulae-org/package-expression-js
- Owner: formulae-org
- License: agpl-3.0
- Created: 2023-04-14T03:49:00.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2025-04-01T05:11:41.000Z (about 1 year ago)
- Last Synced: 2025-04-01T06:23:04.474Z (about 1 year ago)
- Topics: cardinality, create-expression, deserialization, expression, formulae, javascript, protect, reduce, serialization
- Language: JavaScript
- Homepage:
- Size: 57.6 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# package-expression-js
Expression package for the [Fōrmulæ](https://formulae.org) programming language.
Fōrmulæ is also a software framework for visualization, edition and manipulation of complex expressions, from many fields. The code for an specific field —i.e. arithmetics— is encapsulated in a single unit called a Fōrmulæ **package**.
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](https://en.wikipedia.org/wiki/Reflective_programming).
The GitHub organization [formulae-org](https://github.com/formulae-org) encompasses the source code for the rest of packages, as well as the [web application](https://github.com/formulae-org/formulae-js).
### Capabilities ###
* 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
* 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