arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 1802.06653cs.PLcs.LO
收藏

基于类型的面向对象程序复杂性分析

A Type-Based Complexity Analysis of Object Oriented Programs

Emmanuel Hainry, Romain Péchoux

摘要:

介绍了一种面向对象的通用程序设计语言的类型系统,以推断资源上界。得到了多项式时间可计算函数集的一个可靠而完整的刻画。因此,类型化程序的堆空间和栈空间需求也是多项式有界的。这种类型系统的灵感来自于以前关于隐式计算复杂性的工作,使用分层和非干扰技术。所提出的方法有几个优点。首先,它为程序员提供了显式的大$O$多项式上界,因此它的使用可以允许程序员避免内存错误;其次,类型检查在多项式时间内是可判定的。最后,它具有良好的表达能力,因为它分析了大多数面向对象的特性,如继承,重载,重写和递归。此外,它可以处理由对象保护的循环,也可以扩展到改变控制流的语句,如break或return。

英文摘要:

A type system is introduced for a generic Object Oriented programming language in order to infer resource upper bounds. A sound andcomplete characterization of the set of polynomial time computable functions is obtained. As a consequence, the heap-space and thestack-space requirements of typed programs are also bounded polynomially. This type system is inspired by previous works on ImplicitComputational Complexity, using tiering and non-interference techniques. The presented methodology has several advantages. First, itprovides explicit big $O$ polynomial upper bounds to the programmer, hence its use could allow the programmer to avoid memory errors.Second, type checking is decidable in polynomial time. Last, it has a good expressivity since it analyzes most object oriented featureslike inheritance, overload, override and recursion. Moreover it can deal with loops guarded by objects and can also be extended tostatements that alter the control flow like break or return.

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

↑