Commit Graph

102 Commits

Author SHA1 Message Date
Tony Garnock-Jones 70a56e6457 Allow stop-current-facet to take scripts to execute, like stop-facet 2017-10-12 13:59:11 +01:00
Tony Garnock-Jones 6c4ae38499 Make HLL `dataspace` no longer automatically `quit-dataspace`. Fixes #20. 2017-09-25 23:52:29 +01:00
Tony Garnock-Jones c9996d53ae Avoid premature termination of parent facet.
Scenario:
 - In script of facet X, (react (stop-when E (react ...)))
 - This creates facet Y, child of X.
 - Facet X has no endpoints, only its child facet Y.
 - When the stop-when fires, without this patch, facet X
   will be terminated because the *inner* react above hasn't executed yet.
 - With this patch, the check for a useless X is done after the stop-when
   has had a chance to run; and so X will survive for now.
2017-08-10 15:08:48 -04:00
Tony Garnock-Jones 11de40ce98 Change spawn processing to include initial-assertions 2017-08-05 19:36:40 -04:00
Tony Garnock-Jones 75aee96e1a query-count 2017-08-01 17:45:19 -04:00
Tony Garnock-Jones 81a0351828 Cope with potential interference in query-sets (etc) from outside the official event handlers 2017-07-30 18:48:33 -04:00
Tony Garnock-Jones 28f6b8acf8 Finally committing the f-to-c examples of Sep 23, 2016 2017-07-27 10:40:11 -04:00
Tony Garnock-Jones a090ed8330 *gc-priority* has been unused since factoring away cross-facet restrictions on fields 2017-07-12 14:25:42 -04:00
Tony Garnock-Jones 8a2ace112b Handle additional cases: children present, and obsolescent parent. Additional fix for #18 2017-07-12 11:38:27 -04:00
Tony Garnock-Jones f6c145b4a7 Fix poor on-stop/post-stop separation. Additional fix for #23. 2017-07-12 11:36:20 -04:00
Tony Garnock-Jones 46e5922dc8 Stop a new facet with no endpoints. Fixes #18. 2017-07-12 11:12:10 -04:00
Tony Garnock-Jones 76c1a5b347 Tentative repair to startup/shutdown ordering problems 2017-07-12 11:02:26 -04:00
Tony Garnock-Jones 3073d8b614 Avoid some stop-when/rising-edge/flag combinations, and some rising-edge uses generally 2017-07-05 07:13:36 -04:00
Tony Garnock-Jones 37cee0c937 (stop-current-facet) 2017-07-05 06:28:06 -04:00
Tony Garnock-Jones ac5c5d2e5f First steps toward correct facet-termination.
- Facet IDs are now lists so arbitrary ancestors can be computed with
   repeated application of cdr

 - `stop-facet` is new and untested, other than that `stop-when` is
   refactored to use `stop-facet`

 - *all* matching stop-when instances run now; the limitation that
    exactly one instance should match is lifted.

 - roughly, (stop-when E X ...) === (on E (stop (current-facet-id) X ...))

Remaining to be done: fix `terminate-facet!` to do the right things in
the right order.
2017-07-04 22:03:32 -04:00
Tony Garnock-Jones 1fdd62d56d Remove enforcement of field scoping rules dating back to separate-actor implementation of HLL 2017-07-04 16:31:46 -04:00
Tony Garnock-Jones ee52520a13 spawn-dataspace --> dataspace-actor 2017-02-25 11:16:25 -05:00
Tony Garnock-Jones 6d8ced489c Accept toplevel action-producing expressions yielding 0 values.
A recent change to Racket must have changed the way `for` expands,
because now in conjunction with `local-expand`, we see *effectively* a
`(begin (values) (void))`. This isn't a problem usually, but in
`#lang syndicate`'s `module-begin` context, we split apart `begin`s
and examine their constituents, leading to examination of something
that will ultimately yield 0 values.

