# US 2017/0293549 A1 · System and method for test generation from software specification models that contain nonlinear arithmetic constraints over real number ranges

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

- Number: US 2017/0293549 A1
- Document ID: US20170293549A1
- Status: Published application
- Kind: A1
- Application number: 15/092,453
- Filed: 2016-04-06
- Published: 2017-10-12
- Earliest claimed: 2016-04-06
- Assignees: General Electric Company
- Applicants: General Electric Company
- Inventors: Han Yu; Michael Richard Durling; Kit Yan Siu; Meng Li; Baoluo Meng; Scott Alan Stacey; Daniel Edward Russell; Gregory Reed Sykes
- Web page: https://patentgrep.com/patent/US20170293549A1

## CPC

- G06F 11/3684: {for test design, e.g. generating new test cases}
- G06F 11/3604: Analysis of software for verifying properties of programs (testing of software G06F11/3668)
- G06F 11/3608: {using formal methods, e.g. model checking, abstract interpretation (theorem proving G06N5/013)}
- G06F 11/3692: {for test results analysis}
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

A computer-implemented system for generating test cases and/or test procedures to verify software having a nonlinear arithmetic constraint over a Real number range. The system includes a translator that receives, as input, software specification models for the software to be verified. The translator is configured to generate, as output, a plurality of SMT formulas that are semantically equivalent to the software specification models. The system includes an analytical engine pool that receives, as input, the plurality of SMT formulas from the translator and analyzes the plurality of SMT formulas, and generates, as output, test case data for each of the plurality of SMT formulas determined to be satisfiable. The system includes a post-processor that receives, as input, the test case data from the analytical engine pool and generates, as output, the test cases and/or test procedures for the software to be verified based on the test case data.

## Claims

### Claim 1

A computer-implemented system for generating test cases and/or test procedures for software verification, comprising:
a translator configured to receive, as input, software specification models for the software to be verified, wherein the software specification models include at least one nonlinear arithmetic constraint over a Real number range, and wherein the translator is configured to generate, as output, a plurality of SMT formulas that are semantically equivalent to the software specification models;
an analytical engine pool configured to receive, as input, the plurality of SMT formulas from the translator and to analyze the plurality of SMT formulas to generate, as output, test case data for each of the plurality of SMT formulas determined to be satisfiable; and
a post-processor configured to receive, as input, the test case data from the analytical engine pool and to generate, as output, the test cases and/or test procedures for the software to be verified based on the test case data.

### Claim 2 (depends on 1)

The system of claim 1, wherein the software specification models comprise a formal modeling language or a structured modeling language.

### Claim 3 (depends on 1)

The system of claim 1, wherein the formal modeling language comprises Simulink.

### Claim 4 (depends on 1)

The system of claim 1, wherein the software specification models comprise software specification models for control system software or modeling software.

### Claim 5 (depends on 4)

The system of claim 4, wherein the control system software or modeling software comprise software for controlling and/or modeling the operation of an aviation system, an automotive system, or a turbine system.

### Claim 6 (depends on 1)

The system of claim 1, wherein the test case data comprises:
a respective range of each input variable of the software to be verified;
a respective range of each output variable of the software being verified; and
an error bound.

### Claim 7 (depends on 6)

The system of claim 6, wherein the test case comprises:
a respective value for each input variable of the software being verified that is within the respective range of the input variable from the test case data;
a respective value for each output variable of the software being verified that is within the respective range of the output variable from the test case data; and
a precision value, wherein the precision is the same as the error bound of the test case data.

### Claim 8 (depends on 7)

The system of claim 7, wherein the test case comprises a script configured to:
instruct a processor to execute the software to be verified using the respective value of each input variable from the test case;
determine a respective value for each output variable of the executed software; and
provide an output indicating whether the respective values for each output variable of the executed software and the respective value for each output variable of the test case differ by more than the precision value.

### Claim 9 (depends on 1)

