CPL - Chalmers Publication Library
| Utbildning | Forskning | Styrkeområden | Om Chalmers | In English In English Ej inloggad.

Multi-Language Library Development. From Haskell Type Classes to C++ Concepts.

Marcin Zalewski (Institutionen för data- och informationsteknik, Datavetenskap (Chalmers)) ; Andreas Priesnitz (Institutionen för data- och informationsteknik, Datavetenskap (Chalmers)) ; Cezar Ionescu ; Nicola Botta ; Sibylle Schupp (Institutionen för data- och informationsteknik, Datavetenskap (Chalmers))
Multiparadigm Programming with Object-Oriented Languages, an ECOOP workshop (2007)
[Konferensbidrag, refereegranskat]

We define a mapping from generic Haskell specifications to C++ with concepts, a recent extension to C++, that can ultimately be automated. More specifically, we provide a translation from Haskell multi-parameter type classes with functional dependencies to ConceptC++. Our translation consists of three major parts: the division of Haskell class variables into ConceptC++ concept parameters and associated types, the corresponding division of superclasses in the context of a type class, and the linearization of Haskell ASTs to the concrete syntax of ConceptC++. We also discuss cases in which there is no single correct translation from classes with functional dependencies to concepts. Our translation handles these cases in a reasonable way and is well-defined for the cases most common in practice. The translation is motivated by an ongoing project for distributed adaptive finite volume methods, in which software components are modeled in Haskell and implemented in C++.

Nyckelord: Type classes, concepts, C++, translation



Denna post skapades 2007-09-18. Senast ändrad 2013-08-05.
CPL Pubid: 48552

 

Institutioner (Chalmers)

Institutionen för data- och informationsteknik, Datavetenskap (Chalmers)

Ämnesområden

Datalogi
Programvaruteknik

Chalmers infrastruktur

Relaterade publikationer

Denna publikation ingår i:


Generic Programming with Concepts