# US 2004/0083464 A1 · Non-invasive rule-based binary analysis of software assemblies

> Agents: this data is available as JSON from the patentgrep API and MCP server — see https://patentgrep.com/llms.txt

- Number: US 2004/0083464 A1
- Document ID: US20040083464A1
- Status: Published application
- Kind: A1
- Application number: 10/413,254
- Filed: 2003-04-14
- Published: 2004-04-29
- Earliest claimed: 2002-10-25
- Assignees: Microsoft Corporation
- Inventors: Krzysztof J. Cwalina; Nathan Keith Walker; Michael C. Fanning; Bradley M. Abrams
- Web page: https://patentgrep.com/patent/US20040083464A1

## CPC

- G06F 11/3608: {using formal methods, e.g. model checking, abstract interpretation (theorem proving G06N5/013)}
- G06F 8/70: Software maintenance or management
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

Checking program elements and program element behaviors for adherence to software development rules. An analysis engine receives a rule assembly containing metadata and intermediate language instructions representing one or more rules. The analysis engine also receives a target assembly containing metadata and intermediate language instructions representing one or more program elements and/or one or more program element behaviors. The analysis engine identifies (e.g., through reflection or retrieval of intermediate language instructions) a program element or program element behavior from the target assembly that is to be checked for adherence to a rule from the rule assembly. The analysis engine applies the rule to the program element or program element behavior to check the program element or program element behavior for adherence to the rule. Results can be stored for later viewing by a programmer.

## Claims

### Claim 1

In a computer system that is capable of creating program elements in system memory and executing program element behaviors in system memory, a method for testing a program element or program element behavior for adherence to a software development rule, the method comprising the following:
an act of receiving a rule assembly containing the software development rule;
an act of receiving a target assembly containing at least one program element or at least one program element behavior;
an act of identifying a program element or program element behavior from the target assembly that is to be checked for adherence to the software development rule contained in the rule assembly; and
an act of applying the software development rule to the identified program element or the identified program element behavior to check the identified program element or the identified program element behavior for adherence to the software development rule.

### Claim 2 (depends on 1)

The method as recited in claim 1, wherein the act of receiving a rule assembly containing the software development rule comprises an act of receiving metadata and intermediate language instructions that can be used to implement the software development rule in system memory.

### Claim 3 (depends on 1)

The method as recited in claim 1, wherein the act of receiving a rule assembly containing the software development rule comprises an act of a check method that can be executed to check for adherence to the software development rule.

### Claim 4 (depends on 1)

The method as recited in claim 1, wherein the act of receiving a rule assembly containing the software development rule comprises an act of receiving a rule assembly having an interface that is targeted to a particular kind of program element.

### Claim 5 (depends on 1)

The method as recited in claim 1, wherein the act of receiving a rule assembly containing the software development rule comprises an act of receiving a rule assembly having an interface that is targeted to a particular intermediate language operation code.

### Claim 6 (depends on 1)

The method as recited in claim 1, wherein the act of receiving a rule assembly containing the software development rule comprises an act of receiving a rule that is targeted to a program element having a particular level of accessibility.

### Claim 7 (depends on 1)

The method as recited in claim 1, wherein the act of receiving a rule assembly containing the software development rule comprises an act of receiving a rule associated with a priority level.

### Claim 8 (depends on 1)

The method as recited in claim 1, wherein the act of receiving a rule assembly containing the software development rule comprises an act of receiving a rule that accessing resources from a resource stream.

### Claim 9 (depends on 1)

The method as recited in claim 1, wherein the act of receiving a rule assembly containing the software development rule comprises an act of receiving a rule that accessing resources contained in the rule.

### Claim 10 (depends on 1)

The method as recited in claim 1, wherein the act of receiving a rule assembly containing the software development rule comprises an act of receiving a language independent portable executable.

### Claim 11 (depends on 1)

The method as recited in claim 1, wherein the act of receiving a target assembly containing at least one program element or at least one program element behavior comprises an act of receiving a target assembly containing a program element.

### Claim 12 (depends on 1)

The method as recited in claim 1, wherein the act of receiving a target assembly containing at least one program element or at least one program element behavior comprises an act of receiving a target assembly containing a program element behavior.

### Claim 13 (depends on 1)

The method as recited in claim 1, wherein the act of receiving a target assembly containing at least one program element or at least one program element behavior comprises an act of receiving a language independent portable executable containing metadata and intermediate language instructions.

### Claim 14 (depends on 1)

The method as recited in claim 1, wherein the act of identifying a program element or program element behavior from the target assembly that is to be checked for adherence to the software development rule contained in the rule assembly comprises an act of identifying a program element that is to be checked for adherence to the software development.

### Claim 15 (depends on 14)

The method as recited in claim 14, wherein the act of identifying a program element that is to be checked for adherence to the software development comprises an act of using reflection to identify a portion of metadata contained in the target.

### Claim 16 (depends on 1)

The method as recited in claim 1, wherein the act of identifying a program element or program element behavior from the target assembly that is to be checked for adherence to the software development rule contained in the rule assembly comprises an act of identifying a program element behavior that is to be checked for adherence to the software development.

### Claim 17 (depends on 16)

The method as recited in claim 16, wherein the act of identifying a program element behavior that is to be checked for adherence to the software development comprises an act of using intermediate instruction retrieval to identify that an operation code contained in the target.

### Claim 18 (depends on 1)

The method as recited in claim 1, wherein the act of applying the software development rule to the identified program element or the identified program element behavior to check the identified program element or the identified program element behavior for adherence to the software development rule comprises an act of applying the software development rule to an identified program element to check the identified program element for adherence to the software development rule.

