A Generic Abstract Syntax Model for Embedded Languages

被引:4
|
作者
Axelsson, Emil [1 ]
机构
[1] Chalmers Univ Technol, Stockholm, Sweden
关键词
the expression problem; generic programming; embedded domain-specific languages;
D O I
10.1145/2398856.2364573
中图分类号
TP31 [计算机软件];
学科分类号
081202 ; 0835 ;
摘要
Representing a syntax tree using a data type often involves having many similar-looking constructors. Functions operating on such types often end up having many similar-looking cases. Different languages often make use of similar-looking constructions. We propose a generic model of abstract syntax trees capable of representing a wide range of typed languages. Syntactic constructs can be composed in a modular fashion enabling reuse of abstract syntax and syntactic processing within and across languages. Building on previous methods of encoding extensible data types in Haskell, our model is a pragmatic solution to Wadler's "expression problem". Its practicality has been confirmed by its use in the implementation of the embedded language Feldspar.
引用
收藏
页码:323 / 334
页数:12
相关论文
共 50 条
  • [1] Abstract syntax and semantics of visual languages
    Erwig, M
    [J]. JOURNAL OF VISUAL LANGUAGES AND COMPUTING, 1998, 9 (05): : 461 - 483
  • [2] Model Transformations to Bridge Concrete and Abstract Syntax of Web Rule Languages
    Milanovic, Milan
    Gasevic, Dragan
    Giurca, Adrian
    Wagner, Gerd
    Lukichev, Sergey
    Devedzic, Vladan
    [J]. COMPUTER SCIENCE AND INFORMATION SYSTEMS, 2009, 6 (02) : 47 - 85
  • [3] Bridging concrete and abstract syntax of Web rule languages
    Milanovic, Milan
    Gasevic, Dragan
    Giurca, Adrian
    Wagner, Gerd
    Lukichev, Sergey
    Devedzic, Vladan
    [J]. WEB REASONING AND RULE SYSTEMS, PROCEEDINGS, 2007, 4524 : 309 - +
  • [4] Integrated definition of abstract and concrete syntax for textual languages
    Krahn, Holger
    Rumpe, Bernhard
    Voelkel, Steven
    [J]. MODEL DRIVEN ENGINEERING LANGUAGES AND SYSTEMS, PROCEEDINGS, 2007, 4735 : 286 - +
  • [5] The Syntax of Embedded Clauses in Icelandic and Related Languages
    Engdahl, Elisabet
    [J]. NORDIC JOURNAL OF LINGUISTICS, 2012, 35 (01) : 91 - 96
  • [6] A simple take on typed abstract syntax in Haskell-like languages
    Danvy, O
    Rhiger, M
    [J]. FUNCTIONAL AND LOGIC PROGRAMMING, PROCEEDINGS, 2001, 2024 : 343 - 358
  • [7] Synchronization of abstract and concrete syntax in domain-specific modeling languages
    Rath, Istvan
    Okros, Andras
    Varro, Daniel
    [J]. SOFTWARE AND SYSTEMS MODELING, 2010, 9 (04): : 453 - 471
  • [8] Incremental concrete syntax for embedded languages with support for separate compilation
    Dinkelaker, Tom
    Eichberg, Michael
    Mezini, Mira
    [J]. SCIENCE OF COMPUTER PROGRAMMING, 2013, 78 (06) : 615 - 632
  • [9] A Domain-Specific Language for Abstract Syntax Model to Concrete Syntax Model Mappings
    Quesada, Luis
    Berzal, Fernando
    Cubero, Juan-Carlos
    [J]. PROCEEDINGS OF THE 2014 2ND INTERNATIONAL CONFERENCE ON MODEL-DRIVEN ENGINEERING AND SOFTWARE DEVELOPMENT (MODELSWARD 2014), 2014, : 158 - 165
  • [10] Abstract syntax from concrete syntax
    Wile, DS
    [J]. PROCEEDINGS OF THE 1997 INTERNATIONAL CONFERENCE ON SOFTWARE ENGINEERING, 1997, : 472 - 480