<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" href="/default.xsl"?>
<fr:tree xmlns:fr="http://www.forester-notes.org" xmlns:html="http://www.w3.org/1999/xhtml" xmlns:xml="http://www.w3.org/XML/1998/namespace" root="false" base-url="/">
  <fr:frontmatter>
    <fr:authors>
      <fr:author>
        <fr:link href="/stevenschaefer/" title="Steven Schaefer" uri="https://stevenschaefer.net/stevenschaefer/" display-uri="stevenschaefer" type="local">Steven Schaefer</fr:link>
      </fr:author>
      <fr:contributor>
        <fr:link href="/maxsnew/" title="Max S. New" uri="https://stevenschaefer.net/maxsnew/" display-uri="maxsnew" type="local">Max S. New</fr:link>
      </fr:contributor>
    </fr:authors>
    <fr:uri>https://stevenschaefer.net/home/</fr:uri>
    <fr:display-uri>home</fr:display-uri>
    <fr:route>/home/</fr:route>
    <fr:title text="Steven Schaefer">Steven Schaefer</fr:title>
    <fr:meta name="author">false</fr:meta>
  </fr:frontmatter>
  <fr:mainmatter>
    <html:p>
      <html:img src="/bafkrmidrr4t5mo4itji63yt3qugt22oqvhllkbo7b6stpt4zx6shiidm7i.jpeg" width="250" height="250" />
    </html:p>
    <html:p>
I am a third-year PhD student at the University of Michigan advised by <fr:link href="https://maxsnew.com/" type="external">Max New</fr:link>.</html:p>
    <html:p>I am interested in the mathematical study of programming languages. In particular, I study the application of logic and category theory to the design and implementation of provably correct software.</html:p>
    <fr:tree show-metadata="false" expanded="false">
      <fr:frontmatter>
        <fr:authors>
          <fr:author>
            <fr:link href="/stevenschaefer/" title="Steven Schaefer" uri="https://stevenschaefer.net/stevenschaefer/" display-uri="stevenschaefer" type="local">Steven Schaefer</fr:link>
          </fr:author>
        </fr:authors>
        <fr:date>
          <fr:year>2024</fr:year>
          <fr:month>8</fr:month>
          <fr:day>6</fr:day>
        </fr:date>
        <fr:uri>https://stevenschaefer.net/sss-000F/</fr:uri>
        <fr:display-uri>sss-000F</fr:display-uri>
        <fr:route>/sss-000F/</fr:route>
        <fr:title text="Research Interests">Research Interests</fr:title>
      </fr:frontmatter>
      <fr:mainmatter>
        <html:ul><html:li><fr:link href="/sss-0026/" title="Correct-by-Construction Parsing" uri="https://stevenschaefer.net/sss-0026/" display-uri="sss-0026" type="local">Correct-by-Construction Parsing</fr:link></html:li>
  <html:li>Mechanized category theory in Agda</html:li></html:ul>
      </fr:mainmatter>
    </fr:tree>
    <fr:tree show-metadata="false" expanded="false">
      <fr:frontmatter>
        <fr:authors>
          <fr:contributor>
            <fr:link href="/stevenschaefer/" title="Steven Schaefer" uri="https://stevenschaefer.net/stevenschaefer/" display-uri="stevenschaefer" type="local">Steven Schaefer</fr:link>
          </fr:contributor>
        </fr:authors>
        <fr:uri>https://stevenschaefer.net/publications/</fr:uri>
        <fr:display-uri>publications</fr:display-uri>
        <fr:route>/publications/</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="/stevenschaefer/" title="Steven Schaefer" uri="https://stevenschaefer.net/stevenschaefer/" display-uri="stevenschaefer" type="local">Steven Schaefer</fr:link>
              </fr:author>
            </fr:authors>
            <fr:uri>https://stevenschaefer.net/conferences/</fr:uri>
            <fr:display-uri>conferences</fr:display-uri>
            <fr:route>/conferences/</fr:route>
            <fr:title text="Conferences">Conferences</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="/stevenschaefer/" title="Steven Schaefer" uri="https://stevenschaefer.net/stevenschaefer/" display-uri="stevenschaefer" type="local">Steven Schaefer</fr:link>
                  </fr:author>
                  <fr:author>
                    <fr:link href="/maxsnew/" title="Max S. New" uri="https://stevenschaefer.net/maxsnew/" display-uri="maxsnew" type="local">Max S. New</fr:link>
                  </fr:author>
                  <fr:author>
                    <fr:link href="/pedrohaamorim/" title="Pedro H. Azevedo de Amorim" uri="https://stevenschaefer.net/pedrohaamorim/" display-uri="pedrohaamorim" type="local">Pedro H. Azevedo de Amorim</fr:link>
                  </fr:author>
                  <fr:author>
                    <fr:link href="/nathanvarner/" title="Nathan Varner" uri="https://stevenschaefer.net/nathanvarner/" display-uri="nathanvarner" type="local">Nathan Varner</fr:link>
                  </fr:author>
                </fr:authors>
                <fr:uri>https://stevenschaefer.net/sss-000I/</fr:uri>
                <fr:display-uri>sss-000I</fr:display-uri>
                <fr:route>/sss-000I/</fr:route>
                <fr:title text="Intrinsic Verification of Parsers and Formal Grammar Theory in Dependent Lambek Calculus">Intrinsic Verification of Parsers and Formal Grammar Theory in Dependent Lambek Calculus</fr:title>
                <fr:taxon>Reference</fr:taxon>
                <fr:meta name="doi">10.1145/3729281</fr:meta>
              </fr:frontmatter>
              <fr:mainmatter>
  <html:table>
  
  
  <html:tr>
    
  <html:td><html:strong>DOI:</html:strong></html:td>

    
  <html:td>
    <fr:link href="https://dl.acm.org/doi/10.1145/3729281" type="external">https://dl.acm.org/doi/10.1145/3729281</fr:link>
  </html:td>

  </html:tr>


  
  
  <html:tr>
    
  <html:td><html:strong>Extended Version:</html:strong></html:td>

    
  <html:td>
    <fr:link href="https://arxiv.org/abs/2504.03995" type="external">https://arxiv.org/abs/2504.03995</fr:link>
  </html:td>

  </html:tr>


  
  
  <html:tr>
    
  <html:td><html:strong>Repository:</html:strong></html:td>

    
  <html:td>
    <fr:link href="https://github.com/maxsnew/grammars-and-semantic-actions" type="external">https://github.com/maxsnew/grammars-and-semantic-actions</fr:link>
  </html:td>

  </html:tr>


