#lang syndicate/actor

This commit is contained in:
Tony Garnock-Jones 2016-07-10 12:33:16 -04:00
parent bf12d3f27f
commit 175c619edc
26 changed files with 36 additions and 59 deletions

View File

@ -0,0 +1,9 @@
#lang racket/base
(require (except-in "lang.rkt"
dataspace
assert
))
(require "actor.rkt")
(provide (all-from-out "lang.rkt")
(all-from-out "actor.rkt"))

View File

@ -48,6 +48,9 @@
(struct-out endpoint)
)
(module reader syntax/module-reader
syndicate/actor-lang)
(require racket/set)
(require racket/match)

View File

@ -1,8 +1,6 @@
#lang syndicate
#lang syndicate/actor
;; Hello-worldish "bank account" example.
(require syndicate/actor)
(struct account (balance) #:prefab)
(struct deposit (amount) #:prefab)

View File

@ -1,8 +1,6 @@
#lang syndicate
#lang syndicate/actor
;; Simple mutable box and count-to-infinity box client.
(require syndicate/actor)
(struct set-box (new-value) #:transparent)
(struct box-state (value) #:transparent)

View File

@ -1,8 +1,6 @@
#lang syndicate
#lang syndicate/actor
;; Demonstrate sending a message to multiple receivers.
(require syndicate/actor)
(struct envelope (destination message) #:prefab)
(actor (react (on (message (envelope 'alice $message))

View File

@ -1,6 +1,5 @@
#lang syndicate
#lang syndicate/actor
(require syndicate/actor)
(require syndicate/drivers/timer)
(spawn-timer-driver)

View File

@ -1,6 +1,5 @@
#lang syndicate
#lang syndicate/actor
(require syndicate/actor)
(require syndicate/drivers/tcp)
(require (only-in racket/port read-bytes-line-evt))

View File

@ -1,6 +1,5 @@
#lang syndicate
#lang syndicate/actor
(require syndicate/actor)
(require syndicate/drivers/tcp)
(require (only-in racket/string string-trim))

View File

@ -1,6 +1,5 @@
#lang syndicate
#lang syndicate/actor
(require syndicate/actor)
(require syndicate/drivers/tcp)
(require (only-in racket/string string-trim))

View File

@ -1,6 +1,5 @@
#lang syndicate
#lang syndicate/actor
(require syndicate/actor)
(require syndicate/drivers/tcp)
(require (only-in racket/string string-trim))

View File

@ -1,6 +1,5 @@
#lang syndicate
#lang syndicate/actor
(require syndicate/actor)
(require syndicate/drivers/tcp)
(require (only-in racket/string string-trim))

View File

@ -1,6 +1,5 @@
#lang syndicate
#lang syndicate/actor
(require syndicate/actor)
(require syndicate/drivers/tcp)
(spawn-tcp-driver)

View File

@ -1,4 +1,4 @@
#lang syndicate
#lang syndicate/actor
;; Illustrates a (now fixed) bug where mutation altering a
;; subscription caused the `retracted` half of a during instance to be
;; lost.
@ -14,8 +14,6 @@
;;
;; Should eventually be turned into some kind of test case.
(require syndicate/actor)
(struct foo (x y) #:prefab)
(actor (define x 123)

View File

@ -1,9 +1,7 @@
#lang syndicate
#lang syndicate/actor
;; Illustrates the response of asserted / retracted / during to
;; observation of assertions discarding some of their dimensions.
(require syndicate/actor)
(struct ready (what) #:prefab)
(struct entry (key val) #:prefab)

View File

@ -1,8 +1,7 @@
#lang syndicate
#lang syndicate/actor
;; Toy file system, based on the example in the ESOP2016 submission.
;; syndicate/actor implementation, using "during" instead of "on asserted/until retracted".
(require syndicate/actor)
(require syndicate/drivers/timer)
(require (only-in racket/port read-bytes-line-evt))
(require (only-in racket/string string-trim string-split))

View File

@ -1,9 +1,8 @@
#lang syndicate
#lang syndicate/actor
;; Toy file system, based on the example in the ESOP2016 submission.
;; Low-level implementation.
(require (only-in syndicate [assert core:assert]))
(require syndicate/actor)
(require syndicate/drivers/timer)
(require (only-in racket/port read-bytes-line-evt))
(require (only-in racket/string string-trim string-split))

View File

@ -1,9 +1,8 @@
#lang syndicate
#lang syndicate/actor
;; Toy file system, based on the example in the ESOP2016 submission.
;; Low-level implementation, without subconversation.
(require (only-in syndicate [assert core:assert]))
(require syndicate/actor)
(require syndicate/drivers/timer)
(require (only-in racket/port read-bytes-line-evt))
(require (only-in racket/string string-trim string-split))

View File

@ -1,8 +1,7 @@
#lang syndicate
#lang syndicate/actor
;; Toy file system, based on the example in the ESOP2016 submission.
;; syndicate/actor implementation.
(require syndicate/actor)
(require syndicate/drivers/timer)
(require (only-in racket/port read-bytes-line-evt))
(require (only-in racket/string string-trim string-split))

View File

@ -1,8 +1,7 @@
#lang syndicate
#lang syndicate/actor
;; Toy file system, based on the example in the ESOP2016 submission.
;; syndicate/actor implementation, without subconversation.
(require syndicate/actor)
(require syndicate/drivers/timer)
(require (only-in racket/port read-bytes-line-evt))
(require (only-in racket/string string-trim string-split))

View File

@ -1,8 +1,6 @@
#lang syndicate
#lang syndicate/actor
;; Minimal syndicate/actor variation on examples/forward-chaining.rkt.
(require syndicate/actor)
(actor (react (assert `(parent john douglas))))
(actor (react (assert `(parent bob john))))
(actor (react (assert `(parent ebbon bob))))

View File

@ -1,6 +1,4 @@
#lang syndicate
(require syndicate/actor)
#lang syndicate/actor
(struct echo-req (body) #:prefab)
(struct echo-resp (body) #:prefab)

View File

@ -1,8 +1,6 @@
#lang syndicate
#lang syndicate/actor
;; Demonstrates that fields may not be passed between actors.
(require syndicate/actor)
(actor #:name 'reading-actor
(react
(on (message `(read-from ,$this-field))

View File

@ -1,9 +1,7 @@
#lang syndicate
#lang syndicate/actor
;; Demonstrates that fields may used in a child facet of a declaring
;; facet, but not the other way around.
(require syndicate/actor)
(actor #:name 'reading-actor
(react
(field [top 123])

View File

@ -1,8 +1,6 @@
#lang syndicate
#lang syndicate/actor
;; Demonstrates that fields may not be passed between sibling facets.
(require syndicate/actor)
(actor (react
(on (message `(read-from ,$this-field))
(log-info "Trying to read from ~a" this-field)

View File

@ -1,7 +1,6 @@
#lang syndicate
#lang syndicate/actor
;; A toy spreadsheet model.
(require syndicate/actor)
(require racket/match)
(require racket/set)

View File

@ -1,4 +1,4 @@
#lang syndicate
#lang syndicate/actor
;; An extended two-buyer book-purchase protocol, based loosely on that
;; given in Honda/Yoshida/Carbone 2008, "Multiparty Asynchronous
;; Session Types".
@ -45,8 +45,6 @@
;; The order for "The Wind in the Willows" has id 10001485, and will be delivered on March 9th
;;---------------------------------------------------------------------------
(require syndicate/actor)
;; Role: SELLER
;; - when interest in (book-quote $title _) appears,
;; asserts (book-quote title (Option Float)), #f meaning not available,