LCOV - code coverage report
Current view: top level - buildbot/coverage/build/src/theory/builtin - theory_builtin.cpp (source / functions) Hit Total Coverage
Test: coverage.info Lines: 9 11 81.8 %
Date: 2024-11-17 12:40:58 Functions: 4 5 80.0 %
Branches: 0 0 -

           Branch data     Line data    Source code
       1                 :            : /******************************************************************************
       2                 :            :  * Top contributors (to current version):
       3                 :            :  *   Andrew Reynolds, Mudathir Mohamed, Gereon Kremer
       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 the builtin theory.
      14                 :            :  */
      15                 :            : 
      16                 :            : #include "theory/builtin/theory_builtin.h"
      17                 :            : 
      18                 :            : #include "expr/kind.h"
      19                 :            : #include "proof/proof_node_manager.h"
      20                 :            : #include "theory/builtin/theory_builtin_rewriter.h"
      21                 :            : #include "theory/theory_model.h"
      22                 :            : #include "theory/valuation.h"
      23                 :            : 
      24                 :            : namespace cvc5::internal {
      25                 :            : namespace theory {
      26                 :            : namespace builtin {
      27                 :            : 
      28                 :      49837 : TheoryBuiltin::TheoryBuiltin(Env& env, OutputChannel& out, Valuation valuation)
      29                 :            :     : Theory(THEORY_BUILTIN, env, out, valuation),
      30                 :            :       d_rewriter(env.getNodeManager()),
      31                 :            :       d_checker(env.getNodeManager(), env.getRewriter(), env),
      32                 :            :       d_state(env, valuation),
      33                 :      49837 :       d_im(env, *this, d_state, "theory::builtin::")
      34                 :            : {
      35                 :            :   // indicate we are using the default theory state and inference managers
      36                 :      49837 :   d_theoryState = &d_state;
      37                 :      49837 :   d_inferManager = &d_im;
      38                 :      49837 : }
      39                 :            : 
      40                 :      49837 : TheoryRewriter* TheoryBuiltin::getTheoryRewriter() { return &d_rewriter; }
      41                 :            : 
      42                 :      19203 : ProofRuleChecker* TheoryBuiltin::getProofChecker() { return &d_checker; }
      43                 :            : 
      44                 :          0 : std::string TheoryBuiltin::identify() const
      45                 :            : {
      46                 :          0 :   return std::string("TheoryBuiltin");
      47                 :            : }
      48                 :            : 
      49                 :      49837 : void TheoryBuiltin::finishInit()
      50                 :            : {
      51                 :            :   // Notice that choice is an unevaluated kind belonging to this theory.
      52                 :            :   // However, it should be set as an unevaluated kind where it is used, e.g.
      53                 :            :   // in the quantifiers theory. This ensures that a logic like QF_LIA, which
      54                 :            :   // includes the builtin theory, does not mark any kinds as unevaluated and
      55                 :            :   // hence it is easy to check for illegal eliminations via TheoryModel
      56                 :            :   // (see TheoryModel::isLegalElimination) since there are no unevaluated kinds
      57                 :            :   // present.
      58                 :      49837 : }
      59                 :            : 
      60                 :            : }  // namespace builtin
      61                 :            : }  // namespace theory
      62                 :            : }  // namespace cvc5::internal

Generated by: LCOV version 1.14