{"status":"ok","message-type":"work","message-version":"1.0.0","message":{"indexed":{"date-parts":[[2026,5,26]],"date-time":"2026-05-26T23:05:58Z","timestamp":1779836758171,"version":"3.53.1"},"reference-count":72,"publisher":"Cambridge University Press (CUP)","license":[{"start":{"date-parts":[[2024,9,26]],"date-time":"2024-09-26T00:00:00Z","timestamp":1727308800000},"content-version":"unspecified","delay-in-days":269,"URL":"https:\/\/creativecommons.org\/licenses\/by\/4.0\/"}],"content-domain":{"domain":["cambridge.org"],"crossmark-restriction":true},"short-container-title":["J. Funct. Prog."],"published-print":{"date-parts":[[2024]]},"abstract":"<jats:title>Abstract<\/jats:title>\n                  <jats:p>\n                    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\n                    <jats:italic>type-directed operational semantics<\/jats:italic>\n                    (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\n                    <jats:inline-formula>\n                      <jats:alternatives>\n                        <jats:inline-graphic xmlns:xlink=\"http:\/\/www.w3.org\/1999\/xlink\" mime-subtype=\"png\" xlink:href=\"S0956796824000078_inline1.png\"\/>\n                        <jats:tex-math>$\\lambda B^{g}$<\/jats:tex-math>\n                      <\/jats:alternatives>\n                    <\/jats:inline-formula>\n                    , 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\n                    <jats:inline-formula>\n                      <jats:alternatives>\n                        <jats:inline-graphic xmlns:xlink=\"http:\/\/www.w3.org\/1999\/xlink\" mime-subtype=\"png\" xlink:href=\"S0956796824000078_inline2.png\"\/>\n                        <jats:tex-math>$\\lambda e$<\/jats:tex-math>\n                      <\/jats:alternatives>\n                    <\/jats:inline-formula>\n                    , explores an eager semantics for gradually typed languages using a TDOS. For both calculi, type safety is proved. For the\n                    <jats:inline-formula>\n                      <jats:alternatives>\n                        <jats:inline-graphic xmlns:xlink=\"http:\/\/www.w3.org\/1999\/xlink\" mime-subtype=\"png\" xlink:href=\"S0956796824000078_inline3.png\"\/>\n                        <jats:tex-math>$\\lambda B^{g}$<\/jats:tex-math>\n                      <\/jats:alternatives>\n                    <\/jats:inline-formula>\n                    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\n                    <jats:inline-formula>\n                      <jats:alternatives>\n                        <jats:inline-graphic xmlns:xlink=\"http:\/\/www.w3.org\/1999\/xlink\" mime-subtype=\"png\" xlink:href=\"S0956796824000078_inline4.png\"\/>\n                        <jats:tex-math>$\\lambda B^{g}$<\/jats:tex-math>\n                      <\/jats:alternatives>\n                    <\/jats:inline-formula>\n                    with blame labels is sound and complete with respect to the semantics of the blame calculus, and that both calculi come with a\n                    <jats:italic>gradual guarantee<\/jats:italic>\n                    . All the results have been formalized in the Coq theorem prover.\n                  <\/jats:p>","DOI":"10.1017\/s0956796824000078","type":"journal-article","created":{"date-parts":[[2024,9,26]],"date-time":"2024-09-26T03:32:27Z","timestamp":1727321547000},"update-policy":"https:\/\/doi.org\/10.1017\/policypage","source":"Crossref","is-referenced-by-count":0,"title":["Type-directed operational semantics for gradual typing"],"prefix":"10.1017","volume":"34","author":[{"ORCID":"https:\/\/orcid.org\/0000-0002-3968-6201","authenticated-orcid":false,"given":"WENJIA","family":"YE","sequence":"first","affiliation":[],"role":[{"vocabulary":"crossref","role":"author"}]},{"given":"BRUNO C. D. S.","family":"OLIVEIRA","sequence":"additional","affiliation":[],"role":[{"vocabulary":"crossref","role":"author"}]}],"member":"56","published-online":{"date-parts":[[2024,9,26]]},"reference":[{"key":"S0956796824000078_ref69","doi-asserted-by":"publisher","DOI":"10.1006\/inco.1994.1093"},{"key":"S0956796824000078_ref40","doi-asserted-by":"publisher","DOI":"10.1145\/1498926.1498930"},{"key":"S0956796824000078_ref55","unstructured":"Siek, J. G. & Taha, W. (2006) Gradual typing for functional languages. In Scheme and Functional Programming Workshop, vol. 6, pp. 81\u201392."},{"key":"S0956796824000078_ref59","doi-asserted-by":"publisher","DOI":"10.1145\/2384616.2384685"},{"key":"S0956796824000078_ref44","doi-asserted-by":"publisher","DOI":"10.1145\/3290328"},{"key":"S0956796824000078_ref21","doi-asserted-by":"publisher","DOI":"10.1016\/0304-3975(92)90014-7"},{"key":"S0956796824000078_ref23","doi-asserted-by":"publisher","DOI":"10.1145\/581478.581484"},{"key":"S0956796824000078_ref63","doi-asserted-by":"publisher","DOI":"10.1145\/1176617.1176755"},{"key":"S0956796824000078_ref39","doi-asserted-by":"crossref","unstructured":"Matthews, J. & Ahmed, A. (2008) Parametric polymorphism through run-time sealing or, theorems for low, low prices! In Programming Languages and Systems, Drossopoulou, S. (ed), pp. 16\u201331.","DOI":"10.1007\/978-3-540-78739-6_2"},{"key":"S0956796824000078_ref16","doi-asserted-by":"publisher","DOI":"10.1145\/3133872"},{"key":"S0956796824000078_ref47","doi-asserted-by":"publisher","DOI":"10.1145\/2103656.2103714"},{"key":"S0956796824000078_ref2","doi-asserted-by":"publisher","DOI":"10.1145\/103135.103138"},{"key":"S0956796824000078_ref34","doi-asserted-by":"publisher","DOI":"10.1007\/s10990-011-9066-z"},{"key":"S0956796824000078_ref45","doi-asserted-by":"publisher","DOI":"10.1006\/inco.1994.1055"},{"key":"S0956796824000078_ref11","unstructured":"Bracha, G. (2015) The Dart Programming Language."},{"key":"S0956796824000078_ref1","doi-asserted-by":"publisher","DOI":"10.1007\/978-1-4419-8598-9"},{"key":"S0956796824000078_ref35","author":"Huang","year":"2020"},{"key":"S0956796824000078_ref41","volume-title":"Static typing where possible, dynamic typing when needed: The end of the cold war between programming languages","author":"Meijer","year":"2004"},{"key":"S0956796824000078_ref57","doi-asserted-by":"publisher","DOI":"10.1145\/1570506.1570511"},{"key":"S0956796824000078_ref52","doi-asserted-by":"publisher","DOI":"10.1007\/978-3-642-00590-9_2"},{"key":"S0956796824000078_ref3","doi-asserted-by":"publisher","DOI":"10.1145\/237721.237809"},{"key":"S0956796824000078_ref14","doi-asserted-by":"publisher","DOI":"10.1145\/3110285"},{"key":"S0956796824000078_ref9","doi-asserted-by":"publisher","DOI":"10.1145\/3341695"},{"key":"S0956796824000078_ref17","doi-asserted-by":"publisher","DOI":"10.2307\/2266170"},{"key":"S0956796824000078_ref8","doi-asserted-by":"publisher","DOI":"10.1007\/978-3-662-44202-9_11"},{"key":"S0956796824000078_ref43","doi-asserted-by":"publisher","DOI":"10.1145\/1596550.1596572"},{"key":"S0956796824000078_ref56","doi-asserted-by":"publisher","DOI":"10.1145\/1408681.1408688"},{"key":"S0956796824000078_ref60","doi-asserted-by":"publisher","DOI":"10.1145\/2535838.2535889"},{"key":"S0956796824000078_ref27","doi-asserted-by":"publisher","DOI":"10.1007\/BFb0014053"},{"key":"S0956796824000078_ref72","doi-asserted-by":"publisher","DOI":"10.1145\/3586036"},{"key":"S0956796824000078_ref36","doi-asserted-by":"publisher","DOI":"10.1017\/S0956796821000186"},{"key":"S0956796824000078_ref30","doi-asserted-by":"publisher","DOI":"10.1145\/2676726.2676967"},{"key":"S0956796824000078_ref54","doi-asserted-by":"publisher","DOI":"10.1145\/2737924.2737968"},{"key":"S0956796824000078_ref13","doi-asserted-by":"publisher","DOI":"10.1006\/inco.1994.1013"},{"key":"S0956796824000078_ref62","doi-asserted-by":"crossref","unstructured":"Thatte, S. (1989) Quasi-static typing. In Proceedings of the 17th ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages, pp. 367\u2013381.","DOI":"10.1145\/96709.96747"},{"key":"S0956796824000078_ref15","unstructured":"Chambers, C. (1992) Object-oriented multi-methods in cecil. In European Conference on Object-Oriented Programming."},{"key":"S0956796824000078_ref33","unstructured":"Herman, D. , Tomb, A. & Flanagan, C. (2007) Space-efficient gradual typing. In Trends in Functional Programming (TFP)."},{"key":"S0956796824000078_ref61","doi-asserted-by":"publisher","DOI":"10.1145\/2384616.2384674"},{"key":"S0956796824000078_ref6","doi-asserted-by":"publisher","DOI":"10.1145\/2628136.2628149"},{"key":"S0956796824000078_ref53","doi-asserted-by":"publisher","DOI":"10.1007\/978-3-540-73589-2_2"},{"key":"S0956796824000078_ref12","doi-asserted-by":"crossref","unstructured":"Bruce, K. B. , Cardelli, L. & Pierce, B. C. (1999) Comparing object encodings, vol. 155.","DOI":"10.1006\/inco.1999.2829"},{"key":"S0956796824000078_ref49","doi-asserted-by":"publisher","DOI":"10.1145\/158511.158621"},{"key":"S0956796824000078_ref64","doi-asserted-by":"publisher","DOI":"10.1145\/1328438.1328486"},{"key":"S0956796824000078_ref26","doi-asserted-by":"publisher","DOI":"10.1145\/2837614.2837670"},{"key":"S0956796824000078_ref46","doi-asserted-by":"publisher","DOI":"10.1145\/345099.345100"},{"key":"S0956796824000078_ref51","volume-title":"The Dylan Reference Manual: The Definitive Guide to the New Object-Oriented Dynamic Language","year":"1996"},{"key":"S0956796824000078_ref7","article-title":"Java","volume":"14","author":"Bettini","year":"2018","journal-title":"Logical Methods Comput. Sci."},{"key":"S0956796824000078_ref48","doi-asserted-by":"publisher","DOI":"10.1007\/3-540-54415-1_70"},{"key":"S0956796824000078_ref37","doi-asserted-by":"publisher","DOI":"10.1145\/503502.503505"},{"key":"S0956796824000078_ref18","doi-asserted-by":"publisher","DOI":"10.1016\/S0890-5401(03)00062-2"},{"key":"S0956796824000078_ref25","doi-asserted-by":"publisher","DOI":"10.1145\/2676726.2676992"},{"key":"S0956796824000078_ref71","unstructured":"Ye, W. , Oliveira, B. C. d. S. & Huang, X. (2021) Type-directed operational semantics for gradual typing. In 35th European Conference on Object-Oriented Programming (ECOOP 2021). Schloss Dagstuhl-Leibniz-Zentrum f\u00fcr Informatik."},{"key":"S0956796824000078_ref28","doi-asserted-by":"publisher","DOI":"10.1007\/BFb0014053"},{"key":"S0956796824000078_ref20","author":"Fan","year":"2022"},{"key":"S0956796824000078_ref5","doi-asserted-by":"publisher","DOI":"10.1145\/3434342"},{"key":"S0956796824000078_ref22","doi-asserted-by":"crossref","unstructured":"Feng, Y. & Luo, Z. (2011) Typed operational semantics for dependent record types. Electron. Proc. Theoret. Comput. Sci. 53, 30\u201346.","DOI":"10.4204\/EPTCS.53.3"},{"key":"S0956796824000078_ref31","author":"Hansen","year":"2007"},{"key":"S0956796824000078_ref19","doi-asserted-by":"publisher","DOI":"10.1017\/S0960129500001134"},{"key":"S0956796824000078_ref24","doi-asserted-by":"publisher","DOI":"10.1145\/2500365.2500603"},{"key":"S0956796824000078_ref38","doi-asserted-by":"publisher","DOI":"10.1145\/3527314"},{"key":"S0956796824000078_ref65","doi-asserted-by":"publisher","DOI":"10.1145\/3290330"},{"key":"S0956796824000078_ref50","doi-asserted-by":"publisher","DOI":"10.1007\/3-540-60360-3_50"},{"key":"S0956796824000078_ref4","doi-asserted-by":"publisher","DOI":"10.1145\/1926385.1926409"},{"key":"S0956796824000078_ref70","article-title":"Consistent subtyping for all","volume":"42","author":"Xie","year":"2019","journal-title":"ACM Trans. Program. Lang. Syst."},{"key":"S0956796824000078_ref29","doi-asserted-by":"publisher","DOI":"10.1145\/1094811.1094830"},{"key":"S0956796824000078_ref10","unstructured":"Boyland, J. T. (2014) The problem of structural type tests in a gradual-typed language. In Foundations of Object-Oriented Langauges."},{"key":"S0956796824000078_ref58","unstructured":"Siek, J. G. , Vitousek, M. M. , Cimini, M. & Boyland, J. T. (2015b) Refined criteria for gradual typing. In 1st Summit on Advances in Programming Languages (SNAPL 2015). Schloss Dagstuhl-Leibniz-Zentrum fuer Informatik."},{"key":"S0956796824000078_ref67","doi-asserted-by":"publisher","DOI":"10.1007\/978-3-642-00590-9_1"},{"key":"S0956796824000078_ref66","unstructured":"Verlaguet, J. (2013) Facebook: Analyzing PHP statically. In Commercial Users of Functional Programming (CUFP), vol. 13."},{"key":"S0956796824000078_ref32","doi-asserted-by":"publisher","DOI":"10.1016\/0167-6423(94)00004-2"},{"key":"S0956796824000078_ref68","doi-asserted-by":"publisher","DOI":"10.1007\/978-3-642-22655-7_22"},{"key":"S0956796824000078_ref42","first-page":"49","volume-title":"The Common LISP Object-Oriented Programming Language Standard","author":"Moon","year":"1989"}],"container-title":["Journal of Functional Programming"],"original-title":[],"language":"en","link":[{"URL":"https:\/\/www.cambridge.org\/core\/services\/aop-cambridge-core\/content\/view\/S0956796824000078","content-type":"unspecified","content-version":"vor","intended-application":"similarity-checking"}],"deposited":{"date-parts":[[2026,5,26]],"date-time":"2026-05-26T22:37:04Z","timestamp":1779835024000},"score":1,"resource":{"primary":{"URL":"https:\/\/www.cambridge.org\/core\/product\/identifier\/S0956796824000078\/type\/journal_article"}},"subtitle":[],"short-title":[],"issued":{"date-parts":[[2024]]},"references-count":72,"alternative-id":["S0956796824000078"],"URL":"https:\/\/doi.org\/10.1017\/s0956796824000078","relation":{},"ISSN":["0956-7968","1469-7653"],"issn-type":[{"value":"0956-7968","type":"print"},{"value":"1469-7653","type":"electronic"}],"subject":[],"published":{"date-parts":[[2024]]},"assertion":[{"value":"\u00a9 The Author(s), 2024. Published by Cambridge University Press","name":"copyright","label":"Copyright","group":{"name":"copyright_and_licensing","label":"Copyright and Licensing"}},{"value":"This is an Open Access article, distributed under the terms of the Creative Commons Attribution licence (https:\/\/creativecommons.org\/licenses\/by\/4.0\/), which permits unrestricted re-use, distribution and reproduction, provided the original article is properly cited.","name":"license","label":"License","group":{"name":"copyright_and_licensing","label":"Copyright and Licensing"}},{"value":"This content has been made available to all.","name":"free","label":"Free to read"}],"article-number":"e9"}}