{"type":"ScholarlyArticle","title":"A Regular Matching Constraint for String Variables","authors":[{"name":"Roberto Amadini","slug":"roberto-amadini","given":"Roberto","family":"Amadini","affiliation":"University of Bologna , Bologna , Italy"},{"name":"Peter J. Stuckey","slug":"peter-j-stuckey","given":"Peter J.","family":"Stuckey","affiliation":"Monash University , Melbourne , Victoria , Australia; OPTIMA ARC Industrial Transformation and Training Centre , Melbourne , Australia"}],"abstract":"Using a regular language as a pattern for string matching is nowadays a common -and sometimes unsafe- operation, provided as a built-in feature by most programming languages. A proper constraint solver over string variables should support most of the operations over regular expressions and related constructs. However, state-of-the-art string solvers natively support only the membership relation of a string variable to a regular language. Here we take a step forward by defining a specialised propagator for the match operation, returning the leftmost position where a pattern can match a given string. Empirical evidences show the effectiveness of our approach, implemented within the constraint programming framework, and tested against state-of-the-art string solvers.","doi":"10.24963/ijcai.2023/207","url":"https://ijcai.org/proceedings/2023/207","pdf":"https://ijcai.org/proceedings/2023/0207.pdf","markdown":"https://ijcai.org/proceedings/2023/207.md","bibtex":"https://ijcai.org/proceedings/2023/bibtex/207","volume":{"slug":"2023","title":"Proceedings of the Thirty-Second International Joint Conference on Artificial Intelligence","short_title":"IJCAI 2023","url":"https://ijcai.org/proceedings/2023/","year":2023,"location":"Macao, SAR","dates":"19-25 August 2023","editors":"Edith Elkind","isbn":"978-1-956792-03-4","publisher":"International Joint Conferences on Artificial Intelligence Organization","doi_prefix":"10.24963/ijcai.2023"},"section":"Constraint Satisfaction and Optimization","track":"Main Track","number":207,"pages":{"first":1868,"last":1875},"keywords":["Constraint Satisfaction and Optimization: CSO: Constraint programming","Constraint Satisfaction and Optimization: CSO: Constraint optimization","Constraint Satisfaction and Optimization: CSO: Constraint satisfaction"],"videos":[],"references":[{"position":1,"raw":"[Amadini et al., 2018] Roberto Amadini, Graeme Gange, and Peter J. Stuckey. Propagating regular membership with dashed strings. In J. Hooker, editor, Proc. 24th Conf. Principles and Practice of Constraint Programming, vol- ume 11008 of LNCS, pages 13-29. Springer, 2018.","title":"Propagating regular membership with dashed strings","authors":"Roberto Amadini, Graeme Gange, Peter J Stuckey","year":"2018","venue":"Proc. 24th Conf. Principles and Practice of Constraint Programming","doi":null,"url":null,"internal_url":null},{"position":2,"raw":"[Amadini et al., 2020] Roberto Amadini, Graeme Gange, and Peter J. Stuckey. Dashed strings for string constraint solving. Artif. Intell., 289:103368, 2020.","title":"Dashed strings for string constraint solving","authors":"Roberto Amadini, Graeme Gange, Peter J Stuckey","year":"2020","venue":"Artif. Intell","doi":null,"url":null,"internal_url":null},{"position":3,"raw":"[Amadini, 2021] Roberto Amadini. A survey on string con- straint solving. ACM Comput. Surv., 55(1), nov 2021.","title":"A survey on string constraint solving","authors":"Roberto Amadini","year":"2021","venue":"ACM Comput. Surv","doi":null,"url":null,"internal_url":null},{"position":4,"raw":"[Barbosa et al., 2022] Haniel Barbosa, Clark W. Barrett, Martin Brain, Gereon Kremer, Hanna Lachnitt, Makai Mann, Abdalrhman Mohamed, Mudathir Mohamed, Aina Niemetz, Andres Nötzli, Alex Ozdemir, Mathias Preiner, Andrew Reynolds, Ying Sheng, Cesare Tinelli, and Yoni Zohar. cvc5: A versatile and industrial-strength SMT solver. In Dana Fisman and Grigore Rosu, editors, Tools and Algorithms for the Construction and Analysis of Sys- tems -28th International Conference, TACAS 2022, Held as Part of the European Joint Conferences on Theory and Practice of Software, ETAPS 2022, Munich, Germany, April 2-7, 2022, Proceedings, Part I, volume 13243 of Lec- ture Notes in Computer Science, pages 415-442. Springer, 2022.","title":"cvc5: A versatile and industrial-strength SMT solver","authors":"Haniel Barbosa, Clark W Barrett, Martin Brain, Gereon Kremer, Hanna Lachnitt, Makai Mann, Abdalrhman Mohamed, Mudathir Mohamed, Aina Niemetz, Andres Nötzli, Alex Ozdemir, Mathias Preiner, Andrew Reynolds, Ying Sheng, Cesare Tinelli, Yoni Zohar","year":"2022","venue":"Tools and Algorithms for the Construction and Analysis of Systems -28th International Conference, TACAS 2022, Held as Part of the European Joint Conferences on Theory and Practice of Software, ETAPS 2022","doi":null,"url":null,"internal_url":null},{"position":5,"raw":"[Barrett et al., 2010] Clark Barrett, Aaron Stump, and Ce- sare Tinelli. The SMT-LIB Standard: Version 2.0. In A. Gupta and D. Kroening, editors, Proceedings of the 8th International Workshop on Satisfiability Modulo Theories (Edinburgh, UK), 2010.","title":"The SMT-LIB Standard: Version 2.0","authors":"Clark Barrett, Aaron Stump, Cesare Tinelli","year":"2010","venue":"Proceedings of the 8th International Workshop on Satisfiability Modulo Theories","doi":null,"url":null,"internal_url":null},{"position":6,"raw":"[Berzish et al., 2017] Murphy Berzish, Vijay Ganesh, and Yunhui Zheng. Z3str3: A string solver with theory-aware heuristics. In D. Stewart and G. Weissenbacher, editors, Proc. 17th Conf. Formal Methods in Computer-Aided De- sign, pages 55-59. FMCAD Inc, 2017.","title":"Z3str3: A string solver with theory-aware heuristics","authors":"Murphy Berzish, Vijay Ganesh, Yunhui Zheng","year":"2017","venue":"Proc. 17th Conf. Formal Methods in Computer-Aided Design","doi":null,"url":null,"internal_url":null},{"position":7,"raw":"[Bultan et al., 2017] Tevfik Bultan, Fang Yu, Muath Alkha- laf, and Abdulbaki Aydin. String Analysis for Software Verification and Security. Springer, 2017.","title":"String Analysis for Software Verification and Security","authors":"Tevfik Bultan, Fang Yu, Muath Alkhalaf, Abdulbaki Aydin","year":"2017","venue":null,"doi":null,"url":null,"internal_url":null},{"position":8,"raw":"[de Moura and Bjørner, 2008] Leonardo Mendonc ¸a de Moura and Nikolaj Bjørner. Z3: an efficient SMT solver. In Tools and Algorithms for the Construction and Analysis of Systems, 14th International Conference, TACAS 2008, Held as Part of the Joint European Confer- ences on Theory and Practice of Software, ETAPS 2008, Budapest, Hungary, March 29-April 6, 2008. Proceedings, pages 337-340, 2008.","title":"Leonardo Mendonc ¸a de Moura and Nikolaj Bjørner. Z3: an efficient SMT solver","authors":"De Moura, Bjørner","year":"2008","venue":"Tools and Algorithms for the Construction and Analysis of Systems, 14th International Conference, TACAS 2008, Held as Part of the Joint European Conferences on Theory and Practice of Software, ETAPS 2008","doi":null,"url":null,"internal_url":null},{"position":9,"raw":"[Gecode Team, 2023] Gecode Team. Gecode: Generic con- straint development environment. http://www.gecode.org, 2023. Accessed: 2023-29-05.","title":"Gecode Team. Gecode: Generic constraint development environment","authors":null,"year":"2023","venue":null,"doi":null,"url":"http://www.gecode.org,2023","internal_url":null},{"position":10,"raw":"[Kieżun et al., 2012] Adam Kieżun, Vijay Ganesh, Shay Artzi, Philip J. Guo, Pieter Hooimeijer, and Michael D. Ernst. HAMPI: A solver for word equations over strings, regular expressions, and context-free grammars. ACM Trans. Software Engineering and Methodology, 21(4):ar- ticle 25, 2012.","title":"HAMPI: A solver for word equations over strings, regular expressions, and context-free grammars","authors":"Adam Kieżun, Vijay Ganesh, Shay Artzi, Philip J Guo, Pieter Hooimeijer, Michael D Ernst","year":"2012","venue":"ACM Trans. Software Engineering and Methodology","doi":null,"url":null,"internal_url":null},{"position":11,"raw":"[Li and Ghosh, 2013] Guodong Li and Indradeep Ghosh. PASS: String solving with parameterized array and inter- val automaton. In V. Bertacco and A. Legay, editors, Proc. 9th Int. Haifa Verification Conf., volume 8244 of LNCS, pages 15-31. Springer, 2013.","title":"PASS: String solving with parameterized array and interval automaton","authors":"Ghosh ; Li, Guodong Li, Indradeep Ghosh","year":"2013","venue":"Proc. 9th Int. Haifa Verification Conf","doi":null,"url":null,"internal_url":null},{"position":12,"raw":"[Nethercote et al., 2007] Nicholas Nethercote, Peter J. Stuckey, Ralph Becket, Sebastian Brand, Gregory J. Duck, and Guido Tack. MiniZinc: Towards a standard CP modelling language. In Proceedings of the 13th International Conference on Principles and Practice of Constraint Programming, volume 4741 of LNCS, pages 529-543. Springer, 2007.","title":"MiniZinc: Towards a standard CP modelling language","authors":"Nicholas Nethercote, Peter J Stuckey, Ralph Becket, Sebastian Brand, Gregory J Duck, Guido Tack","year":"2007","venue":"Proceedings of the 13th International Conference on Principles and Practice of Constraint Programming","doi":null,"url":null,"internal_url":null},{"position":13,"raw":"[Pesant, 2004] G. Pesant. A regular language membership constraint for finite sequences of variables. In M. Wallace, editor, Proceedings of the 10th International Conference on Principles and Practice of Constraint Programming, volume 3258 of LNCS, pages 482-495. Springer-Verlag, 2004.","title":"A regular language membership constraint for finite sequences of variables","authors":"G Pesant","year":"2004","venue":"Proceedings of the 10th International Conference on Principles and Practice of Constraint Programming","doi":null,"url":null,"internal_url":null},{"position":14,"raw":"[Rossi et al., 2006] F. Rossi, P. van Beek, and T. Walsh, ed- itors. Handbook of Constraint Programming. Elsevier, 2006.","title":"editors. Handbook of Constraint Programming","authors":null,"year":"2006","venue":null,"doi":null,"url":null,"internal_url":null},{"position":15,"raw":"[Saxena et al., 2010] Prateek Saxena, Devdatta Akhawe, Steve Hanna, Feng Mao, Stephen McCamant, and Dawn Song. A symbolic execution framework for JavaScript. In Proc. 2010 IEEE Symp. Security and Privacy, pages 513- 528. IEEE Comp. Soc., 2010.","title":"A symbolic execution framework for JavaScript","authors":"Prateek Saxena, Devdatta Akhawe, Steve Hanna, Feng Mao, Stephen Mccamant, Dawn Song","year":"2010","venue":"Proc. 2010 IEEE Symp. Security and Privacy","doi":null,"url":null,"internal_url":null},{"position":16,"raw":"[Scott et al., 2017] Joseph D. Scott, Pierre Flener, Justin Pearson, and Christian Schulte. Design and implemen- tation of bounded-length sequence variables. In M. Lom- bardi and D. Salvagnin, editors, Proc. 14th Int. Conf. Inte- gration of Artificial Intelligence and Operations Research Techniques in Constraint Programming, volume 10335 of LNCS, pages 51-67. Springer, 2017.","title":"Design and implementation of bounded-length sequence variables","authors":"Joseph D Scott, Pierre Flener, Justin Pearson, Christian Schulte","year":"2017","venue":"Proc. 14th Int. Conf. Integration of Artificial Intelligence and Operations Research Techniques in Constraint Programming","doi":null,"url":null,"internal_url":null},{"position":17,"raw":"[Stuckey et al., 2014] Peter J. Stuckey, Thibaut Feydy, An- dreas Schutt, Guido Tack, and Julien Fischer. The miniz- inc challenge 2008-2013. AI Magazine, (2):55-60, 2014.","title":"The minizinc challenge 2008-2013","authors":"J Peter, Thibaut Stuckey, Andreas Feydy, Guido Schutt, Julien Tack, Fischer","year":"2014","venue":"AI Magazine","doi":null,"url":null,"internal_url":null},{"position":18,"raw":"[Tateishi et al., 2013] Takaaki Tateishi, Marco Pistoia, and Omer Tripp. Path-and index-sensitive string analysis based on monadic second-order logic. ACM Trans. Soft- ware Engineering Methodology, 22(4):article 33, 2013.","title":"Path-and index-sensitive string analysis based on monadic second-order logic","authors":"Takaaki Tateishi, Marco Pistoia, Omer Tripp","year":"2013","venue":"ACM Trans. Software Engineering Methodology","doi":null,"url":null,"internal_url":null}],"license_note":"Copyright International Joint Conferences on Artificial Intelligence."}