Background of the Invention
The present invention relates to a process for manipulating data models for the transfer of these data models among a plurality of software engineering tools and the application of transformation rules to a model, wherein the data models are transformed by means of gateways which make it possible to convert the format of one tool into the format of another tool by passing through a unique neutral intermediate format.
Field of the Invention
Generally, the basic desire common to users or designers is to seek interoperability between software tools so that it is possible to exchange, in the form of data models, information relative to the development of applications among heterogeneous development tools used in their own environments. In particular, the transfer of data models can be a valuable aid for enabling, for example, the migration of applications among software engineering tools or between an existing software engineering tool and a new development tool for a client/server model, or the management of development information, in the form of data models, for example in what is known to one skilled in the art as a "repository." With the utilization of such tools being more and more common, it can be desirable to manage, import or transfer export files from one or more of the software engineering tools on the market, thus making it possible to design or analyze information models. However, in the current state of the art, various drawbacks arise. In effect, each tool has its own internal formalism and a private or specific way of representing objects, storing information, etc., so that two tools cannot communicate or exchange information directly.
The solution used most recently to avoid these drawbacks consisted of developing for each tool, and from tool to tool, what are known to one skilled in the art as "gateways", that is, interfaces whose role is to make it possible to convert the format of one tool into the format of another tool. Thus, in order to allow a dialogue between tools, it was necessary to develop for each tool a number of gateways equal to the number of tools with which it was desirable to communicate, and when a new tool appeared, it was necessary to develop for each tool a specific gateway for allowing a dialogue with the new tool. Obviously, this solution has the chief drawback of requiring the creation of as many gateways as there are possible tool combinations, which quickly becomes prohibitive in terms of cost and development time. This is true even when dealing with a relatively limited number of tools. For example, in order to allow a dialogue between 4, 5 or 6 tools, respectively, it would be necessary to develop 6, 10 or 15 gateways, respectively.
In order to eliminate this drawback, at least partially, a solution was conceived which consisted of developing gateways which were just as specific, but designed to make it possible to convert the format of one tool into the format of another tool by passing through a common intermediate format which is neutral, and therefore unique, creating a neutral hub information model which serves as an exchange kernel. This concept of neutral representation using this hub information model, in which all the gateways pass through this exchange kernel, makes it possible to reduce the number of gateways significantly, particularly when the number of tools to be connected is large. Thus, using the preceding example, in order to allow a dialogue between 4, 5 or 6 tools, respectively, it would only be necessary in this case to develop 4, 5 or 6 gateways, respectively, or one gateway per tool for accessing the exchange kernel and converting the format of the tool into the common intermediate format. With this type of solution, a proprietary approach providing easy portability was selected. This approach provides the portability from specific written and interpreted languages that were developed. The languages were compact, easily controlled and functionally customized were developed to fulfill this functionality. In effect, porting is simplified significantly in this closed world, since only one program has to be interpreted. However, this solution, although advantageous, also has its drawbacks. A first drawback is inherent in the fact that an interpreted language is not very fast, since the interpreter must analyze this language in order to be able to execute the actions described. A second important drawback in using a proprietary language of this type is that it does not make it possible to apply the concept of reusable components. In effect, when it is desirable to develop a new gateway, it is necessary to rewrite the entire code in this specific language. Moreover, such languages generally suffer from a poor development environment (no libraries of reusable functions, no debugging tool or "debugger," etc.).
Summary of the Invention
The object of the present invention is to eliminate the various drawbacks of the different known methods of the prior art and to provide a process for manipulating data models which, by virtue of the judicious choice of language used, offers substantial flexibility and great speed of execution, is easily expandable and makes it possible to apply the concept of reusable components, while offering a high level of portability and performance and a low cost.
To this end, the process for manipulating data models mentioned in the preamble is remarkable in that the development of the gateways, in accordance with the so-called object-oriented approach, is carried out in an executed language, the gateways being executables which allow the transformation of a data model in several steps activated successively, in a systematic or conditional way, by means of a command language which describes a logic for dynamic concatenation of the steps, concatenation being a named, parameterized procedure, each step being an executable whose code is developed from an array of reusable classes, and the activation of a procedure requiring simply that the name and the parameters of the corresponding procedure be supplied.
Thus, according to the concept of the invention, it was decided to use an executed language, adopting an object-oriented approach in spite of unfavorable preconceptions by light of which proprietary languages developed in a specific way were considered to authorize easy portability and to favor the strict functional adaptation deemed necessary. Contrary to this preconception and to the known approaches of the prior art, it was decided to use a known standard language which was more flexible, preferably compiled directly, whose memory management is more precise and more efficient, such as the language C++, for example. Moreover, a language of this type has a very high level of abstraction and, when used with adequate libraries, makes it possible to increase efficiency and speed, and to provide an advantageous genericity, since the same structure can be reused in different contexts, thus favoring the reusability and compatibility factors. Another advantage is that this type of language can be easily debugged by means of a corresponding debugger, making it possible to further reduce the development time for the gateways. Finally, the choice of a standard language for which a large number of products and users exists cannot help but ensure a quality environment.
Thus, in order to execute transfers from one tool to another or from one model to another, there are several existing components designed to allow the execution of the code of a gateway, and each gateway is in fact developed like an object-oriented program constructed with the aid of libraries of reusable classes. These classes are used to develop different gateways, bearing in mind a gateway can be constructed in several phases, for example, a phase for physically decoding the files through recognition of the codes and thus of the syntactic elements in the import file, followed by a phase for coding the transformation, in which the elements corresponding to the syntactic elements in the neutral information model are found or created, and possibly also an integrity checking phase. Each of these phases constitutes a reusable module, and all of the modules can be dynamically concatenated, not like a program but according to a sequence of procedures to be applied. For this purpose, the list of the modules to be dynamically concatenated is described with the aid of what is known to one skilled in the art as an "operation definition file", while what is known to one skilled in the art as a "task manager" searches for the modules among the executables containing the reusable procedures in order to execute them and thereby construct the gateway, taking into account the configuration parameters for the adaptation of this gateway. All this information can be stored in a persistent space, for example a disk, while the intermediate results are held temporarily in memory. Furthermore, the task manager also makes it possible to select the optimal execution order when more than one appropriate procedure and/or executable exist simultaneously. In fact, for example, several copies of different procedures may be available, in which case the task manager automatically selects the sequence of modules and the procedure class which minimizes the loading of the executables, making it possible to optimize the execution time.
The process for manipulating data models therefore activates reusable components, making it possible to develop gateways rapidly. Remarkably, in order to develop a gateway, a reusable class is created which makes it possible to represent the models and metamodels stored in memory in a repository or in an external file by using a dynamic allocation of modeling objects, the objects in this class integrating an array of memory structures and supplying functions for manipulating the data of a model loaded into memory.
Generally, the data can be stored in different forms, formats and locations. Preferably, in order to simplify the manipulations, the following mechanisms are preferred:
a mechanism which makes it possible to read, write and analyze the tool export files, which are user data files generated by a tool in a proprietary format,
mechanisms which correspond to objects, for example C++ objects, each of which encapsulates or integrates an array of memory structures and supplies functions for manipulating data models loaded from tool export files and/or from a repository, the use of these objects and the functions for manipulating these objects constituting a reusable class. Preferably, the organization of the data in a model is based on a metamodel loaded at the moment these classes are created, the metamodels being loaded at the moment of execution from text files known as metamodel files. A class of this type can be loaded with a tool metamodel or can be loaded with a metamodel of the neutral information model, since both types of objects are used during the execution of the gateway,
a mechanism called a neutral data file, which is a text file containing data which have been mapped with data in the neutral information model, which mechanism is used for the transfer of data between different executables or for permanent storage on a disk,
a repository in which a user's data can be stored using schemas which represent the neutral information model and can be generated by tools of the repository (for example, management of versions, requests, etc.).
Thus, with the gateways, the data can be moved and manipulated from one location or storage mechanism to another and/or from one form to another. Three examples of gateways may be given: import, export or transfer gateways. The use of an import gateway makes it possible to extract data from an export file of a tool in order to place them in the repository, while the use of an export gateway makes it possible to extract data from the repository in order to create a tool export file. The use of a transfer gateway makes it possible to import data directly from one tool export file to another without passing through storage in the repository. Of course, there are other types of operations in which the object is not necessarily to move or to code the data, but which make it possible to process the data loaded into memory at a given instant. All these operations require the capability to load data into memory, to manipulate and to write the data while storing them in a persistent way, which operations are feasible due to the existence of the reusable classes and the functions claimed herein. A certain number of operations require the creation of multiple objects and involve conversions or codings between various objects. For example, when data are extracted from a tool export file, an executable makes it possible to analyze this file syntactically and to create an object which contains the data in the export file, but structured so as to correspond to the metamodel of the tool. Next, the data specific to the tool are converted into general data according to the neutral information model, which involves the conversion of this object into an object which corresponds to the neutral information model. The data stored in this way can be processed and eventually saved in a neutral data file (if the data must be communicated to another executable) or stored in the repository.
Consequently, the gateways make it possible to access the data models and the definitions of metamodels stored in memory, the objects of the models being dynamically allocated in memory. After the loading of the metamodel, a model is constructed using the template of the metamodel. The model arrays have a structure similar to that of the metamodel arrays, which allows rapid mapping between objects and between definitions of the properties and their instances.
Equally characteristically, in order to develop a gateway, a reusable class is created which makes it possible to code and decode different tool export file formats, which class encapsulates the tool export records and is used to describe the record formats of an import file, whereas upon initialization, while the metamodel of a tool is read from a text file with the aid of the class for representing the models and metamodels stored in memory, the code of the gateway makes it possible to read the tool export file, to access the member fields of the records and to create the objects and their properties using the functions of the class for representing the models and metamodels stored in memory.
In effect, the programming languages, including the language C++, do not make it possible to directly manipulate structures containing several variable fields. The solution proposed herein is to use record declarations in the form of a series of field descriptors. The programmer defines fixed and variable field sizes, record-type codes with constants for values, and separator values. In the processing code, the programmer first calls functions which make it possible to map a record with its descriptor, then accesses the fields of the record. In order to create a record of the export file, the programmer fills the member fields of this record from the data of the module, then writes the record in its entirety. The description of the record comprises, for each field, the name, type and size of the information at the moment of execution. The description information, like the data, can be displayed for debugging.
This class as claimed makes it possible to define macros for the construction of record descriptors and function prototypes for mapping a register with a record description, by supplying data from a field in a record, setting data in a record field and supplying a complete record for the extraction.
Thus, this reusable class advantageously makes it possible to perform different operations on different tool export files, which files are read and written by means of components of the gateway.
Finally, and equally remarkably, in order to develop a gateway, a reusable class is created for manipulating character strings, making it possible to handle the allocations, the concatenations and the comparison operators with the substring and dynamic memory reallocation functions, while preserving compatibility with the character strings of a c-type language.
Thus, this reusable class provides a practical technical solution by offering a type of data specific to character strings, which has a behavior comparable to that of the predefined data types in C language. This class has another characteristic of great importance, in that it makes it possible to prevent any loss of information generally associated with losses of storage blocks.
Brief Description of the Drawings
The following description in reference to the appended drawings, given as a non-limiting example, will make it easy to understand how and in what environment the invention can be implemented.
FIG. 1 gives an example of the interoperability according to the present invention among various software engineering tools.
FIG. 2 represents an architecture in which there are various components which make it possible to implement the invention.
Description of the Preferred Embodiments
FIG. 1 shows, in a schematic way and in conformity with the concept of the invention, the advantageous interoperability possible in a set of software engineering tools Ta, Tb, Tc, Td, etc., which tools exchange information in the form of data models, for example related to the development of applications. The tools Ta, Tb, Tc and Td are heterogeneous development tools, each of which is used in its own environment and with its own dictionary. The transformation of data models among these four tools is carried out by means of gateways such as Ba, Bb, Bc and Bd which make it possible to convert the format specific to one of the tools Ta, Tb, Tc, Td into the format specific to one of the other tools by passing through a unique neutral intermediate format, the neutral information model NIM. More precisely, the information exchanged passes through the export files of these tools, which thus transmit the data to or receive it from the model NIM, which is consequently the hub model. The data which instantiate the neutral information model NIM are stored in a base of data objects called a repository.
FIG. 2 offers an example of an architecture in which there are various components which make it possible to implement the invention, among which components are interfaces, controllers, storage mechanisms, configuration files, control-type sequences (scripts in the executed language according to the invention), gateways, and the repository. This environment may be considered to be a development toolkit. Every action of this toolkit is controlled by a control class CC, also called a programmer interface class, which class makes it possible to organize the environment for the transfer of data and to call the appropriate procedures. Developers of interfaces for displaying a workstation WS on the screen, such as the graphical user interface GUI, the command line interface CLI or any other interface, use the control class CC exclusively. This class CC contains the functions of the application interface (API) which makes it possible to call the gateways and to initiate any command. It is recalled here that a gateway is a specific mechanism for authorizing the movement of data from one location to another and their manipulation from one form to another, and that there are, among others, three types of gateways: import, export and transfer gateways. The control class CC is parameterized by the configuration files CF and the control-type sequences CS (scripts). The data can be loaded into memory in different forms and formats and at different locations. Four storage mechanisms can therefore be used, each of which has its own utility and its own set of associated services; these are the tool export files TEF, the neutral data file NDF, the repository R and a mechanism D for the dynamic allocation of model objects. A tool export file TEF is in fact a user data file generated by an external tool in the proprietary format of this tool; this file TEF can be read, written and analyzed using the means of the invention. A neutral data file NDF is a text file which contains the result of the modeling, according to the neutral information metamodel, of the model imported and initially structured according to the metamodel of the tool. This file NDF is an ASCII representation of this neutral representation of the model. Services for reading and writing the neutral data file NDF are provided according to the invention. A neutral data file makes it possible to transfer data related to C++ objects of an executable into C++ objects of another executable, while avoiding any loss of data. As for the repository R, it contains a schema which makes it possible to implement the neutral information model. A user's data can be stored in the repository in the format of the neutral information model and then managed and manipulated by tools of the repository which include the management of versions, requests, etc., while services are provided for storing data in or extracting them from the repository. A neutral data file NDF can also be stored in the repository like an object with its contents. The mechanism D for dynamically allocating model objects, which is also a strong point of the invention, provides an array of C++ classes used to represent data models in a totally generic way, and in the way specified by the data of the metamodel loaded at the moment of execution. A metamodel is loaded from a text file called a metamodel file and is stored like a C++ object. A user's data, which are then stored as C++ objects, are mapped in the associated metamodel. It must be noted that the neutral information module is a metamodel designed to be complete enough to make it possible to capture most of the concepts of all the tool metamodels. A C++ object which is loaded with the metamodel of the neutral information model is in fact a central or hub storage format from which any other storage format can be generated. The dynamic object allocation mechanism D contains all of the classes necessary for the implementation of the invention just as it contains all the metamodels MTa, MTb, . . . , NIM MT.
The four storage mechanisms--TEF files, NDF files, repository R and mechanism D--are directly connected to a gateway and operation mechanism OBM, which is also connected to the control class CC.
As indicated previously in connection with FIG. 2 and specifically in connection with the gateway and operation mechanism OBM, in order to execute transfers from one tool to another or from one format to another, there are several components designed to make it possible to execute the code of a gateway, each gateway being in fact an operation developed like an object-oriented program constructed with the aid of libraries of reusable classes. These classes are used to develop different gateways Ba, Bb, Bc, etc., bearing in mind that a gateway can be constructed in several phases, for example, a phase for physically decoding files through recognition of the codes and thus of the syntactical elements in the import file, followed by a phase for coding the transformation in which the elements corresponding to the syntactical elements in the neutral information model are found or created, and possibly also an integrity checking phase (mechanism IC). Each of these phases constitutes a reusable module, and all of the modules can be dynamically concatenated, not like a program but according to a sequence of procedures. For this purpose, the list of the modules to be dynamically concatenated is described with the aid of what is known to one skilled in the art as an operation definition file ODF used by what is known to one skilled in the art as a task manager TM, which will search for these modules among the executables containing the reusable procedures, in order to execute them and thereby construct the gateway, taking into account the configuration parameters for the adaptation of this gateway while allowing, as explained previously, an advantageous reduction in the execution time. All these parameters can be stored in a persistent space (CS), while the intermediate results are held temporarily in memory. The process for manipulating data models thus activates reusable components which allow gateways to be developed rapidly. It is possible to execute operations other than gateways, such as "standalone operations", which are operations in which the data are not necessarily moved or converted, for example integrity checking IC or name conversion services NCS.
For a better understanding of the concept of the invention, several definitions and descriptions of possible but non-limiting uses of various classes claimed by the present invention are offered below.
First, definitions of classes relative to the organization of "scripts" and to the configurations are offered, bearing in mind that a component of an application is a program which supplies an interface to a user of the environment of the invention, which may be any type of interface. The application instantiates an object of the control class (TsControl Class) on behalf of the user, then calls its functions in order to know which operations are available to this user. The user can either choose from among these operations and supply information as to the way in which these operations must be executed or specify predefined control "scripts" which contain these instructions and information. When the application allows it, the control class (TsControl Class) can also be used to create these predefined "scripts".
The control class (TsControl Class) is used to configure and initiate the operations in the environment of the invention. The application uses the functions for reading and writing the control "scripts" and creating the list of possible operations. The keyword values can be defined using the functions "set" and "get", and actions can be activated using the function "do". Some of these functions are generic when the user specifies the keyword or the operation to which the function is applied, whereas most of the functions are specific to known keywords or operations. The latter functions are designed to be used with an appropriate interface and the code of the component of the application.
The class SysConfig is a class specific to the configuration file in the environment of the invention. Instantiation makes it possible to set the path name of the configuration file. This class can be used in two ways.
In the first way, during installation, an executable called by means of a special indicator and the path name of the configuration file instantiates this class and calls the static function "SysConfig::AppendLocalConfiguration()" which has only to call the current configuration table of the executable (from a static table) at the end of the file. All information for the current executable which existed in the file previously is deleted.
In normal utilization, the class SysConfig has a function "SysConfig::LoadFile()" for recording and analyzing the configuration file and creating the data structures of the executable, group, method, etc., which represent what exists in the present installation. The function LoadFile() also verifies that the configuration of the current executable corresponds to what is in the configuration file. A series of functions "SysConfig::Find . . . ()" offers quick access to the structures of the system for the retrieval the configuration information.
The class OperCtlScript is a class specific to the control scripts of the environment of the invention. Instantiation makes it possible to set the path name of the control script. The function "OperCtlScript::LoadFile()" is used to record and analyze the control script by creating a list of operations to be executed with the corresponding lists of keyword definitions.
The function "OperCtlScript::SaveFile()" is used to retrieve the definitions and commands from a control script. This class also contains functions for the execution of commands and for the configuration and calling of the next executable.
The class TsDef is used to store and retrieve the keywords and the values of a control script.
The class TsKwdInfo is used to store and retrieve the keywords and request the identifiers of a configuration file. One object of this class also stores a pointer to the object TsDef which contains the current value (most recent definition) of the keyword.
The class TsGroupInfo is used to identify a group and its associated methods.
The class TsExecInfo is used to identify an executable and its associated groups.
Definitions of classes relative to the representation of models and metamodels stored in memory and to the dynamic allocation of modeling objects are offered below. The mechanism used (called mechanism D in FIG. 2) makes it possible to store a metamodel definition and a data model in memory, for access by the components of the gateway, by dynamically allocating the objects of the model in this memory. This mechanism makes it possible to load a metamodel and then construct a model using the template of the metamodel. This type of construction advantageously allows rapid mapping between the objects, the property definitions and their instances. The mechanism D has private hidden classes and public interface classes. In order to store and access the data in the objects, a program uses functions of the public interface classes TsOBJ and TsLNK. The addressing objects use indexes in a tree of a pointer array for an object or link class, an object instance, a property type and a line list of the value; the object or link class and the property type can be given as text names which the interfaces map with the index values. In addition to the pointer arrays for direct access to a hierarchical view of the data, the mechanism D has index arrays ordered by the property-key values of the corresponding objects, which supply rapid access (dichotomizing search) to the objects selected and allow the display of objects ordered by field-keys.
The "constructor" of the mechanism D calls the function readMetaModel in order to read the file of property and object definitions. This routine creates an object class definition for each type of object, inserting the object class definition address into the object class array ordered by class name. The mechanism D supports inheritance. Moreover, it inserts each property into a property array ordered by property name. Once the objects and the properties are defined, the object class index and each object class property index are frozen, ready to be used to construct a model.
A tool constructs and manipulates a model (neutral information tool or model NIM) in this mechanism D. When it is called to set a property value, the mechanism D executes the following steps, which are optimized when the names are already mapped with index values and when the objects created on request already exist:
search for the name of the object type in the object class array in order to read the index clNdx,
at the position clNdx in the model object array, find or create the element for the object instance array and allocate a new index objNdx,
create a new object and store its address in the object instance array,
search for the property name in the property definition array to find the index propNdx,
at the position PropNdx in the object property instance array, find the address of the property value or create a new one and store this address there,
search for the line number in the list of property values, and if found, store the value in the property value object; if not found, create a new property value and insert it into the list,
index the property instance array to find where to store the property value pointer,
by storing a primary or secondary property-key value, insert or update the index objNdx in the corresponding index table ordered by the key value.
The property instance array is a concatenation of the current and former class property pointers.
The classes TsDynamo, TSOBJ, and TsLNK define the user interface for access to the mechanism D. The class TSOBJ makes it possible to index the class, the object, the property and the line by supplying an addressing mechanism in the objects of the mechanism D. The class TsLNK carries out the addressing of the links of the mechanism D. The interface of the mechanism D offers the user a scope of application (data modeling) and hides the pointers, the structures and the C++ memory allocation. The TSOBJ iterators loop all the object classes or all the occurrences of an object class or all the properties. A program can scan a model or select a part or a sub-tree of objects and properties. The TsLNK iterators (derived from the TsOBJ iterators) loop the links. A program can scan a model by running through the links between objects. A link can have properties since it inherits this possibility from the class TSOBJ.
The class TsDynamo has objects (C++ objects will hereinafter be referred to as dynamo objects) which designate a metamodel and a model in the process of being manipulated. An object TSOBJ designates a dynamo object and contains the indexes of a position in the model. The position of an object TSOBJ can be set by class and property names in character strings and/or by index values. This makes it possible to combine the multi-purpose quality of the names during execution with the efficiency of using subscripts. The index values equal to 1 correspond to default values.
In the class TsOBJ, an object TsOBJ is a pointer for addressing objects in a dynamo object. The functions TsOBJ make it possible to access dynamo objects by indexing the pointer table using some or all of the values Ndx.
TsOBJ constructor with names of classes and properties
Constructor of TsOBJ copy
TsOBJ(TsOBJ& c);
TsOBJ Destructor -TsOBJ(){ }
Functions for addressing the dynamo objects via TsOBJ
Functions for setting and reading the values of objects and properties in a model
int setObj(const char* aClass, int aObjNdx=1);
int setProp(const char* aProp);
int setValue(const char* aProp, int aLineNbr, const char* aValue);
int setValue(int aLineNbr, const char* aValue);
int setValue(const char* aValue) {return setValue(1, aValue);}
int setValue(TsStrList* aValue);
TsStr getValue(const char* aObj, int aObjNdx, const char* aProp, int aLineNbr=1);
TsStr getValue(const char* aProp, int aLineNbr=1);
TsStrList getList(const char* aProp);
TsPropType getPropType();
int findObj(const char* aObj, const char* aProp, const char* aValue);
Operator functions for improving the syntax of the gateways
Class index/object index pair for sorting a key property value
In the mechanism D, the classes "Metamodel" represent the neutral information model NIM or the metamodel of the tool in question as a constant structure in order to interpret the data in the model to be manipulated.
Definitions of property definition array classes
Object class definition, metamodel object information
Definition of the object class array
In the mechanism D, the model data classes represent the user's model in the structure defined by the corresponding neutral information model NIM or by the metamodel of the tool in question.
Definition of property value class
Definition of object instance class
The object instance contains a property instance array, it designates the property values
Definition of object key array class
Object key array, object index using a key property
Definition of the object instance array class
Definition of model object array class
A link class definition in the mechanism D is a subclass of an object class definition. A model link is an instance of a link. A link class definition describes the object classes that the links can connect. A link instance specifies the model object instances that are connected to it.
The link objects are derived from regular objects because the links have the characteristics of objects (they have the names and can have the properties), but they also have vectors "to" and "from" and a cardinality. In order to optimize performance, the data elements in addition to the links are coded in C++ language rather than being used like object properties. The sorted index arrays also make it possible to optimize searching.
The constructor of the mechanism D reads the link definitions with the other object definitions from a tool metamodel or from the metamodel file of the neutral information module NIM.
A link contains the object indexes clNdx and objNdx coming from and going to the objects, which makes it possible to find the model objects which are connected by the link. A link definition specifies the objects it can collect, but a real class can be derived from a specified object class, so the links contain the indexes clNdx and objNdx. The links can have properties just as they have objects.
The fact that a link is created between two objects also implies that it is entered into the index array. A link key array is sorted to find all the objects or specific objects that a link type already collects. An object link array is sorted to find all the links or specific links coming from or going to a given object. The link class definition can contain an index propNdx of a property whose value determines the order of iteration through the links of an object. This makes it possible to inspect the attributes of an entity and the sub-fields of an attribute in a specific order. The default sequencing of link index arrays uses the target object key, which facilitates the dichotomizing searches and the ordering of the listings.
The gateway structure which makes it possible to map one model of a metamodel with another actually implements a hierarchy of loops which use iterators to inspect each primary object of a model and then run through its links or use foreign keys to find associated objects. The other operations which modify a model NIM, whether already resident or copied, use this same general type of operation for integrity checking and other housekeeping operations.
Update from a link key array, insertion in conformity with the key property value
void TsLinkInstArray::updateToKey(TsOBJ* at);
Update from a link key array, insertion in conformity with the key property value
void TsLinkInstArray::updateFromKey(TsOBJ* at);
Class TsLNK, interface class
The class TsLNK is derived from the class TsOBJ. The additional capabilities of the class TsLNK relate to searching or navigation between objects in a model by means of links in the metamodel.
Insert current object index into its vector index array void TsvtrKeyArray::insert(TsOBJ* at)
Definitions of classes relative to the coding and decoding of records in various tool export file formats are offered below.
Record descriptors for fields of variable length
The C and C++ languages do not fully support records. They offer character arrays and structures with data elements such as character arrays and sub-structures. After a structure has been declared, the programmer must recode the length information in the procedural code in order to be able to access its contents. Fields of variable length which use separators are typically processed by coding the syntax of the records into the code which executes the syntactic analysis of these records. The advantageous solution presented and defined in the present case is to use record declarations as a collection of field descriptors. First, the programmer defines fields of fixed and variable size and assigns codes with constant values to the record types, as well as separator values. Next, in the procedural code, the programmer calls functions for mapping a record with its descriptor, then accesses the fields in the record. In order to output the information, the programmer calls functions which make it possible to delete the record, fill its fields and then supply the complete record for its output. The record description contains the name, the type and the size of the information at the moment of execution. The descriptive information and the data can be displayed for updating.
With the class TsRec, the file tsrec.h defines macros for constructing record descriptors and function prototypes for matching a register with a record description by supplying data from a field of the record, setting data in a record field and supplying a complete record which allows it to be output.
Thus, the class TsRec can process a large number of files of the mechanism D and tool export files written and read by the components of the gateway.
The header file tsstr.h contains the definitions of the class TsStr which supplies a type of character string data that is particularly advantageous in that it behaves like many types of data integrated in C language. Also of great importance is the fact that it prevents any loss of information generally associated with losses of storage blocks.
The object of the class TsStr is to define a class of C++character strings, making it possible to support the allocations, the concatenations and the comparison operators with the substring and dynamic memory reallocation functions, while preserving compatibility with the character strings char* of a C-type language.
The following are descriptions of classes and files which contain classes used in the environment of the present invention.
Definitions of the input/output class TsFile
The header file tsfile.h contains the definitions of the classes TsFile, TsFileReader, TsFileWriter, TsDataReader, and TsDataWriter. These classes make it possible to encapsulate file input/output operations.
The class TsFile makes it possible to encapsulate calls of the UNIX system (registered trademark licensed exclusively through the X/OPEN Company, Ltd.) which use a file pointer; since the opening and closing of the file are processed by the constructors and destructors, the requestor's task is simplified considerably.
The other classes constructed with this encapsulation offer the possibility of reading and writing a line, and thus an entire file, at the same time.
As for the neutral data file NDF, its format makes it possible to store a model sequentially. The file NDF can represent models in the form of a neutral information model NIM or a tool metamodel. The file NDF makes it possible to save the classes, the objects, the properties and the coordinates of the lines of the representation of a model with the property values.
The objects of the mechanism D (called dynamo objects) have write functions in the file NDF which make it possible to store a model. The capability for editing files NDF on request is useful for generating test data. The format NDF has proven useful for evaluating the results during test executions. Gateway developers can use files NDF to save or evaluate results and continue or restart tests at various intermediate points during the gateway operation.
Input file register for syntactic analysis of text.
Reading of a model NDF, construction of a dynamo object
Reading of file NDF and loading of dynamo object
The constructor is the entire algorithm.
Syntax of the file NDF
In the syntax of the file NDF, the indent indicates a nest. The comment lines begin with "*".
Metamodel of the file NDF
The following format of the file NDF makes it possible to specify a metamodel, a model, and the objects, properties, values and links which constitute a model.
In conclusion, the preceding description of the process for manipulating data models according to the invention, due to the utilization of an executed language (for example of the C++ type) for the construction of gateways instead of a proprietary interpreted language, shows the advantageous technical effects of this process, which is designed to be applied to a new technology allowing the interoperability of a plurality of software engineering tools. Not only can any tool be easily represented by the neutral information model offered, but also any internal model representation can be implemented, allowing a user to retain his own information model for the internal representation of his development data or to use any of the industry standards such as, for example, the data exchange format (CDIF) designed for the various software engineering tools (CASE) associated with a common repository. The process takes full advantage of the characteristic of code reusability, thus making it possible to meet the lead time requirements for gateways of this type, while the development time and cost of these gateways are also quite significantly reduced because the code libraries are reusable. Likewise, it offers a substantial simplification of any procedure for adding new gateway components in order to change and finely adapt a model transfer process to a client's specific needs. Performance is improved considerably due to the fact that the present process can be considered to be the application of a simple and unique executable.
While the preferred forms and embodiments of the invention have been illustrated and described, it will be apparent to those of ordinary skill in the art that various changes and modifications may be made without deviating from the inventive concepts and spirit of the invention as set forth above, and it is intended by the appended claims to define all such concepts which come within the full scope and true spirit of the invention.