System and method for systematic error injection in generated code

US9317408B2 · US · B2

Patent metadata
FieldValue
Publication numberUS-9317408-B2
Application numberUS-201113327481-A
CountryUS
Kind codeB2
Filing dateDec 15, 2011
Priority dateDec 15, 2011
Publication dateApr 19, 2016
Grant dateApr 19, 2016

How to read this patent

A practical reading order for non-experts. Skip the full description unless you need deep technical detail.

  1. Title

    What the patent document calls the invention.

  2. Abstract

    A short plain-language summary of the technical disclosure.

  3. Assignees and inventors

    Who owns or filed the patent and who is credited as inventor.

  4. Key dates

    Filing, priority, publication, and grant dates set the timeline.

  5. First independent claim

    The legal scope of protection — read this for what is actually claimed.

  6. CPC / IPC classifications

    Technology tags used to group this patent with similar filings.

  7. Citations and related patents

    Prior art links and similar publications in this corpus.

Abstract

Official abstract text for this publication.

A system and method introduces one or more errors into computer programming code generated from a model or other source program. The one or more errors are not present in the model, but are introduced into the code generated from the model. The one or more errors may simulate one or more bugs in the code generation process. The generated code, including the one or more introduced errors, may be analyzed by one or more verification tools. The one or more verification tools examine the generated code in an effort to detect the one or more errors that were introduced. The one or more verification tools may compare the generated code to the model or source program. If the one or more verification tools is able to detect the one or more introduced errors, then the one or more verification tools may be considered to be validated.

First claim

Opening claim text (preview).

