Download bachelor thesis - Common

Transcript
3.1.2
Fluents
[Classes]
uent, value-uent, pulse-uent, uent-net
Fluents come in three avors,
value-fluent, pulse-fluent
and
fluent-net.
value-fluent
represents a uent with an associated value which can a) be changed, and
b) be waited for.
A
value-fluent
is what is commonly stored into an
object's slots for values whose changes are supposed to be tracked just
like the
status
slot in task objects.
pulse-fluent
represents a special kind of uent without an explicitly associated value (it
nil, or t) that is used in special wait scenarios. In particular,
value-fluent.
fl-pulsed for details.
only ever is
it overcomes the ABA problems inherent in waiting on a
See
fluent-net
represents an interconnected network of uents where a value change of
one uent propagates through the network by possibly causing neighbors
to change their values, too.
A
fluent-net
is commonly used to track
specic aspects of uent changes, and, as the examples below will show,
they make it very convenient to work with uents in general.
[Function]
make-uent &key name value
Create an object of class
of
value.
No
fluent-net.
[Accessor]
explicit
value-fluent
constructors
are
named
name
provided
for
with an initial value
pulse-fluent,
value uent
uent.
Return the value of
(setf value) new-value uent
Sets the value of uent to new-value. Implicitly pulses the uent.
[Accessor]
21
and