IP Library Granted Patent US 10,664,377
Granted Patent B2
US 10,664,377 · App. 15/649,189 · Granted May 26, 2020

Automation of software verification

Inventors: Andrew James Malton (Waterloo, CA); Daniel Lewis Neville (Basingstoke, GB)
Assignee: BlackBerry Limited
G06F11/3604G06F11/3608G06F11/3684
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 10,664,377
App. No.
15/649,189
Granted
May 26, 2020
Kind
B2
Abstract

Systems, methods, and software can be used to automate software verifications. In some aspects, one or more application program interface (API) call pairs are generated based on a source code of a user module that invokes an API. Each of the one or more API call pairs comprises a first API call that invokes the API followed by a second API call that invokes the API. One or more fragments are generated based on the one or more API calls pairs. Each of the one or more fragments represents an execution sequence that includes at least one of the one or more API call pairs. The one or more fragments are verified.

Claims (28)

1. A method, comprising:

generating, by a hardware processor, one or more application program interface (API) call pairs based on a source code of a user module, wherein each of the one or more API call pairs comprises a first API call that invokes an associated API and a second API call that invokes the same associated API;

generating, by the hardware processor, one or more fragments based on the one or more API call pairs, wherein each of the one or more fragments represents an execution sequence that includes at least one of the one or more API call pairs, the fragments are generated further based on at least one of a prefix set or a suffix set, the prefix set includes at least one prefix in the user module, and the suffix set includes at least one suffix in the user module, and wherein the prefix set comprises an allowed prefix set and a required prefix set, and the suffix set comprises an allowed suffix set and a required suffix set, and wherein the allowed prefix set is obtained based on a union of first API calls of the one or more fragments, the allowed suffix set is obtained based on a union of last API calls of the one or more fragments, the required prefix set is obtained based on an intersection of the first API calls of the one or more fragments, and the required suffix set is obtained based on an intersection of the last API calls of the one or more fragments; and

determining, by the hardware processor, whether an assertion is violated by the one or more fragments.

2. The method of claim 1 , wherein the one or more API call pairs are generated based on one or more arguments of the first API call or the second API call.

3. The method of claim 1 , wherein whether the assertion is violated by the one or more fragments is determined using C Bounded Model Checker (CBMC).

4. The method of claim 1 , further comprising:

in response to determining that the assertion is violated, outputting a counterexample indicating a sequence of execution steps that violates the assertion.

5. The method of claim 4 , further comprising: logging a portion of the source code corresponding to the violated assertion in response to a user input.

6. A device, comprising:

at least one hardware processor; and

a non-transitory computer-readable storage medium coupled to the at least one hardware processor and storing programming instructions for execution by the at least one hardware processor, wherein the programming instructions, when executed, cause the at least one hardware processor to perform operations comprising:

generating one or more application program interface (API) call pairs based on a source code of a user module, wherein each of the one or more API call pairs comprises a first API call that invokes an associated API and a second API call that invokes the same associated API;

generating one or more fragments based on the one or more API call pairs, wherein each of the one or more fragments represents an execution sequence that includes at least one of the one or more API call pairs, the fragments are generated further based on at least one of a prefix set or a suffix set, the prefix set includes at least one prefix in the user module, and the suffix set includes at least one suffix in the user module, and wherein the prefix set comprises an allowed prefix set and a required prefix set, and the suffix set comprises an allowed suffix set and a required suffix set, and wherein the allowed prefix set is obtained based on a union of first API calls of the one or more fragments, the allowed suffix set is obtained based on a union of last API calls of the one or more fragments, the required prefix set is obtained based on an intersection of the first API calls of the one or more fragments, and the required suffix set is obtained based on an intersection of the last API calls of the one or more fragments; and

determining whether an assertion is violated by the one or more fragments.

7. The device of claim 6 , wherein the one or more API call pairs are generated based on one or more arguments of the first API call or the second API call.

8. The device of claim 6 , wherein whether the assertion is violated by the one or more fragments is determined using C Bounded Model Checker (CBMC).

9. The device of claim 6 , the operations further comprising:

in response to determining that the assertion is violated, outputting a counterexample indicating a sequence of execution steps that violates the assertion.

10. The device of claim 9 , the operations further comprising: logging a portion of the source code corresponding to the violated assertion in response to a user input.

11. A non-transitory computer-readable medium storing instructions which, when executed, cause a computing device to perform operations comprising:

generating one or more application program interface (API) call pairs based on a source code of a user module, wherein each of the one or more API call pairs comprises a first API call that invokes an associated API and a second API call that invokes the same associated API;

generating one or more fragments based on the one or more API call pairs, wherein each of the one or more fragments represents an execution sequence that includes at least one of the one or more API call pairs, the fragments are generated further based on at least one of a prefix set or a suffix set, the prefix set includes at least one prefix in the user module, and the suffix set includes at least one suffix in the user module, and wherein the prefix set comprises an allowed prefix set and a required prefix set, and the suffix set comprises an allowed suffix set and a required suffix set, and wherein the allowed prefix set is obtained based on a union of first API calls of the one or more fragments, the allowed suffix set is obtained based on a union of last API calls of the one or more fragments, the required prefix set is obtained based on an intersection of the first API calls of the one or more fragments, and the required suffix set is obtained based on an intersection of the last API calls of the one or more fragments; and

determining whether an assertion is violated by the one or more fragments.

12. The non-transitory computer-readable medium of claim 11 , wherein the one or more API call pairs are generated based on one or more arguments of the first API call or the second API call.

13. The non-transitory computer-readable medium of claim 11 , wherein whether the assertion is violated by the one or more fragments is determined using C Bounded Model Checker (CBMC).

14. The non-transitory computer-readable medium of claim 11 , the operations further comprising:

in response to determining that the assertion is violated, outputting a counterexample indicating a sequence of execution steps that violates the assertion.

Assignments (5)
NUNC PRO TUNC ASSIGNMENT Recorded Jun 19, 2023
From: BLACKBERRY LIMITED
To: MALIKIE INNOVATIONS LIMITED
Reel/Frame 064271/0199 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Jun 16, 2023
From: BLACKBERRY LIMITED
To: MALIKIE INNOVATIONS LIMITED
Reel/Frame 064104/0103 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Mar 14, 2018
From: BLACKBERRY UK LIMITED
To: BLACKBERRY LIMITED
Reel/Frame 045201/0183 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Mar 6, 2018
From: NEVILLE, DANIEL
To: BLACKBERRY LIMITED
Reel/Frame 045112/0903 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Mar 6, 2018
From: MALTON, ANDREW JAMES
To: BLACKBERRY LIMITED
Reel/Frame 045112/0910 →
Continuity (2)
Provisional Application 62362978 · Jul 15, 2016
Related Publication 20180018253A1 · Jan 18, 2018