Programming Language
MATTRANS
Matrix Transformation Computing Model
Introduction
Programming languages serve as the foundation of the digital age, enabling humans to communicate with computers and create innovative software solutions. These languages encapsulate the art of crafting instructions and algorithms that govern the behavior of machines. Each programming language possesses unique characteristics, syntax, and areas of application, empowering developers to build a myriad of applications, from simple scripts to complex software systems.
With the rise of AI, the great diversity of languages and applications has become accessible for non technical organizations struggling to digitize their skills. Still, it is a daunting task to train models to automate the process of programming which involves an immeasurable level of creativity and effort.
This project has as a main purpose the definition of a simple yet powerful programming language called MATTRANS (MATrix TRANSformation). MATTRANS is inspired by the flexibility of Abstract Group Theory (Artin, 2011) , where transformations are first class citizens.
MATTRANS is the official programming language used in (ORCA, 2023) in order to define systems for the TDPnet technology (TDPnet, 2023)
Motivations
The development of MATTRANS is incentivised by three major forces
- The power of group theory and transformations, which allows to abstract many details about how to transform data, giving more protagonism to the nature transformations involved.
- The emergent AI, which is having problems trying to explain and understand behavioral patterns of models.
- The lack of simplicity of modern programming languages, for which tedious arbitrary code review must be enforced in order to guarantee security and performance.
Basic Structure of a MATTRANS model
The number one rule of MATTRANS is simplicity. A program is called a model, and can be defined using any programming language. A model is composed of three parts:
The core functions, which is where semantics is defined. Here are all the target language level definitions used by the model. The following is an example in javascript, defined in core.js
<core.js>let a = alpha => 2*alphalet b = beta => 2*betalet output = data => console.log(data)let input = [12, 42]module.exports = {a,b, output, input}
The matrix definitions, which is where matrices are defined using the functions from core.js. These are functional matrices. The following is an example of matrix definitions
<matrix.js>const {a,b, output, input} = require('./core')let A = v => [[a(v[0]), 0], [0, b(v[1])]]let O = data => output(data)let I = () => inputmodule.exports = {A, O, I}
And finally the application, where the application is defined
<app.js>const {A,O,I} = require('./matrix')O( A( I() ) )
Observe that the syntax of a MATTRANS app does not have to be expressed in the language target. For instance, the following two equivalent syntaxes could be used:
Operational: A o (B o (C o Dn) o E) o F
S: (A (B (C (D n)) E ) F)
Where n means power of D, or the n times application of D.
Out of these it is very easy to generate an Abstract Syntax Tree (AST), from which a program can be generated for any mainstream language.
Features of MATTRANS
- There are no flow control instructions such as if and loops. The reason is that flow control instructions are systems rather than language constructs. It means that the control is performed at TDPnet system level.
- The matrix operators do not have to follow the rules for groups. These would be an engineer's decision.
- The input and output details are ALWAYS core functionalities.
- There is no possibility of infinite loops at the app level, since there are no loops, guarantying great safety and ease of testing.
- Because MATTRANS is inspired by group theory, carefully designed programs can guarantee reversibility of states.
- Programs can be formally validated (the model meets the requirements) and verified (the implementation meets specifications).
- MATTRANS models are fairly easy to calibrate, a major task in performance testing.
- And last but not least, these programs are much easier to generate and update by generative AI tools (AI act, 2023).
Conclusions
MATTRANS is a great tool for software engineers in need of tight performance and clear specifications in a time when tedious programming tasks are being at the reach of any one. This calls for careful consideration when selecting a product (EU AI rules, 2023).
MATTRANS offers a sound and transparent way to build high quality systems.
Reference
Artin, 2011. Michael Artin, Algebra (2nd Edition), 2011.
TDPnet, 2023. Samuel Ferrer, TDPnet, TDP Router powered network, 2023.
ORCA, 2023. Samuel Ferrer, ORCA. Organization, Routing, Computing, Access, 2023.
AI act, 2023. European Parliament, Proposal for a Regulation on a European approach for Artificial Intelligence In “A Europe Fit for the Digital Age”, May 20, 2023.