Functional prototypes for generic C++ libraries: a transformational approach based on higher-order, typed signatures

被引:1
|
作者
Lincke, Daniel [1 ]
Schupp, Sibylle [2 ]
Ionescu, Cezar [3 ]
机构
[1] Global Climate Forum, Berlin, Germany
[2] Hamburg Univ Technol, Inst Software Syst, Hamburg, Germany
[3] Potsdam Inst Climate Impact Res PIK, Res Domain Transdisciplinary Concepts & Methods, Potsdam, Germany
基金
美国国家科学基金会;
关键词
Defunctionalization; Higher-order functions; Type constructors; Concepts; Program transformation; VULNERABILITY; SUPPORT;
D O I
10.1007/s10009-014-0299-0
中图分类号
TP31 [计算机软件];
学科分类号
081202 ; 0835 ;
摘要
This paper presents a method for developing generic C++ software libraries from functional prototypes, based on program transformation. More precisely, the type signatures of generic functions, i.e., functions parameterized on types, are transformed. This transformation maps typelevel expressions from functional higher-order, typed languages to type-level expressions in C++. In particular, type-level functional constructs such as higher-order functions and type constructors, are mapped to type parameters of generics that are constrained with appropriate concepts. The core of the transformation is a novel form of "defunctionalization" at the level of types. To make the transformation retargetable, we based it on two kernel languages that can be bound to different functional and object-oriented languages. For this paper, we use bindings to Haskell as front end and C++ with concepts as back end. Our transformational approach presents an alternative to a language extension and is useful particularly for functional prototyping where functional features are employed at specification time. We illustrate our approach by a case study: we show how we developed a generic C++ library for vulnerability modeling in the context of global change from a functional prototype in Haskell.
引用
收藏
页码:91 / 105
页数:15
相关论文
共 50 条
  • [1] Functional prototypes for generic C++ libraries: a transformational approach based on higher-order, typed signatures
    Daniel Lincke
    Sibylle Schupp
    Cezar Ionescu
    [J]. International Journal on Software Tools for Technology Transfer, 2015, 17 : 91 - 105
  • [2] A Transformational Approach to Polyvariant BTA of Higher-Order Functional Programs
    Arroyo, Gustavo
    Guadalupe Ramos, J.
    Tamarit, Salvador
    Vidal, German
    [J]. LOGIC-BASED PROGRAM SYNTHESIS AND TRANSFORMATION, 2009, 5438 : 40 - +
  • [3] Pirouette: Higher-Order Typed Functional Choreographies
    Hirsch, Andrew K.
    Garg, Deepak
    [J]. PROCEEDINGS OF THE ACM ON PROGRAMMING LANGUAGES-PACMPL, 2022, 6 (POPL):
  • [4] EVL: A Typed Higher-order Functional Language for Events
    Alves, Sandra
    Fernandez, Maribel
    Ramos, Miguel
    [J]. ELECTRONIC NOTES IN THEORETICAL COMPUTER SCIENCE, 2020, 351 : 3 - 23
  • [5] Resolving Inductive Definitions with Binders in Higher-Order Typed Functional Programming
    Lakin, Matthew R.
    Pitts, Andrew M.
    [J]. PROGRAMMING LANGUAGES AND SYSTEMS, PROCEEDINGS, 2009, 5502 : 47 - 61
  • [6] ESVERIFY : Verifying Dynamically-Typed Higher-Order Functional Programs by SMT Solving
    Schuster, Christopher
    Banerjea, Sohum
    Flanagan, Cormac
    [J]. PROCEEDINGS OF THE 30TH SYMPOSIUM ON IMPLEMENTATION AND APPLICATION OF FUNCTIONAL LANGUAGES (IFL 2018), 2018, : 59 - 70
  • [7] Higher-order discrete adjoint ODE solver in C++ for dynamic optimization
    RWTH Aachen, Software and Tools for Computational Engineering, Aachen, Germany
    不详
    [J]. Procedia Comput. Sci., 1 (256-265):
  • [8] A Generic Table Recomputation-Based Higher-Order Masking
    Tang, Ming
    Qiu, Zhenlong
    Guo, Zhipeng
    Mu, Yi
    Huang, Xinyi
    Danger, Jean-Luc
    [J]. IEEE TRANSACTIONS ON COMPUTER-AIDED DESIGN OF INTEGRATED CIRCUITS AND SYSTEMS, 2017, 36 (11) : 1779 - 1789
  • [9] Permission-based ownership: Encapsulating state in higher-order typed languages
    Krishnaswami, N
    Aldrich, J
    [J]. ACM SIGPLAN NOTICES, 2005, 40 (06) : 96 - 106
  • [10] Semantic Component Behavior Equivalence Analysis based on Higher-order Typed π Calculus
    Wu, Qing
    Zhao, Chunbo
    Hu, Weihua
    [J]. 2009 INTERNATIONAL SYMPOSIUM ON INTELLIGENT INFORMATION SYSTEMS AND APPLICATIONS, PROCEEDINGS, 2009, : 115 - 118