Type-directed operational semantics for gradual typing
Uloženo v:
| Vydáno v: | Journal of Functional Programming vol. 34 (Sep 2024) |
|---|---|
| Hlavní autor: | |
| Další autoři: | |
| Vydáno: |
Cambridge University Press
|
| Témata: | |
| On-line přístup: | Citation/Abstract Full Text - PDF |
| Tagy: |
Žádné tagy, Buďte první, kdo vytvoří štítek k tomuto záznamu!
|
MARC
| LEADER | 00000nab a2200000uu 4500 | ||
|---|---|---|---|
| 001 | 3109569512 | ||
| 003 | UK-CbPIL | ||
| 022 | |a 0956-7968 | ||
| 022 | |a 1469-7653 | ||
| 024 | 7 | |a 10.1017/S0956796824000078 |2 doi | |
| 035 | |a 3109569512 | ||
| 045 | 2 | |b d20240901 |b d20240930 | |
| 084 | |a 79046 |2 nlm | ||
| 100 | 1 | |a YE, WENJIA |u The University of Hong Kong, Hong Kong, China, (e-mail: wjye@cs.hku.hk ) | |
| 245 | 1 | |a Type-directed operational semantics for gradual typing | |
| 260 | |b Cambridge University Press |c Sep 2024 | ||
| 513 | |a Journal Article | ||
| 520 | 3 | |a The semantics of gradually typed languages is typically given indirectly via an elaboration into a cast calculus. This contrasts with more conventional formulations of programming language semantics, where the semantics of a language is given directly using, for instance, an operational semantics. This paper presents a new approach to give the semantics of gradually typed languages directly. We use a recently proposed variant of small-step operational semantics called type-directed operational semantics (TDOS). In a TDOS, type annotations become operationally relevant and can affect the result of a program. In the context of a gradually typed language, type annotations are used to trigger type-based conversions on values. We illustrate how to employ a TDOS on gradually typed languages using two calculi. The first calculus, called <inline-formula><inline-graphic mime-subtype="png" xlink:href="S0956796824000078_inline1.png" />\(\lambda B^{g}\)</inline-formula>, is inspired by the semantics of the blame calculus, but it has implicit type conversions, enabling it to be used as a gradually typed language. The second calculus, called <inline-formula><inline-graphic mime-subtype="png" xlink:href="S0956796824000078_inline2.png" />\(\lambda e\)</inline-formula>, explores an eager semantics for gradually typed languages using a TDOS. For both calculi, type safety is proved. For the <inline-formula><inline-graphic mime-subtype="png" xlink:href="S0956796824000078_inline3.png" />\(\lambda B^{g}\)</inline-formula> calculus, we also present a variant with blame labels and illustrate how the TDOS can also deal with such an important feature of gradually typed languages. We also show that the semantics of <inline-formula><inline-graphic mime-subtype="png" xlink:href="S0956796824000078_inline4.png" />\(\lambda B^{g}\)</inline-formula> with blame labels is sound and complete with respect to the semantics of the blame calculus, and that both calculi come with a gradual guarantee. All the results have been formalized in the Coq theorem prover. | |
| 653 | |a Language | ||
| 653 | |a Calculus | ||
| 653 | |a Semantics | ||
| 653 | |a Labels | ||
| 653 | |a Annotations | ||
| 653 | |a Theorem proving | ||
| 653 | |a Programming languages | ||
| 700 | 1 | |a BRUNO C D S OLIVEIRA |u The University of Hong Kong, Hong Kong, China, (e-mail: bruno@cs.hku.hk ) | |
| 773 | 0 | |t Journal of Functional Programming |g vol. 34 (Sep 2024) | |
| 786 | 0 | |d ProQuest |t Advanced Technologies & Aerospace Database | |
| 856 | 4 | 1 | |3 Citation/Abstract |u https://www.proquest.com/docview/3109569512/abstract/embedded/7BTGNMKEMPT1V9Z2?source=fedsrch |
| 856 | 4 | 0 | |3 Full Text - PDF |u https://www.proquest.com/docview/3109569512/fulltextPDF/embedded/7BTGNMKEMPT1V9Z2?source=fedsrch |