Modularity 2016
Mon 14 - Thu 17 March 2016 Spain
Tue 15 Mar 2016 14:05 - 14:40 at LaMOD - LaMOD Workshop Session 1 Chair(s): David H. Lorenz

Data types a la carte (DTC) is a technique to modularly add new variants to data types. A drawback of DTC compared to simple variant types,which is the common way to define data types in functional programming language, is runtime inefficiency in destruction of these values. In this paper we propose a lightweight optimization technique for functions that destruct the values of DTC data types. It makes run as efficiently as their non-DTC counterparts by just (1) deriving non-extensible algebraic datatypes isomorphic to extensible data types defined in DTC fashion (2) using them within the type annotations that specify concrete data types using the composition operator given in DTC. The approach is based on our insight on the functions: they never depend on any concrete data types but merely constrain them. We implement functions that take an extensible data type defined in DTC fashion and derive an isomorphic non-extensible algebraic data type using Template Haskell. Our experimental results show that using our approach DTC functions run as efficient as their non-DTC counterparts and avoid performance slowdown even if the data types are extended multiple times.

Tue 15 Mar

14:00 - 15:00: Language Modularity - LaMOD Workshop Session 1 at LaMOD
Chair(s): David H. LorenzOpen University and Technion IIT
LaMOD2016145804680000014:00 - 14:05
Day opening
David H. LorenzOpen University and Technion IIT, Jacques NoyéÉcole des Mines de Nantes, France, Raffi KhatchadourianHunter College, City University of New York
LaMOD2016145804710000014:05 - 14:40
Hirotada KiriyamaTokyo Institute of Technology, Tomoyuki AotaniTokyo Institute of Technology, Japan, Hidehiko MasuharaTokyo Institute of Technology
LaMOD2016145804920000014:40 - 15:00
Bastian KruckHasso Plattner Institute, Potsdam, Stefan LehmannHasso-Plattner-Institute, Potsdam, Christoph KesslerHasso Plattner Institute, Potsdam, Jakob Reschke, Tim FelgentreffHPI, Germany, Jens LinckeHasso Plattner Institute, Robert HirschfeldHPI
DOI Pre-print Media Attached