IP Library Granted Patent US 9,864,588
Granted Patent B2
US 9,864,588 · App. 12/964,371 · Granted Jan 9, 2018

Canonicalized versions of reuse candidates in graphical state diagrams

Inventors: Srinath Avadhanula (Waltham, MA); Vijay Raghavan (Brookline, MA)
Assignee: The MathWorks, Inc.
G06F8/36G06F8/10G06F8/34
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 9,864,588
App. No.
12/964,371
Granted
Jan 9, 2018
Kind
B2
Abstract

Exemplary embodiments provide techniques for replacing a portion of a state diagram with a generalized, canonical version of the portion. The canonicalized version mimics the structure or semantics (or both) of the portion of the state diagram, although the canonicalized version need not be a perfect match for the structure or semantics of the portion. Exemplary embodiments further provide techniques for identifying a portion of a state diagram for reuse, and generating a canonicalized version of the portion.

Claims (73)

1. A non-transitory device-readable storage medium storing instructions, the instructions when executed causing one or more processors to perform a process comprising:

identify one or more reuse candidates in an executable graphical state diagram model, each reuse candidate comprising a subchart of the graphical state diagram model;

obtain an atomic subchart, the atomic subchart

being a canonicalized representation of the subcharts of the one or more reuse candidates, and

comprising restrictions applied to a structure or semantics of the atomic subchart that allow the atomic subchart to be used without relying on parameters outside of the atomic subchart in the graphical state diagram model when the atomic subchart is placed in the graphical state diagram model, and

replace in the graphical state diagram model, at least one of the reuse candidates with the atomic subchart; the replacing comprising;

generating a link between the at least one of one or more reuse candidates and the atomic subchart, the link configured to parameterize the atomic subchart.

2. The medium of claim 1 , wherein the link is in a form of a table.

3. The medium of claim 1 , further storing instructions for storing the link with the graphical state diagram model.

4. The medium of claim 3 , further storing instructions for:

generating code for the graphical state diagram model;

receiving an indication that one or more of the one or more reuse candidates or the atomic subchart is modified, and

re-generating code for the one or more of the reuse candidates or the atomic subchart that has been modified, without requiring regenerating code for other parts of the graphical state diagram model.

5. The medium of claim 1 , wherein the atomic subchart

is restricted from accessing data or graphical functions that reside in other states or subcharts of the graphical state diagram model,

comprises data defined explicitly,

comprises exported functions called by the atomic subchart,

comprises data limited to particular types,

is restricted from event broadcasts which are outside the scope of the atomic subchart,

makes no use of supertransitions crossing a boundary of the atomic subchart, or

is restricted from use of execute-at-initialization behavior.

6. The medium of claim 1 , further storing instructions for activating the link to replace variables or constants of the atomic subchart with variables and constants from the at least one of the one or more reuse candidates.

7. The medium of claim 1 , further storing instructions for replacing all reusable candidates with the atomic subchart.

8. A method comprising: generating code for a graphical state diagram model;

wherein the graphical state diagram model comprises at least one atomic subchart in place of a reuse candidate, where

the reuse candidate comprises a subchart of the graphical state diagram model,

the atomic subchart is a canonicalized representation of the subchart of the reuse candidate, and comprises restrictions applied to a structure or semantics of the atomic subchart that allow the atomic subchart to be used without relying on parameters outside of the atomic subchart in the graphical state diagram model when the atomic subchart is placed in the graphical state diagram model,

the atomic subchart having an associated parameterized link configured to parameterize the atomic subchart to provide information related to the reuse candidate;

receiving an indication that the reuse candidate or the atomic subchart is modified,

regenerating code for the reuse candidate or the atomic subchart that has been modified, without requiring regenerating code for the other parts of the graphical state diagram model.

9. The method of claim 8 , wherein the generating code comprises generating code based on the parameterization link.

10. The method of claim 8 , wherein the atomic subchart

