130 likes | 294 Views
This framework explores the integration of Haskell, a pure functional programming language, with Java, an object-oriented language, to leverage the strengths of both paradigms. It discusses the challenges of implementing applications in a single paradigm, presenting Haskell on the JVM using GHC and JNI for interoperability. The paper also highlights solutions like Frege, a Haskell-like language for the JVM, and addresses model checking techniques. The findings emphasize the potential for practical applications in high-performance computing and error prediction, with ongoing research suggested.
E N D
Framework for using Haskell modules in Java Author: Alexandru Gheorghiu Supervisor: Matei Popovici
Multi-paradigm programming • Paradigms are pure • Programming languages use multiple paradigms • Most languages have a central paradigm (Java – OOP)
Multi-paradigm programming • Some applications are difficult to implement in a single paradigm • Solution 1: multi-paradigm language (e.g. Python) • Solution 2: combine multiple programming languages
Haskell Java • Haskell – pure functional, declarative, strong static typing, compiled (GHC) • Java – object-oriented, imperative, strong static typing, compiled on virtual machine (JVM) • Haskell on the JVM?
GHC + JNI • GHC permits exporting Haskell functions as C libraries • Java Native Interface allows Java code to call and be called by native applications and libraries written in C/C++ or assembly
Problems • Overhead • Only functions of primitive types • Limited C/C++ code functionality
Frege • Haskell-like programming language • Compiled on the JVM • Plugin for Eclipse IDE Gottlob Frege (1848 – 1925)
Jess • Rule-engine based on CLIPS • Associative programming • Pattern matching • On the JVM
Model checking • Formula from a language + • Structure for representing evolving domains = • Formula evaluation, or model checking
Real world applicationHPC and error prediction Model checking
Conclusions and future work • Interesting application and results • “A logical method for temporal knowledge representation and reasoning” – Matei Popovici • Research continues...