### Claim 19 (depends on 18)

The method as recited in claim 18, wherein the act of applying the software development rule to an identified program element to check the identified program element for adherence to the software development rule comprises an act of executing a check method for an interface that is targeted to the program element.

### Claim 20 (depends on 18)

The method as recited in claim 18, wherein the act of applying the software development rule to an identified program element to check the identified program element for adherence to the software development rule comprises an act of executing a check method to check a portion of metadata contained in the target assembly.

### Claim 21 (depends on 1)

The method as recited in claim 1, wherein the act of applying the software development rule to the identified program element or the identified program element behavior to check the identified program element or the identified program element behavior for adherence to the software development rule comprises an act of applying the software development rule to an identified program element behavior to check the identified program element behavior for adherence to the software development rule.

### Claim 22 (depends on 21)

The method as recited in claim 21, wherein the act of applying the software development rule to an identified program element behavior to check the identified program element behavior for adherence to the software development rule comprises an act of executing a check method for an interface that is targeted to the program element behavior.

### Claim 23 (depends on 21)

The method as recited in claim 21, wherein the act of applying the software development rule to an identified program element behavior to check the identified program element behavior for adherence to the software development rule comprises an act of executing a check method to check an operation code contained in target assembly.

### Claim 24 (depends on 1)

The method as recited in claim 1, wherein the act of applying the software development rule to the identified program element or the identified program element behavior to check the identified program element or the identified program element behavior for adherence to the software development rule comprises an act of instantiating the software development rule.

### Claim 25 (depends on 1)

The method as recited in claim 1, further comprising:
an act of outputting the results of checking the program element or program element behavior for adherence to the software development rule.

### Claim 26 (depends on 25)

The method as recited in claim 25, wherein the act of an act of outputting the results of checking the program element or program element behavior for adherence to the software development rule comprises an act of outputting resources from a resource stream associated with the rule assembly.

### Claim 27 (depends on 26)

The method as recited in claim 26, wherein the act of an act of outputting resources from a resource stream associated with the rule assembly comprises an act out outputting resources that were converted from XML instructions.

### Claim 28

A computer program product for use in a computer system that is capable of creating program elements in system memory and executing program element behaviors in system memory, the computer program product for implementing a method for testing a program element or program element behavior for adherence to a software development rule, the computer program product comprising one or more computer-readable media having stored thereon computer executable instructions that, when executed by a processor, cause the computer system to perform the following:
receive a rule assembly containing the software development rule;
receive a target assembly containing at least one program element or at least one program element behavior;
identify a program element or program element behavior from the target assembly that is to be checked for adherence to the software development rule contained in the rule assembly; and
apply the software development rule to the identified program element or the identified program element behavior to check the identified program element or the identified program element behavior for adherence to the software development rule.

### Claim 29 (depends on 28)

The computer program product recited in claim 28, wherein the one or more computer-readable media are physical media.

### Claim 30 (depends on 28)

The computer program product recited in claim 28, wherein the one or more computer-readable media are system memory.

### Claim 31

In a computer system including an integrated development interface with a compiler for compiling source code into assemblies, the integrated development interface being configured to check program elements for adherence to software development rules that supplement the inherent rules of the compiler, a method for automatically checking a program element or program element behavior entered at the integrated development interface for adherence to a software development rule, the method comprising the following:
an act of automatically accessing program data representing a portion of source code in response to receiving user-input, the represented source code indicating that a program element or program element behavior is to be associated with an assembly when the assembly is executed;
an act of automatically identifying that a program element or program element behavior contained in the accessed program data is to adhere to at least one software development rule; and
an act of automatically applying the at least one software development rule to the identified program element or the identified program element behavior to check for adherence to the at least one software development rule.

### Claim 32 (depends on 31)

The method as recited in claim 31, wherein the act of automatically accessing program data representing a portion of source code in response to receiving user-input comprises an act of automatically accessing user-entered source code.

### Claim 33 (depends on 31)

The method as recited in claim 31, wherein the act of automatically accessing program data representing a portion of source code in response to receiving user-input comprises an act of automatically accessing metadata in response to a user-entered compile command.

### Claim 34 (depends on 31)

The method as recited in claim 31, wherein the act of automatically accessing program data representing a portion of source code in response to receiving user-input comprises an act of automatically accessing intermediate language instructions in response to a user-entered compile command.

### Claim 35 (depends on 31)

The method as recited in claim 31, further comprising:
an act of automatically correcting user-entered source code to adhere to the software development rule.

### Claim 36

A computer program product for use in a computer system including an integrated development interface with a compiler for compiling source code into assemblies, the integrated development interface being configured to check program elements for adherence to software development rules that supplement the inherent rules of the compiler, the computer program produce for implementing a method for automatically checking a program element or program element behavior for adherence to a software development rule, the computer program product comprising one or more computer-readable media having stored thereon computer executable instructions that, when executed by a processor, cause the computer system to perform the following:
access program data representing a portion of source code in response to receiving user-input, the represented source code indicating that a program element or program element behavior is to be associated with an assembly when the assembly is executed;
identify that a program element or program element behavior contained in the accessed program data is to adhere to at least one software development rule; and
apply the at least one software development rule to the identified program element or the identified program element behavior to check for adherence to the at least one software development rule.

### Claim 37 (depends on 36)

The computer program product recited in claim 36, wherein the one or more computer-readable media are physical media.

### Claim 38 (depends on 36)

The computer program product recited in claim 36, wherein the one or more computer-readable media are system memory.
