Theories over strings are among the most heavily researched logical theories in the SMT community in the past decade, owing to the error-prone nature of string manipulations, which often leads to security vulnerabilities (e.g. cross-site scripting and code injection). The majority of the existing decision procedures and solvers for these theories are themselves intricate; they are complicated algorithmically, and also have to deal with a very rich vocabulary of operations. This has led to a plethora of bugs in implementation, which have for instance been discovered through fuzzing. In this paper, we present CertiStr, a certified implementation of a string constraint solver for the theory of strings with concatenation and regular constraints. CertiStr aims to solve string constraints using a forward-propagation algorithm based on symbolic representations of regular constraints as symbolic automata, which returns three results: sat, unsat, and unknown, and is guaranteed to terminate for the string constraints whose concatenation dependencies are acyclic. The implementation has been developed and proven correct in Isabelle/HOL, through which an effective solver in OCaml was generated. We demonstrate the effectiveness and efficiency of CertiStr against the standard Kaluza benchmark, in which 80.4% tests are in the string constraint fragment of CertiStr. Of these 80.4% tests, CertiStr can solve 83.5% (i.e. CertiStr returns sat or unsat) within 60s.
翻译:在过去十年里,由于弦操纵的错误易变性,弦操纵往往导致安全脆弱性(例如跨现场脚本和密码输入),弦学理论是最受研究最多的逻辑理论。大多数现有决策程序和这些理论的解决者本身复杂;它们是复杂的逻辑学,并且必须处理非常丰富的操作词汇表。这导致执行中的错误过多,例如通过模糊发现。在本文中,我们介绍了CertiStr,一个经认证的字符串限制解答器,用于连接和定期约束的弦理论。CertiStr旨在利用基于象征性自动测试定期约束的象征性描述的字符串限制算法解决弦化限制,这种象征性约束可以产生三种结果:坐、坐、不坐和未知,并且保证结束弦性制约,这种制约取决于周期性。在Isabelle/HoL中已经开发并证明执行正确,通过这个测试,一个有效的弦化解析器用于连接和定期约束的弦学理论的弦化解析度理论。Sral-80% Certi 标准测试中,我们展示了Cral-ral-rorti 的效能和Cral-ral-ral-ral-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx80xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx80xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx