{"status":"ok","message-type":"work","message-version":"1.0.0","message":{"indexed":{"date-parts":[[2026,9,22]],"date-time":"2026-09-22T21:40:06Z","timestamp":1790113206388,"version":"4.0.1"},"reference-count":29,"publisher":"Association for Computing Machinery (ACM)","issue":"PLDI","license":[{"start":{"date-parts":[[2026,6,8]],"date-time":"2026-06-08T00:00:00Z","timestamp":1780876800000},"content-version":"vor","delay-in-days":0,"URL":"https:\/\/creativecommons.org\/licenses\/by\/4.0\/legalcode"}],"funder":[{"name":"ERC Starting Grant","award":["101222524"],"award-info":[{"award-number":["101222524"]}]},{"name":"Hong Kong PhD Fellowship Scheme","award":["PF22-74914"],"award-info":[{"award-number":["PF22-74914"]}]},{"name":"Hong Kong PhD Fellowship Scheme","award":["PF23-86537"],"award-info":[{"award-number":["PF23-86537"]}]},{"name":"Hong Kong PhD Fellowship Scheme","award":["PF21-60537"],"award-info":[{"award-number":["PF21-60537"]}]}],"content-domain":{"domain":["dl.acm.org"],"crossmark-restriction":true},"short-container-title":["Proc. ACM Program. Lang."],"published-print":{"date-parts":[[2026,6,8]]},"abstract":"<jats:p>\n                    Binary size reduction is an increasingly important optimization objective for compilers, especially in the context of mobile applications and resource-constrained embedded devices. In such domains, binary size often takes precedence over compilation time. One emerging technique that has been shown effective is\n                    <jats:italic toggle=\"yes\">function merging<\/jats:italic>\n                    , where multiple similar functions are merged into one, thereby eliminating redundancy. The state-of-the-art approach to perform the merging, due to Rocha et al. [CGO 2019, PLDI 2020], is based on\n                    <jats:italic toggle=\"yes\">sequence alignment<\/jats:italic>\n                    , where functions are viewed as\n                    <jats:italic toggle=\"yes\">linear<\/jats:italic>\n                    sequences of instructions that are then matched in a way maximizing their alignment.\n                  <\/jats:p>\n                  <jats:p>\n                    In this paper, we consider a significantly generalized formulation of the problem by allowing\n                    <jats:italic toggle=\"yes\">reordering of branches<\/jats:italic>\n                    within each function, subsequently allowing for more flexible matching and better merging. We show that this makes the problem\n                    <jats:bold>\n                      <jats:italic toggle=\"yes\">NP<\/jats:italic>\n                    <\/jats:bold>\n                    -hard, and thus we study it through the lens of\n                    <jats:italic toggle=\"yes\">parameterized algorithms and complexity<\/jats:italic>\n                    , where we identify certain parameters of the input that govern its complexity. We look at two natural parameters: the\n                    <jats:italic toggle=\"yes\">branching factor<\/jats:italic>\n                    and\n                    <jats:italic toggle=\"yes\">nesting depth<\/jats:italic>\n                    of input functions.\n                  <\/jats:p>\n                  <jats:p>\n                    Concretely, our input consists of two functions\n                    <jats:monospace>F<\/jats:monospace>\n                    <jats:sub>1<\/jats:sub>\n                    ,\n                    <jats:monospace>F<\/jats:monospace>\n                    <jats:sub>2<\/jats:sub>\n                    , where each\n                    <jats:monospace>F<\/jats:monospace>\n                    <jats:sub>\n                      <jats:italic toggle=\"yes\">i<\/jats:italic>\n                    <\/jats:sub>\n                    has size\n                    <jats:italic toggle=\"yes\">\n                      n\n                      <jats:sub>i<\/jats:sub>\n                    <\/jats:italic>\n                    , branching factor\n                    <jats:italic toggle=\"yes\">\n                      b\n                      <jats:sub>i<\/jats:sub>\n                    <\/jats:italic>\n                    , and nesting depth\n                    <jats:italic toggle=\"yes\">\n                      d\n                      <jats:sub>i<\/jats:sub>\n                    <\/jats:italic>\n                    . Our task is to reorder the branches of\n                    <jats:monospace>F<\/jats:monospace>\n                    <jats:sub>1<\/jats:sub>\n                    and\n                    <jats:monospace>F<\/jats:monospace>\n                    <jats:sub>2<\/jats:sub>\n                    in a way that yields linearizations achieving the maximum sequence alignment. Let\n                    <jats:italic toggle=\"yes\">n<\/jats:italic>\n                    = max(\n                    <jats:italic toggle=\"yes\">n<\/jats:italic>\n                    <jats:sub>1<\/jats:sub>\n                    ,\n                    <jats:italic toggle=\"yes\">n<\/jats:italic>\n                    <jats:sub>2<\/jats:sub>\n                    ), and define\n                    <jats:italic toggle=\"yes\">b, d<\/jats:italic>\n                    similarly. Our results are as follows:\n                  <\/jats:p>\n                  <jats:p>To the best of our knowledge, this is the first systematic study of function merging with branch reordering from an algorithmic or complexity-theoretic perspective.<\/jats:p>","DOI":"10.1145\/3808282","type":"journal-article","created":{"date-parts":[[2026,6,8]],"date-time":"2026-06-08T18:04:09Z","timestamp":1780941849000},"page":"881-903","update-policy":"https:\/\/doi.org\/10.1145\/crossmark-policy","source":"Crossref","is-referenced-by-count":1,"title":["Parameterized Algorithms and Complexity for Function Merging with Branch Reordering"],"prefix":"10.1145","volume":"10","author":[{"ORCID":"https:\/\/orcid.org\/0000-0003-1702-6584","authenticated-orcid":false,"given":"Amir K.","family":"Goharshady","sequence":"first","affiliation":[{"name":"University of Oxford, Oxford, United Kingdom"}],"role":[{"vocabulary":"crossref","role":"author"}]},{"ORCID":"https:\/\/orcid.org\/0009-0000-8255-1831","authenticated-orcid":false,"given":"Kerim","family":"Kochekov","sequence":"additional","affiliation":[{"name":"Hong Kong University of Science and Technology, Hong Kong, Hong Kong"}],"role":[{"vocabulary":"crossref","role":"author"}]},{"ORCID":"https:\/\/orcid.org\/0009-0004-5649-9469","authenticated-orcid":false,"given":"Tian","family":"Shu","sequence":"additional","affiliation":[{"name":"Hong Kong University of Science and Technology, Hong Kong, Hong Kong"}],"role":[{"vocabulary":"crossref","role":"author"}]},{"ORCID":"https:\/\/orcid.org\/0000-0001-5894-7991","authenticated-orcid":false,"given":"Ahmed Khaled","family":"Zaher","sequence":"additional","affiliation":[{"name":"Hong Kong University of Science and Technology, Hong Kong, Hong Kong"}],"role":[{"vocabulary":"crossref","role":"author"}]}],"member":"320","published-online":{"date-parts":[[2026,6,8]]},"reference":[{"key":"e_1_3_1_2_2","doi-asserted-by":"publisher","DOI":"10.1109\/FOCS.2015.14"},{"key":"e_1_3_1_3_2","doi-asserted-by":"publisher","DOI":"10.1145\/800028.808479"},{"key":"e_1_3_1_4_2","doi-asserted-by":"publisher","DOI":"10.1109\/FOCS.2015.15"},{"key":"e_1_3_1_5_2","doi-asserted-by":"publisher","DOI":"10.1109\/CGO51591.2021.9370306"},{"key":"e_1_3_1_6_2","volume-title":"Introduction to Algorithms","author":"Cormen Thomas H.","year":"2009","unstructured":"Thomas H. Cormen, Charles E. Leiserson, Ronald L. Rivest, and Clifford Stein. 2009. Introduction to Algorithms, 3rd Edition. MIT Press.","edition":"3"},{"key":"e_1_3_1_7_2","doi-asserted-by":"publisher","DOI":"10.1109\/PACT.2011.63"},{"key":"e_1_3_1_8_2","doi-asserted-by":"publisher","DOI":"10.1007\/978-3-319-21275-3"},{"key":"e_1_3_1_9_2","doi-asserted-by":"publisher","DOI":"10.1007\/978-1-4612-0515-9"},{"key":"e_1_3_1_10_2","doi-asserted-by":"publisher","DOI":"10.1145\/3696443.3708935"},{"key":"e_1_3_1_11_2","volume-title":"Computers and Intractability: A Guide to the Theory of NP-Completeness","author":"Garey M. R.","year":"1979","unstructured":"M. R. Garey and David S. Johnson. 1979. Computers and Intractability: A Guide to the Theory of NP-Completeness. W. H. Freeman."},{"key":"e_1_3_1_12_2","doi-asserted-by":"publisher","DOI":"10.1145\/3519941.3535072"},{"key":"e_1_3_1_13_2","doi-asserted-by":"crossref","unstructured":"Amir K. Goharshady Kerim Kochekov Tian Shu and Ahmed Khaled Zaher. 2026. Parameterized Algorithms and Complexity for Function Merging with Branch Reordering. arXiv:2604.11027 [cs.PL] https:\/\/arxiv.org\/abs\/2604.11027","DOI":"10.1145\/3808282"},{"key":"e_1_3_1_14_2","unstructured":"Google. 2025. Android Developers - Reduce your app size. Technical Report. https:\/\/developer.android.com\/topic\/performance\/reduce-apk-size"},{"key":"e_1_3_1_15_2","doi-asserted-by":"publisher","DOI":"10.1145\/3660635"},{"key":"e_1_3_1_16_2","volume-title":"An introduction to bioinformatics algorithms","author":"Jones Neil C","year":"2004","unstructured":"Neil C Jones and Pavel A Pevzner. 2004. An introduction to bioinformatics algorithms. MIT press."},{"key":"e_1_3_1_17_2","first-page":"243","volume-title":"CC","author":"Lee Kyungwoo","year":"2022","unstructured":"Kyungwoo Lee, Ellis Hoag, and Nikolai Tillmann. 2022. Efficient profile-guided size optimization for native mobile applications. In CC. ACM, 243\u2013253."},{"key":"e_1_3_1_18_2","doi-asserted-by":"publisher","DOI":"10.1145\/3652032.3657575"},{"key":"e_1_3_1_19_2","doi-asserted-by":"publisher","DOI":"10.1145\/3519941.3535074"},{"key":"e_1_3_1_20_2","first-page":"168","volume-title":"CC","author":"Liu Gai","year":"2023","unstructured":"Gai Liu, Umar Farooq, Chengyan Zhao, Xia Liu, and Nian Sun. 2023. Linker Code Size Optimization for Native Mobile Applications. In CC. ACM, 168\u2013179."},{"key":"e_1_3_1_21_2","doi-asserted-by":"publisher","DOI":"10.1016\/j.scico.2005.02.009"},{"key":"e_1_3_1_22_2","doi-asserted-by":"publisher","DOI":"10.1109\/CGO53902.2022.9741256"},{"key":"e_1_3_1_23_2","doi-asserted-by":"publisher","DOI":"10.1145\/3461648.3463852"},{"key":"e_1_3_1_24_2","doi-asserted-by":"publisher","DOI":"10.1109\/CGO.2019.8661174"},{"key":"e_1_3_1_25_2","doi-asserted-by":"publisher","DOI":"10.1145\/3385412.3386030"},{"key":"e_1_3_1_26_2","first-page":"156","volume-title":"CC","author":"Rocha Rodrigo C. O.","year":"2023","unstructured":"Rodrigo C. O. Rocha, Charitha Saumya, Kirshanthan Sundararajah, Pavlos Petoumenos, Milind Kulkarni, and Michael F. P. O\u2019Boyle. 2023. HyBF: A Hybrid Branch Fusion Strategy for Code Size Reduction. In CC. ACM, 156\u2013167."},{"key":"e_1_3_1_27_2","doi-asserted-by":"publisher","DOI":"10.1145\/3702000"},{"key":"e_1_3_1_28_2","doi-asserted-by":"publisher","DOI":"10.1109\/MCOM.2012.6384464"},{"key":"e_1_3_1_29_2","doi-asserted-by":"publisher","DOI":"10.1109\/CGO53902.2022.9741269"},{"key":"e_1_3_1_30_2","doi-asserted-by":"publisher","DOI":"10.1145\/2597809.2597811"}],"container-title":["Proceedings of the ACM on Programming Languages"],"original-title":[],"language":"en","link":[{"URL":"https:\/\/dl.acm.org\/doi\/pdf\/10.1145\/3808282","content-type":"unspecified","content-version":"vor","intended-application":"similarity-checking"}],"deposited":{"date-parts":[[2026,9,22]],"date-time":"2026-09-22T10:50:41Z","timestamp":1790074241000},"score":1,"resource":{"primary":{"URL":"https:\/\/dl.acm.org\/doi\/10.1145\/3808282"}},"subtitle":[],"short-title":[],"issued":{"date-parts":[[2026,6,8]]},"references-count":29,"journal-issue":{"issue":"PLDI","published-print":{"date-parts":[[2026,6,8]]}},"alternative-id":["10.1145\/3808282"],"URL":"https:\/\/doi.org\/10.1145\/3808282","relation":{},"ISSN":["2475-1421"],"issn-type":[{"value":"2475-1421","type":"electronic"}],"subject":[],"published":{"date-parts":[[2026,6,8]]},"assertion":[{"value":"2025-11-12","order":0,"name":"received","label":"Received","group":{"name":"publication_history","label":"Publication History"}},{"value":"2026-04-03","order":2,"name":"accepted","label":"Accepted","group":{"name":"publication_history","label":"Publication History"}},{"value":"2026-06-08","order":3,"name":"published","label":"Published","group":{"name":"publication_history","label":"Publication History"}}]}}