This is the hu.dwim.computed-class Reference Manual, generated automatically by Declt version 4.0 beta 2 "William Riker" on Fri May 15 12:26:45 2026 GMT+0.
hu.dwim.computed-class/hu.dwim.computed-class.asdhu.dwim.computed-class/source/api.lisphu.dwim.computed-class/source/clet.lisphu.dwim.computed-class/source/clos.lisphu.dwim.computed-class/source/clos-mop.lisphu.dwim.computed-class/source/defcfun.lisphu.dwim.computed-class/source/defclass-star.lisphu.dwim.computed-class/source/engine.lisphu.dwim.computed-class/source/logger.lisphu.dwim.computed-class/source/package.lisphu.dwim.computed-class/source/universe.lisphu.dwim.computed-class/source/util.lispThe main system appears first, followed by any subsystem dependency.
hu.dwim.computed-classConstraint based change propagation for class slots, lexical variables, function return values and reified cells.
Tamás Borbély <tomi.borbely@gmail.com>
Attila Lendvai <attila.lendvai@gmail.com>
Levente Mészáros <levente.meszaros@gmail.com>
BSD or Bugroff
hu.dwim.asdf (system).
hu.dwim.def+hu.dwim.common (system).
hu.dwim.syntax-sugar (system).
hu.dwim.defclass-star+hu.dwim.def (system).
hu.dwim.util/mop (system).
source (module).
Modules are listed depth-first from the system components tree.
hu.dwim.computed-class/sourcehu.dwim.computed-class (system).
api.lisp (file).
clet.lisp (file).
clos.lisp (file).
clos-mop.lisp (file).
defcfun.lisp (file).
defclass-star.lisp (file).
engine.lisp (file).
logger.lisp (file).
package.lisp (file).
universe.lisp (file).
util.lisp (file).
Files are sorted by type and then listed depth-first from the systems components trees.
hu.dwim.computed-class/hu.dwim.computed-class.asdhu.dwim.computed-class/source/api.lisphu.dwim.computed-class/source/clet.lisphu.dwim.computed-class/source/clos.lisphu.dwim.computed-class/source/clos-mop.lisphu.dwim.computed-class/source/defcfun.lisphu.dwim.computed-class/source/defclass-star.lisphu.dwim.computed-class/source/engine.lisphu.dwim.computed-class/source/logger.lisphu.dwim.computed-class/source/package.lisphu.dwim.computed-class/source/universe.lisphu.dwim.computed-class/source/util.lisphu.dwim.computed-class/hu.dwim.computed-class.asdhu.dwim.computed-class (system).
hu.dwim.computed-class/source/api.lisppackage.lisp (file).
source (module).
computed-class (class).
computed-object (class).
computed-slot-valid-p (generic function).
computed-value-equal? (generic function).
invalidate-computed-slot (generic function).
make-slot-uncomputed (generic function).
recompute-slot (generic function).
hu.dwim.computed-class/source/clet.lispengine.lisp (file).
source (module).
clet (macro).
defcparameter (macro).
defcvar (macro).
hu.dwim.computed-class/source/clos.lispclos-mop.lisp (file).
engine.lisp (file).
defclass-star.lisp (file).
source (module).
computed-slot-valid-p (method).
defcclass (macro).
invalidate-computed-slot (method).
make-slot-uncomputed (method).
recompute-slot (method).
hu.dwim.computed-class/source/clos-mop.lispengine.lisp (file).
source (module).
compute-effective-slot-definition (method).
computed-direct-slot-definition (class).
computed-effective-slot-definition (class).
direct-slot-definition-class (method).
effective-slot-definition-class (method).
initialize-instance (method).
initialize-instance (method).
reinitialize-instance (method).
shared-initialize (method).
shared-initialize (method).
slot-boundp-using-class (method).
slot-boundp-using-class (method).
slot-makunbound-using-class (method).
slot-makunbound-using-class (method).
(setf slot-value-using-class) (method).
(setf slot-value-using-class) (method).
slot-value-using-class (method).
slot-value-using-class (method).
validate-superclass (method).
computed-direct-slot-definition-with-custom-accessors (class).
computed-in-of (reader method).
(setf computed-in-of) (writer method).
computed-readers-of (reader method).
(setf computed-readers-of) (writer method).
computed-slot-definition (class).
computed-writers-of (reader method).
(setf computed-writers-of) (writer method).
ensure-generic-function-for-accessor (function).
functional-direct-slot-definition (class).
functional-effective-slot-definition (class).
functional-slot-definition (class).
needs-to-be-computed-direct-slot-p (function).
needs-to-be-computed-effective-slot-p (function).
needs-to-be-functional-effective-slot-p (function).
setf-slot-value-function-of (reader method).
(setf setf-slot-value-function-of) (writer method).
setf-slot-value-using-class-body (macro).
slot-value-function-of (reader method).
(setf slot-value-function-of) (writer method).
slot-value-using-class-body (macro).
hu.dwim.computed-class/source/defcfun.lispengine.lisp (file).
source (module).
defcfun (macro).
ensure-&rest-in-lambda-list (function).
hu.dwim.computed-class/source/defclass-star.lisppackage.lisp (file).
source (module).
defcclass* (macro).
%defcclass/body (function).
hu.dwim.computed-class/source/engine.lispapi.lisp (file).
universe.lisp (file).
util.lisp (file).
source (module).
computation-of-computed-state (function).
(setf computation-of-computed-state) (function).
computed-state-value (function).
(setf computed-state-value) (function).
invalidate-computed-state (function).
print-object (method).
recompute-computed-state (function).
%computed-state-value (function).
(setf %computed-state-value) (function).
*recompute-state-contex* (special variable).
+invalid-pulse+ (constant).
check-circularity (function).
computed-state (structure).
computed-state-or-nil (function).
computed-state-p (function).
computed-state-valid-p (function).
copy-computed-state (function).
copy-place-independent-slots-of-computed-state (function).
copy-recompute-state-contex (function).
cs-compute-as (reader).
(setf cs-compute-as) (writer).
cs-computed-at-pulse (reader).
(setf cs-computed-at-pulse) (writer).
cs-depends-on (reader).
(setf cs-depends-on) (writer).
cs-form (reader).
(setf cs-form) (writer).
cs-kind (reader).
(setf cs-kind) (writer).
cs-object (reader).
(setf cs-object) (writer).
cs-place-descriptor (reader).
(setf cs-place-descriptor) (writer).
cs-recomputation-mode (reader).
(setf cs-recomputation-mode) (writer).
cs-universe (reader).
(setf cs-universe) (writer).
cs-validated-at-pulse (reader).
(setf cs-validated-at-pulse) (writer).
cs-value (reader).
(setf cs-value) (writer).
current-pulse (function).
ensure-arguments-for-primitive-compute-as-form (function).
ensure-computed-state-is-valid (function).
ensure-recompute-state-contex (macro).
expand-to-primitive-compute-as-form (function).
has-recompute-state-contex? (function).
incf-pulse (function).
make-computed-state (function).
make-recompute-state-contex (function).
primitive-p (function).
print-computed-state (function).
recomputation-mode (type).
recompute-state-contex (structure).
recompute-state-contex-p (function).
rsc-computed-state (reader).
(setf rsc-computed-state) (writer).
rsc-parent-context (reader).
(setf rsc-parent-context) (writer).
rsc-used-computed-states (reader).
(setf rsc-used-computed-states) (writer).
with-new-recompute-state-contex (macro).
with-recompute-state-contex (macro).
hu.dwim.computed-class/source/logger.lisppackage.lisp (file).
source (module).
hu.dwim.computed-class/source/universe.lispapi.lisp (file).
source (module).
computed-universe (class).
define-computed-universe (macro).
shared-initialize (method).
validate-superclass (method).
%expand-computed-universe-definition (function).
compute-as-form? (function).
computed-state-factory-name-of (reader method).
computed-state-factory-name/primitive-of (reader method).
computed-state-factory-name? (function).
computed-universe-class (class).
default-recomputation-mode-of (reader method).
find-computed-universe (function).
primitive-compute-as-form? (function).
pulse-of (reader method).
(setf pulse-of) (writer method).
universe-accessor-form-of (reader method).
universe-factory-form-of (reader method).
hu.dwim.computed-class/source/util.lisplogger.lisp (file).
defclass-star.lisp (file).
source (module).
setf-standard-instance-access-form (macro).
standard-instance-access-form (macro).
unbound-slot-marker (function).
unbound-slot-marker? (function).
Packages are listed by definition order.
hu.dwim.computed-classhu.dwim.asdf.
hu.dwim.common.
hu.dwim.def.
hu.dwim.syntax-sugar.
hu.dwim.util.
clet (macro).
computation-of-computed-state (function).
(setf computation-of-computed-state) (function).
computed-class (class).
computed-direct-slot-definition (class).
computed-effective-slot-definition (class).
computed-object (class).
computed-slot-valid-p (generic function).
computed-state-value (function).
(setf computed-state-value) (function).
computed-universe (class).
computed-value-equal? (generic function).
defcclass (macro).
defcclass* (macro).
defcfun (macro).
defcparameter (macro).
defcvar (macro).
define-computed-universe (macro).
invalidate-computed-slot (generic function).
invalidate-computed-state (function).
make-slot-uncomputed (generic function).
recompute-computed-state (function).
recompute-slot (generic function).
%computed-state-value (function).
(setf %computed-state-value) (function).
%defcclass/body (function).
%expand-computed-universe-definition (function).
*recompute-state-contex* (special variable).
+invalid-pulse+ (constant).
check-circularity (function).
compute-as-form? (function).
computed-direct-slot-definition-with-custom-accessors (class).
computed-in-of (generic reader).
(setf computed-in-of) (generic writer).
computed-readers-of (generic reader).
(setf computed-readers-of) (generic writer).
computed-slot-definition (class).
computed-state (structure).
computed-state-factory-name-of (generic reader).
computed-state-factory-name/primitive-of (generic reader).
computed-state-factory-name? (function).
computed-state-or-nil (function).
computed-state-p (function).
computed-state-valid-p (function).
computed-universe-class (class).
computed-writers-of (generic reader).
(setf computed-writers-of) (generic writer).
copy-computed-state (function).
copy-place-independent-slots-of-computed-state (function).
copy-recompute-state-contex (function).
cs-compute-as (reader).
(setf cs-compute-as) (writer).
cs-computed-at-pulse (reader).
(setf cs-computed-at-pulse) (writer).
cs-depends-on (reader).
(setf cs-depends-on) (writer).
cs-form (reader).
(setf cs-form) (writer).
cs-kind (reader).
(setf cs-kind) (writer).
cs-object (reader).
(setf cs-object) (writer).
cs-place-descriptor (reader).
(setf cs-place-descriptor) (writer).
cs-recomputation-mode (reader).
(setf cs-recomputation-mode) (writer).
cs-universe (reader).
(setf cs-universe) (writer).
cs-validated-at-pulse (reader).
(setf cs-validated-at-pulse) (writer).
cs-value (reader).
(setf cs-value) (writer).
current-pulse (function).
default-recomputation-mode-of (generic reader).
ensure-&rest-in-lambda-list (function).
ensure-arguments-for-primitive-compute-as-form (function).
ensure-computed-state-is-valid (function).
ensure-generic-function-for-accessor (function).
ensure-recompute-state-contex (macro).
expand-to-primitive-compute-as-form (function).
find-computed-universe (function).
functional-direct-slot-definition (class).
functional-effective-slot-definition (class).
functional-slot-definition (class).
has-recompute-state-contex? (function).
incf-pulse (function).
log.debug (macro).
log.dribble (macro).
log.error (macro).
log.fatal (macro).
log.info (macro).
log.warn (macro).
make-computed-state (function).
make-recompute-state-contex (function).
needs-to-be-computed-direct-slot-p (function).
needs-to-be-computed-effective-slot-p (function).
needs-to-be-functional-effective-slot-p (function).
primitive-compute-as-form? (function).
primitive-p (function).
print-computed-state (function).
pulse-of (generic reader).
(setf pulse-of) (generic writer).
recomputation-mode (type).
recompute-state-contex (structure).
recompute-state-contex-p (function).
rsc-computed-state (reader).
(setf rsc-computed-state) (writer).
rsc-parent-context (reader).
(setf rsc-parent-context) (writer).
rsc-used-computed-states (reader).
(setf rsc-used-computed-states) (writer).
setf-slot-value-function-of (generic reader).
(setf setf-slot-value-function-of) (generic writer).
setf-slot-value-using-class-body (macro).
setf-standard-instance-access-form (macro).
slot-value-function-of (generic reader).
(setf slot-value-function-of) (generic writer).
slot-value-using-class-body (macro).
standard-instance-access-form (macro).
unbound-slot-marker (function).
unbound-slot-marker? (function).
universe-accessor-form-of (generic reader).
universe-factory-form-of (generic reader).
with-new-recompute-state-contex (macro).
with-recompute-state-contex (macro).
Definitions are sorted by export status, category, package, and then by lexicographic order.
A let* with extra semantics to handle computed variables. For now see the code and the test file for details.
Available bindings in the body:
- NAME-state The place itself that holds the computed state, so you can
read or setf closed-over computed variables to new (compute-as ...) forms.
Just like a defun, but assumes that the code executed in its body does not have any sideeffects and based on this assumption memoizes the computed return values. The memoized entries are dropped if any computed-state is invalidated that was read while calculating the memoize entry in question.
defcvar and defcparameters are like their cl counterparts with one VERY IMPORT difference: they can only be used as a global, rebinding is not possible!
defcvar and defcparameters are like their cl counterparts with one VERY IMPORT difference: they can only be used as a global, rebinding is not possible!
Read the value, recalculate when needed.
Set the value, invalidate and recalculate as needed.
Invalidate the given COMPUTED-STATE. When LOCALLY is #t then this invalidation has only local effects on this computed-state and the dependent computed-states are not invalidated.
Checks if the given slot value is invalid or not.
computed-object) (slot computed-effective-slot-definition)) ¶computed-object) (slot-name symbol)) ¶When a new value is set in a computed slot, then this method is used to decide whether dependent slots should be recalculated or not.
Forces the recalculation of a slot on the next slot-value or accessor call.
computed-object) (slot computed-effective-slot-definition)) ¶computed-object) (slot-name symbol)) ¶Makes the slot a constant slot with respect to other computed slots. The current value will not be racalculated even if it’s invalid.
computed-object) (slot computed-effective-slot-definition)) ¶computed-object) (slot-name symbol)) ¶Enforces the recomputation of the given slot.
computed-object) (slot computed-effective-slot-definition)) ¶computed-object) (slot-name symbol)) ¶computed-class) name direct-slot-definitions) ¶sb-mop.
computed-class) &rest slot-initargs &key slot-value-function setf-slot-value-function &allow-other-keys) ¶sb-mop.
computed-class) &key &allow-other-keys) ¶sb-mop.
computed-class) &rest initargs &key direct-superclasses) ¶computed-direct-slot-definition-with-custom-accessors) &rest args &key readers writers &allow-other-keys) ¶computed-state) stream) ¶computed-class) &rest initargs &key direct-superclasses) ¶computed-class) (object computed-object) (slot functional-effective-slot-definition)) ¶sb-mop.
computed-class) (object computed-object) (slot computed-effective-slot-definition)) ¶sb-mop.
computed-class) (object computed-object) (slot functional-effective-slot-definition)) ¶sb-mop.
computed-class) (object computed-object) (slot computed-effective-slot-definition)) ¶sb-mop.
computed-class) (object computed-object) (slot functional-effective-slot-definition)) ¶sb-mop.
computed-class) (object computed-object) (slot computed-effective-slot-definition)) ¶sb-mop.
computed-class) (object computed-object) (slot functional-effective-slot-definition)) ¶sb-mop.
computed-class) (object computed-object) (slot computed-effective-slot-definition)) ¶sb-mop.
computed-class) (superclass standard-class)) ¶sb-mop.
computed-universe-class) (superclass standard-class)) ¶sb-mop.
A computed class might have slots which are computed based on other computed slots in other computed class instances. A slot of a computed class is either a standard slot or a computed slot and only class redefinition may change this. Slots which are computed will be tracked, invalidated and/or recomputed whenever a computed slot value changes which were used last time when the slot was computed. The used computed slots are collected runtime and per instance. Moreover different instances might compute the same slots in different ways.
standard-class.
compute-effective-slot-definition.
direct-slot-definition-class.
effective-slot-definition-class.
initialize-instance.
reinitialize-instance.
shared-initialize.
slot-boundp-using-class.
slot-boundp-using-class.
slot-makunbound-using-class.
slot-makunbound-using-class.
(setf slot-value-using-class).
(setf slot-value-using-class).
slot-value-using-class.
slot-value-using-class.
validate-superclass.
computed-slot-definition.
standard-direct-slot-definition.
computed-slot-definition.
standard-effective-slot-definition.
This is the base class for all computed classes. The class need not be listed in the direct supers when defining a computed class because the metaclass makes sure it’s among them.
computed-slot-valid-p.
computed-slot-valid-p.
invalidate-computed-slot.
invalidate-computed-slot.
make-slot-uncomputed.
make-slot-uncomputed.
recompute-slot.
recompute-slot.
slot-boundp-using-class.
slot-boundp-using-class.
slot-makunbound-using-class.
slot-makunbound-using-class.
(setf slot-value-using-class).
(setf slot-value-using-class).
slot-value-using-class.
slot-value-using-class.
This counter will be incremented each time a computed-state is set externally. So, when a computed-state is recomputed (e.g. due to changes in the computed-states that were read while computing the previous value), then this counter will not change. The first valid pulse value is 0.
integer
0
:pulse
The invalid pulse will be set in the computed-state whenever it has to be recomputed on the next read operation.
To identify forms that create a computed state, IOW the (compute-as ...) forms of computed universes.
Copy the slots of FROM into INTO that are not dependent on the place this computed slot has been assigned to.
To identify (compute-as* ...) forms, which are the primitive computed state factories of computed universes.
computed-slot-definition)) ¶automatically generated reader method
computed-slot-definition)) ¶automatically generated writer method
computed-slot-definition)) ¶automatically generated reader method
computed-slot-definition)) ¶automatically generated writer method
computed-universe-class)) ¶automatically generated reader method
computed-universe-class)) ¶automatically generated reader method
computed-slot-definition)) ¶automatically generated reader method
computed-slot-definition)) ¶automatically generated writer method
computed-universe-class)) ¶automatically generated reader method
computed-universe)) ¶computed-universe)) ¶This counter will be incremented each time a computed-state is set externally. So, when a computed-state is recomputed (e.g. due to changes in the computed-states that were read while computing the previous value), then this counter will not change. The first valid pulse value is 0.
functional-slot-definition)) ¶automatically generated reader method
functional-slot-definition)) ¶automatically generated writer method
functional-slot-definition)) ¶automatically generated reader method
functional-slot-definition)) ¶automatically generated writer method
computed-universe-class)) ¶automatically generated reader method
computed-universe-class)) ¶automatically generated reader method
Describes the different kind of computed states. The value present in the slot of an object or the value present in a variable.
structure-object.
hu.dwim.computed-class:computed-universe
integer
hu.dwim.computed-class::+invalid-pulse+
integer
hu.dwim.computed-class::+invalid-pulse+
list
(or null symbol function)
(or null hu.dwim.computed-class:computed-object)
(member hu.dwim.computed-class::standalone hu.dwim.computed-class::object-slot variable)
(quote hu.dwim.computed-class::standalone)
hu.dwim.computed-class::recomputation-mode
:on-demand
(or null symbol hu.dwim.computed-class:computed-effective-slot-definition)
(or atom list)
structure-object.
hu.dwim.util.
(or null hu.dwim.computed-class::recompute-state-contex)
hu.dwim.computed-class::computed-state
list
This direct slot definition converts the :readers and :writers initargs to :computed-readers and :computed-writers effectively disabling the generation of default accessors.
standard-slot-definition.
(or (member t nil) class)
:computed-in
list
:computed-readers
list
:computed-writers
standard-class.
symbol
:computed-state-factory-name
This slot is read-only.
symbol
:computed-state-factory-name/primitive
This slot is read-only.
:default-recomputation-mode
This slot is read-only.
:universe-accessor-form
This slot is read-only.
:universe-factory-form
This slot is read-only.
functional-slot-definition.
standard-direct-slot-definition.
functional-slot-definition.
standard-effective-slot-definition.
standard-slot-definition.
| Initarg | Value |
|---|---|
:allocation | class |
function
:slot-value-function
function
:setf-slot-value-function
| Jump to: | %
(
C D E F G H I L M N P R S U V W |
|---|
| Jump to: | %
(
C D E F G H I L M N P R S U V W |
|---|
| Jump to: | *
+
C D F K O P R S U V |
|---|
| Jump to: | *
+
C D F K O P R S U V |
|---|
| Jump to: | A C D E F H L M P R S T U |
|---|
| Jump to: | A C D E F H L M P R S T U |
|---|