首页    期刊浏览 2024年12月11日 星期三
登录注册

文章基本信息

  • 标题:The Abstraction and Instantiation of String-Matching Programs
  • 本地全文:下载
  • 作者:Torben Amtoft ; Charles Consel ; Olivier Danvy
  • 期刊名称:BRICS Report Series
  • 印刷版ISSN:0909-0878
  • 出版年度:2001
  • 卷号:8
  • 期号:12
  • 出版社:Aarhus University
  • 摘要:We consider a naive, quadratic string matcher testing whether a pattern occurs in a text; we equip it with a cache mediating its access to the text; and we abstract the traversal policy of the pattern, the cache, and the text. We then specialize this abstracted program with respect to a pattern, using the off-the-shelf partial evaluator Similix. Instantiating the abstracted program with a left-to-right traversal policy yields the linear-time behavior of Knuth, Morris and Pratt's string matcher. Instantiating it with a right-to-left policy yields the linear-time behavior of Boyer and Moore's string matcher.
国家哲学社会科学文献中心版权所有