TL;DR: MultiJava is presented, a backward-compatible extension to Java supporting open classes and symmetric multiple dispatch, and adapt previous theoretical work to allow compilation units to be statically typechecked modularly and safely, ruling out any link-time or run-time type errors.
Abstract: We present MultiJava, a backward-compatible extension to Java supporting open classes and symmetric multiple dispatch. Open classes allow one to add to the set of methods that an existing class supports without creating distinct subclasses or editing existing code. Unlike the "Visitor" design pattern, open classes do not require advance planning, and open classes preserve the ability to add new subclasses modularly and safely. Multiple dispatch offers several well-known advantages over the single dispatching of conventional object-oriented languages, including a simple solution to some kinds of "binary method" problems. MultiJava's multiple dispatch retains Java's existing class-based encapsulation properties. We adapt previous theoretical work to allow compilation units to be statically typechecked modularly and safely, ruling out any link-time or run-time type errors. We also present a n compilation scheme that operates modularly and incurs performance overhead only where open classes or multiple dispatching are actually used.
TL;DR: This paper addresses the problem of an efficient dispatch mechanism in an object-oriented system with multiple inheritance by suggesting a direct table indexed branch such as is used in C++.
Abstract: This paper addresses the problem of an efficient dispatch mechanism in an object-oriented system with multiple inheritance. The solution suggested is a direct table indexed branch such as is used in C++. The table slot assignments are made using a coloring algorithm. The method is applicable to strongly typed languages such as C++ (with multiple inheritance added) and Eiffel, and in a slightly slower form to less strongly typed languages like Objective C.
TL;DR: Predicate dispatching as mentioned in this paper generalizes previous method dispatch mechanisms by permitting arbitrary predicates to control method applicability and by using logical implication between predicates as the overriding relationship, which can be regarded as syntactic sugar for predicate dispatching.
Abstract: Predicate dispatching generalizes previous method dispatch mechanisms by permitting arbitrary predicates to control method applicability and by using logical implication between predicates as the overriding relationship. The method selected to handle a message send can depend not just on the classes of the arguments, as in ordinary object-oriented dispatch, but also on the classes of subcomponents, on an argument's state, and on relationships between objects. This simple mechanism subsumes and extends object-oriented single and multiple dispatch, ML-style pattern matching, predicate classes, and classifiers, which can all be regarded as syntactic sugar for predicate dispatching. This paper introduces predicate dispatching, gives motivating examples, and presents its static and dynamic semantics. An implementation of predicate dispatching is available.
TL;DR: In this article, a processor microarchitecture for efficient dynamic instruction scheduling and execution is presented, which includes a predetermined number of independent dispatch queues, and a cluster of execution units coupled to each dispatch queue such that the dispatch queue and the corresponding execution units form an independent micropipeline.
Abstract: A processor microarchitecture for efficient dynamic instruction scheduling and execution. The invention includes a predetermined number of independent dispatch queues. The invention also includes a cluster of execution units coupled to each dispatch queue such that the dispatch queue and the corresponding cluster of execution units forms an independent micropipeline. Chain-building and steering logic coupled to the dispatch queues identifies a consumer instruction relying on a producer instruction for an operand, and issues the consumer instruction to the same dispatch queue as the producer instruction that it is dependent upon. The instructions are issued from the dispatch queue to the corresponding cluster of execution units. In one embodiment, the output of each execution unit in the cluster is routed to the inputs of all execution units in the cluster such that the result of executing the producer instruction is readily available as an operand for execution of the consumer instruction.
TL;DR: This work proposes an efficient dynamic programming approach for the deterministic variant of the dynamic dispatch waves problem, and uses it to design an optimal a priori policy with predetermined routes for the stochastic case.
Abstract: We study same-day delivery systems by formulating the dynamic dispatch waves problem (DDWP), which models a depot where delivery requests arrive dynamically throughout a service day. At any dispatch epoch (wave), the information available to the decision maker is (1) a set of known, open requests that remain unfulfilled, and (2) a set of potential requests that may arrive later in the service day. At each wave, the decision maker decides whether or not to dispatch a vehicle, and if so, which subset of open requests to serve, with the objective of minimizing expected vehicle operating costs and penalties for unserved requests. We consider the DDWP with a single delivery vehicle and request destinations on a line, where vehicle operating times and costs depend only on the distance between points. We propose an efficient dynamic programming approach for the deterministic variant, and leverage it to design an optimal a priori policy with predetermined routes for the stochastic case. We then show that fully dy...