mirror of
https://github.com/Z3Prover/z3
synced 2025-04-23 17:15:31 +00:00
theory_str static features and cmd_context
This commit is contained in:
parent
62a36189d5
commit
88147f7047
4 changed files with 18 additions and 2 deletions
|
@ -25,6 +25,7 @@ static_features::static_features(ast_manager & m):
|
|||
m_bvutil(m),
|
||||
m_arrayutil(m),
|
||||
m_fpautil(m),
|
||||
m_sequtil(m),
|
||||
m_bfid(m.get_basic_family_id()),
|
||||
m_afid(m.mk_family_id("arith")),
|
||||
m_lfid(m.mk_family_id("label")),
|
||||
|
@ -77,6 +78,8 @@ void static_features::reset() {
|
|||
m_has_real = false;
|
||||
m_has_bv = false;
|
||||
m_has_fpa = false;
|
||||
m_has_str = false;
|
||||
m_has_seq_non_str = false;
|
||||
m_has_arrays = false;
|
||||
m_arith_k_sum .reset();
|
||||
m_num_arith_terms = 0;
|
||||
|
@ -279,6 +282,11 @@ void static_features::update_core(expr * e) {
|
|||
m_has_fpa = true;
|
||||
if (!m_has_arrays && m_arrayutil.is_array(e))
|
||||
m_has_arrays = true;
|
||||
if (!m_has_str && m_sequtil.str.is_string_term(e))
|
||||
m_has_str = true;
|
||||
if (!m_has_seq_non_str && m_sequtil.str.is_non_string_sequence(e)) {
|
||||
m_has_seq_non_str = true;
|
||||
}
|
||||
if (is_app(e)) {
|
||||
family_id fid = to_app(e)->get_family_id();
|
||||
mark_theory(fid);
|
||||
|
|
|
@ -24,6 +24,7 @@ Revision History:
|
|||
#include"bv_decl_plugin.h"
|
||||
#include"array_decl_plugin.h"
|
||||
#include"fpa_decl_plugin.h"
|
||||
#include"seq_decl_plugin.h"
|
||||
#include"map.h"
|
||||
|
||||
struct static_features {
|
||||
|
@ -32,6 +33,7 @@ struct static_features {
|
|||
bv_util m_bvutil;
|
||||
array_util m_arrayutil;
|
||||
fpa_util m_fpautil;
|
||||
seq_util m_sequtil;
|
||||
family_id m_bfid;
|
||||
family_id m_afid;
|
||||
family_id m_lfid;
|
||||
|
@ -77,6 +79,8 @@ struct static_features {
|
|||
bool m_has_real; //
|
||||
bool m_has_bv; //
|
||||
bool m_has_fpa; //
|
||||
bool m_has_str; // has String-typed terms
|
||||
bool m_has_seq_non_str; // has non-String-typed Sequence terms
|
||||
bool m_has_arrays; //
|
||||
rational m_arith_k_sum; // sum of the numerals in arith atoms.
|
||||
unsigned m_num_arith_terms;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue