Package-level declarations

Types

Link copied to clipboard
interface A_BasicObject : JSONFriendly

A_BasicObject is an interface that specifies all generally applicable operations that an AvailObject must implement. Its purpose is to declare that only the most basic protocol of some object will be used. Its sub-interfaces define behavior that's applicable to tuples, sets, etc., and AvailObject simply implements all of those interfaces.

Link copied to clipboard
abstract class AbstractAvailObject

AbstractAvailObject specifies the essential layout and storage requirements of an Avail object, but does not specify a particular representation. As such, it defines requirements for object and integer storage capability, identity comparison by object address, indirection capability, and descriptor access.

Link copied to clipboard
abstract class AbstractDescriptor

AbstractDescriptor is the base descriptor type. An AvailObject contains a descriptor, to which it delegates nearly all of its behavior. That allows interesting operations like effective type mutation (within a language that does not support it directly, such as Java). It also allows multiple representations of equivalent objects, such as more than one representation for the tuple <1,2,3>. It can be represented as an AvailObject using either an ObjectTupleDescriptor, a ByteTupleDescriptor, a NybbleTupleDescriptor, or a TreeTupleDescriptor. It could even be an IndirectionDescriptor if there is another object that already represents this tuple.

Link copied to clipboard

The AbstractSlotsEnum is an interface that helps ensure that object representations and access are consistent and correct. In particular, some operations in AvailObject (such as AvailObject.slot) are expected to operate on enumerations defined as inner classes within the Descriptor class for which the slot layout is specified.

Link copied to clipboard
class AvailIntegerValueHelper(val longValue: Long)

A helper class used by IntelliJ to show Logical Structures in the debugger. In particular, it shows long-valued slots within AvailObjects.

Link copied to clipboard

AvailObject is the fully realized, and mostly machine generated, implementation of an Avail object. An AvailObject must keep track of its descriptor, its integer data, and its references to other AvailObjects. It specifies the complete complement of messages that can be sent to an AvailObject, and delegates most of those to its descriptor, passing the AvailObject as an additional first argument. The redirected messages in AbstractDescriptor have the prefix "o_", both to make them stand out better and to indicate the additional first argument.

Link copied to clipboard
class AvailObjectFieldHelper(parentObject: A_BasicObject?, val slot: AbstractSlotsEnum, val subscript: Int, val value: Any?, val slotName: String = slot.fieldName, val forcedName: String? = null, val forcedChildren: Array<*>? = null)

This class assists with the presentation of AvailObjects in the IntelliJ debugger. Since AvailObjects have a uniform structure consisting of a descriptor, an array of AvailObjects, and an array of longs, it is essential to the understanding of a hierarchy of Avail objects that they be presented at the right level of abstraction, including the use of symbolic names for conceptual subobjects.

Link copied to clipboard

AvailObjectRepresentation is the representation used for all Avail objects.

Link copied to clipboard
class BitField(val integerSlot: IntegerSlotsEnum, val shift: Int, val bits: Int, val presenter: (Int) -> String?? = null) : Comparable<BitField?>

A BitField is constructed at class loading time and contains any cached information needed to efficiently access a range of up to 32 contiguous bits from an integer slot.

Link copied to clipboard

This is the primary subclass of AbstractDescriptor. It has the sibling IndirectionDescriptor.

Link copied to clipboard

FillerDescriptor represents an unreachable AvailObject of arbitrary size. It exists solely to occupy dead space formerly occupied by a real object.

Link copied to clipboard

An AvailObject with an IndirectionDescriptor keeps track of its target, that which it is pretending to be. Almost all messages are routed to the target, making it an ideal proxy.

Link copied to clipboard

The IntegerEnumSlotDescriptionEnum is an interface that constrains an enumeration used to describe the values that can occur in a particular integer slot or BitField.

Link copied to clipboard

The IntegerSlotsEnum is an interface that helps ensure that object representations and access are consistent and correct. In particular, some operations in AvailObject (such as AvailObject.slot) are expected to operate on enumerations defined as inner classes within the Descriptor class for which the slot layout is specified.

Link copied to clipboard

A description of the mutability of an AvailObject. This information is not maintained by an object itself, but rather by the AbstractDescriptor that specifies its representation and behavior.

Link copied to clipboard

NilDescriptor implements the Avail nil value, the sole direct instance of the invisible and uninstantiable root type, ⊤ (top).

Link copied to clipboard

The ObjectSlotsEnum is an interface that helps ensure that object representations and access are consistent and correct. In particular, some operations in AvailObject (such as AvailObject.slot) are expected to operate on enumerations defined as inner classes within the Descriptor class for which the slot layout is specified.