The Move language provides abstractions for programming with digital assets via a mix of value semantics and reference semantics. Ensuring memory safety in programs with references that access a shared, mutable global ledger is difficult, yet essential for the use-cases targeted by Move. The language meets this challenge with a novel memory model and a modular, intraprocedural static reference safety analysis that leverages key properties of the memory. The analysis ensures the absence of memory safety violations in all Move programs (including ones that link against untrusted code) by running as part of a load-time bytecode verification pass similar to the JVM [12] and CLR [15]. We formalize the static analysis and prove that it enjoys three desirable properties: absence of dangling references, referential transparency for immutable references, and absence of memory leaks.
翻译:移动语言通过混合价值语义和参考语义来提供数字资产编程的抽象信息。 确保程序内的记忆安全性,其参考标准是很难获取共享、可变全球分类账的,但对于移动所针对的使用案例来说至关重要。语言通过一种新的记忆模型和模块化、程序内静态参考安全分析来应对这一挑战,这种分析利用了记忆的关键属性。分析确保在所有移动程序(包括那些与不受信任的代码相联系的程序)中,通过运行类似于 JVM [12] 和 CLR [15] 的负载时间字码核查通行证的一部分,确保了存储安全性。我们正式确定了静态分析,并证明它具有三种可取的特性:没有交替的参考,无法变换的引用的优先透明性,以及没有记忆漏漏。