Skip to content

Commit 2745974

Browse files
committed
Some more fixes
1 parent f86f670 commit 2745974

File tree

2 files changed

+26
-24
lines changed

2 files changed

+26
-24
lines changed

report/include/evaluation.tex

+21-19
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
\chapter{Evaluation}
22
\label{cha:evaluation}
33
In this chapter we present three type system specifications, discuss
4-
how the specification language effected the formulation of typing
4+
how the specification language affected the formulation of typing
55
rules, and which optimization strategies are successful.
66
\section{SytemF}
77
\label{sec:sytemf}
@@ -10,7 +10,7 @@ \section{SytemF}
1010
~\cite{Pierce:2002:TPL:509043}. The complete implementation can be
1111
found in Appendix~\ref{appendix:systemf}. There are three notable
1212
differences between the version in~\cite{Pierce:2002:TPL:509043} and
13-
our implementation, that we describe in the following.
13+
our implementation, which we will describe in the following.
1414

1515
In~\cite{Pierce:2002:TPL:509043} term and type variable bindings are
1616
collected in a single context. We need two separate contexts, one for
@@ -24,13 +24,13 @@ \section{SytemF}
2424
\end{lstlisting}
2525

2626
Context \code|TermBinding| is the term variable binding and associates
27-
identifier with types. \code|TypeBinding| binds type variables,
28-
because we have no notion of kinds in SystemF type variables are
29-
associated to nothing. In our implementation variable and type
30-
identifiers are build from the same set of identifiers.
27+
identifier with types. \code|TypeBinding| binds type variables. Type
28+
variables are associated to nothing because we have no notion of kinds
29+
in SystemF . In our implementation variable and type identifiers are
30+
build from the same set of identifiers.
3131

3232
The typing judgment has to reflect that we have two
33-
contexts. Therefore our typing judgment is defined as follows.
33+
contexts. Therefore our typing judgment is defined as follows:
3434

3535
\begin{lstlisting}[language=sltc]
3636
judgments
@@ -79,7 +79,7 @@ \section{SytemF}
7979
mechanism. However type substitution is implemented in the same
8080
fashion like in a functional programming language with pattern
8181
matching. Substitution is also implemented as a separate module and
82-
imported into the SystemF specification.
82+
then imported into the SystemF specification.
8383

8484
\begin{lstlisting}[language=sltc]
8585
judgments
@@ -128,11 +128,13 @@ \section{Lambda-Calculus with Subtyping}
128128
in~\cite{Pierce:2002:TPL:509043}. The specification for this type
129129
system is divided into two modules. One module specifies the type
130130
system without subtyping and the other module extends the first module
131-
with subtyping. The implementation of the type system without differs
132-
in two aspects from the text book formalization. First, we have to
133-
implement the freshness condition explicitly, as in the previous
134-
section. Second, we have to model rules that talk about all elements
135-
of a record inductively. Formula~\ref{formula:record-typing} shows the
131+
with subtyping. The implementation of the type system without
132+
subtyping differs in two aspects from the text book
133+
formalization. First, we have to implement the freshness condition
134+
explicitly, as in the previous section. Second, we have to model rules
135+
that talk about all elements of a record inductively.
136+
137+
Formula~\ref{formula:record-typing} shows the
136138
formalization of the record typing rule
137139
from~\cite{Pierce:2002:TPL:509043}. This rule says that a record is
138140
well-typed if all its elements are
@@ -147,7 +149,7 @@ \section{Lambda-Calculus with Subtyping}
147149
\label{formula:record-typing}
148150
\end{align}
149151

150-
That quantification is not possible in our specification
152+
This quantification is not possible in our specification
151153
language. Therefore we model this condition inductively as shown in
152154
the following.
153155

@@ -169,10 +171,10 @@ \section{Lambda-Calculus with Subtyping}
169171
Here we ensure with rule \code|step| that the first element is
170172
well-typed and the record without the first element is well
171173
typed. Rule \code|base| is the base case for this definition and
172-
assigns the empty record the empty type. Note that we support in
173-
contrast to~\cite{Pierce:2002:TPL:509043} the empty record. We
174+
assigns the empty record the empty record type. Note that we support
175+
in contrast to~\cite{Pierce:2002:TPL:509043} the empty record. We
174176
included the empty record in our definition to demonstrate a top rule
175-
for records in the subtyping module. We have implement the membership
177+
for records in the subtyping module. We have implemented the membership
176178
test for the projection typing rule \code|T-proj| in a similar way.
177179

178180
The module implementing subtyping for this lambda calculus contains a
@@ -224,10 +226,10 @@ \section{Lambda-Calculus with Subtyping}
224226
\end{lstlisting}
225227
\end{minipage}
226228

227-
The subtyping relations has further a rule that defines the empty
229+
The subtyping relations have a further rule that defines the empty
228230
record \code|{}| to be the top element of records, as well as rules
229231
for with and depth subtyping and permutation of record elements. In
230-
conclusion we could specify a variant of the simply typed lambda
232+
conclusion we can specify a variant of the simply typed lambda
231233
calculus with an intuitive subtyping relation and reduce the
232234
non-determinism in the type system.
233235

report/include/formula-generation.tex

+5-5
Original file line numberDiff line numberDiff line change
@@ -289,15 +289,15 @@ \section{Implementation}
289289

290290
\section{Editor Support}
291291
It is possible to use automated theorem provers to type check
292-
conjectures from within the editor. For type checking using automated
292+
conjectures from within the editor. For type checking with automated
293293
theorem provers we transform the specification into first order
294294
formulas and create a file per conclusion, as described in the
295295
previous section. Then we call the automated theorem prover Vampire on
296-
for each resulting file and parse the results. For each conjecture we
297-
visualize in the editor whether the verification succeeded and provide
298-
in case of success the names of the used first-order formulas.
296+
each resulting file and parse the results. For each conjecture we
297+
visualize in the editor whether the verification succeeded and in case
298+
of success provide the names of the used first-order formulas.
299299

300-
We provide also a consistency test for specifications. This check
300+
We contribute also a consistency test for specifications. This check
301301
attempts a proof of \code|1 = 0| with vampire using the first-order
302302
formulas generated from the specification. This method allows us to
303303
possibly find inconsistencies in the type system

0 commit comments

Comments
 (0)