Skip to content

Commit 795b316

Browse files
committedFeb 27, 2025·
Strings: Update JavaDoc for StringFormulaManager.makeString
1 parent cabdad2 commit 795b316

File tree

1 file changed

+10
-7
lines changed

1 file changed

+10
-7
lines changed
 

‎src/org/sosy_lab/java_smt/api/StringFormulaManager.java

+10-7
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
import java.util.Arrays;
1313
import java.util.List;
1414
import org.sosy_lab.java_smt.api.NumeralFormula.IntegerFormula;
15+
import org.sosy_lab.java_smt.basicimpl.AbstractStringFormulaManager;
1516

1617
/**
1718
* Manager for dealing with string formulas. Functions come from <a
@@ -22,13 +23,15 @@ public interface StringFormulaManager {
2223
/**
2324
* Creates a {@link StringFormula} representing the given constant String.
2425
*
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.
3235
*
3336
* @param value the string value the returned {@link StringFormula} should represent
3437
* @return a {@link StringFormula} representing the given value

0 commit comments

Comments
 (0)