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 条
  • [21] Writing Domain-Specific Languages for BeepBeep
    Halle, Sylvain
    Khoury, Raphael
    RUNTIME VERIFICATION (RV 2018), 2018, 11237 : 447 - 457
  • [22] A Survey on Domain-Specific Languages in Robotics
    Nordmann, Arne
    Hochgeschwender, Nico
    Wrede, Sebastian
    SIMULATION, MODELING, AND PROGRAMMING FOR AUTONOMOUS ROBOTS (SIMPAR 2014), 2014, 8810 : 195 - 206
  • [23] A Module System for Domain-Specific Languages
    Jackson, Ethan K.
    THEORY AND PRACTICE OF LOGIC PROGRAMMING, 2014, 14 : 771 - 785
  • [24] Software Evolution to Domain-Specific Languages
    Fehrenbach, Stefan
    Erdweg, Sebastian
    Ostermann, Klaus
    SOFTWARE LANGUAGE ENGINEERING (SLE 2013), 2013, 8225 : 96 - 116
  • [25] Domain-specific languages for ecological modelling
    Holst, Niels
    Belete, Getachew F.
    ECOLOGICAL INFORMATICS, 2015, 27 : 26 - 38
  • [26] Testing domain-specific languages in eclipse
    Wu, Hui
    Gray, Jeff
    Proc Conf Object Orient Program Syst Lang Appl OOPSLA, (173-174):
  • [27] Using Ontologies in the Domain Analysis of Domain-Specific Languages
    Tairas, Robert
    Mernik, Marjan
    Gray, Jeff
    MODELS IN SOFTWARE ENGINEERING, 2009, 5421 : 332 - +
  • [28] A Foundation for the Composition of Multilevel Domain-Specific Languages
    Rodriguez, Alejandro
    Rutle, Adrian
    Kristensen, Lars Michael
    Duran, Francisco
    2019 ACM/IEEE 22ND INTERNATIONAL CONFERENCE ON MODEL DRIVEN ENGINEERING LANGUAGES AND SYSTEMS COMPANION (MODELS-C 2019), 2019, : 88 - 97
  • [29] UML customization versus domain-specific languages
    Gray, Jeff
    Rumpe, Bernhard
    SOFTWARE AND SYSTEMS MODELING, 2018, 17 (03): : 713 - 714
  • [30] EXTENSIBLE HOST LANGUAGE FOR DOMAIN-SPECIFIC LANGUAGES
    Chodarev, Sergej
    Kollar, Jan
    COMPUTING AND INFORMATICS, 2016, 35 (01) : 84 - 110