is restricted from accessing data or graphical functions that reside in other states or subcharts of the graphical state diagram model,

comprises data defined explicitly,

comprises exported functions called by the atomic subchart,

comprises data limited to particular types,

is restricted from event broadcasts which are outside the scope of the atomic subchart,

makes no use of supertransitions crossing a boundary of the atomic subchart, or

is restricted from use of execute-at-initialization behavior.

11. The method of claim 8 , further comprising:

activating the link to replace variables or constants of the atomic subchart with variables and constants from the at least one of the one or more reuse candidates.

12. The method of claim 8 , further comprising:

replacing all reusable candidates with the atomic subchart.

13. A system comprising:

a storage for storing an executable graphical state diagram model that is a single statechart; and

one or more processors programmed to:

identify one or more reuse candidates in an executable graphical state diagram model, each reuse candidate comprising a subchart of the graphical state diagram model;

obtaining an atomic subchart, the atomic subchart

being a canonicalized representation of the subcharts of the one or more reuse candidates, and

comprising restrictions applied to a structure or semantics of the atomic subchart that allow the atomic subchart to be used without relying on parameters outside of the atomic subchart in the graphical state diagram model when the atomic subchart is placed in the graphical state diagram model, and

replace in the graphical state diagram model, at least one of the reuse candidates with the atomic subchart; the replacing comprising;

generating a link between the at least one of one or more reuse candidates and the atomic subchart, the link being configured to parameterize the atomic subchart.

14. A method performed by one or more processors, comprising:

identifying one or more reuse candidates in an executable graphical state diagram model, each reuse candidate comprising a subchart of the graphical state diagram model;

obtaining an atomic subchart, the atomic subchart

being a canonicalized representation of the subcharts of the one or more reuse candidates, and

comprising restrictions applied to a structure or generating of the atomic subchart that allow the atomic subchart to be used without relying on parameters outside of the atomic subchart in the graphical state diagram model when the atomic subchart is placed in the graphical state diagram model, and

replacing in the graphical state diagram model, at least one of the reuse candidates with the atomic subchart; the replacing comprising;

generating a link between the at least one of one or more reuse candidates and the atomic subchart, the link configured to parameterize the atomic subchart.

15. The method of claim 14 , wherein the link is in a form of a table.

16. The method of claim 14 , further comprising:

storing the link with the graphical state diagram model.

17. The method of claim 16 , further comprising:

generating code for the graphical state diagram model; receiving an indication that one or more of the one or more reuse candidates or the atomic subchart is modified, and

regenerating code for the one or more of the reuse candidates or the atomic subchart that has been modified, without requiring regenerating code for other parts of the graphical state diagram model.

18. A non-transitory device-readable storage medium storing instructions, the instructions, the instructions when executed causing one or more processors to perform a process comprising:

generate a code for a graphical state diagram model;

wherein the graphical state diagram model comprises at least one atomic subchart in place of a reuse candidate, where

the reuse candidate comprises a subchart of the graphical state diagram model,

the atomic subchart is a canonicalized representation of the subchart of the reuse candidate, and comprises restrictions applied to a structure or semantics of the atomic subchart that allow the atomic subchart to be used without relying on parameters outside of the atomic subchart in the graphical state diagram model when the atomic subchart is placed in the graphical state diagram model,

the atomic subchart having an associated parameterized link configured to parameterize the atomic subchart to provide information related to the reuse candidate;

receive an indication that the reuse candidate or the atomic subchart is modified,

regenerate code for the reuse candidate or the atomic subchart that has been modified, without requiring regenerating code for the other parts of the graphical state diagram model.

Assignments (1)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Dec 16, 2010
From: AVADHANULA, SRINATH; RAGHAVAN, VIJAY
To: THE MATH WORKS, INC.
Reel/Frame 025512/0050 →
Continuity (2)
Provisional Application 61267885 · Dec 9, 2009
Related Publication 20110137634A1 · Jun 9, 2011