Commit Graph

179 Commits

Author SHA1 Message Date
Sam Caldwell 3ec3721266 make sure meta-action is an action 2016-02-23 16:08:49 -05:00
Sam Caldwell 5c6f8aed31 fix network spawning issues 2016-02-23 16:05:51 -05:00
Sam Caldwell 79cd6eac1a Modify core behavior to run each actor concurrently
Each actor (including network actors) runs in its own thread and
communicates with its containing network via an (incoming) event
channel and an (outgoing) action channel.

Each network actor polls (syncs) on the incoming event channel from its
parent as well as the outgoing action channel from each of its child
actors. The network processes the effects of each event/action and
notifies its children by sending out the corresponding events.
2016-02-23 13:42:00 -05:00
Sam Caldwell 874ba60f06 use trie comprehension in bank account example 2016-02-22 23:35:11 -05:00
Sam Caldwell aa4e4afdde fix trie comprehension hygiene-bending 2016-02-22 23:35:11 -05:00
Tony Garnock-Jones 62c0ce18a4 Comment explaining a little of the motivation for the previous commit. 2016-02-20 11:41:07 -05:00
Tony Garnock-Jones 92be8eaf70 Only respond to link-results that are genuinely intended for us.
This can be a concern if some facet subscribes to wildcard. An improved design
would ensure facets only receive events that fall within its interests.
2016-02-19 20:10:26 -05:00
Sam Caldwell 96fe9f46e1 add an effectful trie comprehension 2016-02-19 18:46:59 -05:00
Sam Caldwell b7775efd9b Raise an error when trying to iterate over an infinite trie 2016-02-19 15:38:43 -05:00
Sam Caldwell a045d54071 Bind variables in lexical order
Fixes #12
2016-02-12 19:30:00 -05:00
Tony Garnock-Jones 817bfd7517 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.
2016-02-11 23:50:37 -05:00
Tony Garnock-Jones c3b2df00cd Compute affected peers by the aggregate change, not the incoming action. 2016-02-11 22:28:04 -05:00
Tony Garnock-Jones 01b6bf92ee Echo cancellation for prospect. 2016-02-11 22:26:53 -05:00
Tony Garnock-Jones fd7dc03dc6 Echo cancellation for prospect-monolithic. Still deciding how best to address incremental variant. 2016-02-07 19:32:38 -05:00
Tony Garnock-Jones 1b05122db4 Fix monolithic pretty-printing of SCNs 2016-02-07 16:17:47 -05:00
Tony Garnock-Jones 1e4415e30b Failing test case, more or less. 2016-02-07 16:17:20 -05:00
Tony Garnock-Jones d5c4b30335 Use `continuation-prompt-available?` to support `actor` at prospect "toplevel". 2016-02-05 18:06:29 -05:00
Sam Caldwell 92169d5e10 use comprehension in box-and-client 2016-02-05 13:27:20 -05:00
Sam Caldwell 26966b9c34 Implement trie-comprehension macros
Trie comprehensions abstract the process of projecting one-or-more
tries against some patterns, binding the results to usable variables,
and iterating over the results.

