Intermediate Representation of Programs with Type Specification Based on Pattern Matching

被引:2
|
作者
Vasenin, V. A. [1 ]
Krivchikov, M. A. [1 ]
机构
[1] Moscow MV Lomonosov State Univ, Moscow 119991, Russia
基金
俄罗斯基础研究基金会;
关键词
Specifications - Data flow analysis - Flow graphs;
D O I
10.1134/S0361768820010077
中图分类号
TP31 [计算机软件];
学科分类号
081202 ; 0835 ;
摘要
In this paper, we present an intermediate representation (IR) language for the concise and generalized description of type system specification features in dynamically typed programming languages. The intermediate representation is based on pattern matching and features type-level computation. It is inspired by the intermediate representation "Assembly language" for Refal-2. In contrast to "Assembly language," the proposed representation is based on the control flow graph, which preserves typing information, rather than on bytecode. In addition, we propose a modification of the Refal language that supports higher-order functions, closures, and "associative array" data type, as well as a transpiler of programs from the language into the intermediate representation. In terms of this language, we present two examples of type system specification: simple types and row polymorphism. These examples are of interest for describing type systems for dynamically typed programming languages.
引用
收藏
页码:57 / 66
页数:10
相关论文
共 50 条
  • [21] Fast Exact Pattern Matching by the Means of a Character Bit Representation
    Zavadskyi I.O.
    SN Computer Science, 2022, 3 (3)
  • [22] Type-based Semantic Optimization for Scalable RDF Graph Pattern Matching
    Kim, HyeongSik
    Ravindra, Padmashree
    Anyanwu, Kemafor
    PROCEEDINGS OF THE 26TH INTERNATIONAL CONFERENCE ON WORLD WIDE WEB (WWW'17), 2017, : 785 - 794
  • [23] Grammar-based Pattern Matching and Type Checking for Difference Data Structures
    Yamamoto, Naoki
    Ueda, Kazunori
    26TH INTERNATIONAL SYMPOSIUM ON PRINCIPLES AND PRACTICE OF DECLARATIVE PROGRAMMING, PPDP 2024, 2024,
  • [24] Specification matching of state-based modular components
    Hemer, D
    ASIA-PACIFIC SOFTWARE ENGINEERING CONFERENCE, PROCEEDINGS, 2003, : 446 - 455
  • [25] Pattern-based specification of crowdsourcing applications
    Bozzon, Alessandro
    Brambilla, Marco
    Ceri, Stefano
    Mauri, Andrea
    Volonterio, Riccardo
    Lecture Notes in Computer Science (including subseries Lecture Notes in Artificial Intelligence and Lecture Notes in Bioinformatics), 2014, 8541 : 218 - 235
  • [27] Pattern-Based Specification of Crowdsourcing Applications
    Bozzon, Alessandro
    Brambilla, Marco
    Ceri, Stefano
    Mauri, Andrea
    Volonterio, Riccardo
    WEB ENGINEERING, ICWE 2014, 2014, 8541 : 218 - 235
  • [28] A UML-based pattern specification technique
    France, RB
    Kim, DK
    Ghosh, S
    Song, EJ
    IEEE TRANSACTIONS ON SOFTWARE ENGINEERING, 2004, 30 (03) : 193 - 206
  • [29] Type Inference for Regular Expression Pattern Matching
    Marin, Mircea
    Craciun, Adrian
    12TH INTERNATIONAL SYMPOSIUM ON SYMBOLIC AND NUMERIC ALGORITHMS FOR SCIENTIFIC COMPUTING (SYNASC 2010), 2011, : 366 - 373
  • [30] Type inference with extended pattern matching and subtypes
    Jategaonkar, Lalita A.
    Mitchell, John C.
    Fundamenta Informaticae, 1993, 19 (1-2) : 127 - 165