summaryrefslogtreecommitdiff
path: root/src/smt/dump_manager.cpp
blob: 83ff8e6b94417330ed0616ee02f2f820ba2df125 (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
73
74
75
76
/******************************************************************************
 * Top contributors (to current version):
 *   Andrew Reynolds, Gereon Kremer, Morgan Deters
 *
 * This file is part of the cvc5 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.
 * ****************************************************************************
 *
 * Implementation of the dump manager.
 */

#include "smt/dump_manager.h"

#include "options/smt_options.h"
#include "smt/dump.h"
#include "smt/node_command.h"

namespace cvc5 {
namespace smt {

DumpManager::DumpManager(context::UserContext* u)
    : d_fullyInited(false),
      d_dumpCommands()
{
}

DumpManager::~DumpManager()
{
  d_dumpCommands.clear();
}

void DumpManager::finishInit()
{
  Trace("smt-debug") << "Dump declaration commands..." << std::endl;
  // dump out any pending declaration commands
  for (size_t i = 0, ncoms = d_dumpCommands.size(); i < ncoms; ++i)
  {
    Dump("declarations") << *d_dumpCommands[i];
  }
  d_dumpCommands.clear();

  d_fullyInited = true;
}
void DumpManager::resetAssertions()
{
  // currently, do nothing
}

void DumpManager::addToDump(const NodeCommand& c, const char* dumpTag)
{
  Trace("smt") << "SMT addToDump(" << c << ")" << std::endl;
  if (Dump.isOn(dumpTag))
  {
    if (d_fullyInited)
    {
      Dump(dumpTag) << c;
    }
    else
    {
      d_dumpCommands.push_back(std::unique_ptr<NodeCommand>(c.clone()));
    }
  }
}

void DumpManager::setPrintFuncInModel(Node f, bool p)
{
  Trace("setp-model") << "Set printInModel " << f << " to " << p << std::endl;
  // TODO (cvc4-wishues/issues/75): implement
}

}  // namespace smt
}  // namespace cvc5
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback