Skip to content

Commit 05d4d0f

Browse files
committed
adress reviewers comments
1 parent 66876a2 commit 05d4d0f

File tree

1 file changed

+10
-8
lines changed

1 file changed

+10
-8
lines changed

blog/_posts/2016-02-03-essence-of-scala.md

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,10 @@ it's DOT, the calculus of dependent object types, that underlies Scala.
1313
A [paper on DOT](http://infoscience.epfl.ch/record/215280) will be
1414
presented in April at [Wadlerfest](http://events.inf.ed.ac.uk/wf2016),
1515
an event celebrating Phil Wadler's 60th birthday. There's also a prior
16-
[technical report](http://arxiv.org/abs/1510.05216v1) by Tiark Rompf
17-
and Nada Amin describing a slightly different version of the
18-
calculus. Each version describes a proof of type soundness that has
19-
been machine-checked for correctness.
16+
technical report (["From F to DOT"](http://arxiv.org/abs/1510.05216))
17+
by Tiark Rompf and Nada Amin describing a slightly different version
18+
of the calculus. Each paper describes a proof of type soundness that
19+
has been machine-checked for correctness.
2020

2121
## The DOT calculus
2222

@@ -64,24 +64,26 @@ form](https://en.wikipedia.org/wiki/A-normal_form), that is, every
6464
intermediate term is abstracted out in a local definition.
6565

6666
The following _type soundness_ property was shown in each case with a
67-
mechanized proof:
67+
mechanized, (i.e. machine-checked) proof:
6868

6969
> If a term `t` has type `T`, and the evaluation of `t` terminates, then
7070
the result of the evaluation will be a value `v` of type `T`.
7171

7272
## Difficulties
7373

7474
Formulating the precise soundness theorem and proving it was unexpectedly hard,
75-
because it uncovered a problem complex that had not been
75+
because it uncovered some technical challenges that had not been
7676
studied in depth before. In DOT - as well as in many programming languages -
7777
you can have conflicting definitions. For instance you might have an abstract
7878
type declaration in a base class with two conflicting aliases in subclasses:
7979

8080
trait Base { type A }
8181
trait Sub1 extends Base { type A = String }
8282
trait Sub2 extends Base { type A = Int }
83+
trait Bad extends Sub1 with Sub2
8384

84-
Now, if you combine `Sub1` and `Sub2` in one class, you get a conflict, since the type `A` is supposed to be equal to both `String` and `Int`. If you do
85+
Now, if you combine `Sub1` and `Sub2` in trait `Bad` you get a conflict,
86+
since the type `A` is supposed to be equal to both `String` and `Int`. If you do
8587
not detect the conflict and assume the equalities at face value you
8688
get `String = A = Int`, hence by transitivity `String = Int`! Once you
8789
are that far, you can of course engineer all sorts of situations where
@@ -149,5 +151,5 @@ project are important.
149151
This lets us put other constructs of the Scala language to the test,
150152
either to increase our confidence that they are indeed sound, or
151153
to show that they are unsound. In my next blog I will
152-
present some of the issues we have discovered by that exercise.
154+
present some of the issues we have discovered by that exercise.
153155

0 commit comments

Comments
 (0)