# US 9,436,452 B2 · Method for enforcing language subsets

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

- Number: US 9,436,452 B2
- Document ID: US9436452B2
- Status: Granted
- Kind: B2
- Application number: 13/674,859
- Filed: 2012-11-12
- Published: 2014-05-15
- Granted: 2016-09-06
- Earliest claimed: 2012-11-12
- Assignees: Keysight Technologies, Inc.
- Applicants: Keysight Technologies, Inc.
- Inventors: Kevin Mitchell
- Web page: https://patentgrep.com/patent/US9436452B2

## CPC

- G06F 8/53: Decompilation; Disassembly
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

A method of operating a data processing system to examine a compiled program for violations of a set of rules that do not constitute violations detected by the compiler that generated the program. The method includes obtaining a restricted rule set defined in terms of rules in a decompiled representation of the program. The method also includes decompiling the compiled program to the decompiled representation of the compiled program in which the restricted rule set is defined, examining the decompiled representation of the compiled program for a violation of the restricted rule set to determine if any of the rules are violated, and providing an output indicating that one of the rules was violated.

## Claims

### Claim 1

A method of operating a data processing system to examine a compiled program for violations of a set of rules that do not constitute violations detected by a compiler used to compile the compiled program, said method comprising:
obtaining a restricted rule set defined in terms of rules in a decompiled representation of said program, said restricted rule set prohibiting language commands that would otherwise be allowed by said compiler in a subset of classes in said compiled program while allowing said language commands in another class of said program;
decompiling said compiled program to said decompiled representation of said compiled program in which said restricted rule set is defined;
examining said decompiled representation of said compiled program for a violation of said restricted rule set to determine if any of said rules are violated; and
providing an output indicating that one of said rules was violated, wherein said restricted rule set only applies to a portion of said compiled program and wherein decompiling said compiled program comprises decompiling said portion of said compiled program while not decompiling another portion of said compiled program, said portion of said compiled program comprising a set of sub-classes of a class, and wherein decompiling said program comprises identifying a location in said compiled program of instructions pertaining to said set of sub-classes, said data processing system generating a certificate if said compiled program does not violate said restricted rule set.

### Claim 2 (depends on 1)

The method of claim 1 wherein said decompiled representation comprises an AST representation of a portion of said compiled program and said restricted rule set is defined in terms of said AST representation.

### Claim 3 (depends on 1)

The method of claim 1 wherein said compiled program further comprises metadata that identifies locations in said compiled program of methods pertaining to said set of sub-classes.

### Claim 4 (depends on 3)

The method of claim 3 wherein a reflection mechanism is used to identify a method of said sub-class to be examined for said violation of said restricted rule set.

### Claim 5 (depends on 1)

The method of claim 1 wherein said restricted rule set includes a first restricted rule set to be applied to a first class within said program and a second restricted rule set to be applied to a second class within said program, said first restricted rule set being different from said second restricted rule set.

### Claim 6 (depends on 1)

The method of claim 1 wherein said certificate is readable by a runtime system that runs said compiled program.

### Claim 7 (depends on 6)

The method of claim 6 wherein said runtime system prevents said compiled program from running if said certificate is not present.

### Claim 8

A non-transitory computer readable medium that includes instructions that cause a data processing system to examine a compiled program for violations of a set of rules that do not constitute violations detected by the compiler that compiled the compiled program using a method comprising:
obtaining a restricted rule set defined in terms of rules in a decompiled representation of said program, said restricted rule set prohibiting language commands that would otherwise be allowed by said compiler in a subset of classes in said compiled program while allowing said language commands in another class of said program;
decompiling said compiled program to said decompiled representation of said compiled program in which said restricted rule set is defined;
examining said decompiled representation of said compiled program for a violation of said restricted rule set to determine if any of said rules are violated; and
providing an output indicating that one of said rules was violated, wherein said restricted rule set only applies to a portion of said compiled program and wherein decompiling said compiled program comprises decompiling said portion of said compiled program while not decompiling another portion of said compiled program, said portion of said compiled program comprising a set of sub-classes of a class, and wherein decompiling said program comprises identifying a location in said compiled program of instructions pertaining to said set of sub-classes, said data processing system generating a certificate if said compiled program does not violate said restricted rule set.

### Claim 9 (depends on 8)

The computer readable medium of claim 8 wherein said decompiled representation comprises an AST representation of a portion of said compiled program and said restricted rule set is defined in terms of said AST representation.

### Claim 10 (depends on 8)

The computer readable medium of claim 8 wherein said compiled program further comprises metadata that identifies locations in said compiled program of methods pertaining to said set of sub-classes.

### Claim 11 (depends on 10)

The computer readable medium of claim 10 wherein a reflection mechanism is used to identify a method of said sub-class to be examined for said violation of said restricted rule set.

### Claim 12 (depends on 8)

The computer readable medium of claim 8 wherein said restricted rule set includes a first restricted rule set to be applied to a first class within said program and a second restricted rule set to be applied to a second class within said program, said first restricted rule set being different from said second restricted rule set.

### Claim 13 (depends on 8)

The computer readable medium of claim 8 wherein said certificate is readable by a runtime system that runs said compiled program.

### Claim 14 (depends on 13)

The computer readable medium of claim 13 wherein said runtime system prevents said compiled program from running if said certificate is not present.
