GCC Code Coverage Report
Directory: . Exec Total Coverage
File: src/theory/arith/branch_and_bound.h Lines: 1 1 100.0 %
Date: 2021-09-17 Branches: 0 0 0.0 %

Line Exec Source
1
/******************************************************************************
2
 * Top contributors (to current version):
3
 *   Andrew Reynolds
4
 *
5
 * This file is part of the cvc5 project.
6
 *
7
 * Copyright (c) 2009-2021 by the authors listed in the file AUTHORS
8
 * in the top-level source directory and their institutional affiliations.
9
 * All rights reserved.  See the file COPYING in the top-level source
10
 * directory for licensing information.
11
 * ****************************************************************************
12
 *
13
 * Branch and bound for arithmetic
14
 */
15
16
#include "cvc5_private.h"
17
18
#ifndef CVC5__THEORY__ARITH__BRANCH_AND_BOUND__H
19
#define CVC5__THEORY__ARITH__BRANCH_AND_BOUND__H
20
21
#include <map>
22
23
#include "expr/node.h"
24
#include "proof/proof_node_manager.h"
25
#include "proof/trust_node.h"
26
#include "smt/env_obj.h"
27
#include "theory/arith/arith_state.h"
28
#include "theory/arith/inference_manager.h"
29
#include "theory/arith/pp_rewrite_eq.h"
30
#include "util/rational.h"
31
32
namespace cvc5 {
33
namespace theory {
34
namespace arith {
35
36
/**
37
 * Class is responsible for constructing branch and bound lemmas. It is
38
 * agnostic to the state of solver; instead is simply given (variable, value)
39
 * pairs in branchIntegerVariable below and constructs the appropriate lemma.
40
 */
41
class BranchAndBound : protected EnvObj
42
{
43
 public:
44
  BranchAndBound(Env& env,
45
                 ArithState& s,
46
                 InferenceManager& im,
47
                 PreprocessRewriteEq& ppre,
48
                 ProofNodeManager* pnm);
49
9939
  ~BranchAndBound() {}
50
  /**
51
   * Branch variable, called when integer var has given value
52
   * in the current model, returns a split to eliminate this model.
53
   */
54
  TrustNode branchIntegerVariable(TNode var, Rational value);
55
56
 private:
57
  /** Are proofs enabled? */
58
  bool proofsEnabled() const;
59
  /** Reference to the state */
60
  ArithState& d_astate;
61
  /** Reference to the inference manager */
62
  InferenceManager& d_im;
63
  /** Reference to the preprocess rewriter for equality */
64
  PreprocessRewriteEq& d_ppre;
65
  /** Proof generator. */
66
  std::unique_ptr<EagerProofGenerator> d_pfGen;
67
  /** Proof node manager */
68
  ProofNodeManager* d_pnm;
69
};
70
71
}  // namespace arith
72
}  // namespace theory
73
}  // namespace cvc5
74
75
#endif