Linked code generation report
AssigneeThe Math Works, Inc.
InventorsKai Tuschner, William Aldrich
Life of this patent
Estimating the term…
Abstract
A method includes generating source code corresponding to a block diagram model and generating hypertext links associating elements of the generated source code with elements of the block diagram model.
Claims27
An electronic device implemented method for generating a code generation report from a simulatable block diagram model comprising a plurality of graphical elements, the simulatable block diagram model provided in a modeling environment, the method comprising:
- creating a source model representation of the block diagram model in a first language;
- generating source code in a second language from the source model representation using a code compiler, the second language being distinct from the first language, wherein:
- the generated source code includes one or more comments in the second language,
- the one or more comments identifying a corresponding element in the block diagram, and
- the one or more comments include a block path identifying a section of the source model representation represented in the first language that corresponds to the element in the block diagram model;
- generating a code generation report from the generated source code using a report compiler, the generating of the code generation report comprising:
- parsing, using the report compiler, the one or more comments in the generated source code to identify the block path, and
- replacing the block path with a hyperlink, where the hyperlink:
- refers to the element of the block diagram model that corresponds to the section of the source model representation identified by the block path,
- provides a link from the code generation report to the element in the block diagram model, and
- includes a command that is executable in the modeling environment, the command relating to the element in the block diagram model;
- and
- displaying the code generation report to a user.
A system for generating a code generation report from a simulatable block diagram model comprising a plurality of graphical elements, the simulatable block diagram model provided in a modeling environment, the system comprising:
- means for creating a source model representation of the block diagram model in a first language;
- means for generating source code in a second language from the source model representation, the second language being distinct from the first language, wherein the generated source code includes at least one comment in the second language that includes a block path, the block path identifying a section of the source model representation represented in the first language that corresponds to a block in the block diagram model;
- means for generating a code generation report from the generated source code, the generating of the code generation report parsing the at least one comment in the generated source code to identify the block path and replacing at least a portion of the at least one comment with at least one hyperlink that refers to an element of the block diagram model that corresponds to the section of the source model representation identified by the block path, the hyperlink linking from the code generation report to the element of the block diagram model, the hyperlink comprising a command that is executable in the modeling environment, the command relating to the element in the block diagram model;
- and
- an output device for displaying the code generation report to a user.
A computer program product residing on a non-transitory computer readable medium having instructions stored thereon for generating a code generation report from a simulatable block diagram model comprising a plurality of graphical elements, the simulatable block diagram model provided in a modeling environment, the instructions when executed by one or more processors cause the one or more processors to:
- create a source model representation of the block diagram model in a first language;
- generate source code in a second language from the source model representation, the second language being distinct from the first language, the generated source code including at least one comment in the second language that includes a block path, the block path identifying a section of the source model representation represented in the first language that corresponds to a block in the block diagram model;
- generate a code generation report from the generated source code, the generating of the code generation report parsing the at least one comment in the generated source code to identify the block path and replacing at least a portion of the at least one comment with at least one hyperlink that refers to an element of the block diagram model corresponding to the section of the source model representation identified by the block path, the hyperlink linking from the code generation report to the element of the block diagram model, the hyperlink comprising a command that is executable in the modeling environment, the command relating to the element in the block diagram model;
- and
- display the code generation report to a user.
A computing system for generating a code generation report from a simulatable block diagram model comprising a plurality of graphical elements, the simulatable block diagram model provided in a modeling environment, the system comprising:
- a processor and
- a memory,
- wherein the processor and memory are configured to:
- create a source model representation of the block diagram model in a first language;
- generate source code in a second language from the source model representation, the second language being distinct from the first language, the generated source code including at least one comment in the second language including a block path that identifies a section of the source model representation represented in the first language that corresponds to a block in the block diagram model;
- generate a code generation report from the generated source code, the generating of the code generation report parsing the at least one comment in the generated source code to identify the block path and replacing at least a portion of the at least one comment with at least one hyperlink that refers to an element of the block diagram model corresponding to the section of the source model representation identified by the block path, the hyperlink linking from the code generation report to the element of the block diagram model, the hyperlink comprising a command that is executable in the modeling environment, the command relating to the element in the block diagram model;
- and
- display the code generation report to a user.
An electronic device implemented method for generating a document having information about source code associated with a graphical model, the graphical model provided in a modeling environment, and providing a hyperlink referencing an element of the graphical model in the document, the method comprising the steps of:
- creating a source model representation of the graphical model in a first language;
- providing source code identifying an element of the graphical model, the source code provided in a second language that is distinct from the first language, wherein the graphical model is a simulatable graphical model represented, the source code including at least one comment in the second language including a block path that identifies a section of the source model representation represented in the first language, the block path corresponding to a block in the graphical model;
- generating a document from the source code, the generating of the document parsing the at least one comment in the generated source code to identify the block path and replacing at least a portion of the at least one comment with at least one hyperlink that refers to an element of the graphical model corresponding to the section of the source model representation identified by the block path, the at least one hyperlink linking from the document to the element of the graphical model, the hyperlink comprising a command that is executable in the modeling environment, the command relating to the element in the graphical model;
- and
- displaying the document to a user.
Dependencies are inferred from the claim text.