ReScript is a strongly typed language that targets JavaScript, as an alternative to gradually typed languages, such as TypeScript. In this paper, we present a sound type system for data-flow analysis for a subset of the ReScript language, more specifically for a lambda-calculus with mutability and pattern matching. The type system is a local analysis that collects information about variables that are used at each program point as well as alias information.
翻译:ReScript是一种以JavaScript为目标的强类型语言,可作为渐进式类型语言(如TypeScript)的替代方案。本文提出了一种针对ReScript语言子集(更具体而言,针对具有可变性和模式匹配的λ演算)的数据流分析类型系统,该系统具备可靠性。该类型系统通过局部分析,收集各程序点处变量的使用信息及别名信息。