CN102289384A - Dynamic adaptive programming - Google Patents

Dynamic adaptive programming Download PDF

Info

Publication number
CN102289384A
CN102289384A CN 201110171604 CN201110171604A CN102289384A CN 102289384 A CN102289384 A CN 102289384A CN 201110171604 CN201110171604 CN 201110171604 CN 201110171604 A CN201110171604 A CN 201110171604A CN 102289384 A CN102289384 A CN 102289384A
Authority
CN
Grant status
Application
Patent type
Prior art keywords
program
object
dynamic
compiled
platform
Prior art date
Application number
CN 201110171604
Other languages
Chinese (zh)
Other versions
CN102289384B (en )
Inventor
K·J·克瓦里纳
W·哈格德
Original Assignee
微软公司
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

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/40Transformation of program code
    • G06F8/41Compilation
    • G06F8/44Encoding
    • G06F8/447Target code generation
    • GPHYSICS
    • G06COMPUTING; CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/40Transformation of program code
    • G06F8/54Link editing before load time
    • GPHYSICS
    • G06COMPUTING; CALCULATING; 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

Abstract

Creating and executing platform portable code. A method includes declaring an object as being a dynamic object in a program. The program is a program compiled using a static language, except that the dynamic object is excluded from static analysis on the object when the program is compiled. The dynamic object includes a dependent call to a platform specific API. The platform specific API is available on one or more platforms to which a compiled version of the program will be deployed, but not available on one or more other platforms to which the compiled version of the program will be deployed.

Description

动态自适应编程 Adaptive Dynamic Programming

技术领域 FIELD

[0001] 本申请涉及动态自适应编程,尤其涉及创建和执行平台便携式代码的方法。 [0001] The present application relates to an adaptive dynamic programming, in particular, relates to a method and an execution platform to create a portable code. 背景技术 Background technique

[0002] 计算机和计算系统已经影响了现代生活的几乎每个方面。 [0002] Computers and computing systems have affected nearly every aspect of modern life. 计算机通常在工作、消遣、保健、运输、娱乐、家政管理等中都有涉猎。 Computers are generally involved in work, recreation, healthcare, transportation, entertainment, household management, etc..

[0003] 便携式程序(即可在多个平台上运行的程序)当其在特定平台上运行时通常需要执行平台专用指令。 [0003] The portable program (program to run on multiple platforms) when run on a specific platform are often required dedicated instruction execution platform. 不同的平台表示软件所运行的环境或底层系统的不同,并可通过作为或具有不同设备、不同操作系统、或者甚至相同操作系统的不同版本来表征。 Different platforms represent different environments or the underlying operating system software and can be characterized by different versions or as different devices, different operating systems, or even the same operating system. 作为源代码分发的便携式程序可例如用#ifdefs相当容易地实现这一点。 The portable program may be distributed as source code, for example, with #ifdefs rather easily accomplish this. #ifdefs是用于编译器的标记。 #ifdefs is a marker for the compiler. 开发者为不同的平台提供多种版本的指令。 Developers offer multiple versions of instructions for different platforms. 编译器确定平台并从多个版本中选择适合该平台的代码。 The compiler determines the code for the internet and selecting from the plurality of platform versions. 然后将所选择的代码编译成二进制代码。 The selected code is then compiled into binary code. #ifdefs导致单个源代码文档和多个经编译二进制代码。 #ifdefs lead to a single source and multiple document compiled binary code.

[0004] 然而,当二进制代码需要是便携式时,执行这种平台专用指令将困难得多。 [0004] However, when the binary code needs to be portable, platform-specific instructions which will be executed much more difficult. 这对静态编译语言和具有加载时间验证的运行时环境尤其如此。 This is especially true for statically compiled languages ​​and has a load time-proven runtime environment. 静态编译语言是在编译时设法检测编程错误的语言。 Statically compiled language at compile time trying to detect programming errors of language. 如果开发者尝试包括多个版本的指令,那么将产生错误,因为除了一个版本之外的所有版本将被编译器标记为错误。 If the developers have tried to include multiple versions of the instruction, it will generate an error because all versions except for a version of the compiler will be marked as an error. 具体而言,编译器通常产生平台专用二进制代码,并将为其它平台编写的代码检测为错误。 Specifically, a compiler typically generates platform-specific binary code, and the code written for other platforms detected error. 类似地,加载时间验证系统将尝试在运行时检查代码中的错误。 Similarly, the time authentication system will attempt to load the runtime checking error code. 用于其它平台的代码版本将被检测为错误。 Code versions for other platforms will be detected as an error. 这些语言和运行时通常需要使用平台自适应层(PAL)来提供在所有目标平台中呈现的抽象,即使某些平台不支持这些抽象的有意义的实现。 These usually require the use of language and runtime platform adaptation layer (PAL) to provide an abstract presented in all target platforms to achieve even if some platforms do not support these abstract sense. PAL可使用面向对象的继承来防止错误被检测出。 PAL object-oriented inheritance can be used to prevent the error is detected. 具体而言,不同的库加载在不同的平台,使得不会为特定平台工作的代码版本也不被部署到该平台,从而不会有对平台专用API的不适当的调用。 Specifically, different libraries loaded on different platforms, so as not to not be deployed to the platform is a platform-specific version of the code works, so that no inappropriate calls to the platform-specific API. 在开发者需要确保继承是适当的并且库被部署的情况下,PAL的实现是复杂的。 Developers need to ensure that in the case of inheritance is appropriate and libraries are deployed to achieve PAL is complicated.

[0005] 在此要求保护的主题不限于解决任何缺点或仅在诸如上述环境中操作的各个实施方式。 [0005] The claimed subject matter is not only to solve any disadvantages or that operate in various embodiments such as the above environment. 相反,提供该背景仅用以示出在其中可实践在此描述的部分实施方式的一个示例性技术领域。 Rather, this background is only provided to illustrate one exemplary technology area where the part may be practiced in embodiments described herein.

发明内容 SUMMARY

[0006] 一个实施方式涉及创建平台便携式代码的方法。 [0006] One embodiment relates to a method to create a portable platform code. 该方法包括声明对象是程序中的动态对象。 The method includes an object is declared in the dynamic target program. 该程序是使用支持动态调用的静态语言编译的程序。 The program is a static language compiler that supports dynamic invocation of the program. 声明对象为动态对象使得被声明为动态对象的对象在程序被编译时被排除在对对象的静态分析之外。 Declare the object is a dynamic object so that the object is declared as dynamic objects are excluded from the analysis of static objects in the program is compiled. 动态对象包括对平台专用API的依赖调用。 Dynamic objects include dependence calls to platform-specific API. 平台专用API在对其部署程序的经编译版本的一个或多个平台上是可用的,但是在对其部署程序的经编译版本的一个或多个其它平台上是不可用的。 A platform-specific API in its compiled version of the deployment of one or more platforms are available, but in the compiled version of the program to deploy the one or more other platforms is unavailable. 该方法还包括将程序静态编译成平台便携式代码。 The method also includes the program statically compiled into platform portable code. 然后将平台便携式代码部署至不同平台,并在不同平台上成功执行。 Then the platform portable code is deployed to different platforms and successfully execute on different platforms. 将程序静态编译成平台便携式代码包括将动态对象排除在编译期间对程序中的未被声明为动态的其它对象执行的静态分析之外,作为该对象被声明为动态对象的结果。 Statically compiled into the program code comprises a portable internet dynamic objects excluded during compilation of the program are not declared as dynamic than static analysis performed by other objects, the object is declared as a result of dynamic objects.

[0007] 另一实施方式包括执行平台便携式代码的方法。 [0007] Another embodiment includes a method of performing internet portable code. 该方法包括访问从静态语言程序编译的经编译程序中包括的动态对象。 The method includes accessing a dynamic object from a static language program compiled compiled program. 动态对象被排除在经编译程序的编译期间的静态分析之外。 Dynamic objects are excluded from static analysis during compilation by the compiler. 动态对象包括用作代理对象的功能,代理对象被配置成在平台专用对象在运行时在执行经编译程序的平台上是可访问的情况下在运行时加载平台专用对象。 Dynamic objects include functions as a proxy object, the proxy object is configured in a platform specific objects at run time the case accessible loading platform specific objects at run time on the execution of the compiled program internet. 该方法还包括测试代理对象,以确定平台专用对象是否成功加载。 The method also includes testing the proxy object, to determine whether platform-specific object is successfully loaded. 作为测试结果,该方法包括确定平台专用对象成功加载,并因此调用平台专用对象API。 As a test result, the method includes determining platform-specific objects successfully loaded, and therefore calls platform-specific objects API.

[0008] 提供本发明内容是为了以精简的形式介绍将在以下具体实施方式中进一步描述的一些概念。 [0008] This Summary is provided to introduce a selection of concepts that are further described below in the embodiments in a simplified form. 本发明内容并非旨在标识所要求保护的主题的关键特征或必要特征,也不旨在用于帮助确定所要求保护的主题的范围。 This summary is not intended to identify the claimed subject matter key features or essential features nor intended to be used to help determine the subject matter of the claimed range.

