Conference paper Open Access

Knowing When to Ask: Sound scheduling of name resolution in type checkers derived from declarative specifications (Extended Version)

Rouvoet, Arjen; van Antwerpen, Hendrik; Bach Poulsen, Casper; Krebbers, Robbert; Visser, Eelco


MARC21 XML Export

<?xml version='1.0' encoding='UTF-8'?>
<record xmlns="http://www.loc.gov/MARC21/slim">
  <leader>00000nam##2200000uu#4500</leader>
  <datafield tag="041" ind1=" " ind2=" ">
    <subfield code="a">eng</subfield>
  </datafield>
  <datafield tag="653" ind1=" " ind2=" ">
    <subfield code="a">Statix, Constraint and Logic Programming, Type Systems, Specification</subfield>
  </datafield>
  <controlfield tag="005">20201017002656.0</controlfield>
  <controlfield tag="001">4091445</controlfield>
  <datafield tag="700" ind1=" " ind2=" ">
    <subfield code="u">Delft University of Technology</subfield>
    <subfield code="a">van Antwerpen, Hendrik</subfield>
  </datafield>
  <datafield tag="700" ind1=" " ind2=" ">
    <subfield code="u">Delft University of Technology</subfield>
    <subfield code="a">Bach Poulsen, Casper</subfield>
  </datafield>
  <datafield tag="700" ind1=" " ind2=" ">
    <subfield code="u">Radboud University and Delft University of Technology</subfield>
    <subfield code="a">Krebbers, Robbert</subfield>
  </datafield>
  <datafield tag="700" ind1=" " ind2=" ">
    <subfield code="u">Delft University of Technology</subfield>
    <subfield code="a">Visser, Eelco</subfield>
  </datafield>
  <datafield tag="856" ind1="4" ind2=" ">
    <subfield code="s">806393</subfield>
    <subfield code="z">md5:92072b0848f21b29d5b756c063482574</subfield>
    <subfield code="u">https://zenodo.org/record/4091445/files/preprint-extended.pdf</subfield>
  </datafield>
  <datafield tag="542" ind1=" " ind2=" ">
    <subfield code="l">open</subfield>
  </datafield>
  <datafield tag="260" ind1=" " ind2=" ">
    <subfield code="c">2020-10-15</subfield>
  </datafield>
  <datafield tag="909" ind1="C" ind2="O">
    <subfield code="p">openaire</subfield>
    <subfield code="o">oai:zenodo.org:4091445</subfield>
  </datafield>
  <datafield tag="100" ind1=" " ind2=" ">
    <subfield code="u">Delft University of Technology</subfield>
    <subfield code="a">Rouvoet, Arjen</subfield>
  </datafield>
  <datafield tag="245" ind1=" " ind2=" ">
    <subfield code="a">Knowing When to Ask: Sound scheduling of name resolution in type checkers derived from declarative specifications (Extended Version)</subfield>
  </datafield>
  <datafield tag="540" ind1=" " ind2=" ">
    <subfield code="u">https://creativecommons.org/licenses/by/4.0/legalcode</subfield>
    <subfield code="a">Creative Commons Attribution 4.0 International</subfield>
  </datafield>
  <datafield tag="650" ind1="1" ind2="7">
    <subfield code="a">cc-by</subfield>
    <subfield code="2">opendefinition.org</subfield>
  </datafield>
  <datafield tag="520" ind1=" " ind2=" ">
    <subfield code="a">&lt;p&gt;Extended version of the OOPSLA &amp;#39;20 paper &amp;quot;Knowing When to Ask&amp;quot;.&lt;br&gt;
&lt;br&gt;
&lt;em&gt;Abstract:&lt;/em&gt;&lt;br&gt;
There is a large gap between the specification of type systems and the implementation of their type checkers, which impedes reasoning about the soundness of the type checker with respect to the specification. A vision to close this gap is to automatically obtain type checkers from declarative programming language specifications. This moves the burden of proving correctness from a case-by-case basis for concrete languages to a single correctness proof for the specification language. This vision is obstructed by an aspect common to all programming languages: name resolution. Naming and scoping are pervasive and complex aspects of the static semantics of programming languages. Implementations of type checkers for languages with name binding features such as modules, imports, classes, and inheritance interleave collection of binding information (i.e., declarations, scoping structure, and imports) and querying that information. This requires scheduling those two aspects in such a way that query answers are stable---i.e., they are computed only after all relevant binding structure has been collected. Type checkers for concrete languages accomplish stability using language-specific knowledge about the type system.&lt;/p&gt;

&lt;p&gt;In this paper we give a language-independent characterization of necessary and sufficient conditions to guarantee&lt;br&gt;
stability of name and type queries during type checking in terms of &lt;em&gt;critical edges in an incomplete scope graph&lt;/em&gt;. We use critical edges to give a formal small-step operational semantics to a declarative specification language for type systems, that achieves soundness by delaying queries that may depend on missing information. This yields type checkers for the specified languages that are sound by construction---i.e., they schedule queries so that the answers are stable, and only accept programs that are name- and type-correct according to the declarative language specification. We implement this approach, and evaluate it against specifications of a small module and record language, as well as subsets of Java and Scala.&lt;/p&gt;

&lt;p&gt;&amp;nbsp;&lt;/p&gt;</subfield>
  </datafield>
  <datafield tag="773" ind1=" " ind2=" ">
    <subfield code="n">doi</subfield>
    <subfield code="i">isSupplementTo</subfield>
    <subfield code="a">10.1145/3428248</subfield>
  </datafield>
  <datafield tag="773" ind1=" " ind2=" ">
    <subfield code="n">doi</subfield>
    <subfield code="i">isVersionOf</subfield>
    <subfield code="a">10.5281/zenodo.4091444</subfield>
  </datafield>
  <datafield tag="024" ind1=" " ind2=" ">
    <subfield code="a">10.5281/zenodo.4091445</subfield>
    <subfield code="2">doi</subfield>
  </datafield>
  <datafield tag="980" ind1=" " ind2=" ">
    <subfield code="a">publication</subfield>
    <subfield code="b">conferencepaper</subfield>
  </datafield>
</record>
63
47
views
downloads
All versions This version
Views 6363
Downloads 4747
Data volume 37.9 MB37.9 MB
Unique views 5050
Unique downloads 3737

Share

Cite as