</html:table>
<html:p>
  We present Dependent Lambek Calculus, a domain-specific dependent
  type theory for verified parsing and formal grammar theory. In
  Dependent Lambek Calculus, linear types are used as a syntax for formal grammars,
  and parsers can be written as linear terms. The linear typing
  restriction provides a form of intrinsic verification that a parser
  yields only valid parse trees for the input string. We demonstrate
  the expressivity of this system by showing that the combination of
  inductive linear types and dependency on non-linear data can be used
  to encode commonly used grammar formalisms such as regular and
  context-free grammars as well as traces of various types of
  automata. Using these encodings, we define parsers for regular
  expressions using deterministic automata, as well as
  examples of verified parsers of context-free grammars.</html:p><html:p>
  We present a denotational semantics of our type theory that
  interprets the types as a mathematical notion of formal
  grammars. Based on this denotational semantics, we have made a
  prototype implementation of Dependent Lambek Calculus using a shallow embedding in
  the Agda proof assistant. All of our examples parsers have been
  implemented in this prototype implementation.
</html:p></fr:mainmatter>
            </fr:tree>
          </fr:mainmatter>
        </fr:tree>
      </fr:mainmatter>
    </fr:tree>
    <fr:tree show-metadata="false" expanded="false">
      <fr:frontmatter>
        <fr:authors />
        <fr:uri>https://stevenschaefer.net/talks/</fr:uri>
        <fr:display-uri>talks</fr:display-uri>
        <fr:route>/talks/</fr:route>
        <fr:title text="Talks">Talks</fr:title>
        <fr:meta name="author">false</fr:meta>
      </fr:frontmatter>
      <fr:mainmatter>
        <fr:tree show-metadata="true" expanded="false" toc="false" numbered="false">
          <fr:frontmatter>
            <fr:authors>
              <fr:author>
                <fr:link href="/stevenschaefer/" title="Steven Schaefer" uri="https://stevenschaefer.net/stevenschaefer/" display-uri="stevenschaefer" type="local">Steven Schaefer</fr:link>
              </fr:author>
              <fr:author>
                <fr:link href="/maxsnew/" title="Max S. New" uri="https://stevenschaefer.net/maxsnew/" display-uri="maxsnew" type="local">Max S. New</fr:link>
              </fr:author>
              <fr:author>
                <fr:link href="/pedrohaamorim/" title="Pedro H. Azevedo de Amorim" uri="https://stevenschaefer.net/pedrohaamorim/" display-uri="pedrohaamorim" type="local">Pedro H. Azevedo de Amorim</fr:link>
              </fr:author>
              <fr:author>
                <fr:link href="/nathanvarner/" title="Nathan Varner" uri="https://stevenschaefer.net/nathanvarner/" display-uri="nathanvarner" type="local">Nathan Varner</fr:link>
              </fr:author>
            </fr:authors>
            <fr:date>
              <fr:year>2025</fr:year>
              <fr:month>6</fr:month>
              <fr:day>19</fr:day>
            </fr:date>
            <fr:uri>https://stevenschaefer.net/sss-002R/</fr:uri>
            <fr:display-uri>sss-002R</fr:display-uri>
            <fr:route>/sss-002R/</fr:route>
            <fr:title text="Intrinsic Verification of Parsers and Formal Grammar Theory in Dependent Lambek Calculus">Intrinsic Verification of Parsers and Formal Grammar Theory in Dependent Lambek Calculus</fr:title>
            <fr:taxon>Talk</fr:taxon>
            <fr:meta name="slides">/bafkrmigg3ciyi6dkiy3djg6jxxyh6a5berwwdzbzbvay6akltbyyi67p5e.pdf</fr:meta>
            <fr:meta name="venue">
              <fr:link href="https://pldi25.sigplan.org/" type="external">PLDI</fr:link>
            </fr:meta>
            <fr:meta name="external">https://www.youtube.com/watch?v=O1eXYHv2VU8</fr:meta>
          </fr:frontmatter>
          <fr:mainmatter>
            <html:p>
  We present <fr:link href="/sss-000I/" title="Intrinsic Verification of Parsers and Formal Grammar Theory in Dependent Lambek Calculus" uri="https://stevenschaefer.net/sss-000I/" display-uri="sss-000I" type="local">Dependent Lambek Calculus</fr:link>, a domain-specific dependent
  type theory for verified parsing and formal grammar theory. In
  Dependent Lambek Calculus, linear types are used as a syntax for formal grammars,
  and parsers can be written as linear terms. The linear typing
  restriction provides a form of intrinsic verification that a parser
  yields only valid parse trees for the input string. We demonstrate
  the expressivity of this system by showing that the combination of
  inductive linear types and dependency on non-linear data can be used
  to encode commonly used grammar formalisms such as regular and
  context-free grammars as well as traces of various types of
  automata. Using these encodings, we define parsers for regular
  expressions using deterministic automata, as well as
  examples of verified parsers of context-free grammars.</html:p>
            <html:p>
  We present a denotational semantics of our type theory that
  interprets the types as a mathematical notion of formal
  grammars. Based on this denotational semantics, we have made a
  prototype implementation of Dependent Lambek Calculus using a shallow embedding in
  the Agda proof assistant. All of our examples parsers have been
  implemented in this prototype implementation.
