-
Notifications
You must be signed in to change notification settings - Fork 8
/
ctrie-package.lisp
126 lines (117 loc) · 3.13 KB
/
ctrie-package.lisp
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
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
;;;;; -*- mode: common-lisp; common-lisp-style: modern; coding: utf-8; -*-
;;;;;
#-sbcl (cl:error "~A not supportred" (cl:lisp-implementation-type)
(:export
#:defun/inline
#:let1))
(defpackage :cl-ctrie
(:documentation "This is a common-lisp implementation of the CTrie
unordered map data-structure described in the paper 'Concurrent
Tries with Efficient Non-Blocking Snapshots, (c) ACM 2-25-2012'
by Prokopec, Bronson, Bagwell, and Odersky.")
#+:package-local-nicknames
(:local-nicknames
(:mem :com.informatimago.common-lisp.heap.memory)
(:heap :com.informatimago.common-lisp.heap.heap))
;; (:fast :fast-io))
;; (:os :uiop/os)
;; (:fs :uiop/filesystem)
;; (:pkg :uiop/package)
;; (:utl :uiop/utility))
(:shadow :once-only :map :set)
(:use :closer-common-lisp :closer-mop :contextl :alexandria :iterate
:macro)
;; (:shadowing-import-from :lisp-unit :set-equal)
(:import-from :sb-ext :get-cas-expansion :define-cas-expander :cas
:compare-and-swap :atomic-incf :atomic-decf :defcas :defglobal)
(:export
:make-ctrie
:ctrie
:ctrie-test
:ctrie-hash
:ctrie-do
:ctrie-put
:ctrie-put-if
:ctrie-put-if-not
:ctrie-put-ensure
:ctrie-put-replace
:ctrie-put-replace-if
:ctrie-put-update
:ctrie-put-update-if
:ctrie-get
:ctrie-drop
:ctrie-drop-if
:ctrie-drop-if-not
:ctrie-map
:ctrie-map-keys
:ctrie-map-values
:ctrie-keys
:ctrie-values
:ctrie-size
:ctrie-clear
:ctrie-pprint
:ctrie-error
:ctrie-to-alist
:ctrie-to-hashtable
:ctrie-from-hashtable
:ctrie-from-alist
:ctrie-empty-p
:ctrie-readonly-p
:ctrie-max-depth
:ctrie-min-depth
:ctrie-save
:ctrie-load
:ctrie-export
:ctrie-import
:ctrie-snapshot
:ctrie-fork
:ctrie-lambda
:ctrie-lambda-ctrie
:ctrie-lambda-spawn
:ctrie-lambda-class
:ctrie-lambda-object
:new-ctrie
;; :def-ctrie
:define-ctrie
:ctrie-gc
:ctrie-index
:all-ctries
:ctrie-names
:find-ctrie
:ctrie-name
:ctrie-next-id
:ctrie-persistent-store
:ctrie-enable-pooling
:ctrie-disable-pooling
:ctrie-pool-status
:ctrie-ps
:ctrie-pooling-enabled-p
:ctrie-error
:ctrie-structural-error
:ctrie-operational-error
:ctrie-operation-retries-exceeded
:ctrie-not-implemented
:ctrie-not-supported
:ctrie-invalid-dynamic-context
:ctrie-generational-mismatch
:ctrie-modification-failed
:ctrie-registry
:*vm*
:type-of))
(unless (find-package :mem)
(rename-package
"COM.INFORMATIMAGO.COMMON-LISP.HEAP.MEMORY"
"COM.INFORMATIMAGO.COMMON-LISP.HEAP.MEMORY"
'(:mem)))
(unless (find-package :heap)
(rename-package
"COM.INFORMATIMAGO.COMMON-LISP.HEAP.HEAP"
"COM.INFORMATIMAGO.COMMON-LISP.HEAP.HEAP"
'(:HEAP)))
(defpackage :ctrie
(:use))
(defpackage "http://www.w3.org/1999/02/22-rdf-syntax-ns#"
(:use )
(:nicknames "rdf")
(:export "Alt" "Bag" "first" "List" "nil" "object" "predicate" "Property" "rest" "li"
"Seq" "Statement" "subject" "type" "value" "XMLLiteral"))