[Paper Review] Towards Hybrid Intensional Programming with JLucid, Objective Lucid, and General Imperative Compiler Framework in the GIPSY
This paper presents a hybrid intensional programming framework integrating JLucid, Objective Lucid, and a General Imperative Compiler Framework within the GIPSY system, enabling seamless use of Java code and objects in intensional programs. It introduces compilers for generating sequential threads and communication procedures, supports arrays and object-oriented constructs, and provides a reusable infrastructure for compiling imperative languages like C and Fortran into GIPSY-compatible components, significantly enhancing expressiveness and interoperability in distributed, demand-driven computation.
Pure Lucid programs are concurrent with very fine granularity. Sequential Threads (STs) are functions introduced to enlarge the grain size; they are passed from server to workers by Communication Procedures (CPs) in the General Intensional Programming System (GIPSY). A JLucid program combines Java code for the STs with Lucid code for parallel control. Thus first, in this thesis, we describe the way in which the new JLucid compiler generates STs and CPs. JLucid also introduces array support. Further exploration goes through the additional transformations that the Lucid family of languages has undergone to enable the use of Java objects and their members, in the Generic Intensional Programming Language (GIPL), and Indexical Lucid: first, in the form of JLucid allowing the use of pseudo-objects, and then through the specifically-designed the Objective Lucid language. The syntax and semantic definitions of Objective Lucid and the meaning of Java objects within an intensional program are provided with discussions and examples. Finally, there are many useful scientific and utility routines written in many imperative programming languages other than Java, for example in C, C++, Fortran, Perl, etc. Therefore, it is wise to provide a framework to facilitate inclusion of these languages into the GIPSY and their use by Lucid programs. A General Imperative Compiler Framework and its concrete implementation is proposed to address this issue.
Motivation & Objective
- To extend the Lucid family of intensional languages with first-class support for Java code and objects, enabling hybrid programming in distributed systems.
- To design and implement a General Imperative Compiler Framework (GICF) that enables compilation of imperative code (e.g., C, C++, Fortran) into GIPSY-compatible sequential threads and communication procedures.
- To support array manipulation and object-oriented programming constructs (e.g., dot-notation, object instantiation) within intensional programs via Objective Lucid and JLucid extensions.
- To enable reuse of existing scientific and utility libraries written in imperative languages within the intensional programming model of GIPSY.
- To provide a scalable, extensible, and secure infrastructure for hybrid intensional programming in distributed, demand-driven execution environments.
Proposed method
- Design and implementation of JLucid, a language extension that embeds Java methods directly into Lucid programs, using a preprocessor and AST-based compilation to generate sequential threads (STs) and communication procedures (CPs).
- Definition of Objective Lucid as a superset of JLucid that supports first-class object-oriented constructs, including object instantiation, method calls via dot-notation, and object arrays, with semantics mapped to intensional execution.
- Design of a General Imperative Compiler Framework (GICF) that abstracts over imperative language compilers, enabling pluggable support for multiple languages via a common interface and JNI integration for C/C++.
- Use of Java Reflection and JNI to enable dynamic loading and execution of compiled imperative code as STs in the GIPSY runtime, with demand-driven execution via the General Eduction Engine (GEE).
- Integration of the GIPSY type system and semantic analyzer to ensure type safety and correct data flow between intensional and imperative components.
- Implementation of a web-based front-end (WebEditor) and command-line interfaces to support interactive development and testing of hybrid programs.
Experimental results
Research questions
- RQ1How can Java code be seamlessly integrated into intensional programs while preserving the declarative, demand-driven execution model of Lucid?
- RQ2What are the semantic and syntactic requirements for supporting object-oriented constructs such as methods and fields within an intensional programming model?
- RQ3How can a general-purpose compiler framework be designed to support multiple imperative languages (e.g., C, Fortran) within the GIPSY ecosystem?
- RQ4What mechanisms ensure type safety and correct data flow when composing intensional logic with imperative code in a distributed environment?
- RQ5How can existing scientific libraries in imperative languages be reused within intensional programs without sacrificing performance or correctness?
Key findings
- The JLucid compiler successfully generates executable sequential threads and communication procedures from embedded Java code, enabling hybrid execution in the GIPSY system.
- Objective Lucid supports full object-oriented programming constructs, including object instantiation, method invocation via dot-notation, and arrays of objects, with semantics formally defined and integrated into the intensional model.
- The General Imperative Compiler Framework (GICF) enables pluggable compilation of imperative languages into GIPSY-compatible components, with a working prototype for C using JNI, though full implementation remains future work.
- The framework supports array operations in both JLucid and Objective Lucid, with arrays treated as first-class intensional values and mapped to native data structures.
- The system enables reuse of existing libraries (e.g., MARF’s FFT implementation) by embedding their Java code into JLucid programs, as demonstrated in the Fast Fourier Transform case study.
- Formal verification of semantic rules and the GIPSY type system is underway, with initial work in PVS and Isabelle, indicating a path toward formal correctness guarantees.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.