File Download
Links for fulltext
(May Require Subscription)
- Publisher Website: 10.1145/3689734
- Scopus: eid_2-s2.0-85207660076
- Find via

Supplementary
-
Citations:
- Scopus: 0
- Appears in Collections:
Article: Merging Gradual Typing
| Title | Merging Gradual Typing |
|---|---|
| Authors | |
| Keywords | Bidirectional Typing Gradual Typing Merge Operator Type-Directed Semantics |
| Issue Date | 8-Oct-2024 |
| Publisher | Association for Computing Machinery (ACM) |
| Citation | Proceedings of the ACM on Programming Languages, 2024, v. 8, n. OOPSLA2 How to Cite? |
| Abstract | Programming language mechanisms with a type-directed semantics are nowadays common and widely used. Such mechanisms include gradual typing, type classes, implicits and intersection types with a merge operator. While sharing common challenges in their design and having complementary strengths, type-directed mechanisms have been mostly independently studied. This paper studies a new calculus, called λM★, which combines two type-directed mechanisms: gradual typing and a merge operator based on intersection types. Gradual typing enables a smooth transition between dynamically and statically typed code, and is available in languages such as TypeScript or Flow. The merge operator generalizes record concatenation to allow merges of values of any two types. Recent work has shown that the merge operator enables modelling expressive OOP features like first-class traits/classes and dynamic inheritance with static type-checking. These features are not found in mainstream statically typed OOP languages, but they can be found in dynamically or gradually typed languages such as JavaScript or TypeScript. In λM★, by exploiting the complementary strengths of gradual typing and the merge operator, we obtain a foundation for modelling gradually typed languages with both first-class classes and dynamic inheritance. We study a static variant of λM★ (called λM); prove the type-soundness of λM★; show that λM★ can encode gradual rows and all well-typed terms in the GT FL≲ calculus; and show that λM★ satisfies gradual typing criteria. The dynamic gradual guarantee (DGG) is challenging due to the possibility of ambiguity errors. We establish a variant of the DGG using a semantic notion of precision based on a step-indexed logical relation. |
| Persistent Identifier | http://hdl.handle.net/10722/361885 |
| ISSN | 2023 Impact Factor: 2.2 2023 SCImago Journal Rankings: 1.242 |
| DC Field | Value | Language |
|---|---|---|
| dc.contributor.author | Ye, Wenjia | - |
| dc.contributor.author | Dos Santos Oliveira, Bruno Cesar | - |
| dc.contributor.author | Toro, Matías | - |
| dc.date.accessioned | 2025-09-17T00:31:35Z | - |
| dc.date.available | 2025-09-17T00:31:35Z | - |
| dc.date.issued | 2024-10-08 | - |
| dc.identifier.citation | Proceedings of the ACM on Programming Languages, 2024, v. 8, n. OOPSLA2 | - |
| dc.identifier.issn | 2475-1421 | - |
| dc.identifier.uri | http://hdl.handle.net/10722/361885 | - |
| dc.description.abstract | Programming language mechanisms with a type-directed semantics are nowadays common and widely used. Such mechanisms include gradual typing, type classes, implicits and intersection types with a merge operator. While sharing common challenges in their design and having complementary strengths, type-directed mechanisms have been mostly independently studied. This paper studies a new calculus, called λM★, which combines two type-directed mechanisms: gradual typing and a merge operator based on intersection types. Gradual typing enables a smooth transition between dynamically and statically typed code, and is available in languages such as TypeScript or Flow. The merge operator generalizes record concatenation to allow merges of values of any two types. Recent work has shown that the merge operator enables modelling expressive OOP features like first-class traits/classes and dynamic inheritance with static type-checking. These features are not found in mainstream statically typed OOP languages, but they can be found in dynamically or gradually typed languages such as JavaScript or TypeScript. In λM★, by exploiting the complementary strengths of gradual typing and the merge operator, we obtain a foundation for modelling gradually typed languages with both first-class classes and dynamic inheritance. We study a static variant of λM★ (called λM); prove the type-soundness of λM★; show that λM★ can encode gradual rows and all well-typed terms in the GT FL≲ calculus; and show that λM★ satisfies gradual typing criteria. The dynamic gradual guarantee (DGG) is challenging due to the possibility of ambiguity errors. We establish a variant of the DGG using a semantic notion of precision based on a step-indexed logical relation. | - |
| dc.language | eng | - |
| dc.publisher | Association for Computing Machinery (ACM) | - |
| dc.relation.ispartof | Proceedings of the ACM on Programming Languages | - |
| dc.rights | This work is licensed under a Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License. | - |
| dc.subject | Bidirectional Typing | - |
| dc.subject | Gradual Typing | - |
| dc.subject | Merge Operator | - |
| dc.subject | Type-Directed Semantics | - |
| dc.title | Merging Gradual Typing | - |
| dc.type | Article | - |
| dc.description.nature | published_or_final_version | - |
| dc.identifier.doi | 10.1145/3689734 | - |
| dc.identifier.scopus | eid_2-s2.0-85207660076 | - |
| dc.identifier.volume | 8 | - |
| dc.identifier.issue | OOPSLA2 | - |
| dc.identifier.eissn | 2475-1421 | - |
| dc.identifier.issnl | 2475-1421 | - |
