PQL/Java: A powerful and easy-to-use declarative parallel query language for Java
Joint work with Yannis Smaragdakis, Neil Immerman, and Hilmar Ackermann.
| The popularisation of parallelism is arguably the most fundamental computing challenge for years to come. We present an approach where parallel programming takes place in a restricted (sub-Turing-complete), logic-based declarative language, embedded in Java. Our logic-based language, PQL, can express the parallel elements of a computing task, while regular Java code captures sequential elements. This approach offers a key property: the purely declarative nature of the language allows for aggressive optimization, in much the same way that relational queries are optimized by a database engine. At the same time, declarative queries can operate on plain Java data, extending patterns such as map-reduce to arbitrary levels of nesting and composition complexity. |
|
The language
- PQL language definition (draft)
- Intermediate language specification
- Implementation (on bitbucket.org):
- pqlib: intermediate representation and optimisation library
- pql-compiler: compiler frontend
- Build instructions:
- mkdir lib
- Install asm-4.1-bin.zip from here. Copy all jar files from asm-4.1/lib/ to lib/.
- Install JUnit 4.0 from here. Copy the jar file (junit-4.0.jar) to lib/.
- git clone https://bitbucket.org/creichen/pqlib.git
- cd pqlib; make jar; cd ..
- git clone https://bitbucket.org/creichen/pql-compiler.git
- cd pql-compiler; make
- The compiler should now be built, as ./dist/bootstrap/bin/javac. Remember that you need to link against pqlib.jar to execute compiled PQL programs.
- There are a number of known issues with the compiler as-is, but feel free to file additional bugs or send in patches!
Publications
- Hilmar Ackermann, Christoph Reichenbach, Christian Müller, Yannis Smaragdakis: A Backend Extension Mechanism for PQL/Java with Free Run-Time Optimisation. In Compiler Construction 2015. [pdf]
- Hilmar Ackermann: Dynamische Übersetzung von PQL in Java-Bytecode (2013), B.Sc. thesis, Johann-Wolfgang Goethe University Frankfurt. [pdf, German]
- Christoph Reichenbach, Yannis Smaragdakis, Neil Immerman: PQL: A Purely-Declarative Java Extension for Parallel Programming
In 26th European Conference on Object-Oriented Programming (ECOOP) (2012). [pdf] [slides]