{"status":"ok","message-type":"work","message-version":"1.0.0","message":{"indexed":{"date-parts":[[2026,9,16]],"date-time":"2026-09-16T08:29:58Z","timestamp":1789547398949,"version":"build-2803163510"},"reference-count":53,"publisher":"Association for Computing Machinery (ACM)","issue":"POPL","license":[{"start":{"date-parts":[[2026,1,8]],"date-time":"2026-01-08T00:00:00Z","timestamp":1767830400000},"content-version":"vor","delay-in-days":0,"URL":"https:\/\/creativecommons.org\/licenses\/by\/4.0\/legalcode"}],"funder":[{"name":"Hong Kong Research Grant Council","award":["17213525"],"award-info":[{"award-number":["17213525"]}]}],"content-domain":{"domain":["dl.acm.org"],"crossmark-restriction":true},"short-container-title":["Proc. ACM Program. Lang."],"published-print":{"date-parts":[[2026,1,8]]},"abstract":"<jats:p>Type inference is essential for programming languages, yet complete and global inference quickly becomes undecidable in the presence of rich type systems like System F. Pierce and Turner proposed local type inference (LTI) as a scalable, partially annotated alternative by relying on information local to applications. While LTI has been widely adopted in practice, there are significant gaps between theory and practice, with its theory being underdeveloped and specifications for LTI being complex and restrictive.<\/jats:p>\n                  <jats:p>\n                    We propose\n                    <jats:italic toggle=\"yes\">Local Contextual Type Inference<\/jats:italic>\n                    , a principled redesign of LTI grounded in contextual typing\u2014a recent formalism which captures type information flow. We present\n                    <jats:italic toggle=\"yes\">Contextual System F<\/jats:italic>\n                    (\n                    <jats:monospace>F<\/jats:monospace>\n                    <jats:sub>\n                      <jats:italic toggle=\"yes\">c<\/jats:italic>\n                    <\/jats:sub>\n                    ), a variant of System F with implicit and first-class polymorphism. We formalize\n                    <jats:monospace>F<\/jats:monospace>\n                    <jats:sub>\n                      <jats:italic toggle=\"yes\">c<\/jats:italic>\n                    <\/jats:sub>\n                    using a declarative type system, prove soundness, completeness, and decidability, and introduce matching subtyping as a bridge between declarative and algorithmic inference. This work offers the first mechanized treatment of LTI, while at the same time removing important practical restrictions and also demonstrating the power of contextual typing in designing robust, extensible and simple to implement type inference algorithms.\n                  <\/jats:p>","DOI":"10.1145\/3776653","type":"journal-article","created":{"date-parts":[[2026,1,8]],"date-time":"2026-01-08T18:59:43Z","timestamp":1767898783000},"page":"294-323","update-policy":"https:\/\/doi.org\/10.1145\/crossmark-policy","source":"Crossref","is-referenced-by-count":1,"title":["Local Contextual Type Inference"],"prefix":"10.1145","volume":"10","author":[{"ORCID":"https:\/\/orcid.org\/0009-0008-2165-3330","authenticated-orcid":false,"given":"Xu","family":"Xue","sequence":"first","affiliation":[{"name":"University of Hong Kong, Hong Kong, China"}],"role":[{"vocabulary":"crossref","role":"author"}]},{"ORCID":"https:\/\/orcid.org\/0009-0002-8351-2679","authenticated-orcid":false,"given":"Chen","family":"Cui","sequence":"additional","affiliation":[{"name":"University of Hong Kong, Hong Kong, China"}],"role":[{"vocabulary":"crossref","role":"author"}]},{"ORCID":"https:\/\/orcid.org\/0000-0002-4443-0753","authenticated-orcid":false,"given":"Shengyi","family":"Jiang","sequence":"additional","affiliation":[{"name":"University of Hong Kong, Hong Kong, China"}],"role":[{"vocabulary":"crossref","role":"author"}]},{"ORCID":"https:\/\/orcid.org\/0000-0002-1846-7210","authenticated-orcid":false,"given":"Bruno C. d. S.","family":"Oliveira","sequence":"additional","affiliation":[{"name":"University of Hong Kong, Hong Kong, China"}],"role":[{"vocabulary":"crossref","role":"author"}]}],"member":"320","published-online":{"date-parts":[[2026,1,8]]},"reference":[{"key":"e_1_3_2_2_1","doi-asserted-by":"publisher","DOI":"10.1006\/inco.1995.1086"},{"key":"e_1_3_2_3_1","doi-asserted-by":"publisher","DOI":"10.2307\/2273659"},{"key":"e_1_3_2_4_1","doi-asserted-by":"publisher","DOI":"10.4230\/LIPICS.ITP.2023.8"},{"key":"e_1_3_2_5_1","doi-asserted-by":"publisher","DOI":"10.1145\/944705.944709"},{"key":"e_1_3_2_6_1","doi-asserted-by":"publisher","DOI":"10.1016\/S0747-7171(89)80057-4"},{"key":"e_1_3_2_7_1","doi-asserted-by":"publisher","DOI":"10.5555\/648227.751955"},{"key":"e_1_3_2_8_1","doi-asserted-by":"publisher","DOI":"10.1007\/BFb0055784"},{"key":"e_1_3_2_9_1","doi-asserted-by":"publisher","DOI":"10.1017\/S0960129500070043"},{"key":"e_1_3_2_10_1","doi-asserted-by":"crossref","unstructured":"Mario Coppo and Mariangiola Dezani-Ciancaglini. 1978. A new type assignment for \u03bb-terms. 19 (01 1978) 139\u2013156.","DOI":"10.1007\/BF02011875"},{"key":"e_1_3_2_11_1","doi-asserted-by":"publisher","DOI":"10.1145\/3622871"},{"key":"e_1_3_2_12_1","doi-asserted-by":"publisher","DOI":"10.1145\/3009837.3009882"},{"key":"e_1_3_2_13_1","doi-asserted-by":"publisher","DOI":"10.1007\/978-3-642-38946-7_11"},{"key":"e_1_3_2_14_1","unstructured":"Andrej Dudenhefner Moritz Martens and Jakob Rehof. 2016. The Intersection Type Unification Problem. In 1st International Conference on Formal Structures for Computation and Deduction (FSCD 2016) (Leibniz International Proceedings in Informatics (LIPIcs) Vol. 52). 19:1\u201319:16."},{"key":"e_1_3_2_15_1","doi-asserted-by":"publisher","DOI":"10.1145\/3450952"},{"key":"e_1_3_2_16_1","doi-asserted-by":"publisher","DOI":"10.1145\/2500365.2500582"},{"key":"e_1_3_2_17_1","doi-asserted-by":"publisher","DOI":"10.1145\/3385412.3386003"},{"key":"e_1_3_2_18_1","doi-asserted-by":"publisher","DOI":"10.1006\/INCO.1999.2830"},{"key":"e_1_3_2_19_1","unstructured":"Jean-Yves Girard. 1972. Interpr\u00e9tation fonctionnelle et \u00e9limination des coupures de l\u2019arithm\u00e9tique d\u2019ordre sup\u00e9rieur. (1972)."},{"key":"e_1_3_2_20_1","unstructured":"Jacques Herbrand. 1930. Recherches sur la th\u00e9orie de la d\u00e9monstration. http:\/\/eudml.org\/doc\/192791"},{"key":"e_1_3_2_21_1","unstructured":"Haruo Hosoya and Benjamin Pierce. 1999. How Good is Local Type Inference? (07 1999)."},{"key":"e_1_3_2_22_1","unstructured":"G\u00e9rard P. Huet. 1976. Resolution d\u2019Equations dans des Langages d\u2019Order 1 2. \u03c9. PhD thesis Universite de Paris VII (1976). https:\/\/cir.nii.ac.jp\/crid\/1571980074398472192"},{"key":"e_1_3_2_23_1","doi-asserted-by":"publisher","DOI":"10.1145\/3310232.3310233"},{"key":"e_1_3_2_24_1","doi-asserted-by":"publisher","DOI":"10.1145\/3704907"},{"key":"e_1_3_2_25_1","doi-asserted-by":"publisher","DOI":"10.1017\/S0956796806006034"},{"key":"e_1_3_2_26_1","doi-asserted-by":"publisher","DOI":"10.1145\/1411204.1411245"},{"key":"e_1_3_2_27_1","doi-asserted-by":"publisher","DOI":"10.1145\/1480881.1480891"},{"key":"e_1_3_2_28_1","volume-title":"Call-by-push-value","author":"Levy Paul Blain","year":"2001","unstructured":"Paul Blain Levy. 2001. Call-by-push-value. Ph. D. Dissertation. Queen Mary University of London, UK. https:\/\/ethos.bl.uk\/OrderDetails.do?uin=uk.bl.ethos.369233"},{"key":"e_1_3_2_29_1","doi-asserted-by":"publisher","DOI":"10.1016\/S0019-9958(86)80019-5"},{"key":"e_1_3_2_30_1","doi-asserted-by":"publisher","unstructured":"Henry Mercer Cameron Ramsay and Neel Krishnaswami. 2022. Implicit Polarized F: local type inference for impredicativity. CoRR abs\/2203.01835. arXiv:2203.01835 doi:10.48550\/ARXIV.2203.01835","DOI":"10.48550\/ARXIV.2203.01835"},{"key":"e_1_3_2_31_1","doi-asserted-by":"publisher","DOI":"10.1016\/0022-0000(78)90014-4"},{"key":"e_1_3_2_32_1","doi-asserted-by":"publisher","DOI":"10.1016\/0890-5401(88)90009-0"},{"key":"e_1_3_2_33_1","doi-asserted-by":"publisher","DOI":"10.1145\/237721.237729"},{"key":"e_1_3_2_34_1","doi-asserted-by":"publisher","DOI":"10.1145\/360204.360207"},{"key":"e_1_3_2_35_1","doi-asserted-by":"publisher","DOI":"10.1145\/3409006"},{"key":"e_1_3_2_36_1","doi-asserted-by":"publisher","DOI":"10.1145\/3632890"},{"key":"e_1_3_2_37_1","volume-title":"Programming with intersection types, union types, and polymorphism","author":"Pierce Benjamin C.","year":"1991","unstructured":"Benjamin C. Pierce. 1991. Programming with intersection types, union types, and polymorphism. Technical Report CMU-CS-91-106. Carnegie Mellon University."},{"key":"e_1_3_2_38_1","doi-asserted-by":"publisher","DOI":"10.1145\/345099.345100"},{"key":"e_1_3_2_39_1","doi-asserted-by":"publisher","DOI":"10.5075\/EPFL-THESIS-6741"},{"key":"e_1_3_2_40_1","unstructured":"Garrel Pottinger. 1980. A type assignment for the strongly normalizable \u03bb-terms. To HB Curry: essays on combinatory logic lambda calculus and formalism (1980) 561\u2013577."},{"key":"e_1_3_2_41_1","doi-asserted-by":"publisher","DOI":"10.1007\/3-540-06859-7_148"},{"key":"e_1_3_2_42_1","doi-asserted-by":"publisher","DOI":"10.1007\/3-540-54415-1_70"},{"key":"e_1_3_2_43_1","doi-asserted-by":"publisher","DOI":"10.1145\/321250.321253"},{"key":"e_1_3_2_44_1","doi-asserted-by":"publisher","DOI":"10.1145\/3408971"},{"key":"e_1_3_2_45_1","doi-asserted-by":"publisher","DOI":"10.1145\/3192366.3192389"},{"issue":"3","key":"e_1_3_2_46_1","article-title":"Decidability of higher-order matching","volume":"5","author":"Stirling Colin","year":"2009","unstructured":"Colin Stirling. 2009. Decidability of higher-order matching. Log. Methods Comput. Sci. 5, 3 (2009). http:\/\/arxiv.org\/abs\/0907.3804","journal-title":"Log. Methods Comput. Sci."},{"key":"e_1_3_2_47_1","doi-asserted-by":"publisher","DOI":"10.1145\/503272.503292"},{"key":"e_1_3_2_48_1","unstructured":"Jerzy Tiuryn and Pawel Urzyczyn. 1996. The subtyping problem for second-order types is undecidable. In Proceedings 11th Annual IEEE Symposium on Logic in Computer Science."},{"key":"e_1_3_2_49_1","doi-asserted-by":"publisher","DOI":"10.1145\/1159803.1159838"},{"key":"e_1_3_2_50_1","doi-asserted-by":"publisher","DOI":"10.1145\/1411204.1411246"},{"key":"e_1_3_2_51_1","doi-asserted-by":"publisher","DOI":"10.1007\/978-3-319-89884-1_10"},{"key":"e_1_3_2_52_1","doi-asserted-by":"publisher","unstructured":"Xu Xue Chen Cui Shengyi Jiang and Bruno C. d. S. Oliveira. 2025. Local Contextual Type Inference (Artifact). doi:10.5281\/zenodo.17491013","DOI":"10.5281\/zenodo.17491013"},{"key":"e_1_3_2_53_1","doi-asserted-by":"publisher","DOI":"10.1145\/3674655"},{"key":"e_1_3_2_54_1","doi-asserted-by":"publisher","DOI":"10.4230\/LIPICS.ECOOP.2022.2"}],"container-title":["Proceedings of the ACM on Programming Languages"],"original-title":[],"language":"en","link":[{"URL":"https:\/\/dl.acm.org\/doi\/pdf\/10.1145\/3776653","content-type":"unspecified","content-version":"vor","intended-application":"similarity-checking"}],"deposited":{"date-parts":[[2026,7,16]],"date-time":"2026-07-16T13:40:38Z","timestamp":1784209238000},"score":1,"resource":{"primary":{"URL":"https:\/\/dl.acm.org\/doi\/10.1145\/3776653"}},"subtitle":[],"short-title":[],"issued":{"date-parts":[[2026,1,8]]},"references-count":53,"journal-issue":{"issue":"POPL","published-print":{"date-parts":[[2026,1,8]]}},"alternative-id":["10.1145\/3776653"],"URL":"https:\/\/doi.org\/10.1145\/3776653","relation":{},"ISSN":["2475-1421"],"issn-type":[{"value":"2475-1421","type":"electronic"}],"subject":[],"published":{"date-parts":[[2026,1,8]]},"assertion":[{"value":"2025-07-10","order":0,"name":"received","label":"Received","group":{"name":"publication_history","label":"Publication History"}},{"value":"2025-11-06","order":2,"name":"accepted","label":"Accepted","group":{"name":"publication_history","label":"Publication History"}},{"value":"2026-01-08","order":3,"name":"published","label":"Published","group":{"name":"publication_history","label":"Publication History"}}]}}