This file is indexed.

/usr/share/axiom-20170501/src/algebra/OMPKG.spad is in axiom-source 20170501-3.

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
)abbrev package OMPKG OpenMathPackage
++ Author: Vilya Harvey
++ Description: 
++ \spadtype{OpenMathPackage} provides some simple utilities 
++ to make reading OpenMath objects easier.

OpenMathPackage() : SIG == CODE where

  SIG ==> with

    OMread : OpenMathDevice -> Any
      ++ OMread(dev) reads an OpenMath object from \axiom{dev} and passes it
      ++ to AXIOM.

    OMreadFile : String -> Any
      ++ OMreadFile(f) reads an OpenMath object from \axiom{f} and passes it
      ++ to AXIOM.

    OMreadStr : String -> Any
      ++ OMreadStr(f) reads an OpenMath object from \axiom{f} and passes it
      ++ to AXIOM.

    OMlistCDs : () -> List(String)
      ++ OMlistCDs() lists all the CDs supported by AXIOM.

    OMlistSymbols : String -> List(String)
      ++ OMlistSymbols(cd) lists all the symbols in \axiom{cd}.

    OMsupportsCD? : String -> Boolean
      ++ OMsupportsCD?(cd) returns true if AXIOM supports \axiom{cd}, false 
      ++ otherwise.

    OMsupportsSymbol? : (String, String) -> Boolean
      ++ OMsupportsSymbol?(s,cd) returns true if AXIOM supports symbol \axiom{s}
      ++ from CD \axiom{cd}, false otherwise.

    OMunhandledSymbol : (String, String) -> Exit
      ++ OMunhandledSymbol(s,cd) raises an error if AXIOM reads a symbol which it
      ++ is unable to handle.  Note that this is different from an unexpected
      ++ symbol.

  CODE ==> add

    import OpenMathEncoding
    import OpenMathDevice
    import String

    OMunhandledSymbol(u,v) ==
      error concat ["AXIOM is unable to process the symbol ",u," from CD ",v,"."]

    OMread(dev: OpenMathDevice): Any ==
      interpret(OM_-READ(dev)$Lisp :: InputForm)

    OMreadFile(filename: String): Any ==
      dev := OMopenFile(filename, "r", OMencodingUnknown())
      res: Any := interpret(OM_-READ(dev)$Lisp :: InputForm)
      OMclose(dev)
      res

    OMreadStr(str: String): Any ==
      strp := OM_-STRINGTOSTRINGPTR(str)$Lisp
      dev := OMopenString(strp pretend String, OMencodingUnknown())
      res: Any := interpret(OM_-READ(dev)$Lisp :: InputForm)
      OMclose(dev)
      res

    OMlistCDs(): List(String) ==
      OM_-LISTCDS()$Lisp pretend List(String)

    OMlistSymbols(cd: String): List(String) ==
      OM_-LISTSYMBOLS(cd)$Lisp pretend List(String)

    import SExpression

    OMsupportsCD?(cd: String): Boolean ==
      not null? OM_-SUPPORTSCD(cd)$Lisp 

    OMsupportsSymbol?(cd: String, name: String): Boolean ==
      not null? OM_-SUPPORTSSYMBOL(cd, name)$Lisp