Abstract:
The present invention relates to a virtual software machine for providing a virtual execution environment in a target computer for an application software program having one or more execution dependencies that are incompatible with a software execution environment on the target computer. The machine comprises a plurality of independent processes, and a virtual control mechanism having a virtual management interface (VMI) for generating requests for execution to the plurality of independent processes and receiving results of such processing. The requests for execution and the results are communicated via a message exchange mechanism. The machine also includes a pre-processor for generating a pre-processed application program in which the execution dependencies are masked. A compiler/linker receives the pre-processed application program and the virtual control mechanism and generates executable code for the operating system of the target computer. A run-time module of the machine is run by the operating system of the target computer for executing the application software program in the target computer despite the execution dependency that is incompatible with the target computer system software execution environment.

Description:
CROSS REFERENCE TO RELATED APPLICATIONS 
     This application is a continuation of application Ser. No. 08/389,973, filed Feb. 13, 1995, now abandoned, which is a continuation of prior application Ser. No. 07/794,735 filed Nov. 18, 1991 now abandoned, entitled &#34;Virtual Software Machine for Enabling CICS Application Software to Run on Unix Based Computer Systems&#34; by Kiritkumar Talati and C. Willard Lackie now abandoned, which is a continuation of prior application Ser. No. 07/591,463, filed on Oct. 1, 1990, now U.S. Pat. No. 5,067,072, which was a continuation of application Ser. No. 07/391,691, filed on Aug. 10, 1989, now U.S. Pat. No. 4,961,133, which was a continuation of prior application Ser. No. 07/118,307, filed Nov. 6, 1987, now abandoned. 
    
    
     TECHNICAL FIELD 
     The present invention relates generally to computer systems and more particularly to a virtual interface architecture for porting application software, normally compatible with a &#34;source&#34; computer, to a heterogenous or &#34;target&#34; computer. 
     BACKGROUND OF THE INVENTION 
     Computer systems having homogeneous hardware can interact and share data over a network. For example, a &#34;local area network&#34; can connect two or more computers located in physical proximity to enable users to access a shared database. Moreover, it has also been possible in the prior art to exchange software between identical types of machines. To the contrary, most interactions between heterogenous machines still involve little more than simple transfers of data files or the like. Software applications written for one type of hardware or for one specific type of operating environment, however, cannot be ported or &#34;transferred&#34; to a system having different physical characteristics without being entirely rewritten. Therefore, while much progress has been made in developing techniques for exchanging data between incompatible machines, it has not been possible to exchange software between heterogenous computer systems. 
     There have been a number of solutions proposed to overcome the &#34;compatibility&#34; problems associated with the enormous array of prior art computer systems having diverse and incompatible hardware and/or software. One solution is the use of a single operating system along a continuum of hardware products from microcomputer to mainframe. Although this approach is a satisfactory solution with respect to the products of an individual manufacturer, it does not allow the transfer of software applications across incompatible hardware and operating system environments. Another alternative would be the creation of a common communication environment across distributed systems through use of a standard industry-wide protocol. While some efforts have been made to generate standards for such a protocol, this solution presents complex technological problems. 
     There therefore exists a need for an interface system which provides application program portability and consistency across diverse computer environments. 
     BRIEF SUMMARY OF THE INVENTION 
     It is an object of the present invention to provide an architecture for porting application software, normally compatible with a &#34;source&#34; computer, to a heterogenous or &#34;target&#34; computer. 
     It is still another object to create a &#34;virtual&#34; interface architecture which enables heterogenous machines to mask the differences in their hardware and software by isolating the application software from the processing environment. 
     It is another object of the invention to provide application program portability and consistency across a number of different office automation, transaction processing and non-procedural language-based system architectures. 
     It is yet a further object of the present invention to enable an existing application program to function as a direct link to the hardware and operating system of a diverse computer system without a transaction processing system. 
     It is another object of the present invention to provide a method and apparatus which facilitates the functional interconnection of programs written in procedural programming languages (such as &#34;C&#34;, &#34;COBOL&#34; or &#34;ADA&#34;), or the interconnection of a program written in a procedural programming language with a program written in a non-procedural programming language (such as &#34;LISP&#34; or &#34;PROLOG&#34;). 
     It is a further object of the present invention to allow the development of application programs on micro or minicomputers for migration to mainframe computers and vice versa. As a byproduct, the present invention allows existing mainframe transaction processing system applications to run on micro or mini-computers without modifications or programming changes. 
     It is still another object to provide a virtual interface system which will enable the migration of existing applications to new and more advanced hardware environments created in the future. 
     According to the preferred embodiment of the invention, a virtual interface system for porting application software to a heterogenous or &#34;target&#34; computer comprises a plurality of independent interface processes for running in one or more distributed processors of the target computer. One or more of the processes are used to carry out at least one task required by the application software. The system also includes a pre-processor and compiler for processing program code of the application software into object code compatible with the target computer. According to the preferred embodiment, the program code of the application software is pre-processed by identifying functional calls therein, converting the functional calls in the program code to functional calls in the language native to the target computer, and compiling the functional calls of the language native to the target computer to create the object code. The pre-processor is implemented in either the source computer or the target computer. 
     The object code corresponding to the pre-processed program code is then linked with control codes of the virtual interface system to generate code fully executable by the operating system of the target computer. The system control codes include a plurality of so-called process management interface modules for communicating with the plurality of processes via a partitioned storage area, and a virtual management interface for controlling the plurality of process management interface modules. The virtual management interface and the process management interface modules are compiled into object code before linkage with the object code corresponding to the pre-processed program code. 
     According to a feature of the invention, the virtual interface system further includes a blackboard switch logic for generating the partitioned storage area and for interfacing the plurality of processes to the process management interface modules via the partitioned storage area. All communications to and from the processes go through the blackboard switch logic to the partitioned storage area and vice versa. 
     In a run-time mode, the executable code (comprising the linked pre-processed program code the virtual management interface and the process management interface modules) is run using the operating system of the target computer. This operation enables the process management interface modules to control the processes via the blackboard switch logic and the partitioned storage area and thereby enable the processes to carry out the task required by the application software. 
     In accordance with another feature of the invention, the target computer includes a plurality of partitioned storage areas, each generated and controlled by its own blackboard switch logic. Each of the partitioned storage areas may also include its own plurality of independent processes. In this architecture, processes associated with one partitioned storage area communicate with processes associated with another partitioned storage area via the blackboard switches. In addition to routing data and control information between the process management interface modules and the processes via the partitioned storage areas, each blackboard&#39;s switch logic includes security and encryption/decryption algorithms to prevent or limit access to the one or more storage areas. 
    
    
     BRIEF DESCRIPTION OF THE DRAWINGS 
     For a more complete understanding of the present invention and the advantages thereof, reference is now made to the following Description taken in conjunction with the accompanying Drawings in which: 
     FIG. 1 is a block diagram of a source computer and a heterogenous or &#34;target&#34; computer; 
     FIG. 2 is a simplified block diagram of a virtual interface system of the present invention for providing application program portability and consistency across the source and target computers of FIG. 1; 
     FIG. 3 is a simplified flowchart showing the basic operating steps of the virtual interface system of FIG. 2; 
     FIG. 4 is a simplified block diagram of a modified virtual interface of the invention wherein the target computer includes a distributed blackboard architecture having a plurality of partitioned storage areas; and 
     FIG. 5 is a flowchart representation describing how the virtual interface system of FIG. 4 effects retrieval of data from a remote database of the target computer. 
    
    
     DETAILED DESCRIPTION 
     With reference now to the drawings wherein like reference characters designate like or similar parts throughout the several figures, FIG. 1 is a simplified block diagram of a &#34;source&#34; computer 10 and a heterogenous or &#34;target&#34; computer 12. As used herein, &#34;heterogenous&#34; refers to the fact that application program(s) 14a written for the source computer 10 cannot be run on the target computer 12 because computers 10 and 12 are incompatible at the hardware and/or software level. For example, and not by way of limitation, application programs 14a of the source computer 10 may comprise a set of procedural based programs written in &#34;C&#34;, &#34;COBOL&#34; or &#34;ADA&#34;, whereas application programs 14b of the target computer 12 may comprise a set of knowledge-based programs written in &#34;LISP&#34;. Or, source computer 10 may comprise a transaction processing system such as IBM&#39;s CICS (customer information control system) whereas the target computer 12 may include non-IBM hardware for running an expert system or the like. In both cases, application programs 14a or 14b are not capable of being transferred or &#34;ported&#34; to the incompatible computer 12 or 10, respectively. 
     Each of the computers 10 and 12 includes one or more integrated or distributed processors 16a-16n capable of receiving and manipulating data and generating outputs, operating system software 18 which controls the operation of the overall computer system, memory (e.g., a disc drive and a suitable disk storage) 20 for storing data and application programs, input/output devices (e.g., keyboards, printers, CRT&#39;s, etc.) 22 for enabling a user to interact with the system, database management system 24 for controlling access to and storage of data, communications system 26 for controlling communications to and from the computer system via network 29 for example, and journal system 28 for storing and retrieving data from a journal. Such elements are, of course, conventional in the prior art. As will be described below, the virtual interface architecture of the present invention provides the capability to port application programs 14a (normally compatible with the source computer 10) to the target computer 12 and vice-versa, without modifications or programming changes to such programs. As used herein, &#34;virtual&#34; is the opposite of &#34;transparent&#34; in the sense that something &#34;transparent&#34; appears to the user not to exist but in fact does, while something &#34;virtual&#34; appears to the user to exist but does not. 
     The objects of the invention are achieved by the novel virtual interface system 30 as shown in the simplified block diagram of FIG. 2. As discussed above, virtual interface system 30 enables the application programs 14a to be executed without regard to whether such programs are compatible with the processor(s) 16, operating system 18, storage devices 20, input/output devices 22, data access system 24, communications system 26 or journal system 28 of the target computer system 12. The present invention therefore provides complete application program independence from the hardware, operating system, language, database management system and network characteristics of a heterogenous computer system. In this way, the virtual interface system enables software applications to be environment-independent by masking differences in the physical and functional characteristics of the source and target computers. 
     Virtual interface system 30 comprises a number of functional elements: a pre-processor 32, a compiler 34 for generating object code compatible with (but not executable by) the operating system of the target computer 12, a link/edit processor 35 for linking various object code programs to create fully-resolved core image code (&#34;EXEC CODE&#34;) executable by the operating system of the target computer, a blackboard switch logic 36, a partitioned storage area 38, and a plurality of independent processes 40a-40n for running in the one or more processors 16 of the target computer system 12. Each of the processes 40 comprises an independently schedulable unit of computation which, in conjunction with one or more other processes, carries out one or more &#34;tasks&#34; required by the application program. Each task therefore consists of one or more independent processes. 
     According to the invention, the blackboard switch logic 36 is controlled by the operating system 18 of the target computer 12 to generate the partitioned storage area 38, or &#34;blackboard&#34;. As will be described, the blackboard switch logic 36 is the conduit for all communications to and from the processes 40a-40n and all such communications follow the same route: through the blackboard switch logic 36 to the partitioned storage area 38, or from the partitioned storage area through the blackboard switch logic. The routing of data and information through the blackboard switch logic 36 and the partitioned storage area 38 is controlled by the executable code (&#34;EXEC CODE&#34;) output from the link/edit processor 35. As will be described, the executable code comprises linked object code programs representing (a) pre-processed program code of the application program, (b) a so-called virtual management interface (&#34;VMI&#34;) 42, and (c) a plurality of process management interface modules 44a-44n. The object code representing the VMI 42 and the plurality of process management interface modules 44 is generated by the compiler 34. 
     According to the invention, the process management interface modules 44 control the processes 40 via the blackboard switch logic 36 and the partitioned storage area 38. Processes 40 and the executable code are capable of being executed in the target computer 12 but not in the source computer 10. As will be described, the blackboard switch logic 36 also includes security and encryption/decryption routines for preventing or limiting data access or retrieval from the partitioned storage area, a data compression routine for conserving available memory in the blackboard, and a routine for controlling inter-blackboard communications. 
     The operation of the virtual interface system 30 of FIG. 2 can now be described in connection with the flowchart of FIG. 3. In general, the virtual interface system enables application programs to run irrespective of the hardware environment. This is accomplished by masking the application program and operating system functional calls (written, for example, in &#34;ADA,&#34; &#34;C,&#34; &#34;CICS,&#34; &#34;COBOL,&#34; &#34;LISP,&#34; &#34;PROLOG,&#34; etc.) from the hardware by linking the code of the original application program to/from the hardware operating system. This masking is carried out by the pre-processor 32 and provides both the user/programmer and the hardware with what each expects to see even though they are communicating in two different languages. 
     In particular, the source code of an application 14a is applied to the pre-processor 32 of the virtual interface system 30 at step 46. Pre-processor 32 identifies the functional calls (i.e., tasks) in the program code and, at step 48, converts these functional calls to functional calls of the language native to the target computer (i.e., to the compiler 34). For example, if the application program 14a is a CICS application and the target computer is &#34;C&#34;-based, pre-processor 32 serves to format the CICS functional calls in the source code to &#34;C&#34; calls. The output of the pre-processor 32 is then supplied to the compiler 34 which, at step 50, compiles the &#34;C&#34; code into object code compatible with but not fully executable by the operating system 18 of the target computer 12. Although not shown in detail in FIG. 3, the pre-processor 32 also masks the hardware operating system functional calls to the original application program. Steps 46-50 represent a &#34;development&#34; mode of operation and may be carried out at any time in either the source or target computer. 
     At step 51, the object code corresponding to the pre-processed program code 32 is linked to the (previously generated) object codes of the VMI 42 and the process management interface modules 44. This linkage is carried out by the link/edit processor 35 in a conventional fashion known in the art. The resulting &#34;EXEC CODE&#34; comprises a plurality of calls to the virtual management interface 42 (and thus the process management interface modules) for carrying out the tasks required by the application program. At step 52, the &#34;run-time&#34; mode of operation is initialized. This causes the blackboard switch logic 36, at step 54, to generate the partitioned storage area 38 in memory of the target computer 12. The blackboard switch logic 36 also functions, at step 56, to initialize the processes 40 and &#34;attach&#34; the processes to the partitioned storage area 38. As used herein, the &#34;attaching&#34; of processes refers to the assignment of a designated discrete portion of the partitioned storage area 38 for each process 40. Communications to and from each such process must therefore be addressed to the discrete portion of the partitioned storage area 38 designated by the blackboard switch logic 36 at step 56. In this manner, the blackboard switch logic 36 uses so-called &#34;reserved spot&#34; communication for data access to and from the partitioned storage area 38. 
     At step 58, a user of the target computer system 12 calls the software application for execution. This application, normally incompatible with the target computer 12, has been pre-processed, compiled and linked with the VMI and interface modules to generate executable code as previously described. At step 60, the blackboard switch logic 36 assigns the user to the partitioned storage area 38. A test 61 is then run to determine if use is authorized. This test uses the security routines of the blackboard switch logic 36. If use is authorized, processing begins. In particular, the executable code (and thus the virtual management interface 42) is run by the operating system 18 of the target computer 12 at step 62 to call one or more of the process management interface modules 44a-44n as required by the application software task(s). Each of the process management interface modules then communicates with the one or more processes 40a-40n via the blackboard switch logic 36 and blackboard 38 to perform the task. 
     It can be seen therefore that the interface system 30 uses a &#34;virtual&#34; architecture to perform program &#34;tasks&#34; using a plurality of machine-independent &#34;interface&#34; processes 40 which are interfaced to a plurality of process management interface modules via a switch logic-generated partitioned storage area. The process management interface modules 44 do not perform the tasks themselves, rather, they serve only to interface to those processes which actually do perform the tasks. This separation of the processes 40 from the process management interface modules 44 via the blackboard switch logic and blackboard advantageously enables the system 30 to provide application program portability and consistency across diverse computer environments to achieve the objects of the present invention. 
     Only the executable code and the interface processes 40 need be tailored to the target computer 12 environment. Moreover, the processes themselves can be located in one or more distributed processors 16a-16n of the target computer 12, thus facilitating the use of parallel processing techniques and fault tolerant processing. 
     Referring now to FIG. 4, an alternate embodiment of the virtual interface system is shown. In this embodiment, the target computer 12 includes two or more partitioned storage areas 68a-68n each generated and controlled by a corresponding blackboard switch logic 70a-70n in the manner previously described. In this architecture, each of the blackboards 68 has its own set 72 and 73 of processes and the identity of the processes in each set may differ from one blackboard to the next. Certain specified processes may thus be carried out in remote locations of the target computer via inter-switch logic communications over a network 66. According to another feature of the invention, data and control information is passed between the partitioned storage areas via the blackboard switch logic. Such communications are controlled by a blackboard-to-blackboard communications routine resident in the blackboard switch logic 36 associated with each blackboard. This operation is shown by way of example in FIG. 5. 
     In particular, assume that a process 73d is associated with the blackboard switch logic 70n of FIG. 4 and controls data access from a database 74. If a process 72c, for example, requires data from the database 74, the following steps are carried out. At step 76, process 72c directs a message to the blackboard switch logic 70a which then, through its blackboard-to-blackboard communications routine, places the message on the network 66. At step 78, the blackboard switch logic 70n receives the message and places it in a specific location of the blackboard 68n associated with the process 73d. Once notified of the message, process 73d is then carried out at step 80 to retrieve the data from the database 74. The required data is then appended to a message at step 82 and delivered, by the process 73d, back to the blackboard switch logic 70n. At step 84, the blackboard switch logic 70n uses its blackboard-to-blackboard communication routine to deliver the message over the network 66 back to the blackboard switch logic 70a. At step 86, the blackboard switch logic 70a places the message in the blackboard 68a at the location associated with the originating process 72c. At step 88, the message is retrieved by the process 72c from the blackboard 68a. 
     Referring now back to FIG. 2, the plurality of interface processes 40 preferably include at least the following: 
     Data Access Interface Process (&#34;DAI&#34;) 40a for managing data access to and from a database management system 24 via one or more database interface processes (DBI); 
     Database Interface Process (&#34;DBI) 40b--for storing and retrieving data from the database management system 24; 
     Presentation Interface Process (&#34;PI&#34;) 40c for controlling data presentation on the input/output devices 22 of the target computer system; 
     Journal Interface Process (&#34;JI&#34;) 40d for storing and retrieving data from the journal system 28 of the target computer system; 
     Task Storage Interface Process (&#34;TSI&#34;) 40e for controlling management and storage of data across tasks; 
     Storage Interface Process (&#34;SI&#34;) 40f for controlling data management within a task and data management between tasks; and 
     Task Control Interface Process (&#34;TCI&#34;) 40g for controlling the initiation, delay, suspension or termination of a task. 
     The above processes, while exemplary, are not meant to be limiting. Data access interface process (&#34;DAI&#34;) knows the symbolic (i.e., system) location of all data and uses one or more database interface processes to physically access such data. Moreover, with the exception of the storage and task control interface processes, each of the processes 40 cooperates with a corresponding process management interface module 44 in the manner previously described. For example, data access interface process (&#34;DAI&#34;) 40a is controlled by a data access process management interface (&#34;DAMI&#34;) module 44a which in turn is controlled by the virtual management interface (&#34;VMI&#34;) 42. Likewise, presentation interface process (&#34;PI&#34;) 40c cooperates with the PMI module 40c, and so forth. 
     Preferably, the storage interface process 40f and the task control interface process 40g are controlled by and communicate with the virtual management interface 42 via direct message exchanges rather than a blackboard. This scheme enables the virtual management interface 42 to exhibit direct or &#34;action-centered&#34; control of the SI and TCI processes. 
     In the preferred embodiment, data and/or control information is transferred (between tasks, between process management interface modules and processes, and between distributed blackboards) using the following &#34;send&#34; and &#34;receive&#34; message formats: 
     
         ______________________________________SEND (data, length, command, bbid, iid)RECEIVE (data, length, command, bbid, iid); wheredata      =                   informationlength    =                            length of datacommand    =                       action required or &#34;subclass&#34;bbid       =                            identification of blackboardiid        =                             process identification or                                   &#34;class&#34; (blackboard______________________________________                address) 
    
     The following are representative program listings showing (a) a pre-processor for receiving a CICS application program and in response thereto generating a pre-processed program, (b) an exemplary CICS test program, (c) the CICS test program following processing by the pre-processor, (d) the journal management interface module (&#34;JMI&#34;) prior to compiling, (f) the journal interface process (&#34;JI&#34;) prior to compiling and (g) the blackboard switch logic. The blackboard switch logic includes four functional components: a blackboard generation and process attachment routine, a routine for attaching a user and an associated task to the blackboard (including security), the reserved-spot communication routines (for processing the &#34;SEND&#34; and &#34;RECEIVE&#34; messages) and a blackboard-to-blackboard communications routine. 
     Although the invention has been described and illustrated in detail, the same is by way of example only and should not be taken by way of limitation. The spirit and scope of the present invention are limited only to the terms of the appended claims.