Skip to content

Commit af56a9b

Browse files
Improve documentation of instantiate
1 parent 1a553f6 commit af56a9b

File tree

1 file changed

+11
-7
lines changed

1 file changed

+11
-7
lines changed

src/solvers/refinement/string_refinement.cpp

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1821,13 +1821,17 @@ find_indexes(const exprt &expr, const exprt &str, const symbol_exprt &qvar)
18211821
}
18221822

18231823
/// Instantiates a string constraint by substituting the quantifiers.
1824-
/// For a string constraint of the form \f$\forall q. P(x)\f$,
1825-
/// substitute `qvar` the universally quantified variable of `axiom`, by
1826-
/// an index `val`, in `axiom`, so that the index used for `str` equals `val`.
1827-
/// For instance, if `axiom` corresponds to \f$\forall q. s[q+x]={\tt 'a'} \land
1828-
/// t[q]={\tt 'b'} \f$, `instantiate(axiom,s,v)` would return an expression for
1829-
/// \f$s[v]={\tt 'a'} \land t[v-x]={\tt 'b'}\f$.
1830-
/// \param axiom: a universally quantified formula `axiom`
1824+
/// For a string constraint of the form `forall q. P(x)`,
1825+
/// substitute `q` the universally quantified variable of `axiom`, by
1826+
/// an `index`, in `axiom`, so that the index used for `str` equals `val`.
1827+
/// For instance, if `axiom` is `forall q. s[q+x] = 'a' && t[q] = 'b'`,
1828+
/// `instantiate(axiom,s,v)` would return the expression
1829+
/// `s[v] = 'a' && t[v-x] = 'b'`.
1830+
/// If there are several such indexes, the conjunction of the instantiations is
1831+
/// returned, for instance for a formula:
1832+
/// `forall q. s[q+x]='a' && s[q]=c` we would get
1833+
/// `s[v] = 'a' && s[v-x] = c && s[v+x] = 'a' && s[v] = c`.
1834+
/// \param axiom: a universally quantified formula
18311835
/// \param str: an array of characters
18321836
/// \param val: an index expression
18331837
/// \return instantiated formula

0 commit comments

Comments
 (0)