Home|News blank.gif
When Design Matters CoreLinux++ CoreLinux Consortium
blank.gif
CoreLinux++
blank.gif
Goals
blank.gif
Developer's Corner
blank.gif
Contacts
MetaClass Class
CoreLinux++ Functional Requirement Document
Revision $Revision: 1.12 $
Last Modified : $Date: 2000/10/07 17:14:34 $

Title : MetaClass Class

Requirement ID: 10658
Analysis References: Use Case Report, Analysis Diagrams 
Design References: Class Report, Design Diagrams
Cross References:

1. Introduction

An Object Oriented program performs computation as a result of the interaction of its object instances at run-time, and in the simplest Object Model, instances have meaning only as object instances at run-time and classes exist soley as an abstraction at compile time.

A more sophisticated Object Model enables the run-time objects to make use of class type information, and in a pure Object Model, this information is provided by a run-time object for each class. Each class object provides a description of instances of it's class. Every object must be an instance of some class, so it is necessary to define meta-classes that are instantiated as the class objects.

Meta-classes were originally introduced for languages such as CLOS and Smalltalk to assist in the construction of instances whose layout was entirely defined at run-time. More efficient languages, such as C++ or Eiffel, define object layouts at compile-time and compiler writers have no need to provide meta-classes. The available facilities in C++ are limited but they do exist.

Therefore a meta-class instance is used to capture (model) the type information about a class, and subsequently, it's instances. For example, we can consider that "aaaaa" is an instance of a ascii string, and that string is of type MetaTypeAsciiString. Within MetaTypeAsciiString we can convey information about constraints (upper and lower bound, each character is 8 bits, must terminate with null, etc.) as well as it's relationship to other types. In the example, MetaTypeAsciiString can be modeled as a child of MetaTypeString.

MetaType objects are codification of the class of a class. The behavioral semantics of a MetaType are that of knowledge representation (KR) concepts, and as such support general reasoning capability.

1.1 Deliverables Overview

The participants in the MetaClass Class type include:
Entity
Entity are the first class application/library classes that has an association to it's type (MetaType class).
MetaType
MetaType is the unique instance of a meta-class which carries information about a entity class. There is a one to one relationship between an entity class and a MetaType class instance.

The deliverables in libclfw++ will be:

  1. MetaType

    This is the declaration and definitions for the MetaType class

  2. A MetaType ontology

    This is the run-time hierarchy of MetaType class instances

  3. The root of the ontology MetaType class instance called "MetaTypeRoot"

    This will serve as the hierarchical root for all other MetaType types.

  4. The basic meta-class MetaTypeNumber shall be defined as a TypeOf MetaTypeRoot
  5. The basic meta-class MetaTypeReal will be defined as a TypeOf MetaTypeNumber
  6. The basic meta-class MetaTypeUnsignedLong will be defined as a TypeOf MetaTypeReal
  7. The basic meta-class MetaTypeLong will be defined as a TypeOf MetaTypeReal
  8. The basic meta-class MetaTypeInteger will be defined as a TypeOf MetaTypeLong
  9. The basic meta-class MetaTypeShort will be defined as a TypeOf MetaTypeInteger
  10. The basic meta-class MetaTypeCharacter will be defined as a TypeOf MetaTypeString
  11. The basic meta-class MetaTypeString will be defined as a TypeOf MetaTypeRoot

2. Functional Requirements

The MetaType class requirements:

  1. MetaType shall shall require all constructors to support a unique identifier for the MetaType instance,
  2. MetaType shall store a immutable unique character string called Name, which is the name of the MetaType class,
  3. MetaType shall support URI format for Name,
  4. MetaType shall store a immutable character string called ClassName, which is the name of the C++ Class the MetaType represents.
  5. MetaType shall support null as the ClassName.
  6. MetaType shall support URI format for ClassName,
  7. MetaType shall support a mutable character string called Description,
  8. MetaType shall support an associative collection to other MetaTypes to realize hierarchical specialization, called "TypeOf",
  9. MetaType shall support adding one or more MetaTypes to the TypeOf associations,
  10. MetaType shall have the default MetaType: MetaTypeRoot as a TypeOf association,
  11. MetaType shall support removing one or more MetaTypes from the TypeOf association,
  12. MetaType must put MetaTypeRoot as the TypeOf association default if all others are removed,
  13. MetaType shall support boolean 'isType' comparison against other MetaType instances,
  14. MetaType isType comparison will compare itself against the other MetaType instance
  15. MetaType isType comparison will not compare the other MetaType instance against it's TypeOf associations,
  16. MetaType shall support boolean 'isTypeOf' comparisons with another MetaType instance,
  17. MetaType isTypeOf operation will, if isType is false, compare up through it's parentage, as defined by TypeOf associations,
  18. MetaType shall support non-destructive iteration over the TypeOf association,
  19. MetaType shall support the addition of attributes,
  20. MetaType shall support the removal of attributes,
  21. MetaType shall support the non-destructive iteration over it's attributes

The MetaType ontology requirements:

  1. Ontology shall view MetaTypeRoot as the base most type (Thing)
  2. Ontology shall support the addition of new MetaType instances
  3. Ontology shall insert MetaTypeRoot as the TypeOf association to newly added MetaType types
  4. Ontology shall maintain a dictionary of MetaType Name to MetaType instances
  5. Ontology shall support removing MetaType instances
  6. Ontology shall not allow removal of the MetaType MetaTypeRoot

The Entity requirements:

  1. Entity shall require a static accessor to it's MetaType class
  2. Entity shall support isTypeOf operations with other MetaType class

2.1 User Interface Specifications

Domain defined

2.2 Product Services

Domain defined

2.3 External Interfaces and Database Requirements

Domain defined

2.4 Error Handling

Domain defined

2.5 Foreseeable Functional Changes and Enhancements

3. Non-Functional Requirements

Precondition constraints: None

Postcondition constraints: None

Invarient constraints: None

3.1 Performance Requirements

NA

3.2 User Documentation and Other User Aids

This Document

Analysis Use-Case diagrams

Design class diagrams

3.3 Development Requirements

Standards: CoreLinux++ C++ Standards and Guidelines

3.4 Foreseeable Non-Functional Changes

NA

4. Remarks and Guidelines for Later Life Cycle Phases

TBD

5. Term Glossary

TBD
Copyright © 1999, 2000 by CoreLinux Consortium
This material may be distributed only subject to the terms and conditions set forth in the Open Publication License
Contacts
- contact the webmaster
News
Powered / Hosted by

SourceForge.net
Contributor
NoMagic, inc.
thanks Gary!
Cool OO Sites
cetus
corba
omg
patterns
  Made with xemacs / php Comments to webmaster blank.gif