mirror of
https://github.com/Z3Prover/z3
synced 2026-02-22 16:27:37 +00:00
* Initial plan * Modernize C++ constructors to use C++11 default member initialization - Phase 1 Co-authored-by: nunoplopes <2998477+nunoplopes@users.noreply.github.com> * Fix theory_pb.h struct definition - move reset() back inside struct Co-authored-by: nunoplopes <2998477+nunoplopes@users.noreply.github.com> * Modernize C++ constructors to use C++11 default member initialization - Phase 2 Co-authored-by: nunoplopes <2998477+nunoplopes@users.noreply.github.com> * Fix opt_solver.h - revert rational initialization (complex type) Co-authored-by: nunoplopes <2998477+nunoplopes@users.noreply.github.com> * Modernize C++ constructors to use C++11 default member initialization - Phase 3 Co-authored-by: nunoplopes <2998477+nunoplopes@users.noreply.github.com> * Fix sparse_matrix.h - explicitly initialize union member in default constructor Co-authored-by: nunoplopes <2998477+nunoplopes@users.noreply.github.com> * Remove unnecessary default constructors when they're the only constructor Co-authored-by: nunoplopes <2998477+nunoplopes@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: nunoplopes <2998477+nunoplopes@users.noreply.github.com>
47 lines
903 B
C++
47 lines
903 B
C++
/*++
|
|
Copyright (c) 2006 Microsoft Corporation
|
|
|
|
Module Name:
|
|
|
|
expr_stat.h
|
|
|
|
Abstract:
|
|
|
|
Expression statistics (symbol count, var count, depth, ...)
|
|
|
|
All functions in these module assume expressions do not contain
|
|
nested quantifiers.
|
|
|
|
Author:
|
|
|
|
Leonardo de Moura (leonardo) 2008-02-05.
|
|
|
|
Revision History:
|
|
|
|
--*/
|
|
#pragma once
|
|
|
|
class expr;
|
|
|
|
struct expr_stat {
|
|
unsigned m_sym_count = 0; // symbol count
|
|
unsigned m_depth = 0; // depth
|
|
unsigned m_const_count = 0; // constant count
|
|
unsigned m_max_var_idx = 0;
|
|
bool m_ground = true;
|
|
};
|
|
|
|
/**
|
|
\brief Collect statistics regarding the given expression.
|
|
|
|
\warning This function traverses the dag as a tree.
|
|
*/
|
|
void get_expr_stat(expr * n, expr_stat & r);
|
|
|
|
/**
|
|
\brief Return the number of symbols in \c n.
|
|
|
|
\warning This function traverses the dag as a tree.
|
|
*/
|
|
unsigned get_symbol_count(expr * n);
|
|
|