|
Elemental Function Overloading in Explicitly Typed Languages |
||||||
|
||||||
|
Abstract Elemental intrinsic overloading is used successfully in vector parallel and data parallel programming languages. It allows scalar operators to be applied to arguments of array type, where the semantics is a new array where every element is the result of applying the operator to the corresponding elements of the argument array. This type of overloading makes programs with extensive use of array operations easier to read, write and maintain. However, it is typically restricted to allow overloading only of built-in functions and defined only for operators on one parallel data type, mostly arrays. In order to extend this feature to a larger class of languages, we propose elemental function overloading together with a polymorphic type discipline. Elemental function overloading, which is defined for all functions, also incorporates promotion of "scalar" values. In this paper we formalize the concept of elemental functional overloading in an explicitly typed polymorphic language and present an algorithm for resolving this overloading. We also make a preliminary study of elemental function overloading in an implicitly typed polymorphic language with type inference. |
||||||
|
BibTeX entry @inproceedings{Thornberg_0245:2000, |