参数化模式匹配理论:算法与应用

B. S. Baker
{"title":"参数化模式匹配理论:算法与应用","authors":"B. S. Baker","doi":"10.1145/167088.167115","DOIUrl":null,"url":null,"abstract":"This paper develops a theory and algoritbrns for an application problem arising in software maintenance. The application is to track down duplication in a large software system. We want to find not only exact matches between sections of code, but parametrized matches, where a parametrized match between two sections of code means that one section can be transformed into the other by replacing the parameter names (e.g. identifiers and constants) of one section by the parameter names of the other via a one-to-one function. This paper formalizes this problem in terms of parametrized strings and parametrized pattern matching and detirtes a new data structure (parametrized sujjfi.x tree) suitable for parametrized pattern matching. It gives efficient algorithms for constructing this data structure, efficient algorithms for parametrized pattern matchmg, and an efficient algorithm for timing all maximal parametrized matches over a threshold length in a parametrized string. The algorithms for constructing parametrized suffix trees and for reporting duplication over a threshold length have been implemented. Tests on C code indicate that these algorithms should perform well in the application.","PeriodicalId":280602,"journal":{"name":"Proceedings of the twenty-fifth annual ACM symposium on Theory of Computing","volume":"1 1","pages":"0"},"PeriodicalIF":0.0000,"publicationDate":"1993-06-01","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"168","resultStr":"{\"title\":\"A theory of parameterized pattern matching: algorithms and applications\",\"authors\":\"B. S. Baker\",\"doi\":\"10.1145/167088.167115\",\"DOIUrl\":null,\"url\":null,\"abstract\":\"This paper develops a theory and algoritbrns for an application problem arising in software maintenance. The application is to track down duplication in a large software system. We want to find not only exact matches between sections of code, but parametrized matches, where a parametrized match between two sections of code means that one section can be transformed into the other by replacing the parameter names (e.g. identifiers and constants) of one section by the parameter names of the other via a one-to-one function. This paper formalizes this problem in terms of parametrized strings and parametrized pattern matching and detirtes a new data structure (parametrized sujjfi.x tree) suitable for parametrized pattern matching. It gives efficient algorithms for constructing this data structure, efficient algorithms for parametrized pattern matchmg, and an efficient algorithm for timing all maximal parametrized matches over a threshold length in a parametrized string. The algorithms for constructing parametrized suffix trees and for reporting duplication over a threshold length have been implemented. Tests on C code indicate that these algorithms should perform well in the application.\",\"PeriodicalId\":280602,\"journal\":{\"name\":\"Proceedings of the twenty-fifth annual ACM symposium on Theory of Computing\",\"volume\":\"1 1\",\"pages\":\"0\"},\"PeriodicalIF\":0.0000,\"publicationDate\":\"1993-06-01\",\"publicationTypes\":\"Journal Article\",\"fieldsOfStudy\":null,\"isOpenAccess\":false,\"openAccessPdf\":\"\",\"citationCount\":\"168\",\"resultStr\":null,\"platform\":\"Semanticscholar\",\"paperid\":null,\"PeriodicalName\":\"Proceedings of the twenty-fifth annual ACM symposium on Theory of Computing\",\"FirstCategoryId\":\"1085\",\"ListUrlMain\":\"https://doi.org/10.1145/167088.167115\",\"RegionNum\":0,\"RegionCategory\":null,\"ArticlePicture\":[],\"TitleCN\":null,\"AbstractTextCN\":null,\"PMCID\":null,\"EPubDate\":\"\",\"PubModel\":\"\",\"JCR\":\"\",\"JCRName\":\"\",\"Score\":null,\"Total\":0}","platform":"Semanticscholar","paperid":null,"PeriodicalName":"Proceedings of the twenty-fifth annual ACM symposium on Theory of Computing","FirstCategoryId":"1085","ListUrlMain":"https://doi.org/10.1145/167088.167115","RegionNum":0,"RegionCategory":null,"ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"","JCRName":"","Score":null,"Total":0}
引用次数: 168

摘要

本文针对软件维护中出现的一个应用问题,提出了一种理论和算法。该应用程序用于跟踪大型软件系统中的复制。我们不仅要找到代码段之间的精确匹配,还要找到参数化匹配,其中两个代码段之间的参数化匹配意味着可以通过一对一函数将一个部分的参数名(例如标识符和常量)替换为另一个部分的参数名,从而将一个部分转换为另一个部分。本文从参数化字符串和参数化模式匹配两个方面对这一问题进行了形式化,并提出了一种新的数据结构(参数化主题)。X树)适合于参数化模式匹配。它给出了构造该数据结构的有效算法,参数化模式匹配的有效算法,以及在参数化字符串中超过阈值长度的所有最大参数化匹配的有效算法。实现了参数化后缀树的构造算法和超过阈值长度的重复报告算法。对C代码的测试表明,这些算法在应用程序中应该表现良好。
本文章由计算机程序翻译,如有差异,请以英文原文为准。
A theory of parameterized pattern matching: algorithms and applications
This paper develops a theory and algoritbrns for an application problem arising in software maintenance. The application is to track down duplication in a large software system. We want to find not only exact matches between sections of code, but parametrized matches, where a parametrized match between two sections of code means that one section can be transformed into the other by replacing the parameter names (e.g. identifiers and constants) of one section by the parameter names of the other via a one-to-one function. This paper formalizes this problem in terms of parametrized strings and parametrized pattern matching and detirtes a new data structure (parametrized sujjfi.x tree) suitable for parametrized pattern matching. It gives efficient algorithms for constructing this data structure, efficient algorithms for parametrized pattern matchmg, and an efficient algorithm for timing all maximal parametrized matches over a threshold length in a parametrized string. The algorithms for constructing parametrized suffix trees and for reporting duplication over a threshold length have been implemented. Tests on C code indicate that these algorithms should perform well in the application.
求助全文
通过发布文献求助,成功后即可免费获取论文全文。 去求助
来源期刊
自引率
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学术文献互助群
群 号:604180095
Book学术官方微信