We introduce a novel amortised resource analysis couched in a type-and-effect system. Our analysis is formulated in terms of the physicist's method of amortised analysis, and is potential-based. The type system makes use of logarithmic potential functions and is the first such system to exhibit *logarithmic amortised complexity*. With our approach we target the automated analysis of self-adjusting data structures, like splay trees, which so far have only manually been analysed in the literature. In particular, we have implemented a semi-automated prototype, which successfully analyses the zig-zig case of *splaying*, once the type annotations are fixed.
翻译:我们引入了一种新型的摊还资源分析,这种分析以类型和效果系统的形式出现。我们的分析是以物理学家的摊还分析方法为基础,并以潜在为基础。类型系统利用了对数潜在功能,是第一个展示“对数摊还复杂性*”的系统。我们采用的方法是自动分析自我调整的数据结构,如编剧树,到目前为止,文献中只对这种结构进行了手工分析。特别是,我们实施了半自动原型,一旦类型说明固定下来,即可成功分析“*播放”的zig-zig案例。