<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" href="/~yorgey/forest/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="/~yorgey/forest/">
  <fr:frontmatter>
    <fr:authors />
    <fr:uri>http://ozark.hendrix.edu/~yorgey/forest/contact/</fr:uri>
    <fr:display-uri>contact</fr:display-uri>
    <fr:route>/~yorgey/forest/contact/</fr:route>
    <fr:title text="Contact information">Contact information</fr:title>
  </fr:frontmatter>
  <fr:mainmatter>
  <html:table>
  
  <html:tr>
  <html:td><html:strong>Office</html:strong></html:td>
 
  <html:td>MC Reynolds 310; <html:mark><fr:link href="https://byorgey.youcanbook.me/" type="external">make an appointment</fr:link></html:mark></html:td>
</html:tr>

  
  <html:tr>
  <html:td><html:strong>Phone</html:strong></html:td>
 
  <html:td>+1 501 450 1377</html:td>
</html:tr>

  
  <html:tr>
  <html:td><html:strong>Email</html:strong></html:td>
 
  <html:td>last name at <html:code>hendrix.edu</html:code></html:td>
</html:tr>

  
  <html:tr>
  <html:td><html:strong>Github</html:strong></html:td>
 
  <html:td><fr:link href="https://github.com/byorgey/" type="external">byorgey</fr:link></html:td>
</html:tr>

  
  <html:tr>
  <html:td><html:strong>IRC</html:strong></html:td>
 
  <html:td><html:code>byorgey</html:code> on LiberaChat</html:td>
</html:tr>

  
  <html:tr>
  <html:td><html:strong>Mastodon</html:strong></html:td>
 
  <html:td><fr:link href="https://mathstodon.xyz/@byorgey" type="external">https://mathstodon.xyz/@byorgey</fr:link></html:td>
</html:tr>

</html:table>
</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:author>
                <fr:link href="/~yorgey/forest/brentyorgey/" title="Brent A. Yorgey" uri="http://ozark.hendrix.edu/~yorgey/forest/brentyorgey/" display-uri="brentyorgey" type="local">Brent A. Yorgey</fr:link>
              </fr:author>
            </fr:authors>
            <fr:uri>http://ozark.hendrix.edu/~yorgey/forest/index/</fr:uri>
            <fr:display-uri>index</fr:display-uri>
            <fr:route>/~yorgey/forest/index/</fr:route>
            <fr:title text="Brent Yorgey">Brent Yorgey</fr:title>
            <fr:meta name="author">false</fr:meta>
          </fr:frontmatter>
          <fr:mainmatter>
            <html:img src="/~yorgey/forest/bafkrmibespfb77qjf3fab42ue3vhje5r4bmkkhcgdecioo7neu3ufd7j3y.jpg" style="float:right" />
            <fr:tree show-metadata="false" numbered="false">
              <fr:frontmatter>
                <fr:authors />
                <fr:uri>http://ozark.hendrix.edu/~yorgey/forest/contact/</fr:uri>
                <fr:display-uri>contact</fr:display-uri>
                <fr:route>/~yorgey/forest/contact/</fr:route>
                <fr:title text="Contact information">Contact information</fr:title>
              </fr:frontmatter>
              <fr:mainmatter>
  <html:table>
  
  <html:tr>
  <html:td><html:strong>Office</html:strong></html:td>
 
  <html:td>MC Reynolds 310; <html:mark><fr:link href="https://byorgey.youcanbook.me/" type="external">make an appointment</fr:link></html:mark></html:td>
</html:tr>

  
  <html:tr>
  <html:td><html:strong>Phone</html:strong></html:td>
 
  <html:td>+1 501 450 1377</html:td>
</html:tr>

  
  <html:tr>
  <html:td><html:strong>Email</html:strong></html:td>
 
  <html:td>last name at <html:code>hendrix.edu</html:code></html:td>
</html:tr>

  
  <html:tr>
  <html:td><html:strong>Github</html:strong></html:td>
 
  <html:td><fr:link href="https://github.com/byorgey/" type="external">byorgey</fr:link></html:td>
</html:tr>

  
  <html:tr>
  <html:td><html:strong>IRC</html:strong></html:td>
 
  <html:td><html:code>byorgey</html:code> on LiberaChat</html:td>
</html:tr>

  
  <html:tr>
  <html:td><html:strong>Mastodon</html:strong></html:td>
 
  <html:td><fr:link href="https://mathstodon.xyz/@byorgey" type="external">https://mathstodon.xyz/@byorgey</fr:link></html:td>
</html:tr>

