Skip to content

Specify null safety subtyping #3515

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 82 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
82 commits
Select commit Hold shift + click to select a range
f98e98c
Integrate the null-safety subtyping rules into dartLangSpec.tex
eernstg Dec 14, 2023
68d7765
Integrated null-safety into the appendix about subtyping
eernstg Dec 14, 2023
fbef8c6
Fix a couple of typos
eernstg Dec 14, 2023
0246e75
Adjust dart.sty to change like specify_null_safety_sep21
eernstg Oct 17, 2024
f9d3f6e
WIP
eernstg Oct 17, 2024
b7703d6
Align this PR with specify_null_safety_sep21
eernstg Oct 17, 2024
0541586
WIP
eernstg Oct 17, 2024
efa014b
WIP
eernstg Oct 18, 2024
d97511a
WIP
eernstg Oct 18, 2024
5f57b1d
WIP
eernstg Oct 18, 2024
a4cf353
WIP
eernstg Oct 18, 2024
06d1d88
WIP
eernstg Oct 18, 2024
9282cc2
WIP
eernstg Oct 18, 2024
2ea464f
WIP
eernstg Oct 18, 2024
7473b2b
WIP
eernstg Oct 18, 2024
9580568
WIP
eernstg Oct 18, 2024
d6deb20
WIP
eernstg Oct 18, 2024
5233e51
WIP
eernstg Oct 18, 2024
3ad7918
WIP
eernstg Oct 18, 2024
bc6c197
Added section about explicitly resolved (fka canonical) syntax
eernstg Nov 1, 2024
f6f60d0
Clean up whitespace
eernstg Jul 7, 2025
d4f6724
Whitespace
eernstg Aug 14, 2025
b98bbae
Whitespace
eernstg Aug 14, 2025
5b91176
WIP
eernstg Aug 14, 2025
66bf56a
Rename type variables
eernstg Aug 14, 2025
43895e9
WIP
eernstg Aug 14, 2025
1fce514
WIP
eernstg Aug 14, 2025
410422c
WIP
eernstg Aug 14, 2025
b4146df
WIP
eernstg Aug 14, 2025
6059eec
WIP
eernstg Aug 14, 2025
a74ad10
WIP
eernstg Aug 14, 2025
a653a3b
WIP
eernstg Aug 14, 2025
43f6c84
WIP
eernstg Aug 14, 2025
9f65ff1
WIP
eernstg Aug 14, 2025
c21c325
WIP
eernstg Aug 14, 2025
21700bf
WIP
eernstg Aug 14, 2025
f1c9d06
WIP
eernstg Aug 14, 2025
1cdb4fd
WIP
eernstg Aug 14, 2025
e269b13
WIP
eernstg Aug 14, 2025
6126f61
WIP
eernstg Aug 14, 2025
e91430a
WIP
eernstg Aug 14, 2025
4e90891
WIP
eernstg Aug 14, 2025
1dffa9d
WIP
eernstg Aug 14, 2025
b1a11af
WIP
eernstg Aug 14, 2025
9cc6a23
WIP
eernstg Aug 14, 2025
e2966f6
WIP
eernstg Aug 14, 2025
14c8573
WIP
eernstg Aug 14, 2025
8e15aab
WIP
eernstg Aug 14, 2025
c9bcbe5
WIP
eernstg Aug 14, 2025
39fc1df
WIP
eernstg Aug 14, 2025
cb01bc2
WIP
eernstg Aug 14, 2025
fd1de17
WIP
eernstg Aug 14, 2025
1c82d65
WIP
eernstg Aug 14, 2025
b33f122
WIP
eernstg Aug 14, 2025
bd5a581
WIP
eernstg Aug 14, 2025
20b931d
WIP
eernstg Aug 14, 2025
14e6c28
WIP
eernstg Aug 14, 2025
1a32d3d
WIP
eernstg Aug 14, 2025
da6d419
WIP
eernstg Aug 15, 2025
99edde4
WIP
eernstg Aug 15, 2025
1df0e80
WIP
eernstg Aug 15, 2025
6fb6aea
WIP
eernstg Aug 15, 2025
e572bc1
WIP
eernstg Aug 15, 2025
baea929
WIP
eernstg Aug 15, 2025
6ddcb06
WIP
eernstg Aug 15, 2025
78a0a9c
WIP
eernstg Aug 15, 2025
6c2ee89
WIP
eernstg Aug 15, 2025
f0e4af7
WIP
eernstg Aug 15, 2025
d65ae9d
WIP
eernstg Aug 15, 2025
9feff56
WIP
eernstg Aug 15, 2025
e8803e4
WIP
eernstg Aug 15, 2025
06894eb
WIP
eernstg Aug 15, 2025
04fec16
WIP
eernstg Aug 15, 2025
3d011e1
WIP
eernstg Aug 15, 2025
46ef6d8
WIP
eernstg Aug 15, 2025
7c8c805
WIP
eernstg Aug 15, 2025
1302885
WIP
eernstg Aug 15, 2025
7920247
WIP
eernstg Aug 15, 2025
3caa552
WIP
eernstg Aug 15, 2025
86f26af
WIP
eernstg Aug 15, 2025
0dae2fa
WIP
eernstg Aug 15, 2025
2b6ea6f
WIP
eernstg Aug 15, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 20 additions & 15 deletions specification/dart.sty
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
\def\MIXIN{\builtinId{mixin}}
\def\OPERATOR{\builtinId{operator}}
\def\PART{\builtinId{part}}
\def\RECORD{\builtinId{Record}}
\def\REQUIRED{\builtinId{required}}
\def\SET{\builtinId{set}}
\def\STATIC{\builtinId{static}}
Expand Down Expand Up @@ -124,11 +125,11 @@
\newenvironment{commentary}[1]{{\color{commentaryColor}\sf{#1}}}{}

% Auxiliary functions.
\newcommand{\flattenName}{\mbox{\it flatten}}
\newcommand{\flattenName}{\metavar{flatten}}
\newcommand{\flatten}[1]{\ensuremath{\flattenName({#1})}}
\newcommand{\futureOrBase}[1]{\ensuremath{\mbox{\it futureOrBase}({#1})}}
\newcommand{\overrides}[1]{\ensuremath{\mbox{\it overrides}({#1})}}
\newcommand{\inherited}[1]{\ensuremath{\mbox{\it inherited}({#1})}}
\newcommand{\futureOrBase}[1]{\ensuremath{\metavar{futureOrBase}({#1})}}
\newcommand{\overrides}[1]{\ensuremath{\metavar{overrides}({#1})}}
\newcommand{\inherited}[1]{\ensuremath{\metavar{inherited}({#1})}}

% Used as a mini-section marker, indicating visibly that a range of
% text (usually just a couple of paragraphs) are concerned with one
Expand Down Expand Up @@ -173,9 +174,12 @@
\newcommand{\id}{\metavar{id}}
\newcommand{\op}{\metavar{op}}

% Used in margin to indicate that a term is being defined here.
\newcommand{\IndexMarker}{\ensuremath{^\vartriangle}}

% Used for defining occurrence of phrase, with customized index entry.
\newcommand{\IndexCustom}[2]{%
\leavevmode\marginpar{\ensuremath{_{^\vartriangle}}}\emph{#1}\index{#2}}
\leavevmode\marginpar{\IndexMarker}\emph{#1}\index{#2}}

% Used for the defining occurrence of a local symbol.
\newcommand{\DefineSymbol}[1]{%
Expand All @@ -196,11 +200,15 @@

% Same appearance, but not adding an entry to the index.
\newcommand{\NoIndex}[1]{%
\leavevmode\marginpar{\ensuremath{_{^\vartriangle}}}\emph{#1}}
\leavevmode\marginpar{\IndexMarker}\emph{#1}}

% Mark a compile-time error in the margin.
\newcommand{\Error}[1]{%
\leavevmode\marginpar{\ensuremath{_{^\ominus}}}{#1}}
\leavevmode\marginpar{\ensuremath{\textcolor{red}{\ominus}}}{#1}}

% Mark a dynamic error in the margin.
\newcommand{\DynamicError}[1]{%
\leavevmode\marginpar{\textcolor{red}{\Lightning}}{#1}}

% Used to specify comma separated lists of similar symbols.
\newcommand{\List}[3]{\ensuremath{{#1}_{#2},\,\ldots,\ {#1}_{#3}}}
Expand Down Expand Up @@ -402,9 +410,9 @@

% Same as \FunctionTypeNamed except suitable for inline usage, hence omitting
% the spacer argument.
\newcommand{\RawFunctionTypeNamed}[8]{%
\newcommand{\RawFunctionTypeNamed}[9]{%
\RawFunctionType{#1}{#2}{#3}{#4}{%
\FunctionTypeNamedParameters{#5}{#6}{#7}{#8}{r}}}
\FunctionTypeNamedParameters{#5}{#6}{#7}{#8}{#9}}}

% A variant of \FunctionTypeNamed that uses the standard symbols,
% that is, a function type with positional optional parameters which
Expand Down Expand Up @@ -466,17 +474,14 @@
\newcommand{\SubtypeStd}[2]{\Subtype{\Delta}{#1}{#2}}
% Subtype judgment where the environment is omitted (NE: "no environment").
\newcommand{\SubtypeNE}[2]{\ensuremath{{#1}\,<:\,{#2}}}
\newcommand{\MutualSubtype}[3]{\ensuremath{{#1}\vdash{#2}\,<:>\,{#3}}}
\newcommand{\MutualSubtypeStd}[2]{\MutualSubtype{\Delta}{#1}{#2}}
\newcommand{\MutualSubtypeNE}[2]{\ensuremath{{#1}\,<:>\,{#2}}}

% Judgment expressing that a supertype relation exists.
\newcommand{\Supertype}[3]{\ensuremath{{#1}\vdash{#2}\,:>\,{#3}}}
\newcommand{\SupertypeStd}[2]{\Supertype{\Delta}{#1}{#2}}

% Judgment expressing that an assignability relation exists.
\newcommand{\AssignableRelationSymbol}{\ensuremath{\Longleftrightarrow}}
\newcommand{\Assignable}[3]{%
\ensuremath{{#1}\vdash{#2}\,\AssignableRelationSymbol\,{#3}}}
\newcommand{\AssignableStd}[2]{\Assignable{\Gamma}{#1}{#2}}

% Semantic function delivering the superinterfaces of a class.
\newcommand{\Superinterfaces}[1]{\ensuremath{\metavar{Superinterfaces}({#1})}}
\newcommand{\Superinterface}[2]{{#1}\in\Superinterfaces{#2}}
Expand Down
Loading