TY - GEN
T1 - A Compilation Method for Dynamic Typing in ML
AU - Ohori, Atsushi
AU - Ueno, Katsuhiro
N1 - Funding Information:
Acknowledgments. The authors thank an anonymous reviewer for his/her detailed comments. This work was partially supported by JSPS KAKENHI Grant Number JP18K11233. The second author’s work was also partially supported by JSPS KAK-ENHI Grant Number JP19K11893.
Publisher Copyright:
© 2021, Springer Nature Switzerland AG.
PY - 2021
Y1 - 2021
N2 - This paper develops a systematic method for extending a polymorphic type system of ML with dynamic typing, and implements the extension in SML#. The core of the extension consists of an adaptation of the type-directed compilation method for non-parametric polymorphism to type tag abstraction and type tag generation. To support existentially bound type variables in dynamic value elimination and user-level manipulation of dynamic values, the conventional type-directed compilation framework is extended with existential types and a mechanism to reify dynamic values to user-level datatypes. The resulting language achieves orthogonal integration of dynamic typing in ML: it supports all the standard features, including polymorphic type inference, user-defined datatypes and pattern matching, in programming with dynamic typing. The implementation readily provides various practical features, including polymorphic first-class pretty-printer, polymorphic deserialization, type-safe interface to database systems, and type-safe meta-programming.
AB - This paper develops a systematic method for extending a polymorphic type system of ML with dynamic typing, and implements the extension in SML#. The core of the extension consists of an adaptation of the type-directed compilation method for non-parametric polymorphism to type tag abstraction and type tag generation. To support existentially bound type variables in dynamic value elimination and user-level manipulation of dynamic values, the conventional type-directed compilation framework is extended with existential types and a mechanism to reify dynamic values to user-level datatypes. The resulting language achieves orthogonal integration of dynamic typing in ML: it supports all the standard features, including polymorphic type inference, user-defined datatypes and pattern matching, in programming with dynamic typing. The implementation readily provides various practical features, including polymorphic first-class pretty-printer, polymorphic deserialization, type-safe interface to database systems, and type-safe meta-programming.
UR - http://www.scopus.com/inward/record.url?scp=85118174601&partnerID=8YFLogxK
UR - http://www.scopus.com/inward/citedby.url?scp=85118174601&partnerID=8YFLogxK
U2 - 10.1007/978-3-030-89051-3_9
DO - 10.1007/978-3-030-89051-3_9
M3 - Conference contribution
AN - SCOPUS:85118174601
SN - 9783030890506
T3 - Lecture Notes in Computer Science (including subseries Lecture Notes in Artificial Intelligence and Lecture Notes in Bioinformatics)
SP - 140
EP - 159
BT - Programming Languages and Systems - 19th Asian Symposium, APLAS 2021, Proceedings
A2 - Oh, Hakjoo
PB - Springer Science and Business Media Deutschland GmbH
T2 - 19th Asian Symposium on Programming Languages and Systems, APLAS 2021
Y2 - 17 October 2021 through 18 October 2021
ER -