Region-based type systems are a powerful tool for various kinds of program analysis. We introduce a new inference algorithm for region types based on an abstract notion of environment transformation. It analyzes the code of a method only once, even when there are multiple invocations of the method of different region types in the program. Elements of such an abstract transformation are essentially constraints for equality and subtyping that capture flow information of the program. In particular, we work with access graphs in the definition of abstract transformations to guarantee the termination of the inference algorithm, because they provide a finite representation of field access paths.
翻译:基于区域类型系统是各种程序分析的有力工具。 我们引入基于抽象环境变换概念的区域类型新推论算法。 它只分析一次方法代码, 即便在程序内多次引用不同区域类型的方法。 这种抽象变换的要素基本上是平等的限制, 也是获取程序流动信息的亚型。 特别是, 我们在抽象变换定义中使用访问图, 以保证终止推论算法, 因为它们提供了有限的实地访问路径 。