• Title of article

    Mutable strings in Java: design, implementation and lightweight text-search algorithms

  • Author/Authors

    Paolo Boldi، نويسنده , , Sebastiano Vigna، نويسنده ,

  • Issue Information
    دوهفته نامه با شماره پیاپی سال 2005
  • Pages
    21
  • From page
    3
  • To page
    23
  • Abstract
    The Java string classes, String and StringBuffer, lie at the extremes of a spectrum (immutable, reference based, and mutable, content based). Analogously, available text-search methods on string classes are implemented either as trivial, brute-force double loops, or as very sophisticated and resource-consuming regular-expression search methods. Motivated by our experience in data-intensive text applications, we propose a new string class, MutableString, which tries to get the right balance between extremes in both cases. Mutable strings can be in one of two states, compact and loose, in which they behave more like String and StringBuffer, respectively. Moreover, they support a wide range of sophisticated text-search algorithms with a very low resource usage and set-up time, using a new, very simple randomised data structure (a generalisation of Bloom filters) that stores an approximation from above of a lattice-valued function. Computing the function value requires a constant number of steps, and the error probability can be balanced with space usage. As a result, we obtain practical implementations of Boyer–Moore type algorithms that can be used with very large alphabets, such as Unicode collation elements. The techniques we develop are very general and amenable to a wide range of applications.
  • Journal title
    Science of Computer Programming
  • Serial Year
    2005
  • Journal title
    Science of Computer Programming
  • Record number

    1079754