Optimization tracing
AssigneeThe MathWorks, Inc.
InventorsXiaocang Lin, Robert O. Aberg
Life of this patent
Estimating the term…
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.
Claims21
A method comprising:
- generating, by one or more processors, first program code for a model, the first program code comprising one or more code elements associated with one or more implemented optimizations which represent one or more portions of the model, the one or more code elements associated with the one or more implemented optimizations generated in place of non-optimized code which represent the one or more portions of the model;
- establishing, by the one or more processors, for each code element of the one or more code elements associated with the one or more implemented optimizations of the first program code, one or more traces between each code element and the one or more implemented optimizations associated with the each code element;
- for a first code element for which one or more traces have been established, generating, by the one or more processors, a listing of the one or more implemented optimizations associated with the first code element which was generated in the first program code in place of non-optimized code;
- displaying, via a display, a user prompt to select among disabling at least one of the one or more implemented optimizations of the listing locally for the first code element or globally for the first program code;
- receiving, via a user interface and in response to the user prompt, user input indicating to disable at least one of the one or more implemented optimizations of the listing;
- disabling, based on the user input, at least one implemented optimizations, each disabled implemented optimization being one of disabled locally for the first code element or disabled globally for the first program code;
- and
- generating, by the one or more processors, second program code for the model, the second program code being the same as the first program code except for not including the at least one disabled implemented optimizations.
A non-transitory computer readable medium having computer-executable instructions stored which, when executed by a processor, cause the processor to perform operations comprising:
- generating first program code for a model, the first program code comprising one or more code elements associated with one or more implemented optimizations which represent one or more portions of the model, the one or more code elements associated with the one or more implemented optimizations generated in place of non-optimized code which represent the one or more portions of the model;
- establishing for each code element of the one or more code elements associated with the one or more implemented optimizations of the first program code, one or more traces between each code element and the one or more implemented optimizations associated with the each code element;
- for a first code element for which one or more traces have been established, generating a listing of the one or more implemented optimizations associated with the first code element which was generated in the first program code in place of non-optimized code;
- displaying, via a display, a user prompt to select among disabling at least one of the one or more implemented optimizations of the listing locally for the first code element or globally for the first program code;
- receiving, via a user interface and in response to the user prompt, user input indicating to disable at least one of the one or more implemented optimizations of the listing;
- disabling, based on the user input, at least one implemented optimizations, each disabled implemented optimization being one of disabled locally for the first code element or disabled globally for the first program code;
- and
- generating second program code for the model, the second program code being the same as the first program code except for not including the at least one disabled implemented optimizations.
A system comprising:
- a display to provide a user interface;
- one or more processors;
- and
- non-transitory memory, the non-transitory memory containing instructions executable by the one or more processors, the instructions to:
- generate first program code for a model, the first program code comprising one or more code elements associated with one or more implemented optimizations which represent one or more portions of the model, the one or more code elements associated with the one or more implemented optimizations generated in place of non-optimized code which represent the one or more portions of the model;
- establish for each code element of the one or more code elements associated with the one or more implemented optimizations of the first program code, one or more traces between each code element and the one or more implemented optimizations associated with the each code element;
- for a first code element for which one or more traces have been established, generate a listing of the one or more implemented optimizations associated with the first code element which was generated in the first program code in place of non-optimized code;
- display, via the display, a user prompt to select among disabling at least one of the one or more implemented optimizations of the listing locally for the first code element or globally for the first program code;
- receive, via the user interface and in response to the user prompt, user input indicating to disable at least one of the one or more implemented optimizations of the listing;
- disable, based on the user input, at least one implemented optimizations, each disabled implemented optimization being one of disabled locally for the first code element or disabled globally for the first program code;
- and
- generate second program code for the model, the second program code being the same as the first program code except for not including the at least one deactivated implemented optimizations.
Dependencies are inferred from the claim text.