Abstract:
A device receives a model that includes blocks and lines provided between the blocks, and identifies first candidate boundaries for the model. Each of the first candidate boundaries defines a group of blocks. The device generates an intermediate representation (IR) of the model, performs an optimization of the IR to generate an optimized IR, and identifies second candidate boundaries for the model based on the optimized IR. Each of the second candidate boundaries defines a group of blocks, and the first and second candidate boundaries define a set of candidate boundaries. The device reduces the set of candidate boundaries, to a reduced set of boundaries, based on code efficiency metrics or metrics associated with a hardware platform. The device generates code for the model based on the reduced set of boundaries, and outputs the code.
Abstract:
A modeling environment is provided allowing a user to generate, from a source representation of a model, a target representation of a model and a listing of the optimization performed during generation of the target representation which is associated with the target representation or the source representation. The model may represent a system, such as a dynamic system. The source representation of the model may be a graphical or textual representation. In some embodiments a user may specify whether to implement the optimization.
Abstract:
A system determines what aspects of input sources contribute to code generation and provides associations between the input sources and components of features of the generated code. These associations may be visualized by displaying visual cues of the associations. The input sources may be of different types, including but not limited to a model, a code generator and values for atomic configuration setting for code generation. The visual cue that is displayed may take the form of a visible connection between the input sources and the relative portion or portions of the generated programming code. Suggestions may be generated in response to edits to the generated programming code as to how the sources may be modified to provide desired changes in the generated programming code. Analysis may be performed to identify artifacts in the generated programming code and associations to the sources may be identified to specify what source contributed to portions of the generated programming code.
Abstract:
A computer readable medium including executable instructions that when executed perform a method for validating an optimization in generated code using an executable constraints document is provided. The medium can include instructions for relating an assumption to the optimization during code generation. The medium can include instructions for generating the executable constraints document during the code generation, the executable constraints document including information about the relating; and the medium can include instructions for executing the constraints document when the validating is performed, the validating including performing an operation based on a validation result produced by the validating, where the operation includes displaying the validation result to a user, storing the validation result, sending the validation result to a destination, or modifying the generated code.
Abstract:
In an embodiment, a model is sliced into a plurality of slices. A slice in the plurality of slices is selected. A portion of code, that corresponds to the selected slice, is identified from code generated from the model. The identified code is verified to be equivalent to the selected slice. Equivalence may include equivalent functionality, equivalent data types, equivalent performance, and or other forms of equivalence between the selected slice and the identified generated code.
Abstract:
Exemplary embodiments employ a mapping among entities that are related to each other. The entities may include a graphical model, generated code, a generated report, a requirements document and/or an intermediate representation. The mapping may facilitate graphical identifications between parts of one entity that maps to part of another entity. The graphical identification may occur based on a selection of a part in one of the entities.
Abstract:
A device receives a model, in a technical computing environment, that includes blocks and lines, and determines an application domain associated with the model. The device determines code generation optimizations for the model, determines dependencies of the code generation optimizations, and determines performance characteristics for the device. The device determines capabilities of a target compiler for the code generated based on the model, and determines a profile for target hardware to be used to execute the code. The device identifies an order for the code generation optimizations based on the determined information, generates optimal code for the model based on the identified order for the code generation optimizations, and outputs and/or store the optimal code.
Abstract:
A device receives code in a modeling environment format, receives a model in the modeling environment format, and receives relationships information associated with one or more relationships between the code and the model. The device combines the code, the model, and the relationships information to generate an output file in a non-modeling environment format, and outputs or stores the output file.
Abstract:
The present invention provides a method and system for optimization of an intermediate representation in a graphical modeling environment. A first intermediate representation is provided. At least one optimization technique is applied to the first intermediate representation. A second intermediate representation is generated responsive to the application of the at least one optimization technique to the first intermediate representation.
Abstract:
In an embodiment, a modeling component generated in a first modeling environment can be implemented in a second modeling environment. The modeling component is executed in the first modeling environment. A first behavior of the modeling component in the first modeling environment is obtained based on the executing. The modeling component is then executed in the second modeling environment. A second behavior of the modeling component in the second modeling environment is obtained based on the executing the modeling component in the second modeling environment. The first behavior is compared to the second behavior. Based on the comparing, it is verified that the second behavior of the modeling component complies with one or more modeling requirements of the second modeling environment. The second behavior of the modeling component may be implemented in the second modeling environment.