</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="/stevenschaefer/" title="Steven Schaefer" uri="https://stevenschaefer.net/stevenschaefer/" display-uri="stevenschaefer" type="local">Steven Schaefer</fr:link>
              </fr:author>
              <fr:author>
                <fr:link href="/maxsnew/" title="Max S. New" uri="https://stevenschaefer.net/maxsnew/" display-uri="maxsnew" type="local">Max S. New</fr:link>
              </fr:author>
              <fr:author>
                <fr:link href="/pedrohaamorim/" title="Pedro H. Azevedo de Amorim" uri="https://stevenschaefer.net/pedrohaamorim/" display-uri="pedrohaamorim" type="local">Pedro H. Azevedo de Amorim</fr:link>
              </fr:author>
              <fr:author>
                <fr:link href="/nathanvarner/" title="Nathan Varner" uri="https://stevenschaefer.net/nathanvarner/" display-uri="nathanvarner" type="local">Nathan Varner</fr:link>
              </fr:author>
            </fr:authors>
            <fr:date>
              <fr:year>2024</fr:year>
              <fr:month>11</fr:month>
              <fr:day>22</fr:day>
            </fr:date>
            <fr:uri>https://stevenschaefer.net/sss-001B/</fr:uri>
            <fr:display-uri>sss-001B</fr:display-uri>
            <fr:route>/sss-001B/</fr:route>
            <fr:title text="Intrinsic Verification of Parsers and Formal Grammar Theory in Dependent Lambek Calculus">Intrinsic Verification of Parsers and Formal Grammar Theory in Dependent Lambek Calculus</fr:title>
            <fr:taxon>Talk</fr:taxon>
            <fr:meta name="slides">/bafkrmiaespdfbomemqbdtv57qoddjzhuf2uekrwfljkswigyd5ueh6ac4y.pdf</fr:meta>
            <fr:meta name="venue">
              <fr:link href="https://pl.cs.uchicago.edu/PLSummit/2024/" type="external">Midwest Programming Languages Summit</fr:link>
            </fr:meta>
          </fr:frontmatter>
          <fr:mainmatter>
            <html:p>
  We present <fr:link href="/sss-000I/" title="Intrinsic Verification of Parsers and Formal Grammar Theory in Dependent Lambek Calculus" uri="https://stevenschaefer.net/sss-000I/" display-uri="sss-000I" type="local">Dependent Lambek Calculus</fr:link>, a domain-specific dependent
  type theory for verified parsing and formal grammar theory. In
  Dependent Lambek Calculus, linear types are used as a syntax for formal grammars,
  and parsers can be written as linear terms. The linear typing
  restriction provides a form of intrinsic verification that a parser
  yields only valid parse trees for the input string. We demonstrate
  the expressivity of this system by showing that the combination of
  inductive linear types and dependency on non-linear data can be used
  to encode commonly used grammar formalisms such as regular and
  context-free grammars as well as traces of various types of
  automata. Using these encodings, we define parsers for regular
  expressions using deterministic automata, as well as
  examples of verified parsers of context-free grammars.</html:p>
            <html:p>
  We present a denotational semantics of our type theory that
  interprets the types as a mathematical notion of formal
  grammars. Based on this denotational semantics, we have made a
  prototype implementation of Dependent Lambek Calculus using a shallow embedding in
  the Agda proof assistant. All of our examples parsers have been
  implemented in this prototype implementation.
