We gratefully acknowledge support from
the Simons Foundation and member institutions.
Full-text links:

Download:

Current browse context:

cs.PL

Change to browse by:

cs

References & Citations

DBLP - CS Bibliography

Bookmark

(what is this?)
CiteULike logo BibSonomy logo Mendeley logo del.icio.us logo Digg logo Reddit logo

Computer Science > Programming Languages

Title: Denotational semantics as a foundation for cost recurrence extraction for functional languages

Abstract: A standard informal method for analyzing the asymptotic complexity of a program is to extract a recurrence that describes its cost in terms of the size of 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 a higher-order language with let-polymorphism. The method consists of two phases. In the first phase, a monadic translation is performed to extract a cost-annotated version of the original program. In the second phase, the extracted program is interpreted in a model. The key feature of this second phase is that different models describe different notions of size. This plays out in several ways. For example, when analyzing functions that take arguments of inductive types, different notions of size may be appropriate depending on the analysis. When analyzing polymorphic functions, our approach shows that one can formally describe the notion of size of an argument in terms of the data that is common to the notions of size for each type instance of the domain type. We give several examples of different models that formally justify various informal cost analyses to show the applicability of our approach.
Comments: Revisions, mostly minor, some more discussion of related work. To appear in Journal of Functional Programming
Subjects: Programming Languages (cs.PL)
ACM classes: F.3.2
Journal reference: Journal of Functional Programming 32, 2022
DOI: 10.1017/S095679682200003X
Cite as: arXiv:2002.07262 [cs.PL]
  (or arXiv:2002.07262v3 [cs.PL] for this version)

Submission history

From: Norman Danner [view email]
[v1] Mon, 17 Feb 2020 21:36:38 GMT (88kb)
[v2] Thu, 4 Mar 2021 14:18:57 GMT (762kb,D)
[v3] Fri, 20 May 2022 15:50:23 GMT (105kb)

Link back to: arXiv, form interface, contact.