<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" href="/default.xsl"?>
<fr:tree xmlns:fr="http://www.forester-notes.org" xmlns:html="http://www.w3.org/1999/xhtml" xmlns:xml="http://www.w3.org/XML/1998/namespace" root="false" base-url="/">
  <fr:frontmatter>
    <fr:authors />
    <fr:uri>https://calfproject.github.io/hgrodin/</fr:uri>
    <fr:display-uri>hgrodin</fr:display-uri>
    <fr:route>/hgrodin/</fr:route>
    <fr:title text="Harrison Grodin">Harrison Grodin</fr:title>
    <fr:taxon>Person</fr:taxon>
    <fr:meta name="external">https://www.harrisongrodin.com</fr:meta>
    <fr:meta name="institution">
      <fr:link href="/cmu/" title="Carnegie Mellon University" uri="https://calfproject.github.io/cmu/" display-uri="cmu" type="local">Carnegie Mellon University</fr:link>
    </fr:meta>
    <fr:meta name="orcid">0000-0002-0947-3520</fr:meta>
    <fr:meta name="position">Ph.D. Student</fr:meta>
  </fr:frontmatter>
  <fr:mainmatter>
    <html:p>Harrison Grodin is a fourth-year Ph.D. student in the Principles of Programming group in the Computer Science Department at Carnegie Mellon University, advised by <fr:link href="/rwh/" title="Robert Harper" uri="https://calfproject.github.io/rwh/" display-uri="rwh" type="local">Robert Harper</fr:link>. His research is on programming language semantics, drawing inspiration from ideas in type theory and category theory.</html:p>
  </fr:mainmatter>
  <fr:backmatter>
    <fr:tree show-metadata="false" hidden-when-empty="true">
      <fr:frontmatter>
        <fr:authors />
        <fr:title text="References">References</fr:title>
      </fr:frontmatter>
      <fr:mainmatter />
    </fr:tree>
    <fr:tree show-metadata="false" hidden-when-empty="true">
      <fr:frontmatter>
        <fr:authors />
        <fr:title text="Context">Context</fr:title>
      </fr:frontmatter>
      <fr:mainmatter>
        <fr:tree show-metadata="true" expanded="false" toc="false" numbered="false">
          <fr:frontmatter>
            <fr:authors />
            <fr:uri>https://calfproject.github.io/team-phd-current/</fr:uri>
            <fr:display-uri>team-phd-current</fr:display-uri>
            <fr:route>/team-phd-current/</fr:route>
            <fr:title text="Current Ph.D. Students">Current Ph.D. Students</fr:title>
            <fr:taxon>Team</fr:taxon>
          </fr:frontmatter>
          <fr:mainmatter>
            <fr:tree show-metadata="true" expanded="false">
              <fr:frontmatter>
                <fr:authors />
                <fr:uri>https://calfproject.github.io/hgrodin/</fr:uri>
                <fr:display-uri>hgrodin</fr:display-uri>
                <fr:route>/hgrodin/</fr:route>
                <fr:title text="Harrison Grodin">Harrison Grodin</fr:title>
                <fr:taxon>Person</fr:taxon>
                <fr:meta name="external">https://www.harrisongrodin.com</fr:meta>
                <fr:meta name="institution">
                  <fr:link href="/cmu/" title="Carnegie Mellon University" uri="https://calfproject.github.io/cmu/" display-uri="cmu" type="local">Carnegie Mellon University</fr:link>
                </fr:meta>
                <fr:meta name="orcid">0000-0002-0947-3520</fr:meta>
                <fr:meta name="position">Ph.D. Student</fr:meta>
              </fr:frontmatter>
              <fr:mainmatter>
                <html:p>Harrison Grodin is a fourth-year Ph.D. student in the Principles of Programming group in the Computer Science Department at Carnegie Mellon University, advised by <fr:link href="/rwh/" title="Robert Harper" uri="https://calfproject.github.io/rwh/" display-uri="rwh" type="local">Robert Harper</fr:link>. His research is on programming language semantics, drawing inspiration from ideas in type theory and category theory.</html:p>
              </fr:mainmatter>
            </fr:tree>
            <fr:tree show-metadata="true" expanded="false">
              <fr:frontmatter>
                <fr:authors />
                <fr:uri>https://calfproject.github.io/runmingl/</fr:uri>
                <fr:display-uri>runmingl</fr:display-uri>
                <fr:route>/runmingl/</fr:route>
                <fr:title text="Runming Li">Runming Li</fr:title>
                <fr:taxon>Person</fr:taxon>
                <fr:meta name="external">https://www.cs.cmu.edu/~runmingl/</fr:meta>
                <fr:meta name="institution">
                  <fr:link href="/cmu/" title="Carnegie Mellon University" uri="https://calfproject.github.io/cmu/" display-uri="cmu" type="local">Carnegie Mellon University</fr:link>
                </fr:meta>
                <fr:meta name="orcid">0000-0001-7600-9069</fr:meta>
                <fr:meta name="position">Ph.D. Student</fr:meta>
              </fr:frontmatter>
              <fr:mainmatter>
                <html:p>Runming Li is a second-year Ph.D. student in the Computer Science Department at Carnegie Mellon University, advised by Prof. <fr:link href="/rwh/" title="Robert Harper" uri="https://calfproject.github.io/rwh/" display-uri="rwh" type="local">Robert Harper</fr:link>. He studies semantics of programming languages from the perspectives of (dependent) type theory and category theory. More broadly, he is interested in the design and implementation of functional programming languages and proof assistants that facilitate the construction and verification of correct and efficient programs.</html:p>
              </fr:mainmatter>
            </fr:tree>
            <fr:tree show-metadata="true" expanded="false">
              <fr:frontmatter>
                <fr:authors />
                <fr:uri>https://calfproject.github.io/ethanchu/</fr:uri>
                <fr:display-uri>ethanchu</fr:display-uri>
                <fr:route>/ethanchu/</fr:route>
                <fr:title text="Ethan Chu">Ethan Chu</fr:title>
                <fr:taxon>Person</fr:taxon>
                <fr:meta name="external">https://gediminas19.github.io</fr:meta>
                <fr:meta name="institution">
                  <fr:link href="/cmu/" title="Carnegie Mellon University" uri="https://calfproject.github.io/cmu/" display-uri="cmu" type="local">Carnegie Mellon University</fr:link>
                </fr:meta>
                <fr:meta name="orcid">0009-0005-6041-0313</fr:meta>
                <fr:meta name="position">Ph.D. Student</fr:meta>
              </fr:frontmatter>
              <fr:mainmatter>
                <html:p>Ethan Chu is a 2nd-year PhD student in the Principles of Programming (PoP) group in Carnegie Mellon University’s Computer Science Department (CMU CSD), advised by <fr:link href="/janh/" title="Jan Hoffmann" uri="https://calfproject.github.io/janh/" display-uri="janh" type="local">Jan Hoffmann</fr:link>. His research areas are programming languages and verification, with a focus on type systems and static resource analysis of programs.</html:p>
              </fr:mainmatter>
            </fr:tree>
          </fr:mainmatter>
        </fr:tree>
      </fr:mainmatter>
    </fr:tree>
    <fr:tree show-metadata="false" hidden-when-empty="true">
      <fr:frontmatter>
        <fr:authors />
        <fr:title text="Backlinks">Backlinks</fr:title>
      </fr:frontmatter>
      <fr:mainmatter />
    </fr:tree>
    <fr:tree show-metadata="false" hidden-when-empty="true">
      <fr:frontmatter>
        <fr:authors />
        <fr:title text="Related">Related</fr:title>
      </fr:frontmatter>
      <fr:mainmatter>
        <fr:tree show-metadata="true" expanded="false" toc="false" numbered="false">
          <fr:frontmatter>
            <fr:authors />
            <fr:uri>https://calfproject.github.io/cmu/</fr:uri>
            <fr:display-uri>cmu</fr:display-uri>
            <fr:route>/cmu/</fr:route>
            <fr:title text="Carnegie Mellon University">Carnegie Mellon University</fr:title>
            <fr:taxon>Institution</fr:taxon>
            <fr:meta name="external">https://www.cmu.edu/</fr:meta>
            <fr:meta name="location">Pittsburgh, PA, USA</fr:meta>
          </fr:frontmatter>
          <fr:mainmatter />
        </fr:tree>
        <fr:tree show-metadata="true" expanded="false" toc="false" numbered="false">
          <fr:frontmatter>
            <fr:authors />
            <fr:uri>https://calfproject.github.io/rwh/</fr:uri>
            <fr:display-uri>rwh</fr:display-uri>
            <fr:route>/rwh/</fr:route>
            <fr:title text="Robert Harper">Robert Harper</fr:title>
            <fr:taxon>Person</fr:taxon>
            <fr:meta name="external">https://www.cs.cmu.edu/~rwh/</fr:meta>
            <fr:meta name="institution">
              <fr:link href="/cmu/" title="Carnegie Mellon University" uri="https://calfproject.github.io/cmu/" display-uri="cmu" type="local">Carnegie Mellon University</fr:link>
            </fr:meta>
            <fr:meta name="orcid">0000-0002-9400-2941</fr:meta>
            <fr:meta name="position">Professor</fr:meta>
          </fr:frontmatter>
          <fr:mainmatter>
            <html:p />
          </fr:mainmatter>
        </fr:tree>
      </fr:mainmatter>
    </fr:tree>
    <fr:tree show-metadata="false" hidden-when-empty="true">
      <fr:frontmatter>
        <fr:authors />
        <fr:title text="Contributions">Contributions</fr:title>
      </fr:frontmatter>
      <fr:mainmatter>
        <fr:tree show-metadata="true" expanded="false" toc="false" numbered="false">
          <fr:frontmatter>
            <fr:authors>
              <fr:author>
                <fr:link href="/yuen/" title="Yue Niu" uri="https://calfproject.github.io/yuen/" display-uri="yuen" type="local">Yue Niu</fr:link>
              </fr:author>
              <fr:author>
                <fr:link href="/jmsterling/" title="Jon Sterling" uri="https://calfproject.github.io/jmsterling/" display-uri="jmsterling" type="local">Jon Sterling</fr:link>
              </fr:author>
              <fr:author>
                <fr:link href="/hgrodin/" title="Harrison Grodin" uri="https://calfproject.github.io/hgrodin/" display-uri="hgrodin" type="local">Harrison Grodin</fr:link>
              </fr:author>
              <fr:author>
                <fr:link href="/rwh/" title="Robert Harper" uri="https://calfproject.github.io/rwh/" display-uri="rwh" type="local">Robert Harper</fr:link>
              </fr:author>
            </fr:authors>
            <fr:uri>https://calfproject.github.io/niu-sterling-grodin-harper-2022/</fr:uri>
            <fr:display-uri>niu-sterling-grodin-harper-2022</fr:display-uri>
            <fr:route>/niu-sterling-grodin-harper-2022/</fr:route>
            <fr:title text="A Cost-Aware Logical Framework">A Cost-Aware Logical Framework</fr:title>
            <fr:taxon>Reference</fr:taxon>
            <fr:meta name="venue">
              <fr:link href="/popl22/" title="POPL ’22: 49th ACM SIGPLAN Symposium on Principles of Programming Languages" uri="https://calfproject.github.io/popl22/" display-uri="popl22" type="local">POPL ’22: 49th ACM SIGPLAN Symposium on Principles of Programming Languages</fr:link>
            </fr:meta>
            <fr:meta name="doi">10.1145/3498670</fr:meta>
            <fr:meta name="bibtex"><![CDATA[@article{niu-sterling-grodin-harper>2022,
  title        = {A Cost-Aware Logical Framework},
  author       = {Niu, Yue and Sterling, Jonathan and Grodin, Harrison and Harper, Robert},
  year         = {2022},
  month        = jan,
  journal      = {Proc. ACM Program. Lang.},
  publisher    = {Association for Computing Machinery},
  address      = {New York, NY, USA},
  volume       = {6},
  number       = {POPL},
  doi          = {10.1145/3498670},
  url          = {https://doi.org/10.1145/3498670},
  issue_date   = {January 2022},
  articleno    = {9},
  numpages     = {31},
  keywords     = {algorithm analysis, amortized analysis, behavioral verification, cost models, equational reasoning, intensional property, mechanized proof, modal type theory, noninterference, parallel algorithms, phase distinction, proof assistants, recurrence relations}
}]]></fr:meta>
          </fr:frontmatter>
          <fr:mainmatter>
            <html:p>
  We present Calf, a cost-aware logical framework for studying quantitative aspects of functional programs. Taking inspiration from recent work that reconstructs traditional aspects of programming languages in terms of a modal account of phase distinctions, we argue that the cost structure of programs motivates a phase distinction between intension and extension. Armed with this technology, we contribute a synthetic account of cost structure as a computational effect in which cost-aware programs enjoy an internal noninterference property: input/output behavior cannot depend on cost. As a full-spectrum dependent type theory, Calf presents a unified language for programming and specification of both cost and behavior that can be integrated smoothly with existing mathematical libraries available in type theoretic proof assistants.
</html:p>
            <html:p>
  We evaluate Calf as a general framework for cost analysis by implementing two fundamental techniques for algorithm analysis: the method of recurrence relations and physicist’s method for amortized analysis. We deploy these techniques on a variety of case studies: we prove a tight, closed bound for Euclid’s algorithm, verify the amortized complexity of batched queues, and derive tight, closed bounds for the sequential and parallel complexity of merge sort, all fully mechanized in the Agda proof assistant. Lastly we substantiate the soundness of quantitative reasoning in Calf by means of a model construction.
</html:p>
          </fr:mainmatter>
        </fr:tree>
        <fr:tree show-metadata="true" expanded="false" toc="false" numbered="false">
          <fr:frontmatter>
            <fr:authors>
              <fr:author>
                <fr:link href="/runmingl/" title="Runming Li" uri="https://calfproject.github.io/runmingl/" display-uri="runmingl" type="local">Runming Li</fr:link>
              </fr:author>
              <fr:author>
                <fr:link href="/hgrodin/" title="Harrison Grodin" uri="https://calfproject.github.io/hgrodin/" display-uri="hgrodin" type="local">Harrison Grodin</fr:link>
              </fr:author>
              <fr:author>
                <fr:link href="/rwh/" title="Robert Harper" uri="https://calfproject.github.io/rwh/" display-uri="rwh" type="local">Robert Harper</fr:link>
              </fr:author>
            </fr:authors>
            <fr:uri>https://calfproject.github.io/li-grodin-harper-2023/</fr:uri>
            <fr:display-uri>li-grodin-harper-2023</fr:display-uri>
            <fr:route>/li-grodin-harper-2023/</fr:route>
            <fr:title text="A Verified Cost Analysis of Joinable Red-Black Trees">A Verified Cost Analysis of Joinable Red-Black Trees</fr:title>
            <fr:taxon>Reference</fr:taxon>
            <fr:meta name="venue">Manuscript</fr:meta>
            <fr:meta name="doi">10.48550/arXiv.2309.11056</fr:meta>
            <fr:meta name="bibtex"><![CDATA[@misc{li-grodin-harper>2023,
  title        = {A Verified Cost Analysis of Joinable Red-Black Trees},
  author       = {Runming Li and Harrison Grodin and Robert Harper},
  year         = {2023},
  url          = {https://arxiv.org/abs/2309.11056},
  eprint       = {2309.11056},
  archiveprefix = {arXiv},
  primaryclass = {cs.PL}
}]]></fr:meta>
          </fr:frontmatter>
          <fr:mainmatter>
            <html:p>
Ordered sequences of data, specified with a join operation to combine sequences, serve as a foundation for the implementation of parallel functional algorithms. This abstract data type can be elegantly and efficiently implemented using balanced binary trees, where a join operation is provided to combine two trees and rebalance as necessary. In this work, we present a verified implementation and cost analysis of joinable red-black trees in Calf, a dependent type theory for cost analysis. We implement red-black trees and auxiliary intermediate data structures in such a way that all correctness invariants are intrinsically maintained. Then, we describe and verify precise cost bounds on the operations, making use of the red-black tree invariants. Finally, we implement standard algorithms on sequences using the simple join-based signature and bound their cost in the case that red-black trees are used as the underlying implementation. All proofs are formally mechanized using the embedding of Calf in the Agda theorem prover.
</html:p>
          </fr:mainmatter>
        </fr:tree>
        <fr:tree show-metadata="true" expanded="false" toc="false" numbered="false">
          <fr:frontmatter>
            <fr:authors>
              <fr:author>
                <fr:link href="/hgrodin/" title="Harrison Grodin" uri="https://calfproject.github.io/hgrodin/" display-uri="hgrodin" type="local">Harrison Grodin</fr:link>
              </fr:author>
              <fr:author>
                <fr:link href="/runmingl/" title="Runming Li" uri="https://calfproject.github.io/runmingl/" display-uri="runmingl" type="local">Runming Li</fr:link>
              </fr:author>
              <fr:author>
                <fr:link href="/rwh/" title="Robert Harper" uri="https://calfproject.github.io/rwh/" display-uri="rwh" type="local">Robert Harper</fr:link>
              </fr:author>
            </fr:authors>
            <fr:uri>https://calfproject.github.io/grodin-li-harper-2026/</fr:uri>
            <fr:display-uri>grodin-li-harper-2026</fr:display-uri>
            <fr:route>/grodin-li-harper-2026/</fr:route>
            <fr:title text="Abstraction Functions as Types: Modular Verification of Cost and Behavior in Dependent Type Theory">Abstraction Functions as Types: Modular Verification of Cost and Behavior in Dependent Type Theory</fr:title>
            <fr:taxon>Reference</fr:taxon>
            <fr:meta name="venue">
              <fr:link href="/popl26/" title="POPL ’26: 53rd ACM SIGPLAN Symposium on Principles of Programming Languages" uri="https://calfproject.github.io/popl26/" display-uri="popl26" type="local">POPL ’26: 53rd ACM SIGPLAN Symposium on Principles of Programming Languages</fr:link>
            </fr:meta>
            <fr:meta name="doi">10.1145/3776673</fr:meta>
            <fr:meta name="bibtex"><![CDATA[@article{grodin-li-harper>2026,
  title        = {Abstraction Functions as Types: Modular Verification of Cost and Behavior in Dependent Type Theory},
  author       = {Grodin, Harrison and Li, Runming and Harper, Robert},
  year         = 2026,
  month        = jan,
  journal      = {Proc. ACM Program. Lang.},
  publisher    = {Association for Computing Machinery},
  address      = {New York, NY, USA},
  volume       = 10,
  number       = {POPL},
  doi          = {10.1145/3776673},
  url          = {https://doi.org/10.1145/3776673},
  issue_date   = {January 2026},
  articleno    = 31,
  numpages     = 28,
  keywords     = {abstract data type, abstraction, abstraction function, algorithm, algorithm analysis, call-by-push-value, concrete type, cost analysis, data structure, dependent type theory, equational reasoning, information flow, modal type theory, modularity, noninterference, phase distinction, verification}
}]]></fr:meta>
          </fr:frontmatter>
          <fr:mainmatter>
            <html:p>
  Software development depends on the use of libraries whose public specifications inform client code and
impose obligations on private implementations; it follows that verification at scale must also be modular,
preserving such abstraction. Hoare’s influential methodology uses abstraction functions to demonstrate the
coherence between such concrete implementations and their abstract specifications. However, the Hoare
methodology relies on a conventional separation between implementation and specification, providing no
linguistic support for ensuring that this convention is obeyed.
</html:p>
            <html:p>
This paper proposes a synthetic account of Hoare’s methodology within univalent dependent type theory
by encoding the data of abstraction functions within types themselves. This is achieved via a phase distinction,
which gives rise to a gluing construction that renders an abstraction function as a type and a pair of modalities
that fracture a type into its concrete and abstract parts. A noninterference theorem governing the phase
distinction characterizes the modularity guarantees provided by the theory.
</html:p>
            <html:p>
This approach scales to verification of cost, allowing the analysis of client cost relative to a cost-aware
specification. A monadic sealing effect facilitates modularity of cost, permitting an implementation to be
upper-bounded by its specification in cases where private details influence observable cost. The resulting
theory supports modular development of programs and proofs in a manner that hides private details of no
concern to clients while permitting precise specifications of both the cost and behavior of programs.
</html:p>
          </fr:mainmatter>
        </fr:tree>
        <fr:tree show-metadata="true" expanded="false" toc="false" numbered="false">
          <fr:frontmatter>
            <fr:authors>
              <fr:author>
                <fr:link href="/hgrodin/" title="Harrison Grodin" uri="https://calfproject.github.io/hgrodin/" display-uri="hgrodin" type="local">Harrison Grodin</fr:link>
              </fr:author>
              <fr:author>
                <fr:link href="/rwh/" title="Robert Harper" uri="https://calfproject.github.io/rwh/" display-uri="rwh" type="local">Robert Harper</fr:link>
              </fr:author>
            </fr:authors>
            <fr:uri>https://calfproject.github.io/grodin-harper-2024/</fr:uri>
            <fr:display-uri>grodin-harper-2024</fr:display-uri>
            <fr:route>/grodin-harper-2024/</fr:route>
            <fr:title text="Amortized Analysis via Coalgebra">Amortized Analysis via Coalgebra</fr:title>
            <fr:taxon>Reference</fr:taxon>
            <fr:meta name="venue">
              <fr:link href="/mfps24/" title="MFPS '24: 40th Conference on Mathematical Foundations of Programming Semantics" uri="https://calfproject.github.io/mfps24/" display-uri="mfps24" type="local">MFPS '24: 40th Conference on Mathematical Foundations of Programming Semantics</fr:link>
            </fr:meta>
            <fr:meta name="doi">10.46298/entics.14797</fr:meta>
            <fr:meta name="bibtex"><![CDATA[@article{grodin-harper>2024,
  title        = {Amortized Analysis via Coalgebra},
  author       = {Harrison Grodin and Robert Harper},
  year         = {2024},
  month        = {Dec},
  journal      = {Electronic Notes in Theoretical Informatics and Computer Science},
  volume       = {Volume 4 - Proceedings of MFPS XL},
  doi          = {10.46298/entics.14797},
  issn         = {2969-2431},
  url          = {https://entics.episciences.org/14797},
  eid          = {10},
  keywords     = {Computer Science - Programming Languages, Computer Science - Data Structures and Algorithms, Mathematics - Category Theory}
}]]></fr:meta>
          </fr:frontmatter>
          <fr:mainmatter>
            <html:p>
  Amortized analysis is a cost analysis technique for data structures in which cost is studied in aggregate: rather than considering the maximum cost of a single operation, one bounds the total cost encountered throughout a session.
  Traditionally, amortized analysis has been phrased inductively, quantifying over finite sequences of operations. Connecting to prior work on coalgebraic semantics for data structures, we develop the alternative perspective that amortized analysis is naturally viewed coalgebraically in a category of cost algebras, where a morphism of coalgebras serves as a first-class generalization of potential function suitable for integrating cost and behavior. Using this simple definition, we consider amortization of other sample effects, non-commutative printing and randomization. To support imprecise amortized upper bounds, we adapt our discussion to the bicategorical setting, where a potential function is a colax morphism of coalgebras. We support algebraic and coalgebraic operations simultaneously by using coalgebras for an endoprofunctor instead of an endofunctor, combining potential using a monoidal structure on the underlying category. Finally, we compose amortization arguments in the indexed category of coalgebras to implement one amortized data structure in terms of others.
</html:p>
          </fr:mainmatter>
        </fr:tree>
        <fr:tree show-metadata="true" expanded="false" toc="false" numbered="false">
          <fr:frontmatter>
            <fr:authors>
              <fr:author>
                <fr:link href="/hgrodin/" title="Harrison Grodin" uri="https://calfproject.github.io/hgrodin/" display-uri="hgrodin" type="local">Harrison Grodin</fr:link>
              </fr:author>
              <fr:author>
                <fr:link href="/rwh/" title="Robert Harper" uri="https://calfproject.github.io/rwh/" display-uri="rwh" type="local">Robert Harper</fr:link>
              </fr:author>
            </fr:authors>
            <fr:uri>https://calfproject.github.io/grodin-harper-2023/</fr:uri>
            <fr:display-uri>grodin-harper-2023</fr:display-uri>
            <fr:route>/grodin-harper-2023/</fr:route>
            <fr:title text="Amortized Analysis via Coinduction">Amortized Analysis via Coinduction</fr:title>
            <fr:taxon>Reference</fr:taxon>
            <fr:meta name="venue">
              <fr:link href="/calco23/" title="CALCO '23: 10th Conference on Algebra and Coalgebra in Computer Science (CALCO 2023)" uri="https://calfproject.github.io/calco23/" display-uri="calco23" type="local">CALCO '23: 10th Conference on Algebra and Coalgebra in Computer Science (CALCO 2023)</fr:link>
            </fr:meta>
            <fr:meta name="doi">10.4230/LIPIcs.CALCO.2023.23</fr:meta>
            <fr:meta name="bibtex"><![CDATA[@inproceedings{grodin-harper>2023,
  title        = {{Amortized Analysis via Coinduction}},
  author       = {Grodin, Harrison and Harper, Robert},
  year         = {2023},
  booktitle    = {10th Conference on Algebra and Coalgebra in Computer Science (CALCO 2023)},
  publisher    = {Schloss Dagstuhl -- Leibniz-Zentrum f{\"u}r Informatik},
  address      = {Dagstuhl, Germany},
  series       = {Leibniz International Proceedings in Informatics (LIPIcs)},
  volume       = {270},
  pages        = {23:1--23:6},
  doi          = {10.4230/LIPIcs.CALCO.2023.23},
  isbn         = {978-3-95977-287-7},
  issn         = {1868-8969},
  url          = {https://drops.dagstuhl.de/entities/document/10.4230/LIPIcs.CALCO.2023.23},
  editor       = {Baldan, Paolo and de Paiva, Valeria},
  urn          = {urn:nbn:de:0030-drops-188201},
  annote       = {Keywords: amortized analysis, coinduction, data structure, mechanized proof}
}]]></fr:meta>
          </fr:frontmatter>
          <fr:mainmatter>
            <html:p>
  Amortized analysis is a program cost analysis technique for data structures in which the cost of operations is specified in aggregate, under the assumption of continued sequential use. Typically, amortized analyses are presented inductively, in terms of finite sequences of operations. We give an alternative coinductive formulation and prove that it is equivalent to the standard inductive definition. We describe a classic amortized data structure, the batched queue, and outline a coinductive proof of its amortized efficiency in Calf, a dependent type theory for cost analysis.
</html:p>
          </fr:mainmatter>
        </fr:tree>
        <fr:tree show-metadata="true" expanded="false" toc="false" numbered="false">
          <fr:frontmatter>
            <fr:authors>
              <fr:author>
                <fr:link href="/hgrodin/" title="Harrison Grodin" uri="https://calfproject.github.io/hgrodin/" display-uri="hgrodin" type="local">Harrison Grodin</fr:link>
              </fr:author>
              <fr:author>
                <fr:link href="/yuen/" title="Yue Niu" uri="https://calfproject.github.io/yuen/" display-uri="yuen" type="local">Yue Niu</fr:link>
              </fr:author>
              <fr:author>
                <fr:link href="/jmsterling/" title="Jon Sterling" uri="https://calfproject.github.io/jmsterling/" display-uri="jmsterling" type="local">Jon Sterling</fr:link>
              </fr:author>
              <fr:author>
                <fr:link href="/rwh/" title="Robert Harper" uri="https://calfproject.github.io/rwh/" display-uri="rwh" type="local">Robert Harper</fr:link>
              </fr:author>
            </fr:authors>
            <fr:uri>https://calfproject.github.io/grodin-niu-sterling-harper-2024/</fr:uri>
            <fr:display-uri>grodin-niu-sterling-harper-2024</fr:display-uri>
            <fr:route>/grodin-niu-sterling-harper-2024/</fr:route>
            <fr:title text="Decalf: A Directed, Effectful Cost-Aware Logical Framework">Decalf: A Directed, Effectful Cost-Aware Logical Framework</fr:title>
            <fr:taxon>Reference</fr:taxon>
            <fr:meta name="venue">
              <fr:link href="/popl24/" title="POPL ’24: 51st ACM SIGPLAN Symposium on Principles of Programming Languages" uri="https://calfproject.github.io/popl24/" display-uri="popl24" type="local">POPL ’24: 51st ACM SIGPLAN Symposium on Principles of Programming Languages</fr:link>
            </fr:meta>
            <fr:meta name="doi">10.1145/3632852</fr:meta>
            <fr:meta name="bibtex"><![CDATA[@article{grodin-niu-sterling-harper>2024,
  title        = {Decalf: A Directed, Effectful Cost-Aware Logical Framework},
  author       = {Grodin, Harrison and Niu, Yue and Sterling, Jonathan and Harper, Robert},
  year         = {2024},
  month        = jan,
  journal      = {Proc. ACM Program. Lang.},
  publisher    = {Association for Computing Machinery},
  address      = {New York, NY, USA},
  volume       = {8},
  number       = {POPL},
  doi          = {10.1145/3632852},
  url          = {https://doi.org/10.1145/3632852},
  issue_date   = {January 2024},
  articleno    = {10},
  numpages     = {29},
  keywords     = {algorithm analysis, cost models, phase distinction, noninterference, intensional property, behavioral verification, equational reasoning, modal type theory, mechanized proof, proof assistants, recurrence relations, amortized analysis, parallel algorithms}
}]]></fr:meta>
          </fr:frontmatter>
          <fr:mainmatter>
            <html:p>
  We present Decalf, a directed, eﬀectful cost-aware logical framework for studying quantitative aspects of
functional programs with eﬀects. Like Calf, the language is based on a formal phase distinction between the
extension and the intension of a program, its pure behavior as distinct from its cost measured by an eﬀectful
step-counting primitive. The type theory ensures that the behavior is unaﬀected by the cost accounting.
Unlike Calf, the present language takes account of eﬀects, such as probabilistic choice and mutable state. This
extension requires a reformulation of Calf’s approach to cost accounting: rather than rely on a “separable”
notion of cost, here a cost bound is simply another program. To make this formal, we equip every type with an
intrinsic preorder, relaxing the precise cost accounting intrinsic to a program to a looser but nevertheless
informative estimate. For example, the cost bound of a probabilistic program is itself a probabilistic program
that speciﬁes the distribution of costs. This approach serves as a streamlined alternative to the standard
method of isolating a cost recurrence and readily extends to higher-order, eﬀectful programs.
</html:p>
            <html:p>
  The development proceeds by ﬁrst introducing the Decalf type system, which is based on an intrinsic
ordering among terms that restricts in the extensional phase to extensional equality, but in the intensional
phase reﬂects an approximation of the cost of a program of interest. This formulation is then applied to a
number of illustrative examples, including pure and eﬀectful sorting algorithms, simple probabilistic programs,
and higher-order functions. Finally, we justify Decalf via a model in the topos of augmented simplicial sets.
</html:p>
          </fr:mainmatter>
        </fr:tree>
      </fr:mainmatter>
    </fr:tree>
  </fr:backmatter>
</fr:tree>
