Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit de93d71

Browse files
committedFeb 26, 2025·
Strings: Update JavaDoc for StringFormulaManager.makeString
1 parent 92ed055 commit de93d71

File tree

1 file changed

+9
-7
lines changed

1 file changed

+9
-7
lines changed
 

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

+9-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,14 @@ 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 format for the String depends on whether the option <code>solver.useUnicodeStrings
27+
* </code> is set to true or false. If the option is enabled, the method will accept any Java
28+
* String with Unicode letters from the first 3 planes (codepoints 0x00000-0x2FFFFF). Higher
29+
* codepoints are not allowed due to limitations in SMTLIB. When the option is set to false, only
30+
* (printable) US-ASCII characters are allowed in the String. Unicode characters can still be
31+
* used, but need to be written as escape sequences. See {@link
32+
* AbstractStringFormulaManager#escapeUnicodeForSmtlib(String)} for a function that can handle the
33+
* conversion for this method.
3234
*
3335
* @param value the string value the returned {@link StringFormula} should represent
3436
* @return a {@link StringFormula} representing the given value

0 commit comments

Comments
 (0)
Please sign in to comment.