Advertisement

Propagating lex, find and replace with Dashed Strings

  • Roberto Amadini
  • Graeme Gange
  • Peter J. Stuckey
Conference paper
Part of the Lecture Notes in Computer Science book series (LNCS, volume 10848)

Abstract

Dashed strings have been recently proposed in Constraint Programming to represent the domain of string variables when solving combinatorial problems over strings. This approach showed promising performance on some classes of string problems, involving constraints like string equality and concatenation. However, there are a number of string constraints for which no propagator has yet been defined. In this paper, we show how to propagate lexicographic ordering (lex), find and replace with dashed strings. All of these are fundamental string operations: lex is the natural total order over strings, while find and replace are frequently used in string manipulation. We show that these propagators, that we implemented in G-Strings solver, allows us to be competitive with state-of-the-art approaches.

Notes

Acknowledgments

This work is supported by the Australian Research Council (ARC) through Linkage Project Grant LP140100437 and Discovery Early Career Researcher Award DE160100568.

References

  1. 1.
    Aggoun, A., Beldiceanu, N.: Extending CHIP in order to solve complex scheduling and placement problems. Math. Comput. Model. 17(7), 57–73 (1993)CrossRefGoogle Scholar
  2. 2.
    Amadini, R., Flener, P., Pearson, J., Scott, J.D., Stuckey, P.J., Tack, G.: Minizinc with strings. In: Logic-Based Program Synthesis and Transformation - 25th International Symposium, LOPSTR 2016 (2016). https://arxiv.org/abs/1608.03650
  3. 3.
    Amadini, R., Gange, G., Stuckey, P.J.: Sweep-based propagation for string cosntraint solving. In: AAAI 2018 (2018, to appear)Google Scholar
  4. 4.
    Amadini, R., Gange, G., Stuckey, P.J., Tack, G.: A novel approach to string constraint solving. In: Beck, J.C. (ed.) CP 2017. LNCS, vol. 10416, pp. 3–20. Springer, Cham (2017).  https://doi.org/10.1007/978-3-319-66158-2_1CrossRefGoogle Scholar
  5. 5.
    Berzish, M., Zheng, Y., Ganesh, V.: Z3str3: a string solver with theory-aware branching. CoRR abs/1704.07935 (2017). http://arxiv.org/abs/1704.07935
  6. 6.
    Bisht, P., Hinrichs, T.L., Skrupsky, N., Venkatakrishnan, V.N.: WAPTEC: whitebox analysis of web applications for parameter tampering exploit construction. In: Proceedings of ACM Conference on Computer and Communications Security, pp. 575–586. ACM (2011)Google Scholar
  7. 7.
    Bjørner, N., Tillmann, N., Voronkov, A.: Path feasibility analysis for string-manipulating programs. In: Kowalewski, S., Philippou, A. (eds.) TACAS 2009. LNCS, vol. 5505, pp. 307–321. Springer, Heidelberg (2009).  https://doi.org/10.1007/978-3-642-00768-2_27CrossRefzbMATHGoogle Scholar
  8. 8.
    Emmi, M., Majumdar, R., Sen, K.: Dynamic test input generation for database applications. In: Proceedings of the ACM SIGSOFT International Symposium on Software Testing and Analysis (ISSTA), pp. 151–162. ACM (2007)Google Scholar
  9. 9.
    Fredricksen, H.: A survey of full length nonlinear shift register cycle algorithms. SIAM Rev. 24(2), 195–221 (1982)MathSciNetCrossRefGoogle Scholar
  10. 10.
    Frisch, A.M., Hnich, B., Kiziltan, Z., Miguel, I., Walsh, T.: Propagation algorithms for lexicographic ordering constraints. Artif. Intell. 170(10), 803–834 (2006)MathSciNetCrossRefGoogle Scholar
  11. 11.
    Gange, G., Navas, J.A., Stuckey, P.J., Søndergaard, H., Schachte, P.: Unbounded model-checking with interpolation for regular language constraints. In: Piterman, N., Smolka, S.A. (eds.) TACAS 2013. LNCS, vol. 7795, pp. 277–291. Springer, Heidelberg (2013).  https://doi.org/10.1007/978-3-642-36742-7_20CrossRefzbMATHGoogle Scholar
  12. 12.
    Gecode Team: Gecode: generic constraint development environment (2016). http://www.gecode.org
  13. 13.
    Hooimeijer, P., Weimer, W.: StrSolve: solving string constraints lazily. Autom. Softw. Eng. 19(4), 531–559 (2012)CrossRefGoogle Scholar
  14. 14.
    Kiezun, A., Ganesh, V., Artzi, S., Guo, P.J., Hooimeijer, P., Ernst, M.D.: HAMPI: a solver for word equations over strings, regular expressions, and context-free grammars. ACM Trans. Softw. Eng. Methodol. 21(4), Article No. 25 (2012)CrossRefGoogle Scholar
  15. 15.
    Li, G., Ghosh, I.: PASS: string solving with parameterized array and interval automaton. In: Bertacco, V., Legay, A. (eds.) HVC 2013. LNCS, vol. 8244, pp. 15–31. Springer, Cham (2013).  https://doi.org/10.1007/978-3-319-03077-7_2CrossRefGoogle Scholar
  16. 16.
    Liang, T., Reynolds, A., Tinelli, C., Barrett, C., Deters, M.: A DPLL(T) theory solver for a theory of strings and regular expressions. In: Biere, A., Bloem, R. (eds.) CAV 2014. LNCS, vol. 8559, pp. 646–662. Springer, Cham (2014).  https://doi.org/10.1007/978-3-319-08867-9_43CrossRefGoogle Scholar
  17. 17.
    Saxena, P., Akhawe, D., Hanna, S., Mao, F., McCamant, S., Song, D.: A symbolic execution framework for JavaScript. In: S&P, pp. 513–528. IEEE Computer Society (2010)Google Scholar
  18. 18.
    Scott, J.D., Flener, P., Pearson, J., Schulte, C.: Design and implementation of bounded-length sequence variables. In: Salvagnin, D., Lombardi, M. (eds.) CPAIOR 2017. LNCS, vol. 10335, pp. 51–67. Springer, Cham (2017).  https://doi.org/10.1007/978-3-319-59776-8_5CrossRefzbMATHGoogle Scholar
  19. 19.
    Stuckey, P.J., Feydy, T., Schutt, A., Tack, G., Fischer, J.: The miniZinc challenge 2008–2013. AI Mag. 2, 55–60 (2014)CrossRefGoogle Scholar
  20. 20.
    Tateishi, T., Pistoia, M., Tripp, O.: Path- and index-sensitive string analysis based on monadic second-order logic. ACM Trans. Softw. Eng. Methodol. 22(4), 33 (2013)CrossRefGoogle Scholar
  21. 21.
    Thomé, J., Shar, L.K., Bianculli, D., Briand, L.C.: Search-driven string constraint solving for vulnerability detection. In: ICSE 2017, Buenos Aires, Argentina, 20–28 May 2017, pp. 198–208 (2017)Google Scholar
  22. 22.
    Zheng, Y., Ganesh, V., Subramanian, S., Tripp, O., Berzish, M., Dolby, J., Zhang, X.: Z3str2: an efficient solver for strings, regular expressions, and length constraints. Formal Methods Syst. Des. 50(2–3), 249–288 (2017)CrossRefGoogle Scholar

Copyright information

© Springer International Publishing AG, part of Springer Nature 2018

Authors and Affiliations

  • Roberto Amadini
    • 1
  • Graeme Gange
    • 1
  • Peter J. Stuckey
    • 1
  1. 1.Department of Computing and Information SystemsThe University of MelbourneMelbourneAustralia

Personalised recommendations