Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
sgdt
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
gradual-typing
sgdt
Commits
dfe96cb3
Commit
dfe96cb3
authored
6 years ago
by
Max New
Browse files
Options
Downloads
Patches
Plain Diff
fix some typos pointed out in reviews
parent
3e100b60
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
paper/gtt.tex
+23
-15
23 additions, 15 deletions
paper/gtt.tex
popl19/corrections.org
+5
-5
5 additions, 5 deletions
popl19/corrections.org
with
28 additions
and
20 deletions
paper/gtt.tex
+
23
−
15
View file @
dfe96cb3
...
@@ -7,7 +7,7 @@
...
@@ -7,7 +7,7 @@
%% For single-blind review submission, w/ CCS and ACM Reference
%% For single-blind review submission, w/ CCS and ACM Reference
%\documentclass[acmsmall,review]{acmart}\settopmatter{printfolios=true}
%\documentclass[acmsmall,review]{acmart}\settopmatter{printfolios=true}
%% For final camera-ready submission, w/ required CCS and ACM Reference
%% For final camera-ready submission, w/ required CCS and ACM Reference
%
\documentclass[acmsmall]{acmart}\settopmatter{}
\documentclass
[acmsmall]
{
acmart
}
\settopmatter
{}
\newif\ifshort
\newif\ifshort
\newif\iflong
\newif\iflong
...
@@ -569,15 +569,20 @@ The cast reductions that we show satisfy all three constraints are
...
@@ -569,15 +569,20 @@ The cast reductions that we show satisfy all three constraints are
those given by the ``lazy cast semantics''~
\cite
{
findler-felleisen02,siek+09designspace
}
.
those given by the ``lazy cast semantics''~
\cite
{
findler-felleisen02,siek+09designspace
}
.
%
%
For instance, a transient semantics, where only the top-level
For instance, a transient semantics, where only the top-level
connectives are checked, violates
$
\eta
$
:
${
x : A
_
1
\times
(
A
_
2
\times
A
_
3
)
}$
$
\letXbeYinZ
x
connectives are checked, violates
$
\eta
$
for strict pairs:
{
(
x
_
1
,
(
x
_
2
,x
_
3
))
}
0
$
is not equivalent to
$
0
$
, but this is provable in
\begin{small}
GTT using the
$
\eta
$
principle for
$
\times
$
. Next, in a typical CBV
\[
{
x : A
_
1
\times
(
A
_
2
\times
A
_
3
)
}
\vdash
\letXbeYinZ
x
{
(
x
_
1
,
(
x
_
2
,x
_
3
))
}
0
\neq
0
\]
``eager cast semantics'' the
$
\beta
,
\eta
$
principles for all of the
\end{small}
eager datatypes (
$
0
,
+
,
1
,
\times
$
, lists, etc.) will be satisfied, but
because the top-level connectives of
$
A
_
2
, A
_
3
$
are checked when the
the
$
\eta
$
principle for the function type
$
\to
$
is violated, i.e.,
pattern match is introduced.
there are values
$
V : A
\to
A'
$
for which
$
V
\neq
\lambda
x:A. V x
$
.
%
%
Next, in a typical CBV ``eager cast semantics'' the
$
\beta
,
\eta
$
Thus, we argue that ``eager'' cast semantics is in fact overly eager: in
principles for all of the eager datatypes (
$
0
,
+
,
1
,
\times
$
, lists,
etc.) will be satisfied, but the
$
\eta
$
principle for the function
type
$
\to
$
is violated, i.e., there are values
$
V : A
\to
A'
$
for
which
$
V
\neq
\lambda
x:A. V x
$
.
%
We argue that ``eager'' cast semantics is in fact overly eager: in
its effort to find bugs faster than ``lazy'' semantics it disables the
its effort to find bugs faster than ``lazy'' semantics it disables the
very program equivalences that gradual typing should provide.
very program equivalences that gradual typing should provide.
...
@@ -1535,8 +1540,11 @@ like an upcast, and dually for the downcast, so this formulation
...
@@ -1535,8 +1540,11 @@ like an upcast, and dually for the downcast, so this formulation
implies the original formulation above.
implies the original formulation above.
We justify this design in two ways in the remainder of the paper. In
We justify this design in two ways in the remainder of the paper. In
Section~
\ref
{
sec:contract
}
, we show how to implement casts by a contract
Section~
\ref
{
sec:contract
}
, we show how to implement casts by a
translation to CBPV in such a way that it is true. However, one goal of
contract translation to CBPV where upcasts are complex values and
downcasts are complex stacks.
%
However, one goal of
GTT is to be able to prove things about many gradually typed languages
GTT is to be able to prove things about many gradually typed languages
at once, by giving different models, so one might wonder whether this
at once, by giving different models, so one might wonder whether this
design rules out potential models where casts are effectful. In
design rules out potential models where casts are effectful. In
...
@@ -1923,7 +1931,7 @@ heterogeneous way, which includes congruence $\Gamma \ltdyn \Gamma'
...
@@ -1923,7 +1931,7 @@ heterogeneous way, which includes congruence $\Gamma \ltdyn \Gamma'
\framebox
{
Error Properties
}
\framebox
{
Error Properties
}
\qquad
\qquad
\inferrule
{
\Gamma
'
\mid
\cdot
\vdash
M' :
\u
B'
}
\inferrule
{
\Gamma
'
\mid
\cdot
\vdash
M' :
\u
B'
}
{
\Gamma
\ltdyn
\Gamma
'
\mid
\cdot
\vdash
\err
\ltdyn
M :
\u
B
\ltdyn
\u
B'
}
{
\Gamma
\ltdyn
\Gamma
'
\mid
\cdot
\vdash
\err
\ltdyn
M
'
:
\u
B
\ltdyn
\u
B'
}
\qquad
\qquad
\inferrule
{
\Gamma
\mid
x :
\u
B
\vdash
S :
\u
B'
}
\inferrule
{
\Gamma
\mid
x :
\u
B
\vdash
S :
\u
B'
}
{
\Gamma
\mid
\cdot
\vdash
S[
\err
_{
\u
B
}
]
\ltdyn
\err
_{
\u
{
B'
}}
:
\u
B'
}
{
\Gamma
\mid
\cdot
\vdash
S[
\err
_{
\u
B
}
]
\ltdyn
\err
_{
\u
{
B'
}}
:
\u
B'
}
...
@@ -3795,7 +3803,7 @@ In GTT$_G$ it is admissible that
...
@@ -3795,7 +3803,7 @@ In GTT$_G$ it is admissible that
satisfying the universal property of a downcast
satisfying the universal property of a downcast
\item
for all
$
\u
B
\ltdyn
\u
B'
$
there is a complex
\item
for all
$
\u
B
\ltdyn
\u
B'
$
there is a complex
stack
$
\defdncast
{
\u
B
}{
\u
B'
}$
satisfying the universal property of a
stack
$
\defdncast
{
\u
B
}{
\u
B'
}$
satisfying the universal property of a
downcast and a complex value
$
\def
dn
cast
{
U
\u
B
}{
U
\u
B'
}$
satisfying
downcast and a complex value
$
\def
up
cast
{
U
\u
B
}{
U
\u
B'
}$
satisfying
the universal property of an upcast.
the universal property of an upcast.
\end{enumerate}
\end{enumerate}
\end{lemma}
\end{lemma}
...
@@ -4941,7 +4949,7 @@ interpretation.
...
@@ -4941,7 +4949,7 @@ interpretation.
\bullet
:
\u
F
\dynv
\vdash
\sdncast
{
\u
F
\dynv
}{
\u
F
\dynv
}
&
=
&
\bullet\\
\bullet
:
\u
F
\dynv
\vdash
\sdncast
{
\u
F
\dynv
}{
\u
F
\dynv
}
&
=
&
\bullet\\
x :
\sem
{
G
}
\vdash
\sem
{
\upcast
{
G
}{
\dynv
}}
&
=
&
\rho
_{
up
}
(G)
\\
x :
\sem
{
G
}
\vdash
\sem
{
\upcast
{
G
}{
\dynv
}}
&
=
&
\rho
_{
up
}
(G)
\\
\bullet
:
\u
F
\dynv
\vdash
\sdncast
{
\u
F G
}{
\u
F
\dynv
}
&
=
&
\rho
_{
dn
}
(G)
\\
\bullet
:
\u
F
\dynv
\vdash
\sdncast
{
\u
F G
}{
\u
F
\dynv
}
&
=
&
\rho
_{
dn
}
(G)
\\
x :
\sem
{
A
}
\vdash
\sem
{
\upcast
{
A
}{
\dynv
}}
&
=
&
\sem
{
\upcast
{
A
}{
\lfloor
A
\rfloor
}}
[
{
\sem
{
\upcast
{
G
}{
\
dynv
}}}
/x]
\\
x :
\sem
{
A
}
\vdash
\sem
{
\upcast
{
A
}{
\dynv
}}
&
=
&
\sem
{
\upcast
{
\lfloor
A
\rfloor
}
{
\dynv
}
}
[
{
\sem
{
\upcast
{
A
}{
\
lfloor
A
\rfloor
}}}
/x]
\\
\bullet
:
\u
F
\dynv
\vdash
\sdncast
{
A
}{
\dynv
}
&
=
&
\sdncast
{
A
}{
\floor
A
}
[
{
\sdncast
{
\floor
A
}{
\dynv
}}
]
\\
\bullet
:
\u
F
\dynv
\vdash
\sdncast
{
A
}{
\dynv
}
&
=
&
\sdncast
{
A
}{
\floor
A
}
[
{
\sdncast
{
\floor
A
}{
\dynv
}}
]
\\
\iflong
\iflong
x :
\sem
{
A
_
1
}
+
\sem
{
A
_
2
}
\vdash
\sem
{
\upcast
{
A
_
1 + A
_
2
}{
A
_
1' + A
_
2'
}}
x :
\sem
{
A
_
1
}
+
\sem
{
A
_
2
}
\vdash
\sem
{
\upcast
{
A
_
1 + A
_
2
}{
A
_
1' + A
_
2'
}}
...
...
This diff is collapsed.
Click to expand it.
popl19/corrections.org
+
5
−
5
View file @
dfe96cb3
* Typos
* Typos
- 111: missing a turnstile, would be better to have on its own line.
-
[X]
111: missing a turnstile, would be better to have on its own line.
- 687: one of these should be an upcast
-
[X]
687: one of these should be an upcast
- l475: "that it is true" that what is true?
-
[X]
l475: "that it is true" that what is true?
- l559: the rule err <= M uses M below and M' above.
-
[X]
l559: the rule err <= M uses M below and M' above.
- l898: G should be floor A
-
[X]
l898: G should be floor A
* Clarity
* Clarity
- multiple reviewers: there isn't a "we did this" part of the intro
- multiple reviewers: there isn't a "we did this" part of the intro
- numeric citations as nouns: L1025 and "elsewhere".
- numeric citations as nouns: L1025 and "elsewhere".
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment