# US 2006/0136863 A1 · Applying coding standards in graphical programming environments

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

- Number: US 2006/0136863 A1
- Document ID: US20060136863A1
- Status: Published application
- Kind: A1
- Application number: 11/015,851
- Filed: 2004-12-16
- Published: 2006-06-22
- Earliest claimed: 2004-12-16
- Assignees: The MathWorks, Inc.
- Inventors: Peter Szpak
- Web page: https://patentgrep.com/patent/US20060136863A1

## CPC

- G06F 8/34: Graphical or visual programming
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

Graphical programming or modeling environments in which a coding standard can be applied to graphical programs or models are disclosed. The present invention provides mechanisms for applying the coding standard to graphical programs/models in the graphical programming/modeling environments. The mechanisms may detect violations of the coding standard in the graphical model and report such violations to the users. The mechanisms may automatically correct the graphical model to remove the violations from the graphical model. The mechanisms may also automatically avoid the violations in the simulation and/or code generation of the graphical model.

## Claims

### Claim 1

In an electronic device that provides a modeling environment, a method for applying a coding standard to a model in the modeling environment, the method comprising the steps of:
providing a coding standard in the modeling environment; and
applying the coding standard to a model to detect violations of the coding standard in the model.

### Claim 2 (depends on 1)

The method of claim 1, wherein the step of providing a coding standard comprises the step of:
providing a plurality of coding standards in the modeling environment; and
enabling users to select one of the plurality of coding standards provided in the modeling environment.

### Claim 3 (depends on 1)

The method of claim 1, wherein the step of providing a coding standard comprises the step of:
enabling users to customize the coding standard provided in the modeling environment.

### Claim 4 (depends on 3)

The method of claim 3, wherein the step of enabling users to customize the coding standard comprises the step of:
enabling users to disable at least a portion of the coding standard provided in the modeling environment.

### Claim 5 (depends on 1)

The method of claim 1, wherein the modeling environment comprises a graphical modeling environment and the step of applying the coding standard to a model comprises the step of:
applying the coding standard to a graphical model in the graphical modeling environment.

### Claim 6 (depends on 5)

The method of claim 5, wherein the step of applying the coding standard to a model comprises the step of:
applying the coding standard to text-based code embedded in the graphical model in the graphical modeling environment.

### Claim 7 (depends on 5)

The method of claim 5, wherein the graphical model includes at least one of a time-based block diagram and a state-based and flow diagram.

### Claim 8 (depends on 1)

The method of claim 1, further comprising the steps of:
reporting to users the violations of the coding standard in the model.

### Claim 9 (depends on 8)

The method of claim 8, wherein the step of reporting comprises the steps of:
enabling users to view the violations of the coding standard by navigating the model.

### Claim 10 (depends on 9)

The method of claim 9, wherein the step of enabling comprises the steps of:
displaying violating segments of the model differently than non-violating segments of the model; and
in response to users' selection of a violating segment, displaying information on a violation of the coding standard in the violating segment.

### Claim 11 (depends on 10)

The method of claim 10, wherein the information enables users to navigate to a corresponding portion of a violation report.

### Claim 12 (depends on 1)

The method of claim 1, further comprising the steps of:
automatically correcting the model to remove the violations of the coding standard in the model.

### Claim 13 (depends on 12)

The method of claim 12, wherein the step of correcting the model comprises the step of:
enabling users to input data that is needed to provide an alternative of the model to avoid the violations of the coding standard in the model.

### Claim 14 (depends on 1)

The method of claim 1, further comprising the steps of:
compiling the model to automatically avoid violations of the coding standard in the model, wherein at least a portion of the model violating the coding standard is automatically replaced with an alternative of the portion.

### Claim 15

A system for applying a coding standard to a model in a modeling environment, wherein the system includes a display device, the system comprising:
a storage for containing at least a coding standard in the modeling environment; and
a processor for applying the coding standard to a model to detect violations of the coding standard in the model.

### Claim 16 (depends on 15)

The system of claim 15, wherein the storage contains a plurality of coding standard and the system further comprises a user interface element displayed on the display device for enabling users to select one of the plurality of coding standards provided in the storage.

### Claim 17 (depends on 15)

The system of claim 15, further comprising an application program interface for enabling users to customize the coding standard in the modeling environment.

### Claim 18 (depends on 17)

The system of claim 17, wherein the application program interface enables users to enter users' own coding standard in the modeling environment.

### Claim 19 (depends on 15)

The system of claim 15, wherein the processor applies the coding standard to a graphical model in a graphical modeling environment.

