Newton, Jim
Demaille, Akim
Verna, Didier
2016-02-12
<p> We introduce the abstract concept of \textit{rational type<br>
expression} and show its relationship to rational language theory.<br>
We further present a concrete syntax, regular type<br>
expression, and a Common Lisp implementation thereof which allows the programmer<br>
to declaratively express the types of heterogeneous sequences in a way<br>
which is natural in the Common Lisp language. The implementation uses<br>
techniques well known and well founded in rational language theory,<br>
in particular the use of the Brzozowski derivative and deterministic<br>
automata to reach a solution which can match a sequence in<br>
linear time. We illustrate the concept with several motivating<br>
examples, and finally explain many details of its implementation.</p>
https://doi.org/10.5281/zenodo.3405173
oai:zenodo.org:3405173
eng
Zenodo
https://zenodo.org/communities/els
https://doi.org/10.5281/zenodo.3405172
info:eu-repo/semantics/openAccess
Creative Commons Attribution 4.0 International
https://creativecommons.org/licenses/by/4.0/legalcode
rational languages
finite automata
type checking
lisp
Type-Checking of Heterogeneous Sequences in Common Lisp
info:eu-repo/semantics/conferencePaper