LCOV - code coverage report
Current view: top level - buildbot/coverage/build/src/theory/bags - infer_info.h (source / functions) Hit Total Coverage
Test: coverage.info Lines: 1 1 100.0 %
Date: 2026-03-15 10:41:23 Functions: 1 2 50.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                 :            :  * Inference information utility.
      11                 :            :  */
      12                 :            : 
      13                 :            : #include "cvc5_private.h"
      14                 :            : 
      15                 :            : #ifndef CVC5__THEORY__BAGS__INFER_INFO_H
      16                 :            : #define CVC5__THEORY__BAGS__INFER_INFO_H
      17                 :            : 
      18                 :            : #include <map>
      19                 :            : #include <vector>
      20                 :            : 
      21                 :            : #include "expr/node.h"
      22                 :            : #include "theory/inference_id.h"
      23                 :            : #include "theory/theory_inference.h"
      24                 :            : 
      25                 :            : namespace cvc5::internal {
      26                 :            : namespace theory {
      27                 :            : 
      28                 :            : class InferenceManagerBuffered;
      29                 :            : 
      30                 :            : namespace bags {
      31                 :            : 
      32                 :            : /**
      33                 :            :  * An inference. This is a class to track an unprocessed call to either
      34                 :            :  * send a fact, lemma, or conflict that is waiting to be asserted to the
      35                 :            :  * equality engine or sent on the output channel.
      36                 :            :  */
      37                 :            : class InferInfo : public TheoryInference
      38                 :            : {
      39                 :            :  public:
      40                 :            :   InferInfo(InferenceManagerBuffered* im, InferenceId id);
      41                 :      77606 :   ~InferInfo() {}
      42                 :            :   /** Process lemma */
      43                 :            :   TrustNode processLemma(LemmaProperty& p) override;
      44                 :            :   /** Pointer to the class used for processing this info */
      45                 :            :   InferenceManagerBuffered* d_im;
      46                 :            :   /** The conclusion */
      47                 :            :   Node d_conclusion;
      48                 :            :   /**
      49                 :            :    * The premise(s) of the inference, interpreted conjunctively. These are
      50                 :            :    * literals that currently hold in the equality engine.
      51                 :            :    */
      52                 :            :   std::vector<Node> d_premises;
      53                 :            : 
      54                 :            :   /**
      55                 :            :    * A map of nodes to their skolem variables introduced as a result of this
      56                 :            :    * inference.
      57                 :            :    */
      58                 :            :   std::map<Node, Node> d_skolems;
      59                 :            :   /**  Is this infer info trivial? True if d_conc is true. */
      60                 :            :   bool isTrivial() const;
      61                 :            :   /**
      62                 :            :    * Does this infer info correspond to a conflict? True if d_conc is false
      63                 :            :    * and it has no new premises (d_noExplain).
      64                 :            :    */
      65                 :            :   bool isConflict() const;
      66                 :            :   /**
      67                 :            :    * Does this infer info correspond to a "fact". A fact is an inference whose
      68                 :            :    * conclusion should be added as an equality or predicate to the equality
      69                 :            :    * engine with no new external premises (d_noExplain).
      70                 :            :    */
      71                 :            :   bool isFact() const;
      72                 :            :   /**
      73                 :            :    * @return the lemma for this InferInfo.
      74                 :            :    */
      75                 :            :   Node getLemma() const;
      76                 :            : };
      77                 :            : 
      78                 :            : /**
      79                 :            :  * Writes an inference info to a stream.
      80                 :            :  *
      81                 :            :  * @param out The stream to write to
      82                 :            :  * @param ii The inference info to write to the stream
      83                 :            :  * @return The stream
      84                 :            :  */
      85                 :            : std::ostream& operator<<(std::ostream& out, const InferInfo& ii);
      86                 :            : 
      87                 :            : }  // namespace bags
      88                 :            : }  // namespace theory
      89                 :            : }  // namespace cvc5::internal
      90                 :            : 
      91                 :            : #endif /* CVC5__THEORY__BAGS__INFER_INFO_H */

Generated by: LCOV version 1.14