Implementing changes made to source code of loadable types at runtime
Patent Information
- Application Number
- CN202280048728.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Priority Date
- 2021-07-12
- Filing Date
- 2022-06-29
- Publication Date
- 2026-10-27
- Estimated Expiration
- 2042-06-29
AI Technical Summary
然而,由于更新类型的运行时表示及其实例的固有复杂性,允许的编辑集被限制
Smart Images

Figure CN117693735B_ABST
Abstract
Description
Background Technology
[0001] Various types of software development tools allow software developers to make changes to an application's source code while the program is in interrupt mode during a debug session. If any defects or problems preventing the source code from operating correctly are discovered during a debug session, the software developer can make changes to the source code to resolve them. In some cases, changes can be made without an attached debugger. However, another scenario is when a debugger is attached, but the program may not be paused in interrupt mode when changes are made. In such cases, once changes to the source code are received, these changes can be applied in-place to the source code of a type. In other words, when changes are applied to the source code of that type, the source code is rewritten. Once the changes have been made and the software developer resumes the application, the runtime representation of that type and its existing instances are updated to reflect the changes. This allows software developers to make changes to the source code without stopping, recompiling the entire program, and restarting the debug session. However, due to the inherent complexity of updating the runtime representation of a type and its instances, the allowed set of edits is limited.
[0002] The aspects disclosed herein were made in consideration of these and other general considerations. Furthermore, while relatively specific problems may be discussed, it should be understood that the examples should not be limited to solving the specific problems identified in the background art or elsewhere in this disclosure. Summary of the Invention
[0003] This disclosure relates to hot reloading, which reduces the inner loop of the developer's development cycle by allowing developers to modify the program without stopping, reloading, and restarting it. More specifically, this disclosure teaches the ability to hot reload even when the type (e.g., class) has changed. To achieve this, both the UI framework and the .NET runtime can be updated.
[0004] According to at least one example of this disclosure, a method for implementing changes to the source code of a program at runtime is disclosed. The method may include executing the source code in a runtime environment, detecting changes made to the source code at runtime in the runtime environment, determining whether the change is made to a type identified as reloadable in the source code, creating a new version of the type in response to the determination that the change is made to a type identified as reloadable in the source code, and implementing the changes to the source code at runtime using the new version of the type.
[0005] According to at least one example of this disclosure, a computing device for implementing changes to the source code of a program at runtime is disclosed. The computing device may include a processor and a memory having a plurality of instructions stored thereon, which, when executed by the processor, cause the computing device to: execute the source code in a runtime environment; detect changes to the source code made at runtime in the runtime environment; determine whether the changes are made to a type identified as reloadable in the source code; in response to the determination that the changes are made to a type identified as reloadable in the source code; create a new version of the type; and implement the changes to the source code at runtime using the new version of the type.
[0006] According to at least one example of this disclosure, a non-transitory computer-readable medium is disclosed that stores instructions for implementing changes to the source code of a program at runtime. When executed by one or more processors of a computing device, the instructions cause the computing device to execute the source code in a runtime environment, detect changes made to the source code at runtime in the runtime environment, determine whether the changes are made to a type identified as reloadable in the source code, and, in response to the determination that the changes are made to a type identified as reloadable in the source code, create a new version of that type, and implement the changes to the source code at runtime using the new version of that type.
[0007] Any one of the above aspects combined with any other aspect of the above aspects. Any one of the one or more aspects described herein.
[0008] The summary portion of this invention is provided to present some concepts in a simplified form, which will be further described in the detailed description below. This summary portion is not intended to identify key or essential features of the claimed subject matter, nor is it intended to be used to limit the scope of the claimed subject matter. Additional aspects, features, and / or advantages of the examples will be set forth in part in the description which follows, and in part will be obvious from the description, or may be learned by practice of this disclosure. Attached Figure Description
[0009] Non-restrictive and non-exhaustive examples are described with reference to the following figures.
[0010] Figure 1 Details of a software development system based on examples of this disclosure are described;
[0011] Figure 2 and Figure 3 The present disclosure describes methods for implementing changes to the source code of a reloadable type at runtime, based on examples of this disclosure.
[0012] Figure 4A block diagram depicts the physical components (e.g., hardware) of a computing device in which aspects of this disclosure can be utilized;
[0013] Figure 5A A first example of a computing device in which aspects of this disclosure can be utilized is shown;
[0014] Figure 5B A second example of a computing device in which aspects of this disclosure can be utilized is shown; and
[0015] Figure 6 At least one aspect of the architecture of a system for processing data, according to an example of this disclosure, is shown. Detailed Implementation
[0016] In the following detailed description, reference is made to the accompanying drawings, which form a part of the description, and specific aspects or examples are illustrated therein. These aspects may be combined, other aspects may be utilized, and structural changes may be made without departing from this disclosure. The aspects may be practiced as methods, systems, or devices. Therefore, the aspects may take the form of hardware implementations, entirely software implementations, or implementations combining software and hardware aspects. Therefore, the following detailed description should not be considered limiting, and the scope of this disclosure is defined by the appended claims and their equivalents.
[0017] According to examples in this disclosure, a software development system allows users (e.g., developers, programmers, designers, and / or coders) to develop or modify programs using an application framework that includes a software framework implementing a standard structure for application software. The software development system of this disclosure is configured to enable modifications to the source code of a program while the program is running. Specifically, the software development system allows users to modify specific types of the source code at runtime without stopping, reloading, and restarting the entire program.
[0018] Therefore, specific types can be marked as reloadable in the source code or in the database. In some respects, the database library can be associated with the application framework. When changes are made to the source code of a reloadable type, these changes may cause the creation of a new version of the reloadable type, rather than applying the changes in situ (e.g., updating the type in situ), and the new version of the reloadable type can replace the previous version of the type. For example, the application framework can replace the runtime representation and existing instances of the previous version of the reloadable type in the source code with the new version of the reloadable type. By creating a new version of the type that reflects the changes made to the source code, users can make changes to the source code at runtime without being constrained by the limitations of in-situ updates.
[0019] Figure 1A software development system 100, according to an example of this disclosure, is depicted for implementing changes made by user 110 to source code at runtime. For this purpose, the software development system 100 includes a computing device 120 associated with user 110 and one or more remote devices, such as server 140, communicatively coupled to computing device 120 via network 150. Network 150 may include any type of computing network, including but not limited to wired or wireless local area networks (LANs), wired or wireless wide area networks (WANs), and / or the Internet.
[0020] Computing device 120 includes an Integrated Development Environment (IDE) 130 running on computing device 120 having a processor 122, memory 124, and communication interface 126. IDE 130 allows user 110 to design, code, compile, test, run, edit, debug, or build software programs, assemblies, websites, web applications, and web services within a computer system. Software programs may include source code created in one or more source code languages (e.g., Visual Basic, Visual J#, C++, C#, J#, JavaScript, APL, COBOL, Pascal, Eiffel, Haskell, ML, Oberon, Perl, Python, Scheme, Smalltalk, etc.). IDE 130 may provide a native code development environment or a managed code environment running on a virtual machine. For example, IDE 130 may provide a managed code development environment using the .NET Framework. In illustrative embodiments, IDE 130 may be configured to develop applications for use with, for example, the .NET Framework and / or a UI framework. In order to implement changes made to the source code of reloadable types at runtime, both the UI framework and the .NET runtime can be updated.
[0021] For example, the .NET Framework has been updated to include properties that specify a particular type as reloadable and properties that specify a particular type as the recipient of an update notification. The update notification includes information about the type that has been updated. It should be understood that this property is a marker that can be placed on any type.
[0022] The UI framework defines specific types that represent UI elements. Those specific types that the UI framework can reload are marked by the aforementioned attributes. The UI framework implements a type designed to receive update notifications from runtime. Upon receiving such a notification, the UI framework replaces all updated reloadable types in its data structures with the corresponding new version, including the update. It should be understood that the usage pattern of reloadable types allows types to be replaced with their newer versions. In other words, user code referencing these types will reference them indirectly (e.g., via primitive types, interfaces, or dynamic dispatch), rather than directly referencing a specific version of the type.
[0023] To this end, IDE 130 also includes a source code analyzer 132, a reloadable type identifier 134, and a framework library updater 136. The source code analyzer 132 is configured to analyze the source code of the program loaded in IDE 130 to detect changes made by user 110 at runtime. In an illustrative sense, user 110 can use IDE 130 to make changes to the source code while the program is running. These changes can be implemented at runtime without stopping, reloading / recompiling, and restarting the entire program, depending on the metadata indicating the type of source code that has been changed. As described above and further below, certain types of source code can be reloaded and therefore can be arbitrarily updated while the program is running. Such reloadable types of source code allow user 110 to edit the program at runtime with fewer restrictions compared to those types that are updated in situ.
[0024] Reloadable type identifier 134 is configured to determine whether changes made to the source code pertain to the source code of one or more reloadable types. For example, user 110 can create one or more reloadable types by annotating certain types as reloadable during development. Alternatively or additionally, the framework may include a database of reloadable types of predefined types that can be reloaded. For example, application framework developers can create one or more types, identify certain types as reloadable, and store the identified reloadable types in the reloadable type database. Such a reloadable type database can be received from another computing device (e.g., server 140). Server 140 can be one or more cloud servers.
[0025] Framework library updater 136 is configured to send a notification, including metadata, to another device (e.g., server 140) indicating changes in the source code of the reloadable type. Changes made to the source code of the reloadable type generate a new version of the reloadable type, which is included in the metadata sent to the framework. In some respects, the notification is sent to server 140, and the framework can be updated via framework library updater 142 on server 140. The new version of the reloadable type is stored in the framework library (e.g., reloadable type database 128 and / or framework library 144). In response, the framework creates a new type with its own runtime representation (e.g., a new version of that type). When the UI framework is notified of an update to a reloadable type, the UI framework replaces all its references to older versions of that type with the new version. When the UI is refreshed, the UI framework identifies the type that implements a particular UI element and retrieves that type from its data structure. This will be the latest version of that type. Subsequently, the UI framework executes the code in the type of the UI that renders the element. This allows changes to be implemented immediately while the program is running.
[0026] An example of a framework that can use reloadable types is Razor. Razor is a framework used to create web applications and / or web pages. Razor enables programmers to construct workflows using HTML. In the example shown below, Microsoft.AspNetCore.Mvc.RazorPages.Page is a basic type representing a user-defined type of a web page. This type is typically generated from a .razor file that describes the page in the Razor language. This is automatically translated into C# code as shown below:
[0027]
[0028] When user 110 updates the .razor file (e.g., changes the page title), the sources of the aforementioned types are automatically updated accordingly. Razor comments are processed on server 140 before the page is sent to the browser. To allow these updates to take effect immediately while the web application is running, the Razor framework marks the basic type `Microsoft.AspNetCore.Mvc.RazorPages.Page` as reloadable, making all subtypes of `Page` reloadable as well. This eliminates the need to terminate, recompile, and re-execute the application, and avoids any restrictions on updates that can be performed in situ.
[0029] Another example of reloadable types is the Model-View-Update (MVU) pattern. The Comet UI framework is built using the MVU pattern. It provides a View class from which the application's UI view is derived:
[0030]
[0031] The Comet framework marks the View type as "reloadable" to allow users to update the view while the application is running.
[0032] Now for reference Figure 2 and Figure 3 A method 200 for making changes to the source code of a program while the program is running, according to examples of this disclosure, is provided. The general sequence of steps for method 200 is as follows: Figure 2 and Figure 3 The method is shown in the diagram. Generally, method 200 begins at position 204 and ends at position 254. Method 200 may include more or fewer steps, or may be combined with... Figure 2 and Figure 3 The different order of the steps shown. In illustrative terms, method 200 is performed by the computing device of user 110 (e.g., user device 120).
[0033] Specifically, in some aspects, method 200 can be executed by an integrated development environment (IDE) (e.g., 130) running on user device 120. For example, computing device 120 can be, but is not limited to, a computer, laptop, mobile device, smartphone, tablet, wearable device, or any other suitable computing device capable of communicating with server 140. For example, server 140 can be any suitable computing device capable of communicating with computing device 120. Method 200 can be executed as a set of computer-executable instructions executed by a computer system and encoded or stored on a computer-readable medium. Furthermore, method 200 can be executed by gates or circuits associated with a processor, application-specific integrated circuit (ASIC), field-programmable gate array (FPGA), system-on-a-chip (SOC), or other hardware device. Hereinafter, method 200 will be referred to in conjunction with... Figure 1 The described systems, components, modules, software, data structures, user interfaces, etc., are explained.
[0034] Method 200 begins at 202, where the flow can proceed to 206. At 206, computing device 120 obtains or constructs the source code of the program in an integrated development environment (IDE) (e.g., 124). In some aspects, the source code can be constructed within a software framework (e.g., the .NET Framework). For example, the source code can be provided by user 110. Alternatively, the source code can be received or obtained from server 140. Once the source code is obtained, it is loaded into IDE 124. For example, IDE 124 can be executed on computing device 120. Visual Eclipse Office or any other IDE.
[0035] Subsequently, at point 210, the source code is executed in the runtime environment provided by IDE 124. In some respects, computing device 120 can analyze the source code to identify one or more types marked as reloadable during runtime. For example, a user can create one or more types and annotate those types as reloadable during development. Alternatively or additionally, the software framework may include a library of reloadable types or a database of predefined types that can be reloaded at runtime. The reloadable type database can be received from another computing device (e.g., server 140). Alternatively or additionally, the developer of the software framework can create one or more types, mark certain types as reloadable, and store the identified reloadable types in the reloadable type database.
[0036] At 218, while the program is running in the runtime environment, computing device 120 detects one or more changes made to the source code by user 110. When one or more changes are detected, computing device 120 determines whether the one or more changes were made to the source code of a reloadable type, as described in operation 222. As mentioned above, the reloadable type database 128 associated with the software framework may include predefined types that can be reloaded at runtime. In this respect, computing device 120 determines whether one or more changes were made to the source code of a reloadable type in part based on the reloadable type database 128. Alternatively or additionally, specific types in the source code may be identified and annotated by user 110 as reloadable types of the source code before and / or during runtime. Alternatively or additionally, user 110 may create new types and annotate the new types as reloadable. Subsequently, method 200 proceeds to... Figure 3 Operation 226 in the middle, such as by Figure 2 and Figure 3 The alphanumeric character A is shown in the image.
[0037] At 226, if computing device 120 determines that the change is not in the reloadable type of the source code, method 200 proceeds to operation 230 to apply the changes made to the source code of the non-reloadable type in situ. In other words, the runtime representation of the non-reloadable type and all existing instances thereof are updated to reflect the changes. However, as mentioned above, due to the inherent complexity of updating the runtime representation of the type and its instances, the set of permitted in-situ edits is limited. Method 200 then jumps forward to operation 250 to continue executing the program in the runtime environment using the updated source code.
[0038] Returning to reference operation 226, if computing device 120 determines that a change was made in the reloadable type of the source code, method 200 proceeds to operation 234. At 234, computing device 120 creates a new type (e.g., a version of the reloadable type) based on the change.
[0039] Subsequently, at 238, computing device 120 notifies the software framework of information (e.g., metadata) about a new version of the type that needs to be reloaded by the software framework. In response to receiving the notification, at 242, the software framework migrates important state (e.g., member variables, if any) from the previous instance of the reloadable type to the new version of the reloadable type.
[0040] At position 246, computing device 120 replaces the runtime representation and existing instance of the previous version of the reloadable type in the source code with the new version of the reloadable type.
[0041] Subsequently, at point 250, computing device 120 continues to execute the program in the runtime environment after making changes while the program is running. This allows user 110 to make changes to the source code at runtime without stopping, reloading, and restarting the entire program.
[0042] Figures 4 to 6 The associated description provides a discussion of various operating environments in which aspects of this disclosure can be practiced. However, regarding Figures 4 to 6 The devices and systems shown and discussed are for illustrative purposes only and are not intended to limit the wide range of computing device configurations that can be used to practice the aspects of this disclosure described herein.
[0043] Figure 4 This is a block diagram illustrating the physical components (e.g., hardware) of a computing device 400 in which aspects of this disclosure can be implemented. The computing device components described below can be adapted to the computing device described above. For example, computing device 400 can represent... Figure 1 The computing device 120. In a basic configuration, the computing device 400 may include at least one processing unit 402 and system memory 404. Depending on the configuration and type of the computing device, the system memory 404 may include, but is not limited to, volatile memory (e.g., random access memory), non-volatile memory (e.g., read-only memory), flash memory, or any combination of such memory.
[0044] System memory 404 may include an operating system 405 and one or more program modules 406 adapted to perform the various aspects disclosed herein. For example, operating system 405 may be adapted to control the operation of computing device 400. Furthermore, aspects of this disclosure may be practiced in conjunction with graphics libraries, other operating systems, or any other applications, and are not limited to any particular application or system. This basic configuration is in Figure 4 The components within the dashed line 408 are shown. The computing device 400 may have additional features or functions. For example, the computing device 400 may also include additional data storage devices (removable and / or non-removable), such as, for example, a disk, optical disc, or magnetic tape. Such additional storage... Figure 4 The image is shown by removable storage device 409 and non-removable storage device 410.
[0045] As described above, several program modules and data files can be stored in system memory 404. While executing on at least one processing unit 402, program module 406 can perform processes including, but not limited to, one or more aspects, as described herein. Application 420 includes a source code analyzer 423, a reloadable type identifier 424, and a framework library updater 425, as described above. Figure 1 More detailed description. Other program modules that may be used in accordance with aspects of this disclosure may include email and contact applications, word processing applications, spreadsheet applications, database applications, PowerPoint presentation applications, drawing or computer-aided applications, and / or one or more components supported by the systems described herein.
[0046] Furthermore, aspects of this disclosure can be implemented in electronic circuits including discrete electronic components, packaged or integrated electronic chips containing logic gates, circuits utilizing microprocessors, or on a single chip containing electronic components or a microprocessor. For example, aspects of this disclosure can be implemented via a system-on-a-chip (SOC), wherein... Figure 4 Each or many of the components shown can be integrated onto a single integrated circuit. Such a SOC device may include one or more processing units, graphics units, communication units, system virtualization units, and various application functions, all integrated (or “programmed”) onto a chip substrate as a single integrated circuit. When operating via the SOC, the ability of the functions described herein to switch protocols relative to a client can be operated via dedicated logic integrated onto a single integrated circuit (chip) along with other components of the computing device 400. Aspects of this disclosure can also be practiced using other techniques capable of performing logical operations (such as, for example, AND, OR, and NOT), including but not limited to mechanical, optical, fluid, and quantum technologies. Furthermore, aspects of this disclosure can be practiced within a general-purpose computer or in any other circuit or system.
[0047] The computing device 400 may also have one or more input devices 412, such as a keyboard, mouse, pen, voice or speech input device, touch or swipe input device, etc. Multiple output devices 414A (such as a monitor, speaker, printer, etc.) may also be included. Outputs 414B corresponding to a virtual display may also be included. The above devices are examples and other devices may be used. The computing device 400 may include one or more communication connections 416 that allow communication with other computing devices 450. Examples of suitable communication connections 416 include, but are not limited to, radio frequency (RF) transmitters, receivers, and / or transceiver circuitry; universal serial buses (USB), parallel ports, and / or serial ports.
[0048] As used herein, the term computer-readable medium can include computer storage media. Computer storage media can include volatile and non-volatile, removable and non-removable media implemented in any method or technology for storing information, such as computer-readable instructions, data structures, or program modules. System memory 404, removable storage device 409, and non-removable storage device 410 are examples of computer storage media (e.g., memory storage). Computer storage media can include RAM, ROM, electrically erasable read-only memory (EEPROM), flash memory or other memory technologies, CD-ROM, digital versatile disc (DVD) or other optical storage, cassette tape, magnetic tape, disk storage or other magnetic storage devices, or any other article of manufacture that can be used to store information and is accessible by computing device 400. Any such computer storage medium may be part of computing device 400. Computer storage media does not include carrier waves or other propagated or modulated data signals.
[0049] Communication media can be embodied in computer-readable instructions, data structures, program modules, or other data (such as carrier waves or other transmission mechanisms) in modulated data signals, and include any information transmission medium. The term "modulated data signal" can describe a signal having one or more characteristics that are set or altered in a manner that encodes information in the signal. By way of example and not limitation, communication media can include wired media (such as wired networks or direct wired connections) and wireless media (such as acoustic, radio frequency (RF), infrared, and other wireless media).
[0050] Figure 5A and Figure 5B The aspects of this disclosure are illustrated using computing devices or mobile computing devices 500, such as mobile phones, smartphones, wearable computers (such as smartwatches), tablet computers, laptop computers, etc., from which they can be implemented. References Figure 5AOne aspect of a mobile computing device 500 used to implement these aspects is shown. In a basic configuration, the mobile computing device 500 is a handheld computer with both input and output elements. The mobile computing device 500 typically includes a display 505 and one or more input buttons 509 / 510, which allow the user to input information into the mobile computing device 500. The display 505 of the mobile computing device 500 can also be used as an input device (e.g., a touchscreen display). If included, an optional side input element 515 allows additional user input. The side input element 515 can be a rotary switch, a button, or any other type of manual input element. Alternatively, the mobile computing device 500 can incorporate more or fewer input elements. For example, in some aspects, the display 505 may not be a touchscreen. In yet another alternative aspect, the mobile computing device 500 is a portable telephone system, such as a cellular phone. The mobile computing device 500 may also include an optional keyboard 535. The optional keyboard 535 can be a physical keyboard or a “soft” keyboard generated on the touchscreen display. In various aspects, output elements include a display 505 for displaying a graphical user interface (GUI), a visual indicator 531 (e.g., a light-emitting diode), and / or an audio transducer 525 (e.g., a speaker). In some aspects, the mobile computing device 500 incorporates a vibration transducer for providing haptic feedback to the user. In another aspect, the mobile computing device 500 incorporates input and / or output ports 530 for sending signals to or receiving signals from external sources, such as audio inputs (e.g., a microphone jack), audio outputs (e.g., a headphone jack), and video outputs (e.g., an HDMI port).
[0051] Figure 5B This is a block diagram illustrating the architecture of one aspect of a computing device, server, or mobile computing device. That is, a mobile computing device 500 can be incorporated into a system (902) (e.g., the architecture) to implement some aspects. System 502 can be implemented as a "smartphone" capable of running one or more applications (e.g., a browser, email, calendar, contact manager, messaging client, game, and media client / player). In some aspects, system 502 is integrated as a computing device, such as integrating a personal digital assistant (PDA) and a wireless phone.
[0052] One or more applications 566 may be loaded into memory 562 and run on or associated with operating system 564. Examples of applications include telephone dialers, email programs, personal information management (PIM) programs, word processing programs, spreadsheet programs, internet browser programs, messaging programs, and / or one or more components supported by the system described herein. System 502 also includes a non-volatile storage area 568 within memory 562. The non-volatile storage area 568 may be used to store persistent information that should not be lost in the event of a power outage of system 502. Applications 566 may use and store information in the non-volatile storage area 568, such as emails or other messages used by email applications. A synchronization application (not shown) also resides on system 502 and is programmed to interact with a corresponding synchronization application residing on the host computer to keep the information stored in the non-volatile storage area 568 synchronized with the corresponding information stored on the host computer. As should be understood, other applications can be loaded into memory 562 and run on the mobile computing device 500 described herein (e.g., source code analyzer 423, reloadable type identifier 424, framework library updater 425, etc.).
[0053] System 502 has a power supply 570, which can be implemented as one or more batteries. The power supply 570 may also include an external power source, such as an AC adapter or a power base for replenishing or recharging the batteries.
[0054] System 502 may also include a radio interface layer 572 that performs the functions of transmitting and receiving radio frequency communications. Radio interface layer 572 facilitates wireless connectivity between system 502 and the "external world" via a communications operator or service provider. Transmissions to and from radio interface layer 572 are conducted under the control of operating system 564. In other words, communications received by radio interface layer 572 can be propagated to application 566 via operating system 564, and vice versa.
[0055] A visual indicator 520 may be used to provide visual notifications, and / or an audio interface 574 may be used to generate audible notifications via an audio transducer 525. In the illustrated configuration, the visual indicator 520 is a light-emitting diode (LED) and the audio transducer 525 is a speaker. These devices may be directly coupled to a power supply 570 such that when activated, they remain on for a duration specified by the notification mechanism, even if the processor 560 / 961 and other components may be turned off to conserve battery power. The LEDs may be programmed to remain on indefinitely until the user takes action to indicate the device's power-on status. The audio interface 574 is used to provide and receive audible signals from the user. For example, in addition to being coupled to the audio transducer 525, the audio interface 574 may also be coupled to a microphone to receive audible input, such as to facilitate telephone conversations. According to aspects of this disclosure, the microphone may also be used as an audio sensor to facilitate control of notifications, as described below. System 502 may also include a video interface 576 that supports the operation of an onboard camera to record still images, video streams, etc.
[0056] The mobile computing device 500 implementing system 502 may have additional features or functions. For example, the mobile computing device 500 may also include additional data storage devices (removable and / or non-removable), such as disks, optical discs, or magnetic tapes. Figure 5B The non-volatile storage region 568 is shown in the middle.
[0057] Data / information generated or captured by mobile computing device 500 and stored via system 502 can be locally stored on mobile computing device 500, as described above, or the data can be stored on any number of storage media accessible by the device via radio interface layer 572 or via a wired connection between mobile computing device 500 and a separate computing device associated with mobile computing device 500 (e.g., a server computer in a distributed computing network (e.g., the Internet)). It should be understood that such data / information can be accessed via mobile computing device 500 via radio interface layer 572 or via a distributed computing network. Similarly, such data / information can be readily transferred between computing devices for storage and use based on known data / information transmission and storage components (including email and collaborative data / information sharing systems).
[0058] Figure 6This illustrates one aspect of the architecture of a system for processing data received at a computing system from a remote source (such as a personal computer 604, a tablet computing device 606, or a mobile computing device 608), as described above. The content displayed at server device 602 can be stored in different communication channels or other storage types. For example, computing devices 604, 606, and 608 can represent... Figure 1 The computing device 120, and the server device 602 can represent Figure 1 Server 140.
[0059] In some aspects, one or more of the source code analyzer 623, reliable type identifier 624, and framework library updater 625 may be employed by server device 602. Server device 602 can provide data to and from client computing devices via network 612, such as personal computer 604, tablet computing device 606, and / or mobile computing device 608 (e.g., smartphone). By way of example, the aforementioned computer system may be embodied in personal computer 604, tablet computing device 606, and / or mobile computing device 608 (e.g., smartphone). In addition to receiving graphics data that can be used for preprocessing at the graphics initiating system or post-processing at the receiving computing system, any of these aspects of the computing device may also obtain content from repository 616. Content storage may include reloadable type data 618.
[0060] Figure 6 An exemplary mobile computing device 608 is shown that can perform one or more aspects of the invention disclosed herein. Furthermore, the aspects and functions described herein can operate on a distributed system (e.g., a cloud-based computing system), where application functions, memory, data storage and retrieval means, and various processing functions can operate remotely to each other via a distributed computing network (such as the Internet or an intranet). Various types of user interfaces and information can be displayed via an onboard computing device display or via a remote display unit associated with one or more computing devices. For example, various types of user interfaces and information can be displayed and interacted with on a wall where user interfaces and various types of information are projected. Interaction with multiple computing systems in which aspects of the invention can be practiced includes keystroke input, touchscreen input, voice or other audio input, gesture input, wherein the associated computing device is equipped with detection (e.g., camera) functions to capture and interpret user gestures to control the functions of the computing device, etc.
[0061] The phrases “at least one,” “one or more,” “or,” and “and / or” are open-ended expressions that are both conjunction and disjunctive in operation. For example, each of the expressions “at least one of A, B, and C,” “at least one of A, B, or C,” “one or more of A, B, and C,” “one or more of A, B, or C,” “A, B, and / or C,” and “A, B, or C” refers to A alone, B alone, C alone, A and B together, A and C together, B and C together, or A, B, and C together.
[0062] The term "a" or "an" refers to one or more of the entities in question. Therefore, the terms "a" (or "an"), "one or more," and "at least one" are used interchangeably herein. It should also be noted that the terms "comprising," "including," and "having" are used interchangeably.
[0063] As used herein, the term "automatic" and its variations refer to any process or operation that is typically continuous or semi-continuous and can be performed without substantial human input. However, a process or operation can be automatic if its execution uses substantial or non-substantial human input, provided that the input is received prior to its execution. Human input is considered substantial if it influences how the process or operation will be performed. Human input that consents to the execution of a process or operation is not considered "substantial."
[0064] Any steps, functions, and operations discussed in this article can be performed continuously and automatically.
[0065] Exemplary systems and methods of this disclosure have been described with respect to computing devices. However, to avoid unnecessarily obscuring this disclosure, several known structures and devices have been omitted from the foregoing description. This omission should not be construed as limiting. Specific details have been set forth to provide an understanding of this disclosure. However, it should be understood that this disclosure can be practiced in a variety of ways beyond the specific details set forth herein.
[0066] Furthermore, while the exemplary aspects shown herein illustrate individual components of a co-located system, some components of the system may be located remotely at distant parts of a distributed network (such as a LAN and / or the Internet), or within a dedicated system. Therefore, it should be understood that system components may be combined into one or more devices, such as servers, communication equipment, or co-located on specific nodes of a distributed network (such as analog and / or digital telecommunications networks, packet-switched networks, or circuit-switched networks). As will be understood from the foregoing description, and for computational efficiency reasons, system components may be positioned anywhere within the distributed network of components without affecting the operation of the system.
[0067] Furthermore, it should be understood that the various links connecting the elements can be wired or wireless links, or any combination thereof, or any other known or later-developed elements capable of providing and / or transmitting data to and from the connected elements. These wired or wireless links can also be secure links and may be capable of transmitting encrypted information. For example, the transmission medium used as a link can be any suitable carrier for electrical signals, including coaxial cables, copper wires, and optical fibers, and can take the form of sound waves or light waves, such as those generated during radio waves and infrared data communications.
[0068] Although the flowchart has been discussed and shown with respect to a specific sequence of events, it should be understood that changes, additions, and omissions to the sequence can occur without substantially affecting the operation of the disclosed configuration and aspects.
[0069] Several variations and modifications of this disclosure may be used. Some features of this disclosure may be provided without providing others.
[0070] In another configuration, the systems and methods of this disclosure may combine a dedicated computer, a programmable microprocessor or microcontroller and (multiple) peripheral integrated circuit elements, an ASIC or other integrated circuit, a digital signal processor, hard wired electronic or logic circuitry (such as discrete component circuitry), a programmable logic device or gate array (such as a PLD, PLA, FPGA, PAL), a dedicated computer, any similar components, etc. In general, any device or component capable of implementing the methods shown herein may be used to implement various aspects of this disclosure. Exemplary hardware that may be used for this disclosure includes computers, handheld devices, telephones (e.g., cellular phones, internet-enabled phones, digital phones, analog phones, hybrid phones, etc.), and other hardware known in the art. Some of these devices include processors (e.g., single or multiple microprocessors), memory, non-volatile storage devices, input devices, and output devices. Furthermore, alternative software implementations, including but not limited to distributed processing or component / object distributed processing, parallel processing, or virtual machine processing, may also be constructed to implement the methods described herein.
[0071] In another configuration, the disclosed methods can be readily implemented using software developed in conjunction with an object-oriented or object-based software development environment that provides portable source code usable on various computer or workstation platforms. Alternatively, the disclosed system can be implemented, partially or entirely, in hardware using standard logic circuitry or VLSI designs. Whether software or hardware is used to implement the system according to this disclosure depends on the system's speed and / or efficiency requirements, specific functionalities, and the particular software or hardware system or microprocessor or microcomputer system utilized.
[0072] In another configuration, the disclosed method can be implemented in part in software, which can be stored on a storage medium and executed on a programmed general-purpose computer, special-purpose computer, microprocessor, etc., in cooperation with a controller and memory. In these cases, the systems and methods of this disclosure can be implemented as programs embedded in a personal computer, such as applets, This can be implemented as a CGI script, a resource residing on a server or computer workstation, or as a routine embedded in a dedicated measurement system or system component. The system can also be implemented by physically integrating the system and / or methods into the software and / or hardware system.
[0073] If described herein, this disclosure is not limited to standards and protocols. Other similar standards and protocols not mentioned herein exist and are included in this disclosure. Furthermore, the standards and protocols mentioned herein, as well as other similar standards and protocols not mentioned herein, are periodically replaced by faster or more efficient equivalents with substantially the same functionality. Such replacement standards and protocols with the same functionality are considered equivalents included in this disclosure.
[0074] According to at least one example of this disclosure, a method for implementing changes to the source code of a program at runtime is provided. The method may include executing the source code in a runtime environment, detecting changes made to the source code at runtime in the runtime environment, determining whether the change is made to a type identified as reloadable in the source code, and in response to the determination that the change is made to a type identified as reloadable in the source code, creating a new version of that type, and implementing the changes to the source code at runtime using the new version of that type.
[0075] According to at least one aspect of the above method, the method may include executing source code in a runtime environment, including: obtaining source code, loading source code in an integrated development environment (IDE), and executing source code in a runtime environment deployed by the IDE.
[0076] According to at least one aspect of the above method, the method may further include: updating the type in situ in response to a change that is not a determination made on a type identified as reloadable in the source code.
[0077] According to at least one aspect of the above method, the method may include an implementation in which a new version of the type is used to perform changes to the source code at runtime, further comprising replacing the runtime representation of a previous version of the type and one or more existing instances in the source code with the new version of the type.
[0078] According to at least one aspect of the above method, the method may include an implementation in which a new version of the type is used to perform changes to the source code at runtime, further comprising: notifying the framework used to construct the source code that a new version of the type has been created, and migrating the state from one or more existing instances of a previous version of the type in the source code to the new version.
[0079] According to at least one aspect of the above method, the method may further include: continuing to execute the updated source code with the change in the runtime environment.
[0080] According to at least one aspect of the above method, the method may include determining whether a change is made to a type in the source code that is identified as reloadable, and further: determining whether a change is made to a type in the source code that is identified as reloadable based on a framework library associated with a framework used to construct the source code, wherein the framework library includes a list of predefined types marked as reloadable.
[0081] According to at least one example of this disclosure, a computing device is provided for implementing changes to the source code of a program at runtime. The computing device may include a processor and a memory storing a plurality of instructions thereon, which, when executed by the processor, cause the computing device to: execute the source code in a runtime environment; detect changes to the source code made at runtime in the runtime environment; determine whether the changes are made to a type identified as reloadable in the source code; in response to the determination that the changes are made to a type identified as reloadable in the source code; create a new version of the type; and implement the changes to the source code at runtime using the new version of the type.
[0082] According to at least one aspect of the aforementioned computing device, the computing device may include executing source code in a runtime environment, including: obtaining source code, loading source code in an integrated development environment (IDE), and executing source code in a runtime environment deployed by the IDE.
[0083] According to at least one aspect of the computing device described above, the computing device can also be configured to update the type in situ in response to a change that is not a determination made on a type identified as reloadable in the source code.
[0084] According to at least one aspect of the computing device described above, the computing device may include an implementation in which a new version of a type is used to perform changes to the source code at runtime, including replacing the runtime representation of a previous version of the type and one or more existing instances in the source code with the new version of the type.
[0085] According to at least one aspect of the aforementioned computing device, the computing device may include an implementation in which a new version of a type is used to perform changes to the source code at runtime, including: notifying the framework used to construct the source code that a new version of the type has been created, and migrating the state from one or more existing instances of a previous version of the type in the source code to the new version.
[0086] According to at least one aspect of the computing device described above, the computing device can also be configured to continue executing updated source code with the change in a runtime environment.
[0087] According to at least one aspect of the computing device described above, the computing device may include determining whether a change is made to a type in the source code that is identified as reloadable, further comprising: determining whether a change is made to a type in the source code that is identified as reloadable based on a framework library associated with a framework used to construct the source code, wherein the framework library includes a list of predefined types marked as reloadable.
[0088] According to at least one example of this disclosure, a non-transitory computer-readable medium is provided storing instructions for implementing changes to the source code of a program at runtime. When executed by one or more processors of a computing device, the instructions cause the computing device to execute the source code in a runtime environment, detect changes made to the source code at runtime, determine whether the changes are made to a type identified as reloadable in the source code, and, in response to the determination that the changes are made to a type identified as reloadable in the source code, create a new version of that type, and implement the changes to the source code at runtime using the new version of that type.
[0089] According to at least one aspect of the aforementioned non-transitory computer-readable medium, the instructions, when executed by one or more processors of a computing device, may include executing source code in a runtime environment, which includes: obtaining source code, loading source code in an integrated development environment (IDE), and executing source code in a runtime environment deployed by the IDE.
[0090] According to at least one aspect of the aforementioned non-transitory computer-readable medium, when executed by one or more processors, the instruction may also cause the computing device to: update the type in situ in response to a change that is not a determination made on a type identified as reloadable in the source code.
[0091] According to at least one aspect of the aforementioned non-transitory computer-readable medium, when executed by one or more processors of a computing device, the instructions may include an implementation in which a new version of a type is used to perform changes to the source code at runtime, comprising replacing a runtime representation of a previous version of the type and one or more existing instances of the type in the source code with the new version of the type.
[0092] According to at least one aspect of the aforementioned non-transitory computer-readable medium, when executed by one or more processors of a computing device, the instruction may include an implementation in which a new version of a type is used to perform changes to the source code at runtime, comprising: notifying a framework used to construct the source code that a new version of the type has been created, and migrating the state from one or more existing instances of a previous version of the type in the source code to the new version.
[0093] According to at least one aspect of the aforementioned non-transitory computer-readable medium, the instructions, when executed by one or more processors, can also enable a computing device to continue executing updated source code with such changes in a runtime environment.
[0094] In various configurations and aspects, this disclosure includes components, methods, processes, systems, and / or apparatuses substantially as depicted and described herein, including various combinations, sub-combinations, and subsets thereof. Those skilled in the art, upon understanding this disclosure, will understand how to make and use the systems and methods disclosed herein. In various configurations and aspects, this disclosure includes apparatus and processes provided in the absence of items not depicted and / or described herein, or in their various configurations or aspects, including in the absence of such items as might have been used in prior apparatus or processes, for example, to improve performance, simplify implementation, and / or reduce implementation costs.
Claims
1. A method for implementing changes to the source code of a program at runtime, the method comprising: The source code is executed in a runtime environment, wherein the source code includes reloadable types and in-situ non-reloadable types; Detect changes made to the source code during runtime in the runtime environment; Based on the framework used to construct the source code, determine whether the change is made to a type in the source code that is identified as the reloadable type, wherein the framework includes a framework library that indicates whether the type in the source code is the reloadable type or the in-situ non-reloadable type; In response to determining that the change is made to the type identified as the reloadable type in the source code, a new version of the reloadable type is created; as well as The new version of the reloadable type is used to implement the changes to the source code at runtime.
2. The method of claim 1, wherein executing the source code in the runtime environment comprises: Obtain the source code; Load the source code in the integrated development environment (IDE); as well as The source code is executed in the runtime environment deployed by the IDE.
3. The method according to claim 1, further comprising: In response to determining that the change was not made to the type identified as reloadable in the source code, the in-situ non-reloadable type is updated.
4. The method of claim 1, wherein the implementation of performing the changes to the source code at runtime using the new version of the reloadable type further comprises: Replace the previous version of the runtime representation of the type in the source code and one or more existing instances with the new version of the reloadable type.
5. The method of claim 1, wherein the implementation of performing the changes to the source code at runtime using the new version of the reloadable type further comprises: The framework used to construct the source code is notified that the new version of the reloadable type has been created; as well as Migrate the state from one or more existing instances of the type described in the source code to the new version.
6. The method according to claim 1, further comprising: The updated source code with the changes continues to execute in the runtime environment.
7. The method of claim 1, wherein determining whether the change is made to a type identified as reloadable in the source code further comprises: Whether the change is made to a type in the source code is determined based on the framework library associated with the framework used to construct the source code, wherein the framework library includes a list of predefined types marked as reloadable.
8. A computing device for implementing changes to the source code of a program at runtime, said computing device comprising: processor; as well as A memory having stored thereon a plurality of instructions, which, when executed by the processor, cause the computing device to: The source code is executed in a runtime environment, wherein the source code includes reloadable types and in-situ non-reloadable types; Detect changes made to the source code during runtime in the runtime environment; Based on the framework used to construct the source code, determine whether the change is made to a type in the source code that is identified as the reloadable type, wherein the framework includes a framework library that indicates whether the type in the source code is the reloadable type or the in-situ non-reloadable type; In response to the change being a determination of the type identified as the reloadable type in the source code, a new version of the reloadable type is created; as well as The new version of the reloadable type is used to implement the changes to the source code at runtime.
9. The computing device of claim 8, wherein executing the source code in the runtime environment comprises: Obtain the source code; Load the source code in the integrated development environment (IDE); as well as The source code is executed in the runtime environment deployed by the IDE.
10. The computing device of claim 8, wherein the computing device is further configured to: update the type in situ in response to the change not being a determination made on the type identified as reloadable in the source code.
11. The computing device of claim 8, wherein the implementation of performing the changes to the source code at runtime using the new version of the reloadable type comprises: Replace the previous version of the runtime representation of the type in the source code and one or more existing instances with the new version of the reloadable type.
12. The computing device of claim 8, wherein the implementation of performing the changes to the source code at runtime using the new version of the reloadable type further comprises: The framework used to construct the source code is notified that the new version of the reloadable type has been created; as well as Migrate the state from one or more existing instances of the type described in the source code to the new version.
13. The computing device of claim 8, wherein the computing device is further configured to: continue executing the updated source code with the changes in the runtime environment.
14. The computing device of claim 8, wherein determining whether the change is made to a type identified as reloadable in the source code further comprises: Whether the change is made to a type in the source code is determined based on the framework library associated with the framework used to construct the source code, wherein the framework library includes a list of predefined types marked as reloadable.
15. A non-transitory computer-readable medium storing instructions for implementing changes to source code of a program at runtime, the instructions causing the computing device, when executed by one or more processors of a computing device: The source code is executed in a runtime environment, wherein the source code includes reloadable types and in-situ non-reloadable types; Detect changes made to the source code during runtime in the runtime environment; Based on the framework used to construct the source code, determine whether the change is made to a type in the source code that is identified as the reloadable type, wherein the framework includes a framework library that indicates whether the type in the source code is the reloadable type or the in-situ non-reloadable type; In response to the change being a determination of the type identified as the reloadable type in the source code, a new version of the reloadable type is created; as well as The new version of the reloadable type is used to implement the changes to the source code at runtime.
16. The non-transitory computer-readable medium of claim 15, wherein executing the source code in the runtime environment comprises: Obtain the source code; Load the source code in the integrated development environment (IDE); as well as The source code is executed in the runtime environment deployed by the IDE.
17. The non-transitory computer-readable medium of claim 15, wherein the instructions, when executed by the one or more processors, further cause the computing device to: update the in-situ non-reloadable type in response to a determination that the change is not made for the type identified as the reloadable type in the source code.
18. The non-transitory computer-readable medium of claim 15, wherein the implementation of performing the changes to the source code at runtime using the new version of the reloadable type comprises: Replace the previous version of the runtime representation of the type in the source code and one or more existing instances with the new version of the reloadable type.
19. The non-transitory computer-readable medium of claim 15, wherein the implementation of performing the changes to the source code at runtime using the new version of the reloadable type comprises: The framework used to construct the source code is notified that the new version of the reloadable type has been created; as well as Migrate the state from one or more existing instances of the type described in the source code to the new version.
20. The non-transitory computer-readable medium of claim 15, wherein the instructions, when executed by the one or more processors, also cause the computing device to: continue executing the updated source code with the changes in the runtime environment.
Citation Information
Patent Citations
Developing applications at runtime
CN102246142A
Dynamic library hot update method and device, medium and equipment
CN110750545A