This file is indexed.

/usr/share/Yap/dbqueues.yap is in yap 6.2.2-6build1.

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
% A library to implement queues of NB Terms

:- module(nbqueue, [
		    nb_enqueue/2,
		    nb_dequeue/2,
		    nb_clean_queue/1,	  
		    nb_size/2	  
		   ]).


:- unhide('$init_nb_queue').
:- unhide('$nb_enqueue').
:- unhide('$nb_dequeue').


nb_enqueue(Name,El) :- var(Name),
	throw(error(instantiation_error(Name),nb_enqueue(Name,El))).
nb_enqueue(Name,El) :- \+ atom(Name), !,
	throw(error(type_error_atom(Name),nb_enqueue(Name,El))).
nb_enqueue(Name,El) :-
	recorded('$nb_queue',[Name|Ref],_), !,
	prolog:'$nb_enqueue'(Ref, El).
nb_enqueue(Name,El) :-
	prolog:'$init_nb_queue'(Ref),
	recorda('$nb_queue',[Name|Ref],_),
	prolog:'$nb_enqueue'(Ref,El).


nb_dequeue(Name,El) :- var(Name),
	throw(error(instantiation_error(Name),nb_dequeue(Name,El))).
nb_dequeue(Name,El) :- \+ atom(Name), !,
	throw(error(type_error_atom(Name),nb_dequeue(Name,El))).
nb_dequeue(Name,El) :-
	recorded('$nb_queue',[Name|Ref],R),
	( prolog:'$nb_dequeue'(Ref, El) ->
	    true
	;
	    erase(R),
	    fail
	).

nb_clean_queue(Name) :-
	recorded('$nb_queue',[Name|Ref],R), !,
	erase(R),
	nb_dequeue_all(Ref).
nb_clean_queue(_).

nb_dequeue_all(Ref) :-
	( prolog:'$nb_dequeue'(Ref, _) -> nb_dequeue_all(Ref) ; true ).

nb_dequeue_size(Ref, Size) :-
	prolog:'$nb_size'(Ref, Size).