Codebase Underlying the BSc Thesis: Type-Checking Modules and Imports using Scope Graphs

doi:10.4121/288296b9-fcdf-4960-bab4-8aee3a46927c.v1
The doi above is for this specific version of this dataset, which is currently the latest. Newer versions may be published in the future. For a link that will always point to the latest version, please use
doi: 10.4121/288296b9-fcdf-4960-bab4-8aee3a46927c
Datacite citation style:
Hübner, Paul; Bach Poulsen, Casper; Zwaan, Aron (2023): Codebase Underlying the BSc Thesis: Type-Checking Modules and Imports using Scope Graphs. Version 1. 4TU.ResearchData. software. https://doi.org/10.4121/288296b9-fcdf-4960-bab4-8aee3a46927c.v1
Other citation styles (APA, Harvard, MLA, Vancouver, Chicago, IEEE) available at Datacite
Software

The objective of this research was to determine whether a stratified type-checking approach using scope graphs could type-check the proof-of-concept language LM. Scope graphs provide a way to type-check real-world programming languages and their constructs. Previous implementations that type-check LM, a language with relative, unordered, and glob imports, do not halt. This dataset contains Haskell code for constructing and type-checking a scope graph of an LM program. It is based on the Phased Haskell library. With this implementation, the all test cases halt and the majority exhibit the correct behaviour with only one false-negative.


This implementation uses a five-step approach:

  1. Constructing a module hierarchy.
  2. Constructing a scope graph consisting of scopes and module sinks.
  3. Iteratively resolving imports and placing import edges in the scope graph.
  4. Adding all declarations of all modules to the scope graph.
  5. Type-checking the bodies of all declarations with respect to the scope graph.


Many test cases bundled with this data set are based on those for LMR (which is very similar to LM) and can be found here. On top of that. more test cases were derived and included. All test cases are denoted as annotated terms.


This data set is linked to a Bachelor's thesis completed at the EEMCS faculty at the TU Delft. A link will be added after publication.

history
  • 2023-06-21 first online, published, posted
publisher
4TU.ResearchData
format
gzipped source code of the type-checker implementation, which itself is a Haskell Cabal project
organizations
TU Delft, Faculty of Electrical Engineering, Mathematics and Computer Science

DATA

To access the source code, use the following command:

git clone https://data.4tu.nl/v3/datasets/2ef92305-5f55-417a-9da4-b0e50f0d265a.git

Or download the latest commit as a ZIP.

files (2)