Skip to content

Commit 801ac2f

Browse files
Add idea for name resolution in Liquid Haskell
1 parent 2f0c3a9 commit 801ac2f

File tree

1 file changed

+55
-0
lines changed

1 file changed

+55
-0
lines changed
Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
---
2+
title: Resolve names only once in Liquid Haskell
3+
---
4+
5+
Liquid Haskell is a tool to verify Haskell programs. The programmer supplies
6+
specifications for functions and data types in special comments, and the tool
7+
produces error messages when it cannot automatically prove that the program
8+
behaves as specified. The programmer can then improve the specifications or the
9+
program until the tool reports no errors. More information is available on the
10+
[Liquid Haskell website](https://ucsd-progsys.github.io/liquidhaskell/).
11+
12+
Liquid Haskell has been around for a decade and is a versatile tool, but it
13+
still has a few issues which hinder the user experience. This project is to
14+
address one of these shortcomings.
15+
16+
When analyzing a program, Liquid Haskell needs to link identifiers that appear
17+
in specifications to the entities they refer to, much in the same way that a
18+
compiler needs to link identifiers in the text of a function to the language
19+
entities that they represent. This task is called name resolution.
20+
21+
The identifiers in a specification can refer to other specifications, or they
22+
can refer to Haskell entities like functions and types. The output of name
23+
resolution tells for each identifier the module in which the referred entity is
24+
defined and the package it comes from.
25+
26+
At the moment, name resolution in Liquid Haskell is done twice for the same
27+
specifications, and the outcomes of both passes do not always yield the same
28+
result, leading to confusing errors and tedious workarounds. This task is about
29+
having name resolution done only once. For more details please see [the github
30+
issue](https://github.com/ucsd-progsys/liquidhaskell/issues/2169).
31+
32+
A proposal must include at least a description of a tentative solution, and
33+
a plan to implement it. The proposal should also account for the writing of
34+
a blog post summarizing the contributions at the end.
35+
36+
As a stretch goal, the project might specify and implement the scope rules
37+
and mechanisms to use in Liquid Haskell specifications.
38+
While the intention of Liquid Haskell maintainers over time has been to
39+
imitate GHC scoping rules as much as possible, there are case where Liquid
40+
Haskell just deviates from them.
41+
42+
The following aspects haven't been answered explicitly so far for the Liquid
43+
Haskell scenario.
44+
45+
* What names are in scope when writing the specifications of a module?
46+
47+
* How should ambiguities be resolved when imports offer definitions with the same Liquid Haskell names?
48+
49+
* What Liquid Haskell names are exported from modules and when?
50+
51+
**Potential Mentors**: Facundo Domínguez
52+
53+
**Difficulty**: Medium
54+
55+
**Size**: 350 hours but they are flexible by adjusting the scope

0 commit comments

Comments
 (0)