GCC Code Coverage Report
Directory: . Exec Total Coverage
File: src/smt/listeners.cpp Lines: 2 7 28.6 %
Date: 2021-11-06 Branches: 2 26 7.7 %

Line Exec Source
1
/******************************************************************************
2
 * Top contributors (to current version):
3
 *   Andrew Reynolds, Abdalrhman Mohamed
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
 * Implements listener classes for SMT engine.
14
 */
15
16
#include "smt/listeners.h"
17
18
#include "smt/solver_engine.h"
19
#include "smt/solver_engine_scope.h"
20
21
namespace cvc5 {
22
namespace smt {
23
24
18632
ResourceOutListener::ResourceOutListener(SolverEngine& slv) : d_slv(slv) {}
25
26
void ResourceOutListener::notify()
27
{
28
  SolverEngineScope scope(&d_slv);
29
  Assert(smt::solverEngineInScope());
30
  d_slv.interrupt();
31
}
32
33
}  // namespace smt
34
31137
}  // namespace cvc5