WELCOMErewriting rules— on symbolic expressions, until no rule can be applied.
As a very simple example, consider the following sequence of rule application:
Mathematics is not the only field where symbolic computation can be used.
The Fōrmulæ project works in a different way. We do not only create rewriting rules, It provides an specification with which anybody can write —in a regular programming language— rewriting rules that can be also published. It converts the process of creating rewriting rules to a colaborative one.
As you can see, the number of rules are always increasing and they need to be documented. The Fōrmulæ dictionary is the official mean to do it.
The dictionary is organized on ''expression tags''. An expression tag is a unique name given to a kind of symbolic expression, i.e. the mathematical addition operation receives the expression tag Math.Arithmetic.Addition. The Math.Arithmetic.Addition dictionary entry enumerates and describes every known rule applied to this expression tag.
The Fōrmulæ framework is not only a specification to create rewriting rules. It also defines a specification of how to visualize symbolic expressions, and how to create methods for editing symbolic expressions.
It means that anybody can write code to define how an expression is to be shown. It is called a visualization rule. Moreover, there can be multiple visualization rules for a specific expression, although only one can be used at the same time.
It is very common that these visualization rules show expression as humans do. It is usually called pretty-print. Moreover, different visualization rules can also written to match science field, localization (see Expressions with localized implementations), or even personal preferences.
Entries in the dictionary also describe the known visualization rules for a specific expression tag.
The Fōrmulæ framework also defines a specification to edit (create or modify) symbolic expressions, called edition rules.
Entries in the dictionary also describe the known edition rules for a specific expression tag.
A package is a combination of zero or more rewriting rules, zero or more visualization rules and zero or more edition rules, packed as a single file, ready to be published. These rules are generally related to the same field.
There are several packages developed by the Fōrmulæ team, called the standard packages, but anyone can pack rules he/she creates.
The following are some of the standard packages:
There are standard packages that are being developed, and they will be available soon:
There must be a program where symbolic expressions are created, visualized, edited and where to apply the rewriting rules. It is a front-end. Anyone can write such a program, according to the Fōrmulæ specification.
There is, however a standard program, called the Desktop. It has the following features:
Fōrmulæ as a programming language
There are rewriting rules to do what can be done with traditional programming languages, so it can be used as a programming language too. It is called the ''Fōrmulæ programming language'' and it is Turing-complete, so it can compute everything that is computable.
Given that rewriting rules, visualization rules and edition rules are continuously created or improved, it produces radical consecuences never seen before in traditional programming languages:
A dynamically defined programming language
The term "dynamically defined programming language" is defined here as a language which its features and capabilities are defined and added to the language over time. It is a language able to evolve and change in time.
Traditionally, programming languages are first fully designed. A grammar is created in order to construct tools, such as compilers. Once it is done, it is very hard or impossible to make changes on the language structure. Adding features to a language usually leads in a new and different language, i.e. the C and the C++ languages.
Non-unique visualization of programs
Because there can be multiple ways symbolic expressions look, there are several forms of visualization for the same program.
The next example shows the definition of a function that generates a Farey sequence of a given order, using different visualization rules —for some of its subexpressions—.
|Copyright © Fōrmulæ 2019|