mirror of
https://github.com/Z3Prover/z3
synced 2025-08-02 09:20:22 +00:00
add selected updates #4981
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
parent
e3d634807b
commit
42e601483d
3 changed files with 5 additions and 94 deletions
|
@ -89,8 +89,7 @@ namespace smt {
|
|||
m_library_aware_trail_stack(*this),
|
||||
m_find(*this),
|
||||
fixed_length_subterm_trail(m),
|
||||
fixed_length_assumptions(m),
|
||||
bitvector_character_constants(m)
|
||||
fixed_length_assumptions(m)
|
||||
{
|
||||
}
|
||||
|
||||
|
@ -103,7 +102,6 @@ namespace smt {
|
|||
}
|
||||
|
||||
void theory_str::init() {
|
||||
initialize_charset();
|
||||
m_mk_aut.set_solver(alloc(seq_expr_solver, get_manager(), ctx.get_fparams()));
|
||||
}
|
||||
|
||||
|
@ -168,7 +166,6 @@ namespace smt {
|
|||
uninterpreted_to_char_subterm_map.reset();
|
||||
fixed_length_lesson.reset();
|
||||
candidate_model.reset();
|
||||
bitvector_character_constants.reset();
|
||||
}
|
||||
|
||||
expr * theory_str::mk_string(zstring const& str) {
|
||||
|
@ -200,79 +197,6 @@ namespace smt {
|
|||
st.update("str refine negated function", m_stats.m_refine_nf);
|
||||
}
|
||||
|
||||
void theory_str::initialize_charset() {
|
||||
bool defaultCharset = true;
|
||||
if (defaultCharset) {
|
||||
// valid C strings can't contain the null byte ('\0')
|
||||
charSetSize = 255;
|
||||
char_set.resize(256, 0);
|
||||
int idx = 0;
|
||||
// small letters
|
||||
for (int i = 97; i < 123; i++) {
|
||||
char_set[idx] = (char) i;
|
||||
charSetLookupTable[char_set[idx]] = idx;
|
||||
idx++;
|
||||
}
|
||||
// caps
|
||||
for (int i = 65; i < 91; i++) {
|
||||
char_set[idx] = (char) i;
|
||||
charSetLookupTable[char_set[idx]] = idx;
|
||||
idx++;
|
||||
}
|
||||
// numbers
|
||||
for (int i = 48; i < 58; i++) {
|
||||
char_set[idx] = (char) i;
|
||||
charSetLookupTable[char_set[idx]] = idx;
|
||||
idx++;
|
||||
}
|
||||
// printable marks - 1
|
||||
for (int i = 32; i < 48; i++) {
|
||||
char_set[idx] = (char) i;
|
||||
charSetLookupTable[char_set[idx]] = idx;
|
||||
idx++;
|
||||
}
|
||||
// printable marks - 2
|
||||
for (int i = 58; i < 65; i++) {
|
||||
char_set[idx] = (char) i;
|
||||
charSetLookupTable[char_set[idx]] = idx;
|
||||
idx++;
|
||||
}
|
||||
// printable marks - 3
|
||||
for (int i = 91; i < 97; i++) {
|
||||
char_set[idx] = (char) i;
|
||||
charSetLookupTable[char_set[idx]] = idx;
|
||||
idx++;
|
||||
}
|
||||
// printable marks - 4
|
||||
for (int i = 123; i < 127; i++) {
|
||||
char_set[idx] = (char) i;
|
||||
charSetLookupTable[char_set[idx]] = idx;
|
||||
idx++;
|
||||
}
|
||||
// non-printable - 1
|
||||
for (int i = 1; i < 32; i++) {
|
||||
char_set[idx] = (char) i;
|
||||
charSetLookupTable[char_set[idx]] = idx;
|
||||
idx++;
|
||||
}
|
||||
// non-printable - 2
|
||||
for (int i = 127; i < 256; i++) {
|
||||
char_set[idx] = (char) i;
|
||||
charSetLookupTable[char_set[idx]] = idx;
|
||||
idx++;
|
||||
}
|
||||
} else {
|
||||
const char setset[] = { 'a', 'b', 'c' };
|
||||
int fSize = sizeof(setset) / sizeof(char);
|
||||
char_set.resize(fSize, 0);
|
||||
charSetSize = fSize;
|
||||
for (int i = 0; i < charSetSize; i++) {
|
||||
char_set[i] = setset[i];
|
||||
charSetLookupTable[setset[i]] = i;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void theory_str::assert_axiom(expr * _e) {
|
||||
if (_e == nullptr)
|
||||
return;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue