LCOV - code coverage report
Current view: top level - buildbot/coverage/build/src/expr - emptyset.cpp (source / functions) Hit Total Coverage
Test: coverage.info Lines: 8 13 61.5 %
Date: 2026-04-14 10:42:21 Functions: 6 8 75.0 %
Branches: 0 0 -

           Branch data     Line data    Source code
       1                 :            : /******************************************************************************
       2                 :            :  * This file is part of the cvc5 project.
       3                 :            :  *
       4                 :            :  * Copyright (c) 2009-2026 by the authors listed in the file AUTHORS
       5                 :            :  * in the top-level source directory and their institutional affiliations.
       6                 :            :  * All rights reserved.  See the file COPYING in the top-level source
       7                 :            :  * directory for licensing information.
       8                 :            :  * ****************************************************************************
       9                 :            :  *
      10                 :            :  * Payload class for empty sets.
      11                 :            :  */
      12                 :            : 
      13                 :            : #include "expr/emptyset.h"
      14                 :            : 
      15                 :            : #include <iostream>
      16                 :            : 
      17                 :            : #include "expr/type_node.h"
      18                 :            : 
      19                 :            : namespace cvc5::internal {
      20                 :            : 
      21                 :          0 : std::ostream& operator<<(std::ostream& out, const EmptySet& asa)
      22                 :            : {
      23                 :          0 :   return out << "emptyset(" << asa.getType() << ')';
      24                 :            : }
      25                 :            : 
      26                 :      68951 : size_t EmptySetHashFunction::operator()(const EmptySet& es) const
      27                 :            : {
      28                 :      68951 :   return std::hash<TypeNode>()(es.getType());
      29                 :            : }
      30                 :            : 
      31                 :            : /**
      32                 :            :  * Constructs an emptyset of the specified type. Note that the argument
      33                 :            :  * is the type of the set itself, NOT the type of the elements.
      34                 :            :  */
      35                 :      19899 : EmptySet::EmptySet(const TypeNode& setType) : d_type(new TypeNode(setType)) {}
      36                 :            : 
      37                 :      24670 : EmptySet::EmptySet(const EmptySet& es) : d_type(new TypeNode(es.getType())) {}
      38                 :            : 
      39                 :          0 : EmptySet& EmptySet::operator=(const EmptySet& es)
      40                 :            : {
      41                 :          0 :   (*d_type) = es.getType();
      42                 :          0 :   return *this;
      43                 :            : }
      44                 :            : 
      45                 :      44523 : EmptySet::~EmptySet() {}
      46                 :     171314 : const TypeNode& EmptySet::getType() const { return *d_type; }
      47                 :      32093 : bool EmptySet::operator==(const EmptySet& es) const
      48                 :            : {
      49                 :      32093 :   return getType() == es.getType();
      50                 :            : }
      51                 :            : }  // namespace cvc5::internal

Generated by: LCOV version 1.14