1.3.1 Types, Objects, and their Properties
a tagged type intended for use as an ancestor of other types, but which
is not allowed to have objects of its own
a type that has values that designate aliased objects
Note: Access types correspond to “pointer
types” or “reference types” in some other languages.
a representation of the lifetime of an entity in terms of the level of
dynamic nesting within which the entity is known to exist
a view of an object that can be designated by an access value
Note: Objects allocated by allocators are aliased.
Objects can also be explicitly declared as aliased with the reserved
word aliased. The Access attribute can be used to create an access value
designating an aliased object.
the type itself or, in the case of a type derived from other types, its
parent type or one of its progenitor types or one of their ancestors
Note: Ancestor and descendant are inverse relationships.
a composite type whose components are all of the same type
a specifiable property of an entity
Note: An aspect can be specified by an
aspect_specification
on the declaration of the entity. Some aspects can be queried via attributes.
a characteristic or property of an entity that can be queried, and in
some cases specified
a set of types with one or more common properties, such as primitive
operations
Note: A category of types that is closed under
derivation is also known as a class.
an enumeration type whose values include characters
a set of types that is
closed under derivation, which
means that if a given type is in the class, then all types derived from
that type are also in the class
Note: The set of types of a class share common
properties, such as their primitive operations.
a type with components, such as an array or record
a type that supports user-defined assignment and finalization
Note: Objects are always finalized before being
destroyed.
default initial
condition
a property that holds for every default-initialized object of a given
type
a type defined in terms of a parent type and zero or more progenitor
types given in a derived type definition
Note 1: A derived type inherits properties such
as components and primitive operations from its parent and progenitors.
Note 2: A type together with the types derived
from it (directly or indirectly) form a derivation class.
the type itself or a type derived (directly or indirectly) from it
Note: Descendant and ancestor are inverse relationships.
a type that is either an integer type or an enumeration type
a parameter for a composite type, which can control, for example, the
bounds of a component that is an array
Note: A discriminant for a task type can be
used to pass data to a task of the type upon its creation.
a type that does not have components
a type defined by an enumeration of its values, which can be denoted
by identifiers or character literals
a view of a type that reveals only a few of its properties
Note 1: The remaining properties are provided
by the full view given elsewhere.
Note 2: Incomplete types can be used for defining
recursive data structures.
a type that has user-defined behavior for indexing, via the Constant_Indexing
or Variable_Indexing aspects
a type that represents signed or modular integers
Note: A signed integer type has a base range
that includes both positive and negative numbers, and has operations
that can raise an exception when the result is outside the base range.
A modular type has a base range whose lower bound is zero, and has operations
with “wraparound” semantics. Modular types subsume what are
called “unsigned types” in some other languages.
an abstract tagged type that has no components or concrete operations
except possibly null procedures
Note: Interface types are used for composing
other interfaces and tagged types and thereby provide multiple inheritance.
Only an interface type can be used as a progenitor of another type.
an assertion that is expected to be True for all objects of a given private
type when viewed from outside the defining package
a type that has user-defined behavior for iteration, via the Default_Iterator
and Iterator_Element aspects
a type for which copying (such as in an
assignment_statement)
is not allowed
Note: A nonlimited type is a type for which
copying is allowed.
a component of a record type or record extension that is required to
have its value specified within a given aggregate
nominal subtype
of a view of an object
the subtype specified when the view is defined
an entity that contains a value, and is either a constant or a variable
Note: An object is created by an
object_declaration
or by an
allocator.
A formal parameter is (a view of) an object. A subcomponent of an object
is an object.
an aspect that indicates a logical property of an entity, such as the
precondition of a subprogram, or the procedure used to write a given
type of object to a stream
the first ancestor type given in the definition of the derived type
Note: The parent can be almost any kind of type,
including an interface type.
primitive operations
of a type
the operations (such as subprograms) declared together with the type
declarations
Note: Primitive operations are inherited by
other types in the same derivation class of types.
a type that extends another type, with the additional properties hidden
from its clients
a view of a type that reveals only some of its properties
Note: The remaining properties are provided
by the full view given elsewhere. Private types can be used for defining
abstractions that hide unnecessary details from their clients.
progenitor of
a derived type
one of the types given in the definition of the derived type other than
the first
Note: A progenitor is always an interface type.
Interfaces, tasks, and protected types can also have progenitors.
a composite type whose components are accessible only through one of
its protected operations, which synchronize concurrent access by multiple
tasks
a type that has values that are approximations of the real numbers
Note: Floating point and fixed point types are
real types.
a type that extends another type optionally with additional components
a composite type consisting of zero or more named components, possibly
of different types
a type that has user-defined behavior for “.all”, defined
by the Implicit_Dereference aspect
an aspect that indicates how an entity is mapped onto the underlying
hardware, for example the size or alignment of an object
either a discrete type or a real type
a characteristic associated with objects of a given type that is preserved
by many of the primitive operations of the type
an object associated with one or more access types from which the storage
for objects created by allocators of the access type(s) is obtained
Note: Some storage pools can be partitioned
into subpools in order to support finer-grained storage management.
a sequence of elements that can be used, along with the stream-oriented
attributes, to support marshalling and unmarshalling of values of most
types
a type together with optional constraints, null exclusions, and predicates,
which constrain the values of the type to the subset that satisfies the
implied conditions
an entity that can be safely operated on by multiple tasks concurrently
Note: A synchronized interface can be an ancestor
of a task or a protected type. Such a task or protected type is called
a synchronized tagged type.
a type whose objects each have a run-time type tag, which indicates the
specific type for which the object was originally created
Note: Tagged types can be extended with additional
components.
a composite type used to represent active entities which execute concurrently
and that can communicate via queued task entries
Note: The top-level task of a partition is called
the environment task.
a defining characteristic of each object and expression of the language,
with an associated set of values, and a set of primitive operations that
implement the fundamental aspects of its semantics
Note: Types are grouped into categories. Most
language-defined categories of types are also classes of types.
see invariant
a representation of an entity that reveals some or all of the properties
of the entity
Note: A single entity can have multiple views.
Ada 2005 and 2012 Editions sponsored in part by Ada-Europe