When acting-pid is 'meta, take the entire delta as the delta-aggregate.

This is correct because now that we have echo-cancelled SCNs, incoming
SCNs from the metalevel are *always* new information for the contained
actors.
This commit is contained in:
Tony Garnock-Jones 2016-02-11 23:50:37 -05:00
parent c3b2df00cd
commit 817bfd7517
3 changed files with 29 additions and 1 deletions

View File

@ -0,0 +1,14 @@
#lang prospect-monolithic
;; The actor should receive a single event adding the (at-meta x) assertion.
(require prospect/pretty)
(spawn-network
(spawn (lambda (e counter)
(and e
(let ((new-counter (+ counter 1)))
(printf "Received event ~a:\n~a\n" new-counter (prospect-pretty-print->string e))
(transition (+ counter 1) '()))))
0
(list (scn/union (assertion (at-meta 'x))
(subscription 'x #:meta-level 1)))))

View File

@ -0,0 +1,14 @@
#lang prospect
;; The actor should receive a single event adding the (at-meta x) assertion.
(require prospect/pretty)
(spawn-network
(spawn (lambda (e counter)
(and e
(let ((new-counter (+ counter 1)))
(printf "Received event ~a:\n~a\n" new-counter (prospect-pretty-print->string e))
(transition (+ counter 1) '()))))
0
(list (patch-seq (sub 'x #:meta-level 1)
(assert (at-meta 'x))))))

View File

@ -81,7 +81,7 @@
(define (compute-patches old-m new-m label delta delta-aggregate)
(define delta-aggregate/no-echo
(if (meta-label? label)
delta-aggregate
delta
(patch (trie-prune-branch (patch-added delta-aggregate) struct:at-meta)
(trie-prune-branch (patch-removed delta-aggregate) struct:at-meta))))
(define old-routing-table (mux-routing-table old-m))