Predicate-C: an efficient and generic runtime system for predicate dispatch

  • Authors:
  • Friedrich Gräter;Sebastian Götz;Julian Stecklina

  • Affiliations:
  • Technische Universität, Dresden;Technische Universität, Dresden;Technische Universität, Dresden

  • Venue:
  • Proceedings of the 6th Workshop on Implementation, Compilation, Optimization of Object-Oriented Languages, Programs and Systems
  • Year:
  • 2011

Quantified Score

Hi-index 0.00

Visualization

Abstract

Dynamically typed languages like Ruby [19] recently gained a growing popularity due to the simplification of unforeseen software extensibility. Extensibility is typically driven by method dispatch which in turn uses the type system to classify objects. Common type systems only support type classifications attached to objects in advance of a method call. By that, the applicability of methods can be only described using existing classifications limiting the generic reuse of methods. Furthermore, it is difficult to classify objects by dynamic conditions according to their runtime state or current execution context. As an alternative, predicate dispatching allows the dispatch of methods on arbitrary predicates. Criteria for applicability are directly bound to methods enabling a flexible classification of objects. However, existing solutions for predicate dispatch suffer from co-NP-completeness. Furthermore, these solutions depend on high-level programming languages, which limits a system-wide and cross-language application of predicate dispatch. In this work, we present Predicate-C, a runtime environment that provides predicate dispatch with polynomial dispatching overhead. It is implemented as a lightweight C library that can be integrated into arbitrary runtime environments.