Fixes. Finished algorithm (v1)
This commit is contained in:
parent
6ca45c06d3
commit
0eeb31cb67
35
aspUnify.tex
35
aspUnify.tex
@ -99,8 +99,8 @@ We want to bring type inference for Java to the next level.
|
||||
\type{C} << \type{C}
|
||||
}
|
||||
\and
|
||||
\inferrule[N-Trans]{\type{T}_1 << \type{T}_2 \\ \type{T}_2 << \type{T}_3}{
|
||||
\type{T}_1 << \type{T}_3
|
||||
\inferrule[N-Trans]{\type{C}_1 << \type{C}_2 \\ \type{C}_2 << \type{C}_3}{
|
||||
\type{C}_1 << \type{C}_3
|
||||
}
|
||||
\and
|
||||
\inferrule[N-Class]{\texttt{class}\ \exptype{C}{\ldots} \triangleleft \exptype{D}{\ldots}}{
|
||||
@ -247,15 +247,14 @@ Result:
|
||||
}{
|
||||
\sigma(\tv{a}) = \type{N}
|
||||
}
|
||||
\and
|
||||
\inferrule[Generic]{
|
||||
\tv{a} \lessdot \type{N} %, \ldots, \tv{a} \lessdot \exptype{C_n}{\ol{T_n}} \\
|
||||
\\
|
||||
\text{not}\ \tv{a} \doteq \type{N}'
|
||||
}{
|
||||
% \Delta(\type{A}) = \exptype{C_m}{\ol{T_m}} \\
|
||||
\tv{a} \mapsto \type{A}
|
||||
}
|
||||
% \and
|
||||
% \inferrule[Generic]{
|
||||
% \tv{a} \lessdot \type{N} %, \ldots, \tv{a} \lessdot \exptype{C_n}{\ol{T_n}} \\
|
||||
% \\
|
||||
% \text{not}\ \tv{a} \doteq \type{N}'
|
||||
% }{
|
||||
% \tv{a} \mapsto \type{A}
|
||||
% }
|
||||
% \and
|
||||
% \inferrule[Solution-Sub]{
|
||||
% \tv{a} \lessdot \exptype{C_1}{\ol{T_1}}, \ldots, \tv{a} \lessdot \exptype{C_n}{\ol{T_n}} \\
|
||||
@ -264,13 +263,13 @@ Result:
|
||||
% }{
|
||||
% \Delta(\type{A}) = \exptype{C_m}{\ol{T_m}} \\ \sigma(\tv{a}) = \type{A}
|
||||
% }
|
||||
\and
|
||||
\inferrule[Solution-Gen]{
|
||||
\tv{a} \lessdot \type{G}_1, \ldots, \tv{a} \lessdot \type{G}_n \\
|
||||
\forall i: \type{G} <: \type{G}_i \\
|
||||
}{
|
||||
\Delta(\type{A}) = \type{G} \\ \sigma(\tv{a}) = \type{A}
|
||||
}
|
||||
% \and
|
||||
% \inferrule[Solution-Gen]{
|
||||
% \tv{a} \lessdot \type{G}_1, \ldots, \tv{a} \lessdot \type{G}_n \\
|
||||
% \forall i: \type{G} <: \type{G}_i \\
|
||||
% }{
|
||||
% \Delta(\type{A}) = \type{G} \\ \sigma(\tv{a}) = \type{A}
|
||||
% }
|
||||
\and
|
||||
\inferrule[Solution-Gen]{
|
||||
\tv{a} \lessdot \type{C}_1, \ldots, \tv{a} \lessdot \type{C}_n \\
|
||||
|
Loading…
Reference in New Issue
Block a user