OODBTG Reference Model
"Literals" are objects such as numbers and character strings.Literal values are similar to created objects in that both may occur asoperands of operations. Literal values are different from created objectsin that they have immutable state and they do not have a create operationbecause their representations are explicitly recognized. For example, multipleoccurrences of the same literal number are all references to the same pointon the number line. Operations which return literal values are constructingreferences to objects, not creating objects. In most object systems, ifX and Y are literals, X == Y only if X and Y represent the same literal.
OMG Core Object Model
4.2.4 Non-object types
Many object systems, for example C++ and CORBA, explicitly distinguishbetween objects and things that are not objects5.The Core Object Model has chosen to recognize that this distinction exists.Things that are not objects are called non-objects6.Objects and non-objects collectively represent the set of denotable valuesin the Object Model.
In the Core Object Model, non-objects are not labeled by an object reference,and therefore cannot be the controlling parameter for an operation request.Each non-object can be considered to belong to a type of value, calleda Non-object type. This is analogous to objects being instancesof types. Non-object types, however, do not belong to the Object type-hierarchy.Thus non-object types are not subtypes of Object. Moreover, the rules forsubtyping and inheritance defined later in this section do not apply tonon-object types. Components can add more structure to the non-object types;for example, a component could define subtyping and inheritance rules fornon-object types.
The Core does not specify a set of non-object types; these types aredefined in a component and chosen for inclusion in a Profile. For example,CORBA would define in its profile that the non-object types would include:Short, Long, UShort, Ulong, Float, Double, Char, String, Boolean, Octet,Enum, Struct, Sequence, Union, and Array. The set of non-object types canbe extended by adding new types to the Non-object component.
Editor's Note: Presumably, any operations defined for non-objecttypes would also have to be defined in components, since operations canonly be defined on object types in the Core.
Profiles can choose which non-object types to support. In a pure objectsystem, such as Smalltalk, all denotable values are expressed as objectsand so the set of non-object types may be empty. Thus profiles are allowedto make the difference between the set of objects and set of non-objectsthat they recognize as wide or as narrow as needed.
The set of all non-object types is called NTypes. The set ofall non-objects is called Nobj. The complete set of values thatmay be manipulated in the Core Object Model is described as DVal = Obj» Nobj. DVal can be thought of as thedenotable values in the Core Object Model. The elements of DVal are calleddvals. DVal is not a type in the Core Object Model. It does notexist as a supertype of Object and the types in NTypes. Therefore, youcannot specify, for example, an operation parameter that may be eitheran object or a non-object. This eliminates the difficulty of systems havingto provide run-time discrimination of objects and non-objects.
The remainder of this section deals primarily with objects. Unless otherwisenoted, when this chapter refers to type it means object type.
5 In the sense that objects have been defined inthe Core Model.
6 Examples of non-objects are the basic and constructedvalues as defined in the CORBA specification.
OMG CORBA IDL
See entry under 7. Types and Classes.
ODMG
Literals are immutable objects - either atomic (integer, float, Boolean,character) or structured. Structured_literals have two subtypes - Immutable_Collection(bit strings, character strings, and enumerations are built-in) and Immutable_Structure(date, time, interval). Additional subtypes can be defined, but operationson the built-in literal types cannot be redefined. The literal types areexpected to directly map to types in the programming language. If the languagedoes not have an analog for one of the literal types, the type must bedefined in a library provided as part of the language binding.
EXPRESS
EXPRESS supports literals of all of the primitive types (integer, string,etc.), as well as enumeration literals.
Open Distributed Processing
Only objects are addressed, of which literals could be considered aspecial type of object.
Management Information Model
Abstract Syntax Notation One (ASN.1) [CCITT X.208] is the formal notationused to abstractly describe the syntax of information structures to beexchanged between managing and managed systems. It enables the definitionof types of information that need to be transferred using the CMISE services.The information model and the information associated with specific attributes,actions and notifications are definitively described using ASN.1. The full,detailed set of requirements for the operations interface, therefore, includesnot only the textual descriptions of the information model and the specificinformation of Actions and Notifications, but also their ASN.1 definitions.
The ASN.1 definitions used in a document that defines a management informationmodel using the GDMO templates are found in ASN.1 modules. ASN.1 modulescontain both type references and value references. In the GDMO templates,type references are used to define the syntax of attributes (includingpermitted values and required values which are subtypes of the attributetype), action information and reply syntax, notification information andreply syntax, and parameter syntax. Value references are used to definespecific values of defined ASN.1 types. In the GDMO templates, value referencesare used to define attribute default values and attribute initial values.
SQL3
In SQL3, literals are used to specify non-null values. The rules forforming literals for the various built-in types are contained in the draftstandard [ISO96a]. ADTs do not have literal values. Row type literals areformed by concatenating values for the individual columns, as in:
CREATE TABLE employees (name CHAR(40), address ROW(street CHAR(30), city CHAR(20), zip ROW(original CHAR(5), plus4 CHAR(4))));
INSERT INTO employees VALUES('John Doe', ('2225 Coral Drive', 'San Jose', ('95124', '2347'))));
Matisse
Attributes values in Matisse can be literals or sets of OIDs. The usercan define constraints on literals which will be enforced by the database.Literals include the following types:
Characters
ASCII characters
Arrays
Lists
Floating point numbers
Lists of floating point numbers
Double precision numbers
Lists of double precision numbers
Strings
ASCII strings
String arrays
ASCII string arrays
String lists
ASCII string lists
Arrays of 8, 16, and 32 bit words
C++
C++ supports all the value types provided by C, in addition to objects(instances of classes).
OOCOBOL
Ordinary COBOL literals are supported.
Smalltalk
There are five types of literals in Smalltalk. Those literal types are:
Eiffel
Eiffel supports literals for the basic class types: INTEGER, STRING,REAL, CHARACTER and bit sequences. There is also a manifest form for ARRAY.
Emerald
As noted under 2. Objects, Emerald objects may be defined asbeing immutable.
System Object Model (SOM)
SOM literal types are characters and integers.
Analysis and Design Methods
This concept seems to belong to languages and software construction,rather than to analysis and design.features matrixintro page