Single pass intermediate language verification algorithm
First Claim
1. A method for verifying an intermediate language (IL) program in a single pass, the method comprising the steps of:
- (a) encountering an IL instruction, wherein the IL instruction is associated with an IL offset;
(b) decode the IL instruction to determine an op code type;
(c) processing the IL instruction in accordance with the IL op code type and a rule set;
(d) updating a first data structure, a second data structure, and a third data structure, wherein the first data structure comprises an IL offset stack, the second data structure comprises a current IL stack, and the third data structure comprises a flag array;
(e) determining a next IL instruction.
3 Assignments
0 Petitions
Accused Products
Abstract
An intermediate language (IL) program is verified by processing the IL program in a single pass. Processed IL instructions may be provided to a just-in-time (JIT) compiler so that the IL program can be converted into a native language program of a targeted device. A verification apparatus may comprise a memory, a sequencing module, a memory updating module, and a rule logic module. The memory comprises an IL offset stack and a data structure that stores information of an IL stack corresponding to a processed IL instruction. The verification apparatus processes the IL program in a straight-line manner except when encountering IL instructions that correspond to designated op code types. In such cases, the verification apparatus may alter a sequencing of processing the IL program by utilizing the IL offset stack.
37 Citations
27 Claims
-
1. A method for verifying an intermediate language (IL) program in a single pass, the method comprising the steps of:
-
(a) encountering an IL instruction, wherein the IL instruction is associated with an IL offset;
(b) decode the IL instruction to determine an op code type;
(c) processing the IL instruction in accordance with the IL op code type and a rule set;
(d) updating a first data structure, a second data structure, and a third data structure, wherein the first data structure comprises an IL offset stack, the second data structure comprises a current IL stack, and the third data structure comprises a flag array;
(e) determining a next IL instruction. - View Dependent Claims (2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 19)
-
-
18. The method of method 1, further comprising the step of:
(f) determining that a verification of the IL program has been completed when the IL offset stack is empty and popping the IL offset stack is attempted.
-
20. A verification module for verifying an intermediate language (IL) program in a single pass, the IL program comprising a plurality of IL instructions, the verification module comprising:
-
(a) a memory comprising;
a data structure that stores information about an IL stack entry for a first IL instruction corresponding to a first IL offset;
an IL offset stack that stores a second IL offset corresponding to a second IL instruction; and
a flag entry that indicates if the first IL instruction has been processed;
(b) a sequencing module that determines a next IL instruction that is to be processed in accordance with an op code type that is associated with the first IL instruction;
(c) a memory updating module that updates the data structure with the state information about the first IL instruction and updates the IL offset stack; and
(d) rule logic module that processes the first IL instruction in accordance with the op code type. - View Dependent Claims (21, 22, 23, 24, 25, 26, 27)
-
Specification