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

被引:0
|
作者
Daniel Lincke
Sibylle Schupp
Cezar Ionescu
机构
[1] Global Climate Forum,Institute for Software Systems
[2] Hamburg University of Technology,Research Domain Transdisciplinary Concepts and Methods
[3] Potsdam Institute for Climate Impact Research (PIK),undefined
关键词
Defunctionalization; Higher-order functions; Type constructors; Concepts; Program transformation;
D O I
暂无
中图分类号
学科分类号
摘要
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 type-level 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
页数:14
相关论文
共 50 条
  • [1] Functional prototypes for generic C++ libraries: a transformational approach based on higher-order, typed signatures
    Lincke, Daniel
    Schupp, Sibylle
    Ionescu, Cezar
    [J]. INTERNATIONAL JOURNAL ON SOFTWARE TOOLS FOR TECHNOLOGY TRANSFER, 2015, 17 (01) : 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