当前位置: X-MOL 学术Program. Comput. Softw. › 论文详情
Our official English website, www.x-mol.net, welcomes your feedback! (Note: you will need to create a separate account there.)
Intermediate Representation of Programs with Type Specification Based on Pattern Matching
Programming and Computer Software ( IF 0.7 ) Pub Date : 2020-02-20 , DOI: 10.1134/s0361768820010077
V. A. Vasenin , M. A. Krivchikov

Abstract

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.


中文翻译:

基于模式匹配的类型说明程序的中间表示

摘要

在本文中,我们提出了一种中间表示(IR)语言,用于在动态类型化编程语言中对类型系统规范特征进行简明和通用的描述。中间表示基于模式匹配和特征类型级别的计算。它受到Refal-2的中间表示形式“汇​​编语言”的启发。与“汇编语言”相反,所提出的表示基于控制流程图,该流程图保留了键入信息,而不是字节码。此外,我们建议对Refal语言进行修改,以支持高阶函数,闭包和“关联数组”数据类型,以及将程序从语言转换为中间表示形式的方法。用这种语言,我们提供了两个类型系统规范的示例:简单类型和行多态性。这些示例对于描述动态类型的编程语言的类型系统很有用。
更新日期:2020-02-20
down
wechat
bug