mirror of
https://github.com/Z3Prover/z3
synced 2026-07-18 13:05:46 +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.)
43 lines
966 B
C++
43 lines
966 B
C++
/*++
|
|
Copyright (c) 2012 Microsoft Corporation
|
|
|
|
Module Name:
|
|
|
|
polynomial_cache.h
|
|
|
|
Abstract:
|
|
|
|
"Hash-consing" for polynomials
|
|
|
|
Author:
|
|
|
|
Leonardo (leonardo) 2012-01-07
|
|
|
|
Notes:
|
|
|
|
--*/
|
|
#pragma once
|
|
|
|
#include "math/polynomial/polynomial.h"
|
|
|
|
namespace polynomial {
|
|
|
|
/**
|
|
\brief Functor for creating unique polynomials and caching results of operations
|
|
*/
|
|
class cache {
|
|
struct imp;
|
|
imp * m_imp;
|
|
public:
|
|
cache(manager & m);
|
|
~cache();
|
|
manager & m() const;
|
|
manager & pm() const { return m(); }
|
|
polynomial * mk_unique(polynomial * p);
|
|
bool contains(const polynomial * p) const;
|
|
bool contains_chain(polynomial const * p, polynomial const * q, var x) const;
|
|
void psc_chain(polynomial const * p, polynomial const * q, var x, polynomial_ref_vector & S);
|
|
void factor(polynomial const * p, polynomial_ref_vector & distinct_factors);
|
|
void reset();
|
|
};
|
|
}
|