/usr/share/axiom-20170501/src/algebra/HASHTBL.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 | )abbrev domain HASHTBL HashTable
++ Author: Stephen M. Watt
++ Date Created: 1985
++ Date Last Updated: June 21, 1991
++ Description:
++ This domain provides access to the underlying Lisp hash tables.
++ By varying the hashfn parameter, tables suited for different
++ purposes can be obtained.
HashTable(Key, Entry, hashfn) : SIG == CODE where
Key : SetCategory
Entry : SetCategory
hashfn : String -- Union("EQ", "UEQUAL", "CVEC", "ID")
SIG ==> TableAggregate(Key, Entry) with
finiteAggregate
CODE ==> add
Pair ==> Record(key: Key, entry: Entry)
Ex ==> OutputForm
failMsg := GENSYM()$Lisp
t1 = t2 == EQ(t1, t2)$Lisp
keys t == HKEYS(t)$Lisp
# t == HASH_-TABLE_-COUNT(t)$Lisp
setelt(t, k, e) == HPUT(t,k,e)$Lisp
remove_!(k:Key, t:%) ==
r := HGET(t,k,failMsg)$Lisp
not EQ(r,failMsg)$Lisp =>
HREM(t, k)$Lisp
r pretend Entry
"failed"
empty() ==
MAKE_-HASHTABLE(INTERN(hashfn)$Lisp,
INTERN("STRONG")$Lisp)$Lisp
search(k:Key, t:%) ==
r := HGET(t, k, failMsg)$Lisp
not EQ(r, failMsg)$Lisp => r pretend Entry
"failed"
|