This file is indexed.

/usr/share/minlog/src/gen-app.scm is in minlog 4.0.99.20100221-5.2.

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
; $Id: gen-app.scm 2156 2008-01-25 13:25:12Z schimans $

; Generic applications: The user hook to define new syntax, written as
; application.

; The global look-up table for all kinds of applications:

(define GENERIC-APPLICATION-TABLE '())
(define INITIAL-GENERIC-APPLICATION-TABLE GENERIC-APPLICATION-TABLE)

; The interface to the parser:

(define (make-gen-application x y)
  (define (make-gen-app-aux l type x y)
    (cond
     ((null? l)
      (myerror "make-gen-application: unknown form of application"
	       (type-to-string type)))
     (((caar l) type) ((cdar l) x y))
     (else (make-gen-app-aux (cdr l) type x y))))
  (make-gen-app-aux GENERIC-APPLICATION-TABLE (term-to-type x) x y))

; The interface for the user:

(define (add-new-application pred fun)
  (set! GENERIC-APPLICATION-TABLE
	(cons (cons pred fun)
	      GENERIC-APPLICATION-TABLE)))

; The inverse: User can specify terms to be recognized as generic
; applications

(define GENERIC-APPLICATION-SYNTAX-TABLE '())
(define INITIAL-GENERIC-APPLICATION-SYNTAX-TABLE
  GENERIC-APPLICATION-SYNTAX-TABLE)

(define (add-new-application-syntax pred toarg toop)
  (set! GENERIC-APPLICATION-SYNTAX-TABLE
	(cons (list pred toarg toop)
	      GENERIC-APPLICATION-SYNTAX-TABLE)))

(define (term-in-symbolic-app-form? term)
  (term-in-symbolic-app-form-aux GENERIC-APPLICATION-SYNTAX-TABLE term))

(define (term-in-symbolic-app-form-aux l term)
  (cond ((null? l) #f)
	(((caar l) term) #t)
	(else (term-in-symbolic-app-form-aux (cdr l) term))))
	 
(define (term-in-symbolic-app-form-to-arg term)
  (term-in-symbolic-app-form-to-arg-aux GENERIC-APPLICATION-SYNTAX-TABLE term))

(define (term-in-symbolic-app-form-to-arg-aux l term)
  (cond ((null? l)
	 (myerror "term-in-symbolic-app-form-to-arg: not a symbolic app!"
		  (term-to-string term)))
	(((caar l) term)
	 ((cadar l) term))
	(else (term-in-symbolic-app-form-to-arg-aux (cdr l) term))))

(define (term-in-symbolic-app-form-to-op term)
  (term-in-symbolic-app-form-to-op-aux GENERIC-APPLICATION-SYNTAX-TABLE term))

(define (term-in-symbolic-app-form-to-op-aux l term)
  (cond ((null? l)
	 (myerror "term-in-symbolic-app-form-to-op: not a symbolic app!"
		  (term-to-string term)))
	(((caar l) term)
	 ((caddar l) term))
	(else (term-in-symbolic-app-form-to-op-aux (cdr l) term))))