LCOV - code coverage report
Current view: top level - buildbot/coverage/build/src/smt - smt_driver_deep_restarts.h (source / functions) Hit Total Coverage
Test: coverage.info Lines: 1 1 100.0 %
Date: 2025-02-08 13:33:28 Functions: 2 2 100.0 %
Branches: 0 0 -

           Branch data     Line data    Source code
       1                 :            : /******************************************************************************
       2                 :            :  * Top contributors (to current version):
       3                 :            :  *   Andrew Reynolds
       4                 :            :  *
       5                 :            :  * This file is part of the cvc5 project.
       6                 :            :  *
       7                 :            :  * Copyright (c) 2009-2025 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 solver for SMT queries in an SolverEngine.
      14                 :            :  */
      15                 :            : 
      16                 :            : #include "cvc5_private.h"
      17                 :            : 
      18                 :            : #ifndef CVC5__SMT__SMT_DRIVER_DEEP_RESTARTS_H
      19                 :            : #define CVC5__SMT__SMT_DRIVER_DEEP_RESTARTS_H
      20                 :            : 
      21                 :            : #include "smt/smt_driver.h"
      22                 :            : #include "util/result.h"
      23                 :            : 
      24                 :            : namespace cvc5::internal {
      25                 :            : namespace smt {
      26                 :            : 
      27                 :            : class SmtSolver;
      28                 :            : class ContextManager;
      29                 :            : 
      30                 :            : /**
      31                 :            :  * An SMT driver that is based on deep restarts.
      32                 :            :  *
      33                 :            :  * The idea of this SMT driver is to call the SMT solver with all assertions
      34                 :            :  * with learned literal tracking enabled, and where it terminates with
      35                 :            :  * "unknown" if:
      36                 :            :  * - at least one literal has been learned, and
      37                 :            :  * - no literal has been learned after some threshold.
      38                 :            :  * In this case, we preprocess and checkSat again where the SMT solver has
      39                 :            :  * its PropEngine and TheoryEngine reset.
      40                 :            :  */
      41                 :            : class SmtDriverDeepRestarts : public SmtDriver
      42                 :            : {
      43                 :            :  public:
      44                 :            :   SmtDriverDeepRestarts(Env& env, SmtSolver& smt, ContextManager* ctx);
      45                 :         16 :   virtual ~SmtDriverDeepRestarts(){}
      46                 :            : 
      47                 :            :  protected:
      48                 :            :   Result checkSatNext(preprocessing::AssertionPipeline& ap) override;
      49                 :            :   void getNextAssertions(preprocessing::AssertionPipeline& ap) override;
      50                 :            : 
      51                 :            :  private:
      52                 :            :   /** first time? */
      53                 :            :   bool d_firstTime;
      54                 :            :   /** The current learned literals */
      55                 :            :   std::vector<Node> d_zll;
      56                 :            :   /** All learned literals, used for debugging */
      57                 :            :   std::unordered_set<Node> d_allLearnedLits;
      58                 :            : };
      59                 :            : 
      60                 :            : }  // namespace smt
      61                 :            : }  // namespace cvc5::internal
      62                 :            : 
      63                 :            : #endif

Generated by: LCOV version 1.14