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:
parent
c3b2df00cd
commit
817bfd7517
|
@ -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)))))
|
|
@ -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))))))
|
|
@ -81,7 +81,7 @@
|
||||||
(define (compute-patches old-m new-m label delta delta-aggregate)
|
(define (compute-patches old-m new-m label delta delta-aggregate)
|
||||||
(define delta-aggregate/no-echo
|
(define delta-aggregate/no-echo
|
||||||
(if (meta-label? label)
|
(if (meta-label? label)
|
||||||
delta-aggregate
|
delta
|
||||||
(patch (trie-prune-branch (patch-added delta-aggregate) struct:at-meta)
|
(patch (trie-prune-branch (patch-added delta-aggregate) struct:at-meta)
|
||||||
(trie-prune-branch (patch-removed delta-aggregate) struct:at-meta))))
|
(trie-prune-branch (patch-removed delta-aggregate) struct:at-meta))))
|
||||||
(define old-routing-table (mux-routing-table old-m))
|
(define old-routing-table (mux-routing-table old-m))
|
||||||
|
|
Loading…
Reference in New Issue