What is claimed is: 1. A non-transitory, computer-readable storage medium with an executable program stored thereon, where the program instructs a processor to: access a model having executable semantics; generate code from the model by the processor; introduce one or more errors into the code generated from the model, where the one or more errors introduced into the code generated from the model are not present in the model, and are introduced by at least one of altering one or more in-memory intermediate representations for the model, where the one or more in-memory intermediate representations are utilized during code generation, or modifying the generated code; and analyze, by the processor, the generated code that includes the one or more introduced errors. 2. The non-transitory, computer-readable storage medium of claim 1 wherein the analyze step is performed to detect the one or more errors introduced into the generated code. 3. The non-transitory, computer-readable storage medium of claim 1 , wherein the analyze step includes comparing the generated code having the one or more introduced errors to the model. 4. The non-transitory, computer-readable storage medium of claim 1 , wherein the program further instructs the processor to: receive a class of error, wherein the one or more errors introduced into the generated code are of the received class. 5. The non-transitory, computer-readable storage medium of claim 4 wherein the class of error is selected from the group consisting of: a statement out of order execution, an incorrect translation of a math operation, a write after write, an uninitialized read, an incorrect literal, an incorrect data dependency, an incorrect sample time, a missing type cast, an incorrect array indexing, an unprotected multi-task access, a variable shadowing, and a memory leak. 6. The non-transitory, computer-readable storage medium of claim 5 wherein the class of error is selected by a user or programmatically. 7. The non-transitory, computer-readable storage medium of claim 1 wherein the generated code is source code conforming to a computer programming language. 8. The non-transitory, computer-readable storage medium of claim 7 wherein the computer programming language is selected from the group consisting of: C, C++, C#, Ada, SystemC, the Java programming language, and a Hardware Description Language (HDL). 9. The non-transitory, computer-readable storage medium of claim 1 wherein the analyze step is performed by a verification tool, and the executable program further instructs the processor to: determine whether the verification tool detects the one or more errors introduced into the generated code. 10. The non-transitory, computer-readable storage medium of claim 9 wherein the executable program further instructs the processor to: receive a selection of the verification tool. 11. The non-transitory, computer-readable storage medium of claim 10 wherein the selection of the verification tool is received from a user. 12. The non-transitory, computer-readable storage medium of claim 9 wherein the executable program further instructs the processor to: provide an Application Programming Interface (API) through which information on the one or more errors introduced into the generated code, the analysis performed by the verification tool, or the one or more errors introduced into the generated code, and the analysis performed by the verification tool is obtained. 13. The non-transitory, computer-readable storage medium of claim 1 wherein the executable program further instructs the processor to: generate a report having information concerning the one or more errors introduced into the generated code, and provide the report to an output device. 14. The non-transitory, computer-readable storage medium of claim 13 wherein the information includes a location of the one or more errors introduced into the generated code. 15. The non-transitory, computer-readable storage medium of claim 1 wherein the introduce step is performed by a code generation tool, and the one or more errors simulate a bug in the code generation tool. 16. The non-transitory, computer-readable medium of claim 1 , wherein the program further instructs the processor to: execute the model to produce a set of model results; and execute the generated code having the one or more introduced errors to produce a set of generated code results, wherein the analyze step includes comparing the model results to the generated code results. 17. A method comprising: storing a computer source program in a memory, the computer source program conforming to a first programming language; translating by a processor coupled to the memory, the computer source program into a new format conforming to a second programming language that is different from the first programming language; introducing one or more errors into the new format of the computer source program, where the one or more introduced errors do not exist in the computer source program; and are introduced by at least one of altering one or more in-memory intermediate representations for the computer source program, where the one or more in-memory intermediate representations are utilized during the translating, or modifying the translated source program; and analyzing the translated source program in an effort to detect the one or more introduced errors. 18. The method of claim 17 wherein the translating includes performing at least one optimization, and the one or more introduced errors relate to the at least one optimization. 19. The method of claim 17 wherein the analyzing includes comparing the computer source program to the new format in the effort to detect the one or more introduced errors. 20. The method of claim 17 wherein the analyzing is performed by a selected verification tool. 21. The method of claim 17 further comprising: receiving a selection of an error class, wherein the one or more introduced errors belong to the selected error class. 22. The method of claim 17 wherein a number of errors are introduced into the new format, and the number of errors is user-selected or programmatically determined. 23. An apparatus comprising: means for storing an executable model in a memory; means for generating computer programming code from the executable model; means for introducing one or more errors, not appearing in the executable model, into the computer programming code generated from the executable model, the one or more errors introduced by at least one of altering one or more in-memory intermediate representations for the executable model, where the one or more in-memory intermediate representations are utilized by the means for generating computer programming code, or modifying the generated computer programming code; and means for verifying the generated code, where the verifying means attempts to detect the one or more errors introduced into the generated computer programming code. 24. The apparatus of claim 23 wherein the executable model is a graphical model, a text-based model, or a combination graphical and text-based model. 25. A data processing machine comprising: memory configured to store a system model having executable semantics, and instructions; a processor coupled to the memory, the processor configured by the instru

Assignees

Inventors

Classifications

  • for test design, e.g. generating new test cases · CPC title

  • for test execution, e.g. scheduling of test suites · CPC title

  • Methods or tools to render software testable · CPC title

Patent family

Related publications grouped by family.

External sources

Frequently asked questions

Answers are generated from the same data shown on this page.

What does patent US9317408B2 cover?
A system and method introduces one or more errors into computer programming code generated from a model or other source program. The one or more errors are not present in the model, but are introduced into the code generated from the model. The one or more errors may simulate one or more bugs in the code generation process. The generated code, including the one or more introduced errors, may be…
Who is the assignee on this patent?
Szpak Peter S, Mathworks Inc
What technology area does this patent fall under?
Primary CPC classification G06F11/3688. Mapped technology areas include Physics.
When was this patent published?
Publication date Tue Apr 19 2016 00:00:00 GMT+0000 (Coordinated Universal Time) (B2). Legal status and post-grant events are not shown on this page.
What related patents are in patentsdb?
We list 1 related publication on this page (citations in our corpus or others sharing the same primary CPC).