|
14 | 14 | import org.sosy_lab.java_smt.api.NumeralFormula.IntegerFormula; |
15 | 15 |
|
16 | 16 | /** |
17 | | - * Manager for dealing with string formulas. Functions come from |
18 | | - * http://smtlib.cs.uiowa.edu/theories-UnicodeStrings.shtml. |
| 17 | + * Manager for dealing with string formulas. Functions come from <a |
| 18 | + * href="http://smtlib.cs.uiowa.edu/theories-UnicodeStrings.shtml">String theory in SMTLIB</a>. |
19 | 19 | */ |
20 | 20 | public interface StringFormulaManager { |
21 | 21 |
|
22 | 22 | /** |
23 | | - * Returns a {@link StringFormula} representing the given constant String. The String value is |
24 | | - * expected to be UTF16, i.e., plain Java string with Unicode characters. JavaSMT handles escaping |
25 | | - * internally, as some solvers follow the SMTLIB standard and escape Unicode characters with curly |
26 | | - * braces. We hide this detail from the user and allow to use plain Java Strings. |
| 23 | + * Creates a {@link StringFormula} representing the given constant String. |
27 | 24 | * |
28 | | - * @param value the string value the returned <code>Formula</code> should represent |
29 | | - * @return a Formula representing the given value |
| 25 | + * <p>This method accepts plain Java Strings with Unicode characters from the Basic Multilingual |
| 26 | + * Plane (BMP) (codepoints in range [0x00000, 0x2FFFF]). JavaSMT handles escaping internally, as |
| 27 | + * some solvers follow the SMTLIB standard and escape Unicode characters with curly braces. |
| 28 | + * |
| 29 | + * <p>Additionally, you can use SMTLIB escaping like "\\u{1234}" to represent Unicode characters |
| 30 | + * directly. |
| 31 | + * |
| 32 | + * @param value the string value the returned {@link StringFormula} should represent |
| 33 | + * @return a {@link StringFormula} representing the given value |
30 | 34 | */ |
31 | 35 | StringFormula makeString(String value); |
32 | 36 |
|
@@ -236,14 +240,14 @@ default RegexFormula concat(RegexFormula... parts) { |
236 | 240 |
|
237 | 241 | /** |
238 | 242 | * Returns an Integer formula representing the code point of the only character of the given |
239 | | - * String formula, if s is a singleton string. Otherwise, returns -1. |
| 243 | + * String formula, if it represents a single character. Otherwise, returns -1. |
240 | 244 | */ |
241 | 245 | IntegerFormula toCodePoint(StringFormula str); |
242 | 246 |
|
243 | 247 | /** |
244 | | - * Returns the singleton string whose only character is the given code point if it is represented |
245 | | - * as a single char in UTF16, i.e., it is in the range [0, 196607]. Otherwise, returns the empty |
246 | | - * string. |
| 248 | + * Returns a String formula representing the single character with the given code point, if it is |
| 249 | + * a valid Unicode code point within the Basic Multilingual Plane (BMP) (codepoints in range |
| 250 | + * [0x00000, 0x2FFFF]). Otherwise, returns the empty string. |
247 | 251 | */ |
248 | 252 | StringFormula fromCodePoint(IntegerFormula codePoint); |
249 | 253 | } |
0 commit comments