The system of claim 1, wherein the analytical engine pool is configured to select a particular SMT solver from a plurality of SMT solvers of the analytical engine pool to receive and analyze each SMT formula of the plurality of SMT formulas based on one or more constraints of the SMT formula.

### Claim 10 (depends on 1)

The system of claim 1, wherein at least one of the translator, the analytical engine pool, or the post-processor is executed using distinct processing circuitry.

### Claim 11

A method of generating test cases and/or test procedures for software verification, comprising:
receiving, at processing circuitry of a software test generation system, software specification models for the software to be verified, wherein the software specification models include at least one nonlinear arithmetic constraint over a Real number range;
generating, via the processing circuitry, SMT formulas that are semantically equivalent to the software specification models;
analyzing, via the processing circuitry, the SMT formulas using at least one SMT solver of an analytical engine pool to generate test case data for each of the SMT formulas that are satisfiable; and
post-processing, via the processing circuitry, the test case data to generate the test cases and/or test procedures for the software to be verified.

### Claim 12 (depends on 11)

The method of claim 11, wherein generating the SMT formulas comprises parsing and translating the software specification model through a strongly-typed intermediate language to generate the SMT formulas.

### Claim 13 (depends on 11)

The method of claim 11, wherein the intermediate language comprises Lisp or Lustre.

### Claim 14 (depends on 11)

The method of claim 11, wherein generating the SMT formulas comprises flattening one or more state-based operations in the software specification model into SMT formulas that are stateless and capable of being analyzed by the at least one SMT solver.

### Claim 15 (depends on 11)

The method of claim 11, comprising:
receiving, at the processing circuitry, test objectives for the software to be verified; and
instrumenting, via the processing circuitry, the software specification models using the test objectives.

### Claim 16 (depends on 11)

The method of claim 11, comprising:
applying one or more heuristics to generate modified SMT formulas from the SMT formulas and the generated test case data; and
analyzing, via the processing circuitry, the modified SMT formulas using the at least one SMT solver of the analytical engine pool to generate additional test case data for each of the modified SMT formulas that are satisfiable; and wherein post-processing comprises post-processing the additional test case data with the test case data to generate the test cases and/or test procedures for the software to be verified.

### Claim 17 (depends on 16)

The method of claim 16, wherein generating the modified SMT formulas comprises fixing an input variable of the SMT formulas to a value indicated by the generated test case data.

### Claim 18 (depends on 16)

The method of claim 16, wherein generating the modified SMT formulas comprises fixing an output variable of the SMT formulas to a value indicated by the generated test case data.

### Claim 19 (depends on 11)

The method of claim 11, wherein post-processing comprises converting ranges of values indicated in the test case data into particular values for one or more input variables and one or more output variables of the software to be verified.

### Claim 20 (depends on 19)

The method of claim 19, wherein converting comprises truncating the ranges of values indicated in the test case data at a particular precision to yield the particular values.

### Claim 21 (depends on 19)

The method of claim 19, wherein converting comprises selecting and truncating upper bounds or lower bounds of the ranges of values indicated in the test case data to yield the particular values.

### Claim 22 (depends on 11)

The method of claim 11, wherein post-processing comprises post-processing the test case data to generate a plurality of test cases and/or test procedures for the software to be verified, wherein each test case and/or test procedure of the plurality of test cases and/or test procedures includes at least one input variable value for the software to be verified, at least one output variable value for the software to be verified, and a precision that the software is to achieve to successfully pass the test case and/or test procedure.

### Claim 23

A non-transitory, computer-readable medium storing instructions executable by processing circuitry of an electronic device to generate a test case for software verification, the instructions comprising:
instructions to receive a software specification model for the software to be verified, wherein the software specification model includes at least one nonlinear arithmetic constraint over a Real number range;
instructions to generate at least one SMT formula that is semantically equivalent to the software specification model;
instructions to analyze the at least one SMT formula using a SMT solver and to generate test case data when the at least one SMT formula is satisfiable; and
instructions to generate, from the test case data, the test case for the software to be verified.
