This file is indexed.

/usr/include/cvc3/theorem_manager.h is in libcvc3-dev 2.4.1-5ubuntu1.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
/*****************************************************************************/
/*!
 * \file theorem_manager.h
 * 
 * Author: Sergey Berezin, Tue Feb  4 14:29:25 2003
 * 
 * Created: Feb 05 18:29:37 GMT 2003
 *
 * <hr>
 *
 * License to use, copy, modify, sell and/or distribute this software
 * and its documentation for any purpose is hereby granted without
 * royalty, subject to the terms and conditions defined in the \ref
 * LICENSE file provided with this distribution.
 * 
 * <hr>
 * 
 * CLASS: TheoremManager
 * 
 * 
 * Holds the shared data for the class Theorem
 */
/*****************************************************************************/

#ifndef _cvc3__theorem_manager_h_
#define _cvc3__theorem_manager_h_

#include "debug.h"
#include "compat_hash_map.h"

namespace CVC3 {

  class ContextManager;
  class ExprManager;
  class CLFlags;
  class MemoryManager;
  class CommonProofRules;
  
  class TheoremManager {
  private:
    ContextManager* d_cm;
    ExprManager* d_em;
    const CLFlags& d_flags;
    MemoryManager* d_mm;
    MemoryManager* d_rwmm;
    bool d_withProof;
    bool d_withAssump;
    unsigned d_flag; // used for setting flags in Theorems
    bool d_active; //!< Whether TheoremManager is active.  See also clear()
    CommonProofRules* d_rules;

    std::hash_map<long, bool> d_reflFlags;
    std::hash_map<long, int> d_cachedValues;
    std::hash_map<long, bool> d_expandFlags;
    std::hash_map<long, bool> d_litFlags;

    CommonProofRules* createProofRules();

  public:
    //! Constructor
    TheoremManager(ContextManager* cm,
                   ExprManager* em,
                   const CLFlags& flags);
    //! Destructor
    ~TheoremManager();
    //! Deactivate TheoremManager
    /*! No more Theorems can be created after this call, only deleted.
     * The purpose of this call is to dis-entangle the mutual
     * dependency of ExprManager and TheoremManager during destruction time.
     */
    void clear();
    //! Test whether the TheoremManager is still active
    bool isActive() { return d_active; }

    ContextManager* getCM() const { return d_cm; }
    ExprManager* getEM() const { return d_em; }
    const CLFlags& getFlags() const { return d_flags; }
    MemoryManager* getMM() const { return d_mm; }
    MemoryManager* getRWMM() const { return d_rwmm; }
    CommonProofRules* getRules() const { return d_rules; }

    unsigned getFlag() const {
      return d_flag;
    }
    
    void clearAllFlags() {
      d_reflFlags.clear();
      FatalAssert(++d_flag, "Theorem flag overflow.");
    }

    bool withProof() {
      return d_withProof;
    }
    bool withAssumptions() {
      return d_withAssump;
    }

    // For Refl theorems
    void setFlag(long ptr) { d_reflFlags[ptr] = true; }
    bool isFlagged(long ptr) { return d_reflFlags.count(ptr) > 0; }
    void setCachedValue(long ptr, int value) { d_cachedValues[ptr] = value; }
    int getCachedValue(long ptr) {
      std::hash_map<long, int>::const_iterator i = d_cachedValues.find(ptr);
      if (i != d_cachedValues.end()) return (*i).second;
      else return 0;
    }
    void setExpandFlag(long ptr, bool value) { d_expandFlags[ptr] = value; }
    bool getExpandFlag(long ptr) {
      std::hash_map<long, bool>::const_iterator i = d_expandFlags.find(ptr);
      if (i != d_expandFlags.end()) return (*i).second;
      else return false;
    }
    void setLitFlag(long ptr, bool value) { d_litFlags[ptr] = value; }
    bool getLitFlag(long ptr) {
      std::hash_map<long, bool>::const_iterator i = d_litFlags.find(ptr);
      if (i != d_litFlags.end()) return (*i).second;
      else return false;
    }
    

  }; // end of class TheoremManager

} // end of namespace CVC3

#endif