This is the live-cells Reference Manual, version 0.1.0, generated automatically by Declt version 4.0 beta 2 "William Riker" on Fri May 15 12:39:58 2026 GMT+0.
live-cells/live-cells.asdlive-cells/src/package.lisplive-cells/src/codegen.lisplive-cells/src/observer.lisplive-cells/src/base-cell.lisplive-cells/src/tracker.lisplive-cells/src/observer-cell.lisplive-cells/src/changes-only-state.lisplive-cells/src/stop-compute.lisplive-cells/src/computed-cell.lisplive-cells/src/mutable-cell.lisplive-cells/src/watch-function.lisplive-cells/src/macros.lispThe main system appears first, followed by any subsystem dependency.
live-cellsReactive programming for lisp
Alexander Gutev
MIT
0.1.0
alexandria (system).
anaphora (system).
arrows (system).
generic-cl (system).
src (module).
Modules are listed depth-first from the system components tree.
live-cells/srclive-cells (system).
package.lisp (file).
codegen.lisp (file).
observer.lisp (file).
base-cell.lisp (file).
tracker.lisp (file).
observer-cell.lisp (file).
changes-only-state.lisp (file).
stop-compute.lisp (file).
computed-cell.lisp (file).
mutable-cell.lisp (file).
watch-function.lisp (file).
macros.lisp (file).
Files are sorted by type and then listed depth-first from the systems components trees.
live-cells/live-cells.asdlive-cells/src/package.lisplive-cells/src/codegen.lisplive-cells/src/observer.lisplive-cells/src/base-cell.lisplive-cells/src/tracker.lisplive-cells/src/observer-cell.lisplive-cells/src/changes-only-state.lisplive-cells/src/stop-compute.lisplive-cells/src/computed-cell.lisplive-cells/src/mutable-cell.lisplive-cells/src/watch-function.lisplive-cells/src/macros.lisplive-cells/src/codegen.lisppackage.lisp (file).
src (module).
copy-function-spec (function).
copy-variable-spec (function).
function-spec (structure).
function-spec-body (reader).
(setf function-spec-body) (writer).
function-spec-declare (reader).
(setf function-spec-declare) (writer).
function-spec-lambda-list (reader).
(setf function-spec-lambda-list) (writer).
function-spec-name (reader).
(setf function-spec-name) (writer).
function-spec-p (function).
function-spec-type (reader).
(setf function-spec-type) (writer).
generate-function-definition (generic function).
generate-variable-definition (generic function).
make-function-spec (function).
make-variable-spec (function).
variable-spec (structure).
variable-spec-initform (reader).
(setf variable-spec-initform) (writer).
variable-spec-name (reader).
(setf variable-spec-name) (writer).
variable-spec-p (function).
variable-spec-type (reader).
(setf variable-spec-type) (writer).
live-cells/src/observer.lispcodegen.lisp (file).
src (module).
argument (structure).
argument-add-observer (reader).
(setf argument-add-observer) (writer).
argument-key (reader).
(setf argument-key) (writer).
argument-p (function).
argument-remove-observer (reader).
(setf argument-remove-observer) (writer).
call-add-observer (function).
call-remove-observer (function).
call-update (function).
call-will-update (function).
copy-argument (function).
copy-observer (function).
make-argument (function).
make-observer (function).
observer (structure).
observer-key (reader).
(setf observer-key) (writer).
observer-p (function).
observer-update (reader).
(setf observer-update) (writer).
observer-will-update (reader).
(setf observer-will-update) (writer).
live-cells/src/base-cell.lispobserver.lisp (file).
src (module).
*bind-init-form-p* (special variable).
*global-cell-definition* (special variable).
+cell-def-package+ (constant).
add-observer (reader method).
(setf add-observer) (writer method).
cell-spec (class).
cell-symbol (function).
generate-add-observer (generic function).
generate-argument-record (generic function).
generate-cell-definition (generic function).
generate-cell-functions (generic function).
generate-cell-variables (generic function).
generate-extra (generic function).
generate-init (generic function).
generate-notify-update (generic function).
generate-notify-will-update (generic function).
generate-pause (generic function).
generate-remove-observer (generic function).
generate-setf-expansion (generic function).
generate-use-cell (generic function).
init-form (reader method).
(setf init-form) (writer method).
make-setf-expansion (function).
name (reader method).
(setf name) (writer method).
notify-update (reader method).
(setf notify-update) (writer method).
notify-will-update (reader method).
(setf notify-will-update) (writer method).
observers (reader method).
(setf observers) (writer method).
remove-observer (reader method).
(setf remove-observer) (writer method).
use-cell% (macro).
(setf use-cell%) (setf expander).
value (reader method).
(setf value) (writer method).
live-cells/src/tracker.lispbase-cell.lisp (file).
src (module).
*track-cell-callback* (special variable).
track-argument (function).
with-tracker (macro).
without-tracker (macro).
live-cells/src/observer-cell.lisptracker.lisp (file).
src (module).
changed-dependencies (reader method).
(setf changed-dependencies) (writer method).
did-change? (reader method).
(setf did-change?) (writer method).
generate-cell-functions (method).
generate-cell-variables (method).
generate-did-change? (generic function).
generate-on-update (generic function).
generate-on-will-update (generic function).
generate-post-update (generic function).
generate-pre-update (generic function).
generate-update (generic function).
generate-will-update (generic function).
has-value? (reader method).
(setf has-value?) (writer method).
observer-cell-spec (class).
stale? (reader method).
(setf stale?) (writer method).
update (reader method).
(setf update) (writer method).
updating? (reader method).
(setf updating?) (writer method).
will-update (reader method).
(setf will-update) (writer method).
live-cells/src/changes-only-state.lispobserver-cell.lisp (file).
src (module).
changes-only-cell-spec (class).
generate-cell-variables (method).
generate-did-change? (method).
generate-post-update (method).
generate-pre-update (method).
has-old-value? (reader method).
(setf has-old-value?) (writer method).
old-value (reader method).
(setf old-value) (writer method).
live-cells/src/stop-compute.lispchanges-only-state.lisp (file).
src (module).
none (symbol macro).
none (function).
stop-computation (condition).
default-value (reader method).
live-cells/src/computed-cell.lispstop-compute.lisp (file).
src (module).
arguments (reader method).
(setf arguments) (writer method).
compute (reader method).
(setf compute) (writer method).
compute-cell-spec (class).
compute-changes-only-cell-spec (class).
generate-cell-functions (method).
generate-cell-variables (method).
generate-compute (generic function).
generate-init (method).
generate-observer-record (generic function).
generate-pause (method).
generate-use-cell (method).
live-cells/src/mutable-cell.lispcomputed-cell.lisp (file).
src (module).
batch (macro).
*batch-in-effect-p* (special variable).
*batch-list* (special variable).
add-to-batch (function).
end-batch (function).
generate-setf-expansion (method).
mutable-cell-spec (class).
live-cells/src/watch-function.lispmutable-cell.lisp (file).
src (module).
body-forms (reader method).
(setf body-forms) (writer method).
generate-watch-function (generic function).
name (reader method).
(setf name) (writer method).
watch-function-spec (class).
live-cells/src/macros.lispwatch-function.lisp (file).
src (module).
cell-let (macro).
defcell (macro).
live (macro).
with-live-scope (macro).
computed-cell-let% (macro).
define-computed-cell% (macro).
define-mutable-cell% (macro).
make-local-cell-definition% (function).
mutable-cell-let% (macro).
Packages are listed by definition order.
live-cellsProvides the API for using live cells.
anaphora.
arrows.
generic-cl.
batch (macro).
cell-let (macro).
defcell (macro).
live (macro).
none (symbol macro).
none (function).
stop-computation (condition).
with-live-scope (macro).
*batch-in-effect-p* (special variable).
*batch-list* (special variable).
*bind-init-form-p* (special variable).
*global-cell-definition* (special variable).
*track-cell-callback* (special variable).
+cell-def-package+ (constant).
add-observer (generic reader).
(setf add-observer) (generic writer).
add-to-batch (function).
argument (structure).
argument-add-observer (reader).
(setf argument-add-observer) (writer).
argument-key (reader).
(setf argument-key) (writer).
argument-p (function).
argument-remove-observer (reader).
(setf argument-remove-observer) (writer).
arguments (generic reader).
(setf arguments) (generic writer).
body-forms (generic reader).
(setf body-forms) (generic writer).
call-add-observer (function).
call-remove-observer (function).
call-update (function).
call-will-update (function).
cell-spec (class).
cell-symbol (function).
changed-dependencies (generic reader).
(setf changed-dependencies) (generic writer).
changes-only-cell-spec (class).
compute (generic reader).
(setf compute) (generic writer).
compute-cell-spec (class).
compute-changes-only-cell-spec (class).
computed-cell-let% (macro).
copy-argument (function).
copy-function-spec (function).
copy-observer (function).
copy-variable-spec (function).
default-value (generic reader).
define-computed-cell% (macro).
define-mutable-cell% (macro).
did-change? (generic reader).
(setf did-change?) (generic writer).
end-batch (function).
function-spec (structure).
function-spec-body (reader).
(setf function-spec-body) (writer).
function-spec-declare (reader).
(setf function-spec-declare) (writer).
function-spec-lambda-list (reader).
(setf function-spec-lambda-list) (writer).
function-spec-name (reader).
(setf function-spec-name) (writer).
function-spec-p (function).
function-spec-type (reader).
(setf function-spec-type) (writer).
generate-add-observer (compiler macro).
generate-add-observer (generic function).
generate-argument-record (compiler macro).
generate-argument-record (generic function).
generate-cell-definition (compiler macro).
generate-cell-definition (generic function).
generate-cell-functions (compiler macro).
generate-cell-functions (generic function).
generate-cell-variables (compiler macro).
generate-cell-variables (generic function).
generate-compute (compiler macro).
generate-compute (generic function).
generate-did-change? (compiler macro).
generate-did-change? (generic function).
generate-extra (compiler macro).
generate-extra (generic function).
generate-function-definition (compiler macro).
generate-function-definition (generic function).
generate-init (compiler macro).
generate-init (generic function).
generate-notify-update (compiler macro).
generate-notify-update (generic function).
generate-notify-will-update (compiler macro).
generate-notify-will-update (generic function).
generate-observer-record (compiler macro).
generate-observer-record (generic function).
generate-on-update (compiler macro).
generate-on-update (generic function).
generate-on-will-update (compiler macro).
generate-on-will-update (generic function).
generate-pause (compiler macro).
generate-pause (generic function).
generate-post-update (compiler macro).
generate-post-update (generic function).
generate-pre-update (compiler macro).
generate-pre-update (generic function).
generate-remove-observer (compiler macro).
generate-remove-observer (generic function).
generate-setf-expansion (compiler macro).
generate-setf-expansion (generic function).
generate-update (compiler macro).
generate-update (generic function).
generate-use-cell (compiler macro).
generate-use-cell (generic function).
generate-variable-definition (compiler macro).
generate-variable-definition (generic function).
generate-watch-function (compiler macro).
generate-watch-function (generic function).
generate-will-update (compiler macro).
generate-will-update (generic function).
has-old-value? (generic reader).
(setf has-old-value?) (generic writer).
has-value? (generic reader).
(setf has-value?) (generic writer).
init-form (generic reader).
(setf init-form) (generic writer).
make-argument (function).
make-function-spec (function).
make-local-cell-definition% (function).
make-observer (function).
make-setf-expansion (function).
make-variable-spec (function).
mutable-cell-let% (macro).
mutable-cell-spec (class).
name (generic reader).
(setf name) (generic writer).
notify-update (generic reader).
(setf notify-update) (generic writer).
notify-will-update (generic reader).
(setf notify-will-update) (generic writer).
observer (structure).
observer-cell-spec (class).
observer-key (reader).
(setf observer-key) (writer).
observer-p (function).
observer-update (reader).
(setf observer-update) (writer).
observer-will-update (reader).
(setf observer-will-update) (writer).
observers (generic reader).
(setf observers) (generic writer).
old-value (generic reader).
(setf old-value) (generic writer).
remove-observer (generic reader).
(setf remove-observer) (generic writer).
stale? (generic reader).
(setf stale?) (generic writer).
track-argument (function).
update (generic reader).
(setf update) (generic writer).
updating? (generic reader).
(setf updating?) (generic writer).
use-cell% (macro).
(setf use-cell%) (setf expander).
value (generic reader).
(setf value) (generic writer).
variable-spec (structure).
variable-spec-initform (reader).
(setf variable-spec-initform) (writer).
variable-spec-name (reader).
(setf variable-spec-name) (writer).
variable-spec-p (function).
variable-spec-type (reader).
(setf variable-spec-type) (writer).
watch-function-spec (class).
will-update (generic reader).
(setf will-update) (generic writer).
with-tracker (macro).
without-tracker (macro).
Definitions are sorted by export status, category, package, and then by lexicographic order.
Batch assignments to the values of mutable cells.
The forms in FORMS are evaluated, in an implicit PROGN, with mutable
cell assignment batching in effect. This means that when the value of
a mutable cell is set by SETF within the dynamic extent of the BATCH
form, the observers of the cell are only notified after the last form
in FORMS is evaluated, or the BATCH form is exited by a non-local exit
such as by RETURN-FROM. The effect of this is that the cells appear to
have their values changed simultaneously.
.. note::
When a BATCH form is nested in the dynamic extent of another BATCH
form, the nested BATCH form has no effect other than to evaluate
FORMS. The observers of the cells are only notified when exiting
the outermost BATCH form.
Returns the value of the last form in FORMS.
Define cells that are visible only to the forms in BODY.
BINDINGS is a list of cell bindings to establish, similar to
LET*. Each item in BINDINGS is a list of the form
.. code-block::
(NAME VALUE-FORM)
where NAME is the symbol identifying the cell and VALUE-FORM is the
value form of the cell. The cell can then be referenced within the
forms in BODY by the symbol NAME.
The cells defined in BINDINGS lexcially shadow those in the
environment defined with DEFCELL or by an enclosing CELL-LET
form. Like LET* and unlike LET, each cell definition may reference the
cells defined earlier in the same CELL-LET.
The forms in BODY are evaluated in an implicit PROGN. The value returned by the last form is returned by the CELL-LET form.
Define a global cell identified by NAME.
This macro defines a cell identified by NAME with its value computed
by VALUE-FORM. The value of the cell can be referenced by the symbol
NAME following the DEFCELL form.
If VALUE-FORM is a constant, by CONSTANTP, a mutable cell is defined
which can have its value set directly using SETF or SETQ on the symbol
NAME.
If VALUE-FORM is not a constant a computed cell is created. A computed cell may reference one or more argument cells in VALUE-FORM or a function called during the evaluation of VALUE-FORM. When the values of any of the argument cells change, the value of the computed cell is recomputed by evaluating VALUE-FORM again. The referenced argument cells are determined automatically when the VALUE-FORM is evaluated.
This macro creates a cell definition that is visible globally to all forms unless it is lexically shadowed by a definition with the same NAME using CELL-LET. Note that despite being visible globally, the cell definition is still lexically scoped and not dynamically scoped like global variables defined with DEFVAR or DEFPARAMETER.
Define a live block consisting of FORMS.
The FORMS are evaluated once when the LIVE form is first evaluated,
after which they are evaluated again whenever the values of the cells
referenced by them change. Cells may be referenced either directly in
FORMS or by a function called during the evaluation of FORMS.
Returns a function which when called, stops the live block. Once stopped the live block will no longer be called when the values of the referenced cells change.
Stop all live blocks defined in BODY on exiting the form.
All live blocks, defined using LIVE, are stopped when exiting the
dynamic extent defined by this form.
Multiple WITH-LIVE-SCOPE forms can be nested, in which case each form stops the live blocks defined immediately within it.
Stop the computation of a cell’s value.
When this function is called within the value form of cell, the
computation of the cell’s value is stopped, the value form is exited
and the cell’s current value is preserved.
If this function is called while computing the initial value of a
cell, the value of the cell is set to DEFAULT-VALUE.
The symbol-macro NONE is a synonym for “(NONE)“.
This function works by signaling a STOP-COMPUTATION condition, which is then handled by the cell. It is important that this condition is not handled by the value form of the cell, otherwise this function will have no effect.
The package in which symbols identifying generated cell definitions are interned.
Is mutable cell batching in effect?
List of ’notify update’ functions to call after current mutable cell batch.
Should the variable holding the value of the cell be initialized to the cell’s initform?
True when a cell is being defined in the global (NIL) environment.
Callback function that is called when a cell is used as an argument.
This is a function of one argument that is called whenever a use cell function is called. The cell passed to the use cell function is passed to this callback.
Reference the value of a cell while also allowing it to be set with SETF.
When this macro appears as a form in an expression, it is equivalent
to the form VALUE-FORM.
When this macro appears as a place in SETF, the SETF expansion SETTER
is used to set the value of the cell. SETTER is expected to be a list
of five elements defining the SETF expansion for the cell, as per
DEFINE-SETF-EXPANSION. Note, the return store and access form is
wrapped in a LET which binds the temporary and store variables to the
actual variables which were used. This allows the same expansion to be
used even when the same place appears multiple times, in a single SETF
expression.
If SETTER is NIL or omitted, an error condition is signaled when this macro appears as a place in SETF.
Evaluate FORMS with a cell argument tracker in effect.
The FORMS are evaluated in a context where *TRACK-CELL-CALLBACK* is bound to a lexical function defined by BODY. The forms in BODY are evaluated whenever a use cell function called (within FORMS) with CELL-ARG being the name of the symbol which is bound to the cell that was passed to the use cell function.
Evaluate FORMS without an argument cell tracker in-effect.
As a result calling a use cell function, within FORMS, will not call
*TRACK-CELL-CALLBACK*.
The value of the last form in FORMS is returned.
A no-op on SBCL since static dispatching is handled by the compiler transforms, rather than compiler macros.
static-dispatch.
A no-op on SBCL since static dispatching is handled by the compiler transforms, rather than compiler macros.
static-dispatch.
A no-op on SBCL since static dispatching is handled by the compiler transforms, rather than compiler macros.
static-dispatch.
A no-op on SBCL since static dispatching is handled by the compiler transforms, rather than compiler macros.
static-dispatch.
A no-op on SBCL since static dispatching is handled by the compiler transforms, rather than compiler macros.
static-dispatch.
A no-op on SBCL since static dispatching is handled by the compiler transforms, rather than compiler macros.
static-dispatch.
A no-op on SBCL since static dispatching is handled by the compiler transforms, rather than compiler macros.
static-dispatch.
A no-op on SBCL since static dispatching is handled by the compiler transforms, rather than compiler macros.
static-dispatch.
A no-op on SBCL since static dispatching is handled by the compiler transforms, rather than compiler macros.
static-dispatch.
A no-op on SBCL since static dispatching is handled by the compiler transforms, rather than compiler macros.
static-dispatch.
A no-op on SBCL since static dispatching is handled by the compiler transforms, rather than compiler macros.
static-dispatch.
A no-op on SBCL since static dispatching is handled by the compiler transforms, rather than compiler macros.
static-dispatch.
A no-op on SBCL since static dispatching is handled by the compiler transforms, rather than compiler macros.
static-dispatch.
A no-op on SBCL since static dispatching is handled by the compiler transforms, rather than compiler macros.
static-dispatch.
A no-op on SBCL since static dispatching is handled by the compiler transforms, rather than compiler macros.
static-dispatch.
A no-op on SBCL since static dispatching is handled by the compiler transforms, rather than compiler macros.
static-dispatch.
A no-op on SBCL since static dispatching is handled by the compiler transforms, rather than compiler macros.
static-dispatch.
A no-op on SBCL since static dispatching is handled by the compiler transforms, rather than compiler macros.
static-dispatch.
A no-op on SBCL since static dispatching is handled by the compiler transforms, rather than compiler macros.
static-dispatch.
A no-op on SBCL since static dispatching is handled by the compiler transforms, rather than compiler macros.
static-dispatch.
A no-op on SBCL since static dispatching is handled by the compiler transforms, rather than compiler macros.
static-dispatch.
A no-op on SBCL since static dispatching is handled by the compiler transforms, rather than compiler macros.
static-dispatch.
A no-op on SBCL since static dispatching is handled by the compiler transforms, rather than compiler macros.
static-dispatch.
A no-op on SBCL since static dispatching is handled by the compiler transforms, rather than compiler macros.
static-dispatch.
A no-op on SBCL since static dispatching is handled by the compiler transforms, rather than compiler macros.
static-dispatch.
Set the value of the cell according to the SETF expansion defined by SETTER.
use-cell% (macro).
Add a NOTIFY-UPDATE, of a mutable cell, to the current *BATCH-LIST*.
The NOTIFY-UPDATE function is called after the current batch ends.
key.
Add an OBSERVER to an ‘ARGUMENT’ cell ARG.
Remove an OBSERVER from an ‘ARGUMENT’ cell ARG.
Call the ’update’ OBSERVER method.
ARG is the ‘ARGUMENT’ identifying the argument cell.
DID-CHANGE indicates whether the value of ARG has changed. If true then the value of ARG may have changed, but not necessarily has changed. If false then the value of ARG has definitely not changed.
Call the ’will update’ OBSERVER method.
ARG is the ‘ARGUMENT’ identifying the argument cell.
Generate a new symbol for a cell definition.
The format of the generated symbol is NAME-SUFFIX followed by random identifier. The symbol is interned in +CELL-DEF-PACKAGE+ when *GLOBAL-CELL-DEFINITION* is true.
End the current mutable cell batch and call all ’notify update’ functions in *BATCH-LIST*
body.
name.
type.
Generate the SETF expansion for the cell defined by SPEC.
This function generates the SETF expansion by calling GENERATE-SETF-EXPANSION and wrapping the returned store and access forms in a LET which binds the temporary and value variables to the actual variables used with GENSYM’d identifiers.
key.
Register the cell identified by the ‘ARGUMENT’ record ARG as an dependency.
This function calls the function bound to *TRACK-CELL-CALLBACK* on
ARG, if it is non-null.
name.
type.
compute-cell-spec)) ¶compute-cell-spec)) ¶Name of the variable holding the cell’s argument set.
watch-function-spec)) ¶watch-function-spec)) ¶List of forms comprising the body of the watch function.
body.
observer-cell-spec)) ¶observer-cell-spec)) ¶Name of the variable holding the number of dependencies that were changed during the current update cycle.
compute-cell-spec)) ¶compute-cell-spec)) ¶Name of the compute value function for this cell.
stop-computation)) ¶observer-cell-spec)) ¶observer-cell-spec)) ¶Name of the variable holding the flag for whether the cell’s value may have changed during the current update cycle.
Generate the function for adding an observer to the cell defined by SPEC.
ARG is the name of the symbol to use for the function argument.
The return value should be a single form defining only the body of the function.
Generate the ‘ARGUMENT’ record for the cell defined by SPEC.
Generate the form implementing the cell defined by SPEC.
Generate the list of functions for the cell defined by SPEC.
Returns a list of ‘FUNCTION-SPEC’s.
compute-cell-spec)) ¶observer-cell-spec)) ¶Generate the list of variables for the cell defined by SPEC.
Returns a list of ‘VARIABLE-SPEC’s.
compute-cell-spec)) ¶changes-only-cell-spec)) ¶observer-cell-spec)) ¶Generate the compute value function for the cell defined by SPEC.
The return value of this function should be a single form that computes the value of the cell.
compute-cell-spec)) ¶Generate an expression which checks whether the value of the cell defined by SPEC has changed during the last update cycle.
The expression should evaluate to true if the value of the cell may
have changed, even if it has not necessarily changed, and should
evaluate to NIL if it is known with certainty that the value of the
cell has not changed.
changes-only-cell-spec)) ¶observer-cell-spec)) ¶Generate any extra definitions required by the cell defined by SPEC.
The return value should be a single form which is inserted after the remaining definitions.
Generate the CL code defining the function specified by the ‘FUNCTION-SPEC’ spec.
function-spec)) ¶Generate the initialization function of the cell defined by SPEC.
The initialization function is called before adding the first observer
on the cell.
The return value should be a single form defining only the body of the function. If NIL is returned, no init function is generated.
compute-cell-spec)) ¶Generate code which adds the cell as an observer of its arguments.
Generate the function for notifying the observers of the cell defined by SPEC, that its value has changed.
DID-CHANGE is the symbol identifying the variable holding the value of
the did change argument.
The return value should be a single form defining only the body of the
function.
Generate the function for notifying the observers of the cell defined by SPEC, that its value will change.
The return value should be a single form defining only the body of the
function.
Generate the ‘OBSERVER’ record for the cell defined by SPEC.
compute-cell-spec)) ¶Generate the form which calls the ’update’ function of the observers of the cell defined by SPEC.
DID-CHANGE is the symbol identifying the variable holding the value of
the ’did change’ argument to the update call.
observer-cell-spec) did-change) ¶Generate the form which calls the ’will-update’ function of the observers of the cell defined by SPEC.
observer-cell-spec)) ¶Generate the cleanup function of the cell defined by SPEC.
The cleanup function is called after removing the last observer.
The return value should be a single form defining only the body of the function. If NIL is returned, no cleanup function is generated.
compute-cell-spec)) ¶Generate code which stops observing the argument cells.
Generate a form which is run after the value of the cell defined by SPEC is changed.
The generated form is inserted in the ’update’ function of the cell,
after the value is updated.
changes-only-cell-spec)) ¶observer-cell-spec)) ¶Generate a form which is run before the update cycle for the cell defined by SPEC begins.
The generated form is evaluated when the ’will-update’ function is
called for the first time of an update cycle for the cell.
changes-only-cell-spec)) ¶observer-cell-spec)) ¶Generate the function for removing an observer from the cell defined by SPEC.
ARG is the name of the symbol to use for the function argument.
The return value should be a single form defining only the body of the function.
Generate the SETF expansion for the cell defined by SPEC.
This function should return six values where the first is true if the value of the cell can be set with SETF with the remaining values defining the SETF expansion (as per DEFINE-SETF-EXPANSION) for the cell.
mutable-cell-spec)) ¶Generate the ’update’ function of the cell defined by SPEC.
The return value should be a single form implementing the function,
with ARG being the symbol to use for the function argument.
DID-CHANGE is the symbol identifying the variable holding the value of the ’did change’ argument to the update call.
observer-cell-spec) arg changed) ¶Generate a form that references the value of the cell defined by SPEC, and track it as an argument.
compute-cell-spec)) ¶Generate the CL code defining the variable specified by the ‘VARIABLE-SPEC’ spec.
variable-spec)) ¶Generate the implementation of a watch function defined by SPEC.
watch-function-spec)) ¶Generate the ’will-update’ function of the cell defined by SPEC.
The return value should be a single form implementing the function, with ARG being the symbol to use for the function argument.
observer-cell-spec) arg) ¶changes-only-cell-spec)) ¶changes-only-cell-spec)) ¶Name of the variable holding the flag for whether the previous value has been recorded?
observer-cell-spec)) ¶observer-cell-spec)) ¶Name of the variable holding the flag for whether at least one value has been computed for the cell.
watch-function-spec)) ¶watch-function-spec)) ¶Watch function identifier
name.
changes-only-cell-spec)) ¶changes-only-cell-spec)) ¶Name of the variable holding the previous value of the cell.
observer-cell-spec)) ¶observer-cell-spec)) ¶Name of the variable holding the flag for whether the cell’s value should be recomputed.
observer-cell-spec)) ¶observer-cell-spec)) ¶Name of the variable holding the cells ’update’ function.
observer-cell-spec)) ¶observer-cell-spec)) ¶Name of the variable holding the flag for whether the cell’s value is being recomputed.
observer-cell-spec)) ¶observer-cell-spec)) ¶Name of the variable holding the cells ’will-update’ function.
Identifies a cell argument.
KEY is the argument cell identifier.
ADD-OBSERVER and REMOVE-OBSERVER are the functions for adding and removing observers respectively.
Specification of a function definition.
NAME is the symbol naming the function.
LAMBDA-LIST is the function’s lambda-list.
DECLARE is a list of declarations applying to the function’s
environment.
BODY is the list of forms comprising the function body.
TYPE is one of the following keywords identifying the type of
definition:
- :FUNCTION
A function defined with DEFUN
- :MACRO
A macro defined with DEFMACRO
Identifies a cell observer.
KEY is the cell identifier.
WILL-UPDATE and UPDATE are the ’will update’ and ’update’ functions, respectively
Specification of a variable definition.
NAME is the symbol identifying the variable.
INITFORM is the form computing the initial value of the variable.
TYPE is one of the following keywords identifying the type of
definition:
- :VARIABLE
A variable defined with DEFVAR
- :PARAM
A variable defined with DEFPARAMETER
- :SYMBOL-MACRO
A symbol macro defined with DEFINE-SYMBOL-MACRO
Specification for a cell, that is used by code generators to generate the actual implementation.
(setf add-observer).
add-observer.
generate-add-observer.
generate-argument-record.
generate-cell-definition.
generate-cell-functions.
generate-cell-variables.
generate-extra.
generate-init.
generate-notify-update.
generate-notify-will-update.
generate-pause.
generate-remove-observer.
generate-setf-expansion.
generate-use-cell.
(setf init-form).
init-form.
(setf name).
name.
(setf notify-update).
notify-update.
(setf notify-will-update).
notify-will-update.
(setf observers).
observers.
(setf remove-observer).
remove-observer.
(setf value).
value.
Name of the variable holding the cell’s value.
(live-cells::cell-symbol (quote live-cells::cell) (quote live-cells::cell-value))
:value
Form that computes the cell’s value
:init
Name of the variable holding the cell’s observer set.
(live-cells::cell-symbol (quote live-cells::cell) (quote live-cells::cell-observers))
:observers
Name of the function for adding an observer to this cell.
(live-cells::cell-symbol (quote live-cells::cell) (quote live-cells::add-observer))
:add-observer
Name of the function for removing a cell observer.
(live-cells::cell-symbol (quote live-cells::cell) (quote live-cells::remove-observer))
:remove-observer
Name of the function for notifying the observers of this cell that its value has changed.
(live-cells::cell-symbol (quote live-cells::cell) (quote live-cells::notify-update))
:notify-update
Name of the function for notifying the observers of this cell that its value will change.
(live-cells::cell-symbol (quote live-cells::cell) (quote live-cells::notify-will-update))
:notify-will-update
Specification for a cell that only notifies its observers when its new value is /= to its previous value.
This class can be used as mixin in existing cell classes. This means
that when this class is added as a super class of another cell class,
the behaviour of the cell it is added to is changed, such that it only
notifies its observers when its new value is not equal (by /=) to its
previous value.
NOTE: This also changes the behaviour of a cell from lazy evaluation,
when the value of the cell is referenced, to eager evaluation
whenever the values of its dependencies change.
Name of the variable holding the flag for whether the previous value has been recorded?
(live-cells::cell-symbol (quote live-cells::cell) (quote live-cells::has-old-value?))
:has-old-value?
Name of the variable holding the previous value of the cell.
(live-cells::cell-symbol (quote live-cells::cell) (quote live-cells::old-value))
:old-value
Specification for a cell of which the value is a function of one or more argument cells.
Name of the variable holding the cell’s argument set.
(live-cells::cell-symbol (quote live-cells::cell) (quote live-cells::arguments))
:arguments
Name of the compute value function for this cell.
(live-cells::cell-symbol (quote live-cells::cell) (quote live-cells::compute))
:compute
Specification for a computed cell that only notifies its observers when its new value is /= to its previous value.
Specification for a cell that can have its value set directly.
Specification for a cell of which the value is recomputed when the values of its argument cells change.
(setf changed-dependencies).
changed-dependencies.
(setf did-change?).
did-change?.
generate-cell-functions.
generate-cell-variables.
generate-did-change?.
generate-on-update.
generate-on-will-update.
generate-post-update.
generate-pre-update.
generate-update.
generate-will-update.
(setf has-value?).
has-value?.
(setf stale?).
stale?.
(setf update).
update.
(setf updating?).
updating?.
(setf will-update).
will-update.
Name of the variable holding the flag for whether the cell’s value should be recomputed.
(live-cells::cell-symbol (quote live-cells::cell) (quote live-cells::stale?))
:stale?
Name of the variable holding the flag for whether at least one value has been computed for the cell.
(live-cells::cell-symbol (quote live-cells::cell) (quote live-cells::has-value?))
:has-value?
Name of the variable holding the flag for whether the cell’s value is being recomputed.
(live-cells::cell-symbol (quote live-cells::cell) (quote live-cells::updating?))
:updating?
Name of the variable holding the number of dependencies that were changed during the current update cycle.
(live-cells::cell-symbol (quote live-cells::cell) (quote live-cells::changed-dependencies))
:changed-dependencies
Name of the variable holding the flag for whether the cell’s value may have changed during the current update cycle.
(live-cells::cell-symbol (quote live-cells::cell) (quote live-cells::did-change?))
:did-change?
Name of the variable holding the cells ’will-update’ function.
(live-cells::cell-symbol (quote live-cells::cell) (quote live-cells::will-update))
:will-update
Name of the variable holding the cells ’update’ function.
(live-cells::cell-symbol (quote live-cells::cell) (quote live-cells::update))
:update
Defines the specification of a cell watch function.
| Jump to: | (
A B C D E F G H I L M N O R S T U V W |
|---|
| Jump to: | (
A B C D E F G H I L M N O R S T U V W |
|---|
| Jump to: | *
+
A B C D H I K L N O R S T U V W |
|---|
| Jump to: | *
+
A B C D H I K L N O R S T U V W |
|---|
| Jump to: | A B C F L M O P S T V W |
|---|
| Jump to: | A B C F L M O P S T V W |
|---|