Affiliation:
1. University of Pennsylvania, Philadelphia, PA, USA
Abstract
We present DReX, a declarative language that can express all regular string-to string transformations, and can still be efficiently evaluated. The class of regular string transformations has a robust theoretical foundation including multiple characterizations, closure properties, and decidable analysis questions, and admits a number of string operations such as insertion, deletion, substring swap, and reversal. Recent research has led to a characterization of regular string transformations using a primitive set of function combinators analogous to the definition of regular languages using regular expressions. While these combinators form the basis for the language DReX proposed in this paper, our main technical focus is on the complexity of evaluating the output of a DReX program on a given input string. It turns out that the natural evaluation algorithm involves dynamic programming, leading to complexity that is cubic in the length of the input string. Our main contribution is identifying a consistency restriction on the use of combinators in DReX programs, and a single-pass evaluation algorithm for consistent programs with time complexity that is linear in the length of the input string and polynomial in the size of the program. We show that the consistency restriction does not limit the expressiveness, and whether a DReX program is consistent can be checked efficiently. We report on a prototype implementation, and evaluate it using a representative set of text processing tasks.
Funder
Division of Computing and Communication Foundations
Publisher
Association for Computing Machinery (ACM)
Subject
Computer Graphics and Computer-Aided Design,Software
Reference26 articles.
1. Streaming transducers for algorithmic verification of single-pass list-processing programs
2. R.
Alur
and
L.
D'Antoni
.
Streaming tree transducers
. In A. Czumaj K. Mehlhorn A. Pitts and R. Wattenhofer editors Automata Languages and Programming volume
7392
of
Lecture Notes in Computer Science pages
42
--
53
.
Springer 2012
. 10.1007/978-3-642-31585-5_8 R. Alur and L. D'Antoni. Streaming tree transducers. In A. Czumaj K. Mehlhorn A. Pitts and R. Wattenhofer editors Automata Languages and Programming volume 7392 of Lecture Notes in Computer Science pages 42--53. Springer 2012. 10.1007/978-3-642-31585-5_8
3. Regular combinators for string transformations
4. LNI;Becker O.,2003
5. Boomerang
Cited by
5 articles.
订阅此论文施引文献
订阅此论文施引文献,注册后可以免费订阅5篇论文的施引文献,订阅后可以查看论文全部施引文献