### Claim 20 (depends on 19)

The system of claim 19, wherein the processor applies the coding standard to text-based code embedded in the graphical model in the graphical modeling environment.

### Claim 21 (depends on 15)

The system of claim 15, further comprising another user interface element displayed in the display device for reporting to users the violations of the coding standard in the model.

### Claim 22 (depends on 15)

The system of claim 15, processor automatically corrects the model to remove the violations of the coding standard in the model.

### Claim 23 (depends on 15)

The system of claim 15, further comprising an input device for enabling users to input data that is needed to provide an alternative of the model to avoid the violations of the coding standard in the model.

### Claim 24 (depends on 15)

The system of claim 15, further comprising a model processing engine for compiling the model to automatically avoid violations of the coding standard in the model, wherein at least a portion of the model violating the coding standard is automatically replaced with an alternative of the portion.

### Claim 25

A computer program product for holding instructions executed in a computer to generate a model in a modeling environment, comprising:
providing a coding standard in the modeling environment; and
applying the coding standard to a model to detect violations of the coding standard in the model.

### Claim 26 (depends on 25)

The computer program product of claim 25, wherein the step of providing a coding standard comprises the step of:
providing a plurality of coding standards in the modeling environment; and
enabling users to select one of the plurality of coding standards provided in the modeling environment.

### Claim 27 (depends on 25)

The computer program product of claim 25, wherein the step of providing a coding standard comprises the step of:
enabling users to customize the coding standard provided in the modeling environment.

### Claim 28 (depends on 27)

The computer program product of claim 27, wherein the step of enabling users to customize the coding standard comprises the step of:
enabling users to disable at least a portion of the coding standard provided in the modeling environment.

### Claim 29 (depends on 27)

The computer program product of claim 27, wherein the modeling environment comprises a graphical modeling environment and the step of applying the coding standard to a model comprises the step of:
applying the coding standard to a graphical model in the graphical modeling environment.

### Claim 30 (depends on 29)

The computer program product of claim 29, wherein the step of applying the coding standard to a model comprises the step of:
applying the coding standard to text-based code embedded in the graphical model in the graphical modeling environment.

### Claim 31 (depends on 29)

The computer program product of claim 29, wherein the graphical model includes at least one of a time-based block diagram and a state-based and flow diagram.

### Claim 32 (depends on 25)

The computer program product of claim 25, further comprising the steps of:
reporting to users the violations of the coding standard in the model.

### Claim 33 (depends on 32)

The computer program product of claim 32, wherein the step of reporting comprises the steps of:
enabling users to view the violations of the coding standard by navigating the model.

### Claim 34 (depends on 33)

The computer program product of claim 33, wherein the step of enabling comprises the steps of:
displaying violating segments of the model differently than non-violating segments of the model; and
in response to users' selection of a violating segment, displaying information on a violation of the coding standard in the violating segment.

### Claim 35 (depends on 34)

The computer program product of claim 34, wherein the information enables users to navigate to a corresponding portion of a violation report.

### Claim 36 (depends on 25)

The computer program product of claim 25, further comprising the steps of:
automatically correcting the model to remove the violations of the coding standard in the model.

### Claim 37 (depends on 36)

The computer program product of claim 36, wherein the step of correcting the model comprises the step of:
enabling users to input data that is needed to provide an alternative of the model to avoid the violations of the coding standard in the model.

### Claim 38 (depends on 25)

The computer program product of claim 25, further comprising the steps of:
compiling the model to automatically avoid violations of the coding standard in the model, wherein at least a portion of the model violating the coding standard is automatically replaced with an alternative of the portion.

### Claim 39

In a server that provides a modeling environment, a method for applying a coding standard to a model in the modeling environment, the method comprising the steps of:
applying the coding standard to a model to detect violations of the coding standard in the model, and
sending a result of applying the coding standard to a client over a communication network.

### Claim 40 (depends on 39)

The method of claim 39, wherein the result comprises a violation report.

### Claim 41 (depends on 39)

The method of claim 39, wherein the result comprises a corrected model from which the violations of the coding standard are removed.

### Claim 42 (depends on 39)

The method of claim 39, wherein the result comprises a compiled model from which the violations of the coding standard are removed.

### Claim 43 (depends on 39)

The method of claim 39, wherein the result comprises code generated for the model from which the violations of the coding standard are removed.

### Claim 44

In a client that provides a modeling environment, a method for applying a coding standard to a model in the modeling environment, the method comprising the steps of:
receiving a coding standard; and
applying the coding standard to a model to detect violations of the coding standard in the model.
