Some weeks ago a group was created on Slack that is discussing the possibilities of “mathematics of arrays” (MoA) within the context of Fortran. The idea of this methodology is to express algorithms in such a way that they are independent of the number of dimensions, which will make it easier for the compiler (both the MoA component and the regular compiler) to optimise the program. As the theory is fairly abstract, the initiator of this group Lenore Mullin, is preparing an introduction to the theory and its applications.
If you are interested, let us know or join the Slack channel, “MoA Global Team”.
Hm, I think I encountered that myself as well, but it has been a while . There are a few more documents and links shared. It is easiest to scan the discussion.
To help everyone:
If we can define Fortran operations (including intrinsics) in MoA, (perhaps starting with a subset), we could easily optimize the Abstract Syntax Tree independent of the compilation
step. Actually, since MoA defines operations using shapes and the psi indexing function we could easily explore new functionality, e.g. higher dimension arrays, binary transpose, or whatever. I’d love to help Fortran be the ideal array language needed for Exascale, verifying the equivalence of programs, using MoA to “dimension lift” to map to arbitrary architectures. MoA can do this because the theory is all about indexing: the machine is viewed as arrays also. Hoping to meet more of you.
If anyone wants to join the Slack channel, let me know. Please give me your desired email.
Also to help motivate others:
Don’t be overwhelmed by notation etc. Except for a few things, Fortran has most of the semantics to enable MoA optimizations. So Cshift in Fortran is rotate in MoA. MoA has n-dimensional generality and all operations compose (index composition, what I call psi reduction) reduce to a normal form in the mathematical sense. This allows us to prove two or more programs are equivalent because they reduce to the same normal form. We can also prove that any program formulated in MoA terminates, i.e. is decidable. Also, important mathematically. With what I call “dimension lifting” we can continue to use shapes to map to architectural components viewed as array and indexing, e.g. a register is a vector, threads are vectors, registers can be scalars, etc. The purpose of any lectures is to motivate, use, and bring mathematical prowess to Fortran.
Hoping to generate interest and things that came to mind.
There are so many array languages vying to be “the” array language. Fortran has been around
for a while, has grown, and is used by many. I know there is an enhanced subset that is based
on mathematics, and with mathematics there are no debates. Furthermore, much, if not most, can be automated to assist compilation to hardware or software. Hoping Fortran folks attend an intro lecture to discuss these topics.
Thanks for the post and welcome @Lenore to the forum!
As you know, I am very interested in exploring this avenue for LFortran. We are making excellent progress, so we will be in good shape to do this work in about a month or two.
We’ll have the tutorial this Friday. If you haven’t sent me your email to join the channel, we’ll make the tutorial open and will put the link here also.
Looking forward to meeting you.