LCOV - code coverage report
Current view: top level - buildbot/coverage/build/src/preprocessing/passes - rewrite.cpp (source / functions) Hit Total Coverage
Test: coverage.info Lines: 7 8 87.5 %
Date: 2024-08-29 11:49:29 Functions: 2 2 100.0 %
Branches: 3 4 75.0 %

           Branch data     Line data    Source code
       1                 :            : /******************************************************************************
       2                 :            :  * Top contributors (to current version):
       3                 :            :  *   Caleb Donovick, Andrew Reynolds, Aina Niemetz
       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                 :            :  * The rewrite preprocessing pass.
      14                 :            :  *
      15                 :            :  * Calls the rewriter on every assertion.
      16                 :            :  */
      17                 :            : 
      18                 :            : #include "preprocessing/passes/rewrite.h"
      19                 :            : 
      20                 :            : #include "preprocessing/assertion_pipeline.h"
      21                 :            : #include "theory/rewriter.h"
      22                 :            : 
      23                 :            : namespace cvc5::internal {
      24                 :            : namespace preprocessing {
      25                 :            : namespace passes {
      26                 :            : 
      27                 :            : using namespace cvc5::internal::theory;
      28                 :            : 
      29                 :      48144 : Rewrite::Rewrite(PreprocessingPassContext* preprocContext)
      30                 :      48144 :     : PreprocessingPass(preprocContext, "rewrite"){};
      31                 :            : 
      32                 :            : 
      33                 :      72808 : PreprocessingPassResult Rewrite::applyInternal(
      34                 :            :   AssertionPipeline* assertionsToPreprocess)
      35                 :            : {
      36         [ +  + ]:    1021680 :   for (size_t i = 0, size = assertionsToPreprocess->size(); i < size; ++i)
      37                 :            :   {
      38                 :     948877 :     assertionsToPreprocess->replace(i, rewrite((*assertionsToPreprocess)[i]));
      39         [ -  + ]:     948877 :     if (assertionsToPreprocess->isInConflict())
      40                 :            :     {
      41                 :          0 :       return PreprocessingPassResult::CONFLICT;
      42                 :            :     }
      43                 :            :   }
      44                 :      72808 :   return PreprocessingPassResult::NO_CONFLICT;
      45                 :            : }
      46                 :            : 
      47                 :            : 
      48                 :            : }  // namespace passes
      49                 :            : }  // namespace preprocessing
      50                 :            : }  // namespace cvc5::internal

Generated by: LCOV version 1.14