IP Library Granted Patent US 8,601,459
Granted Patent B2
US 8,601,459 · App. 13/859,010 · Granted Dec 3, 2013

Control structure refinement of loops using static analysis

View Patent ↗
Loading inventors, assignments & file history…
Monitor This Case
Get email alerts when status or documents change.
Order Certified Copies
Most orders are placed with the USPTO same day — all within 24 business hours.
Order via The Patent Place →
Pre-filled with this patent's details
Quick Facts
Patent No.
US 8,601,459
App. No.
13/859,010
Granted
Dec 3, 2013
Kind
B2
Abstract

A system and method for discovering a set of possible iteration sequences for a given loop in a software program is described, to transform the loop representation. In a program containing a loop, the loop is partitioned into a plurality of portions based on splitting criteria. Labels are associated with the portions, and an initial loop automaton is constructed that represents the loop iterations as a regular language over the labels corresponding to the portions in the program. Subsequences of the labels are analyzed to determine infeasibility of the subsequences permitted in the automaton. The automaton is refined by removing all infeasible subsequences to discover a set of possible iteration sequences in the loop. The resulting loop automaton is used in a subsequent program verification or analysis technique to find violations of correctness properties in programs.

Claims (27)

1. A method for discovering a set of possible iterative sequences for a given loop in a program, the method comprising:

partitioning the loop into a plurality of portions based on control flow in the loop, each of the plurality of portions representing multiple paths in the control flow;

associating labels with the portions, loop iterations being abstracted as a finite state automaton over the labels;

constructing an initial loop automaton in memory storage that represents the loop iterations as a regular language over the labels corresponding to the portions in the program;

analyzing subsequences of the labels to determine infeasibility of the subsequences permitted in the automaton; and

refining the loop automaton by removing all infeasible subsequences to discover a set of possible iteration sequences,

wherein partitioning the loop into a plurality of portions includes partitioning the loop using splitting criteria including one or more of outcome of branches in the loop, back edges traversed by an iteration, and induction variable updates.

2. The method as recited in claim 1 , wherein analyzing subsequences of the labels includes determining whether there is a proof of infeasibility in a current subsequence; and if proof exists, deriving invariants from the proof.

3. The method as recited in claim 2 , wherein refining the automaton includes checking invariants to determine whether other subsequences can preserve the invariant, if preserved, then expanding the original infeasible subsequence.

4. The method as recited in claim 1 , wherein analyzing subsequences of the labels includes verifying properties of the subsequences using a static analyzer.

5. The method as recited in claim 4 , wherein verifying properties of the subsequences includes generating proof of a property verified.

6. The method as recited in claim 1 , further comprising using the refined loop automaton in subsequent program analysis to determine violations of correctness properties in the program.

7. A non-transitory computer readable storage medium comprising

a computer readable program for discovering a set of possible iterative sequences for a given loop in a program,

wherein the computer readable program when executed on a computer causes the computer to perform the steps of:

partitioning the loop into a plurality of portions based on control flow in the loop, each of the plurality of portions representing multiple paths in the control flow;

associating labels with the portions, loop iterations being abstracted as a finite state automaton over the labels;

constructing an initial loop automaton that represents loop iterations as a regular language over the labels corresponding to the portions in the program;

analyzing subsequences of the labels to determine infeasibility of the subsequences permitted in the automaton; and

refining the loop automaton by removing all infeasible subsequences to discover a set of possible iteration sequences,

wherein partitioning the loop into a plurality of portions includes partitioning the loop using splitting criteria including one or more of outcome of branches in the loop, back edges traversed by an iteration, and induction variable updates.

8. The non-transitory computer readable storage medium as recited in claim 7 , wherein analyzing subsequences of the labels includes determining whether there is a proof of infeasibility in a current subsequence; and if proof exists, deriving invariants from the proof.

9. The non-transitory computer readable storage medium as recited in claim 8 , wherein refining the automaton includes checking invariants to determine whether other subsequences can preserve the invariant, if preserved, then expanding the original infeasible subsequence.

10. The non-transitory computer readable storage medium as recited in claim 7 , wherein analyzing subsequences of the labels includes verifying properties of the subsequences using a static analyzer.

11. The non-transitory computer readable storage medium as recited in claim 10 , wherein verifying properties of the subsequences includes generating proof of a property verified.

12. The non-transitory computer readable storage medium as recited in claim 7 , wherein the computer readable program when executed on the computer further causes the computer to perform the step of:

using the refined loop automaton in subsequent program analysis to determine violations of correctness properties in the program.

Assignments (2)
CORRECTIVE ASSIGNMENT TO CORRECT THE REMOVE 8538896 AND ADD 8583896 PREVIOUSLY RECORDED ON REEL 031998 FRAME 0667. ASSIGNOR(S) HEREBY CONFIRMS THE ASSIGNMENT. Recorded May 30, 2017
From: NEC LABORATORIES AMERICA, INC.
To: NEC CORPORATION
Reel/Frame 042754/0703 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Jan 14, 2014
From: NEC LABORATORIES AMERICA, INC.
To: NEC CORPORATION
Reel/Frame 031998/0667 →