3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2026-08-02 20:23:27 +00:00
z3/src/nlsat/nlsat_evaluator.h
davedets 6ac3075022
Remove unnecessary semicolons (Attempt 2) (#10020)
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.)
2026-07-02 12:47:29 -07:00

61 lines
1.4 KiB
C++

/*++
Copyright (c) 2012 Microsoft Corporation
Module Name:
nlsat_evaluator.h
Abstract:
Helper class for computing the infeasible intervals of an
arithmetic literal.
Author:
Leonardo de Moura (leonardo) 2012-01-12.
Revision History:
--*/
#pragma once
#include "nlsat/nlsat_types.h"
#include "nlsat/nlsat_assignment.h"
#include "nlsat/nlsat_interval_set.h"
namespace nlsat {
class solver;
class evaluator {
struct imp;
imp * m_imp;
public:
evaluator(solver& s, assignment const & x2v, pmanager & pm, small_object_allocator & allocator);
~evaluator();
interval_set_manager & ism() const;
/**
\brief Evaluate the given literal in the current model.
All variables in the atom must be assigned.
The result is true if the literal is satisfied, and false otherwise.
*/
bool eval(atom * a, bool neg);
/**
\brief Return the infeasible interval set for the given literal.
All but the a->max_var() must be assigned in the current model.
Let x be a->max_var(). Then, the resultant set specifies which
values of x falsify the given literal.
*/
interval_set_ref infeasible_intervals(atom * a, bool neg, clause const* cls);
void push();
void pop(unsigned num_scopes);
};
}