Skip to content

Commit

Permalink
formalism: Clean up explanatory text for artifact
Browse files Browse the repository at this point in the history
  • Loading branch information
mirryi committed Oct 10, 2023
1 parent 70f37cc commit 1b677e8
Show file tree
Hide file tree
Showing 7 changed files with 13 additions and 28 deletions.
7 changes: 3 additions & 4 deletions formalism/constraint.tex
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,9 @@
\input{symbols/constraint}

\section{Constraint generation}
\label{constraint}

A list of constraint generating bidirectional typing rules under the marked lambda calculus for type
hole inference (see Section 4). \\
\label{sec:constraint}
Here, we give the list of constraint-generating bidirectional typing rules under the marked lambda
calculus for type hole inference, described in Section 4 of the paper.

\judgbox{\ensuremath{\matchedArrowConstraint{\TMV}{\TMV_1}{\TMV_2}{C}}} $\TMV$ has matched arrow type $\TArrow{\TMV_1}{\TMV_2}$ and generates constraints $C$
\begin{mathpar}
Expand Down
3 changes: 1 addition & 2 deletions formalism/marked.tex
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,7 @@ \section{Marked lambda calculus}

The \emph{marked lambda calculus} is a judgmental framework for bidirectional type error
localization and recovery. Here, we demonstrate it on a gradually typed lambda calculus with
numbers, booleans, and product types. Typed holes (written $\EEHole$) are included to model
incomplete editor states \`a la Hazelnut but are not essential.
numbers, booleans, and product types, as described in Section 2.1 of the paper.

\begin{mechanization}
\item core.agda
Expand Down
2 changes: 2 additions & 0 deletions formalism/patterned.tex
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@

\section{Extension: patterned let expressions}
\label{sec:patterned}
In this section, we describe an extension of the marked lambda calculus for destructuring let
expressions, as described in Section 2.3 of the paper.

\nomechanization{}

Expand Down
16 changes: 1 addition & 15 deletions formalism/polymorphism.tex
Original file line number Diff line number Diff line change
Expand Up @@ -9,22 +9,12 @@
\section{Extension: System F-style polymorphism}
\label{sec:polymorphism}
In this section, we describe an extension of the marked lambda calculus for System F-style
parametric polymorphism.

Chiefly, the introduction of type variables and the possibility of free ones requires the
distinction between unmarked and marked types. These are each governed by well-formedness judgments
(alongside extensions of the original consistency, etc. judgments) and linked by a marking
operation.
parametric polymorphism, as sketched out in Section 2.4 of the paper.

\nomechanization{}

\subsection{Syntax}
\label{sec:polymorphism-syntax}
The syntax of unmarked types is exactly that of the original types alongside additional forms for
forall types and type variables. In marked types, we additionally have free type variables.
Within unmarked expressions, there may be type abstractions and type applications. In marked
expressions, marks corresponding to those of ordinary lambda abstractions are present.

\[\begin{array}{rrcl}
\TMName & \TMV & \Coloneqq & \cdots \mid \TForall{\TVarMV}{\TMV} \mid \TVarMV \\
\MTMName & \MTMV & \Coloneqq & \cdots
Expand All @@ -38,10 +28,6 @@ \subsection{Syntax}

\subsection{Unmarked types}
\label{sec:polymorphism-unmarked-types}
Type consistency is now parametrized by the type variable context $\tvarCtx$. Here (and similarly
the extension of other judgments), we omit the rules for the old syntactic constructs, which may be
straightforwardly derived from the original rules. \\

\judgbox{\ensuremath{\tvarCtxConsistentU{\tvarCtx}{\TMV_1}{\TMV_2}}} $\TMV_1$ and $\TMV_2$ are consistent
%
\begin{mathpar}
Expand Down
3 changes: 3 additions & 0 deletions formalism/preface.tex
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@ \subsection{Organization}

\item \cref{sec:typed} is similar, except that it employs the marking procedure in a roughly
incremental fashion.

\item \cref{sec:constraint} gives the rules for constraint generation in relation to the type hole
inference work of Section 4.
\end{itemize}
%
Note that each of the sections following \cref{sec:marked} build upon that same core language.
Expand Down
3 changes: 2 additions & 1 deletion formalism/typed.tex
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@ \section{Typed hazelnut}
We now give a description of a \emph{typed} version of the Hazelnut action calculus that
incorporates the marked lambda calculus to solve the problem of non-local hole fixes. Here, unlike
in the integration of the untyped version and the marked lambda calculus given in
\cref{sec:untyped}, remarking is performed only when necessary instead of after every action.
\cref{sec:untyped}, remarking is performed only when necessary instead of after every action. This
system is sketched out in Section 3.2 of the paper.

\nomechanization{}

Expand Down
7 changes: 1 addition & 6 deletions formalism/untyped.tex
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,7 @@ \section{Untyped hazelnut}
\label{sec:untyped}
In this section we describe an \emph{untyped} version of the Hazelnut action calculus that might be
layered with the marked lambda calculus to yield a structure editing calculus that supports
non-local hole fixes.

In comparison with the original calculus, this untyped version is not concerned at all with typing
but only the manipulation of syntax. As such, the action judgments are simplified considerably; in
particular, they are no longer bidirectional. The same core metatheorems, except sensibility which
is no longer meaningful in this untyped context, still hold (see \cref{sec:untyped-metatheorems}).
non-local hole fixes. This is described in Section 3.2 of the paper.

\begin{mechanization}
\item hazelnut.agda
Expand Down

0 comments on commit 1b677e8

Please sign in to comment.