skip to main content
10.1145/2603088.2603151acmconferencesArticle/Chapter ViewAbstractPublication PageslicsConference Proceedingsconference-collections
research-article

Regular combinators for string transformations

Published:14 July 2014Publication History

ABSTRACT

We focus on (partial) functions that map input strings to a monoid such as the set of integers with addition and the set of output strings with concatenation. The notion of regularity for such functions has been defined using two-way finite-state transducers, (one-way) cost register automata, and MSO-definable graph transformations. In this paper, we give an algebraic and machine-independent characterization of this class analogous to the definition of regular languages by regular expressions. When the monoid is commutative, we prove that every regular function can be constructed from constant functions using the combinators of choice, split sum, and iterated sum, that are analogs of union, concatenation, and Kleene-*, respectively, but enforce unique (or unambiguous) parsing. Our main result is for the general case of non-commutative monoids, which is of particular interest for capturing regular string-to-string transformations for document processing. We prove that the following additional combinators suffice for constructing all regular functions: (1) the left-additive versions of split sum and iterated sum, which allow transformations such as string reversal; (2) sum of functions, which allows transformations such as copying of strings; and (3) function composition, or alternatively, a new concept of chained sum, which allows output values from adjacent blocks to mix.

References

  1. A. V. Aho, J. E. Hopcroft, and J. D. Ullman. A general theory of translation. Mathematical Systems Theory, 3(3):193--221, 1969.Google ScholarGoogle ScholarCross RefCross Ref
  2. R. Alur and P. Černý. Expressiveness of streaming string transducers. In IARCS Annual Conference on Foundations of Software Technology and Theoretical Computer Science, LIPIcs 8, pages 1--12, 2010.Google ScholarGoogle Scholar
  3. R. Alur and P. Černý. Streaming transducers for algorithmic verification of single-pass list-processing programs. In Proceedings of 38th ACM Symposium on Principles of Programming Languages, pages 599--610, 2011. Google ScholarGoogle ScholarDigital LibraryDigital Library
  4. R. Alur and L. D'Antoni. Streaming tree transducers. In Automata, Languages, and Programming --- 39th International Colloquium, ICALP Part II, pages 42--53. 2012. Google ScholarGoogle ScholarDigital LibraryDigital Library
  5. R. Alur, L. D'Antoni, J. V. Deshmukh, M. Raghothaman, and Y. Yuan. Regular functions and cost register automata. In 28th Annual ACM/IEEE Symposium on Logic in Computer Science, pages 13--22, 2013. Google ScholarGoogle ScholarDigital LibraryDigital Library
  6. R. Alur, E. Filiot, and A. Trivedi. Regular transformations of infinite strings. In 27th Annual ACM/IEEE Symposium on Logic in Computer Science, pages 65--74, 2012. Google ScholarGoogle ScholarDigital LibraryDigital Library
  7. M. Bojanczyk. Transducers with origin information. In Automata, Languages, and Programming --- 41st International Colloquium, ICALP Part II, 2014. Forthcoming.Google ScholarGoogle Scholar
  8. K. Chatterjee, L. Doyen, and T. A. Henzinger. Quantitative languages. ACM Trans. Comput. Log., 11(4), 2010. Google ScholarGoogle ScholarDigital LibraryDigital Library
  9. M. Chytil and V. Jákl. Serial composition of 2-way finite-state transducers and simple programs on strings. In Automata, Languages and Programming --- 4th International Colloquium, LNCS 52, pages 135--147. 1977. Google ScholarGoogle ScholarDigital LibraryDigital Library
  10. T. Colcombet. The theory of stabilisation monoids and regular cost functions. In Automata, Languages, and Programming --- 36th International Colloquium, ICALP Part II, pages 139--150. 2009. Google ScholarGoogle ScholarDigital LibraryDigital Library
  11. B. Courcelle. Monadic second-order graph transductions. In 17th Colloquium on Trees in Algebra and Programming, LNCS 581, pages 124--144. 1992. Google ScholarGoogle ScholarDigital LibraryDigital Library
  12. M. Droste, W. Kuich, and H. Vogler. Handbook of Weighted Automata. Springer, 2009. Google ScholarGoogle ScholarDigital LibraryDigital Library
  13. J. Engelfriet and H. J Hoogeboom. MSO definable string transductions and two-way finite-state transducers. ACM Transactions on Computational Logic, 2(2):216--254, 2001. Google ScholarGoogle ScholarDigital LibraryDigital Library
  14. J. Engelfriet and S. Maneth. Macro tree transducers, attribute grammars, and MSO definable tree translations. Information and Computation, 154:34--91, 1999. Google ScholarGoogle ScholarDigital LibraryDigital Library
  15. S. Gulwani. Automating string processing in spreadsheets using input-output examples. In Proceedings of 38th ACM Symposium on Principles of Programming Languages, pages 317--330, 2011. Google ScholarGoogle ScholarDigital LibraryDigital Library
  16. E. M. Gurari. The equivalence problem for deterministic two-way sequential transducers is decidable. In 21st Annual Symposium on Foundations of Computer Science, pages 83--85, 1980. Google ScholarGoogle ScholarDigital LibraryDigital Library
  17. Michael Sipser. Introduction to the Theory of Computation. Cengage Learning, 3rd edition, 2012.Google ScholarGoogle Scholar
  18. M. Veanes, P. Hooimeijer, B. Livshits, D. Molnar, and N. Bjørner. Symbolic finite state transducers: Algorithms and applications. In Proceedings of 39th ACM Symposium on Principles of Programming Languages, pages 137--150, 2012. Google ScholarGoogle ScholarDigital LibraryDigital Library

Index Terms

  1. Regular combinators for string transformations

    Recommendations

    Comments

    Login options

    Check if you have access through your login credentials or your institution to get full access on this article.

    Sign in
    • Published in

      cover image ACM Conferences
      CSL-LICS '14: Proceedings of the Joint Meeting of the Twenty-Third EACSL Annual Conference on Computer Science Logic (CSL) and the Twenty-Ninth Annual ACM/IEEE Symposium on Logic in Computer Science (LICS)
      July 2014
      764 pages
      ISBN:9781450328869
      DOI:10.1145/2603088
      • Program Chairs:
      • Thomas Henzinger,
      • Dale Miller

      Copyright © 2014 ACM

      Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than ACM must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from [email protected]

      Publisher

      Association for Computing Machinery

      New York, NY, United States

      Publication History

      • Published: 14 July 2014

      Permissions

      Request permissions about this article.

      Request Permissions

      Check for updates

      Qualifiers

      • research-article

      Acceptance Rates

      CSL-LICS '14 Paper Acceptance Rate74of212submissions,35%Overall Acceptance Rate143of386submissions,37%

    PDF Format

    View or Download as a PDF file.

    PDF

    eReader

    View online with eReader.

    eReader