arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 1312.0694cs.PL
收藏

渐进类型化的单调引用

Monotonic References for Gradual Typing

Jeremy G. Siek, Michael M. Vitousek

摘要:

我们描述了一种处理可变引用的替代方法(又名。指针)在逐渐类型化的语言中具有与Herman等人[2010]的先前方法不同的效率特征。特别是,我们通过静态类型代码区域中的引用降低了读写成本。我们将成本降低到与静态类型语言中的成本相同,也就是说,只是加载或存储指令的成本(对于基本数据类型)。这种成本的降低对于那些希望使用渐进类型来促进从算法的动态类型原型到静态类型的高性能实现的过渡的程序员来说尤其重要。我们心目中的程序员是科学家和工程师,他们目前在Matlab中进行原型设计,然后手动将他们的算法翻译成Fortran。我们提出了静态和动态的可变引用和类型安全的机械化证明使用伊莎贝尔证明助手的语义。

英文摘要:

We describe an alternative approach to handling mutable references (aka. pointers) within a gradually typed language that has different efficiency characteristics than the prior approach of Herman et al. [2010]. In particular, we reduce the costs of reading and writing through references in statically typed regions of code. We reduce the costs to be the same as they would in a statically typed language, that is, simply the cost of a load or store instruction (for primitive data types). This reduction in cost is especially important for programmers who would like to use gradual typing to facilitate transitioning from a dynamically-typed prototype of an algorithm to a statically-typed, high-performance implementation. The programmers we have in mind are scientists and engineers who currently prototype in Matlab and then manually translate their algorithms into Fortran. We present the static and dynamic semantics for mutable references and a mechanized proof of type safety using the Isabelle proof assistant.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