xtc.type |
xtc's representation of types. This package defines a hierarchy of
type classes, representing types of the C, Java, and ML programming
languages as well as pseudo-types to help with type-checking programs.
In particular:
- {@link xtc.type.Type} is the superclass of all type classes and
defines the common interface.
- {@link xtc.type.VoidT} represents the void type.
- {@link xtc.type.UnitT} represents the unit type.
- {@link xtc.type.BooleanT} represents the boolean type.
- {@link xtc.type.IntegerT} and {@link xtc.type.FloatT} represent
integer and floating point {@link xtc.type.NumberT numbers},
respectively.
- {@link xtc.type.InternalT} represents compiler-internal types,
such as the
__builtin_va_list type used by gcc for
variable argument lists.
- {@link xtc.type.LabelT} and {@link xtc.type.PackageT} represent
labels and packages, respectively.
- {@link xtc.type.PointerT}, {@link xtc.type.ArrayT}, {@link
xtc.type.StructT}, {@link xtc.type.UnionT}, {@link
xtc.type.FunctionT}, {@link xtc.type.MethodT}, {@link
xtc.type.ClassT}, {@link xtc.type.InterfaceT}, {@link
xtc.type.TupleT}, and {@link xtc.type.VariantT} represent {@link
xtc.type.DerivedT derived types}.
- {@link xtc.type.WrappedT} is the superclass of pseudo-types adding
symbolic information to any of the previous types. {@link
xtc.type.AliasT} represents type aliases; {@link xtc.type.AnnotatedT}
provides annotations for another type; {@link xtc.type.EnumeratorT}
and {@link xtc.type.EnumT} represent C enums; {@link
xtc.type.VariableT} represents globals, locals, fields, and bitfields;
{@link xtc.type.ParameterizedT} represents parameterized types; and
{@link xtc.type.InstantiatedT} represents instantiations of
parameterized types.
- {@link xtc.type.Parameter} represents a type parameter and {@link
xtc.type.Wildcard} represents a wildcard. Types containing instances
of these classes are parameterized. They should be wrapped in a
{@link xtc.type.ParameterizedT} and instantiated through a {@link
xtc.type.InstantiatedT}.
- Finally, {@link xtc.type.ErrorT} represents typing errors.
These type classes are complemented by a common interface for all
{@link xtc.type.Tagged tagged types} (structs, unions, and enums) and
for all {@link xtc.type.Constant constant-valued types} (enumerators
and the ConstantT pseudo-type).
To model the memory shape of lvalues, this package also defines a
separate hierarchy of references:
- {@link xtc.type.Reference} is the superclass of all reference
classes and defines the common interface. All references have a type
specifying the referenced memory's shape or layout.
- {@link xtc.type.NullReference#NULL} represents the zero location
in memory. It has
void as its type.
- {@link xtc.type.StaticReference} and {@link
xtc.type.DynamicReference} represent statically and dynamically
allocated variables, respectively. Both reference classes are
symbolic representations of memory; they do not have a known
location.
- {@link xtc.type.RelativeReference} is the superclass of all
relative references, with each relative reference having another
reference as its base.
- {@link xtc.type.CastReference} represents a differently typed
view on the same memory region.
- {@link xtc.type.IndirectReference} represents an indirection
through a memory region, i.e., pointer.
- {@link xtc.type.IndexReference} represents an integer offset from
another reference, while {@link xtc.type.FieldReference} represents a
symbolic offset.
|
Java Source File Name | Type | Comment |
AliasT.java | Class | A type alias. |
AnnotatedT.java | Class | An annotated type. |
ArrayT.java | Class | An array type. |
AST.java | Class | Common type operations for Rats! ASTs.
This class supports two views on a grammar's generic AST. |
BooleanT.java | Class | A boolean type. |
C.java | Class | Common type operations for the C language. |
CastReference.java | Class | Representation of a cast reference. |
CFactory.java | Class | A factory for programmatically and concisely creating C types. |
ClassOrInterfaceT.java | Class | The superclass of class and interface types. |
ClassT.java | Class | A class type. |
Constant.java | Class | Representation of a type's constant value. |
DerivedT.java | Class | The superclass of all derived types. |
DynamicReference.java | Class | Representation of a reference to dynamically allocated memory. |
EnumeratorT.java | Class | An enumerator. |
EnumT.java | Class | An enumerated type. |
ErrorT.java | Class | The pseudo-type indicating a malformed type. |
FieldReference.java | Class | Representation of a field reference. |
FloatT.java | Class | A floating point type. |
FunctionOrMethodT.java | Class | The superclass of function and method types. |
FunctionT.java | Class | A function type. |
IndexReference.java | Class | Representation of an index reference. |
IndirectReference.java | Class | Representation of an indirect reference. |
InstantiatedT.java | Class | An instantiated type. |
IntegerT.java | Class | An integer type. |
InterfaceT.java | Class | An interface type. |
InternalT.java | Class | An internal type, identified by its name. |
JavaAST.java | Class | Common type operations for Java ASTs. |
LabelT.java | Class | A label type. |
Language.java | Class | |
MethodT.java | Class | A method type. |
NullReference.java | Class | Representation of a null reference. |
NumberT.java | Class | The superclass of all number types. |
PackageT.java | Class | A package type. |
Parameter.java | Class | A type parameter. |
ParameterizedT.java | Class | A parameterized type. |
PointerT.java | Class | A pointer type. |
Reference.java | Class | Representation of a reference. |
RelativeReference.java | Class | Representation of a reference value. |
SourcePrinter.java | Class | A visitor to print types in C-like source form. |
StaticReference.java | Class | Representation of a reference to statically allocated memory. |
StringReference.java | Class | Representation of a reference to a constant string. |
StructOrUnionT.java | Class | The superclass of struct and union types. |
StructT.java | Class | A struct type. |
Tagged.java | Interface | The interface of all tagged C types. |
TupleT.java | Class | A tuple type. |
Type.java | Class | The superclass of all types.
The class hierarchy for types distinguishes basic from wrapped
types, with wrapped types providing additional information for
basic types. |
TypePrinter.java | Class | A visitor to print types. |
UnionT.java | Class | A union type. |
UnitT.java | Class | A unit type. |
VariableReference.java | Class | Representation of a symbolic memory location. |
VariableT.java | Class | A variable. |
VariantT.java | Class | A variant type. |
VoidT.java | Class | A void type. |
Wildcard.java | Class | A type wildcard. |
WrappedT.java | Class | The superclass of all wrapped types. |