Answers are grounded in this paper and cite their sources.
Demonstrates effective predicate dispatching in dynamically typed languages, implying broader applicability.
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.
No takes yet. Share an insight, caveat, or question.
Gräter et al. (2011) studied this question.
Synapse has enriched 8 closely related papers on similar clinical questions. Consider them for comparative context: