[fpc-devel] An interesting thought... AI

Christo Crause christo.crause at gmail.com
Fri Nov 11 09:03:40 CET 2022


On Thu, Nov 10, 2022 at 8:10 PM J. Gareth Moreton via fpc-devel <
fpc-devel at lists.freepascal.org> wrote:

> Hi everyone,
>
> This has been something that has been on my mind for a while now, but
> with my increasingly more complex optimisations being developed for the
> Free Pascal Compiler and the code becoming an ever bigger spiderweb of
> conditions, it got me to start wondering... might compiler optimisation
> be a candidate for AI?
>

An interersting thought.  On a slightly different tangent, could the
language rules itself not be codified as a matrix so that one can use
matrix algebra to perform node level optimizations via similarity
transforms?  Alternatively, if you want to test a candidate optimization
idea, check if there is a feasible solution using matrix algebra (in other
words check if it satisfies all the language rules and the original
intent).  My simplistic view of Pascal is that the language rules should
form a set of linear equations (else the language specification is overly
complicated), so linear algebra is ideal for checking if a potential
solution satisfies the language rules.  Also one could cast a node level
optimization as a (similarity?) transformation matrix and apply this to the
basic nodes generated by the parser.

So there is perhaps some scope for "simple" algebra before diving into
stochastic optimization techniques.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/fpc-devel/attachments/20221111/e569df7a/attachment.htm>


More information about the fpc-devel mailing list