GCC Code Coverage Report
Directory: . Exec Total Coverage
File: src/theory/bags/make_bag_op.cpp Lines: 11 13 84.6 %
Date: 2021-03-23 Branches: 7 16 43.8 %

Line Exec Source
1
/*********************                                                        */
2
/*! \file make_bag_op.cpp
3
 ** \verbatim
4
 ** Top contributors (to current version):
5
 **   Mudathir Mohamed
6
 ** This file is part of the CVC4 project.
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.\endverbatim
11
 **
12
 ** \brief a class for MK_BAG operator
13
 **/
14
15
#include "make_bag_op.h"
16
17
#include <iostream>
18
19
#include "expr/type_node.h"
20
21
namespace CVC4 {
22
23
std::ostream& operator<<(std::ostream& out, const MakeBagOp& op)
24
{
25
  return out << "(mkBag_op " << op.getType() << ')';
26
}
27
28
652
size_t MakeBagOpHashFunction::operator()(const MakeBagOp& op) const
29
{
30
652
  return TypeNodeHashFunction()(op.getType());
31
}
32
33
328
MakeBagOp::MakeBagOp(const TypeNode& elementType)
34
328
    : d_type(new TypeNode(elementType))
35
{
36
328
}
37
38
338
MakeBagOp::MakeBagOp(const MakeBagOp& op) : d_type(new TypeNode(op.getType()))
39
{
40
338
}
41
42
2065
const TypeNode& MakeBagOp::getType() const { return *d_type; }
43
44
409
bool MakeBagOp::operator==(const MakeBagOp& op) const
45
{
46
409
  return getType() == op.getType();
47
}
48
49
26685
}  // namespace CVC4