Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

housekeeping + add triple-eql, triple-equal and triple-equalp methods

  • Loading branch information...
commit d2a06e15b194ac70d2b33c1093ea1367ee55331c 1 parent 8a91ff8
@kraison authored
View
9 data-types.lisp
@@ -34,5 +34,12 @@
(:print-function print-triple)
(:conc-name triple-)
(:predicate triple?))
- subject predicate object graph id (deleted? nil) (cf +cf-true+) (persistent? t))
+ subject
+ predicate
+ object
+ graph
+ id
+ (deleted? nil)
+ (cf +cf-true+)
+ (persistent? t))
View
15 index.lisp
@@ -84,7 +84,8 @@
(typecase v
(hash-table (fetch-all v))
(list
- (dolist (leaf v) (vector-push-extend leaf leaves)))
+ (dolist (leaf v)
+ (vector-push-extend leaf leaves)))
(t (vector-push-extend v leaves))))
ht1))))
(fetch-all ht))
@@ -139,8 +140,10 @@
(defun get-from-index (index &rest keys)
(let ((result (descend-ht (index-table index) keys)))
- (cond ((null result) (make-index-cursor :index index :vector #() :pointer 0))
- ((vectorp result) (make-index-cursor :index index :vector result :pointer 0))
+ (cond ((null result)
+ (make-index-cursor :index index :vector #() :pointer 0))
+ ((vectorp result)
+ (make-index-cursor :index index :vector result :pointer 0))
(t result))))
(defun find-or-create-ht (ht keys create-fn &optional (d 0))
@@ -154,7 +157,8 @@
((= 1 (length (rest keys)))
(values (gethash (first keys) ht) (first (rest keys))))
(t
- (find-or-create-ht (gethash (first keys) ht) (rest keys) create-fn (1+ d)))))
+ (find-or-create-ht (gethash (first keys) ht)
+ (rest keys) create-fn (1+ d)))))
(defun add-to-index (index value &rest keys)
(let ((ht (find-or-create-ht (index-table index)
@@ -184,7 +188,8 @@
(defmacro with-locked-index ((idx &rest keys) &body body)
(if keys
(with-gensyms (sub-idx last-key)
- `(multiple-value-bind (,sub-idx ,last-key) (get-table-to-lock ,idx ,@keys)
+ `(multiple-value-bind (,sub-idx ,last-key)
+ (get-table-to-lock ,idx ,@keys)
(sb-ext:with-locked-hash-table (,sub-idx)
;;(format t "Locked ht ~A / ~A~%" ,last-key ,sub-idx)
,@body)))
View
52 prolog-functors.lisp
@@ -41,14 +41,16 @@
(def-global-prolog-functor >/2 (?arg1 ?arg2 cont)
"Prolog greater than functor."
- (if (or (and (numberp (var-deref ?arg1)) (numberp (var-deref ?arg2)) (> ?arg1 ?arg2))
+ (if (or (and (numberp (var-deref ?arg1)) (numberp (var-deref ?arg2))
+ (> ?arg1 ?arg2))
(and (timestamp? (var-deref ?arg1)) (timestamp? (var-deref ?arg2))
(timestamp> ?arg1 ?arg2)))
(funcall cont)))
(def-global-prolog-functor </2 (?arg1 ?arg2 cont)
"Prolog less than functor."
- (if (or (and (numberp (var-deref ?arg1)) (numberp (var-deref ?arg2)) (< ?arg1 ?arg2))
+ (if (or (and (numberp (var-deref ?arg1)) (numberp (var-deref ?arg2))
+ (< ?arg1 ?arg2))
(and (timestamp? (var-deref ?arg1)) (timestamp? (var-deref ?arg2))
(timestamp< ?arg1 ?arg2)))
(funcall cont)))
@@ -79,9 +81,9 @@
; (funcall cont)))
(def-global-prolog-functor lisp/2 (?result exp cont)
- "Call out to lisp from within a Prolog query. Assigns result to the supplied Prolog
-var. (lisp ?result (+ 1 2)). Any lisp variables that you wish to access within a
-prolog query using the lisp functor should be declared special."
+ "Call out to lisp from within a Prolog query. Assigns result to the supplied
+Prolog var. (lisp ?result (+ 1 2)). Any lisp variables that you wish to access
+within a prolog query using the lisp functor should be declared special."
(let ((exp (var-deref exp)))
(when *prolog-trace* (format t "TRACE: LISP/2 ?result <- ~A~%" exp))
(cond ((consp exp)
@@ -97,9 +99,9 @@ prolog query using the lisp functor should be declared special."
(funcall cont))))))
(def-global-prolog-functor lispp/1 (exp cont)
- "Call out to lisp from within a Prolog query and throws away the result. Any lisp
-variables that you wish to access within a prolog query using the lisp functor should
-be declared special."
+ "Call out to lisp from within a Prolog query and throws away the result. Any
+lisp variables that you wish to access within a prolog query using the lisp
+functor should be declared special."
(let ((exp (var-deref exp)))
(when *prolog-trace* (format t "TRACE: LISPP/1 ~A~%" exp))
(cond ((consp exp)
@@ -111,8 +113,8 @@ be declared special."
(funcall cont)))
(def-global-prolog-functor regex-match/2 (?arg1 ?arg2 cont)
- "Functor that treats first arg as a regex and uses cl-ppcre:scan to check for the
-pattern in the second arg."
+ "Functor that treats first arg as a regex and uses cl-ppcre:scan to check for
+the pattern in the second arg."
(if (and (stringp (var-deref ?arg1))
(stringp (var-deref ?arg2))
(cl-ppcre:scan ?arg1 ?arg2))
@@ -146,7 +148,8 @@ pattern in the second arg."
(def-global-prolog-functor if/3 (?test ?then ?else cont)
(when *prolog-trace* (format t "TRACE: IF/3(~A ~A ~A)~%" ?test ?then ?else))
(call/1 ?test #'(lambda ()
- (call/1 ?then #'(lambda () (funcall cont) (return-from if/3)))))
+ (call/1 ?then
+ #'(lambda () (funcall cont) (return-from if/3)))))
(call/1 ?else cont))
(let ((date-regex
@@ -171,7 +174,8 @@ comprehensive regex."
(funcall cont))
(def-global-prolog-functor not/1 (relation cont)
- "Prolog negation. Does not retract, simply negates in the context of the query."
+ "Prolog negation. Does not retract, simply negates in the context of the
+query."
(with-undo-bindings
(call/1 relation #'(lambda () (return-from not/1 nil)))
(funcall cont)))
@@ -213,7 +217,8 @@ comprehensive regex."
((and (consp var)
(eq (first var) name)
(symbolp (second var))
- (eq graph-pkg (symbol-package (second var))))
+ (eq graph-pkg
+ (symbol-package (second var))))
(list name (symbol-name (second var))))
(t var))))
*select-list*))
@@ -247,7 +252,8 @@ comprehensive regex."
(and (var-p o) (bound-p o)))
(var-deref o))
(and (consp o) (cdr o)))
- :g (and (or (not (var-p g)) (and (var-p g) (bound-p g))) (var-deref g)))))
+ :g (and (or (not (var-p g)) (and (var-p g) (bound-p g)))
+ (var-deref g)))))
(multiple-value-bind (s p o g) (intern-spog s p o g)
(map-cursor #'(lambda (id)
(let ((triple (get-triple-by-id id)))
@@ -257,7 +263,8 @@ comprehensive regex."
(when (unify p (triple-predicate triple))
(when (unify s (triple-subject triple))
(if (consp o)
- (when (unify (car o) (triple-object triple))
+ (when (unify (car o)
+ (triple-object triple))
(funcall cont))
(when (unify o (triple-object triple))
(funcall cont))))))
@@ -278,11 +285,13 @@ comprehensive regex."
(not (some #'var-p clause)))
(let ((triple (add-triple (first clause) (second clause) (third clause)
(or (fourth clause) *graph*))))
- (when *prolog-trace* (format t "TRACE: Asserted new triple ~A~%" triple))
+ (when *prolog-trace*
+ (format t "TRACE: Asserted new triple ~A~%" triple))
(when (triple? triple)
(funcall cont)))
(error 'prolog-error
- :reason (format nil "assert is only for triples, not ~A" clause)))))
+ :reason
+ (format nil "assert is only for triples, not ~A" clause)))))
(def-global-prolog-functor subject/2 (?arg1 ?arg2 cont)
(when (and (triple? ?arg2) (unify ?arg1 (subject ?arg2)))
@@ -338,7 +347,8 @@ comprehensive regex."
(not (some #'var-p clause)))
(handler-case
(with-graph-transaction (*store*)
- (when *prolog-trace* (format t "TRACE: Retracting fact ~A~%" clause))
+ (when *prolog-trace*
+ (format t "TRACE: Retracting fact ~A~%" clause))
(let ((triple (lookup-triple (first clause) (second clause)
(third clause)
(or (fourth clause) *graph*)
@@ -351,13 +361,15 @@ comprehensive regex."
clause)))))
(prolog-error (condition)
(error 'prolog-error
- :reason (format nil "Cannot retract ~A: ~A~%" clause condition)))
+ :reason
+ (format nil "Cannot retract ~A: ~A~%" clause condition)))
(:no-error (result)
(declare (ignore result))
(funcall cont)))
(error 'prolog-error
:reason
- (format nil "Cannot retract a clause with variables: ~A" clause)))))
+ (format nil "Cannot retract a clause with variables: ~A"
+ clause)))))
(def-global-prolog-functor is-valid/1 (item cont)
"Mark a triple as VALID and remove an INVALID marker."
View
66 prologc.lisp
@@ -27,8 +27,8 @@
(defun bound-p (var) (not (eq (var-binding var) +unbound+)))
(defgeneric prolog-equal (x y)
- (:documentation "Generic equality operator for prolog unification. Specialize this
-for new types that will be stored in the db.")
+ (:documentation "Generic equality operator for prolog unification. Specialize
+this for new types that will be stored in the db.")
(:method ((x number) (y number)) (= x y))
(:method ((x string) (y string)) (string= x y))
(:method ((x character) (y character)) (char= x y))
@@ -260,23 +260,23 @@ for new types that will be stored in the db.")
(x1 (if xb (cdr xb) x))
(yb (if (variable-p y) (follow-binding y bindings)))
(y1 (if yb (cdr yb) y)))
- (cond ; Case:
- ((or (eq x '?) (eq y '?)) (values t bindings)) ; 12
- ((not (and (prolog-equal x x1) (prolog-equal y y1))) ; deref
+ (cond ; Case:
+ ((or (eq x '?) (eq y '?)) (values t bindings)) ; 12
+ ((not (and (prolog-equal x x1) (prolog-equal y y1))) ; deref
(compile-unify x1 y1 bindings))
- ((find-anywhere x1 y1) (values nil bindings)) ; 11
- ((consp y1) ; 7,10
+ ((find-anywhere x1 y1) (values nil bindings)) ; 11
+ ((consp y1) ; 7,10
(values `(unify ,x1 ,(compile-arg y1 bindings))
(bind-variables-in y1 bindings)))
((not (null xb))
;; i.e. x is an ?arg variable
(if (and (variable-p y1) (null yb))
- (values 't (extend-bindings y1 x1 bindings)) ; 4
+ (values 't (extend-bindings y1 x1 bindings)) ; 4
(values `(unify ,x1 ,(compile-arg y1 bindings))
- (extend-bindings x1 y1 bindings)))) ; 5,6
+ (extend-bindings x1 y1 bindings)))) ; 5,6
((not (null yb))
(compile-unify-variable y1 x1 bindings))
- (t (values 't (extend-bindings x1 y1 bindings)))))) ; 8,9
+ (t (values 't (extend-bindings x1 y1 bindings)))))) ; 8,9
(defun bind-variables-in (exp bindings)
"Bind all variables in exp to themselves, and add that to
@@ -352,7 +352,8 @@ for new types that will be stored in the db.")
(clause-body clause))
cont
(mapcar #'self-cons parms)))))
- (when *prolog-trace* (format t "TRACE: ~A BODY:~% ~A~%" (clause-head clause) body))
+ (when *prolog-trace*
+ (format t "TRACE: ~A BODY:~% ~A~%" (clause-head clause) body))
body))
(defun add-clause (clause)
@@ -364,7 +365,8 @@ for new types that will be stored in the db.")
(functor (make-functor-symbol functor-name arity)))
(if (gethash functor *prolog-global-functors*)
(error 'prolog-error
- :reason (format nil "Cannot override default functor ~A." functor))
+ :reason
+ (format nil "Cannot override default functor ~A." functor))
(let ((f (lookup-functor functor)))
(if (functor? f)
(add-functor-clause f clause)
@@ -437,7 +439,8 @@ for new types that will be stored in the db.")
(return-from ,*functor* nil)))
(t (let* ((goal (first body))
(macro (prolog-compiler-macro (predicate goal)))
- (macro-val (if macro (funcall macro goal (rest body) cont bindings))))
+ (macro-val (if macro
+ (funcall macro goal (rest body) cont bindings))))
(if (and macro (not (eq macro-val :pass)))
macro-val
(compile-call (predicate goal) (relation-arity goal)
@@ -494,13 +497,14 @@ for new types that will be stored in the db.")
(handler-case
(block ,*functor*
.,(maybe-add-undo-bindings
- (mapcar #'(lambda (clause)
- (compile-clause nil clause 'cont))
- `(((,top-level-query)
- ,@goals
- (show-prolog-vars
- ,(mapcar #'symbol-name vars)
- ,vars))))))
+ (mapcar
+ #'(lambda (clause)
+ (compile-clause nil clause 'cont))
+ `(((,top-level-query)
+ ,@goals
+ (show-prolog-vars
+ ,(mapcar #'symbol-name vars)
+ ,vars))))))
(undefined-function (condition)
(error 'prolog-error :reason condition))))))
(set-functor-fn *functor* func)
@@ -515,8 +519,9 @@ for new types that will be stored in the db.")
(defmacro select (vars &rest goals)
"Select specific variables as a list of lists using the following form:
(select (?x ?y) (is-a ?x ?y)) could return ((Joe Human) (Spot Dog)) and
- (select ((:entity ?x) (:species ?y)) could return (((:entity Joe) (:species Human))
- ((:entity Spot)(:species Dog)))"
+ (select ((:entity ?x) (:species ?y)) could return
+ (((:entity Joe) (:species Human))
+ ((:entity Spot)(:species Dog)))"
(let* ((top-level-query (gensym "PROVE"))
(goals (replace-?-vars goals))
(*functor* (make-functor-symbol top-level-query 0)))
@@ -536,11 +541,12 @@ for new types that will be stored in the db.")
`(((,top-level-query)
,@goals
(select
- ,(mapcar #'(lambda (var)
- (typecase var
- (symbol (symbol-name var))
- (list (first var))))
- vars) ,vars))))))
+ ,(mapcar
+ #'(lambda (var)
+ (typecase var
+ (symbol (symbol-name var))
+ (list (first var))))
+ vars) ,vars))))))
(undefined-function (condition)
(error 'prolog-error :reason condition))))))
(set-functor-fn *functor* func)
@@ -561,8 +567,8 @@ for new types that will be stored in the db.")
`(select () ,@goals))
(defmacro map-query (fn query &key collect?)
- "Maps fn over the results of query. collect? will return a list of the results of
-each application of fn."
+ "Maps fn over the results of query. collect? will return a list of the results
+of each application of fn."
(with-gensyms (result)
(if collect?
`(mapcar #'(lambda (,result)
@@ -580,5 +586,3 @@ each application of fn."
(<- t)
(insertt)
(otherwise nil)))
-
-
View
10 store.lisp
@@ -31,7 +31,9 @@
(defun list-indexed-predicates (&optional (store *store*))
(let ((result nil))
- (maphash #'(lambda (k v) (when v (push k result))) (indexed-predicates store))
+ (maphash #'(lambda (k v)
+ (when v (push k result)))
+ (indexed-predicates store))
(sort result #'string>)))
(defun make-fresh-store (name location &key (num-locks 10000))
@@ -58,7 +60,8 @@
(defun make-local-triple-store (name location)
(make-fresh-store name location))
-(defun create-triple-store (&key name if-exists? location host port user password)
+(defun create-triple-store (&key name if-exists? location host port
+ user password)
(declare (ignore if-exists?))
(setq *graph* (or name location (format nil "~A:~A" host port)))
(if location
@@ -119,7 +122,8 @@
(if (stringp o) (intern o :graph-words) o)
(if (stringp g) (intern g :graph-words) g)))
-(defun lock-pattern (subject predicate object graph &key (kind :write) (store *store*))
+(defun lock-pattern (subject predicate object graph &key (kind :write)
+ (store *store*))
(multiple-value-bind (subject predicate object graph)
(intern-spog subject predicate object graph)
(let ((lock nil) (pattern (list subject predicate object graph)))
View
66 transaction.lisp
@@ -44,7 +44,8 @@
:name :wild :type :wild)))
(when (and (pathname-match-p file "tx-*")
(or (null timestamp)
- (and (numberp timestamp) (> (file-write-date file) timestamp))))
+ (and (numberp timestamp)
+ (> (file-write-date file) timestamp))))
(format t "Found transaction file ~A~%" file)
(push file transaction-logs)))
(sort transaction-logs
@@ -65,7 +66,8 @@
(with-open-file (stream file :element-type '(unsigned-byte 8))
(let ((magic-byte (read-byte stream nil :eof)))
(unless (= +transaction+ magic-byte)
- (error 'transaction-error :reason (format nil "~A is not a tx file!" file)))
+ (error 'transaction-error
+ :reason (format nil "~A is not a tx file!" file)))
(deserialize-action magic-byte stream)))))
(defun restore-triple-store (store)
@@ -86,17 +88,19 @@
store))))
(defun snapshot (store)
- (with-open-file (stream
- (format nil "~A/snap-~A" (location store) (get-universal-time))
- :direction :output
- :element-type '(unsigned-byte 8)
- :if-exists :overwrite
- :if-does-not-exist :create)
+ (with-open-file
+ (stream
+ (format nil "~A/snap-~A" (location store) (get-universal-time))
+ :direction :output
+ :element-type '(unsigned-byte 8)
+ :if-exists :overwrite
+ :if-does-not-exist :create)
(with-locked-index ((main-idx store))
(maphash #'(lambda (id triple)
(declare (ignore id))
(when (persistent? triple)
- (logger :info "serializing ~A: ~A" (triple-id triple) triple)
+ (logger :info "serializing ~A: ~A"
+ (triple-id triple) triple)
(serialize triple stream)))
(gethash :id-idx (index-table (main-idx store)))))
(logger :info "Recording null byte")
@@ -124,13 +128,15 @@
(defun clear-tx-log (store)
(dolist (file (directory
- (make-pathname :directory (location store) :name :wild :type :wild)))
+ (make-pathname :directory (location store)
+ :name :wild :type :wild)))
(when (pathname-match-p file "tx-*")
(delete-file file))))
(defun clear-snapshots (store)
(dolist (file (directory
- (make-pathname :directory (location store) :name :wild :type :wild)))
+ (make-pathname :directory (location store)
+ :name :wild :type :wild)))
(when (pathname-match-p file "snap-*")
(delete-file file))))
@@ -144,10 +150,11 @@
(when (and (transaction? tx) (tx-queue tx))
(logger :info "Recording tx ~A~%" (reverse (tx-queue tx)))
(handler-case
- (with-open-file (stream (format nil "~A/tx-~A-~A" (location store)
- (get-universal-time) (incf *file-counter*))
- :element-type '(unsigned-byte 8) :direction :output
- :if-exists :rename :if-does-not-exist :create)
+ (with-open-file (stream
+ (format nil "~A/tx-~A-~A" (location store)
+ (get-universal-time) (incf *file-counter*))
+ :element-type '(unsigned-byte 8) :direction :output
+ :if-exists :rename :if-does-not-exist :create)
(set-dirty store)
(dump-transaction stream tx))
(error (c)
@@ -199,7 +206,8 @@
(setq last-snapshot (gettimeofday))
(logger :info "Snapshot finished"))
(otherwise
- (logger :info "Unknown msg to tx-log thread: ~A" msg))))))
+ (logger :info "Unknown msg to tx-log thread: ~A"
+ msg))))))
(error (condition)
(logger :err "Unhandled error in tx logger for ~A: ~A"
store condition))))))
@@ -229,32 +237,39 @@
(defun execute-tx (store fn timeout max-tries retries)
(if (>= retries max-tries)
(error 'transaction-error
- :reason (format nil "Unable to execute transaction. Too may retries (~A)."
- retries))
+ :reason
+ (format nil "Unable to execute transaction. Too may retries (~A)."
+ retries))
(let ((*current-transaction* (make-transaction :store store)))
(logger :info "~A execute-tx starting" *current-transaction*)
(handler-case
(sb-ext:with-timeout timeout
(funcall fn))
(sb-ext:timeout (condition)
- (logger :info "~A execute-tx timeout ~A" *current-transaction* condition)
+ (logger :info "~A execute-tx timeout ~A"
+ *current-transaction* condition)
(rollback-tx *current-transaction*)
(release-all-locks *current-transaction*)
(execute-tx store fn timeout max-tries (1+ retries)))
(error (condition)
- (logger :info "~A execute-tx error ~A" *current-transaction* condition)
+ (logger :info "~A execute-tx error ~A"
+ *current-transaction* condition)
(rollback-tx *current-transaction*)
(release-all-locks *current-transaction*)
(error 'transaction-error
- :reason (format nil "Unable to execute transaction: ~A" condition)))
+ :reason
+ (format nil "Unable to execute transaction: ~A" condition)))
(:no-error (result)
- (logger :info "~A execute-tx success (~A)" *current-transaction* result)
+ (logger :info "~A execute-tx success (~A)"
+ *current-transaction* result)
(when (tx-queue *current-transaction*)
- (sb-concurrency:send-message (log-mailbox store) *current-transaction*))
+ (sb-concurrency:send-message
+ (log-mailbox store) *current-transaction*))
(release-all-locks *current-transaction*)
result)))))
-(defmacro with-graph-transaction ((store &key (timeout 10) (max-tries 10)) &body body)
+(defmacro with-graph-transaction ((store &key (timeout 10) (max-tries 10))
+ &body body)
(with-gensyms (atomic-op)
`(let ((,atomic-op #'(lambda () ,@body)))
(cond ((and (transaction? *current-transaction*)
@@ -263,6 +278,7 @@
(funcall ,atomic-op))
((transaction? *current-transaction*)
(error 'transaction-error
- :reason "Transactions cannot currently span multiple stores."))
+ :reason
+ "Transactions cannot currently span multiple stores."))
(t
(execute-tx ,store ,atomic-op ,timeout ,max-tries 0))))))
View
25 triples.lisp
@@ -1,9 +1,23 @@
(in-package #:vivace-graph-v2)
-(defgeneric triple-equal (t1 t2)
+(defgeneric triple-eql (t1 t2)
(:method ((t1 triple) (t2 triple)) (uuid:uuid-eql (id t1) (id t2)))
(:method (t1 t2) nil))
+(defgeneric triple-equal (t1 t2)
+ (:method ((t1 triple) (t2 triple))
+ (and (uuid:uuid-eql (id t1) (id t2))
+ (equal (triple-subject t1) (triple-subject t2))
+ (equal (triple-predicate t1) (triple-predicate t2))
+ (equal (triple-object t1) (triple-object t2))))
+ (:method (t1 t2) nil))
+
+(defgeneric triple-equalp (t1 t2)
+ (:method ((t1 triple) (t2 triple))
+ (and (triple-equal t1 t2)
+ (equal (triple-graph t1) (triple-graph t2))))
+ (:method (t1 t2) nil))
+
(defmethod deleted? ((triple triple))
(if (not *read-uncommitted*)
(with-graph-transaction (*store*)
@@ -29,7 +43,8 @@
(defmethod predicate ((triple triple))
(flet ((get-value ()
(if (and (symbolp (triple-predicate triple))
- (eq *graph-words* (symbol-package (triple-predicate triple))))
+ (eq *graph-words*
+ (symbol-package (triple-predicate triple))))
(symbol-name (triple-predicate triple))
(triple-predicate triple))))
(if (not *read-uncommitted*)
@@ -102,10 +117,10 @@
(format nil "_anon:~A" (make-uuid)))
(let ((regex
- "^_anon\:[0-9abcdefABCEDF]{8}\-[0-9abcdefABCEDF]{4}\-[0-9abcdefABCEDF]{4}\-[0-9abcdefABCEDF]{4}\-[0-9abcdefABCEDF]{12}$"))
+ "^_anon\:[0-9a-fA-F]{8}\-[0-9a-fA-F]{4}\-[0-9a-fA-F]{4}\-[0-9a-fA-F]{4}\-[0-9a-fA-F]{12}$"))
(defun anonymous? (node)
- (when (stringp node)
- (cl-ppcre:scan regex node))))
+ (and (stringp node)
+ (cl-ppcre:scan regex node))))
(defun make-text-idx-key (g s p o)
(string-downcase (format nil "~A~A~A~A~A~A~A" g #\Nul s #\Nul p #\Nul o)))
View
11 vivace-graph-v2.asd
@@ -10,12 +10,11 @@
:version "0.2"
:description "Vivace Graph Version 2"
:long-description "Vivace Graph Version 2."
- :depends-on (:sb-concurrency
- :sb-posix
- :babel
+ :depends-on (:babel
+ #+sbcl :sb-concurrency
+ #+sbcl :sb-posix
:cffi
:bordeaux-threads
- ;;:cl-btree-0.5
:cl-skip-list
:salza2
:chipz
@@ -34,7 +33,9 @@
#+sbcl (:file "sb-thread")
(:file "vivace-graph-v2-package" :depends-on ("uuid"))
(:file "hash-table"
- :depends-on ("vivace-graph-v2-package" "sb-impl" "sb-thread"))
+ :depends-on ("vivace-graph-v2-package"
+ "sb-impl"
+ "sb-thread"))
(:file "gettimeofday" :depends-on ("vivace-graph-v2-package"))
(:file "conditions" :depends-on ("vivace-graph-v2-package"))
(:file "constants" :depends-on ("conditions"))
Please sign in to comment.
Something went wrong with that request. Please try again.