blob: b4336d395e5bc033030eb55f1ec5919cde31405c (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
|
/********************* */
/*! \file variable_ordering.h
** \verbatim
** Top contributors (to current version):
** Gereon Kremer
** This file is part of the CVC4 project.
** Copyright (c) 2009-2021 by the authors listed in the file AUTHORS
** in the top-level source directory and their institutional affiliations.
** All rights reserved. See the file COPYING in the top-level source
** directory for licensing information.\endverbatim
**
** \brief Implements variable orderings tailored to CAD.
**
** Implements variable orderings tailored to CAD.
**/
#include "cvc4_private.h"
#ifndef CVC5__THEORY__ARITH__NL__CAD__VARIABLE_ORDERING_H
#define CVC5__THEORY__ARITH__NL__CAD__VARIABLE_ORDERING_H
#ifdef CVC4_POLY_IMP
#include <poly/polyxx.h>
#include "theory/arith/nl/cad/constraints.h"
#include "util/poly_util.h"
namespace cvc5 {
namespace theory {
namespace arith {
namespace nl {
namespace cad {
/** Variable orderings for real variables in the context of CAD. */
enum class VariableOrderingStrategy
{
/** Dummy ordering by variable ID. */
BYID,
/** Triangular as of DOI:10.1145/2755996.2756678 */
TRIANGULAR,
/** Brown as of DOI:10.1145/2755996.2756678 */
BROWN
};
class VariableOrdering
{
public:
VariableOrdering();
~VariableOrdering();
std::vector<poly::Variable> operator()(
const Constraints::ConstraintVector& polys,
VariableOrderingStrategy vos) const;
};
/**
* Retrieves variable information for all variables with the given polynomials.
* If with_totals is set, the last element of the vector contains totals as
* computed by get_variable_information if no variable is specified.
*/
std::vector<poly_utils::VariableInformation> collectInformation(
const Constraints::ConstraintVector& polys, bool with_totals = false);
} // namespace cad
} // namespace nl
} // namespace arith
} // namespace theory
} // namespace cvc5
#endif
#endif
|