GCC Code Coverage Report
Directory: . Exec Total Coverage
File: src/smt/model_core_builder.h Lines: 1 1 100.0 %
Date: 2021-09-29 Branches: 0 0 0.0 %

Line Exec Source
1
/******************************************************************************
2
 * Top contributors (to current version):
3
 *   Andrew Reynolds, Mathias Preiner
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
 * Utility for building model cores.
14
 */
15
16
#include "cvc5_private.h"
17
18
#ifndef CVC5__THEORY__MODEL_CORE_BUILDER_H
19
#define CVC5__THEORY__MODEL_CORE_BUILDER_H
20
21
#include <vector>
22
23
#include "expr/node.h"
24
#include "options/smt_options.h"
25
#include "smt/env_obj.h"
26
#include "theory/theory_model.h"
27
28
namespace cvc5 {
29
30
/**
31
 * A utility for building model cores.
32
 */
33
2
class ModelCoreBuilder : protected EnvObj
34
{
35
 public:
36
  ModelCoreBuilder(Env& env);
37
  /** set model core
38
   *
39
   * This function updates model m so that it has information regarding its
40
   * "model core". A model core for m is a substitution of the form
41
   *    { s1 -> m(s1), ..., sn -> m(sn) }
42
   *
43
   * The criteria for what consistutes a model core given by mode. For
44
   * example, if mode is ModelCoresMode::SIMPLE, then a model core
45
   * corresponds to a subset of assignments from the model that suffice to show
46
   * that the set of assertions, interpreted conjunctively, evaluates to true
47
   * under the substitution corresponding to the model core.
48
   *
49
   * The model core is recorded on the model object m via calls to
50
   * m->setUsingModelCore, m->recordModelCoreSymbol, for details see
51
   * smt/model.h. In particular, we call:
52
   *   m->usingModelCore();
53
   *   m->recordModelCoreSymbol(s1); ... m->recordModelCoreSymbol(sn);
54
   * such that { s1 -> m(s1), ..., sn -> m(sn) } is the model core computed
55
   * by this class.
56
   *
57
   * If m is not a model for assertions, this method returns false and m is
58
   * left unchanged.
59
   */
60
  bool setModelCore(const std::vector<Node>& assertions,
61
                    theory::TheoryModel* m,
62
                    options::ModelCoresMode mode);
63
}; /* class TheoryModelCoreBuilder */
64
65
}  // namespace cvc5
66
67
#endif /* CVC5__THEORY__MODEL_CORE_BUILDER_H */