EP2323031A2 - Calling of late bound functions from an external program environment - Google Patents

Calling of late bound functions from an external program environment Download PDF

Info

Publication number
EP2323031A2
EP2323031A2 EP10185264A EP10185264A EP2323031A2 EP 2323031 A2 EP2323031 A2 EP 2323031A2 EP 10185264 A EP10185264 A EP 10185264A EP 10185264 A EP10185264 A EP 10185264A EP 2323031 A2 EP2323031 A2 EP 2323031A2
Authority
EP
European Patent Office
Prior art keywords
bound
functions
late
late bound
function
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Withdrawn
Application number
EP10185264A
Other languages
German (de)
French (fr)
Other versions
EP2323031A3 (en
Inventor
Peter Hartwell Webb
Barry Simon
Charles G. Nylander
John Micco
Marc Ullman
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
MathWorks Inc
Original Assignee
MathWorks Inc
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by MathWorks Inc filed Critical MathWorks Inc
Publication of EP2323031A2 publication Critical patent/EP2323031A2/en
Publication of EP2323031A3 publication Critical patent/EP2323031A3/en
Withdrawn legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/40Transformation of program code
    • G06F8/41Compilation
    • G06F8/43Checking; Contextual analysis
    • G06F8/433Dependency analysis; Data or control flow analysis
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/30Creation or generation of source code
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/445Program loading or initiating
    • G06F9/44521Dynamic linking or loading; Link editing at or after load time, e.g. Java class loading

Definitions

  • the present invention relates to applications and software components and more particularly to methods and systems for calling late bound functions from an early bound application.
  • Binding a function call in an application entails replacing a symbolic address for the function with a real machine address. Thus, the binding determines which function (i.e. the section of code that implements the function) to execute at runtime. When binding occurs during compilation, it is “early bound.” In contrast, when binding occurs at runtime, it is “late bound.” Programming languages may generally be categorized as being either early bound or late bound.
  • function call binding time i.e. early bound vs. late bound
  • performance of the code at runtime early binding is faster at runtime
  • ease of programming for the programmer late bound programs are easier to write.
  • a programmer must decide what is more important: the time it takes for the programmer to write the program or the time it takes for the program to execute. Unfortunately, this is often a difficult choice to make. There is no mechanism in conventional systems to balance the trade-off effectively.
  • the present invention provides a method and system for integrating late bound program functions into an external program environment.
  • the external program environment may be an early bound environment, a late bound environment, or some combination thereof.
  • a method is provided wherein a late bound application is integrated into an external program environment.
  • a late bound program and a late bound environment are provided and subsequently examined to determine which late bound calls exist within the late bound program and environment that should be made available to the external environment.
  • An interface is then generated, wherein the interface allows for the integration of the late bound function calls within the external program environment.
  • the external environment used in practicing this invention may be a late bound environment, an early bound environment or some combination thereof.
  • a system for integrating a late bound program language into an external environment comprising an external environment and a late bound program and program environment.
  • the external environment can be a late bound program environment, and early bound program environment or some combination thereof.
  • the late bound program environment contains a modular execution engine and an interface mechanism such that the interface mechanism allows for the expression of late bound semantics in an external environment compatible format.
  • a method for packaging executable late bound content into a re-distributable application for use with an external program environment is provided.
  • the external environment can be a late bound program environment, an early bound program environment or some combination thereof.
  • the method includes the steps of first examining the late bound content to determine which files in the late bound content represent a late bound application.
  • a late bound modular execution engine is further provided, wherein the modular execution engine contains only those functions which are necessary to support the late bound application. Furthermore the modular execution engine is configured to execute only those functions which are necessary to support the late bound application.
  • a network comprising a client and server
  • the server is capable of executing a late bound program environment and an external program environment.
  • Suitable external environments include, but are not limited to, late bound program environments, early bound program environments or some combination thereof.
  • the client is in communication with the server through the network.
  • An interface is generated such that the interface allows data exchange between the late bound program and program environment and the external program environment such that the late bound program application can be integrated into the external program environment.
  • a system for integrating a late bound application into an external environment wherein a distribution server is utilized for providing information to a client device. Additionally, an interface mechanism is provided wherein the interface mechanism allows for the integration of the late bound function calls into the external program environment.
  • the illustrative embodiment of the present invention provides a mechanism for applications existing within external program environments to invoke functions which exist in late bound languages.
  • the following description will be in reference to the integration of late bound functions into early bound external program environments. Alternate external environments exists, including but not limited to those containing early bound languages, late bound languages or some combination thereof.
  • the integration of late bound function within an early bound environment allows a programmer to choose when to make the trade-off of execution time versus ease of coding.
  • a programmer can use early bound function calls for performance critical potions of an application and use late bound function calls for functions that are difficult to program.
  • the integration of late bound function calls into an early bound programming environment provides a number of benefits in addition to providing the balancing of the trade-off described above.
  • the integration provides early bound programming environments with a way to take advantage of the expressive power of late binding.
  • the integration enables early bound programming environments to bind an early bound function call to a set of one or more late bound function calls.
  • it provides a way for large legacy systems to incorporate more modern programming methods, such as found with late bound function calls.
  • late bound function integration into late bound program environments offers numerous benefits not readily recognized when utilizing late bound function integration into early bound languages.
  • most late bound program languages are specialized for operation within a specific problem domain.
  • the LISP late bound language for example, is best suited for the symbolic processing of lists of strings.
  • the late bound PROLOG progaming language is suitable for theorem proving and logical inference problems.
  • the late bound MATLAB programming language in contrast, is suitable for operation within the numerical linear algebra domain.
  • the above late bound program languages are used solely as illustrative examples of applicable late bound program environments for use with the present invention. This list is not definitive, as one skilled in the art will readily recognize the existence of numerous alternative late bound program environments applicable to the present invention.
  • the present invention when integrating a late bound function call within a late bound environment, allows a user to form a program that combines calls to multiple late bound languages such that the most suitable language is used in solving the outstanding computing problem.
  • the illustrative embodiment will be described for illustrative purposes relative to a MATLAB® environment. Although the illustrative embodiment will be described relative to MATLAB®-based applications, the present invention may be applied to deploy and distribute applications generated in different programming and development environments, such as but not limited to Labview from National Instruments, Inc., LISP, or PROLOG.
  • RATLAB ® is an intuitive high performance language and technical computing environment.
  • MATLAB ® provides mathematical and graphical tools for data analysis, visualization and application development.
  • MATLAB ® integrates computation and programming in an easy-to-use environment where problems and solutions are expressed in familiar mathematical notation.
  • MATLAB ® is an interactive system whose basic data element is an array that does not require dimensioning. This allows users to solve many technical computing problems, especially those with matrix and vector formulations, in a fraction of the time it would take to write a program in a scalar non-interactive language, such as C and FORTRAN.
  • MATLAB ® provides application development tools including the MATLAB ® Compiler.
  • MATLAB ® Builder for COM and MATLAB ® Builder for Excel work in conjunction with the MATLAB ® Compiler to automatically generate objects that execute in COM and Excel environments.
  • the application development tools enable users to create and distribute MATLAB ® applications and share MATLAB ® work with colleagues who may use MATLAB ® or other environments.
  • FIGURE 1 illustrates one example embodiment of an electronic device 100 suitable for practicing the illustrative embodiments of the present invention.
  • the electronic device 100 is representative of a number of different technologies, such as personal computers (PCs), laptop computers, workstations, personal digital assistants (PDAs), Internet appliances, cellular telephones, and the like.
  • the electronic device 100 includes a central processing unit (CPU) 102 and a display device 104.
  • the display device 104 enables the electronic device 100 to communicate directly with a user through a visual display.
  • the electronic device 100 further includes a keyboard 106 and an input device such as a mouse 108.
  • Other potential input devices not depicted include but are not limited to a stylus, trackball, joystick, touch pad, touch screen, and the like.
  • the electronic device 100 includes primary storage 110 and secondary storage 112 for storing data and instructions.
  • the storage devices 110 and 112 can include but is not limited to such technologies as a floppy drive, hard drive, tape drive, optical drive, read only memory (ROM), random access memory (RAM), and the like.
  • Applications such as browsers, JAVA virtual machines, and other utilities and applications can be resident on one or both of the storage devices 110 and 112.
  • the electronic device 100 can also include a network interface 114 for communicating with one or more electronic devices external to the electronic device 100 depicted.
  • a modem is one form of network interface 114 for establishing a connection with an external electronic device or network.
  • the CPU 102 has either internally, or externally, attached thereto one or more of the aforementioned components.
  • modeling applications such as MATLAB® 116, can be installed and operated on the electronic device 100.
  • the electronic device 100 is merely representative of a structure for implementing the present invention.
  • the present invention is not limited to implementation on only the described device 100.
  • Other implementations can be utilized, including an implementation based partially or entirely in embedded code, where no user inputs or display devices are necessary. Rather, a processor can communicate directly with another processor or other device.
  • FIGURE 2 is an illustrative embodiment of a distributed network for use in practicing the present invention.
  • the system includes a client device 202 associated with a network 200. Additionally associated with the network is a server device 204, an interface mechanism 210 and a storage device 206.
  • the interface mechanism 210 is capable of integrating late bound function calls within an early bound program environment.
  • late bound function calls when programming within an object-oriented environment, is that it enables the developer to write code that does not have to be specific about the exact object types of objects that are manipulated.
  • the late bound function calls can support polymorphism.
  • the compiler in the early bound environment uses the interface mechanism 210 to allow for runtime execution of the late bound function that exists in the late bound environment.
  • the interface mechanism 210 serves as a kind of proxy for a set of late bound functions, one of which (depending on the types of the inputs at runtime) will be invoked at runtime.
  • the interface mechanism is illustrated as associated with the network 200, but one skilled in the art will readily recognize that the interface mechanism 210 can be additionally associated with the client device 202, the server 204 or some combination thereof.
  • the presented network embodiment is solely an exemplary sample and the functionality may be divided up in any number of ways over a network. For example, a plurality of clients may be associated with the server, a single client may be associated with several servers, or some combination thereof.
  • FIGURE 3 illustrates components used in practicing the illustrative embodiment of the present invention.
  • the components depicted in the illustrative embodiment provide for the integration of a late bound function into an early bound environment 300.
  • the early bound program environment is a Visual Studio ® program environment, as offered by Microsoft Corporation, of Redmond, Washington and the late bound functions are MATLAB ® functions.
  • the choice of MATLAB ® and Visual studio ® are selected solely for illustrative purposes. Numerous alternative early and late bound languages may be utilized in practicing the present invention.
  • late bound interface functions 304 and 306 that are early bound functions that reside within the early bound environment 300.
  • the names and implementations of these interface functions 304 and 306 are completely determined at compile time.
  • these interface functions 304 and 306 invoke late bound functions.
  • late bound interface function 304 invokes a set of one or more late bound functions 308 via a modular late bound execution engine 302 (described in more detail below).
  • late bound interface function 306 invokes a set of one or more late bound functions 310 via the modular late bound execution engine 302.
  • the late bound interface functions 304 and 306 may cause more than one late bound function to be executed (see 308 and 310). There may be instances in which a late bound interface function is associated with a single late bound function and other instances wherein multiple late bound functions are associated with a single late bound interface function. Moreover, depending upon the type of input provided to the interface function, each invocation can result in a call to a different late bound function in the associated set.
  • the interface mechanism in one embodiment, can be realized through an Application Program Interface (API) having functions that may be called from the early bound application.
  • API Application Program Interface
  • the API can be used to initiate a call to a function in the late bound environment.
  • an API running in a C program environment can call functions in a MATLAB ® late bound environment.
  • the API can be a standalone executable program that does not require a secondary program to operate. From the perspective of an application running in the early bound C language, for example, the function called in the late bound MATLAB ® application appears to be a traditional function call, where the function and its arguments are understood and the outputs are passed in a similar manner as any existing function.
  • the interface mechanism while described as an API by example, is not limited to use with an API, and in the alternative may be a software or hardware component running in the early or late bound environment.
  • the interface mechanism is capable of automatically expressing the semantics of the late bound programming environment in a format readily recognized by the early bound programming environment at runtime and as set forth prior may take the appropriate form for expressing said semantics.
  • the modular late bound execution engine 302 provides a mechanism for executing functions that exists in a late bound environment. As these are late bound functions, they are bound at runtime in the late bound environment. In situations where the late bound environment is a MATLAB ® environment, the modular late bound execution engine may be a MATLAB ® component runtime engine.
  • the MATLAB ® component runtime engine is a stand-alone set of shared libraries that enables execution of M-files, MEX-files and other types of MATLAB executable content.
  • MATLAB ® component runtime engine as a modular execution engine, there is no need to open the MATLAB ® computation runtime engine in a new window visible to the user when executing a function in the late bound environment; rather the component runtime engine can execute in the background in a manner that is not visible to the user.
  • the present invention is not limited to solely a MATLAB ® application and MATLAB ® component runtime engine, and may be practiced with numerous substitute late bound environments and execution engines.
  • the modular late bound execution engine 302 is such that following the execution of a late bound interface function call 304 or 306 in the early bound environment 300, the modular late bound execution engine 302 can either remain running or can be terminated. Allowing the modular late bound execution engine 302 to remain running allows for subsequent function execution in the late bound environment for calls from within the early bound environment 300 to occur more quickly, and it is no longer necessary to initiate the module late bound execution engine 302. In the alternative, terminating the modular late bound execution engine 302 after executing late bound functions, controlled from within the early bound environment 300, decreases processor demand and resource allocation, and the resources associated with the modular late bound execution engine 302 are free upon termination of the modular execution engine 300. (THAT EXISTS)
  • the example is a MATLAB ® function from within a late bound program environment (e.g. MATLAB ® that is used to add 10 to any input number.
  • the function is named plus 10 and is defined as follows:
  • the first file listed below is a header file libplus.h. This header file is followed below by the file libplus.c.
  • the function mlfPlus10 an example of an interface function that a C program calls to access the MATLAB ® functionality provided by the plus 10 function.
  • the process is both streamlined and simultaneously provides a suitable mechanism for integration of a late bound function into an early bound environment with minimal user interaction.
  • the calling of the original late bound function appears as the calling of any other ordinary function from within the early bound environment.
  • the early bound environment continues to process early bound functions as usual, thereby offering increased function execution speed.
  • FIGURE 4 shows interaction of components in the illustrative embodiment in more detail.
  • a user develops a late bound application or component using the late bound environment 400.
  • this application or component is represented as the user written late bound function suite 402, having late bound functions 404A and 404B.
  • the late bound environment 400 is MATLAB ® and that the late bound functions are MATLAB ® functions.
  • the user then invokes the MATLAB ® compiler 406 to generate a deployable form of his application or component.
  • the MATLAB ® Compiler 406 examines the input files to determine the appropriate form for early bound interface files that will be generated to call the late bound functions 404A and 404B.
  • the choice of early bound environment may additionally influence the form of the generated early bound interface.
  • the MATLAB ® Compiler examines the input files to determine dependencies on other late bound functions in the late bound environment 400.
  • the MATLAB ® compiler then packages all the necessary late bound functions into a Component Technology File (CTF) archive 410 and generates appropriate early bound interface functions 408.
  • CTF archive is used to contain all executable content (i.e. M-files or Mex-files) associated with a component.
  • the CTF archives also contain any data files the application requires such that a "snapshot" of all the information required for program execution is generated.
  • the contents of a CTF archive are encrypted.
  • FIGURE 5 is a flow chart that illustrates the steps that are performed to determine dependencies on other late bound functions.
  • the steps recited in FIGURE 5 can be utilized in computing the transitive closure of a function call tree.
  • the process begins with the user providing a set of input files where each input file contains one or more late bound functions (Step 500).
  • the MATLAB ® Compiler examines each late bound function that is provided with the set of input files in Step 500 to determine what additional functions are invoked by the late bound functions (Step 502).
  • the Compiler looks at the function call tree that is generated during compilation.
  • Each of the functions identified in Step 502 may have dependencies that are explicitly recorded in a dependency database. This database may indicate, for example, that a particular function requires one or more additional functions in order to operate properly.
  • the dependency analyzer adds these functions to the list of necessary functions (Step 504). Steps 502 and 504 are repeated until there are no further functions added to the list (Step 506). In Step 508, certain functions or groups of functions are explicitly excluded from the list. The exclusion of functions can be motivated by numerous reasons. For example, function exclusion can occur based upon predefined business reasons, wherein particular files or functions are not distributed with a final deployed application for security concerns and protection of intellectual property. Additionally, functions may be excluded to prevent the unintended inclusion of functions known to be unnecessary. These functions occasionally are inadvertently included in the list of necessary functions (step 504) due to inherent imprecision in some dependency determining mechanisms.
  • the "late bound modular execution engine” typically contains a fixed, base set of late bound functions associated with the late bound modular execution engine. This base set of functions is, by definition, available everywhere the execution engine is installed, therefore, it is unnecessary to include these functions in a deployed application. Using the current exclusion mechanism, a final deployed application may be significantly smaller in size and more readily managed by a user.
  • a user can provide input at step 504 and 508 wherein they explicitly state dependencies and explicitly state exclusions. Additionally, control of the list of necessary function, in whole or in part, may be manipulated by a user.
  • the output of the dependency analyzer is the final list of late bound functions that comprise the application. These functions are used by the compiler in conjunction with user defined data, such as input data and switches, to determine which interface functions should be generated, as well as the form of these generated functions.
  • the generated early bound interface functions 408 ( FIGURE 4 ) are combined with optional user written early bound language code 416 and the data type creation API 418 to create an early bound application or component 414.
  • the final user application or component 414 calls the data type creation API 418 to create data which is late bound environment compatible from data which is contained within the external environment.
  • the external environment is an early bound programming environment.
  • the data type creation API 418 then identifies this newly created data to the final user application or component 414. The identifying of this data may occur using a "handle” or a "proxy”, as understood by one skilled in the art.
  • the final user application or component 414 then invokes an early bound interface function 408 which in turn calls the modular late bound execution engine 420.
  • Compatible data created from the external environment data, as well as the name of the early bound interface function 408, is then passed to a modular execution engine 420 such that the modular execution engine can combine both the data and the function name (i.e. late binding) to choose the appropriate function from the set contained in the CTF archive 410.
  • the result of the modular late bound execution engine 420 is then returned to the final user application or component 414.
  • the illustrative embodiment of the present invention provides data types that enable the late bound functions to be called from the early environment. These data types allow the early language to represent the types of data present in the late bound language. These data types may be part of an interface library that is provided to the user.
  • an encryption/decryption schema Further associated with each invocation of the compiler 406 may be an encryption/decryption schema.
  • a unique encryption/ decryption key is generated upon invocation of the compiler. This key may be secured using available public key encryption means such as the Advanced Encryption Standard (AES) as used by the United States government.
  • AES Advanced Encryption Standard
  • One skilled in the art will readily recognize that numerous alternate encryption / decryption means exist which are readily available for use with the present invention.
  • the unique key is decrypted and used in decrypting the required files in the CTF archive. In one embodiment, decryption of files only occurs as the file is needed, thereby preventing the storage of decrypted information on disk.
  • an encryption / decryption scheme such as this provides for the protection of the code developed by those building applications.
  • the files used in the CTF archive are encrypted, they may be shared or distributed while simultaneously protecting that which is contained within them. For example, a file containing company trade secrets can be distributed in an encrypted manner such that this trade secret is not revealed to a user.
  • a file containing company trade secrets can be distributed in an encrypted manner such that this trade secret is not revealed to a user.
  • an end user cannot readily modify the files such that program execution is affected.
  • files are encrypted and decrypted based upon a unique key generated by the compiler, files used in one application cannot be used in another application.
  • the tracing of pirated software can be accomplished using the present encryption / decryption mechanisms as each generated application can be analyzed to determine which compiler license key generated the application.
  • the compiler license key is known, it is possible to cross reference that license key to a list of licensees to determine the source of the pirated software.
  • FIGURE 6 is an illustrative embodiment of the components necessary for the integration of a late bound function call into a late bound program environment 600.
  • the late bound program environment is a LISP program environment
  • the late bound functions are MATLAB ® functions.
  • Such late bound function and language selections are for illustrative purposes only, as one skilled in the art will readily recognize that numerous alternative late bound functions and languages exist.
  • the MATLAB ® compiler when the late bound functions are MATLAB ® functions, the MATLAB ® compiler generates late bound interface functions 604 and 606 that are late bound functions that reside within the late bound environment 600. At runtime, these interface functions 604 and 606 are utilized in invoking late bound functions using a modular late bound execution engine 602. As additionally illustrated in FIGURE 6 , the late bound interface functions 604 and 606 may cause more than one late bound function to be executed (see 608 and 610). There may be instances in which a late bound interface function is associated with a single late bound function and other instances wherein multiple late bound functions are associated with a single late bound interface function. Additionally, based upon the input type or types provided to the interface function, each invocation can result in a call to a different late bound function in the associated set.
  • the interface mechanism can be an Application Program Interface (API) having functions that may be called from the late bound application.
  • API Application Program Interface
  • the API can be a standalone executable program that does not require a secondary program to operate.
  • the interface function can be a software or hardware component.
  • the modular late bound execution engine 602 provides a mechanism for executing functions at runtime, where the functions exist in a late bound environment.
  • the modular late bound execution engine may be a MATLAB ® component runtime engine capable of execution of M-files, MEX-files and other MATLAB ® executable content.
  • the present invention is not limited to solely a MATLAB ® application and MATLAB ® component runtime engine, and may be practiced with numerous substitute late bound environments and execution engines.
  • the modular late bound execution engine 602 is such that following the execution of a late bound interface function call 604 or 606 in the late bound environment 600, the modular late bound execution engine 602 can either remain running, such that subsequent function execution in the late bound environment can readily occur, or it can be terminated.

Abstract

The present invention is directed toward automatically integrating a late bound program language into an external environment. The external environment may be an early bound environment, a late bound environment or some combination thereof. Associated with the late bound program environment is a modular execution engine and an interface mechanism, wherein the interface mechanism is capable of expressing late bound semantics in a format compatible with the external environment.

Description

    Related Application
  • This application claims the benefit of U.S. Patent Application Serial No. 11/144411, filed June 2, 2005 , the contents of which are hereby incorporated by reference.
  • Field of the Invention
  • The present invention relates to applications and software components and more particularly to methods and systems for calling late bound functions from an early bound application.
  • Background of the Invention
  • Binding a function call in an application entails replacing a symbolic address for the function with a real machine address. Thus, the binding determines which function (i.e. the section of code that implements the function) to execute at runtime. When binding occurs during compilation, it is "early bound." In contrast, when binding occurs at runtime, it is "late bound." Programming languages may generally be categorized as being either early bound or late bound.
  • The choice of function call binding time (i.e. early bound vs. late bound) is a trade-off between performance of the code at runtime (early binding is faster at runtime) and ease of programming for the programmer (late bound programs are easier to write). Currently, a programmer must decide what is more important: the time it takes for the programmer to write the program or the time it takes for the program to execute. Unfortunately, this is often a difficult choice to make. There is no mechanism in conventional systems to balance the trade-off effectively.
  • Summary of the Invention
  • The present invention provides a method and system for integrating late bound program functions into an external program environment. The external program environment may be an early bound environment, a late bound environment, or some combination thereof.
  • In accordance with a first aspect of the present invention, a method is provided wherein a late bound application is integrated into an external program environment. A late bound program and a late bound environment are provided and subsequently examined to determine which late bound calls exist within the late bound program and environment that should be made available to the external environment. An interface is then generated, wherein the interface allows for the integration of the late bound function calls within the external program environment. The external environment used in practicing this invention may be a late bound environment, an early bound environment or some combination thereof.
  • In another aspect of the present invention a system for integrating a late bound program language into an external environment is provided, wherein the system comprises an external environment and a late bound program and program environment. The external environment can be a late bound program environment, and early bound program environment or some combination thereof. The late bound program environment contains a modular execution engine and an interface mechanism such that the interface mechanism allows for the expression of late bound semantics in an external environment compatible format.
  • In a further aspect of the present invention, a method for packaging executable late bound content into a re-distributable application for use with an external program environment is provided. The external environment can be a late bound program environment, an early bound program environment or some combination thereof. The method includes the steps of first examining the late bound content to determine which files in the late bound content represent a late bound application. A late bound modular execution engine is further provided, wherein the modular execution engine contains only those functions which are necessary to support the late bound application. Furthermore the modular execution engine is configured to execute only those functions which are necessary to support the late bound application.
  • In another aspect of the present invention, a network comprising a client and server is provided wherein the server is capable of executing a late bound program environment and an external program environment. Suitable external environments include, but are not limited to, late bound program environments, early bound program environments or some combination thereof. The client is in communication with the server through the network. An interface is generated such that the interface allows data exchange between the late bound program and program environment and the external program environment such that the late bound program application can be integrated into the external program environment.
  • In an alternate aspect of the present invention, a system for integrating a late bound application into an external environment is recited wherein a distribution server is utilized for providing information to a client device. Additionally, an interface mechanism is provided wherein the interface mechanism allows for the integration of the late bound function calls into the external program environment.
  • Brief Description of the Figures
    • FIGURE 1 is a block diagram representation of an electronic device suitable for practicing the illustrative embodiment of the present invention.
    • FIGURE 2 illustrates a client-server environment suitable for practicing the illustrative embodiment of the present invention wherein a late bound function can be incorporated into an external programming environment.
    • FIGURE 3 illustrates components used in practicing the illustrative embodiment of the present invention.
    • FIGURE 4 is a graphical example of the interaction of components in the illustrative embodiment in more detail.
    • FIGURE 5 is a flow chart that illustrates the steps that are performed to determine dependencies on other late bound functions.
    • FIGURE 6 is an illustrative embodiment of the necessary components for use in integrating a late bound function call into a late bound program environment.
    Detailed Description of the Invention
  • The illustrative embodiment of the present invention provides a mechanism for applications existing within external program environments to invoke functions which exist in late bound languages. For the purposes of illustration, the following description will be in reference to the integration of late bound functions into early bound external program environments. Alternate external environments exists, including but not limited to those containing early bound languages, late bound languages or some combination thereof. In the present example, the integration of late bound function within an early bound environment allows a programmer to choose when to make the trade-off of execution time versus ease of coding. Thus, a programmer can use early bound function calls for performance critical potions of an application and use late bound function calls for functions that are difficult to program.
  • The integration of late bound function calls into an early bound programming environment provides a number of benefits in addition to providing the balancing of the trade-off described above. First, the integration provides early bound programming environments with a way to take advantage of the expressive power of late binding. Second, the integration enables early bound programming environments to bind an early bound function call to a set of one or more late bound function calls. Third, it provides a way for large legacy systems to incorporate more modern programming methods, such as found with late bound function calls.
  • In the alternative, late bound function integration into late bound program environments offers numerous benefits not readily recognized when utilizing late bound function integration into early bound languages. For example, most late bound program languages are specialized for operation within a specific problem domain. The LISP late bound language, for example, is best suited for the symbolic processing of lists of strings. In comparison, the late bound PROLOG progaming language is suitable for theorem proving and logical inference problems. The late bound MATLAB programming language, in contrast, is suitable for operation within the numerical linear algebra domain. The above late bound program languages are used solely as illustrative examples of applicable late bound program environments for use with the present invention. This list is not definitive, as one skilled in the art will readily recognize the existence of numerous alternative late bound program environments applicable to the present invention.
  • The present invention, when integrating a late bound function call within a late bound environment, allows a user to form a program that combines calls to multiple late bound languages such that the most suitable language is used in solving the outstanding computing problem.
  • The illustrative embodiment will be described for illustrative purposes relative to a MATLAB® environment. Although the illustrative embodiment will be described relative to MATLAB®-based applications, the present invention may be applied to deploy and distribute applications generated in different programming and development environments, such as but not limited to Labview from National Instruments, Inc., LISP, or PROLOG.
  • RATLAB® is an intuitive high performance language and technical computing environment. MATLAB® provides mathematical and graphical tools for data analysis, visualization and application development. MATLAB® integrates computation and programming in an easy-to-use environment where problems and solutions are expressed in familiar mathematical notation. MATLAB® is an interactive system whose basic data element is an array that does not require dimensioning. This allows users to solve many technical computing problems, especially those with matrix and vector formulations, in a fraction of the time it would take to write a program in a scalar non-interactive language, such as C and FORTRAN. MATLAB® provides application development tools including the MATLAB® Compiler. MATLAB® Builder for COM and MATLAB® Builder for Excel work in conjunction with the MATLAB® Compiler to automatically generate objects that execute in COM and Excel environments. The application development tools enable users to create and distribute MATLAB® applications and share MATLAB® work with colleagues who may use MATLAB® or other environments.
  • FIGURE 1 illustrates one example embodiment of an electronic device 100 suitable for practicing the illustrative embodiments of the present invention. The electronic device 100 is representative of a number of different technologies, such as personal computers (PCs), laptop computers, workstations, personal digital assistants (PDAs), Internet appliances, cellular telephones, and the like. In the illustrated embodiment, the electronic device 100 includes a central processing unit (CPU) 102 and a display device 104. The display device 104 enables the electronic device 100 to communicate directly with a user through a visual display. The electronic device 100 further includes a keyboard 106 and an input device such as a mouse 108. Other potential input devices not depicted include but are not limited to a stylus, trackball, joystick, touch pad, touch screen, and the like. The electronic device 100 includes primary storage 110 and secondary storage 112 for storing data and instructions. The storage devices 110 and 112 can include but is not limited to such technologies as a floppy drive, hard drive, tape drive, optical drive, read only memory (ROM), random access memory (RAM), and the like. Applications such as browsers, JAVA virtual machines, and other utilities and applications can be resident on one or both of the storage devices 110 and 112. The electronic device 100 can also include a network interface 114 for communicating with one or more electronic devices external to the electronic device 100 depicted. A modem is one form of network interface 114 for establishing a connection with an external electronic device or network. The CPU 102 has either internally, or externally, attached thereto one or more of the aforementioned components. In addition to applications previously mentioned, modeling applications, such as MATLAB® 116, can be installed and operated on the electronic device 100.
  • It should be noted that the electronic device 100 is merely representative of a structure for implementing the present invention. However, one of ordinary skill in the art will appreciate that the present invention is not limited to implementation on only the described device 100. Other implementations can be utilized, including an implementation based partially or entirely in embedded code, where no user inputs or display devices are necessary. Rather, a processor can communicate directly with another processor or other device.
  • FIGURE 2 is an illustrative embodiment of a distributed network for use in practicing the present invention. The system includes a client device 202 associated with a network 200. Additionally associated with the network is a server device 204, an interface mechanism 210 and a storage device 206. The interface mechanism 210 is capable of integrating late bound function calls within an early bound program environment.
  • One of the advantages of using late bound function calls, when programming within an object-oriented environment, is that it enables the developer to write code that does not have to be specific about the exact object types of objects that are manipulated. In other words, the late bound function calls can support polymorphism.
  • Using the interface mechanism 210 of the present invention, during compile time, when an early bound compiler encounters a late bound function that exists in a late bound environment, the compiler in the early bound environment, using the interface mechanism 210, allows for runtime execution of the late bound function that exists in the late bound environment. The interface mechanism 210 serves as a kind of proxy for a set of late bound functions, one of which (depending on the types of the inputs at runtime) will be invoked at runtime.
  • Furthermore, for illustrative purposes the interface mechanism is illustrated as associated with the network 200, but one skilled in the art will readily recognize that the interface mechanism 210 can be additionally associated with the client device 202, the server 204 or some combination thereof. One skilled in the art will further recognize that the presented network embodiment is solely an exemplary sample and the functionality may be divided up in any number of ways over a network. For example, a plurality of clients may be associated with the server, a single client may be associated with several servers, or some combination thereof.
  • FIGURE 3 illustrates components used in practicing the illustrative embodiment of the present invention. The components depicted in the illustrative embodiment provide for the integration of a late bound function into an early bound environment 300. In one example case, the early bound program environment is a Visual Studio ® program environment, as offered by Microsoft Corporation, of Redmond, Washington and the late bound functions are MATLAB® functions. The choice of MATLAB® and Visual studio ® are selected solely for illustrative purposes. Numerous alternative early and late bound languages may be utilized in practicing the present invention.
  • In the illustrative case, when the late bound functions are MATLAB® functions, the MATLAB® compiler generates late bound interface functions 304 and 306 that are early bound functions that reside within the early bound environment 300. The names and implementations of these interface functions 304 and 306 are completely determined at compile time. At runtime, these interface functions 304 and 306 invoke late bound functions. Specifically, late bound interface function 304 invokes a set of one or more late bound functions 308 via a modular late bound execution engine 302 (described in more detail below). Similarly, late bound interface function 306 invokes a set of one or more late bound functions 310 via the modular late bound execution engine 302. Hence, a mechanism is provided by which an early bound environment 300 can delay function binding until runtime for selected functions.
  • As can be seen in FIGURE 3, the late bound interface functions 304 and 306 may cause more than one late bound function to be executed (see 308 and 310). There may be instances in which a late bound interface function is associated with a single late bound function and other instances wherein multiple late bound functions are associated with a single late bound interface function. Moreover, depending upon the type of input provided to the interface function, each invocation can result in a call to a different late bound function in the associated set.
  • The interface mechanism, in one embodiment, can be realized through an Application Program Interface (API) having functions that may be called from the early bound application. The API can be used to initiate a call to a function in the late bound environment. For example, an API running in a C program environment can call functions in a MATLAB® late bound environment. In the alternative, the API can be a standalone executable program that does not require a secondary program to operate. From the perspective of an application running in the early bound C language, for example, the function called in the late bound MATLAB® application appears to be a traditional function call, where the function and its arguments are understood and the outputs are passed in a similar manner as any existing function.
  • The interface mechanism, while described as an API by example, is not limited to use with an API, and in the alternative may be a software or hardware component running in the early or late bound environment. The interface mechanism is capable of automatically expressing the semantics of the late bound programming environment in a format readily recognized by the early bound programming environment at runtime and as set forth prior may take the appropriate form for expressing said semantics.
  • The modular late bound execution engine 302 provides a mechanism for executing functions that exists in a late bound environment. As these are late bound functions, they are bound at runtime in the late bound environment. In situations where the late bound environment is a MATLAB® environment, the modular late bound execution engine may be a MATLAB® component runtime engine. The MATLAB® component runtime engine is a stand-alone set of shared libraries that enables execution of M-files, MEX-files and other types of MATLAB executable content. With the MATLAB® component runtime engine as a modular execution engine, there is no need to open the MATLAB® computation runtime engine in a new window visible to the user when executing a function in the late bound environment; rather the component runtime engine can execute in the background in a manner that is not visible to the user.
  • The present invention is not limited to solely a MATLAB® application and MATLAB® component runtime engine, and may be practiced with numerous substitute late bound environments and execution engines.
  • The modular late bound execution engine 302 is such that following the execution of a late bound interface function call 304 or 306 in the early bound environment 300, the modular late bound execution engine 302 can either remain running or can be terminated. Allowing the modular late bound execution engine 302 to remain running allows for subsequent function execution in the late bound environment for calls from within the early bound environment 300 to occur more quickly, and it is no longer necessary to initiate the module late bound execution engine 302. In the alternative, terminating the modular late bound execution engine 302 after executing late bound functions, controlled from within the early bound environment 300, decreases processor demand and resource allocation, and the resources associated with the modular late bound execution engine 302 are free upon termination of the modular execution engine 300. (THAT EXISTS)
  • An example is helpful to illustrate operation of the illustrative embodiment. The example is a MATLAB® function from within a late bound program environment (e.g. MATLAB® that is used to add 10 to any input number. The function is named plus 10 and is defined as follows:
    • function s = plus 10(x)
    • s = x + 10;
    • disp([num2str(x) ' + 10 =' num2str(s)]);
  • Set forth below are the source files for a C function library automatically generated by the MATLAB® Compiler from the M file plus10.m that contains the function plus10. The first file listed below is a header file libplus.h. This header file is followed below by the file libplus.c. The function mlfPlus10 an example of an interface function that a C program calls to access the MATLAB® functionality provided by the plus 10 function.
    Here is the header file:
#ifndef_libplus_h
 #define_libplus_h 1
 #include "mclmcr.h"
 #ifdcf_cplusplus
 extern "C" {
 #endif
 extern bool libplusInitializeWithHadlers(niclOutputHandlerFcn error_handler,
                      mclOutputHandlerFcn print_handler);
 extern bool libpluslnitialize(void);
 extern void libplusTerminate(void);
 extern void mlxPlus10(int nlhs, mxArray *plhs[], int nrhs, mxArray *prhs[];
 extern void mlfPlus10(int nargout, mxArray **s, mxArray *x);
 #ifdef_cplusplus
 }
 #endif
 #endif
Here is the libplus.c file:
#include <stdio.h>
 #inc1ude"mclmcr.h"
 #include "libplus.h"
 #ifdef cplusplus
 extern "C" {
 #endif
 extern const unsigned char _MCC COMPONENT_public_ data[];
 extern const char *_MCC_COMPONENT_name_data;
 extern const char *_MCC_COMPONENT_root_data:
 extern const unsigned char _MCC_COMPONENT_session_data[];
 extern const char *_MCC COMPONENT_matlabpath_data[];
 extern const int _MCC_COMPONENT_matlabpath_data_count:
 extern const char *_MCC_COMPONENT_mcr_runtime_options[];
 extern const int _MCC_COMPONENT_mcr_runtime_option_count;
 extern const char *_MCC_COMPONENT_mcr_application_options[];
 extern const int _MCC_COMPONENT_mcr_application_option_count;
 #ifdef _cplusplus
 }
 #endif
 static HMCRINSTANCE _mcr_inst = NULL;
 static int mclDefaultErrorHandler(const char *s)
 {
  return fprintf(stderr, s);
 }
 static int inclDefaultPriniHandler(const char *s)
 {
  return fprintf(stdout, s);
 }
 bool libpluslnitializeWithHandlers(
  mclOutputHandlerFcn error_handler,
  mclOutputHandlerFcn print_handler
 )
 {
 return (_mcr_inst == NULL ?
     mcllnitializeComponentlnstance(&_mcr_inst,
                      _MCC_COMPONENT_public_data,
                      _MCC_COMPONENT_name_data,
                      _MCC_COMPONENT_root_data.
                      _MCC_COMPONENT_session_data,
                      _MCC_COMPONENT_matlabpath_data,
              _MCC_COMPONENT_matlabpath_data_count,
                      _MCC_COMPONENT_mcr_runtime_options,
                      _MCC_COMPONENT_mcr_runtime_option_count,
                      true, NoObjectType, LibTarget,
                      NULL, error_handler, print_handler)
       : true);
 }
 bool libpluslnitialize(void)
 {
  return libpluslnitializeWithHandlers(mc1DefaultErrorHandler,
                      mclDefaultPrintHandler);
 }
 void libplusTerminate(void)
 {
  if (_mcr_inst != NULL)
   mclTerminatelnstance(&_mcr_inst);
 }
 void m1xPlus10(int nlhs, mxArray *plhs[], int nrhs, mxArray*prhs[])
 {
  mc1Feval(_mcr_inst, "plus10", nlhs, plhs, nrhs, prhs);
 }
 void mifPlus10(int nargout, mxArray **s, mxArray *x)
 {
 mc1M1fFevat(_mcr_inst, "plusiO", nargout, 1, 1, s, x);
 }
  • The calling of the aforementioned interface function m1xPlus10 from within an early bound programming environment, such as C, is illustrated in the following code.
  •  #include <stdio.h>
     #include "matrix, h"
     #include "libplus.h"
     void usage(char *name)
      printf("Usage: %s integer\n", name);
      printf("\tAdds 10 to the given integer\n");
      exit(-1);
     }
     int main(int ac, char *av[])
     {
     mxArray *input = mxCreateDoubleScalar(atoi(av[1]));
      mxArray *output = NULL;
     double result;
     if (ac != 2) usage(av[0]);
      mcllnitializeApplication(NULL, 0);
     libplustnitialize():
      m1xPlus10(1, &output, 1, &input);
     libplusTerminate();
     result = mxGetScalar(output);
     printf("%s + 10 = %.0f\n", av[1], result);
     melTerminateApplication():
     return 0;
     }
  • The aforementioned code is written for use in the C programming language, but one skilled in the art will readily recognize that numerous alternative early bound environments exist for practicing the present invention.
  • As evidenced by the method for calling the late bound function set forth above, the process is both streamlined and simultaneously provides a suitable mechanism for integration of a late bound function into an early bound environment with minimal user interaction. The calling of the original late bound function (plus10.m) appears as the calling of any other ordinary function from within the early bound environment. Furthermore the early bound environment continues to process early bound functions as usual, thereby offering increased function execution speed.
  • FIGURE 4 shows interaction of components in the illustrative embodiment in more detail. Initially, a user develops a late bound application or component using the late bound environment 400. In FIGURE 4, this application or component is represented as the user written late bound function suite 402, having late bound functions 404A and 404B. For purposes of illustration, it is supposed that the late bound environment 400 is MATLAB® and that the late bound functions are MATLAB® functions. The user then invokes the MATLAB® compiler 406 to generate a deployable form of his application or component. The MATLAB® Compiler 406 examines the input files to determine the appropriate form for early bound interface files that will be generated to call the late bound functions 404A and 404B. Furthermore, the choice of early bound environment, may additionally influence the form of the generated early bound interface. The MATLAB® Compiler examines the input files to determine dependencies on other late bound functions in the late bound environment 400. The MATLAB® compiler then packages all the necessary late bound functions into a Component Technology File (CTF) archive 410 and generates appropriate early bound interface functions 408. A CTF archive is used to contain all executable content (i.e. M-files or Mex-files) associated with a component. The CTF archives also contain any data files the application requires such that a "snapshot" of all the information required for program execution is generated. The contents of a CTF archive are encrypted.
  • FIGURE 5 is a flow chart that illustrates the steps that are performed to determine dependencies on other late bound functions. In one embodiment the steps recited in FIGURE 5 can be utilized in computing the transitive closure of a function call tree. The process begins with the user providing a set of input files where each input file contains one or more late bound functions (Step 500). The MATLAB® Compiler examines each late bound function that is provided with the set of input files in Step 500 to determine what additional functions are invoked by the late bound functions (Step 502). The Compiler looks at the function call tree that is generated during compilation. Each of the functions identified in Step 502 may have dependencies that are explicitly recorded in a dependency database. This database may indicate, for example, that a particular function requires one or more additional functions in order to operate properly. The dependency analyzer adds these functions to the list of necessary functions (Step 504). Steps 502 and 504 are repeated until there are no further functions added to the list (Step 506). In Step 508, certain functions or groups of functions are explicitly excluded from the list. The exclusion of functions can be motivated by numerous reasons. For example, function exclusion can occur based upon predefined business reasons, wherein particular files or functions are not distributed with a final deployed application for security concerns and protection of intellectual property. Additionally, functions may be excluded to prevent the unintended inclusion of functions known to be unnecessary. These functions occasionally are inadvertently included in the list of necessary functions (step 504) due to inherent imprecision in some dependency determining mechanisms. Finally, the "late bound modular execution engine" typically contains a fixed, base set of late bound functions associated with the late bound modular execution engine. This base set of functions is, by definition, available everywhere the execution engine is installed, therefore, it is unnecessary to include these functions in a deployed application. Using the current exclusion mechanism, a final deployed application may be significantly smaller in size and more readily managed by a user. A user can provide input at step 504 and 508 wherein they explicitly state dependencies and explicitly state exclusions. Additionally, control of the list of necessary function, in whole or in part, may be manipulated by a user.
  • The output of the dependency analyzer is the final list of late bound functions that comprise the application. These functions are used by the compiler in conjunction with user defined data, such as input data and switches, to determine which interface functions should be generated, as well as the form of these generated functions.
  • The generated early bound interface functions 408 (FIGURE 4) are combined with optional user written early bound language code 416 and the data type creation API 418 to create an early bound application or component 414.
  • At runtime the final user application or component 414 calls the data type creation API 418 to create data which is late bound environment compatible from data which is contained within the external environment. In the present embodiment the external environment is an early bound programming environment. The data type creation API 418 then identifies this newly created data to the final user application or component 414. The identifying of this data may occur using a "handle" or a "proxy", as understood by one skilled in the art.
  • The final user application or component 414 then invokes an early bound interface function 408 which in turn calls the modular late bound execution engine 420. Compatible data created from the external environment data, as well as the name of the early bound interface function 408, is then passed to a modular execution engine 420 such that the modular execution engine can combine both the data and the function name (i.e. late binding) to choose the appropriate function from the set contained in the CTF archive 410. The result of the modular late bound execution engine 420 is then returned to the final user application or component 414.
  • The illustrative embodiment of the present invention provides data types that enable the late bound functions to be called from the early environment. These data types allow the early language to represent the types of data present in the late bound language. These data types may be part of an interface library that is provided to the user.
  • Further associated with each invocation of the compiler 406 may be an encryption/decryption schema. In one embodiment, upon invocation of the compiler a unique encryption/ decryption key is generated. This key may be secured using available public key encryption means such as the Advanced Encryption Standard (AES) as used by the United States government. One skilled in the art will readily recognize that numerous alternate encryption / decryption means exist which are readily available for use with the present invention. At runtime, the unique key is decrypted and used in decrypting the required files in the CTF archive. In one embodiment, decryption of files only occurs as the file is needed, thereby preventing the storage of decrypted information on disk.
  • The use of an encryption / decryption scheme such as this provides for the protection of the code developed by those building applications. As the files used in the CTF archive are encrypted, they may be shared or distributed while simultaneously protecting that which is contained within them. For example, a file containing company trade secrets can be distributed in an encrypted manner such that this trade secret is not revealed to a user. Additionally as the files used in the application are encrypted, an end user cannot readily modify the files such that program execution is affected. Furthermore, as files are encrypted and decrypted based upon a unique key generated by the compiler, files used in one application cannot be used in another application. Finally, the tracing of pirated software can be accomplished using the present encryption / decryption mechanisms as each generated application can be analyzed to determine which compiler license key generated the application. Thus, once the compiler license key is known, it is possible to cross reference that license key to a list of licensees to determine the source of the pirated software.
  • FIGURE 6 is an illustrative embodiment of the components necessary for the integration of a late bound function call into a late bound program environment 600. In one example case, the late bound program environment is a LISP program environment, and the late bound functions are MATLAB® functions. Such late bound function and language selections are for illustrative purposes only, as one skilled in the art will readily recognize that numerous alternative late bound functions and languages exist.
  • In the illustrative case, when the late bound functions are MATLAB® functions, the MATLAB® compiler generates late bound interface functions 604 and 606 that are late bound functions that reside within the late bound environment 600. At runtime, these interface functions 604 and 606 are utilized in invoking late bound functions using a modular late bound execution engine 602. As additionally illustrated in FIGURE 6, the late bound interface functions 604 and 606 may cause more than one late bound function to be executed (see 608 and 610). There may be instances in which a late bound interface function is associated with a single late bound function and other instances wherein multiple late bound functions are associated with a single late bound interface function. Additionally, based upon the input type or types provided to the interface function, each invocation can result in a call to a different late bound function in the associated set.
  • In one embodiment the interface mechanism can be an Application Program Interface (API) having functions that may be called from the late bound application. In the alternative, the API can be a standalone executable program that does not require a secondary program to operate. Additionally, the interface function can be a software or hardware component.
  • The modular late bound execution engine 602 provides a mechanism for executing functions at runtime, where the functions exist in a late bound environment. In a MATLAB® environment, the modular late bound execution engine may be a MATLAB® component runtime engine capable of execution of M-files, MEX-files and other MATLAB ® executable content. The present invention is not limited to solely a MATLAB® application and MATLAB® component runtime engine, and may be practiced with numerous substitute late bound environments and execution engines.
  • The modular late bound execution engine 602 is such that following the execution of a late bound interface function call 604 or 606 in the late bound environment 600, the modular late bound execution engine 602 can either remain running, such that subsequent function execution in the late bound environment can readily occur, or it can be terminated.
  • The present invention has been described by way of example, and modifications and variations of the described embodiments will suggest themselves to skilled artisans in this field without departing from the spirit of the invention. Aspects and characteristics of the above-described embodiments may be used in combination. The described embodiments are merely illustrative and should not be considered restrictive in any way. The scope of the invention is to be measured by the appended claims, rather than the preceding description, and all variations and equivalents that fall within the range of the claims are intended to be embraced therein.
  • Preferred aspects of the invention:
    1. 1. In an electronic device, a method for integrating a late bound function into an external program environment comprising the steps of:
      • providing a late bound function call in a late bound environment to be executed in an external program environment;
      • automatically examining the late bound program to identify the set of dependent late bound functions required by the provided late bound function call; and
      • automatically generating an interface between the set of late bound functions and the external program environment.
    2. 2. The method of aspect 1, wherein the external program environment is an early bound programming environment.
    3. 3. The method of aspect 2, further comprising the step of executing the late bound function call from within the early bound external programming environment using the interface.
    4. 4. The method of aspect 1, wherein the external program environment is a late bound programming environment.
    5. 5. The method of aspect 4, further comprising the step of executing the late bound function call from within the late bound external programming environment using the interface.
    6. 6. The method of aspect 1. wherein the electronic device further comprises a late bound executable engine and wherein the late bound execution engine executes the late bound function.
    7. 7. The method of aspect 6, wherein the content of the late bound function is encrypted.
    8. 8. The method of aspect 7, wherein the content of the late bound function is encrypted using a public key encryption means.
    9. 9. The method of aspect 7, wherein the public key encryption means is the Advanced Encryption Standard (AES) public key encryption means.
    10. 10. The method of aspect 6 wherein the late bound execution engine decrypts the late bound function content in order to execute it.
    11. 11. The method of aspect 10, wherein the late bound function content is decrypted only when required at runtime.
    12. 12. The method of aspect 6 wherein an encryption/decryption schema provides for the secure sharing of files among a plurality of users.
    13. 13. The method of aspect 6, wherein an encryption/decryption schema utilizes a unique key generated by a compiler used in executing a late bound function.
    14. 14. The method of aspect 13, wherein the enciyption/decryption schema provides for the tracking of pirated software using the unique key generated by a compiler for use in executing a late bound function.
    15. 15. The method of aspect 6 further comprising the step of terminating the late bound execution engine following execution of the late bound function call in the late bound environment.
    16. 16. The method of aspect 2, wherein the early bound environment is a C programming environment.
    17. 17. The method of aspect 2, wherein the early bound environment is a C++ programming environment.
    18. 18. The method of aspect 2, wherein the early bound environment is a FORTRAN programming environment.
    19. 19. The method of aspect 4, wherein the late bound environment is a LISP programming environment.
    20. 20. The method of aspect 4, wherein the late bound environment is a Prolog programming environment.
    21. 21. The method of aspect 4, wherein the late bound environment is a MATLAB programming environment.
    22. 22. The method of aspect 1, wherein the interface is an Application Program Interface (API) available to the external program environment.
    23. 23. The method of aspect 22 wherein the API is utilized in calling a function in the late bound environment from within the external program environment.
    24. 24. The method of aspect 1, wherein the interface is a software component that is executable from within an external program environment.
    25. 25. The method of aspect 1, wherein the interface is a software application executable from within an external program environment.
    26. 26. The method of aspect 1, further comprising the step of executing late bound function calls from within the external program environment at runtime.
    27. 27. A system for integrating late bound languages into an external program environment comprising:
      • an external program environment;
      • a late bound program environment, wherein said late bound program environment can execute a function within the late bound environment; and
      • an interface
      wherein said interface mechanism automatically expresses semantics of the late bound program environment in a format compatible with the external program environment.
    28. 28. The system of aspect 27, wherein the external program environment is an early bound programming environment.
    29. 29. The system of aspect 27, wherein the external program environment is a late bound programming environment.
    30. 30. The system of aspect 27, wherein the late bound program environment contains a modular execution engine.
    31. 31. The system of aspect 30, wherein the late bound execution engine executes function calls within the late bound program environment from within the external program environment.
    32. 32. The system of aspect 31, wherein the late bound execution engine is terminated following the execution of the late bound function calls in the late bound program environment.
    33. 33. The system of aspect 28, wherein the early bound program environment is a C programming environment.
    34. 34. The system of aspect 28, wherein the early bound environment is a C++ programming environment.
    35. 35. The system of aspect 28, wherein the early bound environment is a FORTRAN programming environment.
    36. 36. The system of aspect 28, wherein the early bound environment is a Visual Basic programming environment.
    37. 37. The system of aspect 29, wherein the late bound environment is a LISP programming environment.
    38. 38. The system of aspect 29, wherein the late bound environment is a Prolog programming environment.
    39. 39. The system of aspect 29, wherein the late bound environment is a MATLAB programming environment.
    40. 40. The system of aspect 27, wherein the interface mechanism is an Application Program Interface (API) running in the early bound program environment.
    41. 41. The system of aspect 40 wherein the API is utilized in calling a function in the late bound program environment from within the external program environment.
    42. 42. The system of aspect 27, wherein the interface is a software component that is executable from within an external program environment.
    43. 43. The system of aspect 27, wherein the interface expresses the semantics of the late bound program environment in the external program environment at runtime.
    44. 44. A method for packaging executable late bound content into a redistributable application for use with an external program environment, comprising the steps of:
      • examining the late bound content;
      • providing a late bound modular execution engine, wherein the modular execution engine executes only those functions that are necessary to support the late bound application; and
      • configuring the modular execution engine to execute only those functions that are necessary to support the late bound application.
    45. 45. The method of aspect 44 wherein the late bound content is encrypted before being packaged into redistributable form.
    46. 46. The method of aspect 45 wherein the late bound content is decrypted after being packed in a redistributable form.
    47. 47. The method of aspect 44, further comprising the step of delivering the results of the executed functions executed by the modular execution engine to the external program environment.
    48. 48. The method of aspect 47, wherein the results of the functions executed by the modular execution engine are late bound debugging instructions for use in an external program environment.
    49. 49. The method of aspect 47, further comprising the step of displaying an output of the function executed by the modular execution engine in a graphical manner using a user interface designed in the external programming environment.
    50. 50. The method of aspect 47, further comprising the step of displaying an output of the function executed by the modular execution engine in a textual manner using a user interface designed in the external programming environment.
    51. 51. A method for computing the transitive closure of a function call tree, comprising the steps of:
      • providing a set of input files containing one or more late bound functions:
        • examining each of said input files to determine if function call dependencies exist;
        • automatically adding additional function call dependencies from a dependency database;
        • automatically removing a predefined subset of functions from the function call tree;
      wherein the predefined subset of functions is stored in a separate database.

    Claims (16)

    1. A method for integrating a late bound function (404a) into a language that supports early bound functions (416), comprising the steps of:
      providing the late bound function (404a) to be invoked in the language that supports early bound functions (416), the providing comprising:
      examining a late bound program (402) to identify one or more dependent late bound functions required by the late bound function (404a); and
      automatically generating an interface (408) between the late bound function (404a), the one or more dependent late bound functions and the language that supports early bound functions (416).
    2. The method of claim 1, wherein the interface (408) comprises one or more early bound functions or method calls.
    3. The method of claim 2 further comprising the steps of:
      creating a package including the one or more early bound functions (408) together with the late bound function (404a) and the one or more dependent functions; and
      storing the package.
    4. The method of claim 2 further comprising the step of:
      creating data compatible with a data type of the late bound function (404a) from the one or more early bound functions when the data type of the late bound function (404a) is incompatible with the data type of the one or more early bound functions.
    5. The method of claim 2 further comprising the step of:
      creating data compatible with a data type of the one or more early bound functions from the late bound function (404a) when the data type of the one or more early bound functions is incompatible with the data type of the late bound function (404a).
    6. The method of claim 2 further comprising the step of:
      generating a deployable form of the late bound program (402) suitable for invocation in the language that supports early bound functions (416).
    7. A medium for integrating a late bound function (404a) into a language that supports early bound functions (416), comprising the steps of:
      providing the late bound function (404a) to be invoked in the language that supports early bound functions (416), characterized by the steps of:
      automatically generating an interface (408) between the late bound function (404a) and the language that supports early bound functions (416), wherein the interface (408) comprises one or more early bound functions or method calls;
      creating a package including the one or more early bound functions together with the late bound function (404a) and one or more dependent functions of the late bound function (404a); and
      storing the package.
    8. The medium of claim 7, further comprising the step of:
      generating a deployable form of the late bound function (404a) suitable for invocation in the language that supports early bound functions (416).
    9. The medium of claim 7, wherein the package contains all executable content associated with the late bound function (404a).
    10. The medium of claim 7, wherein the package is encrypted.
    11. The medium of claim 7, further comprising the step of:
      compiling the one or more early bound functions using a compiler that supports the early bound language.
    12. A system adapted to integrate a late bound function (404a) into a language that supports early bound functions (416), the system comprising:
      a storage (110) configured to store:
      a language that supports early bound functions (416);
      the late bound function (404a); and
      a processor (102) configured to:
      provide the late bound function (404a) to be invoked in the language that supports early bound functions (416),
      examine a late bound program (402) to identify one or more dependent late bound functions required by the late bound function (404a); and
      automatically generate an interface (408) between the late bound function (404a), the one or more dependent late bound functions and the language that supports early bound functions (416).
    13. The system of claim 12, wherein the interface (408) comprises one or more early bound functions or method calls.
    14. The system of claim 13, wherein the storage is further configured to:
      store the one or more early bound functions together with the late bound function (404a) and the one or more dependent functions.
    15. The system of claim 12, wherein the processor is further configured to:
      generate a deployable form of the late bound program (402) suitable for invocation in the language that supports early bound functions (416).
    16. The system of claim 12 wherein the processor is further configured to:
      compile the one or more early bound functions using a compiler that supports the early bound language.
    EP10185264.8A 2005-06-02 2006-06-02 Calling of late bound functions from an external program environment Withdrawn EP2323031A3 (en)

    Applications Claiming Priority (3)

    Application Number Priority Date Filing Date Title
    US11/144,411 US8046777B2 (en) 2005-06-02 2005-06-02 Calling of late bound functions from an external program environment
    EP10171749.4A EP2312439A3 (en) 2005-06-02 2006-06-02 Calling of late bound functions from an external program environment
    EP06772051A EP1889155B1 (en) 2005-06-02 2006-06-02 Calling of late bound functions from an external program environment

    Related Parent Applications (4)

    Application Number Title Priority Date Filing Date
    EP06772051.6 Division 2006-06-02
    EP06772051A Division EP1889155B1 (en) 2005-06-02 2006-06-02 Calling of late bound functions from an external program environment
    EP10171749.4A Division EP2312439A3 (en) 2005-06-02 2006-06-02 Calling of late bound functions from an external program environment
    EP10171749.4 Division 2010-08-03

    Publications (2)

    Publication Number Publication Date
    EP2323031A2 true EP2323031A2 (en) 2011-05-18
    EP2323031A3 EP2323031A3 (en) 2016-01-20

    Family

    ID=37009192

    Family Applications (3)

    Application Number Title Priority Date Filing Date
    EP06772051A Active EP1889155B1 (en) 2005-06-02 2006-06-02 Calling of late bound functions from an external program environment
    EP10171749.4A Withdrawn EP2312439A3 (en) 2005-06-02 2006-06-02 Calling of late bound functions from an external program environment
    EP10185264.8A Withdrawn EP2323031A3 (en) 2005-06-02 2006-06-02 Calling of late bound functions from an external program environment

    Family Applications Before (2)

    Application Number Title Priority Date Filing Date
    EP06772051A Active EP1889155B1 (en) 2005-06-02 2006-06-02 Calling of late bound functions from an external program environment
    EP10171749.4A Withdrawn EP2312439A3 (en) 2005-06-02 2006-06-02 Calling of late bound functions from an external program environment

    Country Status (7)

    Country Link
    US (3) US8046777B2 (en)
    EP (3) EP1889155B1 (en)
    JP (1) JP5412108B2 (en)
    CN (2) CN101233485B (en)
    AT (1) ATE476704T1 (en)
    DE (1) DE602006015949D1 (en)
    WO (1) WO2006130871A2 (en)

    Families Citing this family (19)

    * Cited by examiner, † Cited by third party
    Publication number Priority date Publication date Assignee Title
    US8838974B2 (en) * 2005-07-15 2014-09-16 The Mathworks, Inc. System and method for verifying the integrity of read-only components in deployed mixed-mode applications
    WO2008130769A2 (en) * 2007-04-20 2008-10-30 Microsoft Corporation Runtime translation from late-bound to early-bound expression
    US8255883B2 (en) 2007-04-20 2012-08-28 Microsoft Corporation Translating late bound LINQ expressions into database queries
    CN102043663A (en) * 2009-10-26 2011-05-04 鸿富锦精密工业(深圳)有限公司 Program calling system and program calling method thereof
    US20110314256A1 (en) * 2010-06-18 2011-12-22 Microsoft Corporation Data Parallel Programming Model
    US8589867B2 (en) 2010-06-18 2013-11-19 Microsoft Corporation Compiler-generated invocation stubs for data parallel programming model
    US8769486B2 (en) 2011-01-06 2014-07-01 The Mathworks, Inc. Dynamically generating statically-typed proxies for dynamically-typed functions
    US9135027B1 (en) 2011-10-26 2015-09-15 The Mathworks, Inc. Code generation and execution for dynamic programming languages
    US8943474B1 (en) * 2011-10-26 2015-01-27 The Mathworks, Inc. Code generation and execution for dynamic programming languages
    US9032380B1 (en) * 2011-12-05 2015-05-12 The Mathworks, Inc. Identifying function calls and object method calls
    US9183120B1 (en) 2013-06-04 2015-11-10 The Mathworks, Inc. Functional dependency analysis
    US8832321B1 (en) * 2014-02-12 2014-09-09 tw telecom holdings, inc. External injection of cloud based network functions into network services
    US9740505B2 (en) * 2014-07-15 2017-08-22 The Mathworks, Inc. Accurate static dependency analysis via execution-context type prediction
    CN107402797A (en) * 2016-05-19 2017-11-28 中兴通讯股份有限公司 A kind of software compilation method and device
    CN106371838B (en) * 2016-08-31 2019-10-18 福建联迪商用设备有限公司 A kind of method and system for safeguarding software package dependency relationship
    CN106681714A (en) * 2016-12-07 2017-05-17 乐视控股(北京)有限公司 Method and device for setting program environments and electronic equipment
    CN107329843B (en) * 2017-06-30 2021-06-01 百度在线网络技术(北京)有限公司 Application program voice control method, device, equipment and storage medium
    US10929160B1 (en) 2018-12-12 2021-02-23 The Mathworks, Inc. Composite-trace just-in-time compilation
    CN110795070B (en) * 2019-05-24 2023-07-25 杭州海兴电力科技股份有限公司 Virtual gateway table platform and construction method

    Family Cites Families (31)

    * Cited by examiner, † Cited by third party
    Publication number Priority date Publication date Assignee Title
    JP2666847B2 (en) * 1988-06-06 1997-10-22 日本電気株式会社 Heterogeneous language communication method
    US5381547A (en) * 1989-11-29 1995-01-10 Siemens Aktiengesellschaft Method for dynamically linking definable program elements of an interactive data processing system
    JP2768073B2 (en) * 1991-08-12 1998-06-25 日本電気株式会社 Mutual call method between programs
    JPH06103075A (en) * 1992-07-06 1994-04-15 Internatl Business Mach Corp <Ibm> Operation for object-oriented application
    JPH06103075B2 (en) 1992-10-30 1994-12-14 東北電力株式会社 Replacement method of small diameter pipe with fuel pipe
    WO1997035258A1 (en) * 1996-03-21 1997-09-25 Mpath Interactive, Inc. Network match maker for selecting clients based on attributes of servers and communication links
    US6393497B1 (en) * 1998-03-20 2002-05-21 Sun Microsystems, Inc. Downloadable smart proxies for performing processing associated with a remote procedure call in a distributed system
    US5812855A (en) * 1996-06-03 1998-09-22 Silicon Graphics, Inc. System and method for constaint propagation cloning for unknown edges in IPA
    US6041179A (en) 1996-10-03 2000-03-21 International Business Machines Corporation Object oriented dispatch optimization
    US6463581B1 (en) * 1996-10-03 2002-10-08 International Business Machines Corporation Method for determining reachable methods in object-oriented applications that use class libraries
    US6366958B1 (en) * 1996-10-21 2002-04-02 International Business Machines Corporation NETBIOS protocol support for a DCE RPC mechanism
    US6401099B1 (en) * 1996-12-06 2002-06-04 Microsoft Corporation Asynchronous binding of named objects
    US7324972B1 (en) 1997-03-07 2008-01-29 Clickshare Service Corporation Managing transactions on a network: four or more parties
    US6026238A (en) 1997-08-18 2000-02-15 Microsoft Corporatrion Interface conversion modules based upon generalized templates for multiple platform computer systems
    US6799320B1 (en) * 1998-12-16 2004-09-28 Microsoft Corporation Providing binding options for component interfaces
    US6247175B1 (en) 1998-12-22 2001-06-12 Nortel Networks Limited Method and apparatus for identifying and removing unused software procedures
    US6415434B1 (en) * 1999-06-18 2002-07-02 Hewlett-Packard Company Apparatus and method for a runtime method overloading resolver
    US6442752B1 (en) * 1999-08-26 2002-08-27 Unisys Corporation Method, apparatus, and computer program product for replacing a dynamic link library (dll) of a first computing environment with a dll of a second computing environment that can be invoked from the first computing environment in a transparent manner
    EP1117033A1 (en) * 2000-01-14 2001-07-18 Sun Microsystems, Inc. Dynamic dispatch function
    US7100153B1 (en) 2000-07-06 2006-08-29 Microsoft Corporation Compiler generation of a late binding interface implementation
    US20020078255A1 (en) 2000-10-17 2002-06-20 Shankar Narayan Pluggable instantiable distributed objects
    US7000213B2 (en) 2001-01-26 2006-02-14 Northwestern University Method and apparatus for automatically generating hardware from algorithms described in MATLAB
    US7171311B2 (en) * 2001-06-18 2007-01-30 Rosetta Inpharmatics Llc Methods of assigning treatment to breast cancer patients
    JP2003076558A (en) * 2001-09-04 2003-03-14 Hitachi Software Eng Co Ltd Method and program for controlling program execution
    US6901595B2 (en) * 2001-09-29 2005-05-31 Siebel Systems, Inc. Method, apparatus, and system for implementing a framework to support a web-based application
    US7000238B2 (en) * 2001-10-10 2006-02-14 Borland Software Corporation Development system providing extensible remoting architecture
    US7373406B2 (en) * 2001-12-12 2008-05-13 Valve Corporation Method and system for effectively communicating file properties and directory structures in a distributed file system
    US7370075B2 (en) * 2002-04-25 2008-05-06 Digital Evolution Method and apparatus for managing web services within a computer network system
    US7249174B2 (en) * 2002-06-12 2007-07-24 Bladelogic, Inc. Method and system for executing and undoing distributed server change operations
    CN1280718C (en) * 2002-11-05 2006-10-18 中兴通讯股份有限公司 Automatic method for converting graphic display
    US7308684B2 (en) * 2003-06-16 2007-12-11 Microsoft Corporation Classifying software and reformulating resources according to classifications

    Non-Patent Citations (1)

    * Cited by examiner, † Cited by third party
    Title
    None

    Also Published As

    Publication number Publication date
    EP2312439A3 (en) 2013-11-13
    US20080052730A1 (en) 2008-02-28
    JP2008542927A (en) 2008-11-27
    JP5412108B2 (en) 2014-02-12
    WO2006130871A2 (en) 2006-12-07
    EP1889155A2 (en) 2008-02-20
    US8881178B2 (en) 2014-11-04
    US20120036519A1 (en) 2012-02-09
    US8046777B2 (en) 2011-10-25
    US7802268B2 (en) 2010-09-21
    WO2006130871A3 (en) 2007-02-22
    EP2312439A2 (en) 2011-04-20
    EP2323031A3 (en) 2016-01-20
    CN102063315A (en) 2011-05-18
    US20060277526A1 (en) 2006-12-07
    CN102063315B (en) 2015-03-11
    ATE476704T1 (en) 2010-08-15
    EP1889155B1 (en) 2010-08-04
    CN101233485B (en) 2010-12-08
    CN101233485A (en) 2008-07-30
    DE602006015949D1 (en) 2010-09-16

    Similar Documents

    Publication Publication Date Title
    EP1889155B1 (en) Calling of late bound functions from an external program environment
    Huang et al. Wrapping legacy codes for grid-based applications
    US9983869B2 (en) Adaptive interface for cross-platform component generation
    US6834391B2 (en) Method and apparatus for automated native code isolation
    US20090320007A1 (en) Local metadata for external components
    US11403074B1 (en) Systems and methods for generating interfaces for callback functions in object-oriented classes
    Luckow et al. HVMTP: a time predictable and portable java virtual machine for hard real-time embedded systems
    US7428737B1 (en) Method for using header files to call a shared library from a dynamic environment
    Kang Function call interception techniques
    Factor et al. Instrumentation of standard libraries in object-oriented languages: the twin class hierarchy approach
    Chakravarthy et al. Edicts: implementing features with flexible binding times
    US8196152B2 (en) Container context information propagation in an aspect-oriented environment
    Jezek et al. Magic with Dynamo--Flexible Cross-Component Linking for Java with Invokedynamic
    Harrison et al. CAT: A toolkit for assembling concerns
    McGachey et al. Class Transformations for Transparent Distribution of Java Applications.
    Nilsen Harmonizing alternative approaches to safety-critical development with Java
    Goldman Smiley-an interactive tool for monitoring inter-module function calls
    McGachey et al. Classifying Java class transformations for pervasive virtualized access
    Seifert et al. Developing and distributing network based engineering solutions
    Renouf Pro (IBM) WebSphere Application Server 7 Internals
    Powell et al. C# and the. NET framework: the C++ perspective
    Virius Object oriented computing
    Wendland WebAssembly as a Multi-Language Platform
    CHRISTENSEN et al. Finding Data Leaks in Xamarin Apps by Performing Taint Analysis on CIL Code
    Temple Lang Working with meta-data from C/C++ code in R: the RGCCTranslationUnit package

    Legal Events

    Date Code Title Description
    PUAI Public reference made under article 153(3) epc to a published international application that has entered the european phase

    Free format text: ORIGINAL CODE: 0009012

    AC Divisional application: reference to earlier application

    Ref document number: 2312439

    Country of ref document: EP

    Kind code of ref document: P

    Ref document number: 1889155

    Country of ref document: EP

    Kind code of ref document: P

    AK Designated contracting states

    Kind code of ref document: A2

    Designated state(s): AT BE BG CH CY CZ DE DK EE ES FI FR GB GR HU IE IS IT LI LT LU LV MC NL PL PT RO SE SI SK TR

    PUAL Search report despatched

    Free format text: ORIGINAL CODE: 0009013

    AK Designated contracting states

    Kind code of ref document: A3

    Designated state(s): AT BE BG CH CY CZ DE DK EE ES FI FR GB GR HU IE IS IT LI LT LU LV MC NL PL PT RO SE SI SK TR

    RIC1 Information provided on ipc code assigned before grant

    Ipc: G06F 9/44 20060101AFI20151214BHEP

    RAP1 Party data changed (applicant data changed or rights of an application transferred)

    Owner name: THE MATHWORKS, INC.

    17P Request for examination filed

    Effective date: 20160606

    RBV Designated contracting states (corrected)

    Designated state(s): AT BE BG CH CY CZ DE DK EE ES FI FR GB GR HU IE IS IT LI LT LU LV MC NL PL PT RO SE SI SK TR

    17Q First examination report despatched

    Effective date: 20160818

    STAA Information on the status of an ep patent application or granted ep patent

    Free format text: STATUS: THE APPLICATION IS DEEMED TO BE WITHDRAWN

    18D Application deemed to be withdrawn

    Effective date: 20190103