Math.NET Symbolics: Yttrium - Architecture
The Yttrium architecture is an experimental attempt at unifying mathematics with ideas and concepts from hardware engineering and digital information technology.
Weaknesses of the classical architecture
Math.NET Symbolics Classic worked quite well, and was relatively simple to use, but it had certain weaknesses: Firstly, it was linked very strongly with certain mathematical data structures. For example, if you built an "expression tree" for real numbers, then it was rather difficult to extend to complex numbers (or modular rings, vectors, etc), or to analogous operations for complex numbers. You could implement more advanced structures (e.g. a bipartial graph) in their own classes, but you couldn't represent them in expression trees, and so you couldn't re-use the existing infrastructure. Finally, Classic was based on recursively constructed expression trees, represented by their root operations. But the design of the system and the analysis of the interconnections in the system were often more interesting and important, and expression trees are hardly suitable for these purposes. Think about modelling an adaptive filter or a feedback control system in Maple, how would you do that, without resorting to matrices?
The Yttrium Core
The most important elements in Yttrium are Signals. Signals have certain similarities to variables, but are much more (there are no classical variables in Yttrium). Signals can have a magnitude and assorted properties. They form the basis for building structute, by creating Ports. A single signal can be used in arbitrarily many ports (input signals), but originates from only one port (output signal). Associated with signals are Busses. A bus can drive a port at the same time as it is being driven by the same port. So it doesn't differentiate between input and output.
The entry to the structure is Entities. An entity defines the structure (in particular, the number of entering and exiting signals), so an entity describes a port. For example, an addition entity could have two inputs and one output. Port can be instantiated and linked using such entities. Entities can also be generic – the standard library actually defines an addition entity as one not with two, but arbitrary many inputs, and one output. Before the instantiation of a port, generic entities have to compiled to be "compiled" to non-generic entities, which depend on the circumstances.
The last important element is the Architecture, which takes care of logic and mathematical operations. Depending on the signals with which a port is connected, a port can load an architecture, and replace it when necessary. For example, a port associated with an addition entity can load a vector-addition architecture if, instead of a numerical value, the input signal happens to be a vector, and the current architecture doesn't support vectors. Architectures are attached to entities, so an addition-entity port can't load a division architecture.
You can directly implement an architecture, or you can model one through one or more "Processes". Processes can be sensitive to signals, so they're only activated when at least one signal has changed. All processes run parallel (controlled by the internal scheduler). A process can also be modelled as a compound process, which encapsulates its own signal-port structure. In this way, hierarchical models are made possible, and reusability is simplified.
Interaction in the Yttrium Core
The previously mentioned elements describe the entire structure of a system as well as its data flow. But the point of a computer algebra system is the manipulation of such system. In Yttrium there are various ways to manipulate such a system. The most important is based on transformation theorems*, a special sort of theorem describing the relationship between two different subsystems, and which can actually perform transformations. So for example, in the standard library there is a transformation theorem which states that the derivative of a sum is equal to the sum of the derivatives. This theorem can then be used by the derivative-architecture, to differentiate sums.
* Transformation theorems aren't any great mathematical constructs, but simple transformation rules.
More details about Signals
In mathematics there are many conditions that have to be observed. There are many operations that can only be applied to positive real numbers, or simplifications which only work if the signal is an integer value. Therefore signals can have arbitrarily many characteristics, stored as Properties. A special kind of property is the membership of a category. Signals offer more functionality, like "holding" (if enabled, the signal gets handled temporarily as if it were a source signal, a variable), or algorithms that supervise graph-theoretical properties like cycles. |