Efficient dispatch of multi-object polymorphic call sites in contextual role-oriented programming languages

Research output: Contribution to book/conference proceedings/anthology/reportConference contributionContributedpeer-review

Abstract

Adaptive software becomes more and more important as computing is increasingly context-dependent. Runtime adaptability can be achieved by dynamically selecting and applying context-specific code. Role-oriented programming has been proposed as a paradigm to enable runtime adaptive software by design. Roles change the objects' behavior at runtime, thus adapting the software to a given context. The cost of adaptivity is however a high runtime overhead stemming from executing compositions of behavior-modifying code. It has been shown that the overhead can be reduced by optimizing dispatch plans at runtime when contexts do not change, but no method exists to reduce the overhead in cases with high context variability. This paper presents a novel approach to implement polymorphic role dispatch, taking advantage of run-time information to effectively guard abstractions and enable reuse even in the presence of variable contexts. The concept of polymorphic inline caches is extended to role invocations. We evaluate the implementation with a benchmark for role-oriented programming languages achieving a geometric mean speedup of 4.0× (3.8× up to 4.5×) with static contexts, and close to no overhead in the case of varying contexts over the current implementation of contextual roles in Object Teams.

Details

Original languageEnglish
Title of host publicationMPLR 2020 - Proceedings of the 17th International Conference on Managed Programming Languages and Runtimes
EditorsStefan Marr
PublisherAssociation for Computing Machinery (ACM), New York
Pages52-62
Number of pages11
ISBN (electronic)9781450388535
Publication statusPublished - 4 Nov 2020
Peer-reviewedYes

Conference

Title17th International Conference on Managed Programming Languages and Runtimes, MPLR 2020
Duration4 - 6 November 2020
CityVirtual, Online
CountryUnited Kingdom

External IDs

ORCID /0000-0002-5007-445X/work/141545524

Keywords

Research priority areas of TU Dresden

Keywords

  • context, dispatch, dynamic languages, roles