We show that recent approaches of static analysis based on quantitative typing systems can be extended to programming languages with global state. More precisely, we define a call-by-value language equipped with operations to access a global memory, together with a semantic model based on a (tight) multi-type system that captures exact measures of time and space related to evaluation of programs. We show that the type system is quantitatively sound and complete with respect to the original operational semantics of the language.
翻译:我们展示了最近基于定量类型系统的静态分析方法可以扩展到具有全局状态的编程语言。更具体地,我们定义了一种调用值语言,配备了访问全局记忆的操作,以及基于(紧密的)多类型系统的语义模型,该系统捕捉与程序评估相关的精确时间和空间度量。我们证明了该类型系统在原始语言的操作语义方面是量化的完整的和准确的。