This is the aether Reference Manual, version 1.1.0, generated automatically by Declt version 4.0 beta 2 "William Riker" on Sun Dec 15 04:12:15 2024 GMT+0.
aether/aether.asd
aether/package.lisp
aether/utilities.lisp
aether/queue.lisp
aether/cheap-heap.lisp
aether/debug/logger.lisp
aether/debug/trace.lisp
aether/event.lisp
aether/message.lisp
aether/courier.lisp
aether/network.lisp
aether/process/process.lisp
aether/process/dpu-helpers.lisp
aether/process/dereference.lisp
aether/process/emissary.lisp
aether/rpc.lisp
aether/lock.lisp
aether/cast.lisp
The main system appears first, followed by any subsystem dependency.
aether
A DSL for emulating an actor-based distributed system, housed on a family of emulated devices.
Eric Peterson <peterson.eric.c@gmail.com>
MIT (See LICENSE.md)
1.1.0
alexandria
(system).
policy-cond
(system).
cl-heap
(system).
global-vars
(system).
package.lisp
(file).
utilities.lisp
(file).
queue.lisp
(file).
cheap-heap.lisp
(file).
debug
(module).
event.lisp
(file).
message.lisp
(file).
courier.lisp
(file).
network.lisp
(file).
process
(module).
rpc.lisp
(file).
lock.lisp
(file).
cast.lisp
(file).
Modules are listed depth-first from the system components tree.
aether/debug
cheap-heap.lisp
(file).
aether
(system).
logger.lisp
(file).
trace.lisp
(file).
aether/process
network.lisp
(file).
aether
(system).
process.lisp
(file).
dpu-helpers.lisp
(file).
dereference.lisp
(file).
emissary.lisp
(file).
Files are sorted by type and then listed depth-first from the systems components trees.
aether/aether.asd
aether/package.lisp
aether/utilities.lisp
aether/queue.lisp
aether/cheap-heap.lisp
aether/debug/logger.lisp
aether/debug/trace.lisp
aether/event.lisp
aether/message.lisp
aether/courier.lisp
aether/network.lisp
aether/process/process.lisp
aether/process/dpu-helpers.lisp
aether/process/dereference.lisp
aether/process/emissary.lisp
aether/rpc.lisp
aether/lock.lisp
aether/cast.lisp
aether/utilities.lisp
package.lisp
(file).
aether
(system).
destructuring-places
(macro).
dohash
(macro).
ignorant-lambda
(macro).
initialize-and-return
(macro).
peek
(function).
assoc-default
(macro).
define-global-counter
(macro).
hash-let
(macro).
macro-lambda-list-places
(function).
aether/queue.lisp
utilities.lisp
(file).
aether
(system).
make-q
(function).
q-deq
(function).
q-deq-first
(function).
q-deq-when
(function).
q-empty
(function).
q-enq
(function).
q-len
(function).
q-peek
(function).
q-push
(function).
aether/cheap-heap.lisp
queue.lisp
(file).
aether
(system).
cheap-heap-dequeue
(function).
cheap-heap-enqueue
(function).
cheap-heap-peep
(function).
make-cheap-heap
(function).
aether/debug/logger.lisp
debug
(module).
*logger*
(special variable).
log-entry
(function).
logger-entries
(reader).
(setf logger-entries)
(writer).
print-log
(function).
print-message-report
(function).
reset-logger
(function).
with-transient-logger
(macro).
copy-logger
(function).
logger
(structure).
logger-p
(function).
make-logger
(function).
message-log
(function).
message-report
(function).
print-log-entry
(generic function).
aether/debug/trace.lisp
logger.lisp
(file).
debug
(module).
*message-traces*
(special variable).
copy-tracer
(function).
make-tracer
(function).
print-trace-table
(function).
print-traces
(function).
rotate-trace-table
(function).
sort-traces
(function).
tracer
(structure).
tracer-p
(function).
tracer-store
(function).
tracer-traces
(reader).
(setf tracer-traces)
(writer).
with-traces
(macro).
aether/event.lisp
debug
(module).
aether
(system).
canary-all
(function).
canary-any
(function).
canary-process
(function).
canary-timeout
(function).
canary-until
(function).
define-object-handler
(macro).
event
(structure).
finish-with-futures
(function).
finish-with-scheduling
(function).
future
(function).
future*
(function).
make-event
(function).
make-simulation
(function).
schedule
(function).
schedule*
(function).
simulation
(structure).
simulation-add-event
(function).
simulation-run
(function).
with-futures
(macro).
with-scheduling
(macro).
with-simulation
(macro).
%make-simulation
(function).
copy-event
(function).
copy-simulation
(function).
event-callback
(reader).
event-p
(function).
event-time
(reader).
handle-object
(generic function).
simulation-contents
(reader).
(setf simulation-contents)
(writer).
simulation-dequeue
(function).
simulation-horizon
(reader).
(setf simulation-horizon)
(writer).
simulation-p
(function).
simulation-peep
(function).
aether/message.lisp
event.lisp
(file).
aether
(system).
address
(structure).
address=
(function).
hash-address
(function).
make-message
(function).
make-message-rpc-done
(function).
make-message-rts
(function).
message
(structure).
message-reply-channel
(reader).
(setf message-reply-channel)
(writer).
message-rpc-done
(structure).
message-rpc-done-result
(reader).
(setf message-rpc-done-result)
(writer).
message-rts
(structure).
print-object
(method).
address-channel
(reader).
(setf address-channel)
(writer).
address-courier
(reader).
(setf address-courier)
(writer).
address-p
(function).
address-secret
(reader).
(setf address-secret)
(writer).
copy-address
(function).
copy-message
(function).
copy-message-rpc-done
(function).
copy-message-rts
(function).
get-message-index
(function).
make-address
(function).
message-message-id
(reader).
(setf message-message-id)
(writer).
message-p
(function).
message-rpc-done-message-id
(function).
(setf message-rpc-done-message-id)
(function).
message-rpc-done-p
(function).
message-rpc-done-reply-channel
(function).
(setf message-rpc-done-reply-channel)
(function).
message-rts-message-id
(function).
(setf message-rts-message-id)
(function).
message-rts-p
(function).
message-rts-reply-channel
(function).
(setf message-rts-reply-channel)
(function).
public-address
(function).
aether/courier.lisp
message.lisp
(file).
aether
(system).
*local-courier*
(special variable).
courier
(structure).
courier-processing-clock-rate
(reader).
(setf courier-processing-clock-rate)
(writer).
make-courier
(function).
print-object
(method).
receive-message
(macro).
register
(function).
send-message
(function).
send-message-batch
(function).
unregister
(function).
with-courier
(macro).
*courier-processing-clock-rate*
(special variable).
*routing-time-step*
(special variable).
check-key-secret
(function).
copy-courier
(function).
courier-courier->route
(generic function).
courier-default-routing-time-step
(reader).
(setf courier-default-routing-time-step)
(writer).
courier-id
(reader).
(setf courier-id)
(writer).
courier-inboxes
(reader).
(setf courier-inboxes)
(writer).
courier-neighbors
(reader).
(setf courier-neighbors)
(writer).
courier-p
(function).
courier-queue
(reader).
(setf courier-queue)
(writer).
courier-secrets
(reader).
(setf courier-secrets)
(writer).
deliver-message
(function).
get-channel-index
(function).
get-courier-index
(function).
get-secret-index
(function).
handle-object
(method).
stash-local-message
(function).
aether/network.lisp
courier.lisp
(file).
aether
(system).
make-courier-grid
(function).
%make-courier-gridded
(function).
copy-courier-gridded
(function).
copy-grid-neighbors
(function).
courier-courier->route
(method).
courier-gridded
(structure).
courier-gridded-default-routing-time-step
(function).
(setf courier-gridded-default-routing-time-step)
(function).
courier-gridded-id
(function).
(setf courier-gridded-id)
(function).
courier-gridded-inboxes
(function).
(setf courier-gridded-inboxes)
(function).
courier-gridded-neighbors
(function).
(setf courier-gridded-neighbors)
(function).
courier-gridded-p
(function).
courier-gridded-processing-clock-rate
(function).
(setf courier-gridded-processing-clock-rate)
(function).
courier-gridded-queue
(function).
(setf courier-gridded-queue)
(function).
courier-gridded-secrets
(function).
(setf courier-gridded-secrets)
(function).
grid-neighbors
(structure).
grid-neighbors-down
(reader).
(setf grid-neighbors-down)
(writer).
grid-neighbors-left
(reader).
(setf grid-neighbors-left)
(writer).
grid-neighbors-p
(function).
grid-neighbors-right
(reader).
(setf grid-neighbors-right)
(writer).
grid-neighbors-up
(reader).
(setf grid-neighbors-up)
(writer).
make-courier-gridded
(function).
make-grid-neighbors
(function).
aether/process/process.lisp
process
(module).
define-message-dispatch
(macro).
define-message-handler
(macro).
define-process-upkeep
(macro).
print-object
(method).
process
(class).
process-clock-rate
(reader method).
(setf process-clock-rate)
(writer method).
process-command-stack
(reader method).
(setf process-command-stack)
(writer method).
process-continuation
(function).
process-data-stack
(reader method).
(setf process-data-stack)
(writer method).
process-debug?
(reader method).
(setf process-debug?)
(writer method).
process-exhaust-inbox?
(reader method).
(setf process-exhaust-inbox?)
(writer method).
process-peruse-inbox?
(reader method).
(setf process-peruse-inbox?)
(writer method).
process-public-address
(function).
%dpu-flet-definitions
(function).
%dpu-macrolet-definitions
(function).
define-dpu-flet
(macro).
define-dpu-macro
(macro).
handle-message-rts
(method).
handle-object
(method).
message-dispatch
(generic function).
process-courier
(reader method).
(setf process-courier)
(writer method).
process-key
(reader method).
(setf process-key)
(writer method).
process-upkeep
(generic function).
aether/process/dpu-helpers.lisp
process.lisp
(file).
process
(module).
process-die
(function).
sync-receive
(macro).
with-replies
(macro).
%install-repeat-until
(macro).
process-upkeep
(method).
aether/process/dereference.lisp
dpu-helpers.lisp
(file).
process
(module).
dereference
(function).
spawn-process
(function).
with-address-dereferencing
(macro).
*dereferencing-table*
(special variable).
record-reference
(function).
aether/process/emissary.lisp
dereference.lisp
(file).
process
(module).
define-message-subordinate
(macro).
message-dispatch
(method).
process-message-emissary
(class).
aether/rpc.lisp
process
(module).
aether
(system).
define-rpc-handler
(macro).
sync-rpc
(macro).
aether/lock.lisp
rpc.lisp
(file).
aether
(system).
handle-message-lock
(method).
make-message-lock
(function).
make-message-unlock
(function).
message-lock
(structure).
process-lockable
(class).
process-lockable-aborting?
(reader method).
(setf process-lockable-aborting?)
(writer method).
process-lockable-done-signal
(reader method).
(setf process-lockable-done-signal)
(writer method).
process-lockable-locked?
(reader method).
(setf process-lockable-locked?)
(writer method).
process-lockable-targets
(generic function).
copy-message-lock
(function).
copy-message-unlock
(function).
message-lock-message-id
(function).
(setf message-lock-message-id)
(function).
message-lock-p
(function).
message-lock-reply-channel
(function).
(setf message-lock-reply-channel)
(function).
message-unlock
(structure).
message-unlock-message-id
(function).
(setf message-unlock-message-id)
(function).
message-unlock-p
(function).
message-unlock-reply-channel
(function).
(setf message-unlock-reply-channel)
(function).
message-unlock-result
(reader).
(setf message-unlock-result)
(writer).
process-upkeep
(method).
process-upkeep
(method).
process-upkeep
(method).
process-upkeep
(method).
process-upkeep
(method).
aether/cast.lisp
lock.lisp
(file).
aether
(system).
broadcast-frame
(structure).
convergecast-frame
(structure).
define-broadcast-handler
(macro).
define-convergecast-handler
(macro).
make-broadcast-frame
(function).
make-convergecast-frame
(function).
push-broadcast-frame
(function).
push-convergecast-frame
(function).
return-from-cast
(function).
broadcast-frame-aborting?
(reader).
(setf broadcast-frame-aborting?)
(writer).
broadcast-frame-handle-rts?
(reader).
(setf broadcast-frame-handle-rts?)
(writer).
broadcast-frame-message
(reader).
(setf broadcast-frame-message)
(writer).
broadcast-frame-p
(function).
broadcast-frame-targets
(reader).
(setf broadcast-frame-targets)
(writer).
convergecast-frame-aborting?
(function).
(setf convergecast-frame-aborting?)
(function).
convergecast-frame-func
(reader).
(setf convergecast-frame-func)
(writer).
convergecast-frame-handle-rts?
(function).
(setf convergecast-frame-handle-rts?)
(function).
convergecast-frame-input
(reader).
(setf convergecast-frame-input)
(writer).
convergecast-frame-message
(function).
(setf convergecast-frame-message)
(function).
convergecast-frame-p
(function).
convergecast-frame-targets
(function).
(setf convergecast-frame-targets)
(function).
copy-broadcast-frame
(function).
copy-convergecast-frame
(function).
process-upkeep
(method).
process-upkeep
(method).
reduce+
(function).
reduce-max
(function).
Packages are listed by definition order.
aether
common-lisp
.
*local-courier*
(special variable).
*logger*
(special variable).
address
(structure).
address=
(function).
broadcast-frame
(structure).
canary-all
(function).
canary-any
(function).
canary-process
(function).
canary-timeout
(function).
canary-until
(function).
cheap-heap-dequeue
(function).
cheap-heap-enqueue
(function).
cheap-heap-peep
(function).
convergecast-frame
(structure).
courier
(structure).
courier-processing-clock-rate
(reader).
(setf courier-processing-clock-rate)
(writer).
define-broadcast-handler
(macro).
define-convergecast-handler
(macro).
define-message-dispatch
(macro).
define-message-handler
(macro).
define-message-subordinate
(macro).
define-object-handler
(macro).
define-process-upkeep
(macro).
define-rpc-handler
(macro).
dereference
(function).
destructuring-places
(macro).
dohash
(macro).
event
(structure).
finish-with-futures
(function).
finish-with-scheduling
(function).
future
(function).
future*
(function).
handle-message-lock
(generic function).
hash-address
(function).
ignorant-lambda
(macro).
initialize-and-return
(macro).
log-entry
(function).
logger-entries
(reader).
(setf logger-entries)
(writer).
make-broadcast-frame
(function).
make-cheap-heap
(function).
make-convergecast-frame
(function).
make-courier
(function).
make-courier-grid
(function).
make-event
(function).
make-message
(function).
make-message-lock
(function).
make-message-rpc-done
(function).
make-message-rts
(function).
make-message-unlock
(function).
make-q
(function).
make-simulation
(function).
message
(structure).
message-lock
(structure).
message-reply-channel
(reader).
(setf message-reply-channel)
(writer).
message-rpc-done
(structure).
message-rpc-done-result
(reader).
(setf message-rpc-done-result)
(writer).
message-rts
(structure).
peek
(function).
print-log
(function).
print-message-report
(function).
process
(class).
process-clock-rate
(generic reader).
(setf process-clock-rate)
(generic writer).
process-command-stack
(generic reader).
(setf process-command-stack)
(generic writer).
process-continuation
(function).
process-data-stack
(generic reader).
(setf process-data-stack)
(generic writer).
process-debug?
(generic reader).
(setf process-debug?)
(generic writer).
process-die
(function).
process-exhaust-inbox?
(generic reader).
(setf process-exhaust-inbox?)
(generic writer).
process-lockable
(class).
process-lockable-aborting?
(generic reader).
(setf process-lockable-aborting?)
(generic writer).
process-lockable-done-signal
(generic reader).
(setf process-lockable-done-signal)
(generic writer).
process-lockable-locked?
(generic reader).
(setf process-lockable-locked?)
(generic writer).
process-lockable-targets
(generic function).
process-peruse-inbox?
(generic reader).
(setf process-peruse-inbox?)
(generic writer).
process-public-address
(function).
push-broadcast-frame
(function).
push-convergecast-frame
(function).
q-deq
(function).
q-deq-first
(function).
q-deq-when
(function).
q-empty
(function).
q-enq
(function).
q-len
(function).
q-peek
(function).
q-push
(function).
receive-message
(macro).
register
(function).
reset-logger
(function).
return-from-cast
(function).
schedule
(function).
schedule*
(function).
send-message
(function).
send-message-batch
(function).
simulation
(structure).
simulation-add-event
(function).
simulation-run
(function).
spawn-process
(function).
sync-receive
(macro).
sync-rpc
(macro).
unregister
(function).
with-address-dereferencing
(macro).
with-courier
(macro).
with-futures
(macro).
with-replies
(macro).
with-scheduling
(macro).
with-simulation
(macro).
with-transient-logger
(macro).
%dpu-flet-definitions
(function).
%dpu-macrolet-definitions
(function).
%install-repeat-until
(macro).
%make-courier-gridded
(function).
%make-simulation
(function).
*courier-processing-clock-rate*
(special variable).
*dereferencing-table*
(special variable).
*message-traces*
(special variable).
*routing-time-step*
(special variable).
address-channel
(reader).
(setf address-channel)
(writer).
address-courier
(reader).
(setf address-courier)
(writer).
address-p
(function).
address-secret
(reader).
(setf address-secret)
(writer).
assoc-default
(macro).
broadcast-frame-aborting?
(reader).
(setf broadcast-frame-aborting?)
(writer).
broadcast-frame-handle-rts?
(reader).
(setf broadcast-frame-handle-rts?)
(writer).
broadcast-frame-message
(reader).
(setf broadcast-frame-message)
(writer).
broadcast-frame-p
(function).
broadcast-frame-targets
(reader).
(setf broadcast-frame-targets)
(writer).
check-key-secret
(function).
convergecast-frame-aborting?
(function).
(setf convergecast-frame-aborting?)
(function).
convergecast-frame-func
(reader).
(setf convergecast-frame-func)
(writer).
convergecast-frame-handle-rts?
(function).
(setf convergecast-frame-handle-rts?)
(function).
convergecast-frame-input
(reader).
(setf convergecast-frame-input)
(writer).
convergecast-frame-message
(function).
(setf convergecast-frame-message)
(function).
convergecast-frame-p
(function).
convergecast-frame-targets
(function).
(setf convergecast-frame-targets)
(function).
copy-address
(function).
copy-broadcast-frame
(function).
copy-convergecast-frame
(function).
copy-courier
(function).
copy-courier-gridded
(function).
copy-event
(function).
copy-grid-neighbors
(function).
copy-logger
(function).
copy-message
(function).
copy-message-lock
(function).
copy-message-rpc-done
(function).
copy-message-rts
(function).
copy-message-unlock
(function).
copy-simulation
(function).
copy-tracer
(function).
courier-courier->route
(generic function).
courier-default-routing-time-step
(reader).
(setf courier-default-routing-time-step)
(writer).
courier-gridded
(structure).
courier-gridded-default-routing-time-step
(function).
(setf courier-gridded-default-routing-time-step)
(function).
courier-gridded-id
(function).
(setf courier-gridded-id)
(function).
courier-gridded-inboxes
(function).
(setf courier-gridded-inboxes)
(function).
courier-gridded-neighbors
(function).
(setf courier-gridded-neighbors)
(function).
courier-gridded-p
(function).
courier-gridded-processing-clock-rate
(function).
(setf courier-gridded-processing-clock-rate)
(function).
courier-gridded-queue
(function).
(setf courier-gridded-queue)
(function).
courier-gridded-secrets
(function).
(setf courier-gridded-secrets)
(function).
courier-id
(reader).
(setf courier-id)
(writer).
courier-inboxes
(reader).
(setf courier-inboxes)
(writer).
courier-neighbors
(reader).
(setf courier-neighbors)
(writer).
courier-p
(function).
courier-queue
(reader).
(setf courier-queue)
(writer).
courier-secrets
(reader).
(setf courier-secrets)
(writer).
define-dpu-flet
(macro).
define-dpu-macro
(macro).
define-global-counter
(macro).
deliver-message
(function).
event-callback
(reader).
event-p
(function).
event-time
(reader).
get-channel-index
(function).
get-courier-index
(function).
get-message-index
(function).
get-secret-index
(function).
grid-neighbors
(structure).
grid-neighbors-down
(reader).
(setf grid-neighbors-down)
(writer).
grid-neighbors-left
(reader).
(setf grid-neighbors-left)
(writer).
grid-neighbors-p
(function).
grid-neighbors-right
(reader).
(setf grid-neighbors-right)
(writer).
grid-neighbors-up
(reader).
(setf grid-neighbors-up)
(writer).
handle-message-rts
(generic function).
handle-object
(generic function).
hash-let
(macro).
logger
(structure).
logger-p
(function).
macro-lambda-list-places
(function).
make-address
(function).
make-courier-gridded
(function).
make-grid-neighbors
(function).
make-logger
(function).
make-tracer
(function).
message-dispatch
(generic function).
message-lock-message-id
(function).
(setf message-lock-message-id)
(function).
message-lock-p
(function).
message-lock-reply-channel
(function).
(setf message-lock-reply-channel)
(function).
message-log
(function).
message-message-id
(reader).
(setf message-message-id)
(writer).
message-p
(function).
message-report
(function).
message-rpc-done-message-id
(function).
(setf message-rpc-done-message-id)
(function).
message-rpc-done-p
(function).
message-rpc-done-reply-channel
(function).
(setf message-rpc-done-reply-channel)
(function).
message-rts-message-id
(function).
(setf message-rts-message-id)
(function).
message-rts-p
(function).
message-rts-reply-channel
(function).
(setf message-rts-reply-channel)
(function).
message-unlock
(structure).
message-unlock-message-id
(function).
(setf message-unlock-message-id)
(function).
message-unlock-p
(function).
message-unlock-reply-channel
(function).
(setf message-unlock-reply-channel)
(function).
message-unlock-result
(reader).
(setf message-unlock-result)
(writer).
print-log-entry
(generic function).
print-trace-table
(function).
print-traces
(function).
process-courier
(generic reader).
(setf process-courier)
(generic writer).
process-key
(generic reader).
(setf process-key)
(generic writer).
process-message-emissary
(class).
process-upkeep
(generic function).
public-address
(function).
record-reference
(function).
reduce+
(function).
reduce-max
(function).
rotate-trace-table
(function).
simulation-contents
(reader).
(setf simulation-contents)
(writer).
simulation-dequeue
(function).
simulation-horizon
(reader).
(setf simulation-horizon)
(writer).
simulation-p
(function).
simulation-peep
(function).
sort-traces
(function).
stash-local-message
(function).
tracer
(structure).
tracer-p
(function).
tracer-store
(function).
tracer-traces
(reader).
(setf tracer-traces)
(writer).
with-traces
(macro).
Definitions are sorted by export status, category, package, and then by lexicographic order.
Bound to the ‘COURIER’ that services this process.
This macro augments ‘DEFINE-MESSAGE-HANDLER’, by pushing a ‘BROADCAST’ command onto the ‘PROCESS’s command stack. This command takes no arguments, but expects a ‘BROADCAST-FRAME’ to be on the data stack when it is called. Thus, either the handler must prepare the data frame, or it must be prepared by whatever script is pushed onto the command stack by the handler. Additionally, inside the context of ‘DEFINE-BROADCAST-HANDLER’ we have access to a pair of helper functions:
1. ‘PUSH-BROADCAST-FRAME’, which creates a ‘BROADCAST-FRAME’ and pushes it onto the data stack. If no ‘MESSAGE’ is provided to the function, it defaults to the ‘MESSAGE’ currently being handled. If a user calls ‘PUSH-BROADCAST-FRAME’ twice in the same handler, an error will be raised.
2. ‘RETURN-FROM-CAST’, which allows the user to terminate the broadcast operation early by sending up an acknowledgement (optionally specifying its contents) to the original sender of ‘MESSAGE’.
WARNING: ‘RETURN-FROM-CAST’ calls ‘PUSH-BROADCAST-FRAME’ as part of the aborting process. If a frame has already been pushed onto the data stack, we instead alter that frame rather than pushing an additional one (which could have strange consequences). Additionally, it is important to note that ‘RETURN-FROM-CAST’ uses ‘FINISH-WITH-SCHEDULING’ in order to return from the handler early.
This macro augments ‘DEFINE-MESSAGE-HANDLER’, by pushing a ‘CONVERGECAST’ command onto the ‘PROCESS’s command stack. This command takes no arguments, but expects a ‘CONVERGECAST-FRAME’ to be on the data stack when it is called. Thus, either the handler must prepare the data frame, or it must be prepared by whatever script is pushed onto the command stack by the handler. Additionally, inside the context of ‘DEFINE-CONVERGECAST-HANDLER’ we have access to a pair of helper functions:
1. ‘PUSH-CONVERGECAST-FRAME’, which creates a ‘CONVERGECAST-FRAME’ and pushes it onto the data stack. If no ‘MESSAGE’ is provided to the function, it defaults to the ‘MESSAGE’ currently being handled. If a user calls ‘PUSH-BROADCAST-FRAME’ twice in the same handler, an error will be raised.
2. ‘RETURN-FROM-CAST’, which allows the user to terminate the convergecast operation early by sending up an acknowledgement (optionally specifying its contents) to the original sender of ‘MESSAGE’. It is recommended that a value is provided when returning from a convergecast, as it will be passed to a function (the function provided to the ‘CONVERGECAST-FRAME’) when received by the original sender.
WARNING: ‘RETURN-FROM-CAST’ calls ‘PUSH-CONVERGECAST-FRAME’ as part of the aborting process. If a frame has already been pushed onto the data stack, we instead alter that frame rather than pushing an additional one (which could have strange consequences). Additionally, it is important to note that ‘RETURN-FROM-CAST’ uses ‘FINISH-WITH-SCHEDULING’ in order to return from the handler early.
Defines "automatic" message handlers associated to a particular subtype of ‘PROCESS’. Each handler is specified by a tuple of form (MESSAGE-TYPE MESSAGE-HANDLER &OPTIONAL GUARD). As with ‘RECEIVE-MESSAGE’, each clause is processed in turn, according to the following rules:
+ If supplied, ‘GUARD’ is evaluated with the ‘PROCESS’ in question bound to the place ‘PROCESS-TYPE’. If ‘GUARD’ evaluates to NIL, proceed to the next clause.
+ Check the message queue at the public address for an item of type ‘MESSAGE-TYPE’. If such a message is found, call the associated ‘MESSAGE-HANDLER’ with lambda triple (PROCESS MESSAGE TIME). Otherwise, proceed to the next clause.
NOTES:
+ If no clause is matched, execution proceeds to the semantics specified by ‘DEFINE-PROCESS-UPKEEP’.
+ Automatically appends a ‘MESSAGE-RTS’ clause which calls ‘HANDLE-MESSAGE-RTS’ and results in an error. Because of this, we set ‘CATCH-RTS?’ to NIL when processing clauses and building ‘RECEIVE-MESSAGE’ blocks. Otherwise, it would be impossible to override the default handling of ‘MESSAGE-RTS’es.
+ ‘PROCESS-PERUSE-INBOX?’ is passed along to ‘RECEIVE-MESSAGE’, where it determines how we search for a message to handle.
WARNING: These actions are to be thought of as "interrupts". Accordingly, you will probably stall the underlying ‘PROCESS’ if you perform some waiting action here, like the analogue of a ‘SYNC-RECEIVE’.
Defines a function to be invoked by DEFINE-MESSAGE-DISPATCH.
Interrupt-based RPC handlers are expected to emit a reply to the caller. This macro augments DEFINE-MESSAGE-HANDLER to reply to the caller with the last evaluated form.
Defines a default event handler for OBJECT-TYPE.
Defines the behavior of a particular PROCESS (of type PROCESS-TYPE) as it enacts a COMMAND.
PROCESS is COMMAND is a KEYWORD, and COMMAND-ARGS is a DESTRUCTURING-BIND-LAMBDA-LIST.
Locally enables the use of the function PROCESS-DIE and the special form SYNC-RECEIVE.
Interrupt-based RPC handlers are expected to emit a reply to the caller. This macro augments DEFINE-MESSAGE-HANDLER to reply to the caller with the last evaluated form.
A variant of DESTRUCTURING-BIND that provides SETFs in the style of WITH-SLOTS, but it can only handle the required part of a DESTRUCTURING-LAMBDA-LIST.
Iterates over HASH-TABLE, defining a lexical binding KEY and a place VALUE for each iteration of BODY. Optionally evaluates RETURN-FORM at termination and returns its result; otherwise returns NIL.
WARNING: This routine is based on MAPHASH, which has undefined behavior if the structure of HASH-TABLE is modified during iteration (e.g., the addition of new entries, or the modification of any entry not currently being processed).
Defines an anonymous function that discards all of its arguments.
Returns (in reverse order, as VALUES) the contents of BINDINGS after the evaluation of BODY.
Peruses the mailbox at ‘ADDRESS’ for a ‘MESSAGE’ which matches one of the provided ‘CLAUSES’. Each clause has the form (MESSAGE-TYPE &BODY BODY). Clauses are processed according to the following Erlang-ian rules:
+ Each clause is processed in the order supplied.
+ If a clause is matched, no further clauses are processed.
+ When ‘PERUSE-INBOX?’ is T, each clause (processed in order) searches the whole inbox(in latest-to-most-recent order) for a ‘MESSAGE-TYPE’ match. When NIL, each clause just looks at the first message in the inbox for a ‘MESSAGE-TYPE’ match.
+ If a waiting message of the appropriate type is found, it is bound to ‘MESSAGE’ and ‘BODY’ is processed.
NOTES:
When ‘CATCH-RTS?’ is T, we append a ‘MESSAGE-RTS’ clause that throws an error.
Permits a clause with head ‘OTHERWISE’ which is executed when no such waiting message is found.
Returns as a secondary value whether a message was processed. (An ‘OTHERWISE’ clause also results in a secondary value of NIL.)
Models a blocking ‘RECEIVE-MESSAGE’ command.
IMPORTANT WARNING: ‘SYNC-RECEIVE’ returns after it finishes executing its body. Any code following a ‘SYNC-RECEIVE’ **will not** be executed.
NOTE: ‘MESSAGE-RTS’ replies must be explicitly handled. Otherwise, the default behavior is to throw an error, which can be seen in the definition of ‘RECEIVE-MESSAGE’.
NOTE: SYNC-RECEIVE is not available outside the body of DEFINE-PROCESS-UPKEEP.
Performs a synchronized RPC call. Only allowed inside the body of DEFINE-PROCESS-UPKEEP.
Sends ‘MESSAGE’ to ‘DESTINATION’, waits for a reply (of type ‘MESSAGE-TYPE’), and unpacks the reply (using ‘MESSAGE-UNPACKER’) into ‘RESULT-PLACE-OR-LIST’.
If ‘RETURNED?’ is supplied and this call generates a ‘MESSAGE-RTS’ reply, then ‘RETURNED?’ will be flagged and control resumes. Otherwise, controlled is interrupted by an error.
Context macro which permits use of DEREFERENCE in its body.
Initializes the ‘*LOCAL-COURIER*’ parameter as a fresh ‘COURIER’. Also takes a list of ‘KEYWORD-ARGUMENT’s (e.g. :processing-clock-rate 20) that are passed along to the constructor.
WARNING: This macro is deprecated in favor of ‘WITH-SCHEDULING‘ and will be removed in a future release.
Stores an implicit set of EVENT objects to return when exiting the WITH-FUTURES block.
Provides some helper functions: FUTURE, FUTURE*, and FINISH-WITH-FUTURES.
Amasses results from ‘MESSAGE-RPC-DONE’ messages received on ‘ADDRESSES’ into a list stored in ‘REPLIES’. This list is sorted in the same order as ‘ADDRESSES’. Execution of ‘BODY’ resumes when each address has received such a message.
If ‘RETURNED?’ is supplied, then in the event of a ‘MESSAGE-RTS’, this flag is set. If it is not supplied, this raises an error.
Typical use looks like:
(with-replies
(replies :returned? returned?)
(send-message-batch #’make-blossom-msg-scan targets)
(let ((reply (reduce #’unify-pongs replies)))
(send-message reply-channel reply)))
NOTE: WITH-REPLIES is not available outside the body of DEFINE-PROCESS-UPKEEP.
Stores an implicit set of EVENT objects to return when exiting the WITH-SCHEDULING block.
Provides some helper functions: SCHEDULE, SCHEDULE*, and FINISH-WITH-SCHEDULING.
Initializes a new SIMULATION bound to name NAME using MAKE-SIMULATION and adds an EVENT to the SIMULATION at time 0 for every object in STARTING-OBJECTs.
Initialize a fresh logger. Returns log contents on close.
Tests for semantic equality of addresses.
Announce a trigger when all of the CANARIES are simultaneously triggered.
Announce a trigger when any one of the CANARIES is triggered.
Pause a simulation when PROCESS halts.
Throw an error when TIMEOUT arrives.
Pause a simulation after UNTIL passes.
Looks up the Lisp PROCESS object which owns the provided public ADDRESS. Only functions within WITH-ADDRESS-DEREFERENCING, not hardware-realistic, only for use during debugging.
WARNING: This function is deprecated in favor of ‘FINISH-WITH-SCHEDULING‘ and will be removed in a future release.
Breaks out of WITH-FUTURES. If EVENTS is supplied, returns EVENTS in place of the implicit event list.
Breaks out of WITH-SCHEDULING. If EVENTS is supplied, returns EVENTS in place of the implicit event list.
WARNING: This function is deprecated in favor of ‘SCHEDULE‘ and will be removed in a future release.
Installs a future EVENT object, which invokes FN-OR-OBJ at the specified TIME.
WARNING: This function is deprecated in favor of ‘SCHEDULE*‘ and will be removed in a future release.
Installs a list of future EVENT objects.
Injects a log entry.
Constructs a (size-i x size-j) grid of COURIER-GRIDDED instances.
Constructs an empty SIMULATION.
Synonym for the PEEK operation on a stack.
Print a report of the different types of messages sent in ‘LOGGER’, and a count for each. Calls ‘MESSAGE-LOG’ and ‘MESSAGE-REPORT’.
Installs ‘COMMANDS’ to be executed as next steps by ‘PROCESS’.
PROCESS-DIE causes the current PROCESS to release its public mailbox and exit the parent SIMULATION loop.
NOTE: PROCESS-DIE is not available outside the body of DEFINE-PROCESS-UPKEEP.
Extracts the public ADDRESS associated to PROCESS.
Convenience function for creating a ‘BROADCAST-FRAME’ and pushing it onto the ‘PROCESS-DATA-STACK’.
Convenience function for creating a ‘CONVERGECAST-FRAME’ and pushing it onto the ‘PROCESS-DATA-STACK’.
Dequeue the first message in ‘Q’ that satisfies ‘PRED’.
Dequeue the message at the front of ‘Q’ when ‘PRED’ is T.
Registers a fresh channel over which messages can be transmitted and received.
Empties the current logger of all entries.
Allows the user to return early from a broadcast or convergecast operation.
Installs a future EVENT object, which invokes FN-OR-OBJ at the specified TIME.
Installs a list of future EVENT objects.
Sends the message ‘PAYLOAD’ to be received at ‘DESTINATION’, an ‘ADDRESS’. Returns the ‘REPLY-CHANNEL’ of the ‘PAYLOAD’, if any.
Sends a batch of messages to the ‘ADDRESS’es housed in ‘DESTINATIONS’. Each message is constructed afresh using ‘PAYLOAD-CONSTRUCTOR’, supplied with a freshly registered reply channel, and the list of reply channels is returned as a result.
Installs EVENT into SIMULATION for later processing.
Processes EVENTs belonging to SIMULATION, until either SIMULATION is exhausted or CANARY evaluates to T.
Preferred mechanism for instantiating an object inherting from PROCESS. Contains debug hooks.
Unregisters a channel, so that messages can no longer be transmitted or received over it.
process-lockable
) (message message-lock
) now) ¶Attempts to lock PROCESS.
process
)) ¶process
)) ¶Defaults to T, which means that the ‘PROCESS’ will go through its entire message queue in a single clock tick, and then (in the same tick) take an action specified by the command stack. Otherwise, the ‘PROCESS’ will immediately execute a command after handling either zero or one message(s).
process-lockable
)) ¶automatically generated reader method
process-lockable
)) ¶automatically generated writer method
process-lockable
)) ¶automatically generated reader method
process-lockable
)) ¶automatically generated writer method
process-lockable
)) ¶automatically generated reader method
process-lockable
)) ¶automatically generated writer method
Calculates the list of ADDRESSes to acquire recursive locks from when PROCESS-LOCKABLE receives a lock request.
process
)) ¶process
)) ¶Defaults to T, which means that the ‘PROCESS’ will search through the whole inbox when trying to find a match for clause. Otherwise, the ‘PROCESS’ will only look at the first message in the inbox. Essentially toggles between clause-order precedence and inbox-order predence.
Signifies a channel over which objects can communicate.
NOTE: The SECRET field is "optional", in that only processes that possess the secret can receive on and unregister the channel, but all processes—including those without the secret—can send on the channel.
Data frame for a ‘BROADCAST’ operation. The ‘ABORTING?’ flag is used to signal to a ‘BROADCAST’ or ‘CONVERGECAST’ command to terminate immediately. If the operation doesn’t abort, the ‘MESSAGE’ is broadcasted to ‘TARGETS’. If we are awaiting replies from the broadcast, we can set ‘HANDLE-RTS?’ to T if we want to pass a ‘:RETURNED?’ keyword argument to ‘WITH-REPLIES’ (and thus handle RTSes gracefully).
Data frame for a ‘CONVERGECAST’ operation. The ‘INPUT’ is the value calculated at the current level of recursion, to be passed to ‘FUNC’ along with the ‘REPLIES’ from the subsequent level of recursion. The value V passed up is determined as V = (FUNCALL FUNC INPUT REPLIES), and thus the definition of ‘FUNC’ should be something like:
DEFUN FUNC INPUT REPLIES
Where ‘REPLIES’ is assumed to be a ‘LIST’. Additionally, when ‘HANDLE-RTS?’ is true, ‘FUNC’ should be constructed to handle NIL values in ‘INPUT’ or ‘REPLIES’ gracefully. Inherits from ‘BROADCAST-FRAME’.
A component in the message-passing apparatus.
‘QUEUE’: The receive queue of messages which have not yet been forwarded or stored. Each entry is of the form (COURIER-ID CHANNEL &REST PAYLOAD).
‘INBOXES’: A hash table mapping channels serviced by this courier to mailbox queues.
‘SECRETS’: A hash table mapping channels serviced by this courier to the private sigils used to distinguish mailbox owners.
‘ID’: A unique identifier for this courier. WARNING: Expect subclasses of ‘COURIER’ to require specific types and values here.
‘NEIGHBORS’: Used to store routing information. WARNING: By default, this is a hash mapping courier ‘ID’s in the network to their object instances. Expect subclasses of ‘COURIER’ to install different types and values here.
structure-object
.
(aether:make-q)
(make-hash-table :test (quote eq))
(make-hash-table :test (quote eq))
aether::*courier-processing-clock-rate*
aether::*routing-time-step*
(aether::get-courier-index)
(make-hash-table)
Wrapper for a particular event.
Base type for messages transmitted along ‘COURIER’s.
Sent to establish a lock.
Reply when an RPC message finishes.
This message is generated as a fresh automatic response when an original message is sent to a nonexistent (or closing) mailbox.
If the original message’s REPLY-CHANNEL is not set, no MESSAGE-RTS object is built.
NOTE: "RTS" is short for "Return To Sender".
Container for a set of EVENTs to be processed as part of a simulation.
CONTENTS: The set of EVENTs. This field is not for direct access; instead, add events using SIMULATION-ADD-EVENT.
HORIZON: The timestamp before which all events have been simulated. Ensures that a SIMULATION has a fixed history.
Models an individual concurrently-executing process. On each tick, a ‘PROCESS’ first checks its public mailbox for messages matched by ‘DEFINE-MESSAGE-DISPATCH’ and, if an appropriate message is found, that message is processed. If no matching message is found, the first command in ‘PROCESS-COMMAND-STACK’ is processed instead, according to the semantics defined by ‘DEFINE-PROCESS-UPKEEP’.
IMPORTANT NOTE: Use #’SPAWN-PROCESS to generate a new PROCESS object.
handle-message-rts
.
handle-object
.
print-object
.
(setf process-clock-rate)
.
process-clock-rate
.
(setf process-command-stack)
.
process-command-stack
.
(setf process-courier)
.
process-courier
.
(setf process-data-stack)
.
process-data-stack
.
(setf process-debug?)
.
process-debug?
.
(setf process-exhaust-inbox?)
.
process-exhaust-inbox?
.
(setf process-key)
.
process-key
.
(setf process-peruse-inbox?)
.
process-peruse-inbox?
.
process-upkeep
.
process-upkeep
.
Holds a reference to the ‘COURIER’ which services this ‘PROCESS’.
aether:*local-courier*
:process-courier
Holds the ‘PROCESS’s ‘ADDRESS’ on which it receives messages. (Use ‘PROCESS-PUBLIC-ADDRESS’ to extract an ‘ADDRESS’ to be used to send messages to this ‘PROCESS’.)
(aether:register)
:process-key
The number of times per unit of ‘SIMULATION’ time that this ‘PROCESS’ gets to act.
:process-clock-rate
A stack populated with the instructions yet to be executed by this PROCESS. Modify this using ‘PROCESS-CONTINUATION’.
(sb-int:quasiquote ((aether:start)))
A stack populated with data, typically "data frames" pushed and popped by sequences of related commands.
A boolean flag. If T, debug messages are logged.
:debug?
Defaults to T, which means that the ‘PROCESS’ will go through its entire message queue in a single clock tick, and then (in the same tick) take an action specified by the command stack. Otherwise, the ‘PROCESS’ will immediately execute a command after handling either zero or one message(s).
boolean
t
:process-exhaust-inbox?
Defaults to T, which means that the ‘PROCESS’ will search through the whole inbox when trying to find a match for clause. Otherwise, the ‘PROCESS’ will only look at the first message in the inbox. Essentially toggles between clause-order precedence and inbox-order predence.
boolean
t
:process-peruse-inbox?
A PROCESS which supports recursive locking.
boolean
boolean
list
list
(or null aether:address)
(or null aether:address)
Holds a hash map from ADDRESS objects to the Lisp objects that own them.
Houses information related to traces.
Irreversibly transfers control from the current command by replacing it with a ‘:REPEAT-UNTIL’ command with the indicated ‘REPEATER’ and ‘FINALIZER’.
NOTE: %INSTALL-REPEAT-UNTIL is not available outside the body of DEFINE-PROCESS-UPKEEP.
Defines a local function to be used inside of DEFINE-PROCESS-UPKEEP.
NOTE: Automatically binds ACTIVE?, NOW, and PROCESS-NAME to their values from within D-P-U.
Defines a local macro to be used inside of DEFINE-PROCESS-UPKEEP.
NOTE: Automatically binds PROCESS-NAME and NOW to their values from within D-P-U.
Like GETHASH, except modifies the table.
Enable tracing over a region of code.
This function produces a list of local function (re)definitions to be supplied in the body of DEFINE-PROCESS-UPKEEP.
NOTE: LOG-ENTRY is treated separately.
This function produces a list of local macro definitions to be supplied in the body of DEFINE-PROCESS-UPKEEP.
Asserts that the SECRET stored in ADDRESS matches that recorded by the attendant COURIER.
id
.
Used to simulate the transmission of a message to the next COURIER.
down
.
left
.
up
.
Collect the places that a macro lambda-list might bind.
Given a ‘LOGGER’, filter it so that it only contains ‘SEND-MESSAGE’ entries. Re-sends are not included.
Given a ‘MESSAGE-LOG’, which is a LIST of log entries filtered such that they only contain message-related logs, build an ALIST of the different types of sent messages it contains, and a count for each.
Prints TABLE, an ALIST associating code distances to TRACER objects, to STREAM.
Dump the contents of *MESSAGE-TRACES* to STREAM.
Extracts the public (i.e., secret-free) address from a potentially private (i.e., secret-ful) address.
If appropriate, creates a debug record that PROCESS owns its public address.
Sum the ‘INPUT’ and all the ‘REPLIES’.
Find the ‘MAX’ of the ‘INPUT’ and all the ‘REPLIES’.
Takes TABLE, an ALIST associating code distances to TRACER objects, and produces a TRACER-type nested ALIST whose innermost nesting is an ALIST associating code distances to triples (AVERAGE MAX COUNT).
Removes the next EVENT from SIMULATION and returns it.
Reveals the next EVENT that SIMULATION will return upon DEQUEUE.
Sort the contents of a TRACER object. Useful for printing.
Attempts to store ‘MESSAGE’ into a mailbox at ‘*LOCAL-COURIER*’. Returns NIL if ‘MESSAGE’ is not bound for ‘*LOCAL-COURIER*’, T otherwise.
Add an entry to the set of traces.
Calculates the next step from ‘PROCESSING-COURIER’ to ‘DESTINATION-ADDRESS’. Returns as an optional second value the time delay between transmission at ‘PROCESSING-COURIER’ to receipt by the next hop.
courier-gridded
) destination-courier-id) ¶process
) (message message-rts
) now) ¶Default handler for when a ‘PROCESS’ receives a ‘MESSAGE-RTS’. Throws an error.
Describes the generic behavior of OBJECTs of a particular type, as occuring at a particular TIME.
Use DEFINE-MESSAGE-DISPATCH to install methods here.
process-message-emissary
) now2) ¶Pretty-prints a log entry to STREAM.
If a PROCESS has no pending requests to service, it may want to perform some computation of its own, which happens in this routine. Such computations typically include sending messages and listening on private channels for responses.
process
) now (command-place0 (eql aether::convergecast)
) argument-list1) ¶Pops a frame off of the ‘PROCESS’s data stack, and after checking that it is in fact a ‘CONVERGECAST-FRAME’, unpacks ‘ABORTING?’, ‘FUNC’, ‘INPUT’, ‘MESSAGE’, and ‘TARGETS’ from the frame. Unless ‘ABORTING?’ is T, forwards along a copy of ‘MESSAGE’ to all ‘TARGETS’ and awaits replies. While awaiting replies, we handle RTSes gracefully if ‘HANDLE-RTS?’ is T. Then, calculates a value to return by feeding the ‘INPUT’ and all ‘REPLIES’ to ‘FUNC’ as (FUNCALL FUNC INPUT REPLIES). Finally, sends the computed result back to ‘REPLY-CHANNEL’ if it is not null.
process
) now (command-place0 (eql aether::broadcast)
) argument-list1) ¶Pops a frame off of the ‘PROCESS’s data stack, and after checking that it is in fact a ‘BROADCAST-FRAME’, unpacks ‘ABORTING?’, ‘HANDLE-RTS?’, ‘MESSAGE’ and ‘TARGETS’ from the frame. Unless ‘ABORTING?’ is T, forwards along a copy of ‘MESSAGE’ to all ‘TARGETS’ and optionally awaits a reply and sends back an acknowledgement back to the ‘MESSAGE’s ‘REPLY-CHANNEL’ if the reply channel is not null. While awaiting replies, we handle RTSes gracefully if ‘HANDLE-RTS?’ is T.
process-lockable
) now (command-place0 (eql aether::%finish-unlock)
) argument-list1) ¶Cleans up after START-LOCK.
process-lockable
) now (command-place0 (eql aether:broadcast-unlock)
) argument-list1) ¶Cleans up after BROADCAST-LOCK.
process-lockable
) now (command-place0 (eql aether::%wait-for-unlock)
) argument-list1) ¶Waits for a release signal to arrive via ‘UPWARD-RX-LATCH’.
process-lockable
) now (command-place0 (eql aether:broadcast-lock)
) argument-list1) ¶Establishes locks on ‘TARGETS’.
process-lockable
) now (command-place0 (eql aether:start-lock)
) argument-list1) ¶Locks ‘PROCESS’. ‘REPLY-CHANNEL’ indicates the address (if any) on which to signal whether the lock was / was not established.
(eql aether::repeat-until)
) argument-list1) ¶Repeatedly calls CALLBACK: (TIME) –> (VALUES EVENTS DONE?) until DONE? is non-NIL. Then, calls FINALIZE: (TIME) –> (EVENTS) once.
A ‘COURIER’ instance networked to other couriers in a grid.
NOTE: Expects ‘ID’ to be a list and ‘NEIGHBORS’ to be a ‘GRID-NEIGHBORS’.
A structure for storing the neighbors of a courier participating in a grid.
structure-object
.
list
Sent to release a lock.
Collects trace information.
TRACES: ORIGIN-TYPE –ALIST-> MESSAGE-TYPE –ALIST-> D-COUNT –ALIST-> DELTAs.
structure-object
.
Dummy PROCESS used to host nonblocking message handlers.
Jump to: | %
(
A B C D E F G H I L M P Q R S T U W |
---|
Jump to: | %
(
A B C D E F G H I L M P Q R S T U W |
---|
Jump to: | *
A C D E F H I L M N P Q R S T U |
---|
Jump to: | *
A C D E F H I L M N P Q R S T U |
---|
Jump to: | A B C D E F G L M N P Q R S T U |
---|
Jump to: | A B C D E F G L M N P Q R S T U |
---|