COORDS: What is it?
C/C++ Object-ORiented Data/Development/Design System.
Purpose: Extend C++ with run-time defined types and objects
Sample applications:
- data exchange with arbitrary data schemas using object-oriented techniques (e.g., data exchange translators: IGES or STEP)
- platform for new level of CAD/CAM tools: parametric, user-extensible object-oriented CAD/CAM.
- run-time testing/ operating interface for virtually any C++ application
COORDS can be characterized as:
- upward compatible to C++ (base types are C++ classes)
- object-oriented type/attribute modeling at user level
- data oriented (no recompile of system needed)
- all entities, including primitives are types
- minimal uniform types/classes
- run-time data type definitions (metadata)
- run-time defined member access
- application accessible/modifiable data model
- Seamless C++ extension to run-time type definition and modelling for data attributes.
- Interchangeably use both compiled types and run-time constructed types (e.g. point, line, etc.) Instances may have other types as attribute values along with so-called primitive data values (integers, floats, strings).
- Primitives are included in the type system through the use of proxy supertypes (subtypes of "PRIM" such as INT, FLOAT...). All values are typed through their supertype or if none, by themselves, so primitive values can be efficiently stored as immediates while retaining run-time typing. Such immediates are in turn considered proxies for their "theoretical" non-primitive type.
- Use a minimal C++ class library as the base kernel for all
applications with each class implementing a COORDS data type. TYPE is
the root class. The principal types are:
TYPE -- root type ATT -- attribute type SPACE -- space in memory BAG -- memory addressable by word AGG -- consectutive 'type' addressses ALIST -- list of atts for a type COORDS -- COORDS interpreter type PRIM -- root for 'primitives': INT, REAL... ...
- Give the C++ kernel classes status as run-time COORDS types.
- Make the data components of all COORDS data types (including
the kernel) self-describing. A language powerful enough to describe
a broad class of data models should be powerful enough to describe
itself. All COORDS kernel classes define an ATT for each of its
attributes (member data as well as functions). A type's attributes
(using ATT) are kept in collections (using AGG). In bootstrap
fashion, TYPE is actually built using its subtypes. This is the
inspiration for the Klein Bottle logo!
- Provide a minimal run-time data schema definition and manipulation language, "DataTalk", both for expressing any given data schema, and instance data models and accessing either's components. Used interactively, this facility also serves as a generalized browser and application interface.
DATATALK - Run-time type interface language
DataTalk is inspired by the SmallTalk object-oriented operation of accessing an attribute (or sending a message) to an object:
Object Attribute [arguments ... ]
They are accessed or set uniformly using the attribute name. Setting an attribute only requires adding a colon and the value, which must conform to the attribute's previously defined type. There is no distinction between attributes and functions except the possible need for arguments.
Although actually imperative, DataTalk has a declarative flavor. In the example below, the effect is to define a new type "cartesian_point" and then a point instance "aPoint." Note, "Def" is an attribute (function) taking two arguments, attribute name and type.
point Type: cartesian_point Def x REAL Def y REAL Def z REAL cartesian_point Type: aPoint x: 3.4 y: 5.2 z: 9.3
In COORDS types, all attributes whether type or data values or functions, are internally represented and externally accessed in a uniform way, an object-oriented principle called "abstraction." Both C++ defined class types and dynamically defined types may be used interchangeably for subtyping and member access.
The COORDS kernel classes are sufficient to permit general modelling of a wide range of data schemas without further extension. Additional classes may be added to create special applications. Also, it is possible to take a dynamically defined type and recast it as a compile-time C++ class (similar to the other base classes) to add speed and security to an application.
The DataTalk facility is provided by the COORDS type which serves as an interpreter model. Its subthypes can be used either interactively or in batch mode. By interpreter, we do not just mean how it is implemented internally, to read source text, but also, that the "COORDS" (sub)type functions as an intermediary (i.e., translator) between the external user and the run-time COORDS types (both kernel and user defined). It understands DataTalk syntax, passes along messages to its current receiving type object, and then returns any response.
For the theoretically minded, we note that COORDS has what is called a "Type: Type" or second order type system, where all types are also values (and more radically, all values are also types!) The distinction between instance and subtype then becomes one of usage only.
We hope this brief overview gives some flavor of COORDS. A new version of COORDS called PLATO is currently under study.