LCOV - code coverage report
Current view: top level - buildbot/coverage/build/src/theory/quantifiers - expr_miner_manager.h (source / functions) Hit Total Coverage
Test: coverage.info Lines: 1 1 100.0 %
Date: 2026-03-23 10:24:23 Functions: 2 2 100.0 %
Branches: 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                 :            :  * Expression miner manager, which manages individual expression miners.
      11                 :            :  */
      12                 :            : 
      13                 :            : #include "cvc5_private.h"
      14                 :            : 
      15                 :            : #ifndef CVC5__THEORY__QUANTIFIERS__EXPR_MINER_MANAGER_H
      16                 :            : #define CVC5__THEORY__QUANTIFIERS__EXPR_MINER_MANAGER_H
      17                 :            : 
      18                 :            : #include "expr/node.h"
      19                 :            : #include "smt/env_obj.h"
      20                 :            : #include "theory/quantifiers/solution_filter.h"
      21                 :            : 
      22                 :            : namespace cvc5::internal {
      23                 :            : namespace theory {
      24                 :            : namespace quantifiers {
      25                 :            : 
      26                 :            : /**
      27                 :            :  * ExpressionMinerManager
      28                 :            :  *
      29                 :            :  * NOTE: this should be renamed to "solution filter".
      30                 :            :  */
      31                 :            : class ExpressionMinerManager : protected EnvObj
      32                 :            : {
      33                 :            :  public:
      34                 :            :   ExpressionMinerManager(Env& env);
      35                 :        770 :   ~ExpressionMinerManager() {}
      36                 :            :   /** Initialize this class, sygus version
      37                 :            :    *
      38                 :            :    * Initializes this class, informing it that the terms added to this class
      39                 :            :    * via calls to addTerm will be generated by the grammar of f. The method
      40                 :            :    * takes a pointer to the quantifiers engine qe. If the argument useSygusType
      41                 :            :    * is true, the terms added to this class are the sygus datatype terms.
      42                 :            :    * If useSygusType is false, the terms are the builtin equivalent of these
      43                 :            :    * terms. The argument nsamples is used to initialize the sampler.
      44                 :            :    */
      45                 :            :   void initializeSygus(const TypeNode& tn);
      46                 :            :   /** add term
      47                 :            :    *
      48                 :            :    * Expression miners may print information on the output stream out, for
      49                 :            :    * instance, candidate-rewrites. The method returns true if the term sol is
      50                 :            :    * distinct (up to T-equivalence) with all previous terms added to this class,
      51                 :            :    * which is computed based on the miners that this manager enables.
      52                 :            :    */
      53                 :            :   bool addTerm(Node sol);
      54                 :            : 
      55                 :            :  private:
      56                 :            :   /** filter strong solutions (--sygus-filter-sol=strong) */
      57                 :            :   void enableFilterStrongSolutions();
      58                 :            :   /** filter weak solutions (--sygus-filter-sol=weak) */
      59                 :            :   void enableFilterWeakSolutions();
      60                 :            :   /** whether we are filtering solutions based on logical strength */
      61                 :            :   bool d_doFilterLogicalStrength;
      62                 :            :   /** solution filter based on logical strength */
      63                 :            :   SolutionFilterStrength d_sols;
      64                 :            :   /** The variables */
      65                 :            :   std::vector<Node> d_vars;
      66                 :            : };
      67                 :            : 
      68                 :            : }  // namespace quantifiers
      69                 :            : }  // namespace theory
      70                 :            : }  // namespace cvc5::internal
      71                 :            : 
      72                 :            : #endif /* CVC5__THEORY__QUANTIFIERS__EXPR_MINER_MANAGER_H */

Generated by: LCOV version 1.14