当前位置:
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
中文翻译:
基于模式匹配的类型说明程序的中间表示
更新日期:2020-02-20
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.中文翻译:
基于模式匹配的类型说明程序的中间表示