This file is indexed.

/usr/include/osl/checkmate/dualDfpn.h is in libosl-dev 0.8.0-1.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
/* dualDfpn.h
 */
#ifndef OSL_DUALDFPN_H
#define OSL_DUALDFPN_H
#include "osl/numEffectState.h"
#include "osl/checkmate/proofDisproof.h"
#include "osl/hashKey.h"
#include "osl/pathEncoding.h"
#include "osl/container/moveStack.h"
#include <memory>
#include <cstddef>
#include <limits>

#ifdef OSL_SMP
#  ifndef OSL_DFPN_SMP
#    define OSL_DFPN_SMP
#  endif
#endif

namespace osl
{
  class RepetitionCounter;
  namespace checkmate
  {
    class Dfpn;
    class DfpnTable;
    /** 一般用詰み探索: 先手後手の詰みを別々に管理 */
    class DualDfpn
    {
      struct Shared;
      struct Local;
      struct OraclePool;
      std::shared_ptr<Shared> shared;
      std::unique_ptr<Local> local;
    public:
      explicit DualDfpn(uint64_t ignored=std::numeric_limits<uint64_t>::max());
      DualDfpn(const DualDfpn& src);
      ~DualDfpn();

      void setRootPlayer(Player);
      template <Player P>
      ProofDisproof findProof(int node_limit, const NumEffectState& state, 
			      const HashKey& key, const PathEncoding& path,
			      Move& best_move, Move last_move=Move::INVALID());
      /**
       * 詰みを発見. 
       * 別々のスレッドから呼び出し可能
       * @return 相手玉が詰み
       */
      template <Player P>
      bool isWinningState(int node_limit, const NumEffectState& state, 
			  const HashKey& key, const PathEncoding& path,
			  Move& best_move, Move last_move=Move::INVALID())
      {
	return findProof(node_limit, state, key, path, best_move, last_move)
	  .isCheckmateSuccess();
      }
      bool isWinningState(int node_limit, const NumEffectState& state, 
			  const HashKey& key, const PathEncoding& path,
			  Move& best_move, Move last_move=Move::INVALID());
      ProofDisproof findProof(int node_limit, const NumEffectState& state, 
			      const HashKey& key, const PathEncoding& path,
			      Move& best_move, Move last_move=Move::INVALID());
#ifdef OSL_DFPN_SMP
      /** 
       * 詰みを発見. 
       * 同時に動作可能なスレッドは一つ
       */
      template <Player P>
      bool isWinningStateParallel(int node_limit, const NumEffectState& state, 
				  const HashKey& key, const PathEncoding& path,
				  Move& best_move, Move last_move=Move::INVALID());
      bool isWinningStateParallel(int node_limit, const NumEffectState& state, 
				  const HashKey& key, const PathEncoding& path,
				  Move& best_move, Move last_move=Move::INVALID());
#endif
      template <Player P>
      bool isLosingState(int node_limit, const NumEffectState& state, 
			 const HashKey& key, const PathEncoding& path,
			 Move last_move=Move::INVALID());
      bool isLosingState(int node_limit, const NumEffectState& state, 
			 const HashKey& key, const PathEncoding& path,
			 Move last_move=Move::INVALID());

      void runGC(bool verbose=false, size_t memory_use_ratio_1000=0);

      // debug
      void setVerbose(int level=1);
      int distance(Player attack, const HashKey& key);
      size_t mainNodeCount() const;
      size_t totalNodeCount() const;
      void writeRootHistory(const RepetitionCounter& counter,
			    const MoveStack& moves,
			    const SimpleState& state, Player attack);
      const DfpnTable& table(Player) const;
    private:
      Dfpn& prepareDfpn(Player attack);
      Dfpn& prepareDfpnSmall(Player attack);
    };
  }
  using checkmate::DualDfpn;
}

#endif /* OSL_DUALDFPN_H */
// ;;; Local Variables:
// ;;; mode:c++
// ;;; c-basic-offset:2
// ;;; End: