mirror of
https://github.com/Z3Prover/z3
synced 2026-08-04 13:13:35 +00:00
This is another PR towards the goal of getting Z3 to compile cleanly when included via FetchContents into clang-tidy, which uses a pretty strict set of warnings. This is a second version of https://github.com/Z3Prover/z3/pull/9957. I address @NikolajBjorner 's comments about not changing the semicolons after macro invocations, because some editors work better with them present. It now, to the best of my ability, only deletes semis: * after the closing brace of namespace decl. * after the closing brace of an extern "C" decl. * after a function definition. This PR is very large, but it consists entirely of deletions of semicolons in these situations. (If there was a way to update the previous PR, which had been closed, and that is preferable, please let me know. I couldn't figure it out.)
55 lines
1.2 KiB
C++
55 lines
1.2 KiB
C++
/*++
|
|
Copyright (c) 2006 Microsoft Corporation
|
|
|
|
Module Name:
|
|
|
|
smt_checker.h
|
|
|
|
Abstract:
|
|
|
|
<abstract>
|
|
|
|
Author:
|
|
|
|
Leonardo de Moura (leonardo) 2008-06-20.
|
|
|
|
Revision History:
|
|
|
|
--*/
|
|
#pragma once
|
|
|
|
#include "ast/ast.h"
|
|
#include "util/obj_hashtable.h"
|
|
|
|
namespace smt {
|
|
|
|
class context;
|
|
|
|
class checker {
|
|
|
|
typedef obj_map<expr, bool> expr2bool;
|
|
typedef obj_map<expr, enode *> expr2enode;
|
|
|
|
context & m_context;
|
|
ast_manager & m_manager;
|
|
expr2bool m_is_true_cache[2];
|
|
expr2enode m_to_enode_cache;
|
|
unsigned m_num_bindings;
|
|
enode * const * m_bindings;
|
|
|
|
bool all_args(app *a, unsigned depth, bool is_true);
|
|
bool any_arg(app *a, unsigned depth, bool is_true);
|
|
bool check_core(expr * n, unsigned depth, bool is_true);
|
|
bool check(expr *n, unsigned depth, bool is_true);
|
|
enode * get_enode_eq_to_core(app * n);
|
|
enode * get_enode_eq_to(expr * n);
|
|
|
|
public:
|
|
checker(context & c);
|
|
bool is_sat(expr * n, unsigned num_bindings = 0, enode * const * bindings = nullptr);
|
|
bool is_unsat(expr * n, unsigned num_bindings = 0, enode * const * bindings = nullptr);
|
|
};
|
|
|
|
}
|
|
|
|
|