This file is indexed.

/usr/include/polybori/ring/CCuddCore.h is in libbrial-dev 0.8.5-4.

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
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
// -*- c++ -*-
//*****************************************************************************
/** @file CCuddCore.h
 *
 * @author Alexander Dreyer
 * @date 2007-07-19
 *
 * This files defines a 
 *
 * @par Copyright:
 *   (c) 2007-2010by The PolyBoRi Team
 *
**/
//*****************************************************************************

#ifndef polybori_ring_CCuddCore_h
#define polybori_ring_CCuddCore_h

// include basic definitions
#include <polybori/pbori_defs.h>

#include "CCuddInterface.h"
#include "CVariableNames.h"

// get PolyBoRi routines and functionals
#include <polybori/routines/pbori_func.h>
#include <polybori/common/traits.h>

// intrisive (shared) pointer functionality
#include <boost/intrusive_ptr.hpp>

#include <vector>
#include <boost/shared_ptr.hpp>

BEGIN_NAMESPACE_PBORI

class COrderingBase;

/** @class CCuddCore
 * @brief This class prepares the CUDD's raw decision diagram manager structure
 * for the use with instrinsive pointers.
 *
 * The purpose of this wrapper is mainly to provide the necessary functionality
 * for application of intrisive pointers (refernce counting). In addition, some
 * global settings are stored within.
 *
 * @attention This class is intented for internal use only. See CCuddDD,
 * CCuddZDD, and CCuddInterface.
 **/
class CCuddCore:
  public CTypes::orderenums_type, public CAuxTypes,
  public CWeakPtrFacade<CCuddCore> {

public:

  /// Fix type of *this
  typedef CCuddCore self;

  /// Define type for storing names of variables
  typedef CVariableNames variable_names_type;

  /// Define type for getting names of variables
  typedef variable_names_type::const_reference const_varname_reference;

  /// Current decision diagram management
  CCuddInterface m_mgr;

  /// Type for handling mterm orderings
  typedef COrderingBase order_type;
  
  /// Smart pointer for handling mterm orderings
  typedef boost::shared_ptr<order_type> order_ptr;

  /// Reference for handling mterm orderings
  typedef order_type& order_reference;

  /// Enum for ordering codes
  typedef CTypes::ordercode_type ordercode_type;

  /// Count instances pointing here
  refcount_type ref;

  /// Stores names of variables
  variable_names_type m_names;

 
  /// *Ordering of *this
  order_ptr pOrder;


  /// Initialize raw decision diagram management
  CCuddCore(size_type numVarsZ, const order_ptr& order):  
    m_mgr(0, numVarsZ), ref(0), m_names(numVarsZ), 
    pOrder(order) {  }

  /// Copy Constructor (nearly deep copy, but shallow copy of manager, names and
  /// ordering)
  CCuddCore(const self& rhs):
    m_mgr(rhs.m_mgr), ref(0), m_names(rhs.m_names), pOrder(rhs.pOrder) { }

  /// Destructor
  ~CCuddCore(){ }
    
  /// Increment reference count
  void addRef(){ ++ref; }

  /// Release this by decrementing reference counting
  refcount_type release() {
    return (--ref);
  }

  void change_ordering(const order_ptr& newOrder) {
    pOrder = newOrder;
  }

};

/// @name Prepare for the application of intrinsive pointers
//@{
/// Increment reference count
inline void 
intrusive_ptr_add_ref(CCuddCore* pCore){
  pCore->addRef();
}

/// Release current pointer by decrementing reference counting
inline void 
intrusive_ptr_release(CCuddCore* pCore) {
  if (!(pCore->release())) {
    delete pCore;
  }
}



//@}

END_NAMESPACE_PBORI

#endif