12
12
import java .util .Arrays ;
13
13
import java .util .List ;
14
14
import org .sosy_lab .java_smt .api .NumeralFormula .IntegerFormula ;
15
+ import org .sosy_lab .java_smt .basicimpl .AbstractStringFormulaManager ;
15
16
16
17
/**
17
18
* Manager for dealing with string formulas. Functions come from <a
@@ -22,13 +23,15 @@ public interface StringFormulaManager {
22
23
/**
23
24
* Creates a {@link StringFormula} representing the given constant String.
24
25
*
25
- * <p>This method accepts plain Java Strings with Unicode characters from the Basic Multilingual
26
- * Plane (BMP) or planes 1 and 2 (codepoints in range [0x00000, 0x2FFFF]). JavaSMT handles
27
- * escaping internally, as some solvers follow the SMTLIB standard and escape Unicode characters
28
- * with curly braces.
29
- *
30
- * <p>Additionally, you can use SMTLIB escaping like "\\u{1234}" to represent Unicode characters
31
- * directly.
26
+ * <p>The String argument is expected to be a regular Java String and may contain Unicode
27
+ * characters from the first 3 planes (codepoints 0x00000-0x2FFFFF). Higher codepoints are not
28
+ * allowed due to limitations in SMTLIB. We do not support SMTLIB escape sequences in this method,
29
+ * and String like <code>"\\u{abc}"</code> are read verbatim and are not substituted with their
30
+ * Unicode character. If you still want to use SMTLIB Strings with this method, the function
31
+ * {@link AbstractStringFormulaManager#unescapeUnicodeForSmtlib(String)} can be used to handle the
32
+ * conversion before calling this method. Note that you may then also have to use {@link
33
+ * AbstractStringFormulaManager#escapeUnicodeForSmtlib(String)} to convert Strings from the model
34
+ * back to a format that is compatible with other SMTLIB based solvers.
32
35
*
33
36
* @param value the string value the returned {@link StringFormula} should represent
34
37
* @return a {@link StringFormula} representing the given value
0 commit comments