Commit Graph

189 Commits

Author SHA1 Message Date
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 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 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 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
Tony Garnock-Jones bd0278297b Add `network` to actor.rkt 2015-12-12 06:45:15 +13:00
Tony Garnock-Jones debd191992 Fix bug with `until` and #:collect.
`state` now yields the explicit values given in a termination clause
*prepended* to the `#:collect`ed variables of the calling actor at the
time the state terminates. `until` now yields zero values in its sole
termination clause, and thus yields only the `#:collect`ed values.
2015-12-12 06:22:40 +13:00
Tony Garnock-Jones e2b7805232 Simple file-system example, similar to that in the paper submission 2015-12-11 20:25:52 +13:00
Tony Garnock-Jones 122ea7ea1c Steps toward proper scoping of #:collect bindings 2015-12-11 20:25:17 +13:00
Tony Garnock-Jones c607f1c53f Cosmetic rearrangement of MINIMART_TRACE flag-parsing code 2015-12-11 20:24:54 +13:00
Tony Garnock-Jones 0335e54e6a Check for incorrect use of ? in patterns; allow (? pred? ...) in patterns 2015-12-11 20:24:20 +13:00
Tony Garnock-Jones 30d46a2019 Avoid incorrect use of ?; replace with _ 2015-12-11 20:22:36 +13:00
Tony Garnock-Jones 91c2d6a3c7 box-and-client actor example 2015-12-11 17:55:46 +13:00
Tony Garnock-Jones 424f38b268 Bring #:collect vars into scope for maintained assertions in actor.rkt 2015-12-11 17:55:34 +13:00
Tony Garnock-Jones 80ab8e20cc Avoid crashing trace when behavior or state are missing from relevant tables 2015-12-11 17:50:55 +13:00
Tony Garnock-Jones 71c5cd3831 No longer store aggregates for ongoing assertions; instead, use the mux's interest-table 2015-12-11 17:36:32 +13:00
Tony Garnock-Jones e349e28650 Explore behavior of limit-patch a little 2015-12-11 17:36:10 +13:00
Tony Garnock-Jones e4eed9a9e4 Add prospect-pretty-print->string 2015-12-11 16:34:50 +13:00
Tony Garnock-Jones 07f7fcb060 Handy debug printing (commented out) 2015-12-11 16:25:14 +13:00
Tony Garnock-Jones cd6f5a0f59 Remove dead code 2015-12-11 16:25:03 +13:00
Tony Garnock-Jones b0d20f328a Introduce syntax-classes 2015-12-11 16:24:42 +13:00
Tony Garnock-Jones 3b161ef573 First running HLL program! 2015-12-11 15:23:32 +13:00
Tony Garnock-Jones 29042830e2 Greatly improve pretty-printing of many prospect structures 2015-12-11 15:21:24 +13:00
Tony Garnock-Jones 85450362fb Fix treap-values, which had been returning the keys (!) 2015-12-11 15:20:51 +13:00
Tony Garnock-Jones 309ca6f349 Avoid crashing in trace/stderr.rkt by printing the special boot pseudo-event. 2015-12-11 15:17:01 +13:00
Tony Garnock-Jones d9db671896 Provide sequence-transitions*, sequence-transitions0 and sequence-transitions0* 2015-12-11 15:16:06 +13:00
Tony Garnock-Jones 154dfa3831 Much interesting progress in actor.rkt 2015-12-10 12:59:49 +13:00
Tony Garnock-Jones c7870086c5 sequence-transitions0, sequence-transitions0*, and sequence-transitions* 2015-12-10 12:59:33 +13:00
Tony Garnock-Jones 4876a60f93 More progress toward compilation of state forms 2015-12-09 16:18:36 +13:00
Tony Garnock-Jones 4b0d800b5f Extract collected values in (until) macro 2015-12-09 14:34:24 +13:00
Tony Garnock-Jones 2004d30f3a Work toward using mux directly in actor.rkt 2015-12-09 14:12:27 +13:00
Tony Garnock-Jones a9600b0de8 Use newly-refactored mux in endpoint implementation 2015-12-05 06:23:28 +13:00
Tony Garnock-Jones 4db7c17dc8 Refactor split in responsibilities between core and mux 2015-12-05 05:58:16 +13:00
Tony Garnock-Jones e03645e682 Correct error in example used for development 2015-12-05 04:40:31 +13:00
Tony Garnock-Jones aae15a008b Switch to generic action-instruction; actor macro; more work on expand-state 2015-12-05 04:40:31 +13:00
Tony Garnock-Jones 0bf0af74e6 Remove obsolete comment 2015-12-05 04:40:31 +13:00
Tony Garnock-Jones 1e1fccd34d Switch to endpoint-based actor.rkt layer 2015-12-05 04:40:31 +13:00
Tony Garnock-Jones 54b80cf79b Add as-endpoint to allow performing actions as if they came from other endpoints 2015-12-05 04:40:30 +13:00
Tony Garnock-Jones 25fd4fddb7 Remove notion of endpoint pre/peri/post handlers 2015-12-05 04:40:30 +13:00
Tony Garnock-Jones 25489c0043 Rearrange & begin documenting 2015-12-05 04:40:30 +13:00
Tony Garnock-Jones 2400800bba Lots of work toward HLL 2015-12-05 04:40:30 +13:00
Tony Garnock-Jones 66fbb5e398 Fix create-process: it returns a transition 2015-12-05 04:40:30 +13:00
Tony Garnock-Jones 2ae8817a6b Log to show what is going on in the box-and-client example 2015-12-03 12:56:52 -08:00
Tony Garnock-Jones 3087658f01 Fix missing exn propagation 2015-12-03 12:56:52 -08:00
Tony Garnock-Jones 506d74ed42 Support other kinds of actions than patches when first spawning a process 2015-12-03 12:56:52 -08:00
Tony Garnock-Jones feb55c174c New macro system forces fix to phase problem 2015-11-18 14:32:59 -05:00
Tony Garnock-Jones c3e94ff7e0 Oops -- wanted the raw ctor, not the cooked one 2015-11-18 14:32:43 -05:00
Tony Garnock-Jones c4f8b42787 Allow recording of exceptions in quit structs. 2015-11-17 14:01:04 -05:00
Tony Garnock-Jones 7b72d40a70 box-and-client example 2015-11-02 21:40:12 -05:00
Tony Garnock-Jones 212900bc1a Cope with quit-world in the middle of an action sequence; TODO: unclear whether this is the best approach 2015-10-23 21:49:21 -04:00
Tony Garnock-Jones 974c21e5d0 Add quit-world action to chat.rkt 2015-10-23 19:50:08 -04:00
Tony Garnock-Jones d7095c9995 quit-world action 2015-10-23 19:49:30 -04:00
Tony Garnock-Jones f5d331b0d8 Canonicalize atoms during pattern- and projection-compilation and value-matching 2015-10-23 19:18:34 -04:00
Tony Garnock-Jones 7ed7ce096d Add (seal)s, for hiding structure from the routing table. Drastically improves big-bang example performance. 2015-09-07 16:05:06 -04:00
Tony Garnock-Jones 2a34861168 Switch back to module context; module-begin seems inappropriate? 2015-08-25 16:12:15 -04:00
Tony Garnock-Jones f6be642c97 Fix set/tset usage in endpoint.rkt 2015-08-25 15:54:23 -04:00
Tony Garnock-Jones 0a98061005 Use kernel-form-identifier-list and module-begin context for local-expand 2015-08-25 15:54:08 -04:00
Tony Garnock-Jones f52ba70b98 Toy durable key-value store 2015-08-21 17:56:03 -04:00
Tony Garnock-Jones 4d3e668ed4 Support deletion 2015-08-21 17:41:59 -04:00
Tony Garnock-Jones e54004f4e0 Simple key-value store. Not finished! 2015-08-21 17:02:41 -04:00
Tony Garnock-Jones 44b6b5dcfa On-screen display of active window ID. 2015-08-18 20:14:59 -04:00
Tony Garnock-Jones 35e966cb13 Switch to arbitrary hash-order. 2015-08-18 20:14:31 -04:00
Tony Garnock-Jones 5eb155cc11 big-bang example 2015-08-18 20:01:58 -04:00
Tony Garnock-Jones 02c5ee97d3 Echo server example 2015-08-18 12:45:29 -04:00
Tony Garnock-Jones 2e3a8fceaa Handle empty matchers better in dot rendering 2015-07-14 17:56:10 -04:00
Tony Garnock-Jones b2e94f63b4 Try it out in the tests 2015-07-14 17:44:12 -04:00
Tony Garnock-Jones 2b0ec0d632 dot output for matchers 2015-07-14 17:38:32 -04:00
Tony Garnock-Jones 7d561fc49e First commit switching from sets to tsets for labels in RHSs of matchers. 2015-06-19 20:43:23 -04:00
Tony Garnock-Jones ee1cf9b100 tset 2015-06-19 20:18:10 -04:00
Tony Garnock-Jones 29bbe7678b Export treap-order; add treap->empty and treap-fold. 2015-06-19 20:08:16 -04:00
Tony Garnock-Jones 76eaa2fa39 Port websocket support from minimart 2015-06-06 17:15:43 -04:00
Tony Garnock-Jones 417c7728b7 Break dependency on web-server-lib 2015-05-23 11:41:43 -04:00
Tony Garnock-Jones 2a6393f88b DSL support 2015-05-12 20:11:47 -04:00
Tony Garnock-Jones 95bdd892f6 Initial work on endpoints for prospect 2015-05-11 18:25:38 -04:00
Tony Garnock-Jones 2b5358ab2c More flexible state printing during tracing 2015-05-11 18:25:21 -04:00
Tony Garnock-Jones e8b99ae8e7 Cosmetic: trim trailing whitespace 2015-05-11 13:33:05 -04:00
Tony Garnock-Jones 5ea3cf283f Non-working backward-chaining experiment; observe one specific ancestry relationship. 2015-04-25 14:51:12 -04:00