Currently supports for-trie/fold, for-trie/list, for-trie/set, and
for-trie/patch, as well as the ability to easily create new trie
comprehension macros. Note that these comprehensions operate in the
style of `for*` rather than `for`.
2016-02-05 13:27:20 -05:00
Sam Caldwell 540e3cb1f0 undollar into a particular lexical context 2016-02-05 13:27:20 -05:00
Tony Garnock-Jones b85409ef10 Demos of wildcard assertions 2016-02-02 23:01:08 -05:00
Tony Garnock-Jones 2884806378 An additional year has begun 2016-01-30 11:39:05 -05:00
Tony Garnock-Jones 5f6f3429c8 Fix the fix for the "out"-related bug from commit de1dc5a.
The problem was that sometimes there'd be an assertion that `meta` had
asserted that *also* was asserted by some local process. Commit
de1dc5a introduced code that would drop the assertion in this case;
this commit changes it to only remove assertions from the set when
*only* `meta` is asserting them.
2016-01-27 21:29:42 -05:00
Tony Garnock-Jones 6b31b33230 Nameable demand-matchers 2016-01-27 21:03:08 -05:00
Tony Garnock-Jones bedd44aae5 Using #f as a name doesn't override existing names. 2016-01-27 20:53:37 -05:00
Tony Garnock-Jones 03efb19a4d Optionally-named process behaviour functions 2016-01-27 20:46:24 -05:00
Tony Garnock-Jones de1dc5aa8e Fix "out"-related bug in monolithic implementation 2016-01-24 00:04:29 -05:00
Tony Garnock-Jones 0a6cce2d3d on-claim fix for incremental, on-claim impl for monolithic 2016-01-24 00:03:59 -05:00
Tony Garnock-Jones ff3ba722ad Fix pretty-printing of networks 2016-01-24 00:03:32 -05:00
Tony Garnock-Jones cf00496338 Monolithic semantics. 2016-01-23 18:24:07 -05:00
Tony Garnock-Jones 3c5a6f00ed Rename "matcher" to "trie". 2016-01-21 21:55:41 -05:00
Tony Garnock-Jones e1c5fd4ac1 Switch from timer-expired /messages/ to /assertions/ at ground level.
Previously, the timer driver caused the background thread to call
send-ground-message to indicate that a timer had expired. However,
this can lead to a race! In cases where a timer expires very soon, the
channel-put of the set-timer instruction leads shortly thereafter to a
send-ground-message which then races the establishment of the
metalevel-1 subscription to the timer-expired events that are coming
from the background thread.

The race cannot occur in the sequential implementation because the
network makes sure to enqueue the transition actions resulting from
the set-timer message delivery ahead of any enqueueing of the
timer-expired ground message, so that by the time the ground message
is processed, the relevant subscription always exists.

In a looser implementation, however, this level of synchronised
activity may not exist, and the ground message may overtake the
subscription establishment.

Therefore, I've changed the driver to instead use ground /assertions/
to signal expired timers. Upon processing of such an assertion, the
driver cleans it up. This is very similar to hardware interrupts,
where the driver has to "clear the interrupt" in order to let the
system continue properly.
2016-01-21 17:38:12 -05:00
Tony Garnock-Jones 5e6d72b991 Rearrange bank-account examples. 2016-01-18 17:38:58 -05:00
Tony Garnock-Jones 1d28908600 Add project-assertions convenience routine. 2016-01-18 17:33:26 -05:00
Tony Garnock-Jones aa9677dbe1 Rename World to Network 2016-01-18 14:29:48 -05:00
Tony Garnock-Jones ad9a78b4a4 Directly detect incoming connections in examples/chat-simplified-internals 2016-01-16 22:12:35 -05:00
Tony Garnock-Jones 024157103c Simplified TCP protocol chat example 2016-01-16 21:59:30 -05:00
Tony Garnock-Jones b7726dafb8 Clearer example 2016-01-16 18:45:44 -05:00
Tony Garnock-Jones fe2bc31f4f Avoid use of sub; wait for server to come ready before sending messages 2016-01-16 18:11:35 -05:00
Tony Garnock-Jones f1c1646163 Bank account example 2016-01-16 14:32:04 -05:00
Tony Garnock-Jones 6058f8ec6e mini-echo examples 2016-01-14 15:19:00 -05:00
Tony Garnock-Jones 31fe2cd92b Variations on chat server 2016-01-13 11:35:03 -05:00
Tony Garnock-Jones 4faf189029 Echo example in actor form 2016-01-13 11:26:01 -05:00
Tony Garnock-Jones 99466dad7f examples/actor/chat-client.rkt 2016-01-08 12:22:27 -05:00
Tony Garnock-Jones a978731c55 Correct typo: 5000 should be 5999 2016-01-08 12:22:11 -05:00
Tony Garnock-Jones 32ff49a814 TODO 2015-12-18 11:45:01 +13:00
Tony Garnock-Jones 881769c274 Comment out debug-printing in expand-state 2015-12-15 15:05:28 +13:00
Tony Garnock-Jones e3aaed1ec9 Untabify 2015-12-15 15:01:13 +13:00
Tony Garnock-Jones edaf97ae05 Simplify and rename %%boot to actor-body->spawn-action 2015-12-12 07:02:13 +13:00
Tony Garnock-Jones 97dceedff2 Expose `perform-core-action!`. 2015-12-12 06:52:16 +13:00