<?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:author>
        <fr:link href="/michaeladams/" title="Michael D. Adams" uri="https://mustardfox.org/michaeladams/" display-uri="michaeladams" type="local">Michael D. Adams</fr:link>
      </fr:author>
      <fr:author>
        <fr:link href="/ericgriffis/" title="Eric Griffis" uri="https://mustardfox.org/ericgriffis/" display-uri="ericgriffis" type="local">Eric Griffis</fr:link>
      </fr:author>
      <fr:author>
        <fr:link href="/thomasporter/" title="Thomas J. Porter" uri="https://mustardfox.org/thomasporter/" display-uri="thomasporter" type="local">Thomas J. Porter</fr:link>
      </fr:author>
      <fr:author>
        <fr:link href="/vishnusatish/" title="Sundara Vishnu Satish" uri="https://mustardfox.org/vishnusatish/" display-uri="vishnusatish" type="local">Sundara Vishnu Satish</fr:link>
      </fr:author>
      <fr:author>
        <fr:link href="/ericczhao/" title="Eric Zhao" uri="https://mustardfox.org/ericczhao/" display-uri="ericczhao" type="local">Eric Zhao</fr:link>
      </fr:author>
      <fr:author>
        <fr:link href="/cyrusomar/" title="Cyrus Omar" uri="https://mustardfox.org/cyrusomar/" display-uri="cyrusomar" type="local">Cyrus Omar</fr:link>
      </fr:author>
    </fr:authors>
    <fr:date>
      <fr:year>2025</fr:year>
      <fr:month>1</fr:month>
      <fr:day>9</fr:day>
    </fr:date>
    <fr:uri>https://mustardfox.org/adams-et-al-2025/</fr:uri>
    <fr:display-uri>adams-et-al-2025</fr:display-uri>
    <fr:route>/adams-et-al-2025/</fr:route>
    <fr:title text="Grove: A Bidirectionally Typed Collaborative Structure Editor Calculus">Grove: A Bidirectionally Typed Collaborative Structure Editor Calculus</fr:title>
    <fr:taxon>reference</fr:taxon>
    <fr:meta name="venue">
      <fr:link href="/popl-2025/" title="POPL 2025" uri="https://mustardfox.org/popl-2025/" display-uri="popl-2025" type="local">POPL 2025</fr:link>
    </fr:meta>
    <fr:meta name="doi">10.1145/3704909</fr:meta>
    <fr:meta name="artifact">zzhaoe-000Q</fr:meta>
    <fr:meta name="pdf">/bafkrmigmhnqhc24zxmxphoaw3khagv6xahf4k23h6lzwiogafvjk6prgce.pdf</fr:meta>
    <fr:meta name="bibtex"><![CDATA[@article{adams2025a,
  author = {Adams, Michael D. and Griffis, Eric and Porter, Thomas J. and Satish, Sundara Vishnu and Zhao, Eric and Omar, Cyrus},
  title = {Grove: A Bidirectionally Typed Collaborative Structure Editor Calculus},
  year = {2025},
  issue_date = {January 2025},
  publisher = {Association for Computing Machinery},
  address = {New York, NY, USA},
  volume = {9},
  number = {POPL},
  url = {https://doi.org/10.1145/3704909},
  doi = {10.1145/3704909},
  journal = {Proc. ACM Program. Lang.},
  month = jan,
  articleno = {73},
  numpages = {29},
  keywords = {CRDTs, collaborative editing, gradual typing, version control systems}
}]]></fr:meta>
  </fr:frontmatter>
  <fr:mainmatter>
    <fr:tree show-metadata="false">
      <fr:frontmatter>
        <fr:authors>
          <fr:author>
            <fr:link href="/michaeladams/" title="Michael D. Adams" uri="https://mustardfox.org/michaeladams/" display-uri="michaeladams" type="local">Michael D. Adams</fr:link>
          </fr:author>
          <fr:author>
            <fr:link href="/ericgriffis/" title="Eric Griffis" uri="https://mustardfox.org/ericgriffis/" display-uri="ericgriffis" type="local">Eric Griffis</fr:link>
          </fr:author>
          <fr:author>
            <fr:link href="/thomasporter/" title="Thomas J. Porter" uri="https://mustardfox.org/thomasporter/" display-uri="thomasporter" type="local">Thomas J. Porter</fr:link>
          </fr:author>
          <fr:author>
            <fr:link href="/vishnusatish/" title="Sundara Vishnu Satish" uri="https://mustardfox.org/vishnusatish/" display-uri="vishnusatish" type="local">Sundara Vishnu Satish</fr:link>
          </fr:author>
          <fr:author>
            <fr:link href="/ericczhao/" title="Eric Zhao" uri="https://mustardfox.org/ericczhao/" display-uri="ericczhao" type="local">Eric Zhao</fr:link>
          </fr:author>
          <fr:author>
            <fr:link href="/cyrusomar/" title="Cyrus Omar" uri="https://mustardfox.org/cyrusomar/" display-uri="cyrusomar" type="local">Cyrus Omar</fr:link>
          </fr:author>
        </fr:authors>
        <fr:date>
          <fr:year>2025</fr:year>
          <fr:month>1</fr:month>
          <fr:day>9</fr:day>
        </fr:date>
        <fr:title text="abstract">abstract</fr:title>
      </fr:frontmatter>
      <fr:mainmatter>
        <html:p>Version control systems typically rely on a patch language, heuristic patch synthesis algorithms like diff, and three-way merge algorithms. Standard patch languages and merge algorithms often fail to identify conflicts correctly when there are multiple edits to one line of code or code is relocated. This paper introduces Grove, a collaborative structure editor calculus that eliminates patch synthesis and three-way merge algorithms entirely. Instead, patches are derived directly from the log of the developer’s edit actions and all edits commute, i.e. the repository state forms a commutative replicated data type (CmRDT). To handle conflicts that can arise due to code relocation, the core datatype in Grove is a labeled directed multi-graph with uniquely identified vertices and edges. All edits amount to edge insertion and deletion, with deletion being permanent. To support tree-based editing, we define a decomposition from graphs into groves, which are a set of syntax trees with conflicts—including local, relocation, and unicyclic relocation conflicts—represented explicitly using holes and references between trees. Finally, we define a type error localization system for groves that enjoys a totality property, i.e. all editor states in Grove are statically meaningful, so developers can use standard editor services while working to resolve these explicitly represented conflicts. The static semantics is defined as a bidirectional marking system in line with recent work, with gradual typing employed to handle situations where errors and conflicts prevent type determination. We then layer on a unification-based type inference system to opportunistically fill type holes and fail gracefully when no solution exists. We mechanize the metatheory of Grove using the Agda theorem prover. We implement these ideas as the Grove Workbench, which generates the necessary data structures and algorithms in OCaml given a syntax tree specification.</html:p>
      </fr:mainmatter>
    </fr:tree>
  </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>
    <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 show-metadata="true" expanded="false" toc="false" numbered="false">
          <fr:frontmatter>
            <fr:authors>
              <fr:author>
                <fr:link href="/ericczhao/" title="Eric Zhao" uri="https://mustardfox.org/ericczhao/" display-uri="ericczhao" type="local">Eric Zhao</fr:link>
              </fr:author>
            </fr:authors>
            <fr:date>
              <fr:year>2025</fr:year>
              <fr:month>1</fr:month>
            </fr:date>
            <fr:uri>https://mustardfox.org/zzhaoe-003A/</fr:uri>
            <fr:display-uri>zzhaoe-003A</fr:display-uri>
            <fr:route>/zzhaoe-003A/</fr:route>
            <fr:title text="Grove published at POPL 2025">Grove published at POPL 2025</fr:title>
            <fr:taxon>news</fr:taxon>
          </fr:frontmatter>
          <fr:mainmatter>
            <html:p>Our <fr:link href="/adams-et-al-2025/" title="Grove: A Bidirectionally Typed Collaborative Structure Editor Calculus" uri="https://mustardfox.org/adams-et-al-2025/" display-uri="adams-et-al-2025" type="local">paper</fr:link> on Grove, a collaborative structured editing calculus, is published at POPL!</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="/michaeladams/" title="Michael D. Adams" uri="https://mustardfox.org/michaeladams/" display-uri="michaeladams" type="local">Michael D. Adams</fr:link>
              </fr:author>
              <fr:author>
                <fr:link href="/ericgriffis/" title="Eric Griffis" uri="https://mustardfox.org/ericgriffis/" display-uri="ericgriffis" type="local">Eric Griffis</fr:link>
              </fr:author>
              <fr:author>
                <fr:link href="/thomasporter/" title="Thomas J. Porter" uri="https://mustardfox.org/thomasporter/" display-uri="thomasporter" type="local">Thomas J. Porter</fr:link>
              </fr:author>
              <fr:author>
                <fr:link href="/vishnusatish/" title="Sundara Vishnu Satish" uri="https://mustardfox.org/vishnusatish/" display-uri="vishnusatish" type="local">Sundara Vishnu Satish</fr:link>
              </fr:author>
              <fr:author>
                <fr:link href="/ericczhao/" title="Eric Zhao" uri="https://mustardfox.org/ericczhao/" display-uri="ericczhao" type="local">Eric Zhao</fr:link>
              </fr:author>
              <fr:author>
                <fr:link href="/cyrusomar/" title="Cyrus Omar" uri="https://mustardfox.org/cyrusomar/" display-uri="cyrusomar" type="local">Cyrus Omar</fr:link>
              </fr:author>
            </fr:authors>
            <fr:date>
              <fr:year>2024</fr:year>
            </fr:date>
            <fr:uri>https://mustardfox.org/zzhaoe-000Q/</fr:uri>
            <fr:display-uri>zzhaoe-000Q</fr:display-uri>
            <fr:route>/zzhaoe-000Q/</fr:route>
            <fr:title text="Grove (Agda)">Grove (Agda)</fr:title>
            <fr:taxon>software</fr:taxon>
            <fr:meta name="doi">10.5281/zenodo.14026532</fr:meta>
            <fr:meta name="venue">
              <fr:link href="/popl-2025/" title="POPL 2025" uri="https://mustardfox.org/popl-2025/" display-uri="popl-2025" type="local">POPL 2025</fr:link>
            </fr:meta>
            <fr:meta name="github">fplab/grove-agda</fr:meta>
            <fr:meta name="bibtex"><![CDATA[@software{adams_2025b,
  author = {Adams, Michael D. and Griffis, Eric and Porter, Thomas J. and Satish, Sundara Vishnu and Zhao, Eric and Omar, Cyrus},
  title = {Artifact for Grove: A Bidirectionally Typed Collaborative Structure Editor Calculus},
  year = {2025},
  publisher = {Association for Computing Machinery},
  url = {https://doi.org/10.5281/zenodo.14026532},
},]]></fr:meta>
          </fr:frontmatter>
          <fr:mainmatter>
            <html:p>An Agda mechanization of the Grove collaborative structure editor calculus described in "<fr:link href="/adams-et-al-2025/" title="Grove: A Bidirectionally Typed Collaborative Structure Editor Calculus" uri="https://mustardfox.org/adams-et-al-2025/" display-uri="adams-et-al-2025" type="local">Grove: A Bidirectionally Typed Collaborative Structure Editor Calculus</fr:link>".</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="Related">Related</fr:title>
      </fr:frontmatter>
      <fr:mainmatter>
        <fr:tree show-metadata="true" expanded="false" toc="false" numbered="false">
          <fr:frontmatter>
            <fr:authors />
            <fr:date>
              <fr:year>2024</fr:year>
              <fr:month>1</fr:month>
              <fr:day>19</fr:day>
            </fr:date>
            <fr:date>
              <fr:year>2024</fr:year>
              <fr:month>1</fr:month>
              <fr:day>25</fr:day>
            </fr:date>
            <fr:uri>https://mustardfox.org/popl-2025/</fr:uri>
            <fr:display-uri>popl-2025</fr:display-uri>
            <fr:route>/popl-2025/</fr:route>
            <fr:title text="POPL 2025">POPL 2025</fr:title>
            <fr:taxon>venue</fr:taxon>
            <fr:meta name="homepage">https://popl25.sigplan.org</fr:meta>
            <fr:meta name="venue">Denver, Colorado, United States of America</fr:meta>
          </fr:frontmatter>
          <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>
  </fr:backmatter>
</fr:tree>
