SYSTEM FOR DYNAMIC RUN-TIME BINDING OF SOFTWARE MODULES IN A COMPUTER SYSTEM

Abstract: A linked procedure call mechanism for replacing an old software unit (102) with a new software unit (104) without disturbing the ongoing activities of the overall system. The linked procedure call mechanism includes a trader (80) which directs the system execution processes towards either the old software unit (102) or the new software unit (104), depending on when the process was created. Processes created prior to initiation of replacement will continue to use the old software unit (102), while processes created after the initiation of replacement may be directed to use the new software unit (104). When the activities within the old software unit (102) have ended, the replacement is complete and the old software unit (102) can be removed from memory.

Description: SYSTEM FOR DYNAMIC RUN-TIME BINDING OF SOFTWARE MODULES IN A COMPUTER SYSTEM BACKGROUND OF THE INVENTION A portion of the disclosure of this patent document contains material which is subject to copyright protection. The copyright owner has no objection to the facsimile reproduction by anyone of the patent document or the patent disclosure, as it appears in the patent and trademark office, patent file or records, but otherwise reserves all copyrights whatsoever. Field of the Invention The invention relates to the modification of software, and in particular, to the replacement of software in an operating computer system having both old and new versions of modified software coexisting in the computer and simultaneously executable therein. Descrj-ption of Related Art The system of the present invention, a linked procedure call mechanism for dynamically binding separately and simultaneously executable versions of software during operation of a computing system to allow transparent, uninterrupted updating of software, can best be understood by reference to the larger problem of incorporating modified software into an operating computer system. One aspect of computer software is that it must be periodically updated with revisions, additions and/or deletions in order to continue to provide adequate functionality to the user, to optimize the software and to correct errors and discrepancies that arise throughout the life of the software. As new features are added to software, it is desirable to replace the old software with the new versions as early and as easily as possible in order to provide the user with the features of the new software. In certain types of computing systems, such as stand-alone or batch processing systems, changing software from one version to another presents few obstacles. Typically, the computer system is merely shut down during a period of the day when there is little activity and maintenance personnel are readily available. The old software is then simply removed and replaced by the newer version of the software. Thereafter, the computing system is restarted and all future data processing is done with the new version of the software. This procedure, of course, assumes that the new software has been adequately tested and debugged on an offline system to the point that the software personnel and the operational management are confident that it will adequately perform the functions for which it is intended without undue interruptions that may require halting and then re-starting the entire computing system. In other types of computing systems, such as modern stored program control (SPC) telecommunications exchange systems (commonly referred to in the industry simply as "switches"), neither the testing of new versions of software nor the changing of software in the system is as easy as in standalone batch processing systems. For example, new versions of software cannot be effectively tested without being placed into actual operation processing calls. The software must be tested while in operation in order to determine whether the software will adequately function under live operating conditions and whether the new portions will properly interface with all of the other software blocks that form a part of an operational SPC switching system. In addition, telecommunications switching systems are virtually never out of operation. Ideally, these systems would run perpetually, without interruption because of the continuous need for communications services within a community. That is, there is a continuous flow of telecommunications traffic being processed through the system even at off hours of the day or night and any interruption in the operation of the switch results in a disruption of that telecommunications traffic. Such a disruption could be extremely damaging to the system' s operation and its effectiveness, as well as to its acceptance among users or customers of the system. These real-time requirements of telecommunications switching exchanges place severe constraints on both the testing of enhanced versions of the software, or portions thereof, containing new or improved functionality, as well as the substitution of software containing error corrections or "bug fixes" into the switch without disrupting existing telecommunications traffic being processed by the switch. Therefore, integrating new versions of software components or units into the system using the traditional "edit- compile-link-load-run" approach is not desirable. What is preferred is a method that provides the capability to modify or extend the software while the system is in operation, without the need for any downtime. Attempts have been made to solve the problems associated with incorporating new software into operating computer systems. For example, some advanced on-line operational systems in use today that do not operate in a stand-alone or batch fashion solve the problem of replacing old software in a manner that clearly differs from the method used with stand-alone or batch systems. However, such systems still replace software manually, although more transparently than in stand-alone systems, by requiring that individual users or user groups actively select whether or not to process using the new or revised version of the software. This option may be exercised by users by modifying the concatenation of software to be utilized by processes operating under their individual user-id. The option remains available to users during a fixed period of time, usually measured in weeks or months, in which time the software migrates up several levels in the concatenation structure after successfully operating at each prior level without any discrepancies. Upon reaching the top level of the concatenation, the software is declared "operational" and older versions are no longer available to users of the system. Insertion of new software into the system, as well as its migration up the various levels, is controlled by a process of configuration management--a manual process of reporting, approval, tracking software versions at each level and implementing approved changes. Aε with the methods used to update software on batch or stand-alone systems, there are well known drawbacks to incorporating new or modified software into a system in this fashion. It is largely a manual, labor intensive system that is complex and time consuming. It leaves control over whether and in what cases the system will operate with certain new software to the users with no means of performing gradual, restricted, on-line use so that errors do not proliferate or immediately affect all ongoing operations. The method of controlling access to new or revised software is directly linked and limited to the individual user executing the software. In the typical telecommunications system in use today, the problem of changing software or portions of software is even more severe. Although such systems cannot properly be called batch or stand-alone systems, their operation must also be halted whenever a software change is made. The new software is then loaded and the data, along with the old software, is transported to the new software. During the time when this transport is occurring, the system is completely out of operation. This period can last as long as an hour, making it necessary to schedule software changes for off-peak hours of operation. Even so, an hour of downtime in a telecommunications switching system is a very long and costly period because no calls can be processed during this time and any needs for emergency communications during this period cannot be serviced. The problem of changing software during execution within a computing system becomes more complicated when all or a part of the software requires linking. Ordinarily, in such systems, separate portions of the software must be developed and re-compiled separately. Then all the portions that interoperate must be relinked for execution. It is also necessary to create and maintain symbol tables that provide information for all external symbols used throughout the software. The linking process creates the information for storage in the table and identifies any unresolved references. When a portion of the software is modified, for any reason, the symbol information is likely to become changed as well. Therefore, any symbol information remaining in memory must be removed or it will bring about errors in processing caused by incorrect symbolic referencing. One system, disclosed in U. S. Patent Application Serial No. , filed in the name of Nilεson et al, entitled "Changing Software During Computer Operations," and assigned to Telefonaktiebolaget L M Ericsson, hereby incorporated by reference herein, describes a system and method to overcome some of the limitations in changing software "on the fly." That system provides for the installation of new software into the stores of the telecommunications system along with, and in addition to, the old software. In that system, existing traffic in the computer system is initially processed by the old software and test traffic is routed through the switch for processing by the new software. Thereafter, if the test traffic is handled successfully by the new software, a portion of the actual live traffic is selectively routed through the new software with the remainder of the live traffic still being handled by the old software. Should the sample traffic be carried adequately by the new software, all of the traffic is switched to the new software. As soon as the processing of all calls being handled by the old software has been completed, the old software is no longer utilized by the system and may be removed. That disclosed system provides for smooth verification of new or modified software. It allows data to flow through the new software in a gradual and controlled manner, yet as part of the live operational system. The system provides for early detection of errors and discrepancies with little or no impact to actual operation of a telecommunications switching system because the initial data routed to the new software is only test data generated by the system. If, in processing test data, the telecommunications system detects an error, no further traffic is directed to the new software so that, even if the new software had been processing actual data, disturbance to the overall traffic of the system is minimized. This disclosed system also redirects traffic from the old software to the new software in a gradual manner. The disclosed system includes the capability to allow transactions that began processing with the old software to complete its processing using only the old software. Only transactions that began subsequent to the installation of the new software will be processed by the new software. This aspect of the disclosed system results in only a minimal disturbance to users during a transition phase from certain old software to its replacement by or augmentation with new software. Further, this aspect minimizes the amount of data requiring conversion for and/or transfer to a different set of software than that with which it was initially processed. Other attempts to solve at least some of the problems associated with updating software in operational computer systems have focused on different aspects representing only a portion of the overall problem, in particular, the linking issue. For example, in U. S. Patent Application Serial No. 734, 456, filed on July 19, 1991, containing an invention by Anders Abrahamsson and Lars Holmqvist and assigned to Telefonaktiebolaget L M Ericsson, there is disclosed a system for dynamically linking software during run¬ time. That system, however, involves a complex system of indirect addressing that requires use of either a specialized or extended operating system and/or a special compiler. That system has several other limitations, including the need for a non-standard operating system. Further, this system will not work with standard applications software. Other related art has been discussed in various publications. For example, the article entitled "Future Documents" published in BYTE MAGAZINE relates to object linking and embedding while U.S. Patent No. 4, 791, 550 to Stevenson et al relates to link pointers and U. S. Patent No. 4, 667, 546 to Freeman et al deals with intrusion into unguarded regions of memory. None of these references discloses solutions to the problems discussed above. Therefore, it would be highly useful within the telecommunications industry to be able to efficiently perform dynamic runtime linking between separately loaded program units in a computer system. The system of the present invention provides such a method. SUMMARY OF THE INVENTION The system of the present invention comprises a system for dynamically binding software modules between two or more separately loadable software applications. This aspect of the system of the present invention embodies the inventive combination of a linked procedure call mechanism with the capability to perform dynamic runtime binding between separately loadable program units in a computing system. In one aspect, the system of the present invention comprises a linked procedure call mechanism that embodies a trader within the operating system kernel to enable an interface between different software units. This linked procedure call mechanism is also used to effect the inter-linking and binding of old and new software units during runtime. In employing this linked procedure call mechanism in the system of the present invention, the necessary interface specification is created utilizing another aspect of the system of the present invention, a specialized language referred to as an object-oriented interface description language (ELIN) as disclosed in the ELIN Reference Manual, copyright November 6, 1991 by Ellemtel ϋtvecklings Aktiebolag, and in U. S. Patent Application Serial No. 907,293, filed on July 1, 1992 in the name of Lundin et al. and assigned to Telefonaktiebolaget L M Ericsson, hereby incorporated by reference herein. This language contains special constructs specially designed for the development of interfaces for the linked procedure call aspect of the system of the present invention. Because these interface specifications contain attributes supported by an object-oriented paradigm, polymorphism and dynamic binding of objects having a common base interface specification can be readily achieved. In another aspect, the system of the present invention comprises a mechanism by which program units may be constructed and later modified separately in a running system without causing any disturbance to the ongoing operations of the computing or telecommunications system in which it operates. According to this aspect, the program units are constructed and compiled separately using a language- independent interface specification. This aspect allows program units to be modified and changed independently so long as the interfaces remain unaltered. This aspect of the system of the present invention provides the added advantage of eliminating the need to store symbol information for use in linking since the binding occurs at runtime. In yet another aspect of the system of the present invention, linked procedure call (LPC) objects are created and manipulated in a manner similar to that of objects of local classes in an object-oriented paradigm. This aspect of the linked procedure call mechanism is transparent to the programmers of the system. The transparency is achieved, in this aspect of the system of the present invention, through the automatic generation of code that performs the runtime binding in accordance with the interface specification. This aspect of the present invention provides the advantage that standard language compilers may be used, without requiring any extensions and without the need to modify the LPC model. In still another aspect, the system of the present invention comprises a set of direction points used to dynamically direct transactions (also referred to as "threads" or "chains of events" ) within the operational system to either new or old versions of a modified software unit. The system accomplishes the dynamic direction through a number of means, including analysis of messages addressed by function title, which makes it possible to direct messages to either a process executing a new version of a software unit or to a process executing an old version. Another type of direction point is dynamic run-time binding (e. g. , linked procedure call) between software units which makes it possible within a process to execute a new or an old version of a software unit. As will be readily appreciated by those of ordinary skill in this particular art, the principles and aspects of this invention could also be utilized to advantage the runtime conversion of software in a variety of computer applications other than telecommunications switching systems. BRIEF DESCRIPTION OF THE DRAWINGS For an understanding of the present invention and for further objects and advantages thereof, reference can now be had to the following description, taken in conjunction with the accompanying drawings in which: FIGS. 1A-1B are diagrammatic illustrations of a prior art system for controlling the introduction of new or modified software to an operational software system; FIG. 2 is a diagrammatic representation of the manner in which software blocks may be dynamically linked in accordance with the invention of an above- referenced co-pending application; FIG. 3 is a flow chart illustrating the process of changing software during runtime in accordance with the invention of the above-reference co-pending application entitled, "Changing Software During Computer Operations"; FIG. 4 is a block diagram illustrating the manner in which object operations are addressed within the software of the system of the present invention; FIG. 5 is a block diagram illustrating the manner in which software is addressed within the system of the present invention; FIG. 6 is a block diagram illustrating the manner in which software can be addressed by means of the trader in the system of the present invention; FIG. 7 is an illustrative diagram of the manner in which an object oriented interface description language is used to implement the system of the present invention; and FIG. 8 is a chart illustrating certain aspects of the system of the present invention. DETAILED DESCRIPTION The system of the present invention utilizes, in some aspects, principles of object-oriented programming. Object-oriented programming involves essentially four elements: classes, objects, instance variables (or data members as implemented in C++), and methods (or member functions in C++). A class is simply a template used to define objects, which are instances of the class they are created from. Classes have two types of components: instance variables and methods. Instance variables serve as data elements and methods serve as functions, i. e. they define an object' s behavior. Instance variables and methods can be combined in a single common object in execution time. That is, an object encapsulates an instance of the variables which can be manipulated by using the combined methods. Hence, programming is performed with a focus on objects, rather than on the functions or tasks to be performed. Certain techniques of object-oriented programming, well known in the art, are incorporated into the system of the present invention in the preferred implementation of the system of the present invention in the programming language C++. Such techniques include inheritance, polymorphism and encapsulation. Inheritance enables a new class to be derived from an existing class so that code is easily reusable, so that data and code can be added to a class or the behavior of a class can be altered, without having to change the existing class. Polymorphism is the property that provides the ability to use different types of objects in the same way because the different object types share a common interface. Inheritance of interfaces is the property that makes it possible to derive other object types from a common denominator. Finally, encapsulation is a technique for combining the data and operations needed to process the data all under one "roof." It further allows the capability to protect the data from excessive or unnecessary access and to hide the details of the data organization. Referring first to FIG. IA, there is illustrated a software control scheme utilized in a prior art system for managing the introduction of new or modified software into an operational software system. FIG. IA illustrates a hierarchical set of software levels, the contents of each of which is controlled by the members of a review board. All changes to the software must be approved by this board prior to such changes being implemented in the system. No software will be integrated into the system until the review board makes a formal determination that the software is needed, that it has been adequately tested and that it is not likely to cause damage or interruption to the system. The hierarchy of levels may be composed of several separate hierarchies linked together by an individual user who has access to and need for those levels or "libraries" of software to perform his or her function. At the top of the hierarchy 1 is the real-time, operational software that is typically most widely used and most strictly controlled ("AB. D" ). Below this level is a change library 2, designated by the additional letter C in the suffix ("AB. DC"). Lower levels of operational software within the hierarchy may belong to different groups of users within the system and will be controlled by review boards at those levels. New or modified real-time software enters the system, after approval, at the lowest appropriate change level, i.e. , a level that ends with the letter C as at 2 and 3. Once new or modified software enters the system, it remains at the entry level until a specified period has passed and the software has produced no detectable errors. It will then migrate to the next highest level. In some cases, this will require advance approval by a specified review board; in other cases the migration will occur automatically, as part of a regularly scheduled system activity. The migrations are transparent to the users and the software will be available immediately upon migration or entry to the hierarchy to users who have structured their software concatenation to access software in the libraries containing the new or changed software. As also illustrated in FIG. IA, the same process may be repeated and occurring simultaneously for non- real-time engineering type software that resides within the same system. The only difference in this case is that the control process is managed by a different set of people and the process may not be as rigorous as that for operational software used generally throughout the system for critical processes. The integration of the software occurs in the same manner for this engineering software as with operational software, however. The new or modified software enters the hierarchy at the lowest appropriate change level as designated by a C aε the last letter in the suffix, as at 4. It then migrates in an upward direction over time, with the necesεary approvals, until it reaches the top 5 of its portion of the hierarchy. With either engineering or operational software, once it has migrated to the next level it no longer resides at the lower level. The decision whether to utilize the new or modified software entered into the system' s hierarchical libraries is left to the individual user or user group. The user(s) may select which levels of the libraries the system is to use in concatenating software for their use. They may choose to bypass lower levels of software altogether or they may simply choose to avoid the lowest change level which contains the newest and least tested software. The highest level of each portion of the hierarchy, of course, contains the bulk of the in-use operational software. FIG. IB illustrates the human process of configuration control that is imposed upon the software library hierarchy illustrated in FIG. IA in order to maintain control over both the baseline and the new or modified software being introduced to the system on a daily basis. As noted above, the new software enters the hierarchy at the lowest appropriate change level following approval by the review board. If the new software results in errors or discrepancies, the software is removed from the hierarchy and returned for additional software maintenance work as at 6. Once the problems have been corrected and the software has been retested, it may once again, upon board approval, be integrated into the system at the lowest change level. If no problems are detected within the fixed period allowed, the εoftware will automatically migrate to the next level unless the next level requires another board approval as at 7. Otherwise, it will migrate on a fixed schedule after having been properly approved. This proceεε will continue to be repeated until the εoftware reacheε the higheεt level in that portion of the hierarchy at which time it will be declared fully operational software. Referring next to FIG. 2, there is shown a diagrammatic representation of the transfer of software signal information within a modular software system in accordance with a previously disclosed invention. A block of modular software 11, referred to as block A, compriseε the plurality of εections including program code listing portion 12, a signal distribution table 13 and a software signal sending table 14. In addition, a job buffer 15 compriseε a plurality of registers 16 within which is temporarily stored software signals awaiting processing by the central processor necessary to forward those signals to a requesting block of software, for example. Another software block, Block B 17, alεo includeε a program code liεting portion 18 and a signal distribution table 19. The represented embodiment of the invention also includes a global signal distribution table 20 within which there is maintained a listing of all of the local signal numbers for the particular signals contained in each block of software loaded in the system. As discuεεed briefly above, the global εignal distribution table 20 is an esεential element of maintaining the linkage addreεεes among different modules of software. The global signal diεtribution table 20 maintains the cross-referenceε between the global signal numbers corresponding to particular signalε being sent from one module or block to another and the local signal numbers corresponding to each of those signalε within each individual block in the εyεtem. When a block of εoftware iε loaded into the εyεtem, the portion of the global εignal diεtribution table 20 corresponding to that block is rewritten to include a local signal number for each εignal which is included within the block of software. This is conventionally done by combining the global signal number of that particular signal with the block number of the software block containing that signal through an excluεive-or process or some other technique of combining. Thus, when a software block is removed from the system, modified or enhanced in some way that resultε in changeε to the individual εignals within the block, that portion of the software signal distribution table must be rewritten to reflect the new content of εignals within the block and a new calculation of local εignals numbers for each of those signals within the block. As further illustrated in FIG. 2, a software signal SI iε being sent from block A 1 to block B 17. Block B 17 is referred to as the receiving block, while block A 11 is referred to as the sending block. The block number of the receiving block is also referred to as the BNR. The εyεtem iε to εend the deεired εignal SI to the receiving block and first obtain the global signal number for signal SI by accesεing the signal sending table 14 of block A 11 by means of its address comprising the program start address of block A 11 (PSA A ) plus the value of the εignal εending pointer (SSP). Once the global signal number for SI is obtained, it is loaded directly into a register 16 within job buffer 15 and awaits transfer to block B in accordance with the priority protocols of the central processing unit and the priority assigned to the particular signal being transferred. During this time, the information was retained in the form of the global signal number of SI and the block number of the receiving block. As soon as the εignal transfer operation has risen to a sufficient level of priority for the transfer to be executed, the syεtem accesses the global signal distribution table 20 to obtain the local εignal number of SI in block B 17. This iε accompliεhed by entering the global signal distribution table 20 with the address found by taking the global signal number and exclusive-oring that value with the block number BNR. Within this table at that address is found the local signal number for SI in Block B 17, the receiving block. Once the local signal number for SI in block B 17 is obtained, the syεtem then enters block B 17 by locating the instruction address, IA 21, within block B 17 where the signal should be entered. This is done by obtaining from the εignal diεtribution table 19 of block B 17 by taking the program start address of block B 17, (PSA B ) minus the local signal number within block B 17 to read the instruction addresε 21. Once the inεtruction addreεε 21 iε obtained, the εignal SI is entered into block B 17 and the transfer is complete. Thereafter, the instruction located at the IA 21 begins execution. One point must be kept in mind in connection with the application of this disclosed syεtem. When modifying code affecting a εignal entry point in a block, it must be kept in mind that if the data structures are modified, calls of that new or modified code may reach old parameter values, e. g. , signal data accompanying the signal in the job buffer that contain addresseε and or data in the format of the data structure that was utilized before modification. On the other hand, however, if the block at the time of reloading the newly modified software block has return addresses, the local signal numbers on the return addresε stack that have been modified as between the old and new versions are updated by the operating syεtem. Referring next to FIG. 3, there is εhown a flow chart illuεtrating the εmooth modification method of transition from an old εoftware verεion to a new εoftware verεion. In particular, the system presuppoεes that existing software is actively running in the syεtem and beginε at 30, with the loading of a new verεionε of the εoftware into memory. At 32, the system copies the data with its changes in the new version, and links it to the new εoftware. At 34, the εyεtem beginε to run teεt callε with the new software and normal traffic continues to run within the system with the old εoftware and the old data. At 36, the εyεtem querieε "does the new εoftware work on the test traffic?" If not, the syεtem moveε to 38 at which point the new εoftware and database is removed from the εyεtem and the procedure ends at 40. If the new software does work on the test traffic at 36, the εyεtem moveε to 42, at which point it runs sampleε of actual traffic with the new εoftware while maintaining the remainder of the normal traffic along with the old εoftware and old data. Next, at 44, the εyεtem again queries whether or not the new software iε working on the sample traffic. If not, the εyεtem moves to 38, and the new software and database are removed to end the procesε. If, however, the new εoftware is proceεεing εample traffic εucceεεfully at 44, the εyεtem moveε to run all future callε with the new εoftware and the data at 46. Thereafter, at 48, the system again queries whether or not the new software is working and if not, moves to 38 to remove the new software and end at 40. If the new software is working on running the normal traffic in the εyεtem at 48, the εyεtem queries whether all the old calls have yet been completed or not within the system at 50, and if not, queries if the time limit for the change has expired at 54 and if not continues to: (1) run all new calls with the new software, and (2) run all old calls with the old software at 46 until a yes is received at 50 or the time limit has expired at 54. If the time limit has expired at 54, the system terminates or transfers all remaining calls to the new εoftware at 56 and moves to 52. Thereafter, the system moves to 52 and the old software is removed along with the old data, and the system has made a switch during runtime from old εoftware to new εoftware without unduly endangering or delaying exiεting traffic within the telecommunications switch. In effecting the linking of individual calls to different blocks of software, such as in the example where new telecommunications processing software if first tested with teεt callε before normal callε are redirected from the old software to the new, the syεtem of the preεent invention may be viεualized as containing a Call Identification (ID) category and a Pointer ID category. For each call addresε within the syεtem which is a test call, a pointer to new software is given, while for all call IDs containing a normal identification, the pointer is given to the old software. The use of such pointers illustrates the method by which the syεtem of the preεent invention is able to properly direct both ordinary, live traffic and test traffic to the proper version of software. While this is the general simpliεtic interpretation of the manner in which the old and new software are addresεed within the εyεtem of the preεent invention, in fact, detailed linked procedure call mechaniεmε are uεed to create dynamic runtime binding between εeparately loaded program unitε. That iε, when replacing a program unit in the example discussed above, the old and the new versions of the software coexist for a time until the new version can be verified as correct and activities being executed in the old version can be ended as described above. The syεtem of the present invention uεeε trading as a means to access the software through an interface via the linked procedure call. In loadtime, all interfaces accesεible to the linked procedure call are published to a trader function in the kernel. Every interface is published with its identity and an address which refers to a method that createε an object from the interface. The binding between the εoftware verεionε is made in runtime and every time an object iε created for a εpecific interface, a requeεt iε directed to the trader for the addreεε of the create method which is then called and returns an object pointer to the created object. Referring next to FIG. 4 it is illustrated therein that, each operation on an object of class X 60 is called indirectly through the object in the following stepε: (1) the object pointer 66 addreεεes the object's data area; (2) at a predefined offset from the start of the object area the address of an operation table 68 can be found 62 (this table 68 is common for all objects of one type); and (3) the addreεε where the program code of the operation εtarts can be found in the operation table 68 at an offset corresponding to the operation at choice. Because the location of the addresεeε of the operation tables within the objects- data and the order in which the addresεes in the operation tables are stored are fixed and known, operations can be called without asεiεtance from the trader. One εuch operation in an interface that can be called without the trader is an operation to delete a created object. Use of these operation tables provides the ability to achieve polymorphism, a concept that can be implemented using, for example, the programming language C++ and its conεtruct for virtual tables. Polymorphism, meaning "many shapes," is a technique by which the behavior of a component that is shared by different objects can be changed. In other words, a component may appear the same in all cases, but may have the ability to perform in a somewhat different anner in connection with different objectε with which it iε aεεociated. Polymorphism is useful in allowing the creation of families of objects that are related, i. e. , they have a common origin or base, but they perform differently in different situations. This allows each object within a family to have methods or functions with identical names although the actual code for each object' s methodε may differ vaεtly. The εystem of the present invention utilizes polymorphism, as well aε other principleε of object oriented programming. The system of the present invention, however, implements and extends the principles in a new and highly useful manner, in order to achieve dynamic, transparent inter-linking of different verεionε of εoftware during execution. Referring next to FIG. 5, there iε illustrated therein the fact that the linked procedure call mechanism used in the present invention embodies the concept of a trader 80 contained within a kernel 82 which enables an interfacing relationship between a pair of software units 84 and 86, containing, respectively, a client clasε 88 and a server class of objects 90. FIG. 5 illustrateε in detail the εteps required in order to create objects within the system as shown also in FIG. 4. Objects are run-time instances of classes that contain definitions of both data and functions within a single package or unit. Because they are able to contain both data and code, they act as miniature, independent programs. They can be used, therefore, as building blocks in creating more complex programs without having to redevelop the code necesεary for thoεe functions. Because they can be maintained and modified independently, program maintenance and reviεion iε εimplified. A claεε iε a template that iε used to define an object, and an object is an inεtance of a claεε. A class contains two component types, instance variables or data members and methods or member functions. In order to support programmers developing programs that play the client role within the computer syεtem, a client-class is automatically generated through the use of an interface specification. The generated client- claεε actε aε a sort of agent for the server-class. The client of the syεtem callε operations from the client-claεε objectε in order to enεure that callε are tranεferred to " the εoftware implementation residing in the server-class. Therefore, all code relating to the dynamic binding function is found in the client-clasε. Claεε declarationε control the manner in which the compiler will εtore the addreεεeε in the objects-data and in what order the addresεes in the operations tables will be set forth. Some clasε declarationε are automatically generated by the εystem. When an object is created within the εyεtem, its "create method" can be located through a request to the trader 80 portion of the operation syεtem located within the kernel 82. The trader 80 containε all the interface information for all by linked procedure call accessible clasεes within the εyεtem, i. e. , it contains information for each object about which other objects it is accessible by or to. The diagram of FIG. 6 illustrates the way in which a process in run-time can be linked by linked procedure call to using a new or an old software unit. The trader 80 within the kernel 82 can direct the execution of the software unit 100 toward either the old software unit 102 or the new εoftware unit 104. While making the replacement, the εerver-clasεes from both the old and the new versions each have their interfaces published in the trader 80. The trader 80 contains two addresε entrieε for each item, one for the old εoftware unit 102 and one for the new εoftware unit 104. Proceεses created prior to the replacement will continue to use the old εoftware unit 102 and its server classeε while proceεεes created during and after the replacement may be directed to use the new software unit 104 and it' s server clasεes. After the replacement haε been completed and activitieε within the old εoftware unit 102 have ended, the old software unit 102 can be removed from memory and the interfaceε publiεhed by the server-classes in the old software unit 102 may be withdrawn. If an attempt to withdraw these εerver-claεεeε from memory iε made prior to all proceεεeε within the old software unit running to completion, the syεtem generates an exception call from the kernel 82. An exception handling process within the syεtem then allows the non- completed process the opportunity to redirect itself and utilize the new software unit 104 or else to terminate. The invention useε shared memory for storing the executable program code contained in the software units which makes it possible for all procesεeε within the proceεεors to execute the program code in this shared memory. This means that activities within different proceεses within a procesεor do not have to copy and relocate program code when making the dynamic run-time binding. The dynamic run-time binding (or linked procedure call) iε therefore a very fast and real time efficient mechanism εince no relocation or copying of programs is required in run-time. One of the advantages of using the trader mechanism for dynamic run-time binding is that the εoftware moduleε containing a client part of an interface doeε not have to be modified when the server part contained in another software module iε changed. That iε, no references to the server part have to be changed aε long aε the interface εpecification is unchanged. When defining a unique interface specification in the interface description language ELIN, which iε described below, a unique number iε generated off-line for that interface εeparating it from all other interfaceε. Thiε number iε used in real time by the εerver part to publiεh an interface in the trader and by the client part at the dynamic run-time binding through the trader mechaniεm. Uεing thiε number inεtead of a εtring containing the unique interface name makeε the algorithm for finding the εerver part to an interface more real time efficient. The algorithm for finding the εerver part in the trader mechanism can for instance be using hash technic or index table, which makes it almoεt aε efficient aε εtatic binding of code but have the advantage that software modules can be changed in a smooth way without disturbing ongoing activities using old software. In employing the linked procedure call mechanism in the present invention, the interface specification is written in an object oriented interface description language (ELIN). In this language, there is a special conεtruct (ADT) that is specially aimed at the specification of linked procedure call interfaces. An ADT in the ELIN language is a εpecification of the interface provided by objects of certain types. These objects are well εuited to be implemented aε inεtances of a class if an object oriented programming language is employed. The specification of a linked procedure call interface in ELIN language comprises the following information: (a) a name for the specification; (b) other interfaces used as a base for this name; (c) one or more constructors (used for creating instances); and (d) zero or more method-specificationε, each of which conεiεtε of a method name, argumentε, return type and exceptions. Set forth below, in code, is an example of an interface specification that could be used aε part of thiε linked procedure call mechaniεm and that describes an interface to objects of a type called Stack: ADT Stack IS BASE TelecomObject; METHODS CONSTRUCTOR (IN εize Int); puεh (IN data Int); pop () RETURNS Int; END ADT Stack; © 1992 Telefonaktiebolaget L M Ericεεon Thiε interface εpecification defineε an ADT named stack, the base ADT being called " TelecomObject. " Objectε of thiε ADT can accept process or message calls from the listed function members. Having a base identified for this ADT indicateε that there iε another specification of thiε type of ADT that is called TelecomObject. That base ADT also has certain specified methods which the current ADT, as an instance of the base ADT will inherit. The function members or methods specified in the above ADT definition are in addition to those specified in the base ADT. In sum, the above code comprises an ADT specification which is one type of interface specification that can be created within the syεtem. An interface can be derived from another interface which then iε called the baεe interface of the derived interface. Interfaceε can be derived from more than one other interface, with the derived interface inheriting from the operationε of each of its baεe interfaces. The derived interface may, in addition, declare itε own additional operations, although it may not define operations having the same name as those inherited from the base interfaces. It should be made clear that inheritance only affectε the interface- level, not the implementation level. Aε εhown in FIG. 7, the εyεtem of the preεent invention also includes a stub-code generation tool 112 which is used to certify the coordination between the client and the server which are linked together dynamically in runtime through an interface. The interface iε specified in a language independent fashion, but using the object oriented paradigm. The stub-code generation procesε enεures that a mapping to one of several programming languages is achieved and in the following sectionε, there iε a brief deεcription of how εuσh a mapping in C++ can be performed. Referring to FIG. 7, there iε illuεtrated a way in which an interface εpecification 110 employs the stub-generation tool 112 in connection with a set of generated files 114 in the syεtem of the preεent invention. FIG. 7 illuεtrateε, in particular, the overall εtructure of the C++ mapping aε implemented in that language. An interface εpecification, written in the language (ELIN) as used in the syεtem of the preεent invention, is similar to a class definition used in the programming language C++. Likewise, the mechanism for aσcesεing operationε through objectε iε εimilar to the manner in which the programming language C++ handleε virtual functionε. Therefore, the mapping on C++ illuεtrated in FIG. 7 is inεtructive aε to the operation of thiε aεpect of the εyεtem of the preεent invention. The stub-generation tool 112 generates two files for both the client side and the εerver εide, one with the εuffix " . h" (header) and one with the εuffix " . cc" (code). For the client, the " . h" or header file contains two class definitionε. One claεs is an exact copy of the corresponding clasε in the server' ε " . h" or header file. Thiε assures compatibility between the client and server and makes it posεible for the client to call objects created by the server. This claεε' constructor is private, however, so that the class cannot be used to create automatic objects on the εtack. The second claεε iε the one to be uεed at the client that actε aε an agent through which objectε created by the εerver can be accessed. For the server side, the corresponding two " . h" (header) and " . cc" (code) files are generated by the stub-generation tool 112. The contents of the " . h" file consiεtε of one claεε definition that will ensure compatibility with the client. This is the clasε that iε uεed aε a baεe for implementation. The implementation can be baεed directly on the generated claεε or the generated claεε can be uεed aε a baεe from which to derive other claεεeε. The ". cc" file containε a εkeleton for the " createmethod" and a generated table with one entry for each linked procedure call interface whoεe createmethod addreεs should be registered in the trader. The body of the createmethod iε reεponεible for creating an object that iε compatible with the generated clasε and returning a pointer to the newly created object as also illuεtrated in FIG. 4. There are εeveral reaεons for generating differing yet compatible clasε definitions for the client and server sides rather than one shared clasε definition. Firεt, it provideε different levelε of viεibility for members in the client and the εerver. For example, a constructor must be public in the εerver but εhould not neceεεarily be public if it reεideε in the client. Second, the client and server programs can be linked together for teεt purposes without encountering the problem of name collisions if different classes are used. Referring next to FIG. 8, there is shown a certain arrangement of charts illustrating certain exemplary code blocks and their relationship to one another as employed in the system of the present invention. FIG. 8 illuεtrates the logical structure of certain generated files and written specifications as they might be implemented in the syεtem of the present invention. At the highest level, the Common Interface Specification 120 defines an ADT "X" and the methods or operations possible to access for objects of that ADT. Logically subordinate to this ADT, at the next level of definition is a specification for a user unit 122 of the Interface Specification 120 and a εpecification for a provider unit 124 of the Common Interface Specification 120. The uεer unit specification 122 defines a client of the common interface, ADT X. The provider unit specification 126 defines a εerver of ADT X. At the next logical level below the unit specification 122 and 124 are the generated class definitions for userε and providers reεpectively. The generated claεε definition for XUεer 126 illuεtrateε certain user claεεeε defined for both public and private uεe. The generated claεε definition for XProvider 128 illuεtrateε certain public and private definitionε for provider data and functions. As illuεtrated above, the system of the present invention enables the runtime inclusion or linking within a process to either new software or old software in a manner that enables software to be both effectively teεted in real-time aε well aε to be εmoothly and tranεparently εubεtituted in a telecommunications network and switching syεtem without diεruption of the teleco municationε traffic within the network. It iε thuε believed that the operation and conεtruction of the preεent invention will be apparent from the foregoing deεcription. While the method, apparatus and syεtem εhown and described has been characterized as being preferred, it will be readily apparent that various changes and modifications can be made therein without departing from the spirit and εcope of the invention aε defined in the following claims.

