Project Babylon would extend the reach of Java to foreign programming models such as machine learning models, GPUs, SQL, and differential programming. Credit: HomoCosmicos / Getty Images Java would be extended to foreign programming models such as machine learning models, GPUs, SQL, and differential programming, through an OpenJDK proposal called Project Babylon. Posted in an openjdk.org mailing list on September 6 by Paul Sandoz, an architect at Oracle, Babylon would extend Java’s reach to foreign programming models with an enhancement to reflective programming in Java, known as code reflection. This would enable standard access, analysis, and transformation of Java code in a suitable form, the proposal states. Support for a foreign programming model could then be more easily implemented as a Java library. Babylon would ensure that code reflection is suitable for the purpose by creating a GPU programming model for Java that leverages code reflection and is implemented as a Java library. To reduce bias risk, the project also would explore or encourage exploration of other programming models such as SQL and differential programming. Code reflection consist of three parts: Modeling of Java programs as code models, suitable for access, analysis, and transformation. Enhancements to Java reflection, enabling access to code models at compile time and run time. APIs to build, analyze, and transform code models. Elaborating on what Babylon would address, Sandoz cited an example in which a developer wants to write a GPU kernel in Java and execute it on a GPU. The developer’s code must be analyzed and transformed into an executable GPU kernel. While a Java library could do that, it requires access to the Java code in symbolic form. Such access currently is limited to the use of non-standard APIs or to conventions at different points in the program’s life cycle, i.e. compile time or run time. Further, the symbolic forms available (abstract syntax trees or bytecodes) often are ill-suited to analysis and transformation. Plans call for Babylon to be delivered over time, in a series of JDK Enhancement Proposals (JEP) likely to span multiple feature releases. Code reflection would start with a clone of the mainline release of JDK 22, which is due in March 2024, and track mainline releases moving forward. For the GPU programming model, the project would create a separate repository dependent on code reflection features as they are developed. There currently is no plan to deliver the GPU programming model into the JDK, but work on that model could identify JDK features and enhancements of general utility that could be addressed in the future. Related content feature 14 great preprocessors for developers who love to code Sometimes it seems like the rules of programming are designed to make coding a chore. Here are 14 ways preprocessors can help make software development fun again. By Peter Wayner Nov 18, 2024 10 mins Development Tools Software Development feature Designing the APIs that accidentally power businesses Well-designed APIs, even those often-neglected internal APIs, make developers more productive and businesses more agile. By Jean Yang Nov 18, 2024 6 mins APIs Software Development news Spin 3.0 supports polyglot development using Wasm components Fermyon’s open source framework for building server-side WebAssembly apps allows developers to compose apps from components created with different languages. By Paul Krill Nov 18, 2024 2 mins Microservices Serverless Computing Development Libraries and Frameworks news Go language evolving for future hardware, AI workloads The Go team is working to adapt Go to large multicore systems, the latest hardware instructions, and the needs of developers of large-scale AI systems. By Paul Krill Nov 15, 2024 3 mins Google Go Generative AI Programming Languages Resources Videos