</html:table>
</fr:mainmatter>
            </fr:tree>
            <fr:tree show-metadata="false" numbered="false">
              <fr:frontmatter>
                <fr:authors>
                  <fr:author>
                    <fr:link href="/~yorgey/forest/brentyorgey/" title="Brent A. Yorgey" uri="http://ozark.hendrix.edu/~yorgey/forest/brentyorgey/" display-uri="brentyorgey" type="local">Brent A. Yorgey</fr:link>
                  </fr:author>
                </fr:authors>
                <fr:date>
                  <fr:year>2025</fr:year>
                  <fr:month>10</fr:month>
                  <fr:day>24</fr:day>
                </fr:date>
                <fr:uri>http://ozark.hendrix.edu/~yorgey/forest/0001/</fr:uri>
                <fr:display-uri>0001</fr:display-uri>
                <fr:route>/~yorgey/forest/0001/</fr:route>
                <fr:title text="About this site">About this site</fr:title>
              </fr:frontmatter>
              <fr:mainmatter>
                <html:p>This site is a "forest" created using <fr:link href="https://www.forester-notes.org/index/" type="external">Forester</fr:link>. Click on headings to collapse or expand sections, or click on the alphanumeric ID next to a section heading to open the section in a new page.  Type <html:code>Ctrl+K</html:code> to search the graph.</html:p>
              </fr:mainmatter>
            </fr:tree>
            <fr:tree show-metadata="false" numbered="false">
              <fr:frontmatter>
                <fr:authors />
                <fr:date>
                  <fr:year>2025</fr:year>
                  <fr:month>10</fr:month>
                  <fr:day>24</fr:day>
                </fr:date>
                <fr:uri>http://ozark.hendrix.edu/~yorgey/forest/0005/</fr:uri>
                <fr:display-uri>0005</fr:display-uri>
                <fr:route>/~yorgey/forest/0005/</fr:route>
                <fr:title text="Links">Links</fr:title>
              </fr:frontmatter>
              <fr:mainmatter>
                <html:ul><html:li>My <fr:link href="/~yorgey/forest/0006/" title="Biography" uri="http://ozark.hendrix.edu/~yorgey/forest/0006/" display-uri="0006" type="local">biography</fr:link></html:li>
  <html:li>How to <fr:link href="/~yorgey/forest/000G/" title="Pronunciation and origin of “Yorgey”" uri="http://ozark.hendrix.edu/~yorgey/forest/000G/" display-uri="000G" type="local">pronounce my last name</fr:link></html:li>
  <html:li>What I'm <fr:link href="/~yorgey/forest/now/" title="Now" uri="http://ozark.hendrix.edu/~yorgey/forest/now/" display-uri="now" type="local">up to right now</fr:link></html:li>
  <html:li>My <fr:link href="/~yorgey/forest/005U/" title="Brent Yorgey › Weeknotes" uri="http://ozark.hendrix.edu/~yorgey/forest/005U/" display-uri="005U" type="local">weeknotes</fr:link></html:li>
  <html:li>The <fr:link href="/~yorgey/forest/000M/" title="Productivity tools" uri="http://ozark.hendrix.edu/~yorgey/forest/000M/" display-uri="000M" type="local">list of productivity tools I use</fr:link></html:li></html:ul>
                <html:p><html:mark>Want to ask me for a letter of reference</html:mark>? <fr:link href="http://ozark.hendrix.edu/~yorgey/pub/reference-guide.pdf" type="external">Read this guide first</fr:link>.</html:p>
              </fr:mainmatter>
            </fr:tree>
            <fr:tree show-metadata="false" numbered="false">
              <fr:frontmatter>
                <fr:authors>
                  <fr:author>
                    <fr:link href="/~yorgey/forest/brentyorgey/" title="Brent A. Yorgey" uri="http://ozark.hendrix.edu/~yorgey/forest/brentyorgey/" display-uri="brentyorgey" type="local">Brent A. Yorgey</fr:link>
                  </fr:author>
                </fr:authors>
                <fr:date>
                  <fr:year>2026</fr:year>
                  <fr:month>3</fr:month>
                  <fr:day>7</fr:day>
                </fr:date>
                <fr:uri>http://ozark.hendrix.edu/~yorgey/forest/009L/</fr:uri>
                <fr:display-uri>009L</fr:display-uri>
                <fr:route>/~yorgey/forest/009L/</fr:route>
                <fr:title text="Statement on LLMs">Statement on LLMs</fr:title>
              </fr:frontmatter>
              <fr:mainmatter>
                <html:p>I do not and will not use LLMs, in any form, for any purpose.  Although LLMs are fascinating from a purely technical perspective, I refuse to participate in or contribute to such systems that are built on massive exploitation of human labor and make profligate use of scarce resources.  I also don't think they are actually very good for a lot of the applications people seem excited about.  Even in cases where LLMs are technically good at a task, that does not necessarily mean their use for that task contributes positively to human flourishing.</html:p>
                <html:p>A good way to describe myself is as a <fr:link href="https://sboots.ca/2026/03/11/generative-ai-vegetarianism/" type="external">generative AI vegetarian</fr:link>.  You can find a fuller explanation—and many, many links—at the above essay by Sean Boots, which I agree with almost 100%.</html:p>
                <html:p>On bad days, I find myself feeling more like <fr:link href="https://anthonymoser.github.io/writing/ai/haterdom/2025/08/26/i-am-an-ai-hater.html" type="external">Anthony Moser</fr:link>.</html:p>
                <html:p>Here is something I <fr:link href="/~yorgey/forest/00FD/" title="To my students" uri="http://ozark.hendrix.edu/~yorgey/forest/00FD/" display-uri="00FD" type="local">wrote for my students</fr:link> reflecting on the current state of the world and what I hope for them as they go out into it.</html:p>
              </fr:mainmatter>
            </fr:tree>
            <fr:tree show-metadata="false" expanded="false" numbered="true">
              <fr:frontmatter>
                <fr:authors />
                <fr:date>
                  <fr:year>2025</fr:year>
                  <fr:month>10</fr:month>
                  <fr:day>25</fr:day>
                </fr:date>
                <fr:uri>http://ozark.hendrix.edu/~yorgey/forest/0007/</fr:uri>
                <fr:display-uri>0007</fr:display-uri>
                <fr:route>/~yorgey/forest/0007/</fr:route>
                <fr:title text="News and announcements">News and announcements</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>2025</fr:year>
                      <fr:month>9</fr:month>
                      <fr:day>25</fr:day>
                    </fr:date>
                    <fr:uri>http://ozark.hendrix.edu/~yorgey/forest/005Y/</fr:uri>
                    <fr:display-uri>005Y</fr:display-uri>
                    <fr:route>/~yorgey/forest/005Y/</fr:route>
                    <fr:title text="ZuriHac invited keynote on competitive programming">ZuriHac invited keynote on competitive programming</fr:title>
                  </fr:frontmatter>
                  <fr:mainmatter>
                    <html:p>I gave an <fr:link href="/~yorgey/forest/yorgey-zurihac-2025/" title="Haskell for Competitive Programming (invited keynote)" uri="http://ozark.hendrix.edu/~yorgey/forest/yorgey-zurihac-2025/" display-uri="yorgey-zurihac-2025" type="local">invited keynote talk on competitive programming</fr:link> at <fr:link href="/~yorgey/forest/zurihac-2025/" title="ZuriHac 2025" uri="http://ozark.hendrix.edu/~yorgey/forest/zurihac-2025/" display-uri="zurihac-2025" type="local">ZuriHac 2025</fr:link>.</html:p>
                  </fr:mainmatter>
                </fr:tree>
                <fr:tree show-metadata="true" expanded="false" toc="false" numbered="false">
                  <fr:frontmatter>
                    <fr:authors />
                    <fr:date>
                      <fr:year>2025</fr:year>
                      <fr:month>1</fr:month>
                      <fr:day>23</fr:day>
                    </fr:date>
                    <fr:uri>http://ozark.hendrix.edu/~yorgey/forest/0008/</fr:uri>
                    <fr:display-uri>0008</fr:display-uri>
                    <fr:route>/~yorgey/forest/0008/</fr:route>
                    <fr:title text="New JFP paper published">New JFP paper published</fr:title>
                  </fr:frontmatter>
                  <fr:mainmatter>
                    <html:p>My paper, <fr:link href="/~yorgey/forest/yorgey-fenwick-2025/" title="You Could Have Invented Fenwick Trees (Functional Pearl)" uri="http://ozark.hendrix.edu/~yorgey/forest/yorgey-fenwick-2025/" display-uri="yorgey-fenwick-2025" type="local">You Could Have Invented Fenwick Trees (Functional Pearl)</fr:link>, is now published in the <fr:link href="/~yorgey/forest/jfp/" title="Journal of Functional Programming" uri="http://ozark.hendrix.edu/~yorgey/forest/jfp/" display-uri="jfp" type="local">Journal of Functional Programming</fr:link>!</html:p>
                  </fr:mainmatter>
                </fr:tree>
                <fr:tree show-metadata="true" expanded="false" toc="false" numbered="false">
                  <fr:frontmatter>
                    <fr:authors />
                    <fr:date>
                      <fr:year>2024</fr:year>
                      <fr:month>12</fr:month>
                      <fr:day>19</fr:day>
                    </fr:date>
                    <fr:uri>http://ozark.hendrix.edu/~yorgey/forest/0009/</fr:uri>
                    <fr:display-uri>0009</fr:display-uri>
                    <fr:route>/~yorgey/forest/0009/</fr:route>
                    <fr:title text="Haskell Symposium keynote">Haskell Symposium keynote</fr:title>
                  </fr:frontmatter>
                  <fr:mainmatter>
                    <html:p>I gave a keynote presentation at the Haskell Symposium on <fr:link href="/~yorgey/forest/joy-functional-haskell/" title="The Joy of Building (Functional) Languages (invited keynote)" uri="http://ozark.hendrix.edu/~yorgey/forest/joy-functional-haskell/" display-uri="joy-functional-haskell" type="local">The Joy of Building (Functional) Languages (invited keynote)</fr:link>.</html:p>
                  </fr:mainmatter>
                </fr:tree>
                <fr:tree show-metadata="true" expanded="false" toc="false" numbered="false">
                  <fr:frontmatter>
                    <fr:authors />
                    <fr:date>
                      <fr:year>2023</fr:year>
                      <fr:month>8</fr:month>
                      <fr:day>24</fr:day>
                    </fr:date>
                    <fr:uri>http://ozark.hendrix.edu/~yorgey/forest/000A/</fr:uri>
                    <fr:display-uri>000A</fr:display-uri>
                    <fr:route>/~yorgey/forest/000A/</fr:route>
                    <fr:title text="New Disco paper published">New Disco paper published</fr:title>
                  </fr:frontmatter>
                  <fr:mainmatter>
                    <html:p>My paper, <fr:link href="/~yorgey/forest/yorgey-disco-2023/" title="Disco: A Functional Programming Language for Discrete Mathematics" uri="http://ozark.hendrix.edu/~yorgey/forest/yorgey-disco-2023/" display-uri="yorgey-disco-2023" type="local">Disco: A Functional Programming Language for Discrete Mathematics</fr:link>, has been published in the proceedings of <fr:link href="/~yorgey/forest/tfpie-2023/" title="TFPIE '23: Trends in Functional Programming in Education" uri="http://ozark.hendrix.edu/~yorgey/forest/tfpie-2023/" display-uri="tfpie-2023" type="local"><html:em>TFPIE</html:em> '23: Trends in Functional Programming in Education</fr:link>.</html:p>
                  </fr:mainmatter>
                </fr:tree>
              </fr:mainmatter>
            </fr:tree>
            <fr:tree show-metadata="false" expanded="false" numbered="true">
              <fr:frontmatter>
                <fr:authors />
                <fr:date>
                  <fr:year>2025</fr:year>
                  <fr:month>10</fr:month>
                  <fr:day>24</fr:day>
                </fr:date>
                <fr:uri>http://ozark.hendrix.edu/~yorgey/forest/0002/</fr:uri>
                <fr:display-uri>0002</fr:display-uri>
                <fr:route>/~yorgey/forest/0002/</fr:route>
                <fr:title text="Teaching">Teaching</fr:title>
              </fr:frontmatter>
              <fr:mainmatter>
                <html:p>I teach computer science and mathematics at <fr:link href="/~yorgey/forest/hendrixcollege/" title="Hendrix College" uri="http://ozark.hendrix.edu/~yorgey/forest/hendrixcollege/" display-uri="hendrixcollege" type="local">Hendrix College</fr:link>.</html:p>
                <html:p>Here is a <fr:link href="/~yorgey/forest/00FD/" title="To my students" uri="http://ozark.hendrix.edu/~yorgey/forest/00FD/" display-uri="00FD" type="local">short letter I wrote to my students</fr:link> reflecting on the current state of the world and what I hope for them as they go out into it.</html:p>
                <fr:tree show-metadata="false" expanded="false">
                  <fr:frontmatter>
                    <fr:authors />
                    <fr:date>
                      <fr:year>2025</fr:year>
                      <fr:month>10</fr:month>
                      <fr:day>24</fr:day>
                    </fr:date>
                    <fr:uri>http://ozark.hendrix.edu/~yorgey/forest/0004/</fr:uri>
                    <fr:display-uri>0004</fr:display-uri>
                    <fr:route>/~yorgey/forest/0004/</fr:route>
                    <fr:title text="Previous courses">Previous courses</fr:title>
                  </fr:frontmatter>
                  <fr:mainmatter>
                    <fr:tree show-metadata="false">
                      <fr:frontmatter>
                        <fr:authors />
                        <fr:date>
                          <fr:year>2025</fr:year>
                          <fr:month>10</fr:month>
                          <fr:day>25</fr:day>
                        </fr:date>
                        <fr:uri>http://ozark.hendrix.edu/~yorgey/forest/000I/</fr:uri>
                        <fr:display-uri>000I</fr:display-uri>
                        <fr:route>/~yorgey/forest/000I/</fr:route>
                        <fr:title text="Previous courses taught at Hendrix College">Previous courses taught at <fr:link href="/~yorgey/forest/hendrixcollege/" title="Hendrix College" uri="http://ozark.hendrix.edu/~yorgey/forest/hendrixcollege/" display-uri="hendrixcollege" type="local">Hendrix College</fr:link></fr:title>
                      </fr:frontmatter>
                      <fr:mainmatter>
                        <html:ul><html:li>LBST 150J, The Engaged Citizen: The Art and Science of Creativity (co-taught with <fr:link href="/~yorgey/forest/melissagill/" title="Melissa Gill" uri="http://ozark.hendrix.edu/~yorgey/forest/melissagill/" display-uri="melissagill" type="local">Melissa Gill</fr:link>, F '20)</html:li>
    <html:li>LBST 101, Explorations (F '18, F '20, F '22, F '24)</html:li>
    <html:li>CSCI 150, Foundations of Computer Science (F '15, S '16, S '17, S '18, F '18, S '19, F '19, S '20, S '21, F '22, S '23, F '23, S '24, S '25, F '25, S '26)</html:li>
    <html:li>CSCI 151, Data Structures (F '16, F '17, S '19)</html:li>
    <html:li>MATH 240, Discrete Mathematics (S '20, S '21, S '22, S '23, S '25, S '26)</html:li>
    <html:li>CSCI 322, Computing Systems Organization (S '22, S '24)</html:li>
    <html:li>CSCI 382, Algorithms (S '16, S '17, F '17, F '18, F '19, F '20, F '22, F '23, F '24, F '25)</html:li>
    <html:li>CSCI 360, Programming Languages (F '16, F '18, S '21, S '23, S '25)</html:li>
    <html:li>CSCI 365, Functional Programming (S '16, S '18, S '20, S '22, S '24, S '26)</html:li>
    <html:li>CSCI 410, Senior Seminar (F '16, F '17, F '19, F '20, F '22, F '24)</html:li></html:ul>
                      </fr:mainmatter>
                    </fr:tree>
                    <fr:tree show-metadata="false">
                      <fr:frontmatter>
                        <fr:authors />
                        <fr:date>
                          <fr:year>2025</fr:year>
                          <fr:month>10</fr:month>
                          <fr:day>25</fr:day>
                        </fr:date>
                        <fr:uri>http://ozark.hendrix.edu/~yorgey/forest/000J/</fr:uri>
                        <fr:display-uri>000J</fr:display-uri>
                        <fr:route>/~yorgey/forest/000J/</fr:route>
                        <fr:title text="Previous courses taught at Williams College">Previous courses taught at <fr:link href="/~yorgey/forest/williamscollege/" title="Williams College" uri="http://ozark.hendrix.edu/~yorgey/forest/williamscollege/" display-uri="williamscollege" type="local">Williams College</fr:link></fr:title>
                      </fr:frontmatter>
                      <fr:mainmatter>
                        <html:ul><html:li>CS 134, Digital Communication and Computation, an Introduction to Computer Science (co-taught with <fr:link href="/~yorgey/forest/billlenhart/" title="Bill Lenhart" uri="http://ozark.hendrix.edu/~yorgey/forest/billlenhart/" display-uri="billlenhart" type="local">Bill Lenhart</fr:link>, F '14)</html:li>
  <html:li>CS 354, Functional Programming and the Art of Recursion (F '14)</html:li>
  <html:li>CS 136, Data Structures and Advanced Programming (S '15)</html:li></html:ul>
                      </fr:mainmatter>
                    </fr:tree>
                    <fr:tree show-metadata="false">
                      <fr:frontmatter>
                        <fr:authors />
                        <fr:date>
                          <fr:year>2025</fr:year>
                          <fr:month>10</fr:month>
                          <fr:day>25</fr:day>
                        </fr:date>
                        <fr:uri>http://ozark.hendrix.edu/~yorgey/forest/000K/</fr:uri>
                        <fr:display-uri>000K</fr:display-uri>
                        <fr:route>/~yorgey/forest/000K/</fr:route>
                        <fr:title text="Previous courses taught at University of Pennsylvania">Previous courses taught at <fr:link href="/~yorgey/forest/upenn/" title="University of Pennsylvania" uri="http://ozark.hendrix.edu/~yorgey/forest/upenn/" display-uri="upenn" type="local">University of Pennsylvania</fr:link></fr:title>
                      </fr:frontmatter>
                      <fr:mainmatter>
                        <html:ul><html:li>The Art of Recursion (F '12)</html:li>
  <html:li><fr:link href="/~yorgey/forest/000H/" title="CIS 194, Introduction to Haskell" uri="http://ozark.hendrix.edu/~yorgey/forest/000H/" display-uri="000H" type="local">CIS 194, Introduction to Haskell</fr:link> (F '10, S '12, S '13)</html:li>
  <html:li>CIS 500, <fr:link href="https://softwarefoundations.cis.upenn.edu/" type="external">Software Foundations</fr:link> (TA; S '10, S '11)</html:li>
  <html:li>CIS 120, Programming Languages and Techniques I (TA; F '09)</html:li></html:ul>
                      </fr:mainmatter>
                    </fr:tree>
                    <fr:tree show-metadata="false">
                      <fr:frontmatter>
                        <fr:authors />
                        <fr:date>
                          <fr:year>2025</fr:year>
                          <fr:month>10</fr:month>
                          <fr:day>25</fr:day>
                        </fr:date>
                        <fr:uri>http://ozark.hendrix.edu/~yorgey/forest/000L/</fr:uri>
                        <fr:display-uri>000L</fr:display-uri>
                        <fr:route>/~yorgey/forest/000L/</fr:route>
                        <fr:title text="Other previously taught courses">Other previously taught courses</fr:title>
                      </fr:frontmatter>
                      <fr:mainmatter>
                        <html:ul><html:li>Woodrow Wilson Senior High School, Washington DC</html:li>

<html:ul><html:li>Introduction to Computer Science ('04-'05, '05-'06)</html:li>
  <html:li>AP Computer Science AB ('04-'05, '05-'06)</html:li>
  <html:li>Honors Precalculus ('05-'06)</html:li></html:ul>

<html:li><fr:link href="http://ozark.hendrix.edu/~yorgey/precalc/" type="external">Correspondence course in precalculus</fr:link> with homeschool students ('08-'09)</html:li></html:ul>
                      </fr:mainmatter>
                    </fr:tree>
                  </fr:mainmatter>
                </fr:tree>
              </fr:mainmatter>
            </fr:tree>
            <fr:tree show-metadata="false" expanded="false" numbered="true">
              <fr:frontmatter>
                <fr:authors />
                <fr:uri>http://ozark.hendrix.edu/~yorgey/forest/000C/</fr:uri>
                <fr:display-uri>000C</fr:display-uri>
                <fr:route>/~yorgey/forest/000C/</fr:route>
                <fr:title text="Projects">Projects</fr:title>
              </fr:frontmatter>
              <fr:mainmatter>
                <fr:tree show-metadata="false">
                  <fr:frontmatter>
                    <fr:authors />
                    <fr:uri>http://ozark.hendrix.edu/~yorgey/forest/000N/</fr:uri>
                    <fr:display-uri>000N</fr:display-uri>
                    <fr:route>/~yorgey/forest/000N/</fr:route>
                    <fr:title text="Disco">Disco</fr:title>
                  </fr:frontmatter>
                  <fr:mainmatter>
                    <html:p><fr:link href="https://github.com/disco-lang/disco" type="external">Disco</fr:link> is a functional
teaching language for <fr:link href="/~yorgey/forest/0020/" title="MATH 240, Discrete Mathematics" uri="http://ozark.hendrix.edu/~yorgey/forest/0020/" display-uri="0020" type="local">discrete mathematics</fr:link>, implemented in
Haskell.  <fr:link href="/~yorgey/forest/heinrichapfelmus/" title="Heinrich Apfelmus" uri="http://ozark.hendrix.edu/~yorgey/forest/heinrichapfelmus/" display-uri="heinrichapfelmus" type="local">Heinrich Apfelmus</fr:link> recently built a <fr:link href="https://disco-lang.github.io/disco-live/" type="external">basic web
UI</fr:link> for students to be able
to use Disco in their browser, and I'm using it to teach <fr:link href="/~yorgey/forest/0020/" title="MATH 240, Discrete Mathematics" uri="http://ozark.hendrix.edu/~yorgey/forest/0020/" display-uri="0020" type="local">MATH 240, Discrete Mathematics</fr:link> this semester.</html:p>
                    <fr:tree show-metadata="false">
                      <fr:frontmatter>
                        <fr:authors />
                        <fr:title text="Related talks and papers">Related talks and papers</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="/~yorgey/forest/brentyorgey/" title="Brent A. Yorgey" uri="http://ozark.hendrix.edu/~yorgey/forest/brentyorgey/" display-uri="brentyorgey" type="local">Brent A. Yorgey</fr:link>
                              </fr:author>
                            </fr:authors>
                            <fr:date>
                              <fr:year>2023</fr:year>
                              <fr:month>8</fr:month>
                              <fr:day>14</fr:day>
                            </fr:date>
                            <fr:uri>http://ozark.hendrix.edu/~yorgey/forest/yorgey-disco-2023/</fr:uri>
                            <fr:display-uri>yorgey-disco-2023</fr:display-uri>
                            <fr:route>/~yorgey/forest/yorgey-disco-2023/</fr:route>
                            <fr:title text="Disco: A Functional Programming Language for Discrete Mathematics">Disco: A Functional Programming Language for Discrete Mathematics</fr:title>
                            <fr:taxon>Reference</fr:taxon>
                            <fr:meta name="venue">
                              <fr:link href="/~yorgey/forest/tfpie-2023/" title="TFPIE '23: Trends in Functional Programming in Education" uri="http://ozark.hendrix.edu/~yorgey/forest/tfpie-2023/" display-uri="tfpie-2023" type="local"><html:em>TFPIE</html:em> '23: Trends in Functional Programming in Education</fr:link>
                            </fr:meta>
                            <fr:meta name="doi">10.4204/EPTCS.382.4</fr:meta>
                            <fr:meta name="bibtex"><![CDATA[@Inproceedings{yorgey-disco-2023,
  author    = {Yorgey, Brent A.},
  year      = {2023},
  title     = {Disco: A Functional Programming Language for Discrete Mathematics},
  editor    = {Machkasova, Elena},
  booktitle = {{\rm Proceedings Twelfth International Workshop on}
               Trends in Functional Programming in Education,
               {\rm Boston, Massachusetts, USA, 12th January 2023}},
  series    = {Electronic Proceedings in Theoretical Computer Science},
  volume    = {382},
  publisher = {Open Publishing Association},
  pages     = {64-81},
  doi       = {10.4204/EPTCS.382.4},
}]]></fr:meta>
                            <fr:meta name="pdf">http://ozark.hendrix.edu/~yorgey/pub/disco-tfpie23.pdf</fr:meta>
                            <fr:meta name="repo">https://github.com/disco-lang/disco</fr:meta>
                            <fr:meta name="slides">http://ozark.hendrix.edu/~yorgey/pub/disco-tfpie23-talk.pdf</fr:meta>
                          </fr:frontmatter>
                          <fr:mainmatter>
                            <html:p><fr:link href="/~yorgey/forest/000N/" title="Disco" uri="http://ozark.hendrix.edu/~yorgey/forest/000N/" display-uri="000N" type="local">Disco</fr:link> is a pure, strict, statically typed functional programming language designed to be used in the setting of a discrete mathematics course. The goals of the language are to introduce students to functional programming concepts early, and to enhance their learning of mathematics by providing a computational platform for them to play with. It features mathematically-inspired notation, property-based testing, equirecursive algebraic types, subtyping, built-in list, bag, and finite set types, a REPL, and student-focused documentation. Disco is implemented in Haskell, with source code available on GitHub, and interactive web-based REPL available through replit.</html:p>
                          </fr:mainmatter>
                        </fr:tree>
                      </fr:mainmatter>
                    </fr:tree>
                  </fr:mainmatter>
                </fr:tree>
                <fr:tree show-metadata="false">
                  <fr:frontmatter>
                    <fr:authors />
                    <fr:date>
                      <fr:year>2025</fr:year>
                      <fr:month>10</fr:month>
                      <fr:day>26</fr:day>
                    </fr:date>
                    <fr:uri>http://ozark.hendrix.edu/~yorgey/forest/000O/</fr:uri>
                    <fr:display-uri>000O</fr:display-uri>
                    <fr:route>/~yorgey/forest/000O/</fr:route>
                    <fr:title text="Swarm">Swarm</fr:title>
                  </fr:frontmatter>
                  <fr:mainmatter>
                    <html:p>In the fall of 2021 I started developing a game called <fr:link href="http://github.com/swarm-game/swarm" type="external">Swarm</fr:link> and built a small open-source community around its development.  So far we have made a
few <fr:link href="https://github.com/swarm-game/swarm/releases/tag/0.8.0.0" type="external">official alpha releases</fr:link>, and development continues to hum along.  We finally merged a big <fr:link href="https://github.com/swarm-game/swarm/pull/2540" type="external">import feature</fr:link> to the language. I've recently finished work on <fr:link href="https://github.com/swarm-game/swarm/pull/2701" type="external">an immutable array type</fr:link>, and now working on adding <fr:link href="https://github.com/swarm-game/swarm/issues/2504" type="external">a help system</fr:link>. I've also been writing up some notes about a planned <fr:link href="/~yorgey/forest/000U/" title="Notes on redesign of the Swarm type system" uri="http://ozark.hendrix.edu/~yorgey/forest/000U/" display-uri="000U" type="local">redesign of the type system</fr:link>.</html:p>
                  </fr:mainmatter>
                </fr:tree>
                <fr:tree show-metadata="false">
                  <fr:frontmatter>
                    <fr:authors />
                    <fr:date>
                      <fr:year>2025</fr:year>
                      <fr:month>10</fr:month>
                      <fr:day>26</fr:day>
                    </fr:date>
                    <fr:uri>http://ozark.hendrix.edu/~yorgey/forest/000P/</fr:uri>
                    <fr:display-uri>000P</fr:display-uri>
                    <fr:route>/~yorgey/forest/000P/</fr:route>
                    <fr:title text="Applicative inference">Applicative inference</fr:title>
                  </fr:frontmatter>
                  <fr:mainmatter>
                    <html:p>While working on a mini-DSL as part of the <fr:link href="/~yorgey/forest/000O/" title="Swarm" uri="http://ozark.hendrix.edu/~yorgey/forest/000O/" display-uri="000O" type="local">Swarm</fr:link> project, I got an intuitive sense that  the types of DSLs involving an applicative functor can be fully inferred from (suitably restricted) programs that just use regular applicative notation, whereas for monads this would be ambiguous. I have been working, intermittently, on a <fr:link href="https://github.com/byorgey/infer-applicative" type="external">research project</fr:link> to formalize and prove this idea.</html:p>
                    <fr:tree show-metadata="false">
                      <fr:frontmatter>
                        <fr:authors />
                        <fr:date>
                          <fr:year>2025</fr:year>
                          <fr:month>10</fr:month>
                          <fr:day>26</fr:day>
                        </fr:date>
                        <fr:title text="Related talks and papers">Related talks and papers</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="/~yorgey/forest/brentyorgey/" title="Brent A. Yorgey" uri="http://ozark.hendrix.edu/~yorgey/forest/brentyorgey/" display-uri="brentyorgey" type="local">Brent A. Yorgey</fr:link>
                              </fr:author>
                            </fr:authors>
                            <fr:date>
                              <fr:year>2025</fr:year>
                              <fr:month>1</fr:month>
                              <fr:day>30</fr:day>
                            </fr:date>
                            <fr:uri>http://ozark.hendrix.edu/~yorgey/forest/idiomatic-inference-PLV/</fr:uri>
                            <fr:display-uri>idiomatic-inference-PLV</fr:display-uri>
                            <fr:route>/~yorgey/forest/idiomatic-inference-PLV/</fr:route>
                            <fr:title text="Idiomatic Inference for DSLs">Idiomatic Inference for DSLs</fr:title>
                            <fr:taxon>Reference</fr:taxon>
                            <fr:meta name="venue"><fr:link href="/~yorgey/forest/psu/" title="Portland State University" uri="http://ozark.hendrix.edu/~yorgey/forest/psu/" display-uri="psu" type="local">Portland State University</fr:link> PLV seminar</fr:meta>
                            <fr:meta name="slides">http://ozark.hendrix.edu/~yorgey/pub/PLV-idiomatic-inference.pdf</fr:meta>
                            <fr:meta name="repo">https://github.com/byorgey/infer-applicative</fr:meta>
                          </fr:frontmatter>
                          <fr:mainmatter>
                            <html:p>McBride and Paterson's <html:em>idioms</html:em>, or <html:em>applicative functors</html:em>, are a well-known abstraction defining function application in some ambient effectful context.  It would often be useful, especially in the context of designing domain-specific languages, to <html:em>infer</html:em> such "idiomatic'' application, allowing the programmer to use plain function application syntax—but only when doing so is unambiguous.  I will present work in progress characterizing the conditions necessary for this to be possible.</html:p>
                          </fr:mainmatter>
                        </fr:tree>
                      </fr:mainmatter>
                    </fr:tree>
                  </fr:mainmatter>
                </fr:tree>
                <fr:tree show-metadata="false">
                  <fr:frontmatter>
                    <fr:authors />
                    <fr:date>
                      <fr:year>2025</fr:year>
                      <fr:month>10</fr:month>
                      <fr:day>28</fr:day>
                    </fr:date>
                    <fr:uri>http://ozark.hendrix.edu/~yorgey/forest/000S/</fr:uri>
                    <fr:display-uri>000S</fr:display-uri>
                    <fr:route>/~yorgey/forest/000S/</fr:route>
                    <fr:title text="Diagrams">Diagrams</fr:title>
                  </fr:frontmatter>
                  <fr:mainmatter>
                    <html:p><fr:link href="https://diagrams.github.io/" type="external">Diagrams</fr:link> is an embedded domain-specific language in <fr:link href="/~yorgey/forest/Haskell/" title="Haskell" uri="http://ozark.hendrix.edu/~yorgey/forest/Haskell/" display-uri="Haskell" type="local">Haskell</fr:link> for creating vector graphics, which I and several other contributors developed starting in 2008.  Development has more or less stopped at this point, but I still keep it updated to compile with the latest versions of GHC and its dependencies.</html:p>
                    <fr:tree show-metadata="false">
                      <fr:frontmatter>
                        <fr:authors />
                        <fr:date>
                          <fr:year>2025</fr:year>
                          <fr:month>10</fr:month>
                          <fr:day>28</fr:day>
                        </fr:date>
                        <fr:title text="Diagrams-related talks and papers">Diagrams-related talks and papers</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="/~yorgey/forest/ryanyates/" title="Ryan Yates" uri="http://ozark.hendrix.edu/~yorgey/forest/ryanyates/" display-uri="ryanyates" type="local">Ryan Yates</fr:link>
                              </fr:author>
                              <fr:author>
                                <fr:link href="/~yorgey/forest/brentyorgey/" title="Brent A. Yorgey" uri="http://ozark.hendrix.edu/~yorgey/forest/brentyorgey/" display-uri="brentyorgey" type="local">Brent A. Yorgey</fr:link>
                              </fr:author>
                            </fr:authors>
                            <fr:date>
                              <fr:year>2015</fr:year>
                              <fr:month>8</fr:month>
                              <fr:day>30</fr:day>
                            </fr:date>
                            <fr:uri>http://ozark.hendrix.edu/~yorgey/forest/yates-yorgey-2015/</fr:uri>
                            <fr:display-uri>yates-yorgey-2015</fr:display-uri>
                            <fr:route>/~yorgey/forest/yates-yorgey-2015/</fr:route>
                            <fr:title text="Diagrams: A Functional EDSL for Vector Graphics">Diagrams: A Functional EDSL for Vector Graphics</fr:title>
                            <fr:taxon>Reference</fr:taxon>
                            <fr:meta name="venue">
                              <fr:link href="/~yorgey/forest/farm-2015/" title="FARM '15: International Workshop on Functional Art, Music, Modelling and Design" uri="http://ozark.hendrix.edu/~yorgey/forest/farm-2015/" display-uri="farm-2015" type="local"><html:em>FARM '15</html:em>: International Workshop on Functional Art, Music, Modelling and Design</fr:link>
                            </fr:meta>
                            <fr:meta name="doi">10.1145/2808083.2808085</fr:meta>
                            <fr:meta name="bibtex"><![CDATA[@inproceedings{yates-yorgey-2015,
  author = {Yates, Ryan and Yorgey, Brent A.},
  title = {Diagrams: a functional EDSL for vector graphics},
  year = {2015},
  isbn = {9781450338066},
  publisher = {Association for Computing Machinery},
  address = {New York, NY, USA},
  url = {https://doi.org/10.1145/2808083.2808085},
  doi = {10.1145/2808083.2808085},
  abstract = {},
  booktitle = {Proceedings of the 3rd ACM SIGPLAN International Workshop on Functional Art, Music, Modelling and Design},
  pages = {4–5},
  numpages = {2},
  keywords = {EDSL, Haskell, diagrams, vector},
  location = {Vancouver, BC, Canada},
  series = {FARM 2015}
}]]></fr:meta>
                            <fr:meta name="pdf">http://ozark.hendrix.edu/~yorgey/pub/diagrams-FARM.pdf</fr:meta>
                            <fr:meta name="video">https://www.youtube.com/watch?v=oAz8AEf7WDA</fr:meta>
                          </fr:frontmatter>
                          <fr:mainmatter>
                            <html:p>Diagrams is a domain-specific language for creating vector graphics. We will give a short diagrams tutorial/demo, particularly highlighting the power of a functional, embedded domain-specific language.</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="/~yorgey/forest/brentyorgey/" title="Brent A. Yorgey" uri="http://ozark.hendrix.edu/~yorgey/forest/brentyorgey/" display-uri="brentyorgey" type="local">Brent A. Yorgey</fr:link>
                              </fr:author>
                            </fr:authors>
                            <fr:date>
                              <fr:year>2013</fr:year>
                              <fr:month>11</fr:month>
                              <fr:day>20</fr:day>
                            </fr:date>
                            <fr:uri>http://ozark.hendrix.edu/~yorgey/forest/yorgey-diagrams-NYHUG-2013/</fr:uri>
                            <fr:display-uri>yorgey-diagrams-NYHUG-2013</fr:display-uri>
                            <fr:route>/~yorgey/forest/yorgey-diagrams-NYHUG-2013/</fr:route>
                            <fr:title text="Diagrams: Declarative Vector Graphics in Haskell"><html:code>Diagrams</html:code>: Declarative Vector Graphics in Haskell</fr:title>
                            <fr:taxon>Reference</fr:taxon>
                            <fr:meta name="venue">New York Haskell Users' Group</fr:meta>
                            <fr:meta name="video">https://vimeo.com/84104226</fr:meta>
                            <fr:meta name="video">https://vimeo.com/84249042</fr:meta>
                            <fr:meta name="slides">http://ozark.hendrix.edu/~yorgey/pub/13-11-25-nyhaskell-diagrams.pdf</fr:meta>
                          </fr:frontmatter>
                          <fr:mainmatter>
                            <html:p>Over the past ten years, I have solved over 1700 competitive programming problems in Haskell, just for fun (as well as a few that were not fun). I will give a brief introduction to competitive programming and show off some examples demonstrating the unique benefits of Haskell in this context. We will then have a miniature programming contest, open to all—only Haskell allowed!</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="/~yorgey/forest/andygill/" title="Andy Gill" uri="http://ozark.hendrix.edu/~yorgey/forest/andygill/" display-uri="andygill" type="local">Andy Gill</fr:link>
                              </fr:author>
                              <fr:author>
                                <fr:link href="/~yorgey/forest/brentyorgey/" title="Brent A. Yorgey" uri="http://ozark.hendrix.edu/~yorgey/forest/brentyorgey/" display-uri="brentyorgey" type="local">Brent A. Yorgey</fr:link>
                              </fr:author>
                            </fr:authors>
                            <fr:date>
                              <fr:year>2013</fr:year>
                              <fr:month>9</fr:month>
                              <fr:day>28</fr:day>
                            </fr:date>
                            <fr:uri>http://ozark.hendrix.edu/~yorgey/forest/yorgey-active-2013/</fr:uri>
                            <fr:display-uri>yorgey-active-2013</fr:display-uri>
                            <fr:route>/~yorgey/forest/yorgey-active-2013/</fr:route>
                            <fr:title text="Functional Active Animation">Functional Active Animation</fr:title>
                            <fr:taxon>Reference</fr:taxon>
                            <fr:meta name="venue">
                              <fr:link href="/~yorgey/forest/farm-2013/" title="FARM '13: International Workshop on Functional Art, Music, Modelling and Design" uri="http://ozark.hendrix.edu/~yorgey/forest/farm-2013/" display-uri="farm-2013" type="local"><html:em>FARM '13</html:em>: International Workshop on Functional Art, Music, Modelling and Design</fr:link>
                            </fr:meta>
                            <fr:meta name="video">http://www.youtube.com/watch?v=fb2K3h7t8fo</fr:meta>
                          </fr:frontmatter>
                          <fr:mainmatter />
                        </fr:tree>
                        <fr:tree show-metadata="true" expanded="false" toc="false" numbered="false">
                          <fr:frontmatter>
                            <fr:authors>
                              <fr:author>
                                <fr:link href="/~yorgey/forest/brentyorgey/" title="Brent A. Yorgey" uri="http://ozark.hendrix.edu/~yorgey/forest/brentyorgey/" display-uri="brentyorgey" type="local">Brent A. Yorgey</fr:link>
                              </fr:author>
                            </fr:authors>
                            <fr:date>
                              <fr:year>2012</fr:year>
                              <fr:month>9</fr:month>
                              <fr:day>13</fr:day>
                            </fr:date>
                            <fr:uri>http://ozark.hendrix.edu/~yorgey/forest/yorgey-monoids-2012/</fr:uri>
                            <fr:display-uri>yorgey-monoids-2012</fr:display-uri>
                            <fr:route>/~yorgey/forest/yorgey-monoids-2012/</fr:route>
                            <fr:title text="Monoids: Theme and Variations (Functional Pearl)">Monoids: Theme and Variations (Functional Pearl)</fr:title>
                            <fr:taxon>Reference</fr:taxon>
                            <fr:meta name="venue">
                              <fr:link href="/~yorgey/forest/haskell-2012/" title="Haskell '12: Haskell Symposium" uri="http://ozark.hendrix.edu/~yorgey/forest/haskell-2012/" display-uri="haskell-2012" type="local"><html:em>Haskell '12</html:em>: Haskell Symposium</fr:link>
                            </fr:meta>
                            <fr:meta name="doi">10.1145/2430532.2364520</fr:meta>
                            <fr:meta name="bibtex"><![CDATA[@inproceedings{10.1145/2364506.2364520,
  author = {Yorgey, Brent A.},
  title = {Monoids: Theme and Variations (Functional Pearl)},
  year = {2012},
  isbn = {978-1-4503-1574-6},
  publisher = {Association for Computing Machinery},
  address = {New York, NY, USA},
  url = {https://doi.org/10.1145/2364506.2364520},
  doi = {10.1145/2364506.2364520},
  booktitle = {Proceedings of the 2012 Haskell Symposium},
  pages = {105--116},
  numpages = {12},
  keywords = {monoid action, monoid, homomorphism, edsl},
  location = {Copenhagen, Denmark},
  series = {Haskell '12}
}]]></fr:meta>
                            <fr:meta name="pdf">http://ozark.hendrix.edu/~yorgey/pub/monoid-pearl.pdf</fr:meta>
                            <fr:meta name="slides">http://ozark.hendrix.edu/~yorgey/pub/12-09-13-monoid-pearl-HS.pdf</fr:meta>
                            <fr:meta name="video">http://www.youtube.com/watch?v=X-8NCkD2vOw</fr:meta>
                          </fr:frontmatter>
                          <fr:mainmatter>
                            <html:p>The monoid is a humble algebraic structure, at first glance even downright boring. However, there's much more to monoids than meets the eye. Using examples taken from the diagrams vector graphics framework as a case study, I demonstrate the power and beauty of monoids for library design. The paper begins with an extremely simple model of diagrams and proceeds through a series of incremental variations, all related somehow to the central theme of monoids. Along the way, I illustrate the power of compositional semantics; why you should also pay attention to the monoid's even humbler cousin, the semigroup; monoid homomorphisms; and monoid actions.</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="/~yorgey/forest/brentyorgey/" title="Brent A. Yorgey" uri="http://ozark.hendrix.edu/~yorgey/forest/brentyorgey/" display-uri="brentyorgey" type="local">Brent A. Yorgey</fr:link>
                              </fr:author>
                            </fr:authors>
                            <fr:date>
                              <fr:year>2012</fr:year>
                              <fr:month>4</fr:month>
                              <fr:day>13</fr:day>
                            </fr:date>
                            <fr:uri>http://ozark.hendrix.edu/~yorgey/forest/yorgey-compositional-drawing-2012/</fr:uri>
                            <fr:display-uri>yorgey-compositional-drawing-2012</fr:display-uri>
                            <fr:route>/~yorgey/forest/yorgey-compositional-drawing-2012/</fr:route>
                            <fr:title text="Embedded, functional, compositional drawing">Embedded, functional, compositional drawing</fr:title>
                            <fr:taxon>Reference</fr:taxon>
                            <fr:meta name="venue">
                              <fr:link href="/~yorgey/forest/williamscollege/" title="Williams College" uri="http://ozark.hendrix.edu/~yorgey/forest/williamscollege/" display-uri="williamscollege" type="local">Williams College</fr:link>
                            </fr:meta>
                          </fr:frontmatter>
                          <fr:mainmatter />
                        </fr:tree>
                      </fr:mainmatter>
                    </fr:tree>
                  </fr:mainmatter>
                </fr:tree>
              </fr:mainmatter>
            </fr:tree>
            <fr:tree show-metadata="false" expanded="false" numbered="true">
              <fr:frontmatter>
                <fr:authors />
                <fr:date>
                  <fr:year>2025</fr:year>
                  <fr:month>10</fr:month>
                  <fr:day>28</fr:day>
                </fr:date>
                <fr:uri>http://ozark.hendrix.edu/~yorgey/forest/000R/</fr:uri>
                <fr:display-uri>000R</fr:display-uri>
                <fr:route>/~yorgey/forest/000R/</fr:route>
                <fr:title text="Blog">Blog</fr:title>
              </fr:frontmatter>
              <fr:mainmatter>
                <html:p>In this forest you'll find short musings and notes; I occasionally post longer-form articles at <fr:link href="https://byorgey.github.io/blog/" type="external">blog :: Brent -&gt; [String]</fr:link>.</html:p>
              </fr:mainmatter>
            </fr:tree>
            <fr:tree show-metadata="false" expanded="false" numbered="true">
              <fr:frontmatter>
                <fr:authors />
                <fr:date>
                  <fr:year>2025</fr:year>
                  <fr:month>10</fr:month>
                  <fr:day>25</fr:day>
                </fr:date>
                <fr:uri>http://ozark.hendrix.edu/~yorgey/forest/000F/</fr:uri>
                <fr:display-uri>000F</fr:display-uri>
                <fr:route>/~yorgey/forest/000F/</fr:route>
                <fr:title text="Competitive programming">Competitive programming</fr:title>
              </fr:frontmatter>
              <fr:mainmatter>
                <html:p>I enjoy recreational competitive programming, especially in <fr:link href="/~yorgey/forest/Haskell/" title="Haskell" uri="http://ozark.hendrix.edu/~yorgey/forest/Haskell/" display-uri="Haskell" type="local">Haskell</fr:link>.</html:p>
                <html:ul><html:li>I have <fr:link href="http://ozark.hendrix.edu/~yorgey/kattis.html" type="external">solved about 2700 problems</fr:link> on <fr:link href="https://open.kattis.com/" type="external">Open Kattis</fr:link>, over 2000 of them in Haskell.</html:li>
  <html:li>I've written a series of <fr:link href="https://byorgey.github.io/blog/tag/competitive%20programming.html" type="external">blog posts about competitive programming in Haskell</fr:link>.</html:li>
  <html:li>I am the coach of the <fr:link href="/~yorgey/forest/hendrixcollege/" title="Hendrix College" uri="http://ozark.hendrix.edu/~yorgey/forest/hendrixcollege/" display-uri="hendrixcollege" type="local">Hendrix College</fr:link> competitive programming team.</html:li></html:ul>
                <fr:tree show-metadata="false">
                  <fr:frontmatter>
                    <fr:authors />
                    <fr:date>
                      <fr:year>2025</fr:year>
                      <fr:month>10</fr:month>
                      <fr:day>25</fr:day>
                    </fr:date>
                    <fr:title text="Presentations on competitive programming">Presentations on competitive programming</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="/~yorgey/forest/brentyorgey/" title="Brent A. Yorgey" uri="http://ozark.hendrix.edu/~yorgey/forest/brentyorgey/" display-uri="brentyorgey" type="local">Brent A. Yorgey</fr:link>
                          </fr:author>
                        </fr:authors>
                        <fr:date>
                          <fr:year>2025</fr:year>
                          <fr:month>6</fr:month>
                          <fr:day>9</fr:day>
                        </fr:date>
                        <fr:uri>http://ozark.hendrix.edu/~yorgey/forest/yorgey-zurihac-2025/</fr:uri>
                        <fr:display-uri>yorgey-zurihac-2025</fr:display-uri>
                        <fr:route>/~yorgey/forest/yorgey-zurihac-2025/</fr:route>
                        <fr:title text="Haskell for Competitive Programming (invited keynote)">Haskell for Competitive Programming (invited keynote)</fr:title>
                        <fr:taxon>Reference</fr:taxon>
                        <fr:meta name="venue">
                          <fr:link href="/~yorgey/forest/zurihac-2025/" title="ZuriHac 2025" uri="http://ozark.hendrix.edu/~yorgey/forest/zurihac-2025/" display-uri="zurihac-2025" type="local">ZuriHac 2025</fr:link>
                        </fr:meta>
                        <fr:meta name="video">https://www.youtube.com/watch?v=Bp_mQ62c_74</fr:meta>
                      </fr:frontmatter>
                      <fr:mainmatter>
                        <html:p>Over the past ten years, I have solved over 1700 competitive programming problems in Haskell, just for fun (as well as a few that were not fun). I will give a brief introduction to competitive programming and show off some examples demonstrating the unique benefits of Haskell in this context. We will then have a miniature programming contest, open to all—only Haskell allowed!</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="/~yorgey/forest/brentyorgey/" title="Brent A. Yorgey" uri="http://ozark.hendrix.edu/~yorgey/forest/brentyorgey/" display-uri="brentyorgey" type="local">Brent A. Yorgey</fr:link>
                          </fr:author>
                        </fr:authors>
                        <fr:date>
                          <fr:year>2021</fr:year>
                          <fr:month>9</fr:month>
                          <fr:day>10</fr:day>
                        </fr:date>
                        <fr:uri>http://ozark.hendrix.edu/~yorgey/forest/comprog-haskell-love/</fr:uri>
                        <fr:display-uri>comprog-haskell-love</fr:display-uri>
                        <fr:route>/~yorgey/forest/comprog-haskell-love/</fr:route>
                        <fr:title text="Competitive Programming in Haskell">Competitive Programming in Haskell</fr:title>
                        <fr:taxon>Reference</fr:taxon>
                        <fr:meta name="venue">Haskell Love</fr:meta>
                        <fr:meta name="video">https://www.youtube.com/watch?v=pyHdHZyyYGg</fr:meta>
                        <fr:meta name="repo">https://github.com/byorgey/HaskellLove21</fr:meta>
                      </fr:frontmatter>
                      <fr:mainmatter>
                        <html:p>Competitive programming is an exciting mind sport where competitors race to solve difficult programming tasks as quickly as possible, either individually or as part of a team. It requires sharp problem-solving skills, broad knowledge of algorithms and data structures, and (often) developing a good library of reusable code components ahead of time. Most serious competitive programmers use C++, but this is an arena where Haskell can shine: Haskell's strong type system helps prevent stupid mistakes made in the heat of the moment, and its capability for abstraction allows us to develop versatile libraries and solve problems using a minimum of boilerplate. In this talk, I will livecode a solution to a representative challenge, showing off techniques and libraries along the way.</html:p>
                        <html:p>I will also highlight some areas needing work. In some cases, in order to fit within the time limit imposed by the creators of a problem, it is necessary to write code that runs within a small constant multiple of the time taken by a C++ solution. This is possible but difficult; the name of the game is to create libraries of algorithms and data structures that are highly optimized internally but present a flexible and idiomatic interface suitable for use in a contest.</html:p>
                        <html:p>I hope that Haskellers of all skill levels will be able to take away something new, and that some will be convinced to take up a new hobby, or contribute some code!</html:p>
                      </fr:mainmatter>
                    </fr:tree>
                  </fr:mainmatter>
                </fr:tree>
              </fr:mainmatter>
            </fr:tree>
            <fr:tree show-metadata="false" expanded="false" numbered="true">
              <fr:frontmatter>
                <fr:authors>
                  <fr:author>
                    <fr:link href="/~yorgey/forest/brentyorgey/" title="Brent A. Yorgey" uri="http://ozark.hendrix.edu/~yorgey/forest/brentyorgey/" display-uri="brentyorgey" type="local">Brent A. Yorgey</fr:link>
                  </fr:author>
                </fr:authors>
                <fr:uri>http://ozark.hendrix.edu/~yorgey/forest/000D/</fr:uri>
                <fr:display-uri>000D</fr:display-uri>
                <fr:route>/~yorgey/forest/000D/</fr:route>
                <fr:title text="Publications">Publications</fr:title>
              </fr:frontmatter>
              <fr:mainmatter>
                <fr:tree show-metadata="false">
                  <fr:frontmatter>
                    <fr:authors>
                      <fr:author>
                        <fr:link href="/~yorgey/forest/brentyorgey/" title="Brent A. Yorgey" uri="http://ozark.hendrix.edu/~yorgey/forest/brentyorgey/" display-uri="brentyorgey" type="local">Brent A. Yorgey</fr:link>
                      </fr:author>
                    </fr:authors>
                    <fr:title text="Published papers">Published papers</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="/~yorgey/forest/brentyorgey/" title="Brent A. Yorgey" uri="http://ozark.hendrix.edu/~yorgey/forest/brentyorgey/" display-uri="brentyorgey" type="local">Brent A. Yorgey</fr:link>
                          </fr:author>
                        </fr:authors>
                        <fr:date>
                          <fr:year>2025</fr:year>
                          <fr:month>1</fr:month>
                          <fr:day>17</fr:day>
                        </fr:date>
                        <fr:uri>http://ozark.hendrix.edu/~yorgey/forest/yorgey-fenwick-2025/</fr:uri>
                        <fr:display-uri>yorgey-fenwick-2025</fr:display-uri>
                        <fr:route>/~yorgey/forest/yorgey-fenwick-2025/</fr:route>
                        <fr:title text="You Could Have Invented Fenwick Trees (Functional Pearl)">You Could Have Invented Fenwick Trees (Functional Pearl)</fr:title>
                        <fr:taxon>Reference</fr:taxon>
                        <fr:meta name="venue">
                          <fr:link href="/~yorgey/forest/jfp/" title="Journal of Functional Programming" uri="http://ozark.hendrix.edu/~yorgey/forest/jfp/" display-uri="jfp" type="local">Journal of Functional Programming</fr:link>
                        </fr:meta>
                        <fr:meta name="venue">
                          <fr:link href="/~yorgey/forest/icfp-2025/" title="ICFP '25: International Conference on Functional Programming" uri="http://ozark.hendrix.edu/~yorgey/forest/icfp-2025/" display-uri="icfp-2025" type="local"><html:em>ICFP '25</html:em>: International Conference on Functional Programming</fr:link>
                        </fr:meta>
                        <fr:meta name="doi">10.1017/S0956796824000169</fr:meta>
                        <fr:meta name="bibtex"><![CDATA[@article{yorgey-2025,
  title = {You could have invented Fenwick trees},
  volume = {35},
  doi = {10.1017/S0956796824000169},
  journal = {Journal of Functional Programming},
  author = {Yorgey, Brent},
  year = {2025},
  pages = {e3}
}]]></fr:meta>
                        <fr:meta name="pdf">http://ozark.hendrix.edu/~yorgey/pub/Fenwick-ext.pdf</fr:meta>
                        <fr:meta name="repo">https://github.com/byorgey/fenwick</fr:meta>
                        <fr:meta name="slides">http://ozark.hendrix.edu/~yorgey/pub/fenwick-ICFP.pdf</fr:meta>
                        <fr:meta name="video">https://youtu.be/jG2u1z_9_fg</fr:meta>
                      </fr:frontmatter>
                      <fr:mainmatter>
                        <html:p><html:em>Fenwick trees</html:em>, also known as <html:em>binary indexed trees</html:em>, are a clever solution to the problem of maintaining a sequence of values while allowing both updates and range queries in sublinear time. Their implementation is concise and efficient—but also somewhat baffling, consisting largely of nonobvious bitwise operations on indices. We begin with <html:em>segment trees</html:em>, a much more straightforward, easy-to-verify, purely functional solution to the problem, and use equational reasoning to explain the implementation of Fenwick trees as an optimized variant, making use of a Haskell EDSL for operations on infinite two's complement binary numbers.</html:p>
                        <html:p>See also this <fr:link href="https://byorgey.github.io/blog/posts/2025/01/23/Fenwick.html" type="external">blog post summary</fr:link>.  Published as part of a <fr:link href="https://www.cambridge.org/core/journals/journal-of-functional-programming/collections/program-calculation" type="external">special issue on program calculation</fr:link>.</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="/~yorgey/forest/brentyorgey/" title="Brent A. Yorgey" uri="http://ozark.hendrix.edu/~yorgey/forest/brentyorgey/" display-uri="brentyorgey" type="local">Brent A. Yorgey</fr:link>
                          </fr:author>
                        </fr:authors>
                        <fr:date>
                          <fr:year>2023</fr:year>
                          <fr:month>8</fr:month>
                          <fr:day>14</fr:day>
                        </fr:date>
                        <fr:uri>http://ozark.hendrix.edu/~yorgey/forest/yorgey-disco-2023/</fr:uri>
                        <fr:display-uri>yorgey-disco-2023</fr:display-uri>
                        <fr:route>/~yorgey/forest/yorgey-disco-2023/</fr:route>
                        <fr:title text="Disco: A Functional Programming Language for Discrete Mathematics">Disco: A Functional Programming Language for Discrete Mathematics</fr:title>
                        <fr:taxon>Reference</fr:taxon>
                        <fr:meta name="venue">
                          <fr:link href="/~yorgey/forest/tfpie-2023/" title="TFPIE '23: Trends in Functional Programming in Education" uri="http://ozark.hendrix.edu/~yorgey/forest/tfpie-2023/" display-uri="tfpie-2023" type="local"><html:em>TFPIE</html:em> '23: Trends in Functional Programming in Education</fr:link>
                        </fr:meta>
                        <fr:meta name="doi">10.4204/EPTCS.382.4</fr:meta>
                        <fr:meta name="bibtex"><![CDATA[@Inproceedings{yorgey-disco-2023,
  author    = {Yorgey, Brent A.},
  year      = {2023},
  title     = {Disco: A Functional Programming Language for Discrete Mathematics},
  editor    = {Machkasova, Elena},
  booktitle = {{\rm Proceedings Twelfth International Workshop on}
               Trends in Functional Programming in Education,
               {\rm Boston, Massachusetts, USA, 12th January 2023}},
  series    = {Electronic Proceedings in Theoretical Computer Science},
  volume    = {382},
  publisher = {Open Publishing Association},
  pages     = {64-81},
  doi       = {10.4204/EPTCS.382.4},
}]]></fr:meta>
                        <fr:meta name="pdf">http://ozark.hendrix.edu/~yorgey/pub/disco-tfpie23.pdf</fr:meta>
                        <fr:meta name="repo">https://github.com/disco-lang/disco</fr:meta>
                        <fr:meta name="slides">http://ozark.hendrix.edu/~yorgey/pub/disco-tfpie23-talk.pdf</fr:meta>
                      </fr:frontmatter>
                      <fr:mainmatter>
                        <html:p><fr:link href="/~yorgey/forest/000N/" title="Disco" uri="http://ozark.hendrix.edu/~yorgey/forest/000N/" display-uri="000N" type="local">Disco</fr:link> is a pure, strict, statically typed functional programming language designed to be used in the setting of a discrete mathematics course. The goals of the language are to introduce students to functional programming concepts early, and to enhance their learning of mathematics by providing a computational platform for them to play with. It features mathematically-inspired notation, property-based testing, equirecursive algebraic types, subtyping, built-in list, bag, and finite set types, a REPL, and student-focused documentation. Disco is implemented in Haskell, with source code available on GitHub, and interactive web-based REPL available through replit.</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="/~yorgey/forest/brentyorgey/" title="Brent A. Yorgey" uri="http://ozark.hendrix.edu/~yorgey/forest/brentyorgey/" display-uri="brentyorgey" type="local">Brent A. Yorgey</fr:link>
                          </fr:author>
                          <fr:author>
                            <fr:link href="/~yorgey/forest/kennyfoner/" title="Kenny Foner" uri="http://ozark.hendrix.edu/~yorgey/forest/kennyfoner/" display-uri="kennyfoner" type="local">Kenny Foner</fr:link>
                          </fr:author>
                        </fr:authors>
                        <fr:date>
                          <fr:year>2018</fr:year>
                          <fr:month>7</fr:month>
                          <fr:day>30</fr:day>
                        </fr:date>
                        <fr:uri>http://ozark.hendrix.edu/~yorgey/forest/yorgey-foner-2018/</fr:uri>
                        <fr:display-uri>yorgey-foner-2018</fr:display-uri>
                        <fr:route>/~yorgey/forest/yorgey-foner-2018/</fr:route>
                        <fr:title text="What's the Difference? A Functional Pearl on Subtracting Bijections">What's the Difference? A Functional Pearl on Subtracting Bijections</fr:title>
                        <fr:taxon>Reference</fr:taxon>
                        <fr:meta name="venue">
                          <fr:link href="/~yorgey/forest/icfp-2018/" title="ICFP '18: International Conference on Functional Programming" uri="http://ozark.hendrix.edu/~yorgey/forest/icfp-2018/" display-uri="icfp-2018" type="local"><html:em>ICFP '18</html:em>: International Conference on Functional Programming</fr:link>
                        </fr:meta>
                        <fr:meta name="doi">10.1145/3236796</fr:meta>
                        <fr:meta name="bibtex"><![CDATA[@article{yorgey-foner-2018,
  author = {Yorgey, Brent A. and Foner, Kenneth},
  title = {What's the Difference? A Functional Pearl on Subtracting Bijections},
  journal = {Proc. ACM Program. Lang.},
  issue_date = {September 2018},
  volume = {2},
  number = {ICFP},
  month = jul,
  year = {2018},
  issn = {2475-1421},
  pages = {101:1--101:21},
  articleno = {101},
  numpages = {21},
  url = {http://doi.acm.org/10.1145/3236796},
  doi = {10.1145/3236796},
  acmid = {3236796},
  publisher = {ACM},
  address = {New York, NY, USA},
  keywords = {bijection, difference},
}]]></fr:meta>
                        <fr:meta name="pdf">http://ozark.hendrix.edu/~yorgey/pub/GCBP-author-version.pdf</fr:meta>
                        <fr:meta name="repo">https://github.com/kwf/GCBP</fr:meta>
                        <fr:meta name="slides">http://ozark.hendrix.edu/~yorgey/pub/GCBP-ICFP-18-slides.pdf</fr:meta>
                        <fr:meta name="video">https://www.youtube.com/watch?v=hq9gAe-pmzM</fr:meta>
                      </fr:frontmatter>
                      <fr:mainmatter>
                        <html:p>It is a straightforward exercise to write a program to "add" two bijections—resulting in a bijection between two sum types, which runs the first bijection on elements from the left summand and the second bijection on the right. It is much less obvious how to "subtract" one bijection from another. This problem has been studied in the context of combinatorics, with several computational principles known for producing the "difference" of two bijections. We consider the problem from a computational and algebraic perspective, showing how to construct such bijections at a high level, avoiding pointwise reasoning or being forced to construct the forward and backward directions separately—without sacrificing performance.</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="/~yorgey/forest/satvikchauhan/" title="Satvik Chauhan" uri="http://ozark.hendrix.edu/~yorgey/forest/satvikchauhan/" display-uri="satvikchauhan" type="local">Satvik Chauhan</fr:link>
                          </fr:author>
                          <fr:author>
                            <fr:link href="/~yorgey/forest/piyushkurur/" title="Piyush P. Kurur" uri="http://ozark.hendrix.edu/~yorgey/forest/piyushkurur/" display-uri="piyushkurur" type="local">Piyush P. Kurur</fr:link>
                          </fr:author>
                          <fr:author>
                            <fr:link href="/~yorgey/forest/brentyorgey/" title="Brent A. Yorgey" uri="http://ozark.hendrix.edu/~yorgey/forest/brentyorgey/" display-uri="brentyorgey" type="local">Brent A. Yorgey</fr:link>
                          </fr:author>
                        </fr:authors>
                        <fr:date>
                          <fr:year>2016</fr:year>
                          <fr:month>9</fr:month>
                          <fr:day>8</fr:day>
                        </fr:date>
                        <fr:uri>http://ozark.hendrix.edu/~yorgey/forest/chauhan-kurur-yorgey-2016/</fr:uri>
                        <fr:display-uri>chauhan-kurur-yorgey-2016</fr:display-uri>
                        <fr:route>/~yorgey/forest/chauhan-kurur-yorgey-2016/</fr:route>
                        <fr:title text="How to Twist Pointers without Breaking Them">How to Twist Pointers without Breaking Them</fr:title>
                        <fr:taxon>Reference</fr:taxon>
                        <fr:meta name="venue">
                          <fr:link href="/~yorgey/forest/haskell-2016/" title="Haskell '16: Haskell Symposium" uri="http://ozark.hendrix.edu/~yorgey/forest/haskell-2016/" display-uri="haskell-2016" type="local"><html:em>Haskell '16</html:em>: Haskell Symposium</fr:link>
                        </fr:meta>
                        <fr:meta name="doi">10.1145/2976002.2976004</fr:meta>
                        <fr:meta name="bibtex"><![CDATA[@inproceedings{chauhan-kurur-yorgey-2016,
 author = {Chauhan, Satvik and Kurur, Piyush P. and Yorgey, Brent A.},
 title = {How to Twist Pointers Without Breaking Them},
 booktitle = {Proceedings of the 9th International Symposium on Haskell},
 series = {Haskell 2016},
 year = {2016},
 isbn = {978-1-4503-4434-0},
 location = {Nara, Japan},
 pages = {51--61},
 numpages = {11},
 url = {http://doi.acm.org/10.1145/2976002.2976004},
 doi = {10.1145/2976002.2976004},
 acmid = {2976004},
 publisher = {ACM},
 address = {New York, NY, USA},
 keywords = {applicative functor, monoid, monoid action, pointer, semi-direct product},
}]]></fr:meta>
                        <fr:meta name="pdf">http://ozark.hendrix.edu/~yorgey/pub/twisted.pdf</fr:meta>
                      </fr:frontmatter>
                      <fr:mainmatter>
                        <html:p>Using the theory of monoids and monoid actions, we give a unified
framework that handles three common pointer manipulation tasks,
namely, data serialisation, deserialisation, and memory allocation.
Our main theoretical contribution is the formulation of the notion
of a <html:em>twisted functor</html:em>, a generalisation of the semi-direct product
construction for monoids. We show that semi-direct products and
twisted functors are particularly well suited as an abstraction for
many pointer manipulation tasks.</html:p>
                        <html:p>We describe the implementation of these abstractions in the
context of a cryptographic library for Haskell. Twisted functors
allow us to abstract all pointer arithmetic and size calculations into a
few lines of code, significantly reducing the opportunities for buffer
overflows.</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="/~yorgey/forest/danpiponi/" title="Dan Piponi" uri="http://ozark.hendrix.edu/~yorgey/forest/danpiponi/" display-uri="danpiponi" type="local">Dan Piponi</fr:link>
                          </fr:author>
                          <fr:author>
                            <fr:link href="/~yorgey/forest/brentyorgey/" title="Brent A. Yorgey" uri="http://ozark.hendrix.edu/~yorgey/forest/brentyorgey/" display-uri="brentyorgey" type="local">Brent A. Yorgey</fr:link>
                          </fr:author>
                        </fr:authors>
                        <fr:date>
                          <fr:year>2015</fr:year>
                          <fr:month>1</fr:month>
                          <fr:day>1</fr:day>
                        </fr:date>
                        <fr:uri>http://ozark.hendrix.edu/~yorgey/forest/piponi-yorgey-2015/</fr:uri>
                        <fr:display-uri>piponi-yorgey-2015</fr:display-uri>
                        <fr:route>/~yorgey/forest/piponi-yorgey-2015/</fr:route>
                        <fr:title text="Polynomial Functors Constrained by Regular Expressions">Polynomial Functors Constrained by Regular Expressions</fr:title>
                        <fr:taxon>Reference</fr:taxon>
                        <fr:meta name="venue">
                          <fr:link href="/~yorgey/forest/mpc-2015/" title="MPC '15: International Conference on Mathematics of Program Construction" uri="http://ozark.hendrix.edu/~yorgey/forest/mpc-2015/" display-uri="mpc-2015" type="local"><html:em>MPC '15</html:em>: International Conference on Mathematics of Program Construction</fr:link>
                        </fr:meta>
                        <fr:meta name="doi">10.1007/978-3-319-19797-5_6</fr:meta>
                        <fr:meta name="bibtex"><![CDATA[@inproceedings{piponi-yorgey-2015,
  title={Polynomial functors constrained by regular expressions},
  author={Piponi, Dan and Yorgey, Brent A.},
  booktitle={International Conference on Mathematics of Program Construction},
  pages={113--136},
  year={2015},
  organization={Springer}
}]]></fr:meta>
                        <fr:meta name="pdf">http://ozark.hendrix.edu/~yorgey/pub/type-matrices.pdf</fr:meta>
                        <fr:meta name="slides">http://ozark.hendrix.edu/~yorgey/pub/type-matrices-mpc-15.pdf</fr:meta>
                      </fr:frontmatter>
                      <fr:mainmatter>
                        <html:p>We show that every regular language, via some DFA which accepts it, gives rise to a homomorphism from the semiring of polynomial functors to the semiring of <fr:tex display="inline"><![CDATA[n \times  n]]></fr:tex> matrices over polynomial functors. Given some polynomial functor and a regular language, this homomorphism can be used to automatically derive a functor whose values have the same shape as those of the original functor, but whose sequences of leaf types correspond to strings in the language.</html:p>
                        <html:p>The primary interest of this result lies in the fact that certain regular languages correspond to previously studied derivative-like operations on polynomial functors, which have proven useful in program construction. For example, the regular language <fr:tex display="inline"><![CDATA[a^* h a^*]]></fr:tex> yields the <html:em>derivative</html:em> of a polynomial functor, and <fr:tex display="inline"><![CDATA[b^* h a^*]]></fr:tex> its <html:em>dissection</html:em>. Using our framework, we are able to unify and lend new perspective on this previous work. For example, it turns out that dissection of polynomial functors corresponds to taking <html:em>divided differences</html:em> of real or complex functions, and, guided by this parallel, we show how to generalize binary dissection to <fr:tex display="inline"><![CDATA[n]]></fr:tex>-ary dissection.</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="/~yorgey/forest/brentyorgey/" title="Brent A. Yorgey" uri="http://ozark.hendrix.edu/~yorgey/forest/brentyorgey/" display-uri="brentyorgey" type="local">Brent A. Yorgey</fr:link>
                          </fr:author>
                        </fr:authors>
                        <fr:date>
                          <fr:year>2012</fr:year>
                          <fr:month>9</fr:month>
                          <fr:day>13</fr:day>
                        </fr:date>
                        <fr:uri>http://ozark.hendrix.edu/~yorgey/forest/yorgey-monoids-2012/</fr:uri>
                        <fr:display-uri>yorgey-monoids-2012</fr:display-uri>
                        <fr:route>/~yorgey/forest/yorgey-monoids-2012/</fr:route>
                        <fr:title text="Monoids: Theme and Variations (Functional Pearl)">Monoids: Theme and Variations (Functional Pearl)</fr:title>
                        <fr:taxon>Reference</fr:taxon>
                        <fr:meta name="venue">
                          <fr:link href="/~yorgey/forest/haskell-2012/" title="Haskell '12: Haskell Symposium" uri="http://ozark.hendrix.edu/~yorgey/forest/haskell-2012/" display-uri="haskell-2012" type="local"><html:em>Haskell '12</html:em>: Haskell Symposium</fr:link>
                        </fr:meta>
                        <fr:meta name="doi">10.1145/2430532.2364520</fr:meta>
                        <fr:meta name="bibtex"><![CDATA[@inproceedings{10.1145/2364506.2364520,
  author = {Yorgey, Brent A.},
  title = {Monoids: Theme and Variations (Functional Pearl)},
  year = {2012},
  isbn = {978-1-4503-1574-6},
  publisher = {Association for Computing Machinery},
  address = {New York, NY, USA},
  url = {https://doi.org/10.1145/2364506.2364520},
  doi = {10.1145/2364506.2364520},
  booktitle = {Proceedings of the 2012 Haskell Symposium},
  pages = {105--116},
  numpages = {12},
  keywords = {monoid action, monoid, homomorphism, edsl},
  location = {Copenhagen, Denmark},
  series = {Haskell '12}
}]]></fr:meta>
                        <fr:meta name="pdf">http://ozark.hendrix.edu/~yorgey/pub/monoid-pearl.pdf</fr:meta>
                        <fr:meta name="slides">http://ozark.hendrix.edu/~yorgey/pub/12-09-13-monoid-pearl-HS.pdf</fr:meta>
                        <fr:meta name="video">http://www.youtube.com/watch?v=X-8NCkD2vOw</fr:meta>
                      </fr:frontmatter>
                      <fr:mainmatter>
                        <html:p>The monoid is a humble algebraic structure, at first glance even downright boring. However, there's much more to monoids than meets the eye. Using examples taken from the diagrams vector graphics framework as a case study, I demonstrate the power and beauty of monoids for library design. The paper begins with an extremely simple model of diagrams and proceeds through a series of incremental variations, all related somehow to the central theme of monoids. Along the way, I illustrate the power of compositional semantics; why you should also pay attention to the monoid's even humbler cousin, the semigroup; monoid homomorphisms; and monoid actions.</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="/~yorgey/forest/brentyorgey/" title="Brent A. Yorgey" uri="http://ozark.hendrix.edu/~yorgey/forest/brentyorgey/" display-uri="brentyorgey" type="local">Brent A. Yorgey</fr:link>
                          </fr:author>
                          <fr:author>
                            <fr:link href="/~yorgey/forest/stephanieweirich/" title="Stephanie Weirich" uri="http://ozark.hendrix.edu/~yorgey/forest/stephanieweirich/" display-uri="stephanieweirich" type="local">Stephanie Weirich</fr:link>
                          </fr:author>
                          <fr:author>
                            <fr:link href="/~yorgey/forest/juliencretin/" title="Julien Cretin" uri="http://ozark.hendrix.edu/~yorgey/forest/juliencretin/" display-uri="juliencretin" type="local">Julien Cretin</fr:link>
                          </fr:author>
                          <fr:author>
                            <fr:link href="/~yorgey/forest/spj/" title="Simon Petyon Jones" uri="http://ozark.hendrix.edu/~yorgey/forest/spj/" display-uri="spj" type="local">Simon Petyon Jones</fr:link>
                          </fr:author>
                          <fr:author>
                            <fr:link href="/~yorgey/forest/dimitriosvytiniotis/" title="Dimitrios Vytiniotis" uri="http://ozark.hendrix.edu/~yorgey/forest/dimitriosvytiniotis/" display-uri="dimitriosvytiniotis" type="local">Dimitrios Vytiniotis</fr:link>
                          </fr:author>
                          <fr:author>
                            <fr:link href="/~yorgey/forest/josemagalhaes/" title="José Pedro Magalhães" uri="http://ozark.hendrix.edu/~yorgey/forest/josemagalhaes/" display-uri="josemagalhaes" type="local">José Pedro Magalhães</fr:link>
                          </fr:author>
                        </fr:authors>
                        <fr:date>
                          <fr:year>2012</fr:year>
                          <fr:month>1</fr:month>
                          <fr:day>28</fr:day>
                        </fr:date>
                        <fr:uri>http://ozark.hendrix.edu/~yorgey/forest/yorgey-promotion-2012/</fr:uri>
                        <fr:display-uri>yorgey-promotion-2012</fr:display-uri>
                        <fr:route>/~yorgey/forest/yorgey-promotion-2012/</fr:route>
                        <fr:title text="Giving Haskell a Promotion">Giving Haskell a Promotion</fr:title>
                        <fr:taxon>Reference</fr:taxon>
                        <fr:meta name="venue">
                          <fr:link href="/~yorgey/forest/tldi-2012/" title="TLDI '12: Workshop on Types in Language Design and Implementation" uri="http://ozark.hendrix.edu/~yorgey/forest/tldi-2012/" display-uri="tldi-2012" type="local"><html:em>TLDI '12</html:em>: Workshop on Types in Language Design and Implementation</fr:link>
                        </fr:meta>
                        <fr:meta name="doi">10.1145/2103786.2103795</fr:meta>
                        <fr:meta name="bibtex"><![CDATA[@inproceedings{Yorgey:2012:GHP:2103786.2103795,
  author = {Yorgey, Brent A. and Weirich, Stephanie and Cretin, Julien and Peyton Jones, Simon and Vytiniotis, Dimitrios and Magalh\~{a}es, Jos{\'e} Pedro},
  title = {Giving Haskell a Promotion},
  booktitle = {Proceedings of the 8th ACM SIGPLAN Workshop on Types in Language Design and Implementation},
  series = {TLDI '12},
  year = {2012},
  isbn = {978-1-4503-1120-5},
  location = {Philadelphia, Pennsylvania, USA},
  pages = {53--66},
  numpages = {14},
  url = {http://doi.acm.org/10.1145/2103786.2103795},
  doi = {10.1145/2103786.2103795},
  acmid = {2103795},
  publisher = {ACM},
  address = {New York, NY, USA},
  keywords = {haskell, kinds, polymorphism, promotion},
}]]></fr:meta>
                        <fr:meta name="pdf">http://ozark.hendrix.edu/~yorgey/pub/promotion.pdf</fr:meta>
                      </fr:frontmatter>
                      <fr:mainmatter>
                        <html:p>Static type systems strive to be richly expressive while still being simple enough for programmers to use. We describe an experiment that enriches Haskell's kind system with two features promoted from its type system: data types and polymorphism. The new system has a very good power-to-weight ratio: it offers a significant improvement in expressiveness, but, by re-using concepts that programmers are already familiar with, the system is easy to understand and implement.</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="/~yorgey/forest/stephanieweirich/" title="Stephanie Weirich" uri="http://ozark.hendrix.edu/~yorgey/forest/stephanieweirich/" display-uri="stephanieweirich" type="local">Stephanie Weirich</fr:link>
                          </fr:author>
                          <fr:author>
                            <fr:link href="/~yorgey/forest/brentyorgey/" title="Brent A. Yorgey" uri="http://ozark.hendrix.edu/~yorgey/forest/brentyorgey/" display-uri="brentyorgey" type="local">Brent A. Yorgey</fr:link>
                          </fr:author>
                          <fr:author>
                            <fr:link href="/~yorgey/forest/timsheard/" title="Tim Sheard" uri="http://ozark.hendrix.edu/~yorgey/forest/timsheard/" display-uri="timsheard" type="local">Tim Sheard</fr:link>
                          </fr:author>
                        </fr:authors>
                        <fr:date>
                          <fr:year>2011</fr:year>
                          <fr:month>9</fr:month>
                          <fr:day>19</fr:day>
                        </fr:date>
                        <fr:uri>http://ozark.hendrix.edu/~yorgey/forest/weirich-yorgey-sheard-2011/</fr:uri>
                        <fr:display-uri>weirich-yorgey-sheard-2011</fr:display-uri>
                        <fr:route>/~yorgey/forest/weirich-yorgey-sheard-2011/</fr:route>
                        <fr:title text="Binders Unbound">Binders Unbound</fr:title>
                        <fr:taxon>Reference</fr:taxon>
                        <fr:meta name="venue">
                          <fr:link href="/~yorgey/forest/icfp-2011/" title="ICFP '11: International Conference on Functional Programming" uri="http://ozark.hendrix.edu/~yorgey/forest/icfp-2011/" display-uri="icfp-2011" type="local"><html:em>ICFP '11</html:em>: International Conference on Functional Programming</fr:link>
                        </fr:meta>
                        <fr:meta name="doi">10.1145/2034773.2034818</fr:meta>
                        <fr:meta name="bibtex"><![CDATA[@inproceedings{weirich-yorgey-sheard-2011-unbound,
  author = {Weirich, Stephanie and Yorgey, Brent A. and Sheard, Tim},
  title = {Binders Unbound},
  booktitle = {Proceedings of the 16th ACM SIGPLAN International Conference on Functional Programming},
  series = {ICFP '11},
  year = {2011},
  isbn = {978-1-4503-0865-6},
  location = {Tokyo, Japan},
  pages = {333--345},
  numpages = {13},
  url = {http://doi.acm.org/10.1145/2034773.2034818},
  doi = {10.1145/2034773.2034818},
  acmid = {2034818},
  publisher = {ACM},
  address = {New York, NY, USA},
  keywords = {generic programming, haskell, name binding, patterns},
}]]></fr:meta>
                        <fr:meta name="pdf">http://ozark.hendrix.edu/~yorgey/pub/unbound.pdf</fr:meta>
                        <fr:meta name="video">https://dl.acm.org/doi/suppl/10.1145/2034574.2034818/suppl_file/_talk6.mp4</fr:meta>
                      </fr:frontmatter>
                      <fr:mainmatter>
                        <html:p>Implementors of compilers, program refactorers, theorem provers, proof checkers, and other systems that manipulate syntax know that dealing with name binding is difficult to do well. Operations such as α-equivalence and capture-avoiding substitution seem simple, yet subtle bugs often go undetected. Furthermore, their implementations are tedious, requiring "boilerplate" code that must be updated whenever the object language definition changes.</html:p>
                        <html:p>Many researchers have therefore sought to specify binding syntax declaratively, so that tools can correctly handle the details behind the scenes. This idea has been the inspiration for many new systems (such as Beluga, Delphin, FreshML, FreshOCaml, Cαml, FreshLib, and Ott) but there is still room for improvement in expressivity, simplicity and convenience.</html:p>
                        <html:p>In this paper, we present a new domain-specific language, Unbound, for specifying binding structure. Our language is particularly expressive - it supports multiple atom types, pattern binders, type annotations, recursive binders, and nested binding (necessary for telescopes, a feature found in dependently-typed languages). However, our specification language is also simple, consisting of just five basic combinators. We provide a formal semantics for this language derived from a locally nameless representation and prove that it satisfies a number of desirable properties.</html:p>
                        <html:p>We also present an implementation of our binding specification language as a GHC Haskell library implementing an embedded domain specific language (EDSL). By using Haskell type constructors to represent binding combinators, we implement the EDSL succinctly using datatype-generic programming. Our implementation supports a number of features necessary for practical programming, including flexibility in the treatment of user-defined types, best-effort name preservation (for error messages), and integration with Haskell's monad transformer library.</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="/~yorgey/forest/brentyorgey/" title="Brent A. Yorgey" uri="http://ozark.hendrix.edu/~yorgey/forest/brentyorgey/" display-uri="brentyorgey" type="local">Brent A. Yorgey</fr:link>
                          </fr:author>
                        </fr:authors>
                        <fr:date>
                          <fr:year>2010</fr:year>
                          <fr:month>9</fr:month>
                          <fr:day>30</fr:day>
                        </fr:date>
                        <fr:uri>http://ozark.hendrix.edu/~yorgey/forest/yorgey-species-2010/</fr:uri>
                        <fr:display-uri>yorgey-species-2010</fr:display-uri>
                        <fr:route>/~yorgey/forest/yorgey-species-2010/</fr:route>
                        <fr:title text="Species and Functors and Types, Oh My! (Functional Pearl)">Species and Functors and Types, Oh My! (Functional Pearl)</fr:title>
                        <fr:taxon>Reference</fr:taxon>
                        <fr:meta name="venue">
                          <fr:link href="/~yorgey/forest/haskell-2010/" title="Haskell '10: Haskell Symposium" uri="http://ozark.hendrix.edu/~yorgey/forest/haskell-2010/" display-uri="haskell-2010" type="local"><html:em>Haskell '10</html:em>: Haskell Symposium</fr:link>
                        </fr:meta>
                        <fr:meta name="doi">10.1145/1863523.186354</fr:meta>
                        <fr:meta name="bibtex"><![CDATA[@inproceedings{yorgey-2010-species,
  author = {Yorgey, Brent A.},
  title = {Species and functors and types, oh my!},
  booktitle = {Proceedings of the third ACM Haskell symposium on Haskell},
  series = {Haskell '10},
  year = {2010},
  isbn = {978-1-4503-0252-4},
  location = {Baltimore, Maryland, USA},
  pages = {147--158},
  numpages = {12},
  url = {http://doi.acm.org/10.1145/1863523.1863542},
  doi = {http://doi.acm.org/10.1145/1863523.1863542},
  acmid = {1863542},
  publisher = {ACM},
  address = {New York, NY, USA},
  keywords = {algebraic data types, combinatorial species},
}]]></fr:meta>
                        <fr:meta name="pdf">http://ozark.hendrix.edu/~yorgey/pub/species-pearl.pdf</fr:meta>
                        <fr:meta name="video">http://vimeo.com/16753644</fr:meta>
                      </fr:frontmatter>
                      <fr:mainmatter>
                        <html:p>The theory of <html:em>combinatorial species</html:em>, although invented as a purely mathematical formalism to unify much of combinatorics, can also serve as a powerful and expressive language for talking about data types. With potential applications to automatic test generation, generic programming, and language design, the theory deserves to be much better known in the functional programming community. This paper aims to teach the basic theory of combinatorial species using motivation and examples from the world of functional programming. It also introduces the <html:code>species</html:code> library, available on Hackage, which is used to illustrate the concepts introduced and can serve as a platform for continued study and research.</html:p>
                      </fr:mainmatter>
                    </fr:tree>
                  </fr:mainmatter>
                </fr:tree>
                <fr:tree show-metadata="false">
                  <fr:frontmatter>
                    <fr:authors>
                      <fr:author>
                        <fr:link href="/~yorgey/forest/brentyorgey/" title="Brent A. Yorgey" uri="http://ozark.hendrix.edu/~yorgey/forest/brentyorgey/" display-uri="brentyorgey" type="local">Brent A. Yorgey</fr:link>
                      </fr:author>
                    </fr:authors>
                    <fr:title text="Dissertation">Dissertation</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="/~yorgey/forest/brentyorgey/" title="Brent A. Yorgey" uri="http://ozark.hendrix.edu/~yorgey/forest/brentyorgey/" display-uri="brentyorgey" type="local">Brent A. Yorgey</fr:link>
                          </fr:author>
                        </fr:authors>
                        <fr:date>
                          <fr:year>2014</fr:year>
                          <fr:month>10</fr:month>
                          <fr:day>14</fr:day>
                        </fr:date>
                        <fr:uri>http://ozark.hendrix.edu/~yorgey/forest/yorgey-species-2015/</fr:uri>
                        <fr:display-uri>yorgey-species-2015</fr:display-uri>
                        <fr:route>/~yorgey/forest/yorgey-species-2015/</fr:route>
                        <fr:title text="Combinatorial Species and Labelled Structures">Combinatorial Species and Labelled Structures</fr:title>
                        <fr:taxon>Reference</fr:taxon>
                        <fr:meta name="venue">Doctoral dissertation, <fr:link href="/~yorgey/forest/upenn/" title="University of Pennsylvania" uri="http://ozark.hendrix.edu/~yorgey/forest/upenn/" display-uri="upenn" type="local">University of Pennsylvania</fr:link></fr:meta>
                        <fr:meta name="bibtex"><![CDATA[@phdthesis{yorgey-2014-thesis,
  author = {Yorgey, Brent A.},
  school = {University of Pennsylvania},
  year = {2014},
  title = {Combinatorial Species and Labelled Structures}
}]]></fr:meta>
                        <fr:meta name="pdf">http://ozark.hendrix.edu/~yorgey/pub/thesis.pdf</fr:meta>
                        <fr:meta name="slides">http://ozark.hendrix.edu/~yorgey/pub/yorgey-defense-slides.pdf</fr:meta>
                      </fr:frontmatter>
                      <fr:mainmatter>
                        <html:p>The theory of combinatorial species was developed in the 1980s as part of the mathematical subfield of enumerative combinatorics, unifying and putting on a firmer theoretical basis a collection of techniques centered around generating functions. The theory of algebraic data types was developed, around the same time, in functional programming languages such as Hope and Miranda, and is still used today in languages such as Haskell, the ML family, and Scala. Despite their disparate origins, the two theories have striking similarities. In particular, both constitute algebraic frameworks in which to construct structures of interest. Though the similarity has not gone unnoticed, a link between combinatorial species and algebraic data types has never been systematically explored. This dissertation lays the theoretical groundwork for a precise—and, hopefully, useful—bridge bewteen the two theories. One of the key contributions is to port the theory of species from a classical, untyped set theory to a constructive type theory. This porting process is nontrivial, and involves fundamental issues related to equality and finiteness; the recently developed homotopy type theory is put to good use formalizing these issues in a satisfactory way. In conjunction with this port, species as general functor categories are considered, systematically analyzing the categorical properties necessary to define each standard species operation. Another key contribution is to clarify the role of species as labelled shapes, not containing any data, and to use the theory of analytic functors to model labelled data structures, which have both labelled shapes and data associated to the labels. Finally, some novel species variants are considered, which may prove to be of use in explicitly modelling the memory layout used to store labelled data structures.</html:p>
                      </fr:mainmatter>
                    </fr:tree>
                  </fr:mainmatter>
                </fr:tree>
                <fr:tree show-metadata="false">
                  <fr:frontmatter>
                    <fr:authors>
                      <fr:author>
                        <fr:link href="/~yorgey/forest/brentyorgey/" title="Brent A. Yorgey" uri="http://ozark.hendrix.edu/~yorgey/forest/brentyorgey/" display-uri="brentyorgey" type="local">Brent A. Yorgey</fr:link>
                      </fr:author>
                    </fr:authors>
                    <fr:title text="Books">Books</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="/~yorgey/forest/bcp/" title="Benjamin C. Pierce" uri="http://ozark.hendrix.edu/~yorgey/forest/bcp/" display-uri="bcp" type="local">Benjamin C. Pierce</fr:link>
                          </fr:author>
                          <fr:author>
                            <fr:link href="/~yorgey/forest/arthuramorim/" title="Arthur Azevedo de Amorim" uri="http://ozark.hendrix.edu/~yorgey/forest/arthuramorim/" display-uri="arthuramorim" type="local">Arthur Azevedo de Amorim</fr:link>
                          </fr:author>
                          <fr:author>
                            <fr:link href="/~yorgey/forest/ccasin/" title="Chris Casinghino" uri="http://ozark.hendrix.edu/~yorgey/forest/ccasin/" display-uri="ccasin" type="local">Chris Casinghino</fr:link>
                          </fr:author>
                          <fr:author>
                            <fr:link href="/~yorgey/forest/marcogaboardi/" title="Marco Gaboardi" uri="http://ozark.hendrix.edu/~yorgey/forest/marcogaboardi/" display-uri="marcogaboardi" type="local">Marco Gaboardi</fr:link>
                          </fr:author>
                          <fr:author>
                            <fr:link href="/~yorgey/forest/michaelgreenberg/" title="Michael Greenberg" uri="http://ozark.hendrix.edu/~yorgey/forest/michaelgreenberg/" display-uri="michaelgreenberg" type="local">Michael Greenberg</fr:link>
                          </fr:author>
                          <fr:author>
                            <fr:link href="/~yorgey/forest/catalinhritcu/" title="Cătălin Hriţcu" uri="http://ozark.hendrix.edu/~yorgey/forest/catalinhritcu/" display-uri="catalinhritcu" type="local">Cătălin Hriţcu</fr:link>
                          </fr:author>
                          <fr:author>
                            <fr:link href="/~yorgey/forest/vilhelm/" title="Vilhelm Sjöberg" uri="http://ozark.hendrix.edu/~yorgey/forest/vilhelm/" display-uri="vilhelm" type="local">Vilhelm Sjöberg</fr:link>
                          </fr:author>
                          <fr:author>
                            <fr:link href="/~yorgey/forest/brentyorgey/" title="Brent A. Yorgey" uri="http://ozark.hendrix.edu/~yorgey/forest/brentyorgey/" display-uri="brentyorgey" type="local">Brent A. Yorgey</fr:link>
                          </fr:author>
                        </fr:authors>
                        <fr:uri>http://ozark.hendrix.edu/~yorgey/forest/sf1/</fr:uri>
                        <fr:display-uri>sf1</fr:display-uri>
                        <fr:route>/~yorgey/forest/sf1/</fr:route>
                        <fr:title text="Software Foundations, Volume 1: Logical Foundations">Software Foundations, Volume 1: Logical Foundations</fr:title>
                        <fr:taxon>Reference</fr:taxon>
                        <fr:meta name="external">https://softwarefoundations.cis.upenn.edu/lf-current/index.html</fr:meta>
                      </fr:frontmatter>
                      <fr:mainmatter />
                    </fr:tree>
                    <fr:tree show-metadata="true" expanded="false" toc="false" numbered="false">
                      <fr:frontmatter>
                        <fr:authors>
                          <fr:author>
                            <fr:link href="/~yorgey/forest/bcp/" title="Benjamin C. Pierce" uri="http://ozark.hendrix.edu/~yorgey/forest/bcp/" display-uri="bcp" type="local">Benjamin C. Pierce</fr:link>
                          </fr:author>
                          <fr:author>
                            <fr:link href="/~yorgey/forest/arthuramorim/" title="Arthur Azevedo de Amorim" uri="http://ozark.hendrix.edu/~yorgey/forest/arthuramorim/" display-uri="arthuramorim" type="local">Arthur Azevedo de Amorim</fr:link>
                          </fr:author>
                          <fr:author>
                            <fr:link href="/~yorgey/forest/ccasin/" title="Chris Casinghino" uri="http://ozark.hendrix.edu/~yorgey/forest/ccasin/" display-uri="ccasin" type="local">Chris Casinghino</fr:link>
                          </fr:author>
                          <fr:author>
                            <fr:link href="/~yorgey/forest/marcogaboardi/" title="Marco Gaboardi" uri="http://ozark.hendrix.edu/~yorgey/forest/marcogaboardi/" display-uri="marcogaboardi" type="local">Marco Gaboardi</fr:link>
                          </fr:author>
                          <fr:author>
                            <fr:link href="/~yorgey/forest/michaelgreenberg/" title="Michael Greenberg" uri="http://ozark.hendrix.edu/~yorgey/forest/michaelgreenberg/" display-uri="michaelgreenberg" type="local">Michael Greenberg</fr:link>
                          </fr:author>
                          <fr:author>
                            <fr:link href="/~yorgey/forest/catalinhritcu/" title="Cătălin Hriţcu" uri="http://ozark.hendrix.edu/~yorgey/forest/catalinhritcu/" display-uri="catalinhritcu" type="local">Cătălin Hriţcu</fr:link>
                          </fr:author>
                          <fr:author>
                            <fr:link href="/~yorgey/forest/vilhelm/" title="Vilhelm Sjöberg" uri="http://ozark.hendrix.edu/~yorgey/forest/vilhelm/" display-uri="vilhelm" type="local">Vilhelm Sjöberg</fr:link>
                          </fr:author>
                          <fr:author>
                            <fr:link href="/~yorgey/forest/andrewtolmach/" title="Andrew Tolmach" uri="http://ozark.hendrix.edu/~yorgey/forest/andrewtolmach/" display-uri="andrewtolmach" type="local">Andrew Tolmach</fr:link>
                          </fr:author>
                          <fr:author>
                            <fr:link href="/~yorgey/forest/brentyorgey/" title="Brent A. Yorgey" uri="http://ozark.hendrix.edu/~yorgey/forest/brentyorgey/" display-uri="brentyorgey" type="local">Brent A. Yorgey</fr:link>
                          </fr:author>
                        </fr:authors>
                        <fr:uri>http://ozark.hendrix.edu/~yorgey/forest/sf2/</fr:uri>
                        <fr:display-uri>sf2</fr:display-uri>
                        <fr:route>/~yorgey/forest/sf2/</fr:route>
                        <fr:title text="Software Foundations, Volume 2: Programming Language Foundations">Software Foundations, Volume 2: Programming Language Foundations</fr:title>
                        <fr:taxon>Reference</fr:taxon>
                        <fr:meta name="external">https://softwarefoundations.cis.upenn.edu/plf-current/index.html</fr:meta>
                      </fr:frontmatter>
                      <fr:mainmatter />
                    </fr:tree>
                  </fr:mainmatter>
                </fr:tree>
                <fr:tree show-metadata="false">
                  <fr:frontmatter>
                    <fr:authors>
                      <fr:author>
                        <fr:link href="/~yorgey/forest/brentyorgey/" title="Brent A. Yorgey" uri="http://ozark.hendrix.edu/~yorgey/forest/brentyorgey/" display-uri="brentyorgey" type="local">Brent A. Yorgey</fr:link>
                      </fr:author>
                    </fr:authors>
                    <fr:title text="Presentations">Presentations</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="/~yorgey/forest/brentyorgey/" title="Brent A. Yorgey" uri="http://ozark.hendrix.edu/~yorgey/forest/brentyorgey/" display-uri="brentyorgey" type="local">Brent A. Yorgey</fr:link>
                          </fr:author>
                        </fr:authors>
                        <fr:date>
                          <fr:year>2025</fr:year>
                          <fr:month>6</fr:month>
                          <fr:day>9</fr:day>
                        </fr:date>
                        <fr:uri>http://ozark.hendrix.edu/~yorgey/forest/yorgey-zurihac-2025/</fr:uri>
                        <fr:display-uri>yorgey-zurihac-2025</fr:display-uri>
                        <fr:route>/~yorgey/forest/yorgey-zurihac-2025/</fr:route>
                        <fr:title text="Haskell for Competitive Programming (invited keynote)">Haskell for Competitive Programming (invited keynote)</fr:title>
                        <fr:taxon>Reference</fr:taxon>
                        <fr:meta name="venue">
                          <fr:link href="/~yorgey/forest/zurihac-2025/" title="ZuriHac 2025" uri="http://ozark.hendrix.edu/~yorgey/forest/zurihac-2025/" display-uri="zurihac-2025" type="local">ZuriHac 2025</fr:link>
                        </fr:meta>
                        <fr:meta name="video">https://www.youtube.com/watch?v=Bp_mQ62c_74</fr:meta>
                      </fr:frontmatter>
                      <fr:mainmatter>
                        <html:p>Over the past ten years, I have solved over 1700 competitive programming problems in Haskell, just for fun (as well as a few that were not fun). I will give a brief introduction to competitive programming and show off some examples demonstrating the unique benefits of Haskell in this context. We will then have a miniature programming contest, open to all—only Haskell allowed!</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="/~yorgey/forest/brentyorgey/" title="Brent A. Yorgey" uri="http://ozark.hendrix.edu/~yorgey/forest/brentyorgey/" display-uri="brentyorgey" type="local">Brent A. Yorgey</fr:link>
                          </fr:author>
                        </fr:authors>
                        <fr:date>
                          <fr:year>2025</fr:year>
                          <fr:month>1</fr:month>
                          <fr:day>30</fr:day>
                        </fr:date>
                        <fr:uri>http://ozark.hendrix.edu/~yorgey/forest/idiomatic-inference-PLV/</fr:uri>
                        <fr:display-uri>idiomatic-inference-PLV</fr:display-uri>
                        <fr:route>/~yorgey/forest/idiomatic-inference-PLV/</fr:route>
                        <fr:title text="Idiomatic Inference for DSLs">Idiomatic Inference for DSLs</fr:title>
                        <fr:taxon>Reference</fr:taxon>
                        <fr:meta name="venue"><fr:link href="/~yorgey/forest/psu/" title="Portland State University" uri="http://ozark.hendrix.edu/~yorgey/forest/psu/" display-uri="psu" type="local">Portland State University</fr:link> PLV seminar</fr:meta>
                        <fr:meta name="slides">http://ozark.hendrix.edu/~yorgey/pub/PLV-idiomatic-inference.pdf</fr:meta>
                        <fr:meta name="repo">https://github.com/byorgey/infer-applicative</fr:meta>
                      </fr:frontmatter>
                      <fr:mainmatter>
                        <html:p>McBride and Paterson's <html:em>idioms</html:em>, or <html:em>applicative functors</html:em>, are a well-known abstraction defining function application in some ambient effectful context.  It would often be useful, especially in the context of designing domain-specific languages, to <html:em>infer</html:em> such "idiomatic'' application, allowing the programmer to use plain function application syntax—but only when doing so is unambiguous.  I will present work in progress characterizing the conditions necessary for this to be possible.</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="/~yorgey/forest/brentyorgey/" title="Brent A. Yorgey" uri="http://ozark.hendrix.edu/~yorgey/forest/brentyorgey/" display-uri="brentyorgey" type="local">Brent A. Yorgey</fr:link>
                          </fr:author>
                        </fr:authors>
                        <fr:date>
                          <fr:year>2024</fr:year>
                          <fr:month>9</fr:month>
                          <fr:day>6</fr:day>
                        </fr:date>
                        <fr:uri>http://ozark.hendrix.edu/~yorgey/forest/joy-functional-haskell/</fr:uri>
                        <fr:display-uri>joy-functional-haskell</fr:display-uri>
                        <fr:route>/~yorgey/forest/joy-functional-haskell/</fr:route>
                        <fr:title text="The Joy of Building (Functional) Languages (invited keynote)">The Joy of Building (Functional) Languages (invited keynote)</fr:title>
                        <fr:taxon>Reference</fr:taxon>
                        <fr:meta name="venue">
                          <fr:link href="/~yorgey/forest/haskell-2024/" title="Haskell '24: Haskell Symposium" uri="http://ozark.hendrix.edu/~yorgey/forest/haskell-2024/" display-uri="haskell-2024" type="local"><html:em>Haskell '24</html:em>: Haskell Symposium</fr:link>
                        </fr:meta>
                        <fr:meta name="slides">http://ozark.hendrix.edu/~yorgey/pub/HS24-keynote.pdf</fr:meta>
                        <fr:meta name="repo">https://github.com/byorgey/HS24-keynote</fr:meta>
                        <fr:meta name="video">https://www.youtube.com/watch?v=C8PcRqIToCM</fr:meta>
                      </fr:frontmatter>
                      <fr:mainmatter>
                        <html:p>For almost as long as I can remember, all my best projects—the ones that I’m proudest of, the ones that have been the most fruitful and brought me the most joy—have all centered around building some kind of language. Perhaps I am just weird, but I think there is something uniquely joyful about not just expressing oneself, but creating a whole new means of expression for oneself and others. I will take you on a tour of some of my most interesting and joyful language-building projects (some of which you have probably heard of, some of which you definitely haven’t), and then we will build a language together!</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="/~yorgey/forest/brentyorgey/" title="Brent A. Yorgey" uri="http://ozark.hendrix.edu/~yorgey/forest/brentyorgey/" display-uri="brentyorgey" type="local">Brent A. Yorgey</fr:link>
                          </fr:author>
                        </fr:authors>
                        <fr:date>
                          <fr:year>2021</fr:year>
                          <fr:month>9</fr:month>
                          <fr:day>10</fr:day>
                        </fr:date>
                        <fr:uri>http://ozark.hendrix.edu/~yorgey/forest/comprog-haskell-love/</fr:uri>
                        <fr:display-uri>comprog-haskell-love</fr:display-uri>
                        <fr:route>/~yorgey/forest/comprog-haskell-love/</fr:route>
                        <fr:title text="Competitive Programming in Haskell">Competitive Programming in Haskell</fr:title>
                        <fr:taxon>Reference</fr:taxon>
                        <fr:meta name="venue">Haskell Love</fr:meta>
                        <fr:meta name="video">https://www.youtube.com/watch?v=pyHdHZyyYGg</fr:meta>
                        <fr:meta name="repo">https://github.com/byorgey/HaskellLove21</fr:meta>
                      </fr:frontmatter>
                      <fr:mainmatter>
                        <html:p>Competitive programming is an exciting mind sport where competitors race to solve difficult programming tasks as quickly as possible, either individually or as part of a team. It requires sharp problem-solving skills, broad knowledge of algorithms and data structures, and (often) developing a good library of reusable code components ahead of time. Most serious competitive programmers use C++, but this is an arena where Haskell can shine: Haskell's strong type system helps prevent stupid mistakes made in the heat of the moment, and its capability for abstraction allows us to develop versatile libraries and solve problems using a minimum of boilerplate. In this talk, I will livecode a solution to a representative challenge, showing off techniques and libraries along the way.</html:p>
                        <html:p>I will also highlight some areas needing work. In some cases, in order to fit within the time limit imposed by the creators of a problem, it is necessary to write code that runs within a small constant multiple of the time taken by a C++ solution. This is possible but difficult; the name of the game is to create libraries of algorithms and data structures that are highly optimized internally but present a flexible and idiomatic interface suitable for use in a contest.</html:p>
                        <html:p>I hope that Haskellers of all skill levels will be able to take away something new, and that some will be convinced to take up a new hobby, or contribute some code!</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="/~yorgey/forest/brentyorgey/" title="Brent A. Yorgey" uri="http://ozark.hendrix.edu/~yorgey/forest/brentyorgey/" display-uri="brentyorgey" type="local">Brent A. Yorgey</fr:link>
                          </fr:author>
                        </fr:authors>
                        <fr:date>
                          <fr:year>2018</fr:year>
                          <fr:month>4</fr:month>
                          <fr:day>6</fr:day>
                        </fr:date>
                        <fr:uri>http://ozark.hendrix.edu/~yorgey/forest/yorgey-graph-coloring-SAT-CCSC/</fr:uri>
                        <fr:display-uri>yorgey-graph-coloring-SAT-CCSC</fr:display-uri>
                        <fr:route>/~yorgey/forest/yorgey-graph-coloring-SAT-CCSC/</fr:route>
                        <fr:title text="Graph Coloring with a SAT Solver">Graph Coloring with a SAT Solver</fr:title>
                        <fr:taxon>Reference</fr:taxon>
                        <fr:meta name="venue">CCSC Mid-South</fr:meta>
                        <fr:meta name="pdf">http://ozark.hendrix.edu/~yorgey/pub/CCSC-nifty-SAT.pdf</fr:meta>
                      </fr:frontmatter>
                      <fr:mainmatter />
                    </fr:tree>
                    <fr:tree show-metadata="true" expanded="false" toc="false" numbered="false">
                      <fr:frontmatter>
                        <fr:authors>
                          <fr:author>
                            <fr:link href="/~yorgey/forest/brentyorgey/" title="Brent A. Yorgey" uri="http://ozark.hendrix.edu/~yorgey/forest/brentyorgey/" display-uri="brentyorgey" type="local">Brent A. Yorgey</fr:link>
                          </fr:author>
                          <fr:author>
                            <fr:link href="/~yorgey/forest/richardeisenberg/" title="Richard Eisenberg" uri="http://ozark.hendrix.edu/~yorgey/forest/richardeisenberg/" display-uri="richardeisenberg" type="local">Richard Eisenberg</fr:link>
                          </fr:author>
                          <fr:author>
                            <fr:link href="/~yorgey/forest/harleyeades/" title="Harley Eades" uri="http://ozark.hendrix.edu/~yorgey/forest/harleyeades/" display-uri="harleyeades" type="local">Harley Eades</fr:link>
                          </fr:author>
                        </fr:authors>
                        <fr:date>
                          <fr:year>2018</fr:year>
                          <fr:month>1</fr:month>
                          <fr:day>13</fr:day>
                        </fr:date>
                        <fr:uri>http://ozark.hendrix.edu/~yorgey/forest/yorgey-eisenberg-eades-errors-OBT/</fr:uri>
                        <fr:display-uri>yorgey-eisenberg-eades-errors-OBT</fr:display-uri>
                        <fr:route>/~yorgey/forest/yorgey-eisenberg-eades-errors-OBT/</fr:route>
                        <fr:title text="Explaining Type Errors">Explaining Type Errors</fr:title>
                        <fr:taxon>Reference</fr:taxon>
                        <fr:meta name="venue">
                          <fr:link href="/~yorgey/forest/OBT-2018/" title="OBT '18: Off The Beaten Track" uri="http://ozark.hendrix.edu/~yorgey/forest/OBT-2018/" display-uri="OBT-2018" type="local"><html:em>OBT '18</html:em>: Off The Beaten Track</fr:link>
                        </fr:meta>
                        <fr:meta name="pdf">http://ozark.hendrix.edu/~yorgey/pub/explaining-errors.pdf</fr:meta>
                        <fr:meta name="slides">http://ozark.hendrix.edu/~yorgey/pub/explaining-errors-slides.pdf</fr:meta>
                      </fr:frontmatter>
                      <fr:mainmatter>
                        <html:p>Every beginning student of programming—that is, every student with the ill fortune of having a language with a static type system foisted upon them by a well-intentioned yet sadistic instructor—is well-acquainted with the Dreaded Type Error Message. Why do type error messages have to be so terrifying? Can’t we do a better job explaining type errors to programmers?</html:p>
                        <html:p>We propose two interrelated theses:
<html:ul><html:li>We ought to move away from static error “messages” and towards interactive error explanations.</html:li>
  <html:li>We ought to consider the problem of generating error explanations in a more systematic, disciplined, and formal way. Explaining errors to users shouldn’t just be relegated to the status of an “engineering issue”, but ought to have all the tools of programming language theory and practice applied to it.</html:li></html:ul></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="/~yorgey/forest/ryanyates/" title="Ryan Yates" uri="http://ozark.hendrix.edu/~yorgey/forest/ryanyates/" display-uri="ryanyates" type="local">Ryan Yates</fr:link>
                          </fr:author>
                          <fr:author>
                            <fr:link href="/~yorgey/forest/brentyorgey/" title="Brent A. Yorgey" uri="http://ozark.hendrix.edu/~yorgey/forest/brentyorgey/" display-uri="brentyorgey" type="local">Brent A. Yorgey</fr:link>
                          </fr:author>
                        </fr:authors>
                        <fr:date>
                          <fr:year>2015</fr:year>
                          <fr:month>8</fr:month>
                          <fr:day>30</fr:day>
                        </fr:date>
                        <fr:uri>http://ozark.hendrix.edu/~yorgey/forest/yates-yorgey-2015/</fr:uri>
                        <fr:display-uri>yates-yorgey-2015</fr:display-uri>
                        <fr:route>/~yorgey/forest/yates-yorgey-2015/</fr:route>
                        <fr:title text="Diagrams: A Functional EDSL for Vector Graphics">Diagrams: A Functional EDSL for Vector Graphics</fr:title>
                        <fr:taxon>Reference</fr:taxon>
                        <fr:meta name="venue">
                          <fr:link href="/~yorgey/forest/farm-2015/" title="FARM '15: International Workshop on Functional Art, Music, Modelling and Design" uri="http://ozark.hendrix.edu/~yorgey/forest/farm-2015/" display-uri="farm-2015" type="local"><html:em>FARM '15</html:em>: International Workshop on Functional Art, Music, Modelling and Design</fr:link>
                        </fr:meta>
                        <fr:meta name="doi">10.1145/2808083.2808085</fr:meta>
                        <fr:meta name="bibtex"><![CDATA[@inproceedings{yates-yorgey-2015,
  author = {Yates, Ryan and Yorgey, Brent A.},
  title = {Diagrams: a functional EDSL for vector graphics},
  year = {2015},
  isbn = {9781450338066},
  publisher = {Association for Computing Machinery},
  address = {New York, NY, USA},
  url = {https://doi.org/10.1145/2808083.2808085},
  doi = {10.1145/2808083.2808085},
  abstract = {},
  booktitle = {Proceedings of the 3rd ACM SIGPLAN International Workshop on Functional Art, Music, Modelling and Design},
  pages = {4–5},
  numpages = {2},
  keywords = {EDSL, Haskell, diagrams, vector},
  location = {Vancouver, BC, Canada},
  series = {FARM 2015}
}]]></fr:meta>
                        <fr:meta name="pdf">http://ozark.hendrix.edu/~yorgey/pub/diagrams-FARM.pdf</fr:meta>
                        <fr:meta name="video">https://www.youtube.com/watch?v=oAz8AEf7WDA</fr:meta>
                      </fr:frontmatter>
                      <fr:mainmatter>
                        <html:p>Diagrams is a domain-specific language for creating vector graphics. We will give a short diagrams tutorial/demo, particularly highlighting the power of a functional, embedded domain-specific language.</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="/~yorgey/forest/brentyorgey/" title="Brent A. Yorgey" uri="http://ozark.hendrix.edu/~yorgey/forest/brentyorgey/" display-uri="brentyorgey" type="local">Brent A. Yorgey</fr:link>
                          </fr:author>
                        </fr:authors>
                        <fr:date>
                          <fr:year>2013</fr:year>
                          <fr:month>11</fr:month>
                          <fr:day>20</fr:day>
                        </fr:date>
                        <fr:uri>http://ozark.hendrix.edu/~yorgey/forest/yorgey-diagrams-NYHUG-2013/</fr:uri>
                        <fr:display-uri>yorgey-diagrams-NYHUG-2013</fr:display-uri>
                        <fr:route>/~yorgey/forest/yorgey-diagrams-NYHUG-2013/</fr:route>
                        <fr:title text="Diagrams: Declarative Vector Graphics in Haskell"><html:code>Diagrams</html:code>: Declarative Vector Graphics in Haskell</fr:title>
                        <fr:taxon>Reference</fr:taxon>
                        <fr:meta name="venue">New York Haskell Users' Group</fr:meta>
                        <fr:meta name="video">https://vimeo.com/84104226</fr:meta>
                        <fr:meta name="video">https://vimeo.com/84249042</fr:meta>
                        <fr:meta name="slides">http://ozark.hendrix.edu/~yorgey/pub/13-11-25-nyhaskell-diagrams.pdf</fr:meta>
                      </fr:frontmatter>
                      <fr:mainmatter>
                        <html:p>Over the past ten years, I have solved over 1700 competitive programming problems in Haskell, just for fun (as well as a few that were not fun). I will give a brief introduction to competitive programming and show off some examples demonstrating the unique benefits of Haskell in this context. We will then have a miniature programming contest, open to all—only Haskell allowed!</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="/~yorgey/forest/brentyorgey/" title="Brent A. Yorgey" uri="http://ozark.hendrix.edu/~yorgey/forest/brentyorgey/" display-uri="brentyorgey" type="local">Brent A. Yorgey</fr:link>
                          </fr:author>
                        </fr:authors>
                        <fr:date>
                          <fr:year>2013</fr:year>
                          <fr:month>10</fr:month>
                          <fr:day>29</fr:day>
                        </fr:date>
                        <fr:uri>http://ozark.hendrix.edu/~yorgey/forest/yorgey-trees-semirings/</fr:uri>
                        <fr:display-uri>yorgey-trees-semirings</fr:display-uri>
                        <fr:route>/~yorgey/forest/yorgey-trees-semirings/</fr:route>
                        <fr:title text="Trees and Things (with Semirings!)">Trees and Things (with Semirings!)</fr:title>
                        <fr:taxon>Reference</fr:taxon>
                        <fr:meta name="venue">Houghton College</fr:meta>
                      </fr:frontmatter>
                      <fr:mainmatter />
                    </fr:tree>
                    <fr:tree show-metadata="true" expanded="false" toc="false" numbered="false">
                      <fr:frontmatter>
                        <fr:authors>
                          <fr:author>
                            <fr:link href="/~yorgey/forest/andygill/" title="Andy Gill" uri="http://ozark.hendrix.edu/~yorgey/forest/andygill/" display-uri="andygill" type="local">Andy Gill</fr:link>
                          </fr:author>
                          <fr:author>
                            <fr:link href="/~yorgey/forest/brentyorgey/" title="Brent A. Yorgey" uri="http://ozark.hendrix.edu/~yorgey/forest/brentyorgey/" display-uri="brentyorgey" type="local">Brent A. Yorgey</fr:link>
                          </fr:author>
                        </fr:authors>
                        <fr:date>
                          <fr:year>2013</fr:year>
                          <fr:month>9</fr:month>
                          <fr:day>28</fr:day>
                        </fr:date>
                        <fr:uri>http://ozark.hendrix.edu/~yorgey/forest/yorgey-active-2013/</fr:uri>
                        <fr:display-uri>yorgey-active-2013</fr:display-uri>
                        <fr:route>/~yorgey/forest/yorgey-active-2013/</fr:route>
                        <fr:title text="Functional Active Animation">Functional Active Animation</fr:title>
                        <fr:taxon>Reference</fr:taxon>
                        <fr:meta name="venue">
                          <fr:link href="/~yorgey/forest/farm-2013/" title="FARM '13: International Workshop on Functional Art, Music, Modelling and Design" uri="http://ozark.hendrix.edu/~yorgey/forest/farm-2013/" display-uri="farm-2013" type="local"><html:em>FARM '13</html:em>: International Workshop on Functional Art, Music, Modelling and Design</fr:link>
                        </fr:meta>
                        <fr:meta name="video">http://www.youtube.com/watch?v=fb2K3h7t8fo</fr:meta>
                      </fr:frontmatter>
                      <fr:mainmatter />
                    </fr:tree>
                    <fr:tree show-metadata="true" expanded="false" toc="false" numbered="false">
                      <fr:frontmatter>
                        <fr:authors>
                          <fr:author>
                            <fr:link href="/~yorgey/forest/brentyorgey/" title="Brent A. Yorgey" uri="http://ozark.hendrix.edu/~yorgey/forest/brentyorgey/" display-uri="brentyorgey" type="local">Brent A. Yorgey</fr:link>
                          </fr:author>
                        </fr:authors>
                        <fr:date>
                          <fr:year>2012</fr:year>
                          <fr:month>4</fr:month>
                          <fr:day>13</fr:day>
                        </fr:date>
                        <fr:uri>http://ozark.hendrix.edu/~yorgey/forest/yorgey-compositional-drawing-2012/</fr:uri>
                        <fr:display-uri>yorgey-compositional-drawing-2012</fr:display-uri>
                        <fr:route>/~yorgey/forest/yorgey-compositional-drawing-2012/</fr:route>
                        <fr:title text="Embedded, functional, compositional drawing">Embedded, functional, compositional drawing</fr:title>
                        <fr:taxon>Reference</fr:taxon>
                        <fr:meta name="venue">
                          <fr:link href="/~yorgey/forest/williamscollege/" title="Williams College" uri="http://ozark.hendrix.edu/~yorgey/forest/williamscollege/" display-uri="williamscollege" type="local">Williams College</fr:link>
                        </fr:meta>
                      </fr:frontmatter>
                      <fr:mainmatter />
                    </fr:tree>
                    <fr:tree show-metadata="true" expanded="false" toc="false" numbered="false">
                      <fr:frontmatter>
                        <fr:authors>
                          <fr:author>
                            <fr:link href="/~yorgey/forest/brentyorgey/" title="Brent A. Yorgey" uri="http://ozark.hendrix.edu/~yorgey/forest/brentyorgey/" display-uri="brentyorgey" type="local">Brent A. Yorgey</fr:link>
                          </fr:author>
                        </fr:authors>
                        <fr:date>
                          <fr:year>2010</fr:year>
                          <fr:month>10</fr:month>
                          <fr:day>1</fr:day>
                        </fr:date>
                        <fr:uri>http://ozark.hendrix.edu/~yorgey/forest/yorgey-type-level-HIW-2010/</fr:uri>
                        <fr:display-uri>yorgey-type-level-HIW-2010</fr:display-uri>
                        <fr:route>/~yorgey/forest/yorgey-type-level-HIW-2010/</fr:route>
                        <fr:title text="Typed type-level programming with GHC">Typed type-level programming with GHC</fr:title>
                        <fr:taxon>Reference</fr:taxon>
                        <fr:meta name="venue">
                          <fr:link href="/~yorgey/forest/HIW-2010/" title="HIW '10: Haskell Implementors' Workshop" uri="http://ozark.hendrix.edu/~yorgey/forest/HIW-2010/" display-uri="HIW-2010" type="local"><html:em>HIW '10</html:em>: Haskell Implementors' Workshop</fr:link>
                        </fr:meta>
                        <fr:meta name="video">http://www.vimeo.com/15480577</fr:meta>
                        <fr:meta name="slides">http://ozark.hendrix.edu/~yorgey/pub/typetype-HIW-20101001.pdf</fr:meta>
                      </fr:frontmatter>
                      <fr:mainmatter />
                    </fr:tree>
                    <fr:tree show-metadata="true" expanded="false" toc="false" numbered="false">
                      <fr:frontmatter>
                        <fr:authors>
                          <fr:author>
                            <fr:link href="/~yorgey/forest/brentyorgey/" title="Brent A. Yorgey" uri="http://ozark.hendrix.edu/~yorgey/forest/brentyorgey/" display-uri="brentyorgey" type="local">Brent A. Yorgey</fr:link>
                          </fr:author>
                        </fr:authors>
                        <fr:date>
                          <fr:year>2009</fr:year>
                          <fr:month>11</fr:month>
                          <fr:day>24</fr:day>
                        </fr:date>
                        <fr:uri>http://ozark.hendrix.edu/~yorgey/forest/yorgey-species-2009/</fr:uri>
                        <fr:display-uri>yorgey-species-2009</fr:display-uri>
                        <fr:route>/~yorgey/forest/yorgey-species-2009/</fr:route>
                        <fr:title text="Random testing—and beyond! with combinatorial species">Random testing—and beyond! with combinatorial species</fr:title>
                        <fr:taxon>Reference</fr:taxon>
                        <fr:meta name="venue">
                          <fr:link href="/~yorgey/forest/ku/" title="University of Kansas" uri="http://ozark.hendrix.edu/~yorgey/forest/ku/" display-uri="ku" type="local">University of Kansas</fr:link>
                        </fr:meta>
                        <fr:meta name="slides">http://ozark.hendrix.edu/~yorgey/pub/combtesting-ku-20091124.pdf</fr:meta>
                      </fr:frontmatter>
                      <fr:mainmatter />
                    </fr:tree>
                    <fr:tree show-metadata="true" expanded="false" toc="false" numbered="false">
                      <fr:frontmatter>
                        <fr:authors>
                          <fr:author>
                            <fr:link href="/~yorgey/forest/brentyorgey/" title="Brent A. Yorgey" uri="http://ozark.hendrix.edu/~yorgey/forest/brentyorgey/" display-uri="brentyorgey" type="local">Brent A. Yorgey</fr:link>
                          </fr:author>
                        </fr:authors>
                        <fr:date>
                          <fr:year>2008</fr:year>
                          <fr:month>6</fr:month>
                          <fr:day>8</fr:day>
                        </fr:date>
                        <fr:uri>http://ozark.hendrix.edu/~yorgey/forest/yorgey-mathematics-haskell/</fr:uri>
                        <fr:display-uri>yorgey-mathematics-haskell</fr:display-uri>
                        <fr:route>/~yorgey/forest/yorgey-mathematics-haskell/</fr:route>
                        <fr:title text="Executable Mathematics: a Whirlwind Introduction to Haskell">Executable Mathematics: a Whirlwind Introduction to Haskell</fr:title>
                        <fr:taxon>Reference</fr:taxon>
                        <fr:meta name="venue">
                          <fr:link href="/~yorgey/forest/williamscollege/" title="Williams College" uri="http://ozark.hendrix.edu/~yorgey/forest/williamscollege/" display-uri="williamscollege" type="local">Williams College</fr:link>
                        </fr:meta>
                      </fr:frontmatter>
                      <fr:mainmatter />
                    </fr:tree>
                    <fr:tree show-metadata="true" expanded="false" toc="false" numbered="false">
                      <fr:frontmatter>
                        <fr:authors>
                          <fr:author>
                            <fr:link href="/~yorgey/forest/brentyorgey/" title="Brent A. Yorgey" uri="http://ozark.hendrix.edu/~yorgey/forest/brentyorgey/" display-uri="brentyorgey" type="local">Brent A. Yorgey</fr:link>
                          </fr:author>
                        </fr:authors>
                        <fr:date>
                          <fr:year>2008</fr:year>
                          <fr:month>3</fr:month>
                          <fr:day>22</fr:day>
                        </fr:date>
                        <fr:uri>http://ozark.hendrix.edu/~yorgey/forest/yorgey-xmonad-FringeDC/</fr:uri>
                        <fr:display-uri>yorgey-xmonad-FringeDC</fr:display-uri>
                        <fr:route>/~yorgey/forest/yorgey-xmonad-FringeDC/</fr:route>
                        <fr:title text="xmonad: a Haskell Success Story">xmonad: a Haskell Success Story</fr:title>
                        <fr:taxon>Reference</fr:taxon>
                        <fr:meta name="venue">FringeDC</fr:meta>
                        <fr:meta name="slides">http://ozark.hendrix.edu/~yorgey/pub/xmonad.pdf</fr:meta>
                      </fr:frontmatter>
                      <fr:mainmatter />
                    </fr:tree>
                  </fr:mainmatter>
                </fr:tree>
              </fr:mainmatter>
            </fr:tree>
            <fr:tree show-metadata="false" expanded="false" numbered="true">
              <fr:frontmatter>
                <fr:authors />
                <fr:date>
                  <fr:year>2026</fr:year>
                  <fr:month>3</fr:month>
                  <fr:day>28</fr:day>
                </fr:date>
                <fr:uri>http://ozark.hendrix.edu/~yorgey/forest/00CH/</fr:uri>
                <fr:display-uri>00CH</fr:display-uri>
                <fr:route>/~yorgey/forest/00CH/</fr:route>
                <fr:title text="Drafts">Drafts</fr:title>
              </fr:frontmatter>
              <fr:mainmatter>
                <html:p>This is a place to collect drafts, half-finished writing, and the like—really just a way for me to keep links to these things around so I don't lose track of them.  You're welcome to look, but don't expect anything in particular!</html:p>
                <html:ul><html:li><fr:link href="/~yorgey/forest/00CI/" title="Draft blog post: Dr. How I Learned to Stop Worrying and Love Zero" uri="http://ozark.hendrix.edu/~yorgey/forest/00CI/" display-uri="00CI" type="local">Draft blog post: Dr. How I Learned to Stop Worrying and Love Zero</fr:link></html:li>
  <html:li><fr:link href="/~yorgey/forest/000U/" title="Notes on redesign of the Swarm type system" uri="http://ozark.hendrix.edu/~yorgey/forest/000U/" display-uri="000U" type="local">Notes on redesign of the Swarm type system</fr:link></html:li>
  <html:li><fr:link href="/~yorgey/forest/007U/" title="★ Classical vs constructive logic" uri="http://ozark.hendrix.edu/~yorgey/forest/007U/" display-uri="007U" type="local"><fr:link href="/~yorgey/forest/advanced/" title="Advanced/optional material" uri="http://ozark.hendrix.edu/~yorgey/forest/advanced/" display-uri="advanced" type="local">★</fr:link> Classical vs constructive logic</fr:link></html:li></html:ul>
              </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 show-metadata="true" expanded="false" toc="false" numbered="false">
          <fr:frontmatter>
            <fr:authors />
            <fr:date>
              <fr:year>2025</fr:year>
              <fr:month>11</fr:month>
              <fr:day>2</fr:day>
            </fr:date>
            <fr:uri>http://ozark.hendrix.edu/~yorgey/forest/000U/</fr:uri>
            <fr:display-uri>000U</fr:display-uri>
            <fr:route>/~yorgey/forest/000U/</fr:route>
            <fr:title text="Notes on redesign of the Swarm type system">Notes on redesign of the Swarm type system</fr:title>
          </fr:frontmatter>
          <fr:mainmatter>
            <html:p>These notes are currently under construction, but I've made them
public on purpose since it forces me to think things through more
carefully.  <fr:link href="/~yorgey/forest/contact/" title="Contact information" uri="http://ozark.hendrix.edu/~yorgey/forest/contact/" display-uri="contact" type="local">Comments</fr:link> welcome!</html:p>
            <fr:tree show-metadata="false">
              <fr:frontmatter>
                <fr:authors />
                <fr:date>
                  <fr:year>2025</fr:year>
                  <fr:month>11</fr:month>
                  <fr:day>2</fr:day>
                </fr:date>
                <fr:uri>http://ozark.hendrix.edu/~yorgey/forest/000T/</fr:uri>
                <fr:display-uri>000T</fr:display-uri>
                <fr:route>/~yorgey/forest/000T/</fr:route>
                <fr:title text="Motivation">Motivation</fr:title>
              </fr:frontmatter>
              <fr:mainmatter>
                <html:p>Currently, <fr:link href="/~yorgey/forest/000O/" title="Swarm" uri="http://ozark.hendrix.edu/~yorgey/forest/000O/" display-uri="000O" type="local">Swarm</fr:link> has a relatively standard Hindley-Milner type system, with an extra <html:em>requirements analysis</html:em> bolted on top.  The goal of the requirements analysis is to decide what <fr:link href="/~yorgey/forest/001D/" title="Capabilities" uri="http://ozark.hendrix.edu/~yorgey/forest/001D/" display-uri="001D" type="local">capabilities</fr:link> (and hence what <fr:link href="/~yorgey/forest/001E/" title="Devices" uri="http://ozark.hendrix.edu/~yorgey/forest/001E/" display-uri="001E" type="local">devices</fr:link>) are required to execute some code, and to facilitate automatically installing necessary devices on newly built robots.</html:p>
                <html:p>However, the bolted-on requirements analysis is fundamentally broken, and has led to a number of bugs. For example, see the following issues:
<html:ul><html:li><fr:link href="https://github.com/swarm-game/swarm/issues/231" type="external">Umbrella issue</fr:link></html:li>
  <html:li><fr:link href="https://github.com/swarm-game/swarm/issues/1466" type="external">Wrong requirements for `let`-bound variables</fr:link></html:li>
  <html:li><fr:link href="https://github.com/swarm-game/swarm/issues/1916" type="external">Wrong requirements context to `build`</fr:link></html:li>
  <html:li><fr:link href="https://github.com/swarm-game/swarm/issues/2627" type="external">Using recursive functions doesn't require proper capabilities</fr:link></html:li>
  <html:li><fr:link href="https://github.com/swarm-game/swarm/issues/2151" type="external">Making `dictionary` devices more meaningful</fr:link></html:li>
  <html:li><fr:link href="https://github.com/swarm-game/swarm/issues/2726" type="external">Automatic equipment requirement checks don't work when using functions from a nested import</fr:link></html:li></html:ul></html:p>
                <html:p>Fundamentally, the problem is that a proper requirements analysis must be done statically (requirements analysis for programs passed to the <html:code>build</html:code> command are currently done <html:em>dynamically</html:em>, at runtime, leading to a number of bugs), and can't be separated from type analysis (<html:em>e.g.</html:em> to be able to deal properly with requirements of higher-order functions).</html:p>
                <html:p>The goal of this work is to design a unified type-and-requirements system that handles things properly, using the lessons learned over the past few years of struggling with the current implementation.</html:p>
              </fr:mainmatter>
            </fr:tree>
            <fr:tree show-metadata="false">
              <fr:frontmatter>
                <fr:authors />
                <fr:date>
                  <fr:year>2025</fr:year>
                  <fr:month>11</fr:month>
                  <fr:day>3</fr:day>
                </fr:date>
                <fr:uri>http://ozark.hendrix.edu/~yorgey/forest/000X/</fr:uri>
                <fr:display-uri>000X</fr:display-uri>
                <fr:route>/~yorgey/forest/000X/</fr:route>
                <fr:title text="Capabilities, entities, and devices">Capabilities, entities, and devices</fr:title>
              </fr:frontmatter>
              <fr:mainmatter>
                <fr:tree show-metadata="false">
                  <fr:frontmatter>
                    <fr:authors />
                    <fr:date>
                      <fr:year>2025</fr:year>
                      <fr:month>11</fr:month>
                      <fr:day>13</fr:day>
                    </fr:date>
                    <fr:uri>http://ozark.hendrix.edu/~yorgey/forest/001C/</fr:uri>
                    <fr:display-uri>001C</fr:display-uri>
                    <fr:route>/~yorgey/forest/001C/</fr:route>
                    <fr:title text="Entities">Entities</fr:title>
                    <fr:taxon>Definition</fr:taxon>
                  </fr:frontmatter>
                  <fr:mainmatter>
                    <html:p>We assume a globally fixed set of <html:em>entities</html:em> <fr:tex display="inline"><![CDATA[\mathbf {E}]]></fr:tex>.  Entities represent types of objects in the game, and can be either naturally occurring (such as trees and rocks) or manufactured (such as branch predictors).</html:p>
                  </fr:mainmatter>
                </fr:tree>
                <fr:tree show-metadata="false">
                  <fr:frontmatter>
                    <fr:authors />
                    <fr:date>
                      <fr:year>2025</fr:year>
                      <fr:month>11</fr:month>
                      <fr:day>13</fr:day>
                    </fr:date>
                    <fr:uri>http://ozark.hendrix.edu/~yorgey/forest/001D/</fr:uri>
                    <fr:display-uri>001D</fr:display-uri>
                    <fr:route>/~yorgey/forest/001D/</fr:route>
                    <fr:title text="Capabilities">Capabilities</fr:title>
                    <fr:taxon>Definition</fr:taxon>
                  </fr:frontmatter>
                  <fr:mainmatter>
                    <html:p>We also assume a globally fixed set of <html:em>capabilities</html:em> <fr:tex display="inline"><![CDATA[\mathbf {C}]]></fr:tex>.  A capability represents the ability of a <fr:link href="/~yorgey/forest/0014/" title="Robots" uri="http://ozark.hendrix.edu/~yorgey/forest/0014/" display-uri="0014" type="local">robot</fr:link> to do a particular thing: for example, to add, to move, make use of recursive functions, <html:em>etc.</html:em>  For each built-in command <fr:tex display="inline"><![CDATA[c]]></fr:tex> there is a capability <fr:tex display="inline"><![CDATA[\mathsf {Exc}(c)]]></fr:tex> which represents the capability to use command <fr:tex display="inline"><![CDATA[c]]></fr:tex>, but there are other capabilities as well.</html:p>
                  </fr:mainmatter>
                </fr:tree>
                <fr:tree show-metadata="false">
                  <fr:frontmatter>
                    <fr:authors />
                    <fr:date>
                      <fr:year>2025</fr:year>
                      <fr:month>11</fr:month>
                      <fr:day>13</fr:day>
                    </fr:date>
                    <fr:uri>http://ozark.hendrix.edu/~yorgey/forest/001E/</fr:uri>
                    <fr:display-uri>001E</fr:display-uri>
                    <fr:route>/~yorgey/forest/001E/</fr:route>
                    <fr:title text="Devices">Devices</fr:title>
                    <fr:taxon>Definition</fr:taxon>
                  </fr:frontmatter>
                  <fr:mainmatter>
                    <html:p>Some <fr:link href="/~yorgey/forest/001C/" title="Entities" uri="http://ozark.hendrix.edu/~yorgey/forest/001C/" display-uri="001C" type="local">entities</fr:link> <html:em>provide</html:em> one or more <fr:link href="/~yorgey/forest/001D/" title="Capabilities" uri="http://ozark.hendrix.edu/~yorgey/forest/001D/" display-uri="001D" type="local">capabilities</fr:link> when they are <fr:link href="/~yorgey/forest/0014/" title="Robots" uri="http://ozark.hendrix.edu/~yorgey/forest/0014/" display-uri="0014" type="local">equipped</fr:link>; such entities are known as <html:em>devices</html:em>.  For example, a <html:code>branch predictor</html:code> device provides the <fr:tex display="inline"><![CDATA[\mathsf {Exc}(\mathsf {if})]]></fr:tex> capability, which allows <fr:link href="/~yorgey/forest/0014/" title="Robots" uri="http://ozark.hendrix.edu/~yorgey/forest/0014/" display-uri="0014" type="local">robots</fr:link> to evaluate conditional expressions.</html:p>
                  </fr:mainmatter>
                </fr:tree>
                <fr:tree show-metadata="false">
                  <fr:frontmatter>
                    <fr:authors />
                    <fr:date>
                      <fr:year>2025</fr:year>
                      <fr:month>11</fr:month>
                      <fr:day>13</fr:day>
                    </fr:date>
                    <fr:uri>http://ozark.hendrix.edu/~yorgey/forest/001F/</fr:uri>
                    <fr:display-uri>001F</fr:display-uri>
                    <fr:route>/~yorgey/forest/001F/</fr:route>
                    <fr:title text="Devices \to  capabilities">Devices <fr:tex display="inline"><![CDATA[\to ]]></fr:tex> capabilities</fr:title>
                  </fr:frontmatter>
                  <fr:mainmatter>
                    <html:p>We assume a fixed function <fr:tex display="inline"><![CDATA[\mathsf {caps} : \mathbf {E} \to  \mathcal {P}(\mathbf {C})]]></fr:tex> which maps each <fr:link href="/~yorgey/forest/001C/" title="Entities" uri="http://ozark.hendrix.edu/~yorgey/forest/001C/" display-uri="001C" type="local">entity</fr:link> to the set (possibly empty) of <fr:link href="/~yorgey/forest/001D/" title="Capabilities" uri="http://ozark.hendrix.edu/~yorgey/forest/001D/" display-uri="001D" type="local">capabilities</fr:link> it <fr:link href="/~yorgey/forest/001E/" title="Devices" uri="http://ozark.hendrix.edu/~yorgey/forest/001E/" display-uri="001E" type="local">provides</fr:link>.  In a standard abuse of notation, if <fr:tex display="inline"><![CDATA[D \subseteq  \mathbf {E}]]></fr:tex> is a set of entities, we write <fr:tex display="inline"><![CDATA[\mathsf {caps}(D)]]></fr:tex> to denote the image of <fr:tex display="inline"><![CDATA[D]]></fr:tex> under <fr:tex display="inline"><![CDATA[\mathsf {caps}]]></fr:tex>, that is, <fr:tex display="block"><![CDATA[\mathsf {caps}(D) = \bigcup _{d \in  D} \mathsf {caps}(d).]]></fr:tex></html:p>
                  </fr:mainmatter>
                </fr:tree>
                <fr:tree show-metadata="false">
                  <fr:frontmatter>
                    <fr:authors />
                    <fr:date>
                      <fr:year>2025</fr:year>
                      <fr:month>11</fr:month>
                      <fr:day>13</fr:day>
                    </fr:date>
                    <fr:uri>http://ozark.hendrix.edu/~yorgey/forest/001G/</fr:uri>
                    <fr:display-uri>001G</fr:display-uri>
                    <fr:route>/~yorgey/forest/001G/</fr:route>
                    <fr:title text="Capabilities \to  devices oracle">Capabilities <fr:tex display="inline"><![CDATA[\to ]]></fr:tex> devices oracle</fr:title>
                  </fr:frontmatter>
                  <fr:mainmatter>
                    <html:p>Of course we can invert the <fr:link href="/~yorgey/forest/001F/" title="Devices \to  capabilities" uri="http://ozark.hendrix.edu/~yorgey/forest/001F/" display-uri="001F" type="local"><fr:tex display="inline"><![CDATA[\mathsf {caps}]]></fr:tex> function</fr:link> to yield a function <fr:tex display="inline"><![CDATA[\mathsf {caps}^{-1} : \mathbf {C} \to  \mathcal {P}(\mathbf {E})]]></fr:tex> which maps a <fr:link href="/~yorgey/forest/001D/" title="Capabilities" uri="http://ozark.hendrix.edu/~yorgey/forest/001D/" display-uri="001D" type="local">capability</fr:link> to the set of <fr:link href="/~yorgey/forest/001C/" title="Entities" uri="http://ozark.hendrix.edu/~yorgey/forest/001C/" display-uri="001C" type="local">entities</fr:link> which <fr:link href="/~yorgey/forest/001E/" title="Devices" uri="http://ozark.hendrix.edu/~yorgey/forest/001E/" display-uri="001E" type="local">provide</fr:link> it.  More interesting, however, is that we also assume the existence of a <html:em>provisioning oracle</html:em> <fr:tex display="block"><![CDATA[\mathsf {provision} : \mathcal {P}(\mathbf {C}) \to  \mathcal {P}(\mathbf {E})]]></fr:tex> which calculates a set of devices which together provide (at least) the given set of capabilities.  That is, it must be the case that for any capability set <fr:tex display="inline"><![CDATA[\Delta ]]></fr:tex>, <fr:tex display="block"><![CDATA[\mathsf {caps}(\mathsf {provision}(\Delta )) \supseteq  \Delta .]]></fr:tex> Simply defining <fr:tex display="block"><![CDATA[\mathsf {provision}(\Delta ) = \bigcup _{c \in  \Delta } \mathsf {caps}^{-1}(c)]]></fr:tex> would fit the bill, but would be unsatisfying, since its output would typically contain many redundant devices.  Ideally we want some sort of "minimal" device set for a given set of capabilities.  Solving this exactly is <fr:link href="https://en.wikipedia.org/wiki/Set_cover_problem" type="external">NP-hard</fr:link>, but there are various <fr:link href="https://github.com/swarm-game/swarm/blob/c6f861d694cc528c6fa2639c7930d6367c4251f0/src/swarm-util/Swarm/Util.hsL650-L704" type="external">heuristics</fr:link> that can give approximate solutions.  The precise algorithm used by the provisioning oracle does not matter for our purposes here; we simply assume that it exists and has the required property.</html:p>
                  </fr:mainmatter>
                </fr:tree>
                <fr:tree show-metadata="false">
                  <fr:frontmatter>
                    <fr:authors />
                    <fr:date>
                      <fr:year>2025</fr:year>
                      <fr:month>11</fr:month>
                      <fr:day>20</fr:day>
                    </fr:date>
                    <fr:uri>http://ozark.hendrix.edu/~yorgey/forest/001Y/</fr:uri>
                    <fr:display-uri>001Y</fr:display-uri>
                    <fr:route>/~yorgey/forest/001Y/</fr:route>
                    <fr:title text="Capability set expressions">Capability set expressions</fr:title>
                  </fr:frontmatter>
                  <fr:mainmatter>
                    <html:p>Since types can be capability-polymorphic, it's not enough to just
keep track of literal capability sets; we need to keep track of variables that can stand for unknown capability sets, which can in turn combine with other capability sets.  A capability set expression can be:

<html:ul><html:li>the empty capability set <fr:tex display="inline"><![CDATA[\varnothing ]]></fr:tex>,</html:li>
  <html:li>a capability set variable <fr:tex display="inline"><![CDATA[\delta ]]></fr:tex>,</html:li>
  <html:li>a singleton literal capability set, such as <fr:tex display="inline"><![CDATA[\{\mathsf {Exc}(\mathsf {if})\}]]></fr:tex>, or</html:li>
  <html:li>the union of two capability set expressions, <fr:tex display="inline"><![CDATA[\Delta _1 \cup  \Delta _2]]></fr:tex>,</html:li></html:ul>

but quotiented by the assumption that <fr:tex display="inline"><![CDATA[\varnothing ]]></fr:tex> is the identity for <fr:tex display="inline"><![CDATA[\cup ]]></fr:tex>, and <fr:tex display="inline"><![CDATA[\cup ]]></fr:tex> is associative, commutative and idempotent.  For example, <fr:tex display="inline"><![CDATA[(\varnothing  \cup  \delta ) \cup  (\{\mathsf {Lambda}\} \cup  \delta ) = \delta  \cup  \{\mathsf {Lambda}\}]]></fr:tex>.  We also write set literals like <fr:tex display="inline"><![CDATA[\{\mathsf {Exc}(\mathsf {if}), \mathsf {Lambda}\}]]></fr:tex> as an abbreviation for <fr:tex display="inline"><![CDATA[\{\mathsf {Exc}(\mathsf {if})\} \cup  \{\mathsf {Lambda}\}]]></fr:tex>.
</html:p>
                  </fr:mainmatter>
                </fr:tree>
              </fr:mainmatter>
            </fr:tree>
            <fr:tree show-metadata="false">
              <fr:frontmatter>
                <fr:authors />
                <fr:date>
                  <fr:year>2025</fr:year>
                  <fr:month>11</fr:month>
                  <fr:day>4</fr:day>
                </fr:date>
                <fr:uri>http://ozark.hendrix.edu/~yorgey/forest/0014/</fr:uri>
                <fr:display-uri>0014</fr:display-uri>
                <fr:route>/~yorgey/forest/0014/</fr:route>
                <fr:title text="Robots">Robots</fr:title>
              </fr:frontmatter>
              <fr:mainmatter>
                <html:p>Each robot has:

<html:ul><html:li>an <fr:link href="/~yorgey/forest/0012/" title="Inventories" uri="http://ozark.hendrix.edu/~yorgey/forest/0012/" display-uri="0012" type="local">inventory</fr:link>, containing a number of <fr:link href="/~yorgey/forest/000X/" title="Capabilities, entities, and devices" uri="http://ozark.hendrix.edu/~yorgey/forest/000X/" display-uri="000X" type="local">entities</fr:link>, and</html:li>
  <html:li>a set of equipped <fr:link href="/~yorgey/forest/000X/" title="Capabilities, entities, and devices" uri="http://ozark.hendrix.edu/~yorgey/forest/000X/" display-uri="000X" type="local">devices</fr:link>.</html:li></html:ul>

In order to confer capabilities, a device must be <html:em>equipped</html:em>, that is, moved from the robot's general inventory to the special set of equipped devices. Entities can be moved between the inventory and equipped set via the <html:code>equip</html:code> and <html:code>unequip</html:code> commands.
</html:p>
              </fr:mainmatter>
            </fr:tree>
            <fr:tree show-metadata="false">
              <fr:frontmatter>
                <fr:authors />
                <fr:date>
                  <fr:year>2025</fr:year>
                  <fr:month>11</fr:month>
                  <fr:day>14</fr:day>
                </fr:date>
                <fr:uri>http://ozark.hendrix.edu/~yorgey/forest/001N/</fr:uri>
                <fr:display-uri>001N</fr:display-uri>
                <fr:route>/~yorgey/forest/001N/</fr:route>
                <fr:title text="Swarm polytypes">Swarm polytypes</fr:title>
              </fr:frontmatter>
              <fr:mainmatter>
                <html:p>Most generally, a Swarm polytype is of the form

<fr:tex display="block"><![CDATA[\forall  \overline {\alpha }; \overline {\delta }.\; \Delta  \Rightarrow  \tau ]]></fr:tex>

where <fr:tex display="inline"><![CDATA[\overline {\alpha }]]></fr:tex> is a sequence of type variables, <fr:tex display="inline"><![CDATA[\overline {\delta }]]></fr:tex> is a sequence of <fr:link href="/~yorgey/forest/001D/" title="Capabilities" uri="http://ozark.hendrix.edu/~yorgey/forest/001D/" display-uri="001D" type="local">capability</fr:link> set variables, <fr:tex display="inline"><![CDATA[\Delta ]]></fr:tex> is a <fr:link href="/~yorgey/forest/001Y/" title="Capability set expressions" uri="http://ozark.hendrix.edu/~yorgey/forest/001Y/" display-uri="001Y" type="local">capability set expression</fr:link>, and <fr:tex display="inline"><![CDATA[\tau ]]></fr:tex> is a monotype.  Such a type is ascribed to expressions which, under any substitutions <fr:tex display="inline"><![CDATA[[\overline {\alpha } \mapsto  \overline {\tau }]]]></fr:tex> and <fr:tex display="inline"><![CDATA[[\overline {\delta } \mapsto  \overline {\Delta }]]]></fr:tex>, can be evaluated by a robot with <fr:link href="/~yorgey/forest/001D/" title="Capabilities" uri="http://ozark.hendrix.edu/~yorgey/forest/001D/" display-uri="001D" type="local">capabilities</fr:link> <fr:tex display="inline"><![CDATA[\Delta ]]></fr:tex>, producing either a value of type <fr:tex display="inline"><![CDATA[\tau ]]></fr:tex> or <fr:tex display="inline"><![CDATA[\bot ]]></fr:tex> (due to either an exception or nontermination).
</html:p>
                <html:p>Note that in the case that there are no capability set variables <fr:tex display="inline"><![CDATA[\delta ]]></fr:tex>, we often omit them from the syntax, writing simply <fr:tex display="inline"><![CDATA[\forall  \overline {\alpha }.\; \Delta  \Rightarrow  \tau ]]></fr:tex> as an abbreviation for <fr:tex display="inline"><![CDATA[\forall  \overline {\alpha }; \varnothing .\; \Delta  \Rightarrow  \tau ]]></fr:tex>.  Moreover, we also omit writing <fr:tex display="inline"><![CDATA[\Delta  \Rightarrow ]]></fr:tex> in the case when <fr:tex display="inline"><![CDATA[\Delta ]]></fr:tex> is <fr:tex display="inline"><![CDATA[\varnothing ]]></fr:tex>, and omit writing <fr:tex display="inline"><![CDATA[\forall ]]></fr:tex> when there are no variables being quantified over.</html:p>
              </fr:mainmatter>
            </fr:tree>
            <fr:tree show-metadata="false">
              <fr:frontmatter>
                <fr:authors />
                <fr:date>
                  <fr:year>2025</fr:year>
                  <fr:month>11</fr:month>
                  <fr:day>3</fr:day>
                </fr:date>
                <fr:uri>http://ozark.hendrix.edu/~yorgey/forest/000V/</fr:uri>
                <fr:display-uri>000V</fr:display-uri>
                <fr:route>/~yorgey/forest/000V/</fr:route>
                <fr:title text="Swarm typing judgments">Swarm typing judgments</fr:title>
              </fr:frontmatter>
              <fr:mainmatter>
                <html:p>Swarm has two basic typing judgments: a <fr:link href="/~yorgey/forest/001M/" title="Top-level typing judgment" uri="http://ozark.hendrix.edu/~yorgey/forest/001M/" display-uri="001M" type="local">top-level judgment</fr:link> that assigns capability-annotated <fr:link href="/~yorgey/forest/001N/" title="Swarm polytypes" uri="http://ozark.hendrix.edu/~yorgey/forest/001N/" display-uri="001N" type="local">polytypes</fr:link>, and a <fr:link href="/~yorgey/forest/001O/" title="Monomorphic typing judgment" uri="http://ozark.hendrix.edu/~yorgey/forest/001O/" display-uri="001O" type="local">basic judgment</fr:link> that assigns <fr:link href="/~yorgey/forest/000Y/" title="Swarm monotypes" uri="http://ozark.hendrix.edu/~yorgey/forest/000Y/" display-uri="000Y" type="local">monotypes</fr:link> to terms and collects the <fr:link href="/~yorgey/forest/001D/" title="Capabilities" uri="http://ozark.hendrix.edu/~yorgey/forest/001D/" display-uri="001D" type="local">capabilities</fr:link> needed to evaluate them.</html:p>
                <fr:tree show-metadata="false">
                  <fr:frontmatter>
                    <fr:authors />
                    <fr:date>
                      <fr:year>2025</fr:year>
                      <fr:month>11</fr:month>
                      <fr:day>14</fr:day>
                    </fr:date>
                    <fr:uri>http://ozark.hendrix.edu/~yorgey/forest/001M/</fr:uri>
                    <fr:display-uri>001M</fr:display-uri>
                    <fr:route>/~yorgey/forest/001M/</fr:route>
                    <fr:title text="Top-level typing judgment">Top-level typing judgment</fr:title>
                    <fr:taxon>Definition</fr:taxon>
                  </fr:frontmatter>
                  <fr:mainmatter>
                    <html:p>The top-level typing judgment is of the form <fr:tex display="block"><![CDATA[\Gamma  \vdash  t : \sigma ]]></fr:tex> which simply says that term <fr:tex display="inline"><![CDATA[t]]></fr:tex> has <fr:link href="/~yorgey/forest/001N/" title="Swarm polytypes" uri="http://ozark.hendrix.edu/~yorgey/forest/001N/" display-uri="001N" type="local">polytype</fr:link> <fr:tex display="inline"><![CDATA[\sigma ]]></fr:tex> in context <fr:tex display="inline"><![CDATA[\Gamma ]]></fr:tex>. Here <fr:tex display="inline"><![CDATA[\Gamma ]]></fr:tex> is a type context associating variables with their types. The polytype <fr:tex display="inline"><![CDATA[\sigma ]]></fr:tex> quantifies over type and capability variables, and contains a set of capbilities needed to evaluate the term <fr:tex display="inline"><![CDATA[t]]></fr:tex>.</html:p>
                  </fr:mainmatter>
                </fr:tree>
                <fr:tree show-metadata="false">
                  <fr:frontmatter>
                    <fr:authors />
                    <fr:date>
                      <fr:year>2025</fr:year>
                      <fr:month>11</fr:month>
                      <fr:day>14</fr:day>
                    </fr:date>
                    <fr:uri>http://ozark.hendrix.edu/~yorgey/forest/001O/</fr:uri>
                    <fr:display-uri>001O</fr:display-uri>
                    <fr:route>/~yorgey/forest/001O/</fr:route>
                    <fr:title text="Monomorphic typing judgment">Monomorphic typing judgment</fr:title>
                    <fr:taxon>Definition</fr:taxon>
                  </fr:frontmatter>
                  <fr:mainmatter>
                    <html:p>The basic typing judgment for the Swarm language has the form

<fr:tex display="block"><![CDATA[\Gamma  \vdash  t : \tau  \;[\Delta ]]]></fr:tex>

where <fr:tex display="inline"><![CDATA[\Gamma ]]></fr:tex> is a type context, <fr:tex display="inline"><![CDATA[t]]></fr:tex> is a term, <fr:tex display="inline"><![CDATA[\tau ]]></fr:tex> is a <fr:link href="/~yorgey/forest/000Y/" title="Swarm monotypes" uri="http://ozark.hendrix.edu/~yorgey/forest/000Y/" display-uri="000Y" type="local">monotype</fr:link> (which could contain type variables), and <fr:tex display="inline"><![CDATA[\Delta ]]></fr:tex> is a <fr:link href="/~yorgey/forest/001Y/" title="Capability set expressions" uri="http://ozark.hendrix.edu/~yorgey/forest/001Y/" display-uri="001Y" type="local">capability set expression</fr:link>. This should intuitively be read as saying that <fr:tex display="inline"><![CDATA[t]]></fr:tex> has type <fr:tex display="inline"><![CDATA[\tau ]]></fr:tex> in context <fr:tex display="inline"><![CDATA[\Gamma ]]></fr:tex>, and can be evaluated given <fr:link href="/~yorgey/forest/001D/" title="Capabilities" uri="http://ozark.hendrix.edu/~yorgey/forest/001D/" display-uri="001D" type="local">capabilities</fr:link> <fr:tex display="inline"><![CDATA[\Delta ]]></fr:tex>.  In this judgment <fr:tex display="inline"><![CDATA[\Gamma ]]></fr:tex> and <fr:tex display="inline"><![CDATA[t]]></fr:tex> are considered inputs, <fr:tex display="inline"><![CDATA[\Delta ]]></fr:tex> is considered an output, and <fr:tex display="inline"><![CDATA[\tau ]]></fr:tex> can be either an input or an output depending on whether we are in checking or inference mode.  In practice, the typing rules are implemented in an explicitly bidirectional style, but are presented here as undirected rules for simplicity.
</html:p>
                  </fr:mainmatter>
                </fr:tree>
                <fr:tree show-metadata="false">
                  <fr:frontmatter>
                    <fr:authors />
                    <fr:date>
                      <fr:year>2025</fr:year>
                      <fr:month>11</fr:month>
                      <fr:day>14</fr:day>
                    </fr:date>
                    <fr:uri>http://ozark.hendrix.edu/~yorgey/forest/001Q/</fr:uri>
                    <fr:display-uri>001Q</fr:display-uri>
                    <fr:route>/~yorgey/forest/001Q/</fr:route>
                    <fr:taxon>Remark</fr:taxon>
                  </fr:frontmatter>
                  <fr:mainmatter>
                    <html:p>Note that the <fr:link href="/~yorgey/forest/001O/" title="Monomorphic typing judgment" uri="http://ozark.hendrix.edu/~yorgey/forest/001O/" display-uri="001O" type="local">basic typing judgment</fr:link> only says something about the <fr:link href="/~yorgey/forest/001D/" title="Capabilities" uri="http://ozark.hendrix.edu/~yorgey/forest/001D/" display-uri="001D" type="local">capabilities</fr:link> required to <html:em>evaluate</html:em> <fr:tex display="inline"><![CDATA[t]]></fr:tex>.  Further use of the resulting value may require additional capabilities: for example, evaluating the application of <fr:tex display="inline"><![CDATA[t]]></fr:tex> to an argument, if it is a function; or executing <fr:tex display="inline"><![CDATA[t]]></fr:tex>, if it is a command. As a rule, the capabilities needed for such uses beyond evaluation are recorded in the type <fr:tex display="inline"><![CDATA[\tau ]]></fr:tex>.</html:p>
                  </fr:mainmatter>
                </fr:tree>
                <fr:tree show-metadata="false">
                  <fr:frontmatter>
                    <fr:authors />
                    <fr:date>
                      <fr:year>2025</fr:year>
                      <fr:month>11</fr:month>
                      <fr:day>14</fr:day>
                    </fr:date>
                    <fr:uri>http://ozark.hendrix.edu/~yorgey/forest/001R/</fr:uri>
                    <fr:display-uri>001R</fr:display-uri>
                    <fr:route>/~yorgey/forest/001R/</fr:route>
                    <fr:taxon>Remark</fr:taxon>
                  </fr:frontmatter>
                  <fr:mainmatter>
                    <html:p>At the level of the <fr:link href="/~yorgey/forest/001O/" title="Monomorphic typing judgment" uri="http://ozark.hendrix.edu/~yorgey/forest/001O/" display-uri="001O" type="local">basic typing judgment</fr:link>, the <fr:link href="/~yorgey/forest/001D/" title="Capabilities" uri="http://ozark.hendrix.edu/~yorgey/forest/001D/" display-uri="001D" type="local">capability</fr:link> set <fr:tex display="inline"><![CDATA[\Delta ]]></fr:tex> is not part of the <fr:link href="/~yorgey/forest/000Y/" title="Swarm monotypes" uri="http://ozark.hendrix.edu/~yorgey/forest/000Y/" display-uri="000Y" type="local">monotype</fr:link> <fr:tex display="inline"><![CDATA[\tau ]]></fr:tex>, but rather part of the judgment.  The reason is that we want to maintain the invariant that polytypes only record a single, top-level capability set, and other capability sets are recorded at appropriate points within the type (<html:em>e.g.</html:em> as annotations on function arrows) rather than being sprinkled on every single subterm of the type.</html:p>
                  </fr:mainmatter>
                </fr:tree>
                <fr:tree show-metadata="false">
                  <fr:frontmatter>
                    <fr:authors />
                    <fr:date>
                      <fr:year>2025</fr:year>
                      <fr:month>11</fr:month>
                      <fr:day>14</fr:day>
                    </fr:date>
                    <fr:uri>http://ozark.hendrix.edu/~yorgey/forest/001P/</fr:uri>
                    <fr:display-uri>001P</fr:display-uri>
                    <fr:route>/~yorgey/forest/001P/</fr:route>
                    <fr:title text="Generalization and instantiation">Generalization and instantiation</fr:title>
                  </fr:frontmatter>
                  <fr:mainmatter><html:p>XXX add capability set variables and describe.  Where can the different kinds of variables occur?  (Hence, where do we need to apply substitutions?)</html:p>
  
    <html:figure><fr:resource hash="7675927372757f762c6ad2f0e45087c1"><fr:resource-content><html:img src="/~yorgey/forest/7675927372757f762c6ad2f0e45087c1.svg" /></fr:resource-content><fr:resource-source type="latex" part="preamble"><![CDATA[\usepackage {mathpartir}\usepackage {amssymb}\usepackage {mathtools}]]></fr:resource-source><fr:resource-source type="latex" part="body"><![CDATA[$
  \inferrule 
    {\Gamma  \vdash  t : \forall  \alpha . \Delta  \Rightarrow  \tau }
    {\Gamma  \vdash  t : \tau  [xxx] \;[\Delta ]}
$]]></fr:resource-source></fr:resource></html:figure>
  

  
    <html:figure><fr:resource hash="c0411f785642358d14fd0400b361b862"><fr:resource-content><html:img src="/~yorgey/forest/c0411f785642358d14fd0400b361b862.svg" /></fr:resource-content><fr:resource-source type="latex" part="preamble"><![CDATA[\usepackage {mathpartir}\usepackage {amssymb}\usepackage {mathtools}]]></fr:resource-source><fr:resource-source type="latex" part="body"><![CDATA[$
  \inferrule 
    {\Gamma  \vdash  t : \tau  \;[\Delta ] \\ \alpha \;\#\;\Gamma }
    {\Gamma  \vdash  t : \forall  \alpha . \Delta  \Rightarrow  \tau }
$]]></fr:resource-source></fr:resource></html:figure>
  
</fr:mainmatter>
                </fr:tree>
              </fr:mainmatter>
            </fr:tree>
            <fr:tree show-metadata="false">
              <fr:frontmatter>
                <fr:authors />
                <fr:date>
                  <fr:year>2025</fr:year>
                  <fr:month>11</fr:month>
                  <fr:day>18</fr:day>
                </fr:date>
                <fr:uri>http://ozark.hendrix.edu/~yorgey/forest/001T/</fr:uri>
                <fr:display-uri>001T</fr:display-uri>
                <fr:route>/~yorgey/forest/001T/</fr:route>
                <fr:title text="Pure fragment of the Swarm language">Pure fragment of the Swarm language</fr:title>
              </fr:frontmatter>
              <fr:mainmatter>
                <html:p>First, we go through the various types and constructs in the pure fragment of the language.  Expressions in the pure fragment can be evaluated and have no side effects, in contrast to the <fr:link href="/~yorgey/forest/001U/" title="Swarm command monad" uri="http://ozark.hendrix.edu/~yorgey/forest/001U/" display-uri="001U" type="local">command monad</fr:link>, which embeds effectful, sequenced imperative programs.  Note that evaluating an expression can result in an exception being thrown or nontermination, which one might consider <html:em>effects</html:em>; but both of these result, semantically, in a value of <fr:tex display="inline"><![CDATA[\bot ]]></fr:tex>.  Evaluating an expression cannot have <html:em>side effects</html:em> in the sense of computing a value successfully while also causing extra effects.</html:p>
                <html:p>For each type or family of types, we explain typing rules for introduced and elimination forms, as well as related built-in constants.</html:p>
                <fr:tree show-metadata="false">
                  <fr:frontmatter>
                    <fr:authors />
                    <fr:date>
                      <fr:year>2026</fr:year>
                      <fr:month>6</fr:month>
                      <fr:day>9</fr:day>
                    </fr:date>
                    <fr:uri>http://ozark.hendrix.edu/~yorgey/forest/00GR/</fr:uri>
                    <fr:display-uri>00GR</fr:display-uri>
                    <fr:route>/~yorgey/forest/00GR/</fr:route>
                    <fr:title text="Undefined">Undefined</fr:title>
                  </fr:frontmatter>
                  <fr:mainmatter>
                    <html:p>There is a built-in constant <fr:tex display="inline"><![CDATA[\mathsf {undefined}]]></fr:tex>, with type <fr:tex display="inline"><![CDATA[\forall  \alpha .\; \alpha ]]></fr:tex>.  Semantically, it corresponds to <fr:tex display="inline"><![CDATA[\bot ]]></fr:tex>; operationally, trying to evaluate <fr:tex display="inline"><![CDATA[\mathsf {undefined}]]></fr:tex> causes an exception to be thrown.</html:p>
                  </fr:mainmatter>
                </fr:tree>
                <fr:tree show-metadata="false">
                  <fr:frontmatter>
                    <fr:authors />
                    <fr:date>
                      <fr:year>2025</fr:year>
                      <fr:month>11</fr:month>
                      <fr:day>18</fr:day>
                    </fr:date>
                    <fr:uri>http://ozark.hendrix.edu/~yorgey/forest/001V/</fr:uri>
                    <fr:display-uri>001V</fr:display-uri>
                    <fr:route>/~yorgey/forest/001V/</fr:route>
                    <fr:title text="\mathsf {Void} and \mathsf {Unit}"><fr:tex display="inline"><![CDATA[\mathsf {Void}]]></fr:tex> and <fr:tex display="inline"><![CDATA[\mathsf {Unit}]]></fr:tex></fr:title>
                  </fr:frontmatter>
                  <fr:mainmatter>
                    <html:p>Swarm has a built-in <fr:tex display="inline"><![CDATA[\mathsf {Void}]]></fr:tex> type with zero inhabitants, and a <fr:tex display="inline"><![CDATA[\mathsf {Unit}]]></fr:tex> type with one inhabitant (written <fr:tex display="inline"><![CDATA[\mathsf {()}]]></fr:tex>). Their associated typing rules are standard, and no special capabilities are needed to use them.</html:p>
                    <html:p>Note that there is no built-in eliminator for <fr:tex display="inline"><![CDATA[\mathsf {Void}]]></fr:tex>; it is easy to implement one using <fr:link href="/~yorgey/forest/00GR/" title="Undefined" uri="http://ozark.hendrix.edu/~yorgey/forest/00GR/" display-uri="00GR" type="local">undefined</fr:link>, as in <fr:tex display="block"><![CDATA[\mathsf {absurd} : \forall  \alpha .\; \mathsf {Void} \to  \alpha  = \lambda  x.\; \mathsf {undefined}.]]></fr:tex></html:p>
                  </fr:mainmatter>
                </fr:tree>
                <fr:tree show-metadata="false">
                  <fr:frontmatter>
                    <fr:authors />
                    <fr:date>
                      <fr:year>2026</fr:year>
                      <fr:month>6</fr:month>
                      <fr:day>10</fr:day>
                    </fr:date>
                    <fr:uri>http://ozark.hendrix.edu/~yorgey/forest/00GS/</fr:uri>
                    <fr:display-uri>00GS</fr:display-uri>
                    <fr:route>/~yorgey/forest/00GS/</fr:route>
                    <fr:title text="\mathsf {Delay}">
                      <fr:tex display="inline"><![CDATA[\mathsf {Delay}]]></fr:tex>
                    </fr:title>
                  </fr:frontmatter>
                  <fr:mainmatter>
                    <html:p>If <fr:tex display="inline"><![CDATA[\tau ]]></fr:tex> is a type, then <fr:tex display="inline"><![CDATA[\mathsf {Delay}^{\Delta }\;\tau ]]></fr:tex> is a type representing <html:em>delayed</html:em> expressions of type <fr:tex display="inline"><![CDATA[\tau ]]></fr:tex>.  The annotation <fr:tex display="inline"><![CDATA[\Delta ]]></fr:tex> represents the capabilities needed to force evaluation of the contained expression.</html:p>
                    <html:p>The delay type comes with two built-in constants, <fr:tex display="inline"><![CDATA[\mathsf {delay}]]></fr:tex> and <fr:tex display="inline"><![CDATA[\mathsf {force}]]></fr:tex>, representing introduction and elimination forms, with typing rules as follows:


  
    <html:figure><fr:resource hash="c2ed0f787a8179307531bcc1071c19a0"><fr:resource-content><html:img src="/~yorgey/forest/c2ed0f787a8179307531bcc1071c19a0.svg" /></fr:resource-content><fr:resource-source type="latex" part="preamble"><![CDATA[\usepackage {mathpartir}\usepackage {amssymb}\usepackage {mathtools}]]></fr:resource-source><fr:resource-source type="latex" part="body"><![CDATA[$
  \inferrule 
    {\Gamma  \vdash  t : \tau  \;[\Delta ]}
    {\Gamma  \vdash  \mathsf {delay}\; t : \mathsf {Delay}^{\Delta }\;\tau  \;[\varnothing ]}
$]]></fr:resource-source></fr:resource></html:figure>
  



  
    <html:figure><fr:resource hash="cd870ac9cc5d240f4fb06934ea45c1c3"><fr:resource-content><html:img src="/~yorgey/forest/cd870ac9cc5d240f4fb06934ea45c1c3.svg" /></fr:resource-content><fr:resource-source type="latex" part="preamble"><![CDATA[\usepackage {mathpartir}\usepackage {amssymb}\usepackage {mathtools}]]></fr:resource-source><fr:resource-source type="latex" part="body"><![CDATA[$
  \inferrule 
    {\Gamma  \vdash  t : \mathsf {Delay}^{\Delta _1}\;\tau  \;[\Delta _2]}
    {\Gamma  \vdash  \mathsf {force}\; t : \tau  \;[\Delta _1 \cup  \Delta _2]}
$]]></fr:resource-source></fr:resource></html:figure>
  


The idea is that if we wrap a term in a delay, then any capabilities needed to evaluate it are put off until such time as its evaluation is forced.
</html:p>
                    <html:p>XXX Can <fr:tex display="inline"><![CDATA[\mathsf {delay}]]></fr:tex> and <fr:tex display="inline"><![CDATA[\mathsf {force}]]></fr:tex> be constants, with polytypes?  Or do they really need to be special syntactic forms with typing rules?</html:p>
                    <fr:tree show-metadata="false">
                      <fr:frontmatter>
                        <fr:authors />
                        <fr:date>
                          <fr:year>2026</fr:year>
                          <fr:month>6</fr:month>
                          <fr:day>10</fr:day>
                        </fr:date>
                        <fr:uri>http://ozark.hendrix.edu/~yorgey/forest/00GT/</fr:uri>
                        <fr:display-uri>00GT</fr:display-uri>
                        <fr:route>/~yorgey/forest/00GT/</fr:route>
                        <fr:taxon>Remark</fr:taxon>
                      </fr:frontmatter>
                      <fr:mainmatter>
                        <html:p>Note that in surface syntax for Swarm, the <fr:link href="/~yorgey/forest/00GS/" title="\mathsf {Delay}" uri="http://ozark.hendrix.edu/~yorgey/forest/00GS/" display-uri="00GS" type="local">delay type</fr:link> and introduction form are both written with curly braces; we choose not to use that syntax in this formal development since it could be easily confused with syntax for capability sets.</html:p>
                      </fr:mainmatter>
                    </fr:tree>
                  </fr:mainmatter>
                </fr:tree>
                <fr:tree show-metadata="false">
                  <fr:frontmatter>
                    <fr:authors />
                    <fr:date>
                      <fr:year>2026</fr:year>
                      <fr:month>6</fr:month>
                      <fr:day>10</fr:day>
                    </fr:date>
                    <fr:uri>http://ozark.hendrix.edu/~yorgey/forest/00GU/</fr:uri>
                    <fr:display-uri>00GU</fr:display-uri>
                    <fr:route>/~yorgey/forest/00GU/</fr:route>
                    <fr:title text="Functions">Functions</fr:title>
                  </fr:frontmatter>
                  <fr:mainmatter>
                    <html:p>Function type</html:p>
                  </fr:mainmatter>
                </fr:tree>
                <fr:tree show-metadata="false">
                  <fr:frontmatter>
                    <fr:authors />
                    <fr:date>
                      <fr:year>2025</fr:year>
                      <fr:month>11</fr:month>
                      <fr:day>18</fr:day>
                    </fr:date>
                    <fr:uri>http://ozark.hendrix.edu/~yorgey/forest/001W/</fr:uri>
                    <fr:display-uri>001W</fr:display-uri>
                    <fr:route>/~yorgey/forest/001W/</fr:route>
                    <fr:title text="\mathsf {Bool}">
                      <fr:tex display="inline"><![CDATA[\mathsf {Bool}]]></fr:tex>
                    </fr:title>
                  </fr:frontmatter>
                  <fr:mainmatter>
                    <html:p>The <fr:tex display="inline"><![CDATA[\mathsf {Bool}]]></fr:tex> type is standard, with values <fr:tex display="inline"><![CDATA[\mathsf {true}]]></fr:tex> and <fr:tex display="inline"><![CDATA[\mathsf {false}]]></fr:tex>; no special capabilities are needed to use Boolean values themselves.</html:p>
                    <html:p>The eliminator for <fr:tex display="inline"><![CDATA[\mathsf {Bool}]]></fr:tex> values is a built-in function <fr:tex display="inline"><![CDATA[\mathsf {if}]]></fr:tex> with type

<fr:tex display="block"><![CDATA[\mathsf {if} : \forall  \alpha .\; \{\mathsf {Exc}(\mathsf {if})\} \Rightarrow  \mathsf {Bool} \to  \mathsf {Delay}^{\delta _1}\;\alpha  \to  \mathsf {Delay}^{\delta _2}\;\alpha  \xrightarrow {\delta _1 \cup  \delta _2} \alpha ]]></fr:tex>

This says that <fr:tex display="inline"><![CDATA[\mathsf {if}]]></fr:tex> takes a boolean value and two delayed expressions of the same type <fr:tex display="inline"><![CDATA[\alpha ]]></fr:tex>, and produces a value of type <fr:tex display="inline"><![CDATA[\alpha ]]></fr:tex>.  It also tells us that evaluating the constant <fr:tex display="inline"><![CDATA[\mathsf {if}]]></fr:tex> itself requires capability <fr:tex display="inline"><![CDATA[\mathsf {Exc}(\mathsf {if})]]></fr:tex>, and that evaluating its full application to a boolean and two delayed expressions requires capabilities <fr:tex display="inline"><![CDATA[\delta _1 \cup  \delta _2]]></fr:tex>—whatever capabilities are required to evaluate the two branches.  Of course, only one of <fr:tex display="inline"><![CDATA[\delta _1]]></fr:tex> or <fr:tex display="inline"><![CDATA[\delta _2]]></fr:tex> will actually be needed, but since we can't know which until runtime, we must conservatively require their union.</html:p>
                    <html:p>XXX should it just be <fr:tex display="inline"><![CDATA[\delta ]]></fr:tex> everywhere, or <fr:tex display="inline"><![CDATA[\delta _1 \cup  \delta _2]]></fr:tex> etc.?  Are we thinking of the capability annotation on the final arrow as being synthesized from the annotations on the two delay expressions, or are we thinking of it as an external constraint being imposed?</html:p>
                  </fr:mainmatter>
                </fr:tree>
                <fr:tree show-metadata="false">
                  <fr:frontmatter>
                    <fr:authors />
                    <fr:date>
                      <fr:year>2025</fr:year>
                      <fr:month>11</fr:month>
                      <fr:day>18</fr:day>
                    </fr:date>
                    <fr:uri>http://ozark.hendrix.edu/~yorgey/forest/001X/</fr:uri>
                    <fr:display-uri>001X</fr:display-uri>
                    <fr:route>/~yorgey/forest/001X/</fr:route>
                    <fr:title text="\mathsf {Int}">
                      <fr:tex display="inline"><![CDATA[\mathsf {Int}]]></fr:tex>
                    </fr:title>
                  </fr:frontmatter>
                  <fr:mainmatter />
                </fr:tree>
              </fr:mainmatter>
            </fr:tree>
            <fr:tree show-metadata="false">
              <fr:frontmatter>
                <fr:authors />
                <fr:date>
                  <fr:year>2025</fr:year>
                  <fr:month>11</fr:month>
                  <fr:day>3</fr:day>
                </fr:date>
                <fr:uri>http://ozark.hendrix.edu/~yorgey/forest/000W/</fr:uri>
                <fr:display-uri>000W</fr:display-uri>
                <fr:route>/~yorgey/forest/000W/</fr:route>
                <fr:title text="Inventories and requirement contexts">Inventories and requirement contexts</fr:title>
              </fr:frontmatter>
              <fr:mainmatter>
                <html:p>In order to be able to properly express typing rules for the <fr:link href="/~yorgey/forest/001U/" title="Swarm command monad" uri="http://ozark.hendrix.edu/~yorgey/forest/001U/" display-uri="001U" type="local">command monad</fr:link>, we first need to develop some additional machinery.</html:p>
                <fr:tree show-metadata="false">
                  <fr:frontmatter>
                    <fr:authors />
                    <fr:date>
                      <fr:year>2025</fr:year>
                      <fr:month>11</fr:month>
                      <fr:day>4</fr:day>
                    </fr:date>
                    <fr:uri>http://ozark.hendrix.edu/~yorgey/forest/0013/</fr:uri>
                    <fr:display-uri>0013</fr:display-uri>
                    <fr:route>/~yorgey/forest/0013/</fr:route>
                    <fr:title text="Extended natural numbers">Extended natural numbers</fr:title>
                    <fr:taxon>Definition</fr:taxon>
                  </fr:frontmatter>
                  <fr:mainmatter>
                    <html:p>We write <fr:tex display="inline"><![CDATA[\mathbb {N}_\infty  = \mathbb {N} \cup  \{\infty \}]]></fr:tex> to denote the natural numbers extended with a
special positive infinity value.</html:p>
                    <html:ul><html:li>Addition on <fr:tex display="inline"><![CDATA[\mathbb {N}_\infty ]]></fr:tex> satisfies <fr:tex display="inline"><![CDATA[n + \infty  = \infty  + n = \infty ]]></fr:tex> for all <fr:tex display="inline"><![CDATA[n \in  \mathbb {N}_\infty ]]></fr:tex>, and is standard on <fr:tex display="inline"><![CDATA[\mathbb {N}]]></fr:tex>.</html:li>
  <html:li><fr:tex display="inline"><![CDATA[a \leq  b]]></fr:tex> if and only if there exists <fr:tex display="inline"><![CDATA[c \in  \mathbb {N}_\infty ]]></fr:tex> such that <fr:tex display="inline"><![CDATA[a + c = b]]></fr:tex>.  In other words, <fr:tex display="inline"><![CDATA[\leq ]]></fr:tex> is standard on <fr:tex display="inline"><![CDATA[\mathbb {N}]]></fr:tex>, and <fr:tex display="inline"><![CDATA[n \leq  \infty ]]></fr:tex> for all <fr:tex display="inline"><![CDATA[n]]></fr:tex>.</html:li>
  <html:li>Multiplication is standard on <fr:tex display="inline"><![CDATA[\mathbb {N}]]></fr:tex>, with <fr:tex display="inline"><![CDATA[0 \times  \infty  = \infty  \times  0 = 0]]></fr:tex> and <fr:tex display="inline"><![CDATA[n \times  \infty  = \infty  \times  n = \infty ]]></fr:tex> for <fr:tex display="inline"><![CDATA[n > 0]]></fr:tex>.</html:li></html:ul>
                    <html:p>Under these definitions, <fr:tex display="inline"><![CDATA[(\mathbb {N}_\infty , +, 0, \times , 1)]]></fr:tex> forms a (<fr:link href="https://en.wikipedia.org/wiki/Monus" type="external">naturally ordered</fr:link>) commutative <fr:link href="https://en.wikipedia.org/wiki/Semiring" type="external">semiring</fr:link>.</html:p>
                  </fr:mainmatter>
                </fr:tree>
                <fr:tree show-metadata="false">
                  <fr:frontmatter>
                    <fr:authors />
                    <fr:date>
                      <fr:year>2025</fr:year>
                      <fr:month>11</fr:month>
                      <fr:day>4</fr:day>
                    </fr:date>
                    <fr:uri>http://ozark.hendrix.edu/~yorgey/forest/0012/</fr:uri>
                    <fr:display-uri>0012</fr:display-uri>
                    <fr:route>/~yorgey/forest/0012/</fr:route>
                    <fr:title text="Inventories">Inventories</fr:title>
                    <fr:taxon>Definition</fr:taxon>
                  </fr:frontmatter>
                  <fr:mainmatter>
                    <html:p>An <html:em>inventory</html:em> is a multiset of entities, that is, a function
<fr:tex display="inline"><![CDATA[\mathbf {E} \to  \mathbb {N}_\infty ]]></fr:tex> assigning a <fr:link href="/~yorgey/forest/0013/" title="Extended natural numbers" uri="http://ozark.hendrix.edu/~yorgey/forest/0013/" display-uri="0013" type="local">nonnegative (possibly infinite)</fr:link>
multiplicity to each entity.</html:p>
                    <fr:tree show-metadata="false">
                      <fr:frontmatter>
                        <fr:authors />
                        <fr:date>
                          <fr:year>2025</fr:year>
                          <fr:month>11</fr:month>
                          <fr:day>13</fr:day>
                        </fr:date>
                        <fr:uri>http://ozark.hendrix.edu/~yorgey/forest/001H/</fr:uri>
                        <fr:display-uri>001H</fr:display-uri>
                        <fr:route>/~yorgey/forest/001H/</fr:route>
                        <fr:title text="Inventory union">Inventory union</fr:title>
                        <fr:taxon>Definition</fr:taxon>
                      </fr:frontmatter>
                      <fr:mainmatter>
                        <html:p>We define the union of <fr:link href="/~yorgey/forest/0012/" title="Inventories" uri="http://ozark.hendrix.edu/~yorgey/forest/0012/" display-uri="0012" type="local">inventories</fr:link>, <fr:tex display="inline"><![CDATA[I \cup  J]]></fr:tex>, as the inventory <fr:tex display="inline"><![CDATA[\lambda  e.\; I(e) + J(e)]]></fr:tex>, the componentwise sum of inventories <fr:tex display="inline"><![CDATA[I]]></fr:tex> and <fr:tex display="inline"><![CDATA[J]]></fr:tex>.  Inventories form a monoid under union, with the empty inventory <fr:tex display="inline"><![CDATA[\lambda  e.\; 0]]></fr:tex> as the identity element.</html:p>
                      </fr:mainmatter>
                    </fr:tree>
                    <fr:tree show-metadata="false">
                      <fr:frontmatter>
                        <fr:authors />
                        <fr:date>
                          <fr:year>2025</fr:year>
                          <fr:month>11</fr:month>
                          <fr:day>13</fr:day>
                        </fr:date>
                        <fr:uri>http://ozark.hendrix.edu/~yorgey/forest/001I/</fr:uri>
                        <fr:display-uri>001I</fr:display-uri>
                        <fr:route>/~yorgey/forest/001I/</fr:route>
                        <fr:title text="Inventory ordering">Inventory ordering</fr:title>
                        <fr:taxon>Definition</fr:taxon>
                      </fr:frontmatter>
                      <fr:mainmatter>
                        <html:p>If <fr:tex display="inline"><![CDATA[I]]></fr:tex> and <fr:tex display="inline"><![CDATA[J]]></fr:tex> are <fr:link href="/~yorgey/forest/0012/" title="Inventories" uri="http://ozark.hendrix.edu/~yorgey/forest/0012/" display-uri="0012" type="local">inventories</fr:link>, we write <fr:tex display="inline"><![CDATA[I \subseteq  J]]></fr:tex> to mean that <fr:tex display="inline"><![CDATA[I(e) \leq  J(e)]]></fr:tex> for every <fr:tex display="inline"><![CDATA[e \in  \mathbf {E}]]></fr:tex>, that is, <fr:tex display="inline"><![CDATA[J]]></fr:tex> contains at least as many copies of each entity <fr:tex display="inline"><![CDATA[e]]></fr:tex> as <fr:tex display="inline"><![CDATA[I]]></fr:tex> does.  Equivalently, <fr:tex display="inline"><![CDATA[I \subseteq  J]]></fr:tex> iff there exists an inventory <fr:tex display="inline"><![CDATA[K]]></fr:tex> such that <fr:tex display="inline"><![CDATA[I \cup  K = J]]></fr:tex>.</html:p>
                      </fr:mainmatter>
                    </fr:tree>
                    <fr:tree show-metadata="false">
                      <fr:frontmatter>
                        <fr:authors />
                        <fr:date>
                          <fr:year>2025</fr:year>
                          <fr:month>11</fr:month>
                          <fr:day>13</fr:day>
                        </fr:date>
                        <fr:uri>http://ozark.hendrix.edu/~yorgey/forest/001J/</fr:uri>
                        <fr:display-uri>001J</fr:display-uri>
                        <fr:route>/~yorgey/forest/001J/</fr:route>
                        <fr:title text="Inventory replication">Inventory replication</fr:title>
                        <fr:taxon>Definition</fr:taxon>
                      </fr:frontmatter>
                      <fr:mainmatter>
                        <html:p>If <fr:tex display="inline"><![CDATA[k \in  \mathbb {N}_\infty ]]></fr:tex> and <fr:tex display="inline"><![CDATA[I]]></fr:tex> is an <fr:link href="/~yorgey/forest/0012/" title="Inventories" uri="http://ozark.hendrix.edu/~yorgey/forest/0012/" display-uri="0012" type="local">inventory</fr:link>, we define <fr:tex display="inline"><![CDATA[k \cdot  I]]></fr:tex> as the inventory <fr:tex display="inline"><![CDATA[\lambda  e.\; k \times  I(e)]]></fr:tex>; that is, intuitively, <fr:tex display="inline"><![CDATA[k \cdot  I]]></fr:tex> consists of the union of <fr:tex display="inline"><![CDATA[k]]></fr:tex> copies of <fr:tex display="inline"><![CDATA[I]]></fr:tex>.  The <fr:link href="/~yorgey/forest/001H/" title="Inventory union" uri="http://ozark.hendrix.edu/~yorgey/forest/001H/" display-uri="001H" type="local">inventory monoid</fr:link> together with this action by <fr:tex display="inline"><![CDATA[\mathbb {N}_\infty ]]></fr:tex> forms a <fr:link href="https://en.wikipedia.org/wiki/Semimodule" type="external">left semimodule</fr:link>.</html:p>
                      </fr:mainmatter>
                    </fr:tree>
                  </fr:mainmatter>
                </fr:tree>
                <fr:tree show-metadata="false">
                  <fr:frontmatter>
                    <fr:authors />
                    <fr:date>
                      <fr:year>2025</fr:year>
                      <fr:month>11</fr:month>
                      <fr:day>3</fr:day>
                    </fr:date>
                    <fr:uri>http://ozark.hendrix.edu/~yorgey/forest/000Z/</fr:uri>
                    <fr:display-uri>000Z</fr:display-uri>
                    <fr:route>/~yorgey/forest/000Z/</fr:route>
                    <fr:title text="Requirement contexts">Requirement contexts</fr:title>
                    <fr:taxon>Definition</fr:taxon>
                  </fr:frontmatter>
                  <fr:mainmatter>
                    <html:p>A <html:em>requirement context</html:em> <fr:tex display="inline"><![CDATA[\Phi ]]></fr:tex> is a triple <fr:tex display="inline"><![CDATA[(\Delta ,D,I)]]></fr:tex> where
  <html:ul><html:li><fr:tex display="inline"><![CDATA[\Delta  \subseteq  \mathbf {C}]]></fr:tex> is a set of <fr:link href="/~yorgey/forest/001D/" title="Capabilities" uri="http://ozark.hendrix.edu/~yorgey/forest/001D/" display-uri="001D" type="local">capabilities</fr:link>, representing capabilities a <fr:link href="/~yorgey/forest/0014/" title="Robots" uri="http://ozark.hendrix.edu/~yorgey/forest/0014/" display-uri="0014" type="local">robot</fr:link> should have,</html:li>
    <html:li><fr:tex display="inline"><![CDATA[D \subseteq  \mathbf {E}]]></fr:tex> is a set of <fr:link href="/~yorgey/forest/001C/" title="Entities" uri="http://ozark.hendrix.edu/~yorgey/forest/001C/" display-uri="001C" type="local">entities</fr:link>, representing <fr:link href="/~yorgey/forest/001E/" title="Devices" uri="http://ozark.hendrix.edu/~yorgey/forest/001E/" display-uri="001E" type="local">devices</fr:link> that should be equipped,</html:li>
    <html:li><fr:tex display="inline"><![CDATA[I]]></fr:tex> is an <fr:link href="/~yorgey/forest/0012/" title="Inventories" uri="http://ozark.hendrix.edu/~yorgey/forest/0012/" display-uri="0012" type="local">inventory</fr:link>, representing entities that a <fr:link href="/~yorgey/forest/0014/" title="Robots" uri="http://ozark.hendrix.edu/~yorgey/forest/0014/" display-uri="0014" type="local">robot</fr:link> should possess.</html:li></html:ul></html:p>
                    <fr:tree show-metadata="false">
                      <fr:frontmatter>
                        <fr:authors />
                        <fr:date>
                          <fr:year>2025</fr:year>
                          <fr:month>11</fr:month>
                          <fr:day>13</fr:day>
                        </fr:date>
                        <fr:uri>http://ozark.hendrix.edu/~yorgey/forest/001K/</fr:uri>
                        <fr:display-uri>001K</fr:display-uri>
                        <fr:route>/~yorgey/forest/001K/</fr:route>
                        <fr:title text="Requirement context notation">Requirement context notation</fr:title>
                        <fr:taxon>Definition</fr:taxon>
                      </fr:frontmatter>
                      <fr:mainmatter>
                        <html:p>We write <fr:tex display="inline"><![CDATA[\varnothing ]]></fr:tex> for the empty <fr:link href="/~yorgey/forest/000Z/" title="Requirement contexts" uri="http://ozark.hendrix.edu/~yorgey/forest/000Z/" display-uri="000Z" type="local">requirement context</fr:link> <fr:tex display="inline"><![CDATA[(\varnothing , \varnothing , \lambda  e.\; 0)]]></fr:tex>.  Also, for convenience, we sometimes write a bare set of capabilities <fr:tex display="inline"><![CDATA[\Delta ]]></fr:tex> to denote the requirement context <fr:tex display="inline"><![CDATA[(\Delta , \varnothing , \lambda  e.\; 0)]]></fr:tex>, or a bare capability <fr:tex display="inline"><![CDATA[c]]></fr:tex> to denote <fr:tex display="inline"><![CDATA[(\{c\}, \varnothing , \lambda  e.\; 0)]]></fr:tex>; and likewise for bare entity sets or inventories.</html:p>
                      </fr:mainmatter>
                    </fr:tree>
                    <fr:tree show-metadata="false">
                      <fr:frontmatter>
                        <fr:authors />
                        <fr:date>
                          <fr:year>2025</fr:year>
                          <fr:month>11</fr:month>
                          <fr:day>3</fr:day>
                        </fr:date>
                        <fr:uri>http://ozark.hendrix.edu/~yorgey/forest/0010/</fr:uri>
                        <fr:display-uri>0010</fr:display-uri>
                        <fr:route>/~yorgey/forest/0010/</fr:route>
                        <fr:title text="Requirement context satisfaction">Requirement context satisfaction</fr:title>
                        <fr:taxon>Definition</fr:taxon>
                      </fr:frontmatter>
                      <fr:mainmatter>
                        <html:p>A <fr:link href="/~yorgey/forest/0014/" title="Robots" uri="http://ozark.hendrix.edu/~yorgey/forest/0014/" display-uri="0014" type="local">robot</fr:link> with equipped device set <fr:tex display="inline"><![CDATA[Q]]></fr:tex> and <fr:link href="/~yorgey/forest/0012/" title="Inventories" uri="http://ozark.hendrix.edu/~yorgey/forest/0012/" display-uri="0012" type="local">inventory</fr:link> <fr:tex display="inline"><![CDATA[V]]></fr:tex> <html:em>satisfies</html:em> the <fr:link href="/~yorgey/forest/000Z/" title="Requirement contexts" uri="http://ozark.hendrix.edu/~yorgey/forest/000Z/" display-uri="000Z" type="local">requirement context</fr:link> <fr:tex display="inline"><![CDATA[\Phi  = (\Delta ,D,I)]]></fr:tex> if <fr:tex display="inline"><![CDATA[\Delta  \subseteq  \mathsf {caps}(Q)]]></fr:tex>, <fr:tex display="inline"><![CDATA[D \subseteq  Q]]></fr:tex>, and <fr:tex display="inline"><![CDATA[I \subseteq  V]]></fr:tex>. In other words, a robot satisfies a requirement context if its equipped devices provide at least the required capabilities, it has all the required devices equipped, and its inventory contains at least the required entity counts.</html:p>
                      </fr:mainmatter>
                    </fr:tree>
                    <fr:tree show-metadata="false">
                      <fr:frontmatter>
                        <fr:authors />
                        <fr:date>
                          <fr:year>2025</fr:year>
                          <fr:month>11</fr:month>
                          <fr:day>3</fr:day>
                        </fr:date>
                        <fr:uri>http://ozark.hendrix.edu/~yorgey/forest/0011/</fr:uri>
                        <fr:display-uri>0011</fr:display-uri>
                        <fr:route>/~yorgey/forest/0011/</fr:route>
                        <fr:title text="Requirement context motivation">Requirement context motivation</fr:title>
                        <fr:taxon>Remark</fr:taxon>
                      </fr:frontmatter>
                      <fr:mainmatter>
                        <html:p>It's worth discussing the motivation for each of the components of a <fr:link href="/~yorgey/forest/000Z/" title="Requirement contexts" uri="http://ozark.hendrix.edu/~yorgey/forest/000Z/" display-uri="000Z" type="local">requirement context</fr:link>.</html:p>
                        <html:ul><html:li>The capability set <fr:tex display="inline"><![CDATA[\Delta ]]></fr:tex> is used to record <fr:link href="/~yorgey/forest/000X/" title="Capabilities, entities, and devices" uri="http://ozark.hendrix.edu/~yorgey/forest/000X/" display-uri="000X" type="local">capabilities</fr:link> needed to execute certain commands, use certain language constructs, and so on.</html:li>
  <html:li><html:p>The device set <fr:tex display="inline"><![CDATA[D]]></fr:tex> is used to record specific <fr:link href="/~yorgey/forest/000X/" title="Capabilities, entities, and devices" uri="http://ozark.hendrix.edu/~yorgey/forest/000X/" display-uri="000X" type="local">devices</fr:link> required by a <html:code>require</html:code> directive.  For example, the <html:code>boat</html:code> device confers the capability to traverse water, and does not correspond to a specific command or language construct, so the programmer needs a way to require it specifically.  Also, since multiple devices may provide a given capability, the programmer may have reasons for requiring a specific device rather than letting the system choose.</html:p>
  <html:p>One might still wonder why we need both <fr:tex display="inline"><![CDATA[\Delta ]]></fr:tex> and <fr:tex display="inline"><![CDATA[D]]></fr:tex>; wouldn't it be simpler to just have a set of required devices <fr:tex display="inline"><![CDATA[D]]></fr:tex>? However, since the relationship between devices and capabilities can be many-to-many, we cannot reliably pick a concrete device for a required capability in a nicely compositional way.  We prefer to wait until the last possible minute to pick a concrete set of devices to provide a given set of capabilities (using the <fr:link href="/~yorgey/forest/001G/" title="Capabilities \to  devices oracle" uri="http://ozark.hendrix.edu/~yorgey/forest/001G/" display-uri="001G" type="local">provisioning oracle</fr:link>).</html:p></html:li>
  <html:li>The <fr:link href="/~yorgey/forest/0012/" title="Inventories" uri="http://ozark.hendrix.edu/~yorgey/forest/0012/" display-uri="0012" type="local">inventory</fr:link> <fr:tex display="inline"><![CDATA[I]]></fr:tex> has several purposes.  One is simply to record inventory required by a <html:code>stock</html:code> directive.  For example, <html:code>stock 10 "rock"</html:code> requires a robot to have 10 rocks in its inventory.  More importantly, however, the <html:code>build</html:code> command (which constructs a robot to execute a given program) turns device requirements into inventory requirements.  That is, if executing program <html:code>P</html:code> requires having device <fr:tex display="inline"><![CDATA[d]]></fr:tex> equipped, then executing <html:code>build {P}</html:code> will require possessing <fr:tex display="inline"><![CDATA[d]]></fr:tex> in the inventory (in order to equip the device on the newly constructed robot).</html:li></html:ul>
                      </fr:mainmatter>
                    </fr:tree>
                    <fr:tree show-metadata="false">
                      <fr:frontmatter>
                        <fr:authors />
                        <fr:date>
                          <fr:year>2025</fr:year>
                          <fr:month>11</fr:month>
                          <fr:day>5</fr:day>
                        </fr:date>
                        <fr:uri>http://ozark.hendrix.edu/~yorgey/forest/0016/</fr:uri>
                        <fr:display-uri>0016</fr:display-uri>
                        <fr:route>/~yorgey/forest/0016/</fr:route>
                        <fr:title text="Requirement context union">Requirement context union</fr:title>
                      </fr:frontmatter>
                      <fr:mainmatter>
                        <html:p>We define the union of <fr:link href="/~yorgey/forest/000Z/" title="Requirement contexts" uri="http://ozark.hendrix.edu/~yorgey/forest/000Z/" display-uri="000Z" type="local">requirement contexts</fr:link> componentwise, that is, <fr:tex display="block"><![CDATA[\Phi _1 \cup  \Phi _2 = (\Delta _1, D_1, I_1) \cup  (\Delta _2, D_2, I_2) = (\Delta _1 \cup  \Delta _2, D_1 \cup  D_2, I_1 \cup  I_2),]]></fr:tex> where the first two unions are set union, and the last is <fr:link href="/~yorgey/forest/001H/" title="Inventory union" uri="http://ozark.hendrix.edu/~yorgey/forest/001H/" display-uri="001H" type="local">inventory (multiset) union</fr:link>.</html:p>
                      </fr:mainmatter>
                    </fr:tree>
                    <fr:tree show-metadata="false">
                      <fr:frontmatter>
                        <fr:authors />
                        <fr:date>
                          <fr:year>2025</fr:year>
                          <fr:month>11</fr:month>
                          <fr:day>13</fr:day>
                        </fr:date>
                        <fr:uri>http://ozark.hendrix.edu/~yorgey/forest/001L/</fr:uri>
                        <fr:display-uri>001L</fr:display-uri>
                        <fr:route>/~yorgey/forest/001L/</fr:route>
                        <fr:title text="Requirement context replication">Requirement context replication</fr:title>
                        <fr:taxon>Definition</fr:taxon>
                      </fr:frontmatter>
                      <fr:mainmatter>
                        <html:p>For <fr:tex display="inline"><![CDATA[k \in  \mathbb {N}_\infty ]]></fr:tex> we can also define <fr:tex display="inline"><![CDATA[k \cdot  \Phi  = k \cdot  (\Delta ,D,I) = (k \cdot  \Delta , k \cdot  D, k \cdot  I)]]></fr:tex>, where <fr:tex display="inline"><![CDATA[k \cdot  I]]></fr:tex> is <fr:link href="/~yorgey/forest/001J/" title="Inventory replication" uri="http://ozark.hendrix.edu/~yorgey/forest/001J/" display-uri="001J" type="local">inventory replication</fr:link>, and for any set <fr:tex display="inline"><![CDATA[S]]></fr:tex> we define <fr:tex display="inline"><![CDATA[0 \cdot  S = \varnothing ]]></fr:tex> and <fr:tex display="inline"><![CDATA[k \cdot  S = S]]></fr:tex> for <fr:tex display="inline"><![CDATA[k > 0]]></fr:tex>.  Again, the idea is that <fr:tex display="inline"><![CDATA[k \cdot  \Phi ]]></fr:tex> represents the union of <fr:tex display="inline"><![CDATA[k]]></fr:tex> copies of <fr:tex display="inline"><![CDATA[\Phi ]]></fr:tex>.</html:p>
                      </fr:mainmatter>
                    </fr:tree>
                  </fr:mainmatter>
                </fr:tree>
              </fr:mainmatter>
            </fr:tree>
            <fr:tree show-metadata="false">
              <fr:frontmatter>
                <fr:authors />
                <fr:date>
                  <fr:year>2025</fr:year>
                  <fr:month>11</fr:month>
                  <fr:day>18</fr:day>
                </fr:date>
                <fr:uri>http://ozark.hendrix.edu/~yorgey/forest/001U/</fr:uri>
                <fr:display-uri>001U</fr:display-uri>
                <fr:route>/~yorgey/forest/001U/</fr:route>
                <fr:title text="Swarm command monad">Swarm command monad</fr:title>
              </fr:frontmatter>
              <fr:mainmatter />
            </fr:tree>
            <fr:tree show-metadata="false">
              <fr:frontmatter>
                <fr:authors />
                <fr:date>
                  <fr:year>2025</fr:year>
                  <fr:month>11</fr:month>
                  <fr:day>2</fr:day>
                </fr:date>
                <fr:title text="Stuff that needs to be moved/reorganized">Stuff that needs to be moved/reorganized</fr:title>
              </fr:frontmatter>
              <fr:mainmatter>
                <fr:tree show-metadata="false">
                  <fr:frontmatter>
                    <fr:authors />
                    <fr:date>
                      <fr:year>2025</fr:year>
                      <fr:month>11</fr:month>
                      <fr:day>3</fr:day>
                    </fr:date>
                    <fr:uri>http://ozark.hendrix.edu/~yorgey/forest/000Y/</fr:uri>
                    <fr:display-uri>000Y</fr:display-uri>
                    <fr:route>/~yorgey/forest/000Y/</fr:route>
                    <fr:title text="Swarm monotypes">Swarm monotypes</fr:title>
                  </fr:frontmatter>
                  <fr:mainmatter>
                    <html:p>Swarm monotypes <fr:tex display="inline"><![CDATA[\tau ]]></fr:tex> consist of:</html:p>
                    <html:ul><html:li>Base types such as <fr:tex display="inline"><![CDATA[\mathsf {Void}]]></fr:tex>, <fr:tex display="inline"><![CDATA[\mathsf {Unit}]]></fr:tex>, <fr:tex display="inline"><![CDATA[\mathsf {Int}]]></fr:tex>, <fr:tex display="inline"><![CDATA[\mathsf {Text}]]></fr:tex>, <fr:tex display="inline"><![CDATA[\mathsf {Bool}]]></fr:tex>.  See the <fr:link href="https://github.com/swarm-game/swarm/blob/47bf44251471814a2510c0dceeaf7dfe347bdd1d/src/swarm-lang/Swarm/Language/Types.hsL182-L205" type="external">Swarm source code for a complete list</fr:link>, but the precise list does not matter much for this discussion.</html:li>
  <html:li>Sum types <fr:tex display="inline"><![CDATA[\tau _1 + \tau _2]]></fr:tex>, product types <fr:tex display="inline"><![CDATA[\tau _1 \times  \tau _2]]></fr:tex>, and record types <fr:tex display="inline"><![CDATA[[x_1: \tau _1, \dots , x_k: \tau _k]]]></fr:tex>, all of which are standard.</html:li>
  <html:li>Command types.  The type <fr:tex display="inline"><![CDATA[\mathsf {Cmd}^{\Phi }\;\tau ]]></fr:tex> represents commands which can be executed in <fr:link href="/~yorgey/forest/000X/" title="Capabilities, entities, and devices" uri="http://ozark.hendrix.edu/~yorgey/forest/000X/" display-uri="000X" type="local">requirement context</fr:link> <fr:tex display="inline"><![CDATA[\Phi ]]></fr:tex> and result in a value of type <fr:tex display="inline"><![CDATA[\tau ]]></fr:tex>.</html:li>
  <html:li>Delay types. The type <fr:tex display="inline"><![CDATA[\mathsf {Delay}^{\Delta }\;\tau ]]></fr:tex> represents delayed expressions which, when forced, can be evaluated using the set of capabilities <fr:tex display="inline"><![CDATA[\Delta ]]></fr:tex>, resulting in a value of type <fr:tex display="inline"><![CDATA[\tau ]]></fr:tex>.</html:li>
  <html:li>Function types. The type <fr:tex display="inline"><![CDATA[\tau _1 \xrightarrow {\Delta } \tau _2]]></fr:tex> represents functions which, when applied to an argument of type <fr:tex display="inline"><![CDATA[\tau _1]]></fr:tex>, produce a result of type <fr:tex display="inline"><![CDATA[\tau _2]]></fr:tex> using capabilities <fr:tex display="inline"><![CDATA[\Delta ]]></fr:tex>.  We use <fr:tex display="inline"><![CDATA[\tau _1 \xrightarrow {} \tau _2]]></fr:tex> as an abbreviation for <fr:tex display="inline"><![CDATA[\tau _1 \xrightarrow {\varnothing } \tau _2]]></fr:tex>, a function which requires no capabilities to apply.</html:li>
  <html:li>Equirecursive types.  The type <fr:tex display="inline"><![CDATA[\mu  X.\; \tau [X]]]></fr:tex> represents the type which is the least solution to <fr:tex display="inline"><![CDATA[\mu  X.\; \tau [X] = \tau [\mu  X.\; \tau [X]]]]></fr:tex>.</html:li></html:ul>
                  </fr:mainmatter>
                </fr:tree>
                <fr:tree show-metadata="false">
                  <fr:frontmatter>
                    <fr:authors />
                    <fr:date>
                      <fr:year>2025</fr:year>
                      <fr:month>11</fr:month>
                      <fr:day>9</fr:day>
                    </fr:date>
                    <fr:uri>http://ozark.hendrix.edu/~yorgey/forest/0017/</fr:uri>
                    <fr:display-uri>0017</fr:display-uri>
                    <fr:route>/~yorgey/forest/0017/</fr:route>
                    <fr:title text="Swarm typing rules">Swarm typing rules</fr:title>
                  </fr:frontmatter>
                  <fr:mainmatter>
                    <html:p>I will not attempt to write down a full set of typing rules here; rather, I will lay out some of the key rules, with examples.</html:p>
                    <html:p>XXX typing rules for evaluating base types that require capabilities</html:p>
                    <fr:tree show-metadata="false">
                      <fr:frontmatter>
                        <fr:authors />
                        <fr:date>
                          <fr:year>2025</fr:year>
                          <fr:month>11</fr:month>
                          <fr:day>9</fr:day>
                        </fr:date>
                        <fr:uri>http://ozark.hendrix.edu/~yorgey/forest/0018/</fr:uri>
                        <fr:display-uri>0018</fr:display-uri>
                        <fr:route>/~yorgey/forest/0018/</fr:route>
                        <fr:title text="Typing rules for built-in commands">Typing rules for built-in commands</fr:title>
                      </fr:frontmatter>
                      <fr:mainmatter>
                        <html:p>Many built-in commands have simple typing rules like the following:

  
  
    <html:figure><fr:resource hash="e866a87d1cc90437ea752e111588675e"><fr:resource-content><html:img src="/~yorgey/forest/e866a87d1cc90437ea752e111588675e.svg" /></fr:resource-content><fr:resource-source type="latex" part="preamble"><![CDATA[\usepackage {mathpartir}\usepackage {amssymb}\usepackage {mathtools}]]></fr:resource-source><fr:resource-source type="latex" part="body"><![CDATA[$
    \Gamma  \vdash  \mathsf {move} : \mathsf {Cmd}^{\mathsf {Exc}(\mathsf {move})}\;\mathsf {Unit} \;[\varnothing ]
  $]]></fr:resource-source></fr:resource></html:figure>
  


  This says simply that <fr:tex display="inline"><![CDATA[\mathsf {move}]]></fr:tex> is a command, and that executing it requires the corresponding capability. (Recall that writing a bare capability like <fr:tex display="inline"><![CDATA[\mathsf {Exc}(\mathsf {move})]]></fr:tex> where a <fr:link href="/~yorgey/forest/000Z/" title="Requirement contexts" uri="http://ozark.hendrix.edu/~yorgey/forest/000Z/" display-uri="000Z" type="local">requirement context</fr:link> is expected <fr:link href="/~yorgey/forest/001K/" title="Requirement context notation" uri="http://ozark.hendrix.edu/~yorgey/forest/001K/" display-uri="001K" type="local">stands for the context with a singleton capability set and empty device set and inventory</fr:link>.)  The <fr:tex display="inline"><![CDATA[\varnothing ]]></fr:tex> indicates that no capabilities are required to <html:em>evaluate</html:em> <fr:tex display="inline"><![CDATA[\mathsf {move}]]></fr:tex>; it is already a value so no evaluation is required.
</html:p>
                        <html:p>Some built-in commands take arguments, but they typically have a similar typing rule, with no capabilities on the arrows.  For example, no special capabilities are required to <html:em>evaluate</html:em> the application <fr:tex display="inline"><![CDATA[\mathsf {turn}\; \mathsf {left}]]></fr:tex>.


  
    <html:figure><fr:resource hash="2308805fbc723303f90febbd9881fdc8"><fr:resource-content><html:img src="/~yorgey/forest/2308805fbc723303f90febbd9881fdc8.svg" /></fr:resource-content><fr:resource-source type="latex" part="preamble"><![CDATA[\usepackage {mathpartir}\usepackage {amssymb}\usepackage {mathtools}]]></fr:resource-source><fr:resource-source type="latex" part="body"><![CDATA[$
  \Gamma  \vdash  \mathsf {turn} : \mathsf {Dir} \xrightarrow {} \mathsf {Cmd}^{\mathsf {Exc}(\mathsf {turn})}\;\mathsf {Unit} \;[\varnothing ]
$]]></fr:resource-source></fr:resource></html:figure></html:p>
                      </fr:mainmatter>
                    </fr:tree>
                    <fr:tree show-metadata="false">
                      <fr:frontmatter>
                        <fr:authors />
                        <fr:date>
                          <fr:year>2025</fr:year>
                          <fr:month>11</fr:month>
                          <fr:day>9</fr:day>
                        </fr:date>
                        <fr:uri>http://ozark.hendrix.edu/~yorgey/forest/0019/</fr:uri>
                        <fr:display-uri>0019</fr:display-uri>
                        <fr:route>/~yorgey/forest/0019/</fr:route>
                        <fr:title text="Typing rule for bind">Typing rule for bind</fr:title>
                      </fr:frontmatter>
                      <fr:mainmatter><html:p>The basic rule for bind (<html:em>aka</html:em> sequencing) in the <fr:tex display="inline"><![CDATA[\mathsf {Cmd}]]></fr:tex> monad is as follows:


  
    <html:figure><fr:resource hash="e26e8c4a1cfab08be9f7b4deec78dfce"><fr:resource-content><html:img src="/~yorgey/forest/e26e8c4a1cfab08be9f7b4deec78dfce.svg" /></fr:resource-content><fr:resource-source type="latex" part="preamble"><![CDATA[\usepackage {mathpartir}\usepackage {amssymb}\usepackage {mathtools}]]></fr:resource-source><fr:resource-source type="latex" part="body"><![CDATA[$
  \inferrule 
    {\Gamma  \vdash  c_1 : \mathsf {Cmd}^{\Phi _1}\;\tau _1 \;[\Delta _1] \\
     \Gamma  \vdash  c_2 : \mathsf {Cmd}^{\Phi _2}\;\tau _2 \;[\Delta _2]
    }
    {\Gamma  \vdash  c_1;\; c_2 : \mathsf {Cmd}^{\Phi _1 \cup  \Phi _2}\;\tau _2 \;[\Delta _1 \cup  \Delta _2]}
$]]></fr:resource-source></fr:resource></html:figure>
  


This says that if <fr:tex display="inline"><![CDATA[c_1]]></fr:tex> is a command requring capabilities <fr:tex display="inline"><![CDATA[\Delta _1]]></fr:tex> to evaluate and <fr:tex display="inline"><![CDATA[\Phi _1]]></fr:tex> to execute, and which produces a value of type <fr:tex display="inline"><![CDATA[\tau _1]]></fr:tex>, and <fr:tex display="inline"><![CDATA[c_2]]></fr:tex> is a command requiring capabilities <fr:tex display="inline"><![CDATA[\Delta _2]]></fr:tex> to evaluate and <fr:tex display="inline"><![CDATA[\Phi _2]]></fr:tex> to execute, producing a value of type <fr:tex display="inline"><![CDATA[\tau _2]]></fr:tex>, then <fr:tex display="inline"><![CDATA[c_1;\; c_2]]></fr:tex> is a command requring capabilities <fr:tex display="inline"><![CDATA[\Delta _1 \cup  \Delta _2]]></fr:tex> to evaluate, <fr:tex display="inline"><![CDATA[\Phi _1 \cup  \Phi _2]]></fr:tex> to execute, and producing a <fr:tex display="inline"><![CDATA[\tau _2]]></fr:tex>.
</html:p><html:p>Note that this rule corresponds to a particular evaluation strategy, namely, evaluating <fr:tex display="inline"><![CDATA[c_1]]></fr:tex> and <fr:tex display="inline"><![CDATA[c_2]]></fr:tex> eagerly at the time <fr:tex display="inline"><![CDATA[c_1;\; c_2]]></fr:tex> is evaluated. If we instead wanted to wait to evaluate <fr:tex display="inline"><![CDATA[c_1]]></fr:tex> and <fr:tex display="inline"><![CDATA[c_2]]></fr:tex> at execution time, then we would need a rule like


  
    <html:figure><fr:resource hash="c748506f354caf4ba1430e8fb982124a"><fr:resource-content><html:img src="/~yorgey/forest/c748506f354caf4ba1430e8fb982124a.svg" /></fr:resource-content><fr:resource-source type="latex" part="preamble"><![CDATA[\usepackage {mathpartir}\usepackage {amssymb}\usepackage {mathtools}]]></fr:resource-source><fr:resource-source type="latex" part="body"><![CDATA[$
  \inferrule 
    {\Gamma  \vdash  c_1 : \mathsf {Cmd}^{\Phi _1}\;\tau _1 \;[\Delta _1] \\
     \Gamma  \vdash  c_2 : \mathsf {Cmd}^{\Phi _2}\;\tau _2 \;[\Delta _2]
    }
    {\Gamma  \vdash  c_1;\; c_2 : \mathsf {Cmd}^{\Delta _1 \cup  \Delta _2 \cup  \Phi _1 \cup  \Phi _2}\;\tau _2 \;[\varnothing ]}
$]]></fr:resource-source></fr:resource></html:figure>
  


To see the difference, consider this example code:
<html:pre><![CDATA[def f : Int -> Cmd Unit = ... end
def g : Dir -> Cmd Unit = ... end

def example = f 3; g north end]]></html:pre>
When are <html:code>f 3</html:code> and <html:code>g north</html:code> evaluated?  Under the first rule above, they must be evaluated eagerly, when the definition of <html:code>example</html:code> is evaluated.  Under the second rule above, they would be re-evaluated every time <html:code>example</html:code> is executed.</html:p><html:p>However, we can also bind the result of <fr:tex display="inline"><![CDATA[c_1]]></fr:tex> in <fr:tex display="inline"><![CDATA[c_2]]></fr:tex>, in which case we can no longer evaluate <fr:tex display="inline"><![CDATA[c_2]]></fr:tex> eagerly (unless we wanted to implement partial evaluation of open terms).  The rule for <fr:tex display="inline"><![CDATA[x \leftarrow  c_1;\; c_2]]></fr:tex> is therefore:
</html:p>
  
    <html:figure><fr:resource hash="e91b6599345c60eaae0b4af2d98bc9c0"><fr:resource-content><html:img src="/~yorgey/forest/e91b6599345c60eaae0b4af2d98bc9c0.svg" /></fr:resource-content><fr:resource-source type="latex" part="preamble"><![CDATA[\usepackage {mathpartir}\usepackage {amssymb}\usepackage {mathtools}]]></fr:resource-source><fr:resource-source type="latex" part="body"><![CDATA[$
  \inferrule 
    {\Gamma  \vdash  c_1 : \mathsf {Cmd}^{\Phi _1}\;\tau _1 \;[\Delta _1] \\
     \Gamma , x : \tau _1 \vdash  c_2 : \mathsf {Cmd}^{\Phi _2}\;\tau _2 \;[\Delta _2]
    }
    {\Gamma  \vdash  x \leftarrow  c_1;\; c_2 : \mathsf {Cmd}^{\Phi _1 \cup  \Phi _2 \cup  \Delta _2}\;\tau _2 \;[\Delta _1]}
$]]></fr:resource-source></fr:resource></html:figure>
  
</fr:mainmatter>
                    </fr:tree>
                    <fr:tree show-metadata="false">
                      <fr:frontmatter>
                        <fr:authors />
                        <fr:date>
                          <fr:year>2025</fr:year>
                          <fr:month>11</fr:month>
                          <fr:day>9</fr:day>
                        </fr:date>
                        <fr:uri>http://ozark.hendrix.edu/~yorgey/forest/001A/</fr:uri>
                        <fr:display-uri>001A</fr:display-uri>
                        <fr:route>/~yorgey/forest/001A/</fr:route>
                        <fr:title text="Typing rules for functions">Typing rules for functions</fr:title>
                      </fr:frontmatter>
                      <fr:mainmatter>
                        <html:p>The typing rule for lambdas is straightforward:


  
    <html:figure><fr:resource hash="3198d01a8eaf1ee874d5aee986119d01"><fr:resource-content><html:img src="/~yorgey/forest/3198d01a8eaf1ee874d5aee986119d01.svg" /></fr:resource-content><fr:resource-source type="latex" part="preamble"><![CDATA[\usepackage {mathpartir}\usepackage {amssymb}\usepackage {mathtools}]]></fr:resource-source><fr:resource-source type="latex" part="body"><![CDATA[$
  \inferrule 
    {\Gamma , x : \tau _1 \vdash  e : \tau _2 \;[\Delta ]}
    {\Gamma  \vdash  \lambda  x : \tau _1.\; e : \tau _1 \xrightarrow {\Delta } \tau _2 \;[\mathsf {Lambda}]}
$]]></fr:resource-source></fr:resource></html:figure>
  


Notice how the requirements for evaluating the body show up over the arrow in the result type, but are not needed to evaluate the lambda itself. We do not evaluate under lambdas, but defer evaluation of the body until evaluating an application to an argument.  However, evaluating a lambda does require the special <fr:tex display="inline"><![CDATA[\mathsf {Lambda}]]></fr:tex> capability.
</html:p>
                        <html:p>Here is the typing rule for function application:


  
    <html:figure><fr:resource hash="d14a736e4874c8787cc1927a9e0e5c0b"><fr:resource-content><html:img src="/~yorgey/forest/d14a736e4874c8787cc1927a9e0e5c0b.svg" /></fr:resource-content><fr:resource-source type="latex" part="preamble"><![CDATA[\usepackage {mathpartir}\usepackage {amssymb}\usepackage {mathtools}]]></fr:resource-source><fr:resource-source type="latex" part="body"><![CDATA[$
  \inferrule 
    {\Gamma  \vdash  f : \tau _1 \xrightarrow {\Delta _1} \tau _2 \;[\Delta _2] \\
     \Gamma  \vdash  e : \tau _1 \;[\Delta _3]
    }
    {\Gamma  \vdash  f\; e : \tau _2 \;[\Delta _1 \cup  \Delta _2 \cup  \Delta _3 \cup  \mathsf {Apply}]}
$]]></fr:resource-source></fr:resource></html:figure>
  


The capabilities needed to evaluate the application <fr:tex display="inline"><![CDATA[f\; e]]></fr:tex> are the union of all the capabilities needed to evaluate <fr:tex display="inline"><![CDATA[f]]></fr:tex>, to evaluate <fr:tex display="inline"><![CDATA[e]]></fr:tex>, and to evaluate the body of the function represented by <fr:tex display="inline"><![CDATA[f]]></fr:tex>, along with the special <fr:tex display="inline"><![CDATA[\mathsf {Apply}]]></fr:tex> capability.

</html:p>
                      </fr:mainmatter>
                    </fr:tree>
                  </fr:mainmatter>
                </fr:tree>
                <fr:tree show-metadata="false">
                  <fr:frontmatter>
                    <fr:authors />
                    <fr:date>
                      <fr:year>2025</fr:year>
                      <fr:month>11</fr:month>
                      <fr:day>4</fr:day>
                    </fr:date>
                    <fr:uri>http://ozark.hendrix.edu/~yorgey/forest/0015/</fr:uri>
                    <fr:display-uri>0015</fr:display-uri>
                    <fr:route>/~yorgey/forest/0015/</fr:route>
                    <fr:title text="Requirements polymorphism">Requirements polymorphism</fr:title>
                  </fr:frontmatter>
                  <fr:mainmatter>
                    <html:p>This tree is a placeholder for discussing requirements polymorphism in depth, with examples and technical details.</html:p>
                  </fr:mainmatter>
                </fr:tree>
              </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="Related">Related</fr:title>
      </fr:frontmatter>
      <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>
