{"status":"ok","message-type":"work","message-version":"1.0.0","message":{"indexed":{"date-parts":[[2026,11,19]],"date-time":"2026-11-19T18:04:42Z","timestamp":1795111482406,"version":"4.10.3"},"reference-count":48,"publisher":"Association for Computing Machinery (ACM)","issue":"PLDI","license":[{"start":{"date-parts":[[2023,6,6]],"date-time":"2023-06-06T00:00:00Z","timestamp":1686009600000},"content-version":"vor","delay-in-days":0,"URL":"https:\/\/creativecommons.org\/licenses\/by\/4.0\/"}],"content-domain":{"domain":["dl.acm.org"],"crossmark-restriction":true},"short-container-title":["Proc. ACM Program. Lang."],"published-print":{"date-parts":[[2023,6,6]]},"abstract":"<jats:p>Regular expression inference (REI) is a supervised machine learning and program synthesis problem that takes a cost metric for regular expressions, and positive and negative examples of strings as input. It outputs a regular expression that is precise (i.e., accepts all positive and rejects all negative examples), and minimal w.r.t. to the cost metric. We present a novel algorithm for REI over arbitrary alphabets that is enumerative and trades off time for space. Our main algorithmic idea is to implement the search space of regular expressions succinctly as a contiguous matrix of bitvectors. Collectively, the bitvectors represent, as characteristic sequences, all sub-languages of the infix-closure of the union of positive and negative examples. Mathematically, this is a semiring of (a variant of) formal power series. Infix-closure enables bottom-up compositional construction of larger from smaller regular expressions using the operations of our semiring. This minimises data movement and data-dependent branching, hence maximises data-parallelism. In addition, the infix-closure remains unchanged during the search, hence search can be staged: first pre-compute various expensive operations, and then run the compute intensive search process. We provide two C++ implementations, one for general purpose CPUs and one for Nvidia GPUs (using CUDA). We benchmark both on Google Colab Pro: the GPU implementation is on average over 1000x faster than the CPU implementation on the hardest benchmarks.<\/jats:p>","DOI":"10.1145\/3591274","type":"journal-article","created":{"date-parts":[[2023,6,6]],"date-time":"2023-06-06T16:06:24Z","timestamp":1686067584000},"page":"1317-1339","update-policy":"https:\/\/doi.org\/10.1145\/crossmark-policy","source":"Crossref","is-referenced-by-count":13,"title":["Search-Based Regular Expression Inference on a GPU"],"prefix":"10.1145","volume":"7","author":[{"ORCID":"https:\/\/orcid.org\/0000-0003-1582-3213","authenticated-orcid":false,"given":"Mojtaba","family":"Valizadeh","sequence":"first","affiliation":[{"name":"University of Sussex, UK"}],"role":[{"vocabulary":"crossref","role":"author"}]},{"ORCID":"https:\/\/orcid.org\/0000-0003-3239-5812","authenticated-orcid":false,"given":"Martin","family":"Berger","sequence":"additional","affiliation":[{"name":"Montanarius, UK \/ Huawei, UK \/ University of Sussex, UK"}],"role":[{"vocabulary":"crossref","role":"author"}]}],"member":"320","published-online":{"date-parts":[[2023,6,6]]},"reference":[{"key":"e_1_2_1_1_1","doi-asserted-by":"publisher","DOI":"10.1016\/0890-5401(87)90052-6"},{"key":"e_1_2_1_2_1","doi-asserted-by":"publisher","DOI":"10.1145\/1168917.1168906"},{"key":"e_1_2_1_3_1","doi-asserted-by":"publisher","DOI":"10.1145\/3133876"},{"key":"e_1_2_1_4_1","doi-asserted-by":"publisher","DOI":"10.1109\/MC.2014.344"},{"key":"e_1_2_1_5_1","doi-asserted-by":"publisher","DOI":"10.1109\/TKDE.2016.2515587"},{"key":"e_1_2_1_6_1","volume-title":"Rational Series and Their Languages","author":"Berstel Jean","year":"1862","unstructured":"Jean Berstel and Christophe Reutenauer . 1988. Rational Series and Their Languages . Springer-Verlag , Berlin, Heidelberg . isbn:0387 1862 63 Jean Berstel and Christophe Reutenauer. 1988. Rational Series and Their Languages. Springer-Verlag, Berlin, Heidelberg. isbn:0387186263"},{"key":"e_1_2_1_7_1","doi-asserted-by":"publisher","DOI":"10.1145\/1735886.1735890"},{"key":"e_1_2_1_8_1","unstructured":"C++ Standards Committee. 2022. C++ Standard Library: std::unordered_set. https:\/\/en.cppreference.com\/w\/cpp\/container\/unordered_set C++ Standards Committee. 2022. C++ Standard Library: std::unordered_set. https:\/\/en.cppreference.com\/w\/cpp\/container\/unordered_set"},{"key":"e_1_2_1_9_1","doi-asserted-by":"publisher","DOI":"10.1145\/1880153.1880157"},{"key":"e_1_2_1_10_1","doi-asserted-by":"publisher","DOI":"10.1145\/3361682"},{"key":"e_1_2_1_11_1","volume-title":"The Benchmark Lottery. ArXiv, abs\/2107.07002","author":"Dehghani Mostafa","year":"2021","unstructured":"Mostafa Dehghani , Yi Tay , Alexey A. Gritsenko , Zhe Zhao , Neil Houlsby , Fernando Diaz , Donald Metzler , and Oriol Vinyals . 2021. The Benchmark Lottery. ArXiv, abs\/2107.07002 ( 2021 ). Mostafa Dehghani, Yi Tay, Alexey A. Gritsenko, Zhe Zhao, Neil Houlsby, Fernando Diaz, Donald Metzler, and Oriol Vinyals. 2021. The Benchmark Lottery. ArXiv, abs\/2107.07002 (2021)."},{"key":"e_1_2_1_12_1","doi-asserted-by":"publisher","DOI":"10.1007\/978-3-642-01492-5_1"},{"key":"e_1_2_1_13_1","doi-asserted-by":"publisher","DOI":"10.1145\/2737924.2737977"},{"key":"e_1_2_1_14_1","unstructured":"Kathi Fisler Shriram Krishnamurthi Benjamin S. Lerner and Joe Gibbs Politz. 2022. A Data-Centric Introduction to Computing. https:\/\/dcic-world.org\/ Kathi Fisler Shriram Krishnamurthi Benjamin S. Lerner and Joe Gibbs Politz. 2022. A Data-Centric Introduction to Computing. https:\/\/dcic-world.org\/"},{"key":"e_1_2_1_15_1","volume-title":"Semirings and their applications","author":"Golan Jonathan S.","unstructured":"Jonathan S. Golan . 1999. Semirings and their applications . Springer-Verlag . Jonathan S. Golan. 1999. Semirings and their applications. Springer-Verlag."},{"key":"e_1_2_1_16_1","doi-asserted-by":"publisher","DOI":"10.1016\/S0019-9958(67)91165-5"},{"key":"e_1_2_1_17_1","unstructured":"Google. 2022. Google Colaboratory. https:\/\/colab.research.google.com\/ Google. 2022. Google Colaboratory. https:\/\/colab.research.google.com\/"},{"key":"e_1_2_1_18_1","unstructured":"Brendan Gregg. 2018. Evaluating the Evaluation: A Benchmarking Checklist. https:\/\/www.brendangregg.com\/blog\/2018-06-30\/benchmarking-checklist.html Brendan Gregg. 2018. Evaluating the Evaluation: A Benchmarking Checklist. https:\/\/www.brendangregg.com\/blog\/2018-06-30\/benchmarking-checklist.html"},{"key":"e_1_2_1_19_1","doi-asserted-by":"publisher","DOI":"10.1145\/1925844.1926423"},{"key":"e_1_2_1_20_1","volume-title":"Computer Architecture: A Quantitative Approach. Morgan Kaufmann.","author":"Hennessy John","year":"2017","unstructured":"John Hennessy and David Patterson . 2017 . Computer Architecture: A Quantitative Approach. Morgan Kaufmann. John Hennessy and David Patterson. 2017. Computer Architecture: A Quantitative Approach. Morgan Kaufmann."},{"key":"e_1_2_1_21_1","doi-asserted-by":"publisher","DOI":"10.1007\/BF02430364"},{"key":"e_1_2_1_22_1","volume-title":"WARPCORE: Hashing at the speed of light on modern CUDA-accelerators. https:\/\/github.com\/sleeepyjack\/warpcore","author":"J\u00fcnger Daniel","year":"2022","unstructured":"Daniel J\u00fcnger . 2022 . WARPCORE: Hashing at the speed of light on modern CUDA-accelerators. https:\/\/github.com\/sleeepyjack\/warpcore Daniel J\u00fcnger. 2022. WARPCORE: Hashing at the speed of light on modern CUDA-accelerators. https:\/\/github.com\/sleeepyjack\/warpcore"},{"key":"e_1_2_1_23_1","doi-asserted-by":"publisher","DOI":"10.1109\/HiPC50609.2020.00015"},{"key":"e_1_2_1_24_1","doi-asserted-by":"publisher","DOI":"10.1145\/2993236.2993244"},{"key":"e_1_2_1_25_1","doi-asserted-by":"publisher","DOI":"10.1145\/3093335.2993244"},{"key":"e_1_2_1_26_1","unstructured":"Mina Lee Sunbeom So and Hakjoo Oh. 2017. Code and benchmarks for LeeM:synregefefiaa. June Available from https:\/\/github.com\/kupl\/AlphaRegexPublic Mina Lee Sunbeom So and Hakjoo Oh. 2017. Code and benchmarks for LeeM:synregefefiaa. June Available from https:\/\/github.com\/kupl\/AlphaRegexPublic"},{"key":"e_1_2_1_27_1","unstructured":"Yunyao Li Rajasekar Krishnamurthy Sriram Raghavan Shivakumar Vaithyanathan and H.V. Jagadish. 2008. Regular Expression Learning for Information Extraction. In EMNLP. Yunyao Li Rajasekar Krishnamurthy Sriram Raghavan Shivakumar Vaithyanathan and H.V. Jagadish. 2008. Regular Expression Learning for Information Extraction. In EMNLP."},{"key":"e_1_2_1_28_1","doi-asserted-by":"publisher","DOI":"10.1109\/ICSE43902.2021.00111"},{"key":"e_1_2_1_29_1","doi-asserted-by":"publisher","DOI":"10.1145\/3324884.3416556"},{"key":"e_1_2_1_30_1","doi-asserted-by":"publisher","DOI":"10.1145\/3373376.3378471"},{"key":"e_1_2_1_31_1","doi-asserted-by":"crossref","unstructured":"Nicholas Locascio Karthik Narasimhan Eduardo DeLeon Nate Kushman and Regina Barzilay. 2016. Neural Generation of Regular Expressions from Natural Language with Minimal Domain Knowledge. In EMNLP. Nicholas Locascio Karthik Narasimhan Eduardo DeLeon Nate Kushman and Regina Barzilay. 2016. Neural Generation of Regular Expressions from Natural Language with Minimal Domain Knowledge. In EMNLP.","DOI":"10.18653\/v1\/D16-1197"},{"key":"e_1_2_1_32_1","doi-asserted-by":"publisher","DOI":"10.1145\/3485496"},{"key":"e_1_2_1_33_1","doi-asserted-by":"publisher","DOI":"10.1145\/3360565"},{"key":"e_1_2_1_34_1","doi-asserted-by":"publisher","DOI":"10.18653\/v1\/D19-1677"},{"key":"e_1_2_1_35_1","doi-asserted-by":"publisher","DOI":"10.1145\/3445814.3446705"},{"key":"e_1_2_1_36_1","volume-title":"Texts and Monographs in Computer Science","author":"Salomaa Arto","unstructured":"Arto Salomaa and Matti Soittola . 1978. Automata-Theoretic Aspects of Formal Power Series . In Texts and Monographs in Computer Science . Springer-Verlag , Berlin, Heidelberg . Arto Salomaa and Matti Soittola. 1978. Automata-Theoretic Aspects of Formal Power Series. In Texts and Monographs in Computer Science. Springer-Verlag, Berlin, Heidelberg."},{"key":"e_1_2_1_37_1","doi-asserted-by":"publisher","DOI":"10.1109\/MM.2017.35"},{"key":"e_1_2_1_38_1","doi-asserted-by":"publisher","DOI":"10.1145\/2499370.2462174"},{"key":"e_1_2_1_39_1","doi-asserted-by":"crossref","unstructured":"Mojtaba Valizadeh and Martin Berger. 2023. Code and data for the PLDI 2023 paper: Search-Based Regular Expression Inference on a GPU. https:\/\/github.com\/MojtabaValizadeh\/paresy Mojtaba Valizadeh and Martin Berger. 2023. Code and data for the PLDI 2023 paper: Search-Based Regular Expression Inference on a GPU. https:\/\/github.com\/MojtabaValizadeh\/paresy","DOI":"10.1145\/3591274"},{"key":"e_1_2_1_40_1","unstructured":"Ashish Vaswani Noam Shazeer Niki Parmar Jakob Uszkoreit Llion Jones Aidan N. Gomez Lukasz Kaiser and Illia Polosukhin. 2017. Attention is All You Need. arxiv:1706.03762 Ashish Vaswani Noam Shazeer Niki Parmar Jakob Uszkoreit Llion Jones Aidan N. Gomez Lukasz Kaiser and Illia Polosukhin. 2017. Attention is All You Need. arxiv:1706.03762"},{"key":"e_1_2_1_41_1","doi-asserted-by":"publisher","DOI":"10.1145\/3022671.2984030"},{"key":"e_1_2_1_42_1","volume-title":"The Free Encyclopedia","unstructured":"Wikipedia. 2023. One-hot \u2014 Wikipedia , The Free Encyclopedia . http:\/\/en.wikipedia.org\/w\/index.php?title=One-hot&oldid=1127084325 [Online; accessed 23-March-2023] Wikipedia. 2023. One-hot \u2014 Wikipedia, The Free Encyclopedia. http:\/\/en.wikipedia.org\/w\/index.php?title=One-hot&oldid=1127084325 [Online; accessed 23-March-2023]"},{"key":"e_1_2_1_43_1","volume-title":"The Free Encyclopedia. https:\/\/en.wikipedia.org\/w\/index.php?title=Grammar_induction&oldid=1098931199 [Online","author":"Wikipedia","year":"2022","unstructured":"Wikipedia contributors. 2022. Grammar induction \u2014 Wikipedia , The Free Encyclopedia. https:\/\/en.wikipedia.org\/w\/index.php?title=Grammar_induction&oldid=1098931199 [Online ; accessed 7- November - 2022 ] Wikipedia contributors. 2022. Grammar induction \u2014 Wikipedia, The Free Encyclopedia. https:\/\/en.wikipedia.org\/w\/index.php?title=Grammar_induction&oldid=1098931199 [Online; accessed 7-November-2022]"},{"key":"e_1_2_1_44_1","volume-title":"The Free Encyclopedia. https:\/\/en.wikipedia.org\/w\/index.php?title=ReDoS&oldid=1111779206 [Online","author":"Wikipedia Wikipedia","year":"2022","unstructured":"Wikipedia contributors. 2022. ReDoS \u2014 Wikipedia , The Free Encyclopedia. https:\/\/en.wikipedia.org\/w\/index.php?title=ReDoS&oldid=1111779206 [Online ; accessed 20- October - 2022 ] Wikipedia contributors. 2022. ReDoS \u2014 Wikipedia, The Free Encyclopedia. https:\/\/en.wikipedia.org\/w\/index.php?title=ReDoS&oldid=1111779206 [Online; accessed 20-October-2022]"},{"key":"e_1_2_1_45_1","volume-title":"The Free Encyclopedia. https:\/\/en.wikipedia.org\/w\/index.php?title=Streaming_SIMD_Extensions&oldid=1109094784 [Online","author":"Wikipedia","year":"2022","unstructured":"Wikipedia contributors. 2022. Streaming SIMD Extensions \u2014 Wikipedia , The Free Encyclopedia. https:\/\/en.wikipedia.org\/w\/index.php?title=Streaming_SIMD_Extensions&oldid=1109094784 [Online ; accessed 1- November - 2022 ] Wikipedia contributors. 2022. Streaming SIMD Extensions \u2014 Wikipedia, The Free Encyclopedia. https:\/\/en.wikipedia.org\/w\/index.php?title=Streaming_SIMD_Extensions&oldid=1109094784 [Online; accessed 1-November-2022]"},{"key":"e_1_2_1_46_1","unstructured":"Holly Wilper Robert Knight and Jason Cohen. 2020. Understanding the Visualization of Overhead and Latency in NVIDIA Nsight Systems. https:\/\/developer.nvidia.com\/blog\/understanding-the-visualization-of-overhead-and-latency-in-nsight-systems\/ Holly Wilper Robert Knight and Jason Cohen. 2020. Understanding the Visualization of Overhead and Latency in NVIDIA Nsight Systems. https:\/\/developer.nvidia.com\/blog\/understanding-the-visualization-of-overhead-and-latency-in-nsight-systems\/"},{"key":"e_1_2_1_47_1","doi-asserted-by":"publisher","DOI":"10.18653\/v1\/D18-1189"},{"key":"e_1_2_1_48_1","doi-asserted-by":"publisher","DOI":"10.1145\/2370036.2145833"}],"container-title":["Proceedings of the ACM on Programming Languages"],"original-title":[],"language":"en","link":[{"URL":"https:\/\/dl.acm.org\/doi\/10.1145\/3591274","content-type":"unspecified","content-version":"vor","intended-application":"text-mining"},{"URL":"https:\/\/dl.acm.org\/doi\/pdf\/10.1145\/3591274","content-type":"unspecified","content-version":"vor","intended-application":"similarity-checking"}],"deposited":{"date-parts":[[2025,6,17]],"date-time":"2025-06-17T12:47:20Z","timestamp":1750164440000},"score":1,"resource":{"primary":{"URL":"https:\/\/dl.acm.org\/doi\/10.1145\/3591274"}},"subtitle":[],"short-title":[],"issued":{"date-parts":[[2023,6,6]]},"references-count":48,"journal-issue":{"issue":"PLDI","published-print":{"date-parts":[[2023,6,6]]}},"alternative-id":["10.1145\/3591274"],"URL":"https:\/\/doi.org\/10.1145\/3591274","relation":{},"ISSN":["2475-1421"],"issn-type":[{"value":"2475-1421","type":"electronic"}],"subject":[],"published":{"date-parts":[[2023,6,6]]},"assertion":[{"value":"2023-06-06","order":2,"name":"published","label":"Published","group":{"name":"publication_history","label":"Publication History"}}]}}