[0009] 另外的特征和优点将在以下的描述中阐述,并且部分可从该描述中显而易见,或者可以从此处的教示实践中习得。 [0009] Further features and advantages will be set forth in the description which follows, and in part will be obvious from the description, or may be learned by practice of the teachings herein. 本发明的特征和优点可以通过在所附权利要求中特别指出的手段和组合来实现并获取。 Features and advantages of the present invention can be produced by means of the appended claims and combinations particularly pointed out realized and obtained. 本发明的特征将从以下描述和所附权利要求书中变得完全显而易见,或者可通过如下所述对本发明的实践而获知。 Features of the invention from the following description and appended claims become more fully apparent from practice of the invention or may be learned by the.

附图说明 BRIEF DESCRIPTION

[0010] 为了描述能够获得上述和其他优点和特征的方式,将通过参考附图中示出的各具体实施方式来呈现对以上简述的主题的更为具体的描述。 Each DETAILED DESCRIPTION [0010] In order to describe the above embodiment can be obtained and other advantages and features will be illustrated by reference to the drawings presented more particular description of the subject matter briefly described above. 应该理解,这些附图仅描绘了各典型实施方式,因此其不应被认为是对范围的限制,各实施方式将通过使用附图用附加特征和细节来描述并解释,在附图中: Understanding that these drawings depict only exemplary embodiments, and therefore not to be considered limiting of its scope, the embodiments will be described and explained with additional specificity and detail through use of the accompanying drawings in which:

[0011] 图IA示出使用代理对象的对象图和确定在平台上是否支持功能的方法; [0011] FIG IA illustrates the use of the proxy object and a method of determining whether an object FIGS support on the platform;

[0012] 图IB示出使用代理对象的对象图和确定在多个不同平台的平台上是否支持功能的方法; [0012] FIG IB illustrates the use of the proxy object and a method of determining whether an object graph on the platform support a plurality of different platforms;

[0013] 图IC示出使用代理对象的对象图和确定哪个平台正被使用的方法; [0013] FIG IC shown in FIG objects using a proxy object and a method which is being used to determine the platform;

[0014] 图2示出创建平台便携式代码的方法;以及 [0014] Figure 2 illustrates a method of creating a portable platform code; and

[0015] 图3示出执行平台便携式代码的方法。 [0015] Figure 3 illustrates a method for performing platform portable code.

具体实施方式 detailed description

[0016] 此处描述的某些实施方式使用静态语言中定义的动态对象。 [0016] Certain embodiments described herein, the use of dynamic objects statically defined language. 动态对象可包括对存在于某些平台中但不存在于其它平台中的对象的依赖调用。 Dynamic objects may include a call to an object present in dependence some platforms but not in the other platform. 这可以出于多个不同理由来实现。 This can be achieved for a number of different reasons. 例如,在某些实施方式中,某些平台可支持在其它平台上不支持的特定功能。 For example, in certain embodiments, certain platform supports a specific function is not supported on other platforms. 或者,不同平台可支持相同功能,但可使用不同对象形式的机制来提供支持。 Alternatively, different platforms can support the same functionality, but may use different objects in the form of mechanisms to provide support. 通过在静态语言中使用动态对象,某些实施方式能够方便单个源代码/单个二进制代码解决方案,而不是单个源代码/多个二进制代码解决方案。 By using a dynamic object in a static language, in some embodiments a single embodiment can conveniently source / binary code a single solution, rather than a single source / binary code plurality of solutions. 通过这种方法,单个二进制代码可被分发至多个不同平台,由此减少对为多个不同平台创建、存储和传递多个二进制代码的需求。 By this method, a single binary code may be distributed to a plurality of different platforms, thereby reducing the need for creating a plurality of different platforms, storage and transmission of a plurality of binary code.

[0017] 在编译时不静态地细查动态对象,因此静态语言编译器不会导致由于包括与给定平台不兼容的代码的动态对象而产生的错误,例如对不存在的对象的调用。 [0017] statically at compile time without drill moving object, because the static compiler does not cause errors due to dynamic objects comprising incompatible with a given platform code is generated, for example, a call to the object does not exist. 具体而言,动态语言允许开发者创建在编译时不静态地细查的代码。 Specifically, the dynamic language allows developers to create code at compile time, not statically check the fine. 相反,在运行时,如果在代码中做出不适当的调用,则程序将抛出异常。 Instead, at run time, if improperly made calls in the code, the program will throw an exception. 本质上,开发者可编码他们想要的任何事物,而不必担心非运行时编译器错误。 Essentially, developers can encode anything they want, without worrying about non-runtime compiler error. 因此,各实施方式可在静态语言代码中使用动态对象,使得在静态编译期间不细查动态对象。 Thus, various embodiments may be used in a static dynamic object code language so as not to scrutinize dynamic objects during static compiler.

[0018] 在此处所示的示例中,示出了各种替换方式。 [0018] In the example shown here, there is shown a variety of alternative ways. 具体而言,一个实施方式包括“if supported(是否支持)”方法,该方法只在“if supported”调用中引用的对象存在于“if supported”方法在其上被调用的平台上时才完全运行。 Specifically, one embodiment includes "if supported (support)" method, which is only an object referenced in the "if supported" calls exist in the "if supported" method when fully operational on the platform on which is called . "if supported”方法可用于实施方式以实现在某些平台上功能上可用,而在其它平台上不可用。 "If supported" method can be used to implement embodiments of the available features on some platforms, but is not available on other platforms. 该情况的一个示例在图IA中示出。 An example of this case is shown in FIG. IA. 图IA示出执行对象映射形式的平台便携式代码。 FIG IA shows a portable internet form of a map of the object code is executed. 图IA示出调用第一对象102。 FIG IA shows a first object 102 calls. 第一对象102调用代理对象104,代理对象104是在静态编译便携式代码程序中的动态编译对象,如以下将要更详细解释的。 The first proxy object 104 calls the object 102, a proxy object 104 is dynamically compiled statically compiled object code program in a portable, as will be explained in more detail. 代理对象104包括IsSupported(受到支持)方法106。 IsSupported proxy object 104 comprises a (supported) method 106. 该IsSupported方法是对另一对象108的条件调用。 This method is called the conditional IsSupported 108 to another object. 该调用只在其它对象108在执行平台便携式代码的平台上可用且可执行时进行。 Only when the call other objects on the platform 108 of the portable execution platform available and executable code. 如果其它对象108不可用,那么代理对象104(使用IsSupported方法)将用作确定对其它对象的调用是否安全的门,从而防止抛出运行时异常。 If the other object 108 is not available, the proxy object 104 (using Method IsSupported) will be used to determine whether calls to other objects safe door, thereby preventing runtime exception is thrown.

[0019] 通过使用多个“ifsupported(如果支持)”方法,各实施方式可支持具有类似功能的不同平台,而使用不同机制,如不同对象。 [0019] By using a plurality of "ifsupported (if supported)" method, various embodiments may support different platforms having a similar function, but the use of different mechanisms, such as different objects. 该情况的一个示例在图IB中示出。 An example of this case is shown in FIG IB. 图IB示出调用代理对象112的第一对象110。 FIG IB shows the object 110 calls the first proxy object 112. 代理对象112是动态对象,它是静态编译的平台便携式代码的一部分(不同于以下将详细解释的动态对象)。 Proxy object 112 is moving object, which is part of a portable platform statically compiled code (explained in detail below differs from the moving object). 代理对象包括IsSupported方法114,它用作确定在代理对象112上调用其它方法是否安全的门。 The method comprises IsSupported proxy object 114, which calls the other methods used to determine whether the safety door on the proxy object 112. IsSupported方法可包括对诸如对象116、118和120的对象的条件调用。 IsSupported method may include conditions such as the objects 116, 118 and 120 of the object call. 这些对象116、118和120的每一个可以是支持类似功能但位于不同平台的对象。 Each of these objects 116, 118 and 120 may be similarly enabled but the object in different platforms. IsSupported方法114允许为适当平台调用适当对象。 IsSupported method calls the appropriate object 114 allows an appropriate internet. 这防止调用不支持的方法在平台上被调用,从而防止运行时异常。 This prevents the call does not support the method is invoked on the platform, so as to prevent run-time exception.

