English

A metalanguage for cost-aware denotational semantics

Programming Languages 2022-09-27 v1

Abstract

We present two metalanguages for developing synthetic cost-aware denotational semantics\textit{synthetic cost-aware denotational semantics} of programming languages. Extending the recent work of Niu et al. [2022] on calf\textbf{calf}, a dependent type theory for both cost and behavioral verification, we define two metalanguages, calf\textbf{calf}^\star and calfω\textbf{calf}^\omega, for studying cost-aware metatheory. calf\textbf{calf}^\star is an extension of calf\textbf{calf} with universes and inductive types, and calfω\textbf{calf}^\omega is a an extension of calf\textbf{calf}^\star with unbounded iteration. We construct denotational models of the simply-typed lambda calculus and Modernized Algol, a language with first-order store and while loops, and show that they satisfy a cost-aware\textit{cost-aware} generalization of the classic Plotkin-type computational adequacy theorem. Moreover, by developing our proofs in a synthetic language of phase-separated\textit{phase-separated} constructions of intension and extension, our results easily restrict\textit{restrict} to the corresponding extensional theorems. Our work provides a positive answer to the conjecture raised in Niu et al. [2022] and in light of op. cit.\textit{op. cit.}'s work on algorithm analysis, contributes a metalanguage for doing both cost-aware programming and verification and cost-aware metatheory of programming languages.

Keywords

Cite

@article{arxiv.2209.12669,
  title  = {A metalanguage for cost-aware denotational semantics},
  author = {Yue Niu and Robert Harper},
  journal= {arXiv preprint arXiv:2209.12669},
  year   = {2022}
}
R2 v1 2026-06-28T02:06:21.969Z