Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Giuseppe Castagna
occurrence-typing
Commits
b1d8f3df
Commit
b1d8f3df
authored
Nov 12, 2020
by
Mickael Laurent
Browse files
algorithmic type system in progress
parent
65848472
Changes
1
Hide whitespace changes
Inline
Side-by-side
new_system3.tex
View file @
b1d8f3df
...
...
@@ -237,12 +237,33 @@ t\land\neg(\pair{\Any}{\Any})\neq\Empty\\
% {\Gamma\vdash\lambda x:s.e: t}
% { }
% \\
% \Infer[Let]
% {\Gamma\vdash_e a:\{(t_i,\Gamma_i)\}_{i\in I}\\
% x\not\in\dom\Gamma \text{ or } \forall i.\ t_i\leq\Gamma(x)\\
% \forall i\in I.\ \Gamma_i,(x:t_i)\vdash_e e' : \{(u_j,\Gamma_j)\}_{j\in J_i}}
% {
% \Gamma\vdash_e\letexp x a e' : \{(u_j,\Gamma_j)\,\alt\,i\in I,\ j\in J_i\}
% }
% { }
\Infer
[Let]
{
\Gamma\vdash
_
e a:
\{
(t
_
i,
\Gamma
_
i)
\}
_{
i
\in
I
}
\\
x
\not\in\dom\Gamma
\text
{
or
}
\forall
i.
\
t
_
i
\leq\Gamma
(x)
\\
\forall
i
\in
I.
\ \Gamma
_
i,(x:t
_
i)
\vdash
_
e e' :
\{
(u
_
j,
\Gamma
_
j)
\}
_{
j
\in
J
_
i
}}
{
\Gamma\vdash
_
e
\letexp
x a e' :
\{
(u
_
j,
\Gamma
_
j)
\,\alt\,
i
\in
I,
\
j
\in
J
_
i
\}
}
{
}
\\
\Infer
[LetRefine]
{
\Gamma\vdash
_
e a:
\{
(t
_
i,
\Gamma
_
i)
\}
_{
i
\in
I
}
\\
\Gamma\bvdash
{
a
}{
\Gamma
(x)
}
\{
(t
_
j,
\Gamma
_
j)
\}
_{
j
\in
J
}
\\
\forall
j
\in
J.
\ \Gamma
_
j,(x:t
_
j)
\vdash
_
e e :
\{
(u
_
k,
\Gamma
_
k)
\}
_{
k
\in
K
_
j
}}
{
\Gamma\vdash
_
e
\letexp
x a e' :
\bt\{
(u
_
k,
\Gamma
_
k)
\,\alt\,
j
\in
J,
\
k
\in
K
_
j
\}
}
{
}
\end{mathpar}
TODO: Case rules with Backtrack in hypotheses
TODO: Let rules with Backtrack in hypotheses
TODO: Abs rules (problem??? the different splits for x
cannot be cannot be retrieved...
\\
solution 1: instead
of storing the whole expression e, only store what has already been
typed so that we can retype up to the current expr.
\\
solution 2: rules take ALL the splits as argument
(it handles all the branches), but more complex...)
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment