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
13b291ea
Commit
13b291ea
authored
Feb 26, 2020
by
Giuseppe Castagna
Browse files
more rewording
parent
554fab9e
Changes
1
Hide whitespace changes
Inline
Side-by-side
practical.tex
View file @
13b291ea
We have implemented the algorithmic system
$
\vdashA
$
. Our implementation is written in OCaml and uses CDuce as a library to
We have implemented the algorithmic system
$
\vdashA
$
. Our
implementation is written in OCaml and uses CDuce as a library to
provide the semantic subtyping machinery. Besides a type-checking
algorithm defined on the base language, our implementation supports
record types (Section
\ref
{
ssec:struct
}
) and the refinement of function types
(Section
\ref
{
sec:refining
}
with the rule of Appendix~
\ref
{
app:optimize
}
). The implementation is rather crude and
record types (Section
\ref
{
ssec:struct
}
) and the refinement of
function types (Section
\ref
{
sec:refining
}
with the rule of
Appendix~
\ref
{
app:optimize
}
). The implementation is rather crude and
consists of 2000 lines of OCaml code, including parsing, type-checking
of programs, and pretty printing of types. We demonstrate the output of
our type-checking implementation in Table~
\ref
{
tab:implem
}
. These
examples and others can be tested in the online toplevel available at
of programs, and pretty printing of types. We demonstrate the output
of our type-checking implementation in Table~
\ref
{
tab:implem
}
by
listing some examples none of which can be typed by current
systems (even though some system such as Flow and TypeScript
can type some of them by adding explicit type annotation, the code 6,
7, 9, and 10 and the
\code
{
and
\_
}
and
\code
{
xor
\_
}
functions at the end of this
section are out of reach of current systems, even when using the right
explicit annotations). These examples and others can be tested in the
online toplevel available at
\url
{
https://occtyping.github.io/
}
%
\ifsubmission
~(the corresponding repository is
...
...
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