This package includes the basic classes for the intermediate
representation (IR) used in the fluid project. There are basic
facilities for nodes, attributes (known as slot infos), slots and
compound data structures (homogenous sequences and heterogenous
records). For more complex data structures, graphs and trees, see
{@link fluid.tree}. For versioning of slots; see
{@link fluid.version}
The basis of the IR are a large number of nodes with identity.
There are also a number of attributes, some named, registered and
potentially persistent, others anonymous and transient. An attribute
that is/will be persistent must have a declared type. An attribute
may have a value for any and all nodes. This value may be stored in a
slot. All information about a node is represented in
its attribute values. For example, in a Java parse node in the IR,
the kind of node, its parent and children as well as binding and type
information is all in its attribute values.
Here is a thematic list of the classes and interfaces in this
package:
- Classes implementing IR nodes:
- {@link fluid.ir.IRNode} (interface)
- {@link fluid.ir.PlainIRNode}
- {@link fluid.ir.ProxyNode}
- Classes implementing attributes are called slot info classes.
There are two kinds of attributes: stored attributes which have a value
until changed to another value, and immutable derived attributes whose
values are computed (potentially from other slots). Stored attributes
keep their slots in a table of slots
- {@link fluid.ir.SlotInfo} (abstract)
- {@link fluid.ir.DerivedSlotInfo} (abstract)
- {@link fluid.ir.StoredSlotInfo} (abstract)
- {@link fluid.ir.InfoStoredSlotInfo}
- {@link fluid.ir.SimpleSlotInfo}
- {@link fluid.ir.ConstantSlotInfo}
- {@link fluid.ir.SlotAlreadyRegisteredException}
- {@link fluid.ir.SlotNotRegisteredException}
- {@link fluid.ir.Slots} (abstract)
- {@link fluid.ir.ListSlots}
- {@link fluid.ir.HashedSlots}
- Classes implementing slots, containers for attribute values. A
slot may be undefined (no value yet) or constant
(the value is immutable, that is, may not be changed). When
a slot is assigned a value, it is permitted to change its class (and
identity). Predefined slots are slots that have a value but
may be shared (say as the default slot for an attribute). These slots
always mutate into a new slot when the value is changed. Predefined
slots implement a copy-on-write sharing policy that permits slots to
be shared invisibly. Simple slots are mutable containers of
values. The {@link fluid.version} package defines new
slots so that the values are versioned.
- {@link fluid.ir.Slot} (interface)
- {@link fluid.ir.UndefinedSlot} (abstract)
- {@link fluid.ir.PredefinedSlot} (abstract)
- {@link fluid.ir.UndefinedConstantSlot}
- {@link fluid.ir.ConstantSlot}
- {@link fluid.ir.UndefinedSimpleSlot}
- {@link fluid.ir.PredefinedSimpleSlot}
- {@link fluid.ir.SimpleSlot}
- {@link fluid.ir.SlotUndefinedException}
- {@link fluid.ir.SlotImmutableException}
- Classes describing types of attributes. Eventually these
classes will include information on how to persistently store values
of the type. A named stored attribute is required to have a type:
- {@link fluid.ir.IRType} (interface)
- {@link fluid.ir.IRNodeType}
- {@link fluid.ir.IRIntegerType}
- {@link fluid.ir.IRStringType}
- {@link fluid.ir.IRSequenceType}
- {@link fluid.ir.IRRecordType}
- {@link fluid.ir.IRLocationType}
- Homogenous sequences come in a variety of types: fixed size and
variable size as well as empty sequences as a special case of fixed
size sequences. The elements of any sequence can be enumerated and it
is also possible to name the location within a sequence. For fixed
size sequences, these names are isomorphic to integers; for variable
size sequences the name is sticky, no matter how the sequence changes,
a location remains the same. When creating a sequence, it is
necessary to specify the kind of slots desired (constant, simple, or
versioned); a slot factory is used to name a family of slot classes.
- {@link fluid.ir.IRSequence} (interface)
- {@link fluid.ir.EmptyIRSequence}
- {@link fluid.ir.IRArray} fixed size
- {@link fluid.ir.IRList} variable size
- {@link fluid.ir.IRLocation} (interface)
- {@link fluid.ir.IRSequenceEnumeration}
- {@link fluid.ir.SlotFactory} (interface)
- {@link fluid.ir.ConstantSlotFactory}
- {@link fluid.ir.SimpleSlotFactory}
- {@link fluid.version.VersionedSlotFactory}
- Persistence of the IR is accomplished in regions,
bundles and chunks. The persistence system is extended
in the {@link fluid.version} package.
More information is available in the following classes:
- {@link fluid.ir.IRPersistent}
- {@link fluid.ir.IRRegion}
- {@link fluid.ir.Bundle}
- {@link fluid.ir.IRChunk}
- {@link fluid.ir.IROutput} (interface)
- {@link fluid.ir.IRInput} (interface)