RegexClassifier:一种基于gnn的状态爆炸正则表达式识别方法

Yuhai Lu, Xiaolin Wang, Fangfang Yuan, Cong Cao, Xiaoliang Zhang, Yanbing Liu
{"title":"RegexClassifier:一种基于gnn的状态爆炸正则表达式识别方法","authors":"Yuhai Lu, Xiaolin Wang, Fangfang Yuan, Cong Cao, Xiaoliang Zhang, Yanbing Liu","doi":"10.1109/ISCC58397.2023.10218248","DOIUrl":null,"url":null,"abstract":"Regular expression (regex) matching technology has been widely used in various applications. For the sake of low time complexity and stable performance, Deterministic Finite Automaton (DFA) has become the first choice to perform fast regular expression matching. However, DFA has the state explosion problem, that is, the number of DFA states may increase exponentially while compiling some specific regexes to DFA. The huge memory consumption restricts its practical applications. A lot of works have addressed the DFA state explosion problem; however, none has met the requirements of fast recognition and small memory image. In this paper, we proposed RegexClassifier to recognize state-explosive regexes intelligently and efficiently. It firstly transforms regexes into Non-deterministic Finite Automatons(NFAs), then uses Graph Neural Network(GNN) models to classify NFAs in order to recognize regexes that may cause DFA state explosion. Experiments on typical rule sets show that the classification accuracy of the proposed model is up to 98%.","PeriodicalId":265337,"journal":{"name":"2023 IEEE Symposium on Computers and Communications (ISCC)","volume":"2013 1","pages":"0"},"PeriodicalIF":0.0000,"publicationDate":"2023-07-09","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"0","resultStr":"{\"title\":\"RegexClassifier: A GNN-Based Recognition Method for State-Explosive Regular Expressions\",\"authors\":\"Yuhai Lu, Xiaolin Wang, Fangfang Yuan, Cong Cao, Xiaoliang Zhang, Yanbing Liu\",\"doi\":\"10.1109/ISCC58397.2023.10218248\",\"DOIUrl\":null,\"url\":null,\"abstract\":\"Regular expression (regex) matching technology has been widely used in various applications. For the sake of low time complexity and stable performance, Deterministic Finite Automaton (DFA) has become the first choice to perform fast regular expression matching. However, DFA has the state explosion problem, that is, the number of DFA states may increase exponentially while compiling some specific regexes to DFA. The huge memory consumption restricts its practical applications. A lot of works have addressed the DFA state explosion problem; however, none has met the requirements of fast recognition and small memory image. In this paper, we proposed RegexClassifier to recognize state-explosive regexes intelligently and efficiently. It firstly transforms regexes into Non-deterministic Finite Automatons(NFAs), then uses Graph Neural Network(GNN) models to classify NFAs in order to recognize regexes that may cause DFA state explosion. Experiments on typical rule sets show that the classification accuracy of the proposed model is up to 98%.\",\"PeriodicalId\":265337,\"journal\":{\"name\":\"2023 IEEE Symposium on Computers and Communications (ISCC)\",\"volume\":\"2013 1\",\"pages\":\"0\"},\"PeriodicalIF\":0.0000,\"publicationDate\":\"2023-07-09\",\"publicationTypes\":\"Journal Article\",\"fieldsOfStudy\":null,\"isOpenAccess\":false,\"openAccessPdf\":\"\",\"citationCount\":\"0\",\"resultStr\":null,\"platform\":\"Semanticscholar\",\"paperid\":null,\"PeriodicalName\":\"2023 IEEE Symposium on Computers and Communications (ISCC)\",\"FirstCategoryId\":\"1085\",\"ListUrlMain\":\"https://doi.org/10.1109/ISCC58397.2023.10218248\",\"RegionNum\":0,\"RegionCategory\":null,\"ArticlePicture\":[],\"TitleCN\":null,\"AbstractTextCN\":null,\"PMCID\":null,\"EPubDate\":\"\",\"PubModel\":\"\",\"JCR\":\"\",\"JCRName\":\"\",\"Score\":null,\"Total\":0}","platform":"Semanticscholar","paperid":null,"PeriodicalName":"2023 IEEE Symposium on Computers and Communications (ISCC)","FirstCategoryId":"1085","ListUrlMain":"https://doi.org/10.1109/ISCC58397.2023.10218248","RegionNum":0,"RegionCategory":null,"ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"","JCRName":"","Score":null,"Total":0}
引用次数: 0

摘要

正则表达式(regex)匹配技术已广泛应用于各种应用中。由于时间复杂度低、性能稳定,确定性有限自动机(Deterministic Finite Automaton, DFA)已成为实现快速正则表达式匹配的首选。然而,DFA存在状态爆炸问题,即在对DFA编译一些特定的正则表达式时,DFA状态的数量可能会呈指数级增长。巨大的内存消耗限制了其实际应用。大量的工作已经解决了DFA状态爆炸问题;然而,目前还没有一种方法能够满足快速识别和小图像存储的要求。在本文中,我们提出了RegexClassifier来智能高效地识别状态爆炸的正则表达式。首先将正则表达式转换为非确定性有限自动机(nfa),然后利用图神经网络(GNN)模型对nfa进行分类,以识别可能导致DFA状态爆炸的正则表达式。在典型规则集上的实验表明,该模型的分类准确率可达98%以上。
本文章由计算机程序翻译,如有差异,请以英文原文为准。
RegexClassifier: A GNN-Based Recognition Method for State-Explosive Regular Expressions
Regular expression (regex) matching technology has been widely used in various applications. For the sake of low time complexity and stable performance, Deterministic Finite Automaton (DFA) has become the first choice to perform fast regular expression matching. However, DFA has the state explosion problem, that is, the number of DFA states may increase exponentially while compiling some specific regexes to DFA. The huge memory consumption restricts its practical applications. A lot of works have addressed the DFA state explosion problem; however, none has met the requirements of fast recognition and small memory image. In this paper, we proposed RegexClassifier to recognize state-explosive regexes intelligently and efficiently. It firstly transforms regexes into Non-deterministic Finite Automatons(NFAs), then uses Graph Neural Network(GNN) models to classify NFAs in order to recognize regexes that may cause DFA state explosion. Experiments on typical rule sets show that the classification accuracy of the proposed model is up to 98%.
求助全文
通过发布文献求助,成功后即可免费获取论文全文。 去求助
来源期刊
自引率
0.00%
发文量
0
×
引用
GB/T 7714-2015
复制
MLA
复制
APA
复制
导出至
BibTeX EndNote RefMan NoteFirst NoteExpress
×
提示
您的信息不完整,为了账户安全,请先补充。
现在去补充
×
提示
您因"违规操作"
具体请查看互助需知
我知道了
×
提示
确定
请完成安全验证×
copy
已复制链接
快去分享给好友吧!
我知道了
右上角分享
点击右上角分享
0
联系我们:info@booksci.cn Book学术提供免费学术资源搜索服务,方便国内外学者检索中英文文献。致力于提供最便捷和优质的服务体验。 Copyright © 2023 布克学术 All rights reserved.
京ICP备2023020795号-1
ghs 京公网安备 11010802042870号
Book学术文献互助
Book学术文献互助群
群 号:481959085
Book学术官方微信