</html:p>
          </fr:mainmatter>
        </fr:tree>
      </fr:mainmatter>
    </fr:tree>
    <fr:tree show-metadata="false" expanded="false">
      <fr:frontmatter>
        <fr:authors>
          <fr:author>
            <fr:link href="/stevenschaefer/" title="Steven Schaefer" uri="https://stevenschaefer.net/stevenschaefer/" display-uri="stevenschaefer" type="local">Steven Schaefer</fr:link>
          </fr:author>
          <fr:contributor>
            <fr:link href="/maxsnew/" title="Max S. New" uri="https://stevenschaefer.net/maxsnew/" display-uri="maxsnew" type="local">Max S. New</fr:link>
          </fr:contributor>
        </fr:authors>
        <fr:uri>https://stevenschaefer.net/teaching/</fr:uri>
        <fr:display-uri>teaching</fr:display-uri>
        <fr:route>/teaching/</fr:route>
        <fr:title text="Teaching">Teaching</fr:title>
      </fr:frontmatter>
      <fr:mainmatter>
        <fr:tree show-metadata="false">
          <fr:frontmatter>
            <fr:authors>
              <fr:author>
                <fr:link href="/maxsnew/" title="Max S. New" uri="https://stevenschaefer.net/maxsnew/" display-uri="maxsnew" type="local">Max S. New</fr:link>
              </fr:author>
              <fr:author>
                <fr:link href="/stevenschaefer/" title="Steven Schaefer" uri="https://stevenschaefer.net/stevenschaefer/" display-uri="stevenschaefer" type="local">Steven Schaefer</fr:link>
              </fr:author>
              <fr:author>Daniel Calco</fr:author>
            </fr:authors>
            <fr:uri>https://stevenschaefer.net/sss-000G/</fr:uri>
            <fr:display-uri>sss-000G</fr:display-uri>
            <fr:route>/sss-000G/</fr:route>
            <fr:title text="Compiler Construction">Compiler Construction</fr:title>
            <fr:taxon>Course</fr:taxon>
            <fr:meta name="external">https://maxsnew.com/teaching/eecs-483-fa23/</fr:meta>
          </fr:frontmatter>
          <fr:mainmatter>
            <html:p>Graduate student instructor for EECS 483 Compiler Construction in Fall 2023.</html:p>
          </fr:mainmatter>
        </fr:tree>
      </fr:mainmatter>
    </fr:tree>
    <fr:tree show-metadata="false" expanded="false">
      <fr:frontmatter>
        <fr:authors>
          <fr:author>
            <fr:link href="/stevenschaefer/" title="Steven Schaefer" uri="https://stevenschaefer.net/stevenschaefer/" display-uri="stevenschaefer" type="local">Steven Schaefer</fr:link>
          </fr:author>
        </fr:authors>
        <fr:uri>https://stevenschaefer.net/contact/</fr:uri>
        <fr:display-uri>contact</fr:display-uri>
        <fr:route>/contact/</fr:route>
        <fr:title text="Contact Me">Contact Me</fr:title>
      </fr:frontmatter>
      <fr:mainmatter>
        <html:p>Please reach me at <fr:link href="mailto:stschaef@umich.edu" type="external">stschaef@umich.edu</fr:link>.</html:p>
        <html:ul><html:li><fr:link href="https://github.com/stschaef" type="external">GitHub</fr:link></html:li>
