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
78619fce
Commit
78619fce
authored
Nov 18, 2020
by
Mickael Laurent
Browse files
some fixes
parent
2e63fee9
Changes
1
Hide whitespace changes
Inline
Side-by-side
new_system3.tex
View file @
78619fce
...
...
@@ -131,12 +131,18 @@ The elements of $\Gamma\avdash\Gammap\ct e:t$ mean:
{
\Gamma
\avdash\Gammap\ct
e :
\{
(
\Empty
,
\Gamma
)
\}
}
{
}
\qquad
\Infer
[Const]
{
}
{
\Gamma\avdash\Gammap\ct
c:
\{
(
\basic
{
c
}
,
\Gamma
)
\}
}
{
}
\quad
\Infer
[Var]
\Infer
[NoDef]
{
x
\in\dom\Gammap\setminus\bv
(e)
\\
\Gamma\subst
{
x
}{
(
\Gamma\land\Gammap
)(x)
}
\avdash
{
\Gammap\setminus\{
x
\}
}{
\ct
}
e : S
}
{
\Gamma
\avdash\Gammap
{
\ct
}
e : S
}
{
}
\\
\Infer
[Const]
{
}
{
\Gamma\avdash\Gammap\ct
c:
\{
(
\basic
{
c
}
,
\Gamma
)
\}
}
{
}
\quad
\Infer
[Var]
{
}
{
\Gamma
\avdash\Gammap\ct
x:
\{
(
\Gamma
(x),
\Gamma
)
\}
}
{
x
\in\dom\Gamma
}
...
...
@@ -273,30 +279,22 @@ rules, because one branch is already unreachable and retyping only occurs with s
\begin{mathpar}
\Infer
[Abs]
{
\Gamma
,(x:s)
\avdash
{
\Gammap
}{
\ct
[\letexp{x}{*}{[]
}
]
}
e:
\{
(t
_
i,
\Gamma
_
i)
\}
_{
i
\in
I
}
\\
{
\Gamma
,(x:s)
\avdash
{
\Gammap
}{
\ct
}
e:
\{
(t
_
i,
\Gamma
_
i)
\}
_{
i
\in
I
}
\\
\forall
i
\in
I.
\
J
_
i=
\{
j
\,\alt\,
j
\in
I
\text
{
s.t.
}
\forall
y
\in\fv
(e).
\ \Gamma
_
j(y)
\leq\Gamma
_
i(y)
\}\\
\forall
i
\in
I.
\
u
_
i =
\bigwedge
_{
j
\in
J
_
i
}
(
\arrow
{
\Gamma
_
j(x)
}{
(
t
_
i
\vee\bigvee
_{
\substack
{
j
\in
J
_
i
\text
{
s.t.
}
\Gamma
_
i
(x)
\land\Gamma
_
j
(x)
\neq\varnothing\\\text
{
and
}
\exists
y
\in\bv
(e).
\ \Gamma
_
j
(y)
\not\leq\Gamma
_
i
(y)
}
}
t
_
j
t
_
j
\vee\bigvee
_{
\substack
{
k
\in
J
_
i
\text
{
s.t.
}
\Gamma
_
j
(x)
\land\Gamma
_
k
(x)
\neq\varnothing\\\text
{
and
}
\exists
y
\in\bv
(e).
\ \Gamma
_
k
(y)
\not\leq\Gamma
_
j
(y)
}
}
t
_
k
)
}
)
}
{
\Gamma\vdash\lambda
x:s.e:
\{
(u
_
i,
\Gamma
_
i)
\,\alt\,
i
\in
I
\}
}
{
}
\end{mathpar}
TODO: Check let rule
TODO: Check abs rule
TODO: What if the initial environment already contains some entries?
Or if a variable is used before being declared?
Should we add guardians to split rules? (
$
x
\in\bv
(
\ct
)
$
)
TODO: Add * to grammar and add corresponding rules
\subsection
{
Backward typing rules
}
\begin{mathpar}
...
...
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