GCC Code Coverage Report
Directory: . Exec Total Coverage
File: src/proof/print_expr.cpp Lines: 17 20 85.0 %
Date: 2021-11-05 Branches: 14 44 31.8 %

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
 * Utilities for printing expressions in proofs
14
 */
15
16
#include "proof/print_expr.h"
17
18
namespace cvc5 {
19
namespace proof {
20
21
78
PExprStream::PExprStream(std::vector<PExpr>& stream, Node tt, Node ff)
22
78
    : d_stream(stream), d_tt(tt), d_ff(ff)
23
{
24
78
}
25
26
92
PExprStream& PExprStream::operator<<(const ProofNode* pn)
27
{
28
92
  d_stream.push_back(PExpr(pn));
29
92
  return *this;
30
}
31
32
30
PExprStream& PExprStream::operator<<(Node n)
33
{
34
30
  d_stream.push_back(PExpr(n));
35
30
  return *this;
36
}
37
38
PExprStream& PExprStream::operator<<(TypeNode tn)
39
{
40
  d_stream.push_back(PExpr(tn));
41
  return *this;
42
}
43
44
2
PExprStream& PExprStream::operator<<(bool b)
45
{
46
2
  Assert(!d_tt.isNull() && !d_ff.isNull());
47
2
  d_stream.push_back(b ? d_tt : d_ff);
48
2
  return *this;
49
}
50
51
170
PExprStream& PExprStream::operator<<(PExpr p)
52
{
53
170
  d_stream.push_back(p);
54
170
  return *this;
55
}
56
57
}  // namespace proof
58
31125
}  // namespace cvc5