3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-04-13 20:38:43 +00:00

Merge pull request #1007 from mtrberzi/formatting

Code formatting for theory_str
This commit is contained in:
Nikolaj Bjorner 2017-05-05 19:42:32 -04:00 committed by GitHub
commit de69c42e4d
2 changed files with 10570 additions and 10572 deletions

File diff suppressed because it is too large Load diff

View file

@ -1,19 +1,19 @@
/*++
Module Name:
Module Name:
theory_str.h
Abstract:
Abstract:
String Theory Plugin
Author:
Author:
Murphy Berzish and Yunhui Zheng
Revision History:
Revision History:
--*/
--*/
#ifndef _THEORY_STR_H_
#define _THEORY_STR_H_
@ -33,14 +33,14 @@ Revision History:
namespace smt {
typedef hashtable<symbol, symbol_hash_proc, symbol_eq_proc> symbol_set;
typedef hashtable<symbol, symbol_hash_proc, symbol_eq_proc> symbol_set;
class str_value_factory : public value_factory {
class str_value_factory : public value_factory {
seq_util u;
symbol_set m_strings;
std::string delim;
unsigned m_next;
public:
public:
str_value_factory(ast_manager & m, family_id fid) :
value_factory(m, fid),
u(m), delim("!"), m_next(0) {}
@ -73,11 +73,11 @@ namespace smt {
UNREACHABLE(); return NULL;
}
virtual void register_value(expr * n) { /* Ignore */ }
};
};
// rather than modify obj_pair_map I inherit from it and add my own helper methods
class theory_str_contain_pair_bool_map_t : public obj_pair_map<expr, expr, expr*> {
public:
// rather than modify obj_pair_map I inherit from it and add my own helper methods
class theory_str_contain_pair_bool_map_t : public obj_pair_map<expr, expr, expr*> {
public:
expr * operator[](std::pair<expr*, expr*> key) const {
expr * value;
bool found = this->find(key.first, key.second, value);
@ -93,13 +93,13 @@ namespace smt {
expr * unused;
return this->find(key.first, key.second, unused);
}
};
};
template<typename Ctx>
class binary_search_trail : public trail<Ctx> {
template<typename Ctx>
class binary_search_trail : public trail<Ctx> {
obj_map<expr, ptr_vector<expr> > & target;
expr * entry;
public:
public:
binary_search_trail(obj_map<expr, ptr_vector<expr> > & target, expr * entry) :
target(target), entry(entry) {}
virtual ~binary_search_trail() {}
@ -115,11 +115,11 @@ namespace smt {
TRACE("t_str_binary_search", tout << "WARNING: attempt to access length tester map via invalid key" << std::endl;);
}
}
};
};
class nfa {
protected:
class nfa {
protected:
bool m_valid;
unsigned m_next_id;
@ -146,9 +146,9 @@ namespace smt {
// Convert a regular expression to an e-NFA using Thompson's construction
void convert_re(expr * e, unsigned & start, unsigned & end, seq_util & u);
public:
public:
nfa(seq_util & u, expr * e)
: m_valid(true), m_next_id(0), m_start_state(0), m_end_state(0) {
: m_valid(true), m_next_id(0), m_start_state(0), m_end_state(0) {
convert_re(e, m_start_state, m_end_state, u);
}
@ -161,9 +161,9 @@ namespace smt {
void epsilon_closure(unsigned start, std::set<unsigned> & closure);
bool matches(zstring input);
};
};
class theory_str : public theory {
class theory_str : public theory {
struct T_cut
{
int level;
@ -185,7 +185,7 @@ namespace smt {
};
typedef map<zstring, expr*, zstring_hash_proc, default_eq<zstring> > string_map;
protected:
protected:
theory_str_params const & m_params;
/*
@ -390,7 +390,7 @@ namespace smt {
// finite model finding data
// maps a finite model tester var to a list of variables that will be tested
obj_map<expr, ptr_vector<expr> > finite_model_test_varlists;
protected:
protected:
void assert_axiom(expr * e);
void assert_implication(expr * premise, expr * conclusion);
expr * rewrite_implication(expr * premise, expr * conclusion);
@ -604,7 +604,7 @@ namespace smt {
expr_ref set_up_finite_model_test(expr * lhs, expr * rhs);
void finite_model_test(expr * v, expr * c);
public:
public:
theory_str(ast_manager & m, theory_str_params const & params);
virtual ~theory_str();
@ -617,7 +617,7 @@ namespace smt {
void merge_eh(theory_var, theory_var, theory_var v1, theory_var v2) {}
void after_merge_eh(theory_var r1, theory_var r2, theory_var v1, theory_var v2) { }
void unmerge_eh(theory_var v1, theory_var v2) {}
protected:
protected:
virtual bool internalize_atom(app * atom, bool gate_ctx);
virtual bool internalize_term(app * term);
virtual enode* ensure_enode(expr* e);
@ -645,7 +645,7 @@ namespace smt {
virtual void init_model(model_generator & m);
virtual model_value_proc * mk_value(enode * n, model_generator & mg);
virtual void finalize_model(model_generator & mg);
};
};
};