PsiQ / bartiq

Bartiq
https://psiq.github.io/bartiq/
Apache License 2.0
31 stars 9 forks source link

Implement graph-based compilation #9

Closed mstechly closed 1 month ago

mstechly commented 6 months ago

Currently, function compilation takes a list of functions. It is hence assumed that the user provides said functions such that inputs and outputs which are to be combined have been renamed appropriately.

While this succeeded at keeping the implementation of function compilation simple, it meant that this input-output association was forced onto the supplied functions themselves. This means that after compilation, such manipulation must be undone (which has been a previous source of bugs).

This issue would be resolved if we moved to a graph-based compilation engine, whereby the function graph is built and then passed to the compiler, which can handle the input-output association using the edge connection data explicitly.

CC: @sammorley-short @dexter2206

mstechly commented 1 month ago

Closing as instead of graph-based compilation we have refactored compilation engine in a different way.