mirror of
https://github.com/Z3Prover/z3
synced 2025-04-24 01:25:31 +00:00
theory_str refactoring
This commit is contained in:
parent
8b077ebbe7
commit
ab71dea82d
9 changed files with 83 additions and 280 deletions
148
src/api/z3_api.h
148
src/api/z3_api.h
|
@ -3173,154 +3173,6 @@ extern "C" {
|
|||
|
||||
/*@}*/
|
||||
|
||||
/** @name Strings and regular expressions (Z3str2 implementation) */
|
||||
/*@{*/
|
||||
|
||||
/**
|
||||
\brief Create a string sort for 8-bit ASCII strings.
|
||||
|
||||
This function creates a sort for ASCII strings.
|
||||
Each character is 8 bits.
|
||||
|
||||
def_API('Z3_mk_str_sort', SORT, (_in(CONTEXT), ))
|
||||
*/
|
||||
Z3_sort Z3_API Z3_mk_str_sort(Z3_context c);
|
||||
|
||||
/**
|
||||
\brief Check if \c s is a string sort.
|
||||
|
||||
def_API('Z3_is_str_sort', BOOL, (_in(CONTEXT), _in(SORT)))
|
||||
*/
|
||||
|
||||
Z3_bool Z3_API Z3_is_str_sort(Z3_context c, Z3_sort s);
|
||||
|
||||
/**
|
||||
\brief Determine if \c s is a string constant.
|
||||
|
||||
def_API('Z3_is_str', BOOL, (_in(CONTEXT), _in(AST)))
|
||||
*/
|
||||
|
||||
Z3_bool Z3_API Z3_is_str(Z3_context c, Z3_ast s);
|
||||
|
||||
/**
|
||||
\brief Retrieve the string constant stored in \c s.
|
||||
|
||||
\pre Z3_is_str(c, s)
|
||||
|
||||
def_API('Z3_get_str', STRING, (_in(CONTEXT), _in(AST)))
|
||||
*/
|
||||
|
||||
Z3_string Z3_API Z3_get_str(Z3_context c, Z3_ast s);
|
||||
|
||||
/**
|
||||
\brief Create a string constant.
|
||||
|
||||
\param c logical context.
|
||||
\param str The ASCII representation of the string constant.
|
||||
|
||||
def_API('Z3_mk_str', AST, (_in(CONTEXT), _in(STRING)))
|
||||
*/
|
||||
Z3_ast Z3_API Z3_mk_str(Z3_context c, Z3_string str);
|
||||
|
||||
/**
|
||||
\brief Create a string concatenation term.
|
||||
def_API('Z3_mk_str_concat', AST, (_in(CONTEXT), _in(AST), _in(AST)))
|
||||
*/
|
||||
Z3_ast Z3_API Z3_mk_str_concat(Z3_context c, Z3_ast s1, Z3_ast s2);
|
||||
|
||||
/**
|
||||
\brief Create a string length term. (Integer representation)
|
||||
def_API('Z3_mk_str_length', AST, (_in(CONTEXT), _in(AST)))
|
||||
*/
|
||||
Z3_ast Z3_API Z3_mk_str_length(Z3_context c, Z3_ast s);
|
||||
|
||||
/**
|
||||
\brief Create 'character at index' term.
|
||||
def_API('Z3_mk_str_at', AST, (_in(CONTEXT), _in(AST), _in(AST)))
|
||||
*/
|
||||
Z3_ast Z3_API Z3_mk_str_at(Z3_context c, Z3_ast s, Z3_ast idx);
|
||||
|
||||
/**
|
||||
\brief Create 'str.prefixof' term.
|
||||
def_API('Z3_mk_str_prefixof', AST, (_in(CONTEXT), _in(AST), _in(AST)))
|
||||
*/
|
||||
Z3_ast Z3_API Z3_mk_str_prefixof(Z3_context c, Z3_ast pre, Z3_ast full);
|
||||
|
||||
/**
|
||||
\brief Create 'str.suffixof' term.
|
||||
def_API('Z3_mk_str_suffixof', AST, (_in(CONTEXT), _in(AST), _in(AST)))
|
||||
*/
|
||||
Z3_ast Z3_API Z3_mk_str_suffixof(Z3_context c, Z3_ast suf, Z3_ast full);
|
||||
|
||||
/**
|
||||
\brief Create 'str.contains' term.
|
||||
def_API('Z3_mk_str_contains', AST, (_in(CONTEXT), _in(AST), _in(AST)))
|
||||
*/
|
||||
Z3_ast Z3_API Z3_mk_str_contains(Z3_context c, Z3_ast needle, Z3_ast haystack);
|
||||
|
||||
/**
|
||||
\brief Create 'str.indexof' term.
|
||||
def_API('Z3_mk_str_indexof', AST, (_in(CONTEXT), _in(AST), _in(AST), _in(AST)))
|
||||
*/
|
||||
Z3_ast Z3_API Z3_mk_str_indexof(Z3_context c, Z3_ast haystack, Z3_ast needle, Z3_ast start);
|
||||
|
||||
/**
|
||||
\brief Create 'str.substr' term.
|
||||
def_API('Z3_mk_str_substr', AST, (_in(CONTEXT), _in(AST), _in(AST), _in(AST)))
|
||||
*/
|
||||
Z3_ast Z3_API Z3_mk_str_substr(Z3_context c, Z3_ast s, Z3_ast start, Z3_ast count);
|
||||
|
||||
/**
|
||||
\brief Create 'str.replace' term.
|
||||
def_API('Z3_mk_str_replace', AST, (_in(CONTEXT), _in(AST), _in(AST), _in(AST)))
|
||||
*/
|
||||
Z3_ast Z3_API Z3_mk_str_replace(Z3_context c, Z3_ast base, Z3_ast target, Z3_ast replacement);
|
||||
|
||||
|
||||
/**
|
||||
\brief Create a regular expression that matches the given string constant.
|
||||
def_API('Z3_mk_str_to_regex', AST, (_in(CONTEXT), _in(STRING)))
|
||||
*/
|
||||
Z3_ast Z3_API Z3_mk_str_to_regex(Z3_context c, Z3_string str);
|
||||
|
||||
/**
|
||||
\brief Create a regular expression membership predicate.
|
||||
def_API('Z3_mk_str_in_regex', AST, (_in(CONTEXT), _in(AST), _in(AST)))
|
||||
*/
|
||||
Z3_ast Z3_API Z3_mk_str_in_regex(Z3_context c, Z3_ast str, Z3_ast regex);
|
||||
|
||||
/**
|
||||
\brief Create a regex concatenation term.
|
||||
def_API('Z3_mk_regex_concat', AST, (_in(CONTEXT), _in(AST), _in(AST)))
|
||||
*/
|
||||
Z3_ast Z3_API Z3_mk_regex_concat(Z3_context c, Z3_ast r1, Z3_ast r2);
|
||||
|
||||
/**
|
||||
\brief Create a regex union term.
|
||||
def_API('Z3_mk_regex_union', AST, (_in(CONTEXT), _in(AST), _in(AST)))
|
||||
*/
|
||||
Z3_ast Z3_API Z3_mk_regex_union(Z3_context c, Z3_ast r1, Z3_ast r2);
|
||||
|
||||
/**
|
||||
\brief Create a regex Kleene star term.
|
||||
def_API('Z3_mk_regex_star', AST, (_in(CONTEXT), _in(AST)))
|
||||
*/
|
||||
Z3_ast Z3_API Z3_mk_regex_star(Z3_context c, Z3_ast r);
|
||||
|
||||
/**
|
||||
\brief Create a regex plus term.
|
||||
def_API('Z3_mk_regex_plus', AST, (_in(CONTEXT), _in(AST)))
|
||||
*/
|
||||
Z3_ast Z3_API Z3_mk_regex_plus(Z3_context c, Z3_ast r);
|
||||
|
||||
/**
|
||||
\brief Create a regex character range term.
|
||||
def_API('Z3_mk_regex_range', AST, (_in(CONTEXT), _in(STRING), _in(STRING)))
|
||||
*/
|
||||
Z3_ast Z3_API Z3_mk_regex_range(Z3_context c, Z3_string start, Z3_string end);
|
||||
|
||||
/*@}*/
|
||||
|
||||
/** @name Sequences and regular expressions */
|
||||
/*@{*/
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue