Push of code reflection prototype

Paul Sandoz paul.sandoz at oracle.com
Tue Jan 16 20:29:27 UTC 2024


Hi,

I have just pushed the code reflection prototype to the babylon repository under the code-reflection branch [1]. The Babylon JDK builds like any other JDK.

As of now there is minimal documentation. I recommend looking at the tests located here:

- Runtime tests
  test/jdk/java/lang/reflect/code/
  https://github.com/openjdk/babylon/tree/code-reflection/test/jdk/java/lang/reflect/code

- Compiler tests (these are useful to help understand how Java programs are modeled)
  test/langtools/tools/javac/reflect/
  https://github.com/openjdk/babylon/tree/code-reflection/test/langtools/tools/javac/reflect/

We have used this prototype to experiment with various code reflection use cases, which in turn has helped provide important feedback on the design. We shall now continue this process in the open. I would encourage others to do the same. Since it’s a prototype it may well fail in unfriendly ways or behave strangely so please be gentle and understanding :-)

Over the next few weeks we will publish some documents explaining code reflection using specific use cases. Two of those already have tests in the repository, forward auto differentiation [2], and emulating C# LINQ [3]. We will write and publish a third document with code on implementing Triton programs ("GPU programming for neural networks”) in Java  [4].

In addition will be, when ready, releasing work related to our Heterogenous Accelerator Toolkit (HAT) and GPU programing model for Java that leverages Babylon and Panama.

Thanks,
Paul.

[1] https://github.com/openjdk/babylon/tree/code-reflection
[2] https://github.com/openjdk/babylon/tree/code-reflection/test/jdk/java/lang/reflect/code/ad
[3] https://github.com/openjdk/babylon/blob/code-reflection/test/jdk/java/lang/reflect/code/TestLinqUsingQuotable.java
[4] https://openai.com/research/triton


More information about the babylon-dev mailing list