Claims: WHAT IS CLAIMED IS: 1. A method of dynamically binding first and second modules respectively dispoεed in firεt and second εoftware applications, said method comprising the εteps of: providing a linked procedure call mechanism including cooperative trader and kernel portions; and causing said linked procedure call meσhaniεm to: (1) utilize a specified interface between said first and second modules, and (2) create an inter-linking and binding between said first and second modules during runtime. 2. The method of dynamically binding first and second modules respectively diεpoεed in firεt and second software applicationε as set forth in claim 1 wherein: εaid interface iε created uεing an object-oriented interface deεcription language. 3. The method of dynamically binding firεt and second modules respectively dispoεed in firεt and second software applicationε aε set forth in claim 1 wherein: said first module includes a client class of objects and said second module includes a server class of objects. 4. The method of dynamically binding firεt and second modules respectively diεpoεed in firεt and second software applications as set forth in claim 1 wherein there exiεtε two versions of said second module, each version comprising the same set of server clasεes of objects, said trader portion is located within said kernel portion and, said trader portion includes the published addresεeε of the εerver classes of objects of both versions of said second module and enable a process to receive an addresε pointing to one of εaid verεionε of the εecond module and its associated application. 5. The method of dynamically binding first and εeσond moduleε respectively dispoεed in firεt and second software applications as εet forth in claim 4 wherein: εaid two verεionε of the second module are created at different times, the old version of said second module is located in a software application created at a first time and the new version of said second module is located in a software application created at a second subεequent time. 6. The method of dynamically binding firεt and εecond modules reεpectively diεpoεed in firεt and second εoftware applications as set forth in claim 5 wherein: a process created prior to said second time continues to receive from the trader an addreεε pointing to εaid old version of the second module while a process created subsequent to said second time receives from the trader an address pointing to said new verεion of the εecond module. 7. The method of dynamically binding firεt and second modules respectively diεpoεed in firεt and second software applications aε set forth in claim 2 wherein εaid linked procedure call interface compriεes: a name for the interface specification; other interfaces used as a base for εaid interface specification; at leaεt one conεtructor for creating inεtances of objects εpecifying εaid interface; and at leaεt one method-specification including a method name, arguments, return type and exceptions. 8. The method of dynamically binding first and εecond moduleε respectively dispoεed in firεt and εecond εoftware applicationε as set forth in claim 7 in which said other interface specificationε uεed as a base for said interface specification. Said interface εpecification inheritε the methods specified in the base specificationε. 9. The method of dynamically binding first and εecond moduleε respectively disposed in first and second software applications aε set forth in claim 1 wherein said modules include client and server clasεes of objectε which are linked together dynamically in runtime and, wherein the coordination between the client and εerver objects iε assured by an off-line stub generation tool. 10. The method of dynamically binding firεt and εecond moduleε respectively disposed in first and second software applicationε aε εet forth in claim 9 wherein the interface is εpecified in a language independent fashion uεing the object oriented paradigm. 11. The method of dynamically binding first and εecond modules respectively disposed in first and second software applications as set forth in claim 9 wherein εaid εtub generation tool generates separate files for the client and εerver sides. 12. The method of dynamically binding first and εecond modules reεpectively diεpoεed in firεt and εecond εoftware applicationε aε set forth in claim 11 wherein said one of said files generated for the client side contains two clasε definitions. 13. The method of dynamically binding first and second modules respectively dispoεed in firεt and εecond εoftware applicationε aε εet forth in claim 12 wherein εaid one of εaid defined claεεeε iε a compatible clasε of a correεponding claεε in the server side to ensure compatibility between the client and εerver and make it poεεible for the client to call objectε created by the εerver. 14. Apparatuε for dynamically binding firεt and εecond moduleε reεpectively disposed in first and second software applications, said apparatus comprising: firεt meanε for defining a linked procedure call mechanism including cooperative trader and kernel portionε; and εecond meanε for causing said linked procedure call mechanism to: (1) utilize a specified interface between said first and second modules, and (2) create an inter-linking and binding between εaid firεt and εecond moduleε during runtime. 15. Apparatuε for dynamically binding first and second modules respectively dispoεed in firεt and εecond εoftware applicationε aε εet forth in claim 14 wherein: εaid interface iε εpecified by meanε of an object- oriented interface deεcription language. 16. Apparatuε for dynamically binding firεt and εecond modules respectively dispoεed in first and second software applications aε εet forth in claim 14 wherein: εaid firεt module includes a client clasε of objects and said εecond module includeε a εerver claεε of objectε. 17. Apparatuε for dynamically binding firεt and εecond moduleε respectively disposed in firεt and εecond εoftware applicationε aε εet forth in claim 14 wherein εaid trader portion iε located within said kernel portion, εaid firεt and second modules include server clasεeε of objectε and, εaid trader portion includeε the publiεhed addreεεeε of the εerver classes of objects of one of said first and εecond moduleε and enable a proceεε to receive an address pointing to one of said modules and its aεεociated application. 18. Apparatuε for dynamically binding firεt and εecond moduleε reεpectively diεpoεed in firεt and εecond εoftware applications as εet forth in claim 17 wherein: εaid firεt module iε located in a εoftware application created at a firεt time and εaid εecond module iε located in a εoftware application created at a εecond εubεequent time. 19. Apparatus for dynamically binding first and second modules reεpectively disposed in first and second software applications as εet forth in claim 18 wherein: a process created prior to said second time continue to receive from the trader an address pointing to said first module while a proceεε created εubεequent to εaid εecond time receiveε from the trader an address pointing to said second module. 20. Apparatus for dynamically binding first and second modules respectively dispoεed in first and second software applications aε εet forth in claim 15 wherein εaid linked procedure call interface compriεes: a name for the interface specification; other interfaces used as a base for εaid interface εpecification; at leaεt one conεtructor for creating inεtances of objects εpecifying εaid interface; and at leaεt one method-εpecification including a method name, argumentε, return type and exceptions. 21. Apparatus for dynamically binding first and second modules respectively disposed in first and second software applications as set forth in claim 20 in which said other interface specifications used aε a base for said interface specification. Said interface specification inherits the methods specified in the base specifications. 22. Apparatus for dynamically binding first and second modules respectively diεpoεed in first and εecond εoftware applications aε εet forth in claim 1 wherein said modules include client and server classes of objects which are linked together dynamically in runtime and, wherein the coordination between the client and server objects is aεεured by an off-line εtub generation tool. 23. Apparatuε for dynamically binding firεt and εecond moduleε reεpectively disposed in first and second software applications as set forth in claim 22 wherein the interface is εpecified in a language independent faεhion uεing the object oriented paradigm. 24. Apparatuε for dynamically binding firεt and εecond moduleε respectively disposed in first and second software applications as εet forth in claim 22 wherein εaid εtub generation tool generateε εeparate fileε for the client and εerver εideε. 25. Apparatuε for dynamically binding firεt and εecond moduleε reεpectively diεpoεed in firεt and εecond εoftware applications as εet forth in claim 24 wherein εaid one of εaid fileε generated for the client εide containε two claεε definitionε. 26. Apparatuε for dynamically binding firεt and εecond moduleε reεpectively diεpoεed in first and second software applications as set forth in claim 25 wherein said one of said defined classeε iε a compatible claεε of a correεponding claεε in the εerver εide to enεure compatibility between the client and εerver and make it poεεible for the client to call objectε created by the εerver. 27. A method for dynamically binding first and second moduleε reεpectively diεpoεed in firεt and seσond software applications, said method comprising the stepε of: locating said firεt and second software modules in shared memory; providing a trader for binding the client part of a specified interface within a software module to the server part of said specified interface within a different module; updating said trader with the memory addresε location of a εerver part of the interface in εaid first module to enable its binding to said εecond module; and dynamically linking within εaid trader in run-time the client part in εaid εecond module with the εerver part at the addreεεed location in εaid firεt module. 28. A method for dynamically binding first and εecond modules respectively dispoεed in firεt and εecond εoftware applicationε εet forth in claim 27, wherein, a plurality of different εecond modules are located in εaid εhared memory with εaid firεt module; and εaid εerver part in εaid firεt module iε dynamically linked in run-time with the client part of each of a plurality of εaid εecond moduleε. 29. A method for dynamically binding firεt and εecond moduleε respectively dispoεed in firεt and εecond εoftware applicationε aε εet forth in claim 27 wherein, εaid trader is updated with the addresεes of the server part of a plurality of different interfaces located in said first module; at leaεt one of said εerver partε of said different interfaces in said firεt module iε dynamically linked in run-time to a client part of a correεponding interface in εaid εecond module. 30. A method for dynamically binding firεt and εecond moduleε respectively dispoεed in firεt and εecond εoftware applicationε aε εet forth in claim 27, which alεo includeε: generating a unique number identifying each interface contained within the εaid firεt and εecond moduleε. 31. A method for dynamically binding firεt and εecond moduleε reεpectively diεpoεed in firεt and εecond εoftware applicationε aε εet forth in claim 30, wherein, εaid trader iε updated with a unique number identifying a particular interface as well aε the memory addreεs location of the server part of that interface within said first application.

Inventors: LUNDIN LARS KENNETH, MARKSTROEM ULF KURT HAAKAN, LUNDIN, LARS, KENNETH, MARKSTROEM, ULF, KURT, HAAKAN
Applicants: ERICSSON TELEFON AB L M, TELEFONAKTIEBOLAGET LM ERICSSON
Application year: 1993
Main classification: G06F9
IPC codes: G06F9