Optimizations in distributed run-time compilation

  • Authors:
  • Samuel N. Kamin;Lars Reder Clausen

  • Affiliations:
  • -;-

  • Venue:
  • Optimizations in distributed run-time compilation
  • Year:
  • 2004

Quantified Score

Hi-index 0.01

Visualization

Abstract

Distributed run-time code generation is a useful technique that can easily be implemented using the technique known as “compositional semantics.” In this dissertation, we describe a new system, Jumbo, which adds run-time code generation features to Java. It allows code generators from disparate sources to be combined dynamically. Jumbo allows the creation of highly adaptable code that can be distributed in binary form. In order to handle the increasing complexity of software, programmers have long been creating reusable function libraries. These libraries can be distributed in binary form without revealing implementation secrets. While libraries allow sharing or sale of code, the granularity and inflexibility of pre-compiled functions force the libraries to be either overly general or prohibitively specific. Run-time code generation systems present a light-weight alternative to function calls, where fragments of code, not necessarily whole functions, can be manipulated, creating higher-quality specialized code. However, the currently existing RTCG systems either operate at the source level or take a non-compositional approach, and thus are not amenable to binary distribution. Jumbo implements a novel form of run-time compilation, where code fragments in binary form from several sources can be combined at run time to form efficient specialized code. By using compositional semantics, we allow some previously unknown functionality. For instance, in database systems, a client can create query functions that interact directly with the server's internal calls without neither the query nor the database implementation needing to be disclosed. Render farms can let clients specify textures with code that merges with local, specialized functions without disclosing texture details. Anonymity, copyrights and trade secrets can be retained without sacrificing efficiency. Jumbo is also useful for non-distributed systems that can take advantage of staged compilation for efficiency, and it can additionally be used in a manner similar to that of macros, providing a way to codify common programming practices. We also consider possibilities for optimizations, and present a rewriting This general-purpose optimizer exploits the compositional nature of Jumbo to aggressively optimize the code generators for the individual code fragments.