{"status":"ok","message-type":"work","message-version":"1.0.0","message":{"indexed":{"date-parts":[[2026,8,18]],"date-time":"2026-08-18T15:08:31Z","timestamp":1787065711732,"version":"build-2736575974"},"reference-count":32,"publisher":"Association for Computing Machinery (ACM)","issue":"ICFP","license":[{"start":{"date-parts":[[2021,8,19]],"date-time":"2021-08-19T00:00:00Z","timestamp":1629331200000},"content-version":"vor","delay-in-days":0,"URL":"https:\/\/creativecommons.org\/licenses\/by-nc-sa\/4.0\/"}],"funder":[{"DOI":"10.13039\/501100002920","name":"Research Grants Council, University Grants Committee","doi-asserted-by":"crossref","award":["17209519,17209520"],"award-info":[{"award-number":["17209519,17209520"]}],"id":[{"id":"10.13039\/501100002920","id-type":"DOI","asserted-by":"crossref"}]}],"content-domain":{"domain":["dl.acm.org"],"crossmark-restriction":true},"short-container-title":["Proc. ACM Program. Lang."],"published-print":{"date-parts":[[2021,8,22]]},"abstract":"<jats:p>\n                    Subtyping with intersection and union types is nowadays common in many programming languages. From the perspective of logic, the subtyping problem is essentially the problem of determining\n                    <jats:italic>logical entailment<\/jats:italic>\n                    : does a logical statement follow from another one? Unfortunately, algorithms for deciding subtyping and logical entailment with intersections, unions and various distributivity laws can be highly non-trivial.\n                  <\/jats:p>\n                  <jats:p>\n                    This functional pearl presents a novel algorithmic formulation for subtyping (and logical entailment) in the presence of various distributivity rules between intersections, unions and implications (i.e. function types). Unlike many existing algorithms which first normalize types and then apply a subtyping algorithm on the normalized types, our new subtyping algorithm works directly on source types. Our algorithm is based on two recent ideas: a generalization of subtyping based on the duality of language constructs called\n                    <jats:italic>duotyping<\/jats:italic>\n                    ; and\n                    <jats:italic>splittable types<\/jats:italic>\n                    , which characterize types that decompose into two simpler types. We show that our algorithm is sound, complete and decidable with respect to a declarative formulation of subtyping based on the\n                    <jats:italic>minimal relevant logic<\/jats:italic>\n                    <jats:italic>B<\/jats:italic>\n                    <jats:bold>+<\/jats:bold>\n                    . Moreover, it leads to a simple and compact implementation in under 50 lines of functional code.\n                  <\/jats:p>","DOI":"10.1145\/3473594","type":"journal-article","created":{"date-parts":[[2021,8,19]],"date-time":"2021-08-19T06:44:29Z","timestamp":1629355469000},"page":"1-24","update-policy":"https:\/\/doi.org\/10.1145\/crossmark-policy","source":"Crossref","is-referenced-by-count":4,"title":["Distributing intersection and union types with splits and duality (functional pearl)"],"prefix":"10.1145","volume":"5","author":[{"ORCID":"https:\/\/orcid.org\/0000-0002-8496-491X","authenticated-orcid":false,"given":"Xuejing","family":"Huang","sequence":"first","affiliation":[{"name":"University of Hong Kong, China"}],"role":[{"vocabulary":"crossref","role":"author"}]},{"given":"Bruno C. d. S.","family":"Oliveira","sequence":"additional","affiliation":[{"name":"University of Hong Kong, China"}],"role":[{"vocabulary":"crossref","role":"author"}]}],"member":"320","published-online":{"date-parts":[[2021,8,19]]},"reference":[{"key":"e_1_2_2_1_1","doi-asserted-by":"publisher","DOI":"10.1007\/978-3-319-30936-1_14"},{"key":"e_1_2_2_2_1","doi-asserted-by":"publisher","DOI":"10.1006\/inco.1995.1086"},{"key":"e_1_2_2_3_1","doi-asserted-by":"publisher","DOI":"10.2307\/2273659"},{"key":"e_1_2_2_4_1","doi-asserted-by":"publisher","DOI":"10.1145\/944705.944711"},{"key":"e_1_2_2_5_1","doi-asserted-by":"publisher","DOI":"10.1137\/141000671"},{"key":"e_1_2_2_6_1","doi-asserted-by":"publisher","DOI":"10.4230\/LIPIcs.ECOOP.2018.22"},{"key":"e_1_2_2_7_1","unstructured":"Arthur Chargu\u00e9raud and Fran\u00e7ois Pottier. [n.d.]. TLC: a non-constructive library for Coq. https:\/\/www.chargueraud.org\/softs\/tlc\/  Arthur Chargu\u00e9raud and Fran\u00e7ois Pottier. [n.d.]. TLC: a non-constructive library for Coq. https:\/\/www.chargueraud.org\/softs\/tlc\/"},{"key":"e_1_2_2_8_1","doi-asserted-by":"publisher","DOI":"10.1305\/ndjfl\/1093883253"},{"key":"e_1_2_2_9_1","unstructured":"Mario Coppo Mariangiola Dezani-Ciancaglini and Betti Venneri. 1980. Principal Type Schemes and Lambda-calculus Semantics. 535\u2013560. http:\/\/www.di.unito.it\/~dezani\/papers\/CDV80.pdf  Mario Coppo Mariangiola Dezani-Ciancaglini and Betti Venneri. 1980. Principal Type Schemes and Lambda-calculus Semantics. 535\u2013560. http:\/\/www.di.unito.it\/~dezani\/papers\/CDV80.pdf"},{"key":"e_1_2_2_10_1","doi-asserted-by":"publisher","DOI":"10.1002\/malq.19810270205"},{"key":"e_1_2_2_11_1","unstructured":"The Coq Development Team. 2021. The Coq Reference Manual version 8.13.2. Available electronically at https:\/\/coq.inria.fr\/distrib\/current\/refman\/  The Coq Development Team. 2021. The Coq Reference Manual version 8.13.2. Available electronically at https:\/\/coq.inria.fr\/distrib\/current\/refman\/"},{"key":"e_1_2_2_12_1","doi-asserted-by":"publisher","DOI":"10.1145\/351240.351259"},{"key":"e_1_2_2_13_1","volume-title":"Pattern Guards and Transformational Patterns. In Haskell Workshop 2000 (haskell workshop 2000 ed.). https:\/\/www.microsoft.com\/en-us\/research\/publication\/pattern-guards-and-transformational-patterns\/","author":"Erwig Martin","year":"2000"},{"key":"e_1_2_2_14_1","unstructured":"Facebook. 2014. Flow. https:\/\/flow.org  Facebook. 2014. Flow. https:\/\/flow.org"},{"key":"e_1_2_2_16_1","doi-asserted-by":"publisher","DOI":"10.1145\/1391289.1391293"},{"key":"e_1_2_2_17_1","volume-title":"ALGORITHMS FOR RELEVANT LOGIC: Leo Apostel in memoriam. Logique et Analyse, 38, 150\/152","author":"Gochet Paul","year":"1995"},{"key":"e_1_2_2_18_1","volume-title":"To H.B. Curry: Essays on Combinatory Logic, \u03bb -calculus and Formalism","author":"Howard William A."},{"key":"e_1_2_2_19_1","volume-title":"d. S. Oliveira","author":"Huang Xuejing","year":"2021"},{"key":"e_1_2_2_20_1","unstructured":"Microsoft. 2012. TypeScript. https:\/\/www.typescriptlang.org  Microsoft. 2012. TypeScript. https:\/\/www.typescriptlang.org"},{"key":"e_1_2_2_21_1","doi-asserted-by":"publisher","DOI":"10.1145\/3276482"},{"key":"e_1_2_2_22_1","doi-asserted-by":"publisher","DOI":"10.4230\/LIPIcs.ECOOP.2020.29"},{"key":"e_1_2_2_23_1","volume-title":"Sound and Complete Flow Typing with Unions, Intersections and Negations","author":"Pearce David J."},{"key":"e_1_2_2_25_1","doi-asserted-by":"publisher","DOI":"10.1184\/R1\/6587339.v1"},{"key":"e_1_2_2_26_1","unstructured":"Redhat. 2011. Ceylon. https:\/\/ceylon-lang.org  Redhat. 2011. Ceylon. https:\/\/ceylon-lang.org"},{"key":"e_1_2_2_27_1","volume-title":"Preliminary design of the programming language Forsythe","author":"Reynolds John C"},{"key":"e_1_2_2_28_1","volume-title":"ALGOL-like languages","author":"Reynolds John C"},{"key":"e_1_2_2_29_1","doi-asserted-by":"publisher","DOI":"10.1007\/BF00650498"},{"key":"e_1_2_2_30_1","doi-asserted-by":"publisher","DOI":"10.1145\/1291220.1291155"},{"key":"e_1_2_2_32_1","unstructured":"The Scala Center team and community contributors. 2020. Scala 3. https:\/\/dotty.epfl.ch  The Scala Center team and community contributors. 2020. Scala 3. https:\/\/dotty.epfl.ch"},{"key":"e_1_2_2_33_1","volume-title":"Liguoro, and Yoko Motohama.","author":"van Bakel Steffen","year":"2000"},{"key":"e_1_2_2_34_1","doi-asserted-by":"publisher","DOI":"10.1023\/A:1005212701420"},{"key":"e_1_2_2_35_1","doi-asserted-by":"publisher","DOI":"10.1145\/3276483"}],"container-title":["Proceedings of the ACM on Programming Languages"],"original-title":[],"language":"en","link":[{"URL":"https:\/\/dl.acm.org\/doi\/10.1145\/3473594","content-type":"unspecified","content-version":"vor","intended-application":"text-mining"},{"URL":"https:\/\/dl.acm.org\/doi\/pdf\/10.1145\/3473594","content-type":"unspecified","content-version":"vor","intended-application":"similarity-checking"}],"deposited":{"date-parts":[[2025,6,17]],"date-time":"2025-06-17T17:28:16Z","timestamp":1750181296000},"score":1,"resource":{"primary":{"URL":"https:\/\/dl.acm.org\/doi\/10.1145\/3473594"}},"subtitle":[],"short-title":[],"issued":{"date-parts":[[2021,8,19]]},"references-count":32,"journal-issue":{"issue":"ICFP","published-print":{"date-parts":[[2021,8,22]]}},"alternative-id":["10.1145\/3473594"],"URL":"https:\/\/doi.org\/10.1145\/3473594","relation":{},"ISSN":["2475-1421"],"issn-type":[{"value":"2475-1421","type":"electronic"}],"subject":[],"published":{"date-parts":[[2021,8,19]]},"assertion":[{"value":"2021-08-19","order":2,"name":"published","label":"Published","group":{"name":"publication_history","label":"Publication History"}}]}}