The change accepts either 0 or 1 values when collecting actions for
the module's main boot actor to execute. More than 1 value yielded by
such an expression is still considered an error. Currently, it gives
unhelpful error location information; a future refinement might be to
make the error reporting for this (rare) situation more helpful.
2017-02-20 17:04:39 -05:00
Sam Caldwell 9c1e9719ba swap the meaning of spawn and actor in racket syndicate 2017-02-15 18:18:19 -05:00
Tony Garnock-Jones 6a2163bce9 Avoid accidental shadowing of field-names in query-value* and friends 2016-12-12 10:26:50 +13:00
Tony Garnock-Jones d9905df4e5 Add #:linkage for during/actor and the new supervise/actor to communicate properly 2016-12-07 09:47:39 +13:00
Tony Garnock-Jones 9bb831cac5 Avoid stomping on current-actor-state if it is changed in patch-fn 2016-11-29 12:24:31 +13:00
Tony Garnock-Jones f677c3a888 current-action-transformer must be a store, not a parameter, else it sticks around for (e.g.) supervision of children of supervised actors 2016-11-29 12:23:33 +13:00
Tony Garnock-Jones bde2d833bd Clean up internal interfaces to actor.rkt 2016-11-29 10:34:37 +13:00
Tony Garnock-Jones f638923c6f `current-action-transformer` 2016-11-29 10:19:52 +13:00
Tony Garnock-Jones 05c57ec05d `perform-actions!` 2016-11-29 10:19:06 +13:00
Tony Garnock-Jones c77513e838 Improve actor-state pretty-printing 2016-11-29 10:18:38 +13:00
Tony Garnock-Jones 8202220fec `schedule-actions!` 2016-11-28 11:39:38 +13:00
Tony Garnock-Jones a3335800f6 Make immediate-query able to yield multiple values 2016-11-24 10:36:38 +13:00
Tony Garnock-Jones f201bea5c6 immediate-query 2016-11-23 22:11:35 +13:00
Tony Garnock-Jones 490e414904 Add #:let to during/actor 2016-10-31 17:27:46 -04:00
Tony Garnock-Jones 2d1ad8a62d Add #:on-crash to during/actor 2016-10-30 20:30:38 -04:00
Tony Garnock-Jones 37af1e8726 Cope with transient pulses of demand in during/actor 2016-10-25 16:59:00 -04:00
Tony Garnock-Jones d00f0cbf13 Fix bug where #:when-disabled on-message endpoints were processing
events even when "disabled".
2016-09-25 15:06:22 -04:00
Tony Garnock-Jones e7dc36f126 syndicate/firewall 2016-09-19 21:14:08 -04:00
Tony Garnock-Jones 45c12bacf0 Permit #:when in stop-when. 2016-09-02 10:36:03 +01:00
Tony Garnock-Jones 0bc775a89f First commit moving from (actor (react ...)) to (actor ...) 2016-08-24 17:35:38 +01:00
Tony Garnock-Jones 2b29e817a5 Add *idle-priority*, and allow #:priority on begin/dataflow 2016-08-10 18:41:41 -04:00
Tony Garnock-Jones eaade6e4fd Treat synthetic patches differently wrt previousKnowledge 2016-08-07 21:58:19 -04:00
Tony Garnock-Jones 4e1bab4b90 Introduce make-spawn to capture parameterizations. Closes #10. 2016-07-31 17:24:48 -04:00
Tony Garnock-Jones 463dd48577 Always pick the highest-priority script to run next.
This means that `*gc-priority*` scripts will now reliably run last.
Prior to this change, if some higher-priority script X ran while a
`*gc-priority*` script Y was queued, and it enqueued a high-priority
script Z, then Y would run before Z.
2016-07-31 12:02:11 -04:00
Tony Garnock-Jones 4dad3e9661 Process retractions before asserts in the query forms 2016-07-30 17:05:54 -04:00
Tony Garnock-Jones 68ba2f74a6 Split dataspaces in to relay and mux sublayers.
This is a major change to the previous design, and also a change with
respect to the semantics in the ESOP 2016 paper. All the complexity of
echo-cancellation is stripped out of the core dataspace semantics, and
the relaying protocol is changed from one constructor, `at-meta`, to
two, `inbound` and `outbound`. The relay connecting a dataspace to its
container is now completely symmetric with the contained actors: it
initially asserts interest in what it is to relay, just like any other
actor would. Dataspaces no longer treat relaying specially.

This commit has updated all (I think) of the non-graphical examples. The
graphical code remains to be done in a following commit.
2016-07-30 14:49:05 -04:00
Tony Garnock-Jones b8c109d82b pretty-print-actor-state 2016-07-30 14:49:05 -04:00
Tony Garnock-Jones 56d2fc2c0d Support #:when conditional (on ...) clauses. 2016-07-28 15:45:45 -04:00
Tony Garnock-Jones 0cff79abec Switch from parameters to "stores".
A store is like a parameter, except stores are independent of each
other, unlike parameters which are bundled together into a single
parameterization. This was observable in cases like the
example-action-after-suspension code checked in here, where dataflow
invoked a script, which parameterized current-dataflow-subject-id.
This captured *too much* of things like the pending-patch and
pending-actions. Subsequent `schedule-action!` calls' effects were
then lost.
2016-07-28 15:45:45 -04:00
Tony Garnock-Jones a05d486354 let-event 2016-07-25 18:34:34 -04:00
Tony Garnock-Jones 819ff13835 Expanders for events and assertion-patterns.
Introduced expanders for events (define-event-expander) and for
assertion-patterns (define-assertion-expander).

Introduced convenience syntax and utilities in web.rkt for working
with web requests.

Support nested bindings in assertion-patterns for message events
(only).
2016-07-23 14:57:26 -04:00
Tony Garnock-Jones cecb261c6b Introduce level-anchor and level-anchor->meta-level 2016-07-21 18:53:41 -04:00
Tony Garnock-Jones 5aebc7fa75 #:meta-level in query-set and friends 2016-07-21 18:31:44 -04:00