Package-level declarations

Types

Link copied to clipboard
interface A_Type : A_BasicObject

A_Type is an interface that specifies the operations specific to all of Avail's types. It's a sub-interface of A_BasicObject, the interface that defines the behavior that all AvailObjects are required to support.

Link copied to clipboard

I represent the abstract concept of enumerations. In particular, every object has a type which is effectively a singular enumeration, which has as instances that object plus any subtypes if that object is a type). Such a singular enumeration is always represented via the subclass InstanceTypeDescriptor. Enumerations with multiple elements are always represented with an EnumerationTypeDescriptor. Any object present in this element set (or a subtype of an element that's a type) is considered an instance of this enumeration. The enumeration with no elements (there's only one) uses BottomTypeDescriptor.

Link copied to clipboard

AbstractTypeDescriptor explicitly defines the responsibilities of all Avail types. Many of these operations are actually undefined in subclasses, in clear violation of the Liskov substitution principle, yet this organization is still useful to see the aggregate capabilities of Avail types.

Link copied to clipboard

BottomPojoTypeDescriptor describes the type of Java null, which is implicitly an instance of every Java reference type. It therefore describes the most specific Java reference type. Its only proper subtype is Avail's own bottom type.

Link copied to clipboard

BottomTypeDescriptor represents Avail's most specific type, ⊥ (pronounced bottom). ⊥ is an abstract type; it cannot have any instances, since its instances must be able to meaningfully perform all operations, and this is clearly logically inconsistent.

Link copied to clipboard

A compiled code type is the type for a compiled code object. It contains a function type with which it covaries. That is, a compiled code type is a subtype of another if and only if the first's related function type is a subtype of another's function type.

Link copied to clipboard

An object instance of ConcatenatedTupleTypeDescriptor is an optimization that postpones (or ideally avoids) the creation of a tuple type when computing the static type of the concatenation of two tuples.

Link copied to clipboard

Continuation types are the types of continuations. They contain information about the types of function that can appear on the top stack frame for a continuation of this type.

Link copied to clipboard

A dimension along which a phrase type can be covariantly specialized.

Link copied to clipboard

My instances are called enumerations. This descriptor family is used for enumerations with two or more instances (i.e., enumerations for which two or more elements survive canonicalization). For the case of one instance, see InstanceTypeDescriptor, and for the case of zero instances, see BottomTypeDescriptor.

Link copied to clipboard

FiberTypeDescriptor represents the type of a fiber. A fiber is typed by the return type of the base function used to create it. Fiber types provide first-order type safety, but are not perfectly sincerely. Switching a fiber's continuation to one whose base function's return type is incompatible with the fiber's type is a runtime error, and will be detected and reported when such a (terminated) fiber's result is requested.

Link copied to clipboard

Function types are the types of functions. They contain information about the types of arguments that may be accepted, the types of values that may be produced upon successful execution, and the types of exceptions that may be raised to signal unsuccessful execution.

Link copied to clipboard

My instances are called instance metas, the types of types. These are the only representation (modulo indirection objects) of metatypes in Avail, as attempting to carry enumeration types up the instance-of hierarchy leads to an unsound type theory.

Link copied to clipboard

My instances are called instance types, the types of individual objects. In particular, whenever an object is asked for its type, it creates an instance type that wraps that object. Only that object is a member of that instance type, except in the case that the object is itself a type, in which case subtypes of that object are also considered instances of the instance type.

Link copied to clipboard

My instances represent the types of one or more extended integers. There are lower and upper bounds, and flags to indicate whether those bounds are to be treated as inclusive or exclusive of the bounds themselves.

Link copied to clipboard

Define the structure and behavior of list phrase types. List phrases are phrases that produce a tuple from a particular tuple of any-yielding phrases. Correspondingly, list phrase types organize the part of the phrase type lattice related to list phrases.

Link copied to clipboard

I represent the type of some literal tokens. Like any object, a particular literal token has an exact instance type, and tokens in general have a simple primitive type of PrimitiveTypeDescriptor.Types.TOKEN, but LiteralTokenTypeDescriptor covariantly constrains a literal token's type with the type of the value it contains.

Link copied to clipboard

An object instance of MapTypeDescriptor is a type which maps may conform to. The map type has a size range, and key and value types. For a map to conform to a map type, it must be within the indicates size range and have keys and values of the specified types.

Link copied to clipboard

Define the structure and behavior of phrase types. The phrase types are all parameterized by expression type, but they also have a relationship to each other based on a fiat hierarchy.

Link copied to clipboard

An PojoTypeDescriptor describes the type of a plain-old Java object (pojo) that is accessible to an Avail programmer as an Avail object.

Link copied to clipboard

The primitive types of Avail are different from the notion of primitive types in other object-oriented languages. Traditionally, a compiler or virtual machine encodes representation knowledge about and makes other special provisions about its primitive types. Since all types are in a sense provided by the Avail system, it has no special primitive types that fill that role – they're all special.

Link copied to clipboard

A ReadWriteVariableTypeDescriptor read-write variable type is parametric on the types of values that may be read from and written to object instance variables. Reading a variable is a covariant capability, while writing a variable is a contravariant capability.

Link copied to clipboard

SelfPojoTypeDescriptor describes the self type of a Java class or interface. In the pojo implementation, any Java class or interface that depends recursively on itself through type parameterization of self, superclass, or superinterface uses a pojo self type. java.lang.Enum is a famous example from the Java library: its type parameter, E, extends Enum's self type. A pojo self type is used to break the recursive dependency.

Link copied to clipboard

A SetTypeDescriptor object instance is a type that some sets may conform to. It is built up from a range of sizes that the sets may be, and the content type that the set's elements would have to conform to.

Link copied to clipboard

I represent the type of some tokens. Like any object, a particular token has an exact instance type, but TokenTypeDescriptor covariantly constrains a token's type by its TokenType.

Link copied to clipboard

A tuple type can be the type of a tuple, or something more general. It has a canonical form consisting of three pieces of information:

Link copied to clipboard

Every object in Avail has a type. Types are also Avail objects. The types are related to each other by the subtype relation in such a way that they form a lattice. The top of the lattice is (pronounced "top"), which is the most general type. Every object conforms with this type, and every subtype is a subtype of it. The bottom of the lattice is (pronounced "bottom"), which is the most specific type. It has no instances, and it is a subtype of all other types.

Link copied to clipboard

TypeTag is an enumeration that corresponds with the basic type structure of Avail's type lattice. Even though the type lattice contains an infinite collection of infinitely long chains of types, some of which have an infinite number of direct ancestors and direct descendants, we're still able to extract a pragmatic tree of types from the lattice.

Link copied to clipboard

A VariableTypeDescriptor variable type is the type of any variable that can only hold objects having the specified inner type. The read and write capabilities of the object instances are equivalent, therefore the inner type is invariant.