Polynomial Size Analysis of First-Order Shapely Functions
Polynomial Size Analysis of First-Order Shapely Functions
复制标题
一阶 Shapely 函数的多项式大小分析
DOI:
--
复制
发表时间:
2009
期刊:
影响因子:
--
通讯作者:
R. V. Kesteren
中科院分区:
文献类型:
--
作者:
O. Shkaravska;M. V. Eekelen;R. V. Kesteren
A b s t r a c t . We present a size-aware type system for first-order shapely function defini tions. Here, a function definition is called shapely when the size of the result is determined exactly by a polynomial in the sizes of the arguments. Examples of shapely function defi nitions may be implementations of matrix multiplication and the Cartesian product of two lists. The type system is proved to be sound w.r.t. the operational semantics of the language. The type checking problem is shown to be undecidable in general. We define a natural syntactic restriction such that the type checking becomes decidable, even though size polynomials are not necessarily linear or monotonic. Furthermore, we have shown that the type-inference problem is at least semi-decidable (under this restriction). We have implemented a procedure that combines run-time testing and type-checking to automatically obtain size dependencies. It terminates on total typable function definitions.