A computer system may provide various resources to users through one or more programming libraries, such as application programming interfaces (APIs), in order to standardize access to such resources through various general-purpose mechanisms. These programming libraries may be operated by other programs, such as task-specific user interfaces, through which a user may utilize the programming library without having to understand its structure and functions. However, in many scenarios, a user may wish to know the manner of invoking a programming library to achieve an invoked behavior, or may wish to reproduce the behavior without having to utilize the user interface. A user may therefore capture an invocation of the programming library, and may generate an instruction set representing the captured invocation that may be studied, copied, modified, subsequently performed, etc.
|
1. A method of informing a user of a programming library usage of at least one programming library by a first application invoked on a computer through a programming library user interface, the method comprising:
detecting at least two invocations of the programming libraries invoked through the programming library user interface, the at least two invocations comprising a first invocation of a first programming library and a second invocation of a second programming library that is unrelated to the first programming library;
generating an instruction set configured to represent the programming library usage, the instruction set reproducing at least one included invocation of the first programming library and the second programming library and excluding other invocations of a third programming library, and specifying a logical sequence of the first invocation and the second invocation, wherein the specifying includes an indication of the sequential and concurrent invocation of the first and the second programming library;
for respective invocations, recording in the instruction set a statefulness indicator indicating an internal state of the computer during the invocation and including at least one invocation of the programming library by a second application that is not within the call stack of the first application; and
displaying the instruction set including the statefulness indicators to the user to inform the user of the programming library usage and the internal state of the computer including the at least one invocation of the programming library by the second application that is not within the call stack of the first application.
15. A computer-readable memory device storing instructions that, when executed on a processor of a computer having at least one programming library accessible through a programming library user interface, inform a user of a programming library usage of the programming library invoked by a first application through the programming library user interface by:
detecting at least two invocations of the programming libraries invoked through the programming library user interface, the at least two invocations comprising a first invocation of a first programming library and a second invocation of a second programming library that is unrelated to the first programming library;
generating an instruction set configured to represent the programming library usage, the instruction set reproducing at least one included invocation of the first programming library and the second programming library and excluding other invocations of a third programming library, and specifying a logical sequence of the first invocation and the second invocation, wherein the specifying includes an indication of the sequential and concurrent invocation of the first and the second programming library;
for respective invocations, recording in the instruction set a statefulness indicator indicating an internal state of the computer during the invocation and including at least one invocation of the programming library by a second application that is not within the call stack of the first application; and
displaying the instruction set including the statefulness indicators to the user to inform the user of the programming library usage and the internal state of the computer including the at least one invocation of the programming library by the second application that is not within the call stack of the first application.
16. A method of facilitating a user performing an experimental usage of at least one programming library invoked by a first application through a programming library user interface of a computer, the method comprising:
during the experimental usage, detecting at least two invocations of at least one programming library invoked through the programming library user interface, the at least two invocations comprising a first invocation of a first programming library and a second invocation of a second programming library that is unrelated to the first programming library;
generating an instruction set configured to represent the experimental usage, the instruction set reproducing at least one included invocation of the first programming library and the second programming library and excluding other invocations of a third programming library, and specifying a logical sequence of the first invocation and the second invocation, wherein the specifying includes an indication of the sequential and concurrent invocation of the first and the second programming library;
for respective invocations, recording in the instruction set a statefulness indicator indicating an internal state of the computer during the invocation;
displaying the instruction set including the statefulness indicators to the user to inform the user of the programming library usage and the internal state of the computer and including at least one invocation of the programming library by a second application that is not within the call stack of the first application; and
upon receiving a request from the user to reverse the experimental usage of the programming library after completion of the experimental usage, reversing the experimental usage represented by the instruction set including the at least one invocation of the programming library by the second application that is not within the call stack of the first application.
2. The method of
3. The method of
4. The method of
5. The method of
6. The method of
7. The method of
8. The method of
9. The method of
10. The method of
the programming library accessible within a virtual machine; and
detecting the programming library usage comprising: configuring the virtual machine to detect invocations of the programming library.
11. The method of
12. The method of
respective programming libraries comprising a programming library type; and
generating the instruction set representing the programming library usage comprising: generating the instruction set reproducing only the at least one invocation of programming libraries of a selected programming library type and excluding invocations of programming libraries of other programming library types.
13. The method of
14. The method of
17. The method of
18. The method of
19. The method of
|
Modern computer systems are often configured to provide access to various resources, which may be exposed at a low level of operation (e.g., particular sector read and write operations for a hard disk drive.) In order to facilitate the use of such resources, a programming library may be provided with standardized, general-purpose operations that may be performed on a class of such resources (e.g., a memory management API may expose general memory management functions, such as allocation, deallocation, and compaction, which may be invoked upon a wide range of storage devices, such as system memory, memory caches, and hard disk drives.)
A general-purpose programming library may be overly complex for more complicated resources, such as webservers and printers, and it may be difficult for a user to determine an appropriate sequence of general-purpose operations to be performed through such programming libraries to achieve common tasks. Therefore, a user interface may be provided for performing common tasks on the resources through the invocation of the general-purpose programming interface. This structure may facilitate the administration of a resource through the designation of common tasks (through the user interface), each of which invokes various general-purpose operations (through the programming library), which in turn perform low-level operations on the resource.
This Summary is provided to introduce a selection of concepts in a simplified form that are further described below in the Detailed Description. This Summary is not intended to identify key factors or essential features of the claimed subject matter, nor is it intended to be used to limit the scope of the claimed subject matter.
The manipulation of a resource through a general-purpose programming library, which is in turn manipulated through a task-specific user interface, may facilitate and expedite the administration of the resource by an administrator. By using a user interface operably coupled to the resource through a programming library, an administrator may manage the resource according to some desired tasks, without having to learn or manipulate the low-level details of the resource or the general-purpose operations that may be performed through the programming interface.
However, in some scenarios, the administrator may wish to learn the operations performed on a programming library by various operations in a user interface. For example, an administrator may seek to perform a task on a variety of computer systems, and instead of performing the same task on many machines through a user interface, the administrator may prefer to automate the task performed through the user interface, such as through an interpretable script. Accordingly, the administrator may wish to capture the functional relationship between some task-specific operations provided by a user interface and the invocation of the programming library whereby the user interface fulfills the task.
Techniques may be devised in view of these interests for capturing and representing a programming library usage, such as through an interaction of a user with a user interface in the performance of a task. The usage may be captured and represented as an instruction set comprising the invocation of the programming library during the programming library usage. The instruction set may be stored in an executable format, e.g., an interpretable script or a source code in a programming language that may be compiled and executed. The instruction set may also be stored as a description of the programming library usage, and may be advantageously formatted, e.g., according to a hierarchical schema. The instruction set may therefore be used to reproduce the usage of the programming library, to study the nature of the interaction between the user interface and the programming library during the performance analysis of a task, etc.
To the accomplishment of the foregoing and related ends, the following description and annexed drawings set forth certain illustrative aspects and implementations. These are indicative of but a few of the various ways in which one or more aspects may be employed. Other aspects, advantages, and novel features of the disclosure will become apparent from the following detailed description when considered in conjunction with the annexed drawings.
The claimed subject matter is now described with reference to the drawings, wherein like reference numerals are used to refer to like elements throughout. In the following description, for purposes of explanation, numerous specific details are set forth in order to provide a thorough understanding of the claimed subject matter. It may be evident, however, that the claimed subject matter may be practiced without these specific details. In other instances, well-known structures and devices are shown in block diagram form in order to facilitate describing the claimed subject matter.
Computer systems are capable of providing access to a broad number and variety of resources, such as system memory, multimedia devices, connected peripherals, data stores such as relational databases, event monitors and logs, etc. The utilization of such resources may involve detailed access mechanisms, and may involve complicated topics, such as shared access through synchronization objects, transactional interactions, and accessor protocols and objects.
In order to simplify and standardize such access, computer systems often expose such resources through a programming library, such as an application programming interface (API). A programming library of this type may endeavor to expose a resource to a user, such as a programmer, through a standardized set of objects and methods devised to provide standardized, general-purpose access to the resource while reducing the involvement of low-level details. The programming library may therefore provide a more practical interface to the resource, and may improve the reliability and efficiency of the computer system by normalizing the uses of various resources by various programs.
Programming libraries, such as APIs, thereby facilitate user interaction with various computer system resources by abstracting some complex and uninteresting low-level details, and by providing standardized, general-purpose access to the resources. Users may interact with such programming libraries programmatically, i.e., through one or more instructions written by the user to be requested of the resources by a program. However, the general-purpose interface exposed by a programming library for a complex resource may still contain a large number of operations that can be used to achieve a wide assortment of tasks. A user who wishes to perform a particular task with a resource may therefore have difficulty selecting the operations from the general-purpose programming library that may be used to perform the task. This difficulty may be onerous if the task is typical or routine; for example, a particular task may involve many operations performed on the resource through the programming library, and a user may not wish to invoke all of these operations through the programming library for a routine or straightforward task that involves little input or configuration from the user.
In order to facilitate the performance of tasks on a resource through a general-purpose programming library, a user interface may be provided that invokes a programming library usage to achieve some common tasks.
For example, in order to create a new website through the system illustrated in the example 30 of
As illustrated in the examples of
However, in some scenarios, a user may be interested in the selection and sequence of operations invoked in the programming library to perform a task, such as those performed by a user interface in response to various task requests by the user. As one example, a task performed through a user interface may be failing for an unknown reason, and the administrator may wish to investigate the selection and sequence of operations invoked in the programming library by the user interface to determine the source of the failure. As a second example, an administrator may wish to perform a task that the user interface does not support, and may wish to understand how some related tasks are performed through the user interface in order to perform the desired task. As a third example, an administrator may be able to perform a desired task through a user interface, but may wish to automate the performance of the task by reproducing the selection and sequence of programming library operations invoked by the user interface for a particular task. This example may be useful, e.g., where a task is to be performed on many computer systems; rather than using the user interface to perform the task on each computer system, the administrator may wish to generate an instruction set, such as an interpretable script, that may be performed on various computer systems to accomplish the task. In these and other examples, the user may seek to capture a representation of the invocation of the programming library by the user interface in the performance of a task.
Other scenarios may also compel the user to capture such a representation of a programming library usage. As one example, a program may utilize a resource through a programming library, and the user may wish to study an interaction of a program with a resource through a programming library, e.g., to duplicate a resource usage by the program or to debug some problems in the interaction. As another example, a user may know that a program is accessing some resources through various programming libraries available on a computer system, but may be unable to identify the programming libraries so used or the usages thereof, and may therefore wish to capture any programming library usage by a program. Conversely, a user may know that a resource is being used by a program through a programming interface, but may be unable to determine which program is using the resource, and may therefore seek to capture a usage of a particular programming library by any program. As a third example, a user may directly interact with a programming library, e.g., in an experimental setting, and may wish to capture a representation of the interaction, e.g., in order to reproduce the interaction or to reverse changes performed during an experimental interaction.
According to these and other exemplary scenarios, techniques may be devised for recording and representing a programming library usage. The programming library usage may be captured during various usage scenarios (e.g., a usage of a particular programming library by a user interface or a program; a usage of any programming library by a particular program; etc.) The representation may be stored in many formats (e.g., an interpretable script, a source code in a programming language, and/or a partially or wholly compiled binary.) The representation may also be utilized in achieving various tasks with respect to the programming library (e.g., to illustrate the usage for analysis by a user, to reproduce a usage, and/or to inform the performance of a similar usage as specified by the user.)
Still another embodiment involves a computer-readable medium comprising processor-executable instructions configured to apply the techniques presented herein. An exemplary computer-readable medium that may be devised in these ways is illustrated in
The techniques discussed herein (including the exemplary method 40 of
A first aspect that may vary among implementations of the techniques presented herein relates to the specification of the programming library usage to be captured. Many computer systems provide a wide number and variety of programming libraries for various purposes and tasks, and these programming libraries may be concurrently utilized by a large number of running processes to achieve various ends. In some scenarios, it may be advantageous to capture all capturable programming library usages, e.g., where an effect is arising in the computer system that may be attributable to an invocation of an unknown programming library by an unknown calling program. However, in many scenarios, capturing all programming library usages may provide too much information in the resulting instruction set, and performing the instruction set may have undesirable side-effects caused by the inclusion of unrelated programming library usages that happened to coincide with the performance of the programming library usages of interest.
Accordingly, it may be more desirable to capture a subset of programming library usages.
Conversely, in the example 90 of
A second aspect that may vary among implementations of the techniques presented herein relates to the manner of capturing the specified programming library usage. In order to capture the programming library usages specified according to the first aspect, a capturing system may devise many techniques for detecting, analyzing, and detailing the targeted programming library usages for capturing the desired representation. As one example, if a programming library is invoked through a hardware or software interrupt, the capturing system may hook the interrupt with a detection function that records the invocation before propagating the interrupt to the programming library invocation. As a second example, one or more methods of a programming library targeted for capturing may be diverted to a similar detection function that records the invocation before invoking the programming library function. A broader version of this example involves substituting an entire programming library with a proxy configured to record various invocations of the programming library before propagating the invocations to the monitored programming library. As a third example, a runtime or virtual machine within which a program is executing may be configured to trap instructions comprising calls to a programming library, and to record the invocation before fulfilling the invocation. As a fourth example, an instruction point monitor may be configured to detect an entry of an invoked function of the programming library, and to record the invocation of the programming library. Those of ordinary skill in the art may be capable of devising many such detection techniques while implementing the techniques discussed herein.
A third aspect that may vary among implementations of the techniques presented herein relates to the information included in the captured programming library invocations. In furtherance of representing the usage as an instruction set, the captured representation may include the programming libraries invoked and the method thereof. The representation may also include an identification of a program that invoked the usage of the programming library, and/or a thread within the program that invoked the usage of the programming library. For programming libraries coupled with programming library interface objects, such as software component architectures, the representation may also include an identification of a programming library interface object through which the invocation was made. The representation may also include an identification of any parameters that were provided to an invoked programming method, which may include (e.g.) simple types such as numbers and strings, collections or structures of simple types and objects, lambda expressions, expression trees, class instances, and/or class or type identifiers of various classes or objects. The representation may also include an indication of the circumstances under which an invocation occurred, e.g., a statefulness indicator of the computer system or an object (such as an interface object), or a timing descriptor that identifies the date and/or time of an invocation, which may be a standardized reference such as GMT, or relative to various reference points, such as other invocations or the system boot time. Alternatively, the instruction set may omit the timing information, and may be structured as a logical sequence for the invocations comprising the programming library usage (e.g., an indication of the sequential and/or concurrent invocation of various programming library methods.) Any combination of these and other descriptors may be stored within a captured representation of the programming library invocation(s) implemented in accordance with the techniques discussed herein.
A fourth aspect that may vary among implementations of the techniques presented herein relates to the instruction set generated to represent the programming library usage. Moreover, the scenarios described herein for using the techniques described herein may be more compatible with some generated instruction sets than others. As one example, the instruction set may be generated as a source code in a programming language. This exemplary variation may be advantageous in many scenarios, since the source code generated in this manner may be examined to inform the user of the performed usage of the programming library, modified to produce an altered instruction set with a different behavior, incorporated into other programs, transformed into an executable version that may be used to reproduce the programming library usage, etc. For instance, a system configured to implement these techniques may include an instruction set performing component, which may be configured to perform the instruction set. The instruction set performing component may comprise (e.g.) a compiler configured to produce a partially or wholly compiled executable binary from the programming language; a linker and/or loader for preparing such an executable binary for execution; a runtime, interpreter, virtual machine, etc. configured to facilitate the execution of the instruction set; etc.
As a second example, the instruction set may be generated as an executable binary, e.g., by first generating a source code in a programming language and then partially or wholly compiling the source code through a compiler for the programming language. The partially or wholly compiled binary may then be executed on a computer system that is compatible with such executable binaries in order to reproduce the programming library usage. This exemplary variation may be advantageous in a scenario where the user wishes to reproduce the behavior generated through a program. For instance, the user may employ a user interface to produce a desired behavior through the programming library, and may capture the generated behavior as an executable binary in order to reproduce the behavior on the computer system at a later time, or to perform the behavior on other computer systems. It may be appreciated that, due to the targeting of the capturing on the invocations of the programming library underlaying the user interface, the user may be able to produce such behaviors on various computer systems through the use of the executable binary without having to use the user interface through which the behavior was captured.
As a third example, the instruction set may be generated as an interpretable script, such that the usage may be reproduced by processing the interpretable script with an interpreter configured to process such scripts. For instance, the instruction set may be written in a shell script language that may be supported by the computer system, such that the interpretable script may be executed by a shell or command-line interpreter provided with the computer system. Alternatively, the instruction set may be written in an interpreted programming language, such as VBScript, which may be interpretively executed in various platforms, such as a web browser. As in the other exemplary variations of this aspect of these techniques, the instruction set generated in this manner may be examined by a user to inform various usages of the programming library, may be modified or executed, etc. Additionally, if the instruction set is generated as an interpretable script, it may be easier to structure the instruction set as a straightforward record or description of the programming library invocation generated through a user interface or another program. For instance, the instruction set may be formatted according to a hierarchical schema, such as a Document Type Definition (DTD) language like an XML variant, which may function both as an interpretable script and as a structured record of the sequence of methods invoked in a programming library. An instruction set formatted in this manner may be more easily processed to achieve various ends; e.g., the instruction set may be provided to a parser configured to read instruction sets of the selected format and to generate a source code in a desired programming language. For instance, a system configured to implement these techniques (such as the exemplary system 56 of
A fifth aspect that may vary among implementations of the techniques presented herein relates to the use of the instruction set generated as set forth herein. According to the various types of instruction sets that may be generated, as discussed in the previous aspect, the instruction set may be analyzed or studied to inform various usages of the programming libraries; may be executed or interpreted; may be modified or incorporated into other programs, etc. Additionally, an instruction set generated according to these techniques may be used in other uses. As one example, an instruction set of one form may be transformed into a source code in programming language, such as by an instruction set translation component configured to perform such translations. This example may be directed toward an instruction set represented as an interpretable script, such as an XML document according to a well-defined schema. As another example, an instruction set represented as a source code may be partially or wholly compiled to produce an executable binary. Moreover, an executable binary produced by such techniques may be directly invoked by the user for execution. Alternatively or additionally, an executable binary may be associated with at least one system event upon which the instruction set is performed. This result may also achieved, e.g., by including in systems implementing these techniques (such as the exemplary system 56 of
Although the subject matter has been described in language specific to structural features and/or methodological acts, it is to be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or acts described above. Rather, the specific features and acts described above are disclosed as example forms of implementing the claims.
As used in this application, the terms “component,” “module,” “system”, “interface”, and the like are generally intended to refer to a computer-related entity, either hardware, a combination of hardware and software, software, or software in execution. For example, a component may be, but is not limited to being, a process running on a processor, a processor, an object, an executable, a thread of execution, a program, and/or a computer. By way of illustration, both an application running on a controller and the controller can be a component. One or more components may reside within a process and/or thread of execution and a component may be localized on one computer and/or distributed between two or more computers.
Furthermore, the claimed subject matter may be implemented as a method, apparatus, or article of manufacture using standard programming and/or engineering techniques to produce software, firmware, hardware, or any combination thereof to control a computer to implement the disclosed subject matter. The term “article of manufacture” as used herein is intended to encompass a computer program accessible from any computer-readable device, carrier, or media. For example, computer readable media can include but are not limited to magnetic storage devices (e.g., hard disk, floppy disk, magnetic strips . . . ), optical disks (e.g., compact disk (CD), digital versatile disk (DVD) . . . ), smart cards, and flash memory devices (e.g., card, stick, key drive . . . ). Of course, those skilled in the art will recognize many modifications may be made to this configuration without departing from the scope or spirit of the claimed subject matter.
Moreover, the word “exemplary” is used herein to mean serving as an example, instance, or illustration. Any aspect or design described herein as “exemplary” is not necessarily to be construed as preferred or advantageous over other aspects or designs. Rather, use of the word exemplary is intended to present concepts in a concrete fashion. As used in this application, the term “or” is intended to mean an inclusive “or” rather than an exclusive “or”. That is, unless specified otherwise, or clear from context, “X employs A or B” is intended to mean any of the natural inclusive permutations. That is, if X employs A; X employs B; or X employs both A and B, then “X employs A or B” is satisfied under any of the foregoing instances. In addition, the articles “a” and “an” as used in this application and the appended claims may generally be construed to mean “one or more” unless specified otherwise or clear from context to be directed to a singular form.
Also, although the disclosure has been shown and described with respect to one or more implementations, equivalent alterations and modifications will occur to others skilled in the art based upon a reading and understanding of this specification and the annexed drawings. The disclosure includes all such modifications and alterations and is limited only by the scope of the following claims. In particular regard to the various functions performed by the above described components (e.g., elements, resources, etc.), the terms used to describe such components are intended to correspond, unless otherwise indicated, to any component which performs the specified function of the described component (e.g., that is functionally equivalent), even though not structurally equivalent to the disclosed structure which performs the function in the herein illustrated exemplary implementations of the disclosure. In addition, while a particular feature of the disclosure may have been disclosed with respect to only one of several implementations, such feature may be combined with one or more other features of the other implementations as may be desired and advantageous for any given or particular application. Furthermore, to the extent that the terms “includes”, “having”, “has”, “with”, or variants thereof are used in either the detailed description or the claims, such terms are intended to be inclusive in a manner similar to the term “comprising.”
Patent | Priority | Assignee | Title |
10318126, | Feb 15 2011 | Microsoft Technology Licensing, LLC | Data-driven schema for describing and executing management tasks in a graphical user interface |
10579346, | Dec 15 2016 | International Business Machines Corporation | Mobile accessibility evaluation from application binary |
9141403, | Feb 15 2011 | Microsoft Technology Licensing, LLC | Data-driven schema for describing and executing management tasks in a graphical user interface |
9552201, | Aug 31 2011 | ARLINGTON TECHNOLOGIES, LLC | System and method for incremental software installation |
9645719, | Feb 15 2011 | Microsoft Technology Licensing, LLC | Data-driven schema for describing and executing management tasks in a graphical user interface |
Patent | Priority | Assignee | Title |
5754760, | May 30 1996 | IBM Corporation | Automatic software testing tool |
6823460, | Nov 14 1999 | JPMORGAN CHASE BANK, N A ; MORGAN STANLEY SENIOR FUNDING, INC | Method and system for intercepting an application program interface |
7003781, | May 05 2000 | MICRO FOCUS LLC | Method and apparatus for correlation of events in a distributed multi-system computing environment |
7047446, | Nov 24 1995 | International Business Machines Corporation | Load test system and method |
7231210, | Dec 29 2004 | AT & T Corp | Method and apparatus for automatically generating call flow test scripts |
7770068, | Jun 01 2005 | VERCARA, LLC | Systems and methods for website monitoring and load testing via simulation |
7958497, | Jun 07 2006 | CA, INC | State synchronization in recording and replaying computer programs |
20040260718, | |||
20050138646, | |||
20050187930, | |||
20060048136, | |||
20060075386, | |||
20060092846, | |||
20060136877, | |||
20070083530, |
Executed on | Assignor | Assignee | Conveyance | Frame | Reel | Doc |
Dec 17 2007 | SINGLA, KANWALJEET | Microsoft Corporation | ASSIGNMENT OF ASSIGNORS INTEREST SEE DOCUMENT FOR DETAILS | 020303 | /0975 | |
Dec 19 2007 | Microsoft Corporation | (assignment on the face of the patent) | / | |||
Oct 14 2014 | Microsoft Corporation | Microsoft Technology Licensing, LLC | ASSIGNMENT OF ASSIGNORS INTEREST SEE DOCUMENT FOR DETAILS | 034542 | /0001 |
Date | Maintenance Fee Events |
Oct 26 2017 | M1551: Payment of Maintenance Fee, 4th Year, Large Entity. |
Oct 20 2021 | M1552: Payment of Maintenance Fee, 8th Year, Large Entity. |
Date | Maintenance Schedule |
May 06 2017 | 4 years fee payment window open |
Nov 06 2017 | 6 months grace period start (w surcharge) |
May 06 2018 | patent expiry (for year 4) |
May 06 2020 | 2 years to revive unintentionally abandoned end. (for year 4) |
May 06 2021 | 8 years fee payment window open |
Nov 06 2021 | 6 months grace period start (w surcharge) |
May 06 2022 | patent expiry (for year 8) |
May 06 2024 | 2 years to revive unintentionally abandoned end. (for year 8) |
May 06 2025 | 12 years fee payment window open |
Nov 06 2025 | 6 months grace period start (w surcharge) |
May 06 2026 | patent expiry (for year 12) |
May 06 2028 | 2 years to revive unintentionally abandoned end. (for year 12) |