Towards Polytypic Parallel Programming
نویسندگان
چکیده
Data parallelism is currently one of the most successful models for programming massively parallel computers. The central idea is to evaluate a uniform collection of data in parallel by simultaneously manipulating each data element in the collection. Despite many of its promising features, the current approach su ers from two problems. First, the main parallel data structures that most data parallel languages currently support are restricted to simple collection data types like lists, arrays or similar structures. But other useful data structures like trees have not been well addressed. Second, parallel programming relies on a set of parallel primitives that capture parallel skeletons of interest. However, these primitives are not well structured, and e cient parallel programming with these primitives is di cult. In this paper, we propose a polytypic framework for developing e cient parallel programs on most data structures. We show how a set of polytypic parallel primitives can be formally de ned for manipulating most data structures, how these primitives can be successfully structured into a uniform recursive de nition, and how an e cient combination of primitives can be derived from a naive speci cation program. Our framework should be signi cant not only in development of new parallel algorithms, but also in construction of parallelizing compilers.
منابع مشابه
Polytypic Programming With Ease
A functional polytypic program is one that is parameterised by datatype. Since poly-typic functions are deened by induction on types rather than by induction on values they typically operate on a higher level of abstraction than their monotypic counterparts. However, polytypic programming is not necessarily more complicated than conventional programming. We show that a polytypic function is uni...
متن کاملType-safe run-time polytypic programming
Polytypic programming is a way of defining type-indexed operations, such as map, fold and zip, based on type information. Run-time polytypic programming allows that type information to be dynamically computed—this support is essential in modern programming languages that support separate compilation, first-class type abstraction, or polymorphic recursion. However, in previous work we defined ru...
متن کاملPolytypic Functional Programming
Structural polymorphism is a generic programming technique known within the functional programming community under the names of polytypic or datatype-generic programming. In this thesis we show that such a technique conflicts with the principle of data abstraction and propose a solution for reconciliation. More concretely, we show that popular polytypic extensions of the functional programming ...
متن کاملFormal polytypic programs and proofs
The aim of our work is to be able to do fully formal, machine verified proofs over Generic Haskellstyle polytypic programs. In order to achieve this goal, we embed polytypic programming in the proof assistant Coq and provide an infrastructure for polytypic proofs. Polytypic functions are reified within Coq as a datatype and they can then be specialized by applying a dependently typed term speci...
متن کاملPolytypic Syntax Tree Operations
Polytypic functional programming has the advantage that it can derive code for generic functions automatically. However, it is not clear whether it is useful for anything other than the textbook examples, and the generated polytypic code is usually too slow for real-life programs. As a real-life test, we derive a polytypic parser for the Haskell 98 syntax and look into other front-end compiler ...
متن کامل