GCC Code Coverage Report
Directory: . Exec Total Coverage
File: src/theory/bags/make_bag_op.cpp Lines: 11 13 84.6 %
Date: 2021-08-14 Branches: 6 12 50.0 %

Line Exec Source
1
/******************************************************************************
2
 * Top contributors (to current version):
3
 *   Mudathir 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
 * A class for MK_BAG operator.
14
 */
15
16
#include "make_bag_op.h"
17
18
#include <iostream>
19
20
#include "expr/type_node.h"
21
22
namespace cvc5 {
23
24
std::ostream& operator<<(std::ostream& out, const MakeBagOp& op)
25
{
26
  return out << "(mkBag_op " << op.getType() << ')';
27
}
28
29
646
size_t MakeBagOpHashFunction::operator()(const MakeBagOp& op) const
30
{
31
646
  return std::hash<TypeNode>()(op.getType());
32
}
33
34
322
MakeBagOp::MakeBagOp(const TypeNode& elementType)
35
322
    : d_type(new TypeNode(elementType))
36
{
37
322
}
38
39
338
MakeBagOp::MakeBagOp(const MakeBagOp& op) : d_type(new TypeNode(op.getType()))
40
{
41
338
}
42
43
2047
const TypeNode& MakeBagOp::getType() const { return *d_type; }
44
45
403
bool MakeBagOp::operator==(const MakeBagOp& op) const
46
{
47
403
  return getType() == op.getType();
48
}
49
50
29340
}  // namespace cvc5