HAMPI: A solver for string constraints

Download: PDF, HAMPI implementation.

“HAMPI: A solver for string constraints” by Adam Kieżun, Vijay Ganesh, Philip J. Guo, Pieter Hooimeijer, and Michael D. Ernst. In ISSTA 2009, Proceedings of the 2009 International Symposium on Software Testing and Analysis, (Chicago, IL, USA), July 21-23, 2009.
A previous version appeared as MIT Computer Science and Artificial Intelligence Laboratory technical report MIT-CSAIL-TR-2009-004, (Cambridge, MA), February 4, 2009.

Abstract

Many automatic testing, analysis, and verification techniques for programs can be effectively reduced to a constraint-generation phase followed by a constraint-solving phase. This separation of concerns often leads to more effective and maintainable tools. The increasing efficiency of off-the-shelf constraint solvers makes this approach even more compelling. However, there are few, if any, effective and sufficiently expressive off-the-shelf solvers for string constraints generated by analysis techniques for string-manipulating programs.

We designed and implemented HAMPI, a solver for string constraints over bounded string variables. HAMPI constraints express membership in regular languages and bounded context-free languages. HAMPI constraints may contain context-free-language definitions, regular-language definitions and operations, and the membership predicate. Given a set of constraints, HAMPI outputs a string that satisfies all the constraints, or reports that the constraints are unsatisfiable.

HAMPI is expressive and efficient, and can be successfully applied to testing and analysis of real programs. Our experiments use HAMPI in: static and dynamic analyses for finding SQL injection vulnerabilities in Web applications; automated bug finding in C programs using systematic testing; and compare HAMPI with another string solver. HAMPI's source code, documentation, and the experimental data are available at http://people.csail.mit.edu/akiezun/hampi/.

Download: PDF, HAMPI implementation.

BibTeX entry:

@inproceedings{KiezunGGHE2009,
   author = {Adam Kie{\.z}un and Vijay Ganesh and Philip J. Guo and Pieter
	Hooimeijer and Michael D. Ernst},
   title = {{HAMPI}: A solver for string constraints},
   booktitle = {ISSTA 2009, Proceedings of the 2009 International
	Symposium on Software Testing and Analysis},
   address = {Chicago, IL, USA},
   month = {July~21--23,},
   year = {2009}
}

(This webpage was created with bibtex2web.)

Back to Program Analysis Group publications.