LCOV - code coverage report
Current view: top level - buildbot/coverage/build/src/theory - lemma_property.cpp (source / functions) Hit Total Coverage
Test: coverage.info Lines: 17 36 47.2 %
Date: 2026-03-21 10:41:10 Functions: 8 10 80.0 %
Branches: 0 12 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                 :            :  * The lemma property definition
      11                 :            :  */
      12                 :            : 
      13                 :            : #include "theory/lemma_property.h"
      14                 :            : 
      15                 :            : #include <ostream>
      16                 :            : 
      17                 :            : namespace cvc5::internal {
      18                 :            : namespace theory {
      19                 :            : 
      20                 :       4498 : LemmaProperty operator|(LemmaProperty lhs, LemmaProperty rhs)
      21                 :            : {
      22                 :            :   return static_cast<LemmaProperty>(static_cast<uint32_t>(lhs)
      23                 :       4498 :                                     | static_cast<uint32_t>(rhs));
      24                 :            : }
      25                 :       4498 : LemmaProperty& operator|=(LemmaProperty& lhs, LemmaProperty rhs)
      26                 :            : {
      27                 :       4498 :   lhs = lhs | rhs;
      28                 :       4498 :   return lhs;
      29                 :            : }
      30                 :    6435849 : LemmaProperty operator&(LemmaProperty lhs, LemmaProperty rhs)
      31                 :            : {
      32                 :            :   return static_cast<LemmaProperty>(static_cast<uint32_t>(lhs)
      33                 :    6435849 :                                     & static_cast<uint32_t>(rhs));
      34                 :            : }
      35                 :          0 : LemmaProperty& operator&=(LemmaProperty& lhs, LemmaProperty rhs)
      36                 :            : {
      37                 :          0 :   lhs = lhs & rhs;
      38                 :          0 :   return lhs;
      39                 :            : }
      40                 :     900670 : bool isLemmaPropertyRemovable(LemmaProperty p)
      41                 :            : {
      42                 :     900670 :   return (p & LemmaProperty::REMOVABLE) == LemmaProperty::REMOVABLE;
      43                 :            : }
      44                 :     701366 : bool isLemmaPropertySendAtoms(LemmaProperty p)
      45                 :            : {
      46                 :     701366 :   return (p & LemmaProperty::SEND_ATOMS) == LemmaProperty::SEND_ATOMS;
      47                 :            : }
      48                 :        333 : bool isLemmaPropertyNeedsJustify(LemmaProperty p)
      49                 :            : {
      50                 :        333 :   return (p & LemmaProperty::NEEDS_JUSTIFY) == LemmaProperty::NEEDS_JUSTIFY;
      51                 :            : }
      52                 :     900670 : bool isLemmaPropertyInprocess(LemmaProperty p)
      53                 :            : {
      54                 :     900670 :   return (p & LemmaProperty::INPROCESS) == LemmaProperty::INPROCESS;
      55                 :            : }
      56                 :    3932810 : bool isLemmaPropertyLocal(LemmaProperty p)
      57                 :            : {
      58                 :    3932810 :   return (p & LemmaProperty::LOCAL) == LemmaProperty::LOCAL;
      59                 :            : }
      60                 :            : 
      61                 :          0 : std::ostream& operator<<(std::ostream& out, LemmaProperty p)
      62                 :            : {
      63         [ -  - ]:          0 :   if (p == LemmaProperty::NONE)
      64                 :            :   {
      65                 :          0 :     out << "NONE";
      66                 :            :   }
      67                 :            :   else
      68                 :            :   {
      69                 :          0 :     out << "{";
      70         [ -  - ]:          0 :     if (isLemmaPropertyRemovable(p))
      71                 :            :     {
      72                 :          0 :       out << " REMOVABLE";
      73                 :            :     }
      74         [ -  - ]:          0 :     if (isLemmaPropertySendAtoms(p))
      75                 :            :     {
      76                 :          0 :       out << " SEND_ATOMS";
      77                 :            :     }
      78         [ -  - ]:          0 :     if (isLemmaPropertyNeedsJustify(p))
      79                 :            :     {
      80                 :          0 :       out << " NEEDS_JUSTIFY";
      81                 :            :     }
      82         [ -  - ]:          0 :     if (isLemmaPropertyInprocess(p))
      83                 :            :     {
      84                 :          0 :       out << " INPROCESS";
      85                 :            :     }
      86         [ -  - ]:          0 :     if (isLemmaPropertyLocal(p))
      87                 :            :     {
      88                 :          0 :       out << " LOCAL";
      89                 :            :     }
      90                 :          0 :     out << " }";
      91                 :            :   }
      92                 :          0 :   return out;
      93                 :            : }
      94                 :            : 
      95                 :            : }  // namespace theory
      96                 :            : }  // namespace cvc5::internal

Generated by: LCOV version 1.14