[0020] 在替换实施方式中,可运行对于不同框架具有替换路径的方法。 [0020] In an alternative embodiment, the method can be run with different alternative paths for the frame. 该情况的一个示例在图IC中示出。 An example of this case is shown in FIG IC. 图IC示出第一方法122。 FIG IC 122 illustrates a first method. 第一方法调用代理对象124。 The first method is called proxy object 124. 代理对象IM 是动态对象,它是静态编译的平台便携式代码的一部分(不同于以下将详细解释的动态对象)。 IM proxy object is a dynamic object, which is part of a portable platform statically compiled code (different from the moving object will be explained in detail). 代理对象IM包括两个替换方法,IsRunningOnPlatformX (在平台X上运行)U6and IsRunningOnPlatformY(在平台Y上运行)128。 IM proxy object comprises two alternative methods, IsRunningOnPlatformX (running on the platform X) U6and IsRunningOnPlatformY (running on the platform Y) 128. 这些方法各自包括使对对象130和132的调用分别依赖于平台便携式代码正运行于哪个平台的功能。 Each of these methods includes calls to objects 130 and 132, respectively, dependent on the code timing function which the portable internet platform runs.

[0021] 现在示出这些实施方式的更详细的示例。 [0021] Now a more detailed example illustrating these embodiments.

[0022] 来自华盛顿州雷德蒙市的微软公司的CLR 4.0 for. Net®框架包括对静态语言中的动态对象的支持。 [0022] from Microsoft Corporation of Redmond, Washington CLR 4.0 for. Net® framework includes support for static languages ​​dynamic objects. 具体而言,该框架包括可用于静态语言中的动态对象类型(DynamicObject) 0因此,某些实施方式使用静态语言(Cfend VB是静态语言的示例)的动态特征来编写使用动态调用的自适应代码。 Specifically, the frame type includes a dynamic object (DynamicObject) static language 0 Accordingly, some embodiments use a static language (Cfend VB is an example of a static language) to write the dynamic characteristics of the adaptive codebook using Dynamic Invocation . 静态语言通常在编译时检查错误,并且错误检查通常依赖于平台,而动态语言就在执行前检查代码中的错误。 Static languages ​​are usually checked at compile-time error, and error checking is usually dependent on the platform, and dynamic languages ​​in the implementation of the code before checking for errors. 在静态语言中使用动态对象允许开发者在设计时调用可能不存在于某些支持平台上的任意API,而不必担心编译时错误。 It allows developers to use dynamic objects in any API calls may not exist on some of the supported platforms are designed in a static language, without having to worry about compile-time error.

[0023] 例如,第一API可存在于第一平台上而不存在于第二平台上,而第二API可存在于第二平台上而不存在于第一平台上。 [0023] For example, the API may be present in the first but not in a second stage to the first stage, and the second API may be present in the first stage and not in the second stage. 因此,如果使用在静态语言中实现的动态对象来进行对第一和第二API的调用,对第一平台的编译将不会由于对第二API的调用而导致错误,并且对第二平台的编译将不会由于对第一API的调用而导致错误。 Therefore, if you use dynamic objects implemented in a static language to call to the first and second API, the compilation of the first platform will not be because of the API calls which led to the second error, and on the second platform will not compile because a call to the first API which led to the error. 然而,在运行时,如果第一平台调用第二API或者第二平台调用第一API,则将抛出运行时异常。 However, at run time, if the first or second platform calls the second API platform API calls first, then the run-time exception is thrown. 因此,各实施方式可实现可防止平台对不支持的对象的调用的专门类型,即使这些调用存在于经编译的二进制代码中。 Thus, various embodiments may be implemented specialized type of call is not possible to prevent the object support platform, even if these calls are present in the compiled binary code.

[0024] 一个示意性实施方式包括特殊类型,它在本示例中是CLR 4.0 for. Net®框架中的DynamicObject (动态对象)的子类型。 [0024] An exemplary embodiment comprises a special type, it is CLR 4.0 for. Net® frame DynamicObject (moving object) subtypes in the present example. 如上所述,DynamicOb ject是CLR 4. 0中的不被静态编译器细查的对象。 As described above, DynamicOb ject CLR 4. 0 is being scrutinized is not static compiler object. DynamicOb ject表示对任意API的动态代理。 DynamicOb ject represents the dynamic agent of any API. 在本示例中,该特殊类型对象在此被称为LightupDynamicOb ject (点亮动态对象,在下文中称为“LD0”)。 In the present example, this particular type of object referred to herein as LightupDynamicOb ject (lighting dynamic objects, hereinafter "LD0"). 虽然“点亮”表示当在特定平台上可用时点亮特征的能力,但是LDO也可用于使用不同机制在不同平台上实现类似功能。 Although the "light" indicates characteristics when the lighting capacity is available on a specific platform, but can also be used LDO use different mechanisms to achieve similar functions on different platforms. 当创建了这种类型的实例时,开发者提供描述该LDO表示哪个平台专用API的信息。 When an instance of this type is created, developers provide descriptive information which platform-specific API representation of the LDO.

[0025] 例如,以下示出使用语音合成器功能的LDO的一示例,其类似于图IA所示示例。 [0025] For example, the following shows an example of using a voice synthesizer LDO function, similar to the example shown in FIG IA. 值得注意的是,为了说明的目的,语音合成器API存在于可从华盛顿州雷德蒙市的微软公司获得的.NET®框架上,但是不存在于也可从微软公司获得的Silverlight®中。 It is noteworthy that, for illustrative purposes, a speech synthesizer API exists on .NET® frame available from Microsoft Corporation of Redmond, Washington, but not in Silverlight® also available from the Microsoft Corporation. 因此,这两个平台可用于示出如何在各种平台中使用LDO以及如何在可用时将LDO用于点亮语音功能。 Thus, the two platforms may be used to illustrate how the use of voice functions and a lighting LDO LDO for how available in a variety of platforms. 以下代码创建表示语音合成器API的LDO的示例: The following sample code creates LDO speech synthesizer API representation:

[0026] dynamic speech = new [0026] dynamic speech = new

[0027] LightupDynamicOb ject ( "System. Speech. SpeechSynthetizer, System. Speech,,); [0027] LightupDynamicOb ject ( "System Speech SpeechSynthetizer, System Speech ,,...);

[0028] 这将字符串传递给包括类型名称(“System. Speech. SpeechSynthetizer”)和dll( "System. Speech")的构造函数。 [0028] This comprises a string passed to the type name ( "System. Speech. SpeechSynthetizer") and dll ( "System. Speech") constructor. 现在,语音对象可使用如下(即使在运行在诸如Silverlight®的不支持语音的平台上的程序中): Now, speech object can use the following (even running on platforms that do not support voice such as Silverlight® the program):

