谷歌浏览器插件
订阅小程序
在清言上使用

Denotational Semantics As a Foundation for Cost Recurrence Extraction for Functional Languages

Journal of functional programming(2022)

引用 2|浏览55
暂无评分
摘要
A standard informal method for analyzing the asymptotic complexity of aprogram is to extract a recurrence that describes its cost in terms of the sizeof its input, and then to compute a closed-form upper bound on that recurrence.We give a formal account of that method for functional programs in ahigher-order language with let-polymorphism. The method consists of two phases.In the first phase, a monadic translation is performed to extract acost-annotated version of the original program. In the second phase, theextracted program is interpreted in a model. The key feature of this secondphase is that different models describe different notions of size. This playsout in several ways. For example, when analyzing functions that take argumentsof inductive types, different notions of size may be appropriate depending onthe analysis. When analyzing polymorphic functions, our approach shows that onecan formally describe the notion of size of an argument in terms of the datathat is common to the notions of size for each type instance of the domaintype. We give several examples of different models that formally justifyvarious informal cost analyses to show the applicability of our approach.
更多
查看译文
关键词
Programming Language Semantics,Abstract Interpretation,Source Code Analysis,Temporal Logic,Refactoring
AI 理解论文
溯源树
样例
生成溯源树,研究论文发展脉络
Chat Paper
正在生成论文摘要