From bc4c080641486166eeb1243136b0f054aed05b7e Mon Sep 17 00:00:00 2001 From: Tony Garnock-Jones Date: Fri, 4 May 2018 16:04:42 +0100 Subject: [PATCH] Quasi-useful debug output --- syndicate/dataspace.rkt | 2 ++ syndicate/skeleton.rkt | 9 +++++++++ 2 files changed, 11 insertions(+) diff --git a/syndicate/dataspace.rkt b/syndicate/dataspace.rkt index d71daf7..9f956cb 100644 --- a/syndicate/dataspace.rkt +++ b/syndicate/dataspace.rkt @@ -364,6 +364,8 @@ (define (apply-patch! ds ac delta) (when (not (bag-empty? delta)) (define ds-assertions (dataspace-assertions ds)) + ;; (log-info "apply-patch! ~a ~v" ac delta) + ;; (for [((a c) (in-bag/count ds-assertions))] (log-info " . ~v = ~v" a c)) (define rt (dataspace-routing-table ds)) (define new-cleanup-changes (for/fold [(cleanup-changes (actor-cleanup-changes ac))] [((a count) (in-bag/count delta))] diff --git a/syndicate/skeleton.rkt b/syndicate/skeleton.rkt index 2c988a4..25fcabb 100644 --- a/syndicate/skeleton.rkt +++ b/syndicate/skeleton.rkt @@ -248,6 +248,11 @@ (modify-skconst! proj-handler term0) (hash-for-each (skeleton-matched-constant-table proj-handler) (lambda (variable-proj acc) + ;; (when restriction-path + ;; (log-info "Restriction path ~v in effect; variable-proj is ~v, and term is ~v" + ;; restriction-path + ;; variable-proj + ;; term0)) (when (or (not restriction-path) (equal? restriction-path variable-proj)) (define variables (apply-projection term0-term variable-proj)) @@ -278,6 +283,9 @@ (define (add-term-to-skconst! skconst term) (hash-set! (skeleton-matched-constant-cache skconst) term #t)) (define (add-term-to-skacc! skacc vars _term) + ;; (log-info ">>>>>> At addition time for ~v, cache has ~v" + ;; _term + ;; (hash-ref (skeleton-accumulator-cache skacc) vars 0)) (match (bag-change! (skeleton-accumulator-cache skacc) vars 1) ['absent->present (hash-for-each (skeleton-accumulator-handlers skacc) @@ -299,6 +307,7 @@ (hash-remove! (skeleton-matched-constant-cache skconst) term)) (define (remove-term-from-skacc! skacc vars _term) (define cache (skeleton-accumulator-cache skacc)) + ;; (log-info ">>>>>> At removal time for ~v, cache has ~v" _term (hash-ref cache vars 0)) (if (bag-member? cache vars) (match (bag-change! cache vars -1) ['present->absent