A Backend Extension Mechanism for PQL/Java with Free Run-Time Optimisation

Research output: Chapter in Book/Report/Conference proceedingPaper in conference proceeding


In many data processing tasks, declarative query programming offers substantial benefit over manual data analysis: the query processors found in declarative systems can use powerful algorithms such as query planning to choose high-level execution strategies during compilation. However, the principal downside of such languages is that their primitives must be carefully curated, to allow the query planner to correctly estimate their overhead. In this paper, we examine this challenge in one such system, PQL/Java. PQL/Java adds a powerful declarative query language to Java to enable and automatically parallelise queries over the Java heap. In the past, the language has not provided any support for custom user-designed datatypes, as such support requires complex interactions with its query planner and backend.

We examine PQL/Java and its intermediate language in detail and describe a new system that simplifies PQL/Java extensions. This system provides a language that permits users to add new primitives with arbitrary Java computations, and new rewriting rules for optimisation. Our system automatically stages compilation and exploits constant information for dead code elimination and type specialisation. We have re-written our PQL/Java backend in our extension language, enabling dynamic and staged compilation.

We demonstrate the effectiveness of our extension language in several case studies, including the efficient integration of SQL queries, and by analysing the run-time performance of our rewritten prototype backend.


External organisations
  • Goethe University
  • National and Kapodistrian University of Athens
Research areas and keywords

Subject classification (UKÄ) – MANDATORY

  • Software Engineering
  • Computer Science


  • PQL/Java, Java, parallel programs, Extensibe compilers
Original languageEnglish
Title of host publicationCompiler Construction
Subtitle of host publication24th International Conference, CC 2015, Held as Part of the European Joint Conferences on Theory and Practice of Software, ETAPS 2015, London, UK, April 11-18, 2015
EditorsBjörn Franke
Place of PublicationBerlin, Heidelberg
ISBN (Electronic)978-3-662-46663-6
ISBN (Print)978-3-662-46662-9
Publication statusPublished - 2015
Publication categoryResearch
Externally publishedYes
EventCompiler Construction: 24th International Conference, CC 2015, Held as Part of the European Joint Conferences on Theory and Practice of Software, ETAPS 2015 - Lond, United Kingdom
Duration: 2015 Apr 112015 Apr 18

Publication series

NameLecture notes in computer science
ISSN (Print)0302-9743
ISSN (Electronic)1611-3349


ConferenceCompiler Construction
CountryUnited Kingdom