[0029] if (speech. IsSupported) { [0029] if (speech. IsSupported) {

[0030] speech. Speak ( "Hi !”); . [0030] speech Speak ( "Hi!");

[0031] } [0031]}

[0032] IsSupported是LDO的方法,且用于确定在语音对象所用的平台上是否支持语音API。 [0032] IsSupported LDO method, and for determining the speech object platform is used to support voice API. 对“Speak(说话)”的调用是动态调用,所以它在编译时或加载时不失效,象如果调用不是动态的那样。 To "Speak (speak)" call is a dynamic invocation, so it does not fail at compile time or load, if the call is not like that dynamic.

[0033] 如上所述,在LDO的所示示例中,LDO包括对实例的称为“ IsSupported”动态成员。 [0033] As described above, in the example shown in the LDO, LDO including members of the dynamic instance called "IsSupported". 该成员允许代码查询平台是否支持在构造期间所指示的API。 The member allows code to query whether the platform supports API indicated during construction. 如果没有“if (是否)”检查, 对Speak的调用可能在运行时在某些平台上失效。 If there is no "if (whether)" check, call to Speak may fail on some platforms at runtime.

[0034] 虽然上述示例示出如何通过防止动态成员在不支持该成员的平台上被调用来保护动态成员以免运行时异常,但是可用静态成员来实现类似功能。 [0034] While the above example shows how to protect the members in order to avoid abnormal dynamic run-time by preventing the dynamic members were called on a platform does not support the member, but can be used to achieve similar static member function. 例如,以下示出使用LDO 对静态成员的代理调用。 For example, the following shows use LDO proxy calls to static members.

[0035] dynamic console = new LightupDynamicObject ( “ System.Console, mscorlib”); [0035] dynamic console = new LightupDynamicObject ( "System.Console, mscorlib");

[0036] if (console. IsSupported) console. WriteLine ( “Hi !,,); . [0036] if (. Console IsSupported) console WriteLine ( "Hi ,,!);

[0037] 在上述示例中,“WriteLine(写入行)”是静态成员。 [0037] In the above example, "WriteLine (writing rows)" is a static member.

[0038] “IsSupported” (或其它实施方式中具有类似功能的方法)也可用于支持具有类似功能的平台,但使用如图IB所示的不同的机制实现。 (Method having a similar function, or other embodiments) [0038] "IsSupported" may also be used to support platform having similar functions, but the use of different mechanisms to achieve IB shown in FIG. 例如,不同的平台可都包括初始化功能,但可使用不同的API来实现初始化功能。 For example, different platforms may include initialization function, but the initialization function can be implemented using a different API. 以下示例示出在虚构平台X和Y上的该功能,每个平台的平台初始化方法为: [0039] The following example shows the function of the imaginary platform in X and Y, each platform platform initialization method is: [0039]

dynamic platlnitX = new LightupDynamicObject("TypeOnPlatformX, AssemblyOnPlatformX"); dynamic platlnitX = new LightupDynamicObject ( "TypeOnPlatformX, AssemblyOnPlatformX");

if (platlnitX.IsSupported) { if (platlnitX.IsSupported) {

platInitX.PlatformXSpecificMethodCall(...); platInitX.PlatformXSpecificMethodCall (...);

dynamic platlnitY = new LightupDynamicObject("TypeOnPlatformY, AssemblyOnPlatformY"); dynamic platlnitY = new LightupDynamicObject ( "TypeOnPlatformY, AssemblyOnPlatformY");

if (platlnitY.IsSupported) { if (platlnitY.IsSupported) {

platInitY.PlaformYSpecificMethodCall(...); platInitY.PlaformYSpecificMethodCall (...);

} }

[0040] 虽然上述示例已示出使用方法来确定API是否支持平台然后执行API,但是其它实施方式可使用允许替换调用的方法,如以上图IC中所示。 [0040] While the above has been shown using the example of a method to determine if the API supports internet then execute API, but other embodiments may use alternative method of allowing the call, as shown above in FIG IC. 例如,方法可能能够具体识别二进制代码正运行在哪个平台,并且然后调用适当的API。 For example, the method may be able to specifically identify the binary code which is running on the platform, and then calls the appropriate API. 以下示出使用允许用于不同平台的替换方法调用的方法的示例。 The following example illustrates an alternative method allows different platforms method calls for the use. 具体而言,以下示例示出在虚构平台X和Y上的该功能,每个平台的平台初始化方法为: Specifically, the following example shows the function in the X and Y imaginary platform, platform initialization method for each platform:

[0041]dynamic platlnit = new AdaptiveDynamicObj ect(); [0041] dynamic platlnit = new AdaptiveDynamicObj ect ();

platInit.RegisterPlatform("X", "TypeOnPlatformX, AssemblyOnPlatformX"); platInit.RegisterPlatform("Y", "TypeOnPlatformY, AssemblyOnPlatformY"); platInit.RegisterPlatform ( "X", "TypeOnPlatformX, AssemblyOnPlatformX"); platInit.RegisterPlatform ( "Y", "TypeOnPlatformY, AssemblyOnPlatformY");

if (platlnit.IsRunningOnPlatformX) { if (platlnit.IsRunningOnPlatformX) {

platInit.PlatformXSpecificMethodCall(...); platInit.PlatformXSpecificMethodCall (...);

} }

else if (platlnit.IsRunningOnPlatformY) { else if (platlnit.IsRunningOnPlatformY) {

platInit.PlaformYSpecificMethodCall(...); platInit.PlaformYSpecificMethodCall (...);

} }

[0042] 在上述示例中,确定二进制代码正在哪个平台上执行。 [0042] In the above example, binary code is being executed is determined on which the internet. 如果平台X正执行二进制代码,则调用platlnit. PlatformXSpecif icMethodCall (...)。 If X platform is executing the binary code, the call platlnit. PlatformXSpecif icMethodCall (...). 如果平台Y正执行二进制代码,则调用platlnit. PlatformYSpecif icMethodCall (···)。 If the platform Y is executing the binary code, the call platlnit. PlatformYSpecif icMethodCall (···).

[0043] 某些实施方式在允许自适应代码调用任意API方面是有用的,而先前的方案要求为自适应代码具体指定平台专用API。 [0043] Certain embodiments are useful in allowing the adaptive code to call any API, and the previous program codes specify requirements for the adaptive platform-specific API. 此外,某些实施方式允许具有强加载时间验证的静态类型语言(如CLR或Java VM)中的自适应二进制代码。 Further, some embodiments allow a statically typed language with strong loading time of verification (such as CLR or Java VM) in an adaptive binary code.

[0044] 以下讨论现在涉及多种方法以及可以执行的方法动作。 [0044] The following discussion is now directed to various methods and operation method may be performed. 虽然用特定次序讨论或用以特定次序发生的流程图示出了各个方法动作,但除非明确规定否则不需要特定次序,或因为一动作依赖于另一动作在执行该动作之前完成而需要特定次序。 Although discussed with specific order or order of occurrence for a specific flow chart illustrates operation of the various methods, but unless specifically stated no specific order, or required because an act is dependent on another act being completed prior to the act being performed in a particular order .

[0045] 现在参考图2,示出了方法200。 [0045] Referring now to Figure 2, a method 200 is shown. 该方法可以在包括静态编译语言的计算环境中实施。 The method may be practiced in a computing environment comprises the statically compiled language. 静态编译语言规定动态编译元素。 Statically compiled language provisions of dynamic compilation element. 该方法包括用于创建平台便携式代码的动作。 The method includes the code used to create a portable platform action. 该方法包括声明对象是程序中的动态对象(动作20¾。程序是使用静态语言编译的程序。声明对象为动态对象使得被声明为动态对象的对象在程序被编译时被排除在对对象的静态分析之外。动态对象包括对平台专用API的依赖调用。平台专用API在对其部署程序的经编译版本的一个或多个平台上是可用的,但是在对其部署程序的经编译版本的一个或多个其它平台上是不可用的。 The method includes declarative object is the program of the moving object (act 20¾. Procedure is to use a static language compiler program. Declared object moving objects such is declared as dynamic objects are to be excluded in the static analysis of the target program is compiled outside of dynamic objects, including platform-specific API calls to the dependence of. platform-specific API is available in a compiled version of the program or the deployment of its multiple platforms, but in a compiled version of the program or its deployment a plurality of other platforms is unavailable.

[0046] 方法200还包括将程序静态编译为平台便携式代码,并同时将动态对象排除在静态分析之外(动作204)。 [0046] The method 200 further comprises program code for statically compiled into a portable internet, and simultaneously moving objects excluded static analysis (act 204). 然后将平台便携式代码部署至不同平台,并在不同平台上成功执行。 Then the platform portable code is deployed to different platforms and successfully execute on different platforms. 如上所述,将程序静态编译成平台便携式代码包括将动态对象明确排除在编译期间对程序中的未被声明为动态的其它对象执行的静态分析之外,作为将对象声明为动态对象的结果。 As mentioned above, the program is statically compiled into platform portable code includes a dynamic objects explicitly excluded during the compilation of the program are not declared as static analysis dynamic than other objects executed as a result of an object declared as dynamic objects.

[0047] 可实施方法200的实施方式,其中对平台专用API的依赖调用依赖于经编译程序中包括的动态对象确定支持平台专用API的方法。 [0047] The embodiments of the method 200 may be implemented, wherein the dependence on the platform-specific API calls supported depends on the method of determination by the platform specific compiler API dynamic object included. 例如,图IA和IB以及上述其它示例示出使用IsSupported方法106和114,该方法可用于确定在平台上是否支持特定功能、对象和/或API。 For example, FIG. IA and IB as well as other examples illustrates the use of the above-described method IsSupported 106 and 114, the method may be used to determine whether the platform supports on the specific features, objects, and / or API. 对平台专用API的调用依赖于确定是否支持API结果。 Platform-specific API calls to determine whether support is dependent on the API results.

[0048] 在方法200的替换实施方式中,可实施方法200,其中对平台专用API的依赖调用依赖于经编译程序中包括的动态对象确定经编译程序正在其上运行的平台的方法。 [0048] In an alternative embodiment the method 200, the method 200 may be implemented, in which the dependence on the platform-specific API call depends on the method of determining a compiled program is running on the platform which programs compiled dynamic object included. 例如, 如图IC所示和上述其它实施方式所示,方法126和128可用于确定正在使用哪个平台,并且可基于正在使用的平台做出对平台专用API的适当调用。 For example, as shown in FIG IC and other embodiments described above, the methods 126 and 128 may be used to determine which platform is being used, and can make appropriate API calls to the dedicated internet-based platform being used.

[0049] 可实施方法200的实施方式,其中该方法创建作为平台便携式二进制代码的平台便携式代码。 [0049] The embodiments of the method 200 may be implemented, wherein the code which creates a portable platform as binary code of the portable internet. 在该实施方式中,从单个源代码程序中创建单个二进制代码,其不同于单个源/多个二进制代码方案。 In this embodiment, a single binary code created from a single source code program, which is different from a single source / binary plurality of programs. 单个二进制代码可分发至多个不同平台。 May be distributed to a single binary number of different platforms. 如上所述,不同平台可包括具有不同操作系统的平台;不同平台可包括具有操作系统的不同版本的平台;不同虚拟机(如桌上CLR对Silverlight®运行时对移动电话运行时等),不同设备;和/或软件所运行的环境或底层系统的不同,例如硬件或软件配置的不同。 As described above, may include different platforms with different operating system platforms; different platforms may include different versions of an operating system platform; different virtual machines (e.g., the operation of the table CLR Silverlight® when running on the mobile phone and the like), different equipment; underlying different environments or systems and / or software running on, for example, different hardware or software configurations.

[0050] 可实施方法200的实施方式,其中对平台专用API的依赖调用方便在对其部署经编译程序的一个或多个平台上启用功能的点亮功能,被启用的功能在对其部署经编译程序的一个或多个其它平台上不存在。 Embodiment [0050] The method 200 may be implemented, wherein the dependence on the platform-specific API easy call function enabled or more platforms on which to deploy a compiled program lighting function is enabled by the deployment of its functions one or more of the compiler does not exist on other platforms. 以上示出了该情况的示例,其中语音功能在某些平台上可用而在其它平台上不可用。 Above shows an example of this case, where the speech features available on some platforms and not available on other platforms. 可测试是否支持,并在支持时点亮语音功能。 May test support, and when lit voice support.

[0051] 可实施方法200的实施方式,其中对平台专用API的依赖调用方便使用替换机制来在对其部署经编译程序的不同平台上实现类似功能,其中每个平台具有类似功能但使用不同API来实现该功能。 Embodiment [0051] The method 200 may be implemented, wherein the dependence on the platform-specific API calls to facilitate the use of alternative mechanisms to achieve similar functions on different platforms deploying its compiled program, wherein each platform has a similar function but different API this function is implemented. 该情况的示例在图IB和IC和上述其它示例中示出。 An example of this is shown in Figures IB and IC and other examples described above.

[0052] 现在参考图3,示出了方法300。 [0052] Referring now to Figure 3, a method 300 is shown. 方法300可以在包括静态编译语言的计算环境中实施。 The method 300 may be implemented in a computing environment comprises the statically compiled language. 静态编译语言规定动态编译元素。 Statically compiled language provisions of dynamic compilation element. 该方法包括用于执行平台便携式代码的动作。 The method includes acts for performing platform portable code. 该方法包括访问从静态语言程序编译的经编译程序中包括的动态对象(动作302)。 The method includes the dynamic object (act 302) from accessing a statically compiled language program is compiled program. 动态对象被排除在经编译程序的编译期间的静态分析之外。 Dynamic objects are excluded from static analysis during compilation by the compiler. 动态对象包括用作代理对象的功能,代理对象被配置成在平台专用对象在运行时在执行经编译程序的平台上是可访问的情况下在运行时加载平台专用对象。 Dynamic objects include functions as a proxy object, the proxy object is configured in a platform specific objects at run time the case accessible loading platform specific objects at run time on the execution of the compiled program internet.

[0053] 该方法还包括测试代理对象,以确定平台专用对象是否成功加载(动作304)。 [0053] The method further comprises testing the proxy object to determine whether the object is successfully loaded platform-specific (act 304). 可实施实施方式,其中测试代理对象以确定平台专用对象是否成功加载包括经编译程序中包括的动态对象确定支持平台专用对象的方法。 Embodiments may be implemented, wherein the test agent to determine whether the object is successfully loaded platform-specific objects includes a method for dynamically compiled program objects included in determining specific object support platform. 例如,图IA和IB示出使用IsSupported方法来确定是否支持平台专用对象。 For example, FIG. IA and IB illustrates a method used to determine whether IsSupported supporting platform specific objects. 或者,可实施实施方式,其中测试代理对象以确定平台专用对象是否成功加载包括经编译程序中包括的动态对象确定经编译程序正在其上执行的平台的方法。 Alternatively, embodiments may be implemented, wherein the test agent to determine whether the object is successfully loaded platform-specific objects include moving objects included in the program compiled by the compiler determines which method is performed by the platform. 例如,图IC示出确定动态对象正在哪个平台上执行的方法。 For example, FIG IC Dynamic objects being executed on the platform is shown which is determined.

[0054] 方法300还包括,作为测试代理对象的结果,确定平台专用对象成功加载,并因此调用平台专用对象API (动作306)。 [0054] The method 300 further includes, as a result of the test of the proxy object, the object is determined successfully loaded platform-specific, and therefore calls the platform specific objects API (act 306).

[0055] 此外,该方法可以由包括一个或多个处理器和诸如计算机存储器等计算机可读介质的计算机系统来实施。 [0055] Furthermore, the method may be implemented by comprising one or more processors and computer memory such as a computer-readable medium of a computer system. 具体而言,计算机存储器可以存储计算机可执行指令,计算机可执行指令在由一个或多个处理器执行时使得执行各种功能,如在各实施方式中所述的那些动作。 Specifically, the computer memory may store computer-executable instructions, computer-executable instructions that perform various functions, actions such as those described in the respective embodiments, when executed by one or more processors.

[0056] 本发明的各实施方式可以包括或利用包含计算机硬件的专用或通用计算机,这将在下文中更详细地讨论。 [0056] The embodiments of the present invention may comprise or utilize a special or general purpose computer including computer hardware, as discussed in more detail below. 本发明范围内的各实施方式还包括用于承载或存储计算机可执行指令和/或数据结构的物理计算机可读介质和其他计算机可读介质。 Various embodiments within the scope of the present invention further comprises means for carrying or storing computer-executable instructions and a physical computer / or data structures readable medium and other computer readable media. 这样的计算机可读介质可以是可由通用或专用计算机系统访问的任何可用介质。 Such computer-readable media can be any available media that can be a general purpose or special purpose computer system access. 存储计算机可执行指令的计算机可读介质是物理存储介质。 Computer-executable instructions stored in computer-readable media are physical storage media. 承载计算机可执行指令的计算机可读介质是传输介质。 The computer-readable medium bearing computer-executable instructions are transmission media. 由此,作为示例而非限制,本发明的各实施方式可包括至少两种完全不同的计算机可读介质: 物理计算机可读存储介质和传输计算机可读介质。 Thus, by way of example and not limitation, embodiments of the present invention may comprise at least two different computer-readable media: physical storage media and transmission computer readable computer readable media.

[0057] 物理计算机存储介质包括RAM、ROM、EEPROM、CD-ROM或其他光盘存储(如CD、DVD [0057] Computer storage media includes physical RAM, ROM, EEPROM, CD-ROM or other optical disk storage (e.g., CD, DVD

等)、磁盘存储或其他磁存储设备、或可用于存储计算机可执行指令或数据结构形式的所需程序代码装置且可由通用或专用计算机访问的任何其他介质。 Etc.), magnetic disk storage, or any other medium other magnetic storage devices, or desired program code for storing computer-executable instructions or data structures and apparatus by a general purpose or special purpose computer.

[0058] “网络”被定义为允许在计算机系统和/或模块和/或其他电子设备之间传输电子数据的一个或多个数据链路。 [0058] "network" is defined to allow the transmission of electronic data or a plurality of data links between computer systems and / or modules and / or other electronic devices. 当信息通过网络或另一通信连接(硬连线、无线、或硬连线或无线的组合)传输或提供给计算机时,该计算机将该连接适当地视为传输介质。 When information (a combination of hardwired, wireless, or hardwired or wireless) to a computer is transferred or provided over a network or another communications when the computer properly views the connection as a transmission medium. 传输介质可包括可用于承载计算机可执行指令或数据结构形式的所需程序代码装置并可由通用或专用计算机访问的网络和/或数据链路。 Transmissions media can include a network and a desired program code means and / or data link by a general purpose or special purpose computer may be employed to carry computer-executable instructions or data structures and form. 以上介质的组合也被包括在计算机可读介质的范围内。 Combinations of the above are also included within the scope of computer-readable media.

[0059] 此外,在到达各种计算机系统组件之后,计算机可执行指令或数据结构形式的程序代码装置可从传输计算机可读介质自动转移到物理计算机可读存储介质(或者相反)。 Program code means [0059] Further, upon reaching various computer system components, computer-executable instructions or data structures can be transferred automatically from transmission media to physical computer-readable computer readable storage media (or vice versa). 例如,通过网络或数据链路接收到的计算机可执行指令或数据结构可被缓存在网络接口模块(例如,“NIC”)内的RAM中,然后最终被传送到计算机系统RAM和/或计算机系统处的较不易失性的计算机可读物理存储介质。 For example, it received over a network or data link computer-executable instructions or data structures can be buffered in the network interface module (e.g., "NIC") RAM inside, and then eventually transferred to computer system RAM and / or computer system less volatile computer-readable physical storage medium at. 因此,计算机可读物理存储介质可被包括在同样(或甚至主要)利用传输介质的计算机系统组件中。 Thus, a computer-readable physical storage media can be included in the same (or even primarily) utilize transmission media computer system components in the.

[0060] 计算机可执行指令例如包括,使通用计算机、专用计算机、或专用处理设备执行某一功能或某组功能的指令和数据。 [0060] Computer-executable instructions include, for example, cause a general purpose computer, special purpose computer, or special purpose processing device to perform a certain function or group of functions and data. 计算机可执行指令可以是例如二进制代码、诸如汇编语言或微软中间语言⑧的中间格式指令、或甚至源代码。 The computer executable instructions may be, for example, binaries, intermediate format instructions such as assembly language, or ⑧ the Microsoft Intermediate Language, or even source code. 尽管用结构特征和/或方法动作专用的语言描述了本主题,但可以理解的是,所附权利要求书中定义的主题不必限于上述特征或动作。 While specific to structural features and / or methodological acts, the subject matter has been described in language, it will be understood that the appended claims is not necessarily limited to the subject matter defined features or acts described above. 相反,上述特征和动作是作为实现权利要求的示例形式而公开的。 Instead, the above-described features and acts are disclosed as example forms of implementing the claims disclosed.

[0061] 本领域的技术人员将理解,本发明可以在具有许多类型的计算机系统配置的网络计算环境中实践,这些计算机系统配置包括个人计算机、台式计算机、膝上型计算机、消息处理器、手持式设备、多处理器系统、基于微处理器的或可编程消费电子设备、网络PC、小型计算机、大型计算机、移动电话、PDA、寻呼机、路由器、交换机等等。 [0061] Those skilled in the art will appreciate that the present invention may be practiced with many types of computer system configurations in network computing environments, the computer system configurations, including personal computers, desktop computers, laptop computers, message processors, hand-held devices, multiprocessor systems, microprocessor-based or programmable consumer electronics, network PC, minicomputers, mainframe computers, mobile phones, PDA, pagers, routers, switches and the like. 本发明也可以在其中通过网络链接(或者通过硬连线数据链路、无线数据链路,或者通过硬连线和无线数据链路的组合)的本地和远程计算机系统两者都执行任务的分布式系统环境中实践。 Wherein the present invention may also be linked by a network (or data links, wireless data links, or by a combination of hardwired and wireless data links hardwired) distribution of both local and remote computer systems perform tasks systems environments in practice. 在分布式系统环境中,程序模块可以位于本地和远程存储器存储设备二者中。 In a distributed system environment, program modules may be located in both local and remote memory storage devices.

[0062] 本发明可具体化为其他具体形式而不背离其精神或特征。 [0062] The present invention may be embodied in other specific forms without departing from its spirit or characteristics. 所描述的实施方式在所有方面都应被认为仅是说明性而非限制性的。 The described embodiments are to be considered in all respects only as illustrative and not restrictive. 从而,本发明的范围由所附权利要求书而非前述描述指示。 Accordingly, the scope of the invention being indicated by the appended claims rather than the foregoing description. 落入权利要求书的等效方案的含义和范围内的所有改变被权利要求书的范围所涵盖。 All changes which come within the scope of the claims fall within the meaning and range of equivalency of the claims are covered.

Claims (15)

  1. 1. 一种计算环境中的创建平台便携式代码的方法,所述计算环境包括使用静态编译语言编写的程序,其中所述静态编译语言规定动态编译元素,所述方法包括:声明对象是程序中的动态对象O02),所述程序是所用静态语言编译的程序,其中声明对象为动态对象使得被声明为动态对象的对象在编译程序时被排除在对对象的静态分析之外,其中动态对象包括对平台专用API的依赖调用,平台专用API在将对其部署所述程序的经编译版本的一个或多个平台上是可用的,但是在将对其部署所述程序的经编译版本的一个或多个其它平台上是不可用的;以及将所述程序静态编译成平台便携式代码,所述平台便携式代码然后被部署至不同平台并在不同平台上成功执行O04),其中将所述程序静态编译成平台便携式代码包括将所述动态对象排除在编译期间对所述程序中的未 1. A method of computing platform environment to create a portable code, the computing environment comprises using a static compiled language program, wherein said predetermined dynamic compilation statically compiled language elements, the method comprising: an object is declared in the program dynamic object O02), the procedure is used statically compiled language program, wherein the object is a dynamic object such statement is declared as dynamic objects are to be excluded from the analysis of static objects in the compiler, wherein the moving object comprises the platform-specific API calls dependent, the platform-specific API in its compiled version of a program of the deployed one or more platforms are available, but one of its compiled version of the program is deployed or last other platforms are available; and statically compiled into the program code is portable platform, the platform portable code is then deployed to a different platform and successfully performed on different platforms O04), wherein the statically compiled into the program the portable internet code comprises the moving object does not exclude the program during compilation 声明为动态的其它对象执行的静态分析之外。 Declared as static than dynamic analysis of other objects of execution.
  2. 2.如权利要求1所述的方法,其特征在于,所述对平台专用API的依赖调用依赖于经编译程序中包括的动态对象确定支持平台专用API的方法。 2. The method according to claim 1, characterized in that the method relies on the API calls rely on dynamic object comprises determining a compiled program platform-specific API support for the special internet.
  3. 3.如权利要求1所述的方法,其特征在于,所述对平台专用API的依赖调用依赖于所述经编译程序中包括的动态对象确定所述经编译程序正在其上执行的平台的方法。 3. The method according to claim 1, characterized in that the dependence on the platform-specific API method call dependence of dynamic objects in the compiled program included in determining the compiler platform is executing in the warp .
  4. 4.如权利要求1所述的方法,其特征在于,所述方法创建作为平台便携式二进制代码的平台便携式代码,使得从包括一个或多个源代码文件的单个源代码程序中创建单个二进制代码,其中所述单个二进制代码可分发至多个不同平台。 4. The method according to claim 1, characterized in that, the method creates a portable internet platform portable tag as binary code, so to create a single binary code from source code includes one or more source code files in a single, wherein said single binary code may be distributed to a plurality of different platforms.
  5. 5.如权利要求1所述的方法,其特征在于,所述对平台专用API的依赖调用方便在对其部署所述经编译程序的一个或多个平台上启用功能的点亮功能,被启用的功能在对其部署所述经编译程序的一个或多个其它平台上不存在。 5. The method according to claim 1, wherein said platform-specific API calls to the dependence of the function to facilitate the lighting function to enable the deployment of its platform via one or more of the compiler is enabled the function does not exist in one or more other platforms deploying the compiled program thereof.
  6. 6.如权利要求1所述的方法,其特征在于,所述对平台专用API的依赖调用方便使用替换机制来在对其部署所述经编译程序的不同平台上实现类似功能,其中每个平台具有类似功能但使用不同API来实现该功能。 6. The method according to claim 1, wherein said platform-specific API calls to the dependence of the easy to use replacement mechanism similar functionality on different platforms via the compiler in the deployment thereof, wherein each platform having a similar function but using a different API to implement this function.
  7. 7.如权利要求1所述的方法,其特征在于,不同平台包括具有不同操作系统的平台。 7. The method according to claim 1, wherein the platform includes a platform having various different operating systems.
  8. 8.如权利要求1所述的方法,其特征在于,不同平台包括具有操作系统的不同版本的D ο 8. The method according to claim 1, wherein the platform includes different versions with different operating system D ο
  9. 9.如权利要求1所述的方法,其特征在于,不同平台包括具有不同硬件或软件配置中的至少一个的平台。 9. The method according to claim 1, characterized in that the platform comprises at least one of the different platforms with different hardware or software configurations.
  10. 10.如权利要求1所述的方法,其特征在于,不同平台包括具有不同虚拟机的平台。 10. The method according to claim 1, wherein the platform includes a platform having various different virtual machines.
  11. 11. 一种在计算环境中的执行平台便携式代码的方法,所述计算环境包括静态编译语言,其中所述静态编译语言规定动态编译元素,所述方法包括:访问从静态语言程序编译的经编译程序中包括的动态对象(302),但其中所述动态对象被排除在所述经编译程序的编译期间的静态分析之外,并且其中所述动态对象包括用作代理对象的功能,所述代理对象被配置成在平台专用对象在运行时在执行所述经编译程序的平台上是可访问的情况下在运行时加载所述平台专用对象;测试所述代理对象以确定所述平台专用对象是否成功加载(304);以及确定所述平台专用对象成功加载,并因此调用平台专用对象API (306)。 11. A method in a computing environment portable code execution platform, the computing environment comprising a statically compiled language, wherein said predetermined dynamic compilation statically compiled language elements, the method comprising: accessing compiled statically compiled language program from dynamic object (302) included in the program, but wherein the object is excluded by the dynamic to static analysis during compilation compilers, and wherein the moving object comprises a function as the proxy object, the proxy Object configured to execute the platform-specific objects at run time by the platform where the compiler is accessible loading the platform specific objects at runtime; testing said proxy object to determine whether the platform specific objects loaded successfully (304); and determining the specific target platform successfully loaded, and thus calls the platform specific objects API (306).
  12. 12.如权利要求11所述的方法,其特征在于,测试所述代理对象以确定所述平台专用对象是否成功加载包括所述经编译程序中包括的动态对象确定支持所述平台专用对象的方法。 12. The method of claim 11, wherein said proxy object test to determine whether the platform-specific objects include the moving object loaded successfully compiled program included in determining the support platform-specific object .
  13. 13.如权利要求11所述的方法,其特征在于,测试所述代理对象以确定所述平台专用对象是否成功加载包括所述经编译程序中包括的动态对象确定所述经编译对象正在其上执行的平台的方法。 On which the object is compiled 13. The method of claim 11, wherein said proxy object test to determine whether the platform-specific objects include the moving object loaded successfully compiled program included in determining the the method of execution platform.
  14. 14.如权利要求11所述的方法,其特征在于,所述经编译程序是平台便携式二进制代码,并且是从单个源代码程序中创建的单个二进制代码,其中所述单个二进制代码可分发至多个不同平台。 14. The method according to claim 11, wherein the program is compiled binary code of the portable platform, and creates a single binary code from a single source code program, wherein the single code may be distributed to a plurality of binary different platforms.
  15. 15.如权利要求11所述的方法,其特征在于,所述对平台专用API的调用方便在对其部署所述经编译程序的一个或多个平台上启用功能的点亮功能,被启用的功能在对其部署所述经编译程序的一个或多个其它平台上不存在。 15. The method according to claim 11, wherein said platform-specific API calls to the convenience of its functions enabled by deploying the one or more platform compiler lighting function is enabled function does not exist in one or more other platforms deploying the compiled program thereof.
CN 201110171604 2010-06-15 2011-06-15 Adaptive Dynamic Programming CN102289384B (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
US12/816,249 2010-06-15
US12816249 US8572591B2 (en) 2010-06-15 2010-06-15 Dynamic adaptive programming

Publications (2)

Publication Number Publication Date
CN102289384A true true CN102289384A (en) 2011-12-21
CN102289384B CN102289384B (en) 2016-05-18

Family

ID=45097318

Family Applications (1)

Application Number Title Priority Date Filing Date
CN 201110171604 CN102289384B (en) 2010-06-15 2011-06-15 Adaptive Dynamic Programming

Country Status (2)

Country Link
US (1) US8572591B2 (en)
CN (1) CN102289384B (en)

Families Citing this family (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8473971B2 (en) 2005-09-06 2013-06-25 Microsoft Corporation Type inference and type-directed late binding
US20080320453A1 (en) * 2007-06-21 2008-12-25 Microsoft Corporation Type inference and late binding
US8752193B2 (en) * 2009-11-16 2014-06-10 Sandisk Technologies Inc. Content binding at first access
US8997069B2 (en) * 2011-04-13 2015-03-31 Microsoft Technology Licensing, Llc API descriptions
US9256401B2 (en) 2011-05-31 2016-02-09 Microsoft Technology Licensing, Llc Editor visualization of symbolic relationships
US8776094B2 (en) 2011-08-11 2014-07-08 Microsoft Corporation Runtime system
US9015677B2 (en) * 2011-12-06 2015-04-21 Nice Systems Ltd. System and method for developing and testing logic in a mock-up environment
US8910115B2 (en) * 2012-04-02 2014-12-09 Kony Solutions, Inc. Systems and methods for application development
US20140096014A1 (en) * 2012-09-29 2014-04-03 Oracle International Corporation Method for enabling dynamic client user interfaces on multiple platforms from a common server application via metadata
US9800458B1 (en) * 2013-05-14 2017-10-24 Google Inc. Dynamic, interactive objects for posting
WO2015183241A1 (en) * 2014-05-27 2015-12-03 Hewlett-Packard Development Company, L.P. Distributed compilation of statically typed languages
US20160110229A1 (en) * 2014-10-16 2016-04-21 Microsoft Corporation Api versioning independent of product releases
US9977673B1 (en) * 2014-11-13 2018-05-22 Marvell International Ltd. Systems and methods for providing a platform-specific porting layer for multi-level software stacks
US9886367B2 (en) * 2015-04-29 2018-02-06 International Business Machines Corporation Unified processing test structure

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1577265A (en) * 2003-07-23 2005-02-09 微软公司 Description language for an extensible compiler and tools infrastructure
US20060100975A1 (en) * 2004-10-25 2006-05-11 Microsoft Corporation Strongly-typed object oriented GUI automation framework
US20070100967A1 (en) * 2001-07-10 2007-05-03 Microsoft Corporation Application Program Interface for Network Software Platform
US20080178151A1 (en) * 2004-12-02 2008-07-24 International Business Machines Corporation Method and Apparatus to Implement Adaptive Scripting Tool
US20080320444A1 (en) * 2007-06-21 2008-12-25 Microsoft Corporation Late bound programmatic assistance
JP2009053802A (en) * 2007-08-24 2009-03-12 Toshiba Corp Program processing method and program

Family Cites Families (75)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5488727A (en) 1991-09-30 1996-01-30 International Business Machines Corporation Methods to support multimethod function overloading with compile-time type checking
US5692195A (en) 1994-08-31 1997-11-25 International Business Machines Corporation Parent class shadowing
US5485615A (en) 1992-06-10 1996-01-16 Telefonaktiebolaget L M Ericsson System and method of interactively developing desired computer programs by using plurality of tools within a process described in graphical language
JP3178151B2 (en) 1993-03-19 2001-06-18 富士ゼロックス株式会社 Message compiling device of object-oriented language
US5500881A (en) 1993-07-12 1996-03-19 Digital Equipment Corporation Language scoping for modular, flexible, concise, configuration descriptions
US5748961A (en) 1993-07-12 1998-05-05 Digital Equipment Corporation Efficient method and apparatus for compiling and linking modules of computer code in a large software system
US6425124B1 (en) 1993-11-08 2002-07-23 Matsushita Electric Industrial Co. Ltd. Resource allocation device for reducing the size and run time of a machine language program
US5742828A (en) 1994-08-03 1998-04-21 Microsoft Corporation Compiler and method for evaluation of foreign syntax expressions in source code
US5748963A (en) 1995-05-12 1998-05-05 Design Intelligence, Inc. Adaptive binding
US5687377A (en) 1995-10-06 1997-11-11 Electronic Data Systems Corporation Method for storing variables in a programming language
US5872973A (en) 1995-10-26 1999-02-16 Viewsoft, Inc. Method for managing dynamic relations between objects in dynamic object-oriented languages
US6072950A (en) 1996-06-18 2000-06-06 Microsoft Corporation Pointer analysis by type inference combined with a non-pointer analysis
US6100885A (en) 1996-07-06 2000-08-08 International Business Machines Corporation Supporting modification of properties via a computer system's user interface
US6041179A (en) 1996-10-03 2000-03-21 International Business Machines Corporation Object oriented dispatch optimization
JPH10124325A (en) 1996-10-25 1998-05-15 Toshiba Corp Method and device for optimum arrangement of variable, and computer-readable recording medium stored with optimum arrangement program for variable
US6134708A (en) 1997-02-13 2000-10-17 Nec Corporation Program compilation execution system
US6041180A (en) 1997-04-28 2000-03-21 International Business Machines Corporation System and method for optimizing template object files
US5842220A (en) 1997-05-02 1998-11-24 Oracle Corporation Methods and apparatus for exposing members of an object class through class signature interfaces
US6026233A (en) 1997-05-27 2000-02-15 Microsoft Corporation Method and apparatus for presenting and selecting options to modify a programming language statement
US6314559B1 (en) 1997-10-02 2001-11-06 Barland Software Corporation Development system with methods for assisting a user with inputting source code
CA2219557C (en) 1997-10-29 2002-12-10 Ibm Canada Limited-Ibm Canada Limitee Run-time instrumentation for object oriented programmed applications
US6330717B1 (en) 1998-03-27 2001-12-11 Sony Corporation Of Japan Process and system for developing an application program for a distributed adaptive run-time platform
US5983021A (en) 1998-05-27 1999-11-09 Sun Microsystems Dynamically switching statically bound function calls to dynamically bound function calls without recompilation
US6018628A (en) 1998-06-16 2000-01-25 Sun Microsystems, Inc. Method of implementing parameterized types to be compatible with existing unparameterized libraries
US6237135B1 (en) 1998-06-18 2001-05-22 Borland Software Corporation Development system with visual design tools for creating and maintaining Java Beans components
US6915301B2 (en) 1998-08-25 2005-07-05 International Business Machines Corporation Dynamic object properties
US6415316B1 (en) 1998-09-01 2002-07-02 Aidministrator Nederland B.V. Method and apparatus for implementing a web page diary
US6477543B1 (en) * 1998-10-23 2002-11-05 International Business Machines Corporation Method, apparatus and program storage device for a client and adaptive synchronization and transformation server
US6502233B1 (en) 1998-11-13 2002-12-31 Microsoft Corporation Automated help system for reference information
US6842877B2 (en) 1998-12-18 2005-01-11 Tangis Corporation Contextual responses based on automated learning techniques
US7080322B2 (en) 1998-12-18 2006-07-18 Tangis Corporation Thematic response to a computer user's context, such as by a wearable personal computer
US6678745B1 (en) 1999-06-01 2004-01-13 Bruce Hodge Dynamic object synthesis with automatic late binding
CA2279118A1 (en) 1999-07-29 2001-01-29 Ibm Canada Limited-Ibm Canada Limitee Tooling framework system and method for code generation
US6560774B1 (en) 1999-09-01 2003-05-06 Microsoft Corporation Verifier to check intermediate language
US6986132B1 (en) 2000-04-28 2006-01-10 Sun Microsytems, Inc. Remote incremental program binary compatibility verification using API definitions
US6981249B1 (en) 2000-05-02 2005-12-27 Microsoft Corporation Methods for enhancing type reconstruction
US6973646B1 (en) 2000-07-21 2005-12-06 International Business Machines Corporation Method for compiling program components in a mixed static and dynamic environment
US20020129345A1 (en) 2000-09-27 2002-09-12 Tilden Mark D. Scripting business logic in a distributed object oriented environment
US6957394B1 (en) 2000-12-01 2005-10-18 Microsoft Corporation Rendering controls of a web page according to a theme
US7437710B2 (en) 2001-07-02 2008-10-14 Bea Systems, Inc. Annotation based development platform for stateful web services
US7120897B2 (en) 2001-07-10 2006-10-10 Microsoft Corporation User control objects for providing server-side code generation from a user-defined dynamic web page content file
US6928425B2 (en) 2001-08-13 2005-08-09 Xerox Corporation System for propagating enrichment between documents
US20030131347A1 (en) 2001-10-12 2003-07-10 Allison David S. Method and apparatus for runtime binding of object members
US20030097648A1 (en) 2001-10-12 2003-05-22 Allison David S. Method and apparatus for determining runtime size and type information in dynamically typed languages
US6965990B2 (en) 2001-10-23 2005-11-15 International Business Machines Corporation Method and apparatus for providing programming assistance
US7152229B2 (en) 2002-01-18 2006-12-19 Symbol Technologies, Inc Workflow code generator
US7017117B2 (en) 2002-02-14 2006-03-21 Symantec Corporation Attenuating and amplifying user interface themes
US7127707B1 (en) 2002-10-10 2006-10-24 Microsoft Corporation Intellisense in project upgrade
US7546607B2 (en) 2002-11-19 2009-06-09 Microsoft Corporation Native code exposing virtual machine managed object
US7051322B2 (en) 2002-12-06 2006-05-23 @Stake, Inc. Software analysis framework
US8032860B2 (en) 2003-02-26 2011-10-04 Oracle International Corporation Methods for type-independent source code editing
US7246361B1 (en) 2003-03-20 2007-07-17 Intuit, Inc. Supporting multiple late binding objects with the same identifier
US7389498B2 (en) 2003-03-25 2008-06-17 Microsoft Corporation Core object-oriented type system for semi-structured data
US7620959B2 (en) 2003-05-12 2009-11-17 Microsoft Corporation Reflection-based processing of input parameters for commands
US7197702B2 (en) 2003-06-13 2007-03-27 Microsoft Corporation Web page rendering mechanism using external programmatic themes
US7647610B2 (en) * 2003-08-19 2010-01-12 Lg Electronics Inc. Interfacing system between digital TV and plurality of remote controllers, method thereof, remote controller thereof, and remote controller signal transmitting method thereof
US8307109B2 (en) 2003-08-27 2012-11-06 International Business Machines Corporation Methods and systems for real time integration services
US7818729B1 (en) 2003-09-15 2010-10-19 Thomas Plum Automated safe secure techniques for eliminating undefined behavior in computer software
US20050081139A1 (en) 2003-10-10 2005-04-14 George Witwer Clustering based personalized web experience
WO2005038610A3 (en) 2003-10-14 2005-10-13 Donn Delson A method and system for using cascading style sheets (css) to customize an online store
US7676798B2 (en) 2003-10-24 2010-03-09 Microsoft Corporation Mechanism for obtaining and applying constraints to constructs within an interactive environment
US20050198177A1 (en) 2004-01-23 2005-09-08 Steve Black Opting out of spam
US20050278695A1 (en) 2004-06-14 2005-12-15 Synovic Michael J System and method for modifying code assist within an integrated development environment
US7693856B2 (en) 2004-06-25 2010-04-06 Apple Inc. Methods and systems for managing data
US20060015817A1 (en) 2004-07-15 2006-01-19 Giuseppe Fioretti Method to dynamically customize a web user interface
GB0416867D0 (en) 2004-07-29 2004-09-01 Ibm Automatic content completion of valid values for method argument variables
US7571189B2 (en) 2005-02-02 2009-08-04 Lightsurf Technologies, Inc. Method and apparatus to implement themes for a handheld device
US7730448B2 (en) 2005-08-11 2010-06-01 Microsoft Corporation Layered type systems
US8473971B2 (en) 2005-09-06 2013-06-25 Microsoft Corporation Type inference and type-directed late binding
US7765519B2 (en) * 2005-12-16 2010-07-27 International Business Machines Corporation Efficient builds for installation software
US7958493B2 (en) 2006-01-20 2011-06-07 Kevin Edward Lindsey Type inference system and method
US8615743B2 (en) 2006-02-27 2013-12-24 Microsoft Corporation Adaptive compiled code
US7849451B2 (en) 2006-03-02 2010-12-07 Oracle America Inc. Dynamic delegation chain for runtime adaptation of a code unit to an environment
US8225294B2 (en) 2006-04-27 2012-07-17 Oracle America, Inc. Method and apparatus for expressing and checking relationships between types
US20080320453A1 (en) 2007-06-21 2008-12-25 Microsoft Corporation Type inference and late binding

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20070100967A1 (en) * 2001-07-10 2007-05-03 Microsoft Corporation Application Program Interface for Network Software Platform
CN1577265A (en) * 2003-07-23 2005-02-09 微软公司 Description language for an extensible compiler and tools infrastructure
US20060100975A1 (en) * 2004-10-25 2006-05-11 Microsoft Corporation Strongly-typed object oriented GUI automation framework
US20080178151A1 (en) * 2004-12-02 2008-07-24 International Business Machines Corporation Method and Apparatus to Implement Adaptive Scripting Tool
US20080320444A1 (en) * 2007-06-21 2008-12-25 Microsoft Corporation Late bound programmatic assistance
JP2009053802A (en) * 2007-08-24 2009-03-12 Toshiba Corp Program processing method and program

Also Published As

Publication number Publication date Type
US8572591B2 (en) 2013-10-29 grant
CN102289384B (en) 2016-05-18 grant
US20110307869A1 (en) 2011-12-15 application

Similar Documents

Publication Publication Date Title
US6507946B2 (en) Process and system for Java virtual method invocation
US6349408B1 (en) Techniques for implementing a framework for extensible applications
US6412108B1 (en) Method and apparatus for speeding up java methods prior to a first execution
US20020129177A1 (en) System and method for class loader constraint checking
US20060212847A1 (en) Type checker for a typed intermediate representation of object-oriented languages
US8266604B2 (en) Transactional memory compatibility management
US6233725B1 (en) Method and apparatus to coordinate and control the simultaneous use of multiple just in time compilers with a java virtual machine
US20050028151A1 (en) Module symbol export
US20030101438A1 (en) Semantics mapping between different object hierarchies
US6981250B1 (en) System and methods for providing versioning of software components in a computer programming language
US7373632B1 (en) System and method for dynamic generation of proxies for isomorphic interfaces
US7533376B2 (en) Dynamic linking in constrained environment
US20060080680A1 (en) Platform independent dynamic linking
US20060265705A1 (en) Computer architecture and method of operation for multi-computer distributed processing with finalization of objects
US20040255268A1 (en) Systems and methods providing lightweight runtime code generation
Soares et al. Distribution and persistence as aspects
Leroy Java bytecode verification: an overview
US20050216885A1 (en) Attribute-Based Component Programming System and Methodology for Object-Oriented Languages
US20060130038A1 (en) Apparatus, system, and method for facilitating dynamic modification of existing software objects defined in a strongly-typed programming language
US20040267804A1 (en) Hybrid system implementing distinct and co-existing application execution environments and methods for implementing the same
US20040268301A1 (en) Adding new compiler methods to an integrated development environment
US6385764B1 (en) Method and apparatus for improving invocation speed of Java methods
US20120084864A1 (en) System and method for a mobile cross-platform software system
US20050193369A1 (en) Code rewriting
US7444625B2 (en) Concurrent code loading mechanism

Legal Events

Date Code Title Description
C06 Publication
C10 Entry into substantive examination
C41 Transfer of patent application or patent right or utility model
ASS Succession or assignment of patent right

Owner name: MICROSOFT TECHNOLOGY LICENSING LLC

Free format text: FORMER OWNER: MICROSOFT CORP.

Effective date: 20150717

C14 Grant of patent or utility model
C41 Transfer of patent application or patent right or utility model