[code-reflection] RFR: Partial evaluator transform

Paul Sandoz psandoz at openjdk.org
Fri Jun 6 22:58:28 UTC 2025


On Tue, 3 Jun 2025 20:27:24 GMT, Hannes Greule <hgreule at openjdk.org> wrote:

> I guess that's completely out of scope for now, but I wonder if we could leverage the insights of https://dl.acm.org/doi/10.1145/3656392 to build a common framework that can be re-used with appropriate abstract domains for stuff like that. I have to admit that this is out of my comfort zone, but it feels like we already have a lot of "almost abstract interpretation but more specific" implementations around.

Thanks for the link to the paper, i read the abstract and i shall take a look in more detail.

I too am very much outside my comfort zone :-) but it's a fascinating area. I wanted to find some relatively small subset of the problem exploring transformation + interpretation for two reasons:

1. To see if the current APIs work well and are sufficient; and
2. Apply it to our ONNX experiments, expanding the simple partial evaluation we currently use to compute ONNX operator attributes to cover evaluation of simple for and if statements, thereby allowing us to more easily represent loops of network layers and conditional parts of a machine learning model.

You are correct that such a common framework is out of scope to be included with the code reflection APIs but experimenting on top would be really useful to see what works or does not and what is missing. Similarly, i am reluctant to add loop/CFG analysis to the code reflection APIs. It's a really complex and broad area, but knowing what building blocks are needed to help support that is very useful to know.

-------------

PR Comment: https://git.openjdk.org/babylon/pull/431#issuecomment-2941293125


More information about the babylon-dev mailing list