Domain-specific tensor languages

被引:0
|
作者
Bernardy, Jean-philippe [1 ,2 ]
Jansson, Patrik [1 ,2 ]
机构
[1] Chalmers Univ Technol, Gothenburg, Sweden
[2] Univ Gothenburg, Gothenburg, Sweden
关键词
D O I
10.1017/S0956796825000048
中图分类号
TP31 [计算机软件];
学科分类号
081202 ; 0835 ;
摘要
The tensor notation used in several areas of mathematics is a useful one, but it is not widely available to the functional programming community. In a practical sense, the (embedded) domain-specific languages (dsls) that are currently in use for tensor algebra are either 1. array-oriented languages that do not enforce or take advantage of tensor properties and algebraic structure or 2. follow the categorical structure of tensors but require the programmer to manipulate tensors in an unwieldy point-free notation. A deeper issue is that for tensor calculus, the dominant pedagogical paradigm assumes an audience which is either comfortable with notational liberties which programmers cannot afford, or focus on the applied mathematics of tensors, largely leaving their linguistic aspects (behaviour of variable binding, syntax and semantics, etc.) for the reader to figure out by themselves. This state of affairs is hardly surprising, because, as we highlight, several properties of standard tensor notation are somewhat exotic from the perspective of lambda calculi. We bridge the gap by defining a dsl, embedded in Haskell, whose syntax closely captures the index notation for tensors in wide use in the literature. The semantics of this edsl is defined in terms of the algebraic structures which define tensors in their full generality. This way, we believe that our edsl can be used both as a tool for scientific computing, but also as a vehicle to express and present the theory and applications of tensors.
引用
收藏
页数:42
相关论文
共 50 条
  • [1] Domain-specific model differencing for graphical domain-specific languages
    Jafarlou, Manouchehr Zadahmad
    ACM/IEEE 25TH INTERNATIONAL CONFERENCE ON MODEL DRIVEN ENGINEERING LANGUAGES AND SYSTEMS, MODELS 2022 COMPANION, 2022, : 205 - 208
  • [2] On domain-specific languages reengineering
    Alias, C
    Barthou, D
    GENERATIVE PROGRAMMING AND COMPONENT ENGINEERING, PROCEEDINGS, 2005, 3676 : 63 - 77
  • [3] Unembedding Domain-Specific Languages
    Atkey, Robert
    Lindley, Sam
    Yallop, Jeremy
    HASKELL'09: PROCEEDINGS OF THE 2009 ACM SIGPLAN HASKELL SYMPOSIUM, 2009, : 37 - 48
  • [4] On the Globalization of Domain-Specific Languages
    Cheng, Betty H. C.
    Combemale, Benoit
    France, Robert B.
    Jezequel, Jean-Marc
    Rumpe, Bernhard
    GLOBALIZING DOMAIN-SPECIFIC LANGUAGES, 2015, 9400 : 1 - 6
  • [5] Macros for Domain-Specific Languages
    Ballantyne, Michael
    King, Alexis
    Felleisen, Matthias
    PROCEEDINGS OF THE ACM ON PROGRAMMING LANGUAGES-PACMPL, 2020, 4 (OOPSLA):
  • [6] DSMCompare: domain-specific model differencing for graphical domain-specific languages
    Manouchehr Zadahmad
    Eugene Syriani
    Omar Alam
    Esther Guerra
    Juan de Lara
    Software and Systems Modeling, 2022, 21 : 2067 - 2096
  • [7] DSMCompare: domain-specific model differencing for graphical domain-specific languages
    Zadahmad, Manouchehr
    Syriani, Eugene
    Alam, Omar
    Guerra, Esther
    de Lara, Juan
    SOFTWARE AND SYSTEMS MODELING, 2022, 21 (05): : 2067 - 2096
  • [8] Untangling Crosscutting Concerns in Domain-specific Languages with Domain-specific Join Points
    Dinkelaker, Tom
    Monperrus, Martin
    Mezini, Mira
    DSAL09: DOMAIN-SPECIFIC ASPECT LANGUAGES, 2009, : 1 - 5
  • [9] Domain-Specific Languages in Scientific Computing
    Hinsen, Konrad
    COMPUTING IN SCIENCE & ENGINEERING, 2018, 20 (01) : 88 - 92
  • [10] Compositional Embeddings of Domain-Specific Languages
    Sun, Yaozhu
    Dhandhania, Utkarsh
    Oliveira, Bruno C. D. S.
    PROCEEDINGS OF THE ACM ON PROGRAMMING LANGUAGES-PACMPL, 2022, 6 (OOPSLA):