<html:li><fr:link href="https://mathstodon.xyz/@stschaef" type="external">Mastodon</fr:link></html:li></html:ul>
      </fr:mainmatter>
    </fr:tree>
    <fr:tree show-metadata="false" expanded="false">
      <fr:frontmatter>
        <fr:authors>
          <fr:author>
            <fr:link href="/stevenschaefer/" title="Steven Schaefer" uri="https://stevenschaefer.net/stevenschaefer/" display-uri="stevenschaefer" type="local">Steven Schaefer</fr:link>
          </fr:author>
        </fr:authors>
        <fr:date>
          <fr:year>2024</fr:year>
          <fr:month>8</fr:month>
          <fr:day>6</fr:day>
        </fr:date>
        <fr:uri>https://stevenschaefer.net/sss-000E/</fr:uri>
        <fr:display-uri>sss-000E</fr:display-uri>
        <fr:route>/sss-000E/</fr:route>
        <fr:title text="About This Website">About This Website</fr:title>
      </fr:frontmatter>
      <fr:mainmatter>
        <html:p>I built this website using <fr:link href="https://www.forester-notes.org/" type="external">Forester</fr:link>.</html:p>
        <html:p>You may search through this site using <html:code>Ctrl-k</html:code>.</html:p>
      </fr:mainmatter>
    </fr:tree>
  </fr:mainmatter>
  <fr:backmatter>
    <fr:tree show-metadata="false" hidden-when-empty="true">
      <fr:frontmatter>
        <fr:authors />
        <fr:title text="References">References</fr:title>
      </fr:frontmatter>
      <fr:mainmatter />
    </fr:tree>
    <fr:tree show-metadata="false" hidden-when-empty="true">
      <fr:frontmatter>
        <fr:authors />
        <fr:title text="Context">Context</fr:title>
      </fr:frontmatter>
      <fr:mainmatter />
    </fr:tree>
    <fr:tree show-metadata="false" hidden-when-empty="true">
      <fr:frontmatter>
        <fr:authors />
        <fr:title text="Backlinks">Backlinks</fr:title>
      </fr:frontmatter>
      <fr:mainmatter />
    </fr:tree>
    <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>
