Generic libraries in C++ with concepts from high-level domain descriptions in Haskell: A domain-specific library for computational vulnerability assessment
Paper i proceeding, 2009

A class of closely related problems, a problem domain, can often be described by a domain-specific language, which consists of algorithms and combinators useful for solving that particular class of problems. Such a language can be of two kinds: it can form a new language or it can be embedded as a sublanguage in an existing one. We describe an embedded DSL in the form of a library which extends a general purpose language. Our domain is that of vulnerability assessment in the context of climate change, formally described at the Potsdam Institute for Climate Impact Research. The domain is described using Haskell, yielding a domain specific sublanguage of Haskell that can be used for prototyping of implementations. In this paper we present a generic C++ library that implements a domain-specific language for vulnerability assessment, based on the formal Haskell description. The library rests upon and implements only a few notions, most importantly, that of a monadic system, a crucial part in the vulnerability assessment formalisation. We describe the Haskell description of monadic systems and we show our mapping of the description to generic C++ components. Our library heavily relies on concepts, a C++ feature supporting generic programming: a conceptual framework forms the domain-specific type system of our library and parametrised types and functions, ``typed'' by the concepts in our conceptual framework, represent the combinators and algorithms of the domain. Furthermore, we discuss what makes our library a domain specific language and how our domain-specific library scheme can be used for other domains (concerning language design, software design, and implementation techniques).

Författare

Daniel Lincke

Potsdam-Institut für Klimafolgenforschung (PIK)

Patrik Jansson

Chalmers, Data- och informationsteknik, Programvaruteknik (Chalmers)

Marcin Zalewski

Chalmers, Data- och informationsteknik, Programvaruteknik (Chalmers)

Cezar Ionescu

Potsdam-Institut für Klimafolgenforschung (PIK)

Lecture Notes in Computer Science (including subseries Lecture Notes in Artificial Intelligence and Lecture Notes in Bioinformatics)

03029743 (ISSN) 16113349 (eISSN)

Vol. 5658/2009 236-261
978-3-642-03033-8 (ISBN)

Styrkeområden

Informations- och kommunikationsteknik

Drivkrafter

Hållbar utveckling

Fundament

Grundläggande vetenskaper

Ämneskategorier

Annan naturresursteknik

Programvaruteknik

Klimatforskning

Datavetenskap (datalogi)

DOI

10.1007/978-3-642-03034-5_12

ISBN

978-3-642-03033-8

Mer information

Senast uppdaterat

2018-02-23