LCOV - code coverage report
Current view: top level - buildbot/coverage/build/src/theory/bags - term_registry.cpp (source / functions) Hit Total Coverage
Test: coverage.info Lines: 4 11 36.4 %
Date: 2024-12-26 12:37:17 Functions: 1 2 50.0 %
Branches: 0 2 0.0 %

           Branch data     Line data    Source code
       1                 :            : /******************************************************************************
       2                 :            :  * Top contributors (to current version):
       3                 :            :  *   Mudathir Mohamed, Andres Noetzli, Mathias Preiner
       4                 :            :  *
       5                 :            :  * This file is part of the cvc5 project.
       6                 :            :  *
       7                 :            :  * Copyright (c) 2009-2024 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                 :            :  * Implementation of bags term registry object.
      14                 :            :  */
      15                 :            : 
      16                 :            : #include "theory/bags/term_registry.h"
      17                 :            : 
      18                 :            : #include "expr/emptyset.h"
      19                 :            : #include "theory/bags/inference_manager.h"
      20                 :            : #include "theory/bags/solver_state.h"
      21                 :            : 
      22                 :            : using namespace std;
      23                 :            : using namespace cvc5::internal::kind;
      24                 :            : 
      25                 :            : namespace cvc5::internal {
      26                 :            : namespace theory {
      27                 :            : namespace bags {
      28                 :            : 
      29                 :      49993 : TermRegistry::TermRegistry(Env& env, SolverState& state, InferenceManager& im)
      30                 :            :     : EnvObj(env),
      31                 :            :       d_im(im),
      32                 :      99986 :       d_proxy(userContext()),
      33                 :      49993 :       d_proxy_to_term(userContext())
      34                 :            : {
      35                 :      49993 : }
      36                 :            : 
      37                 :          0 : Node TermRegistry::getEmptyBag(TypeNode tn)
      38                 :            : {
      39                 :          0 :   std::map<TypeNode, Node>::iterator it = d_emptybag.find(tn);
      40         [ -  - ]:          0 :   if (it != d_emptybag.end())
      41                 :            :   {
      42                 :          0 :     return it->second;
      43                 :            :   }
      44                 :          0 :   Node n = nodeManager()->mkConst(EmptySet(tn));
      45                 :          0 :   d_emptybag[tn] = n;
      46                 :          0 :   return n;
      47                 :            : }
      48                 :            : 
      49                 :            : }  // namespace bags
      50                 :            : }  // namespace theory
      51                 :            : }  // namespace cvc5::internal

Generated by: LCOV version 1.14