Detecting Modeling Clones
Learn how the Clone Detector app showcases different ways of detecting modeling clones and refactoring Simulink® models for improved efficiency.
Hi, my name is Gerald Gupta and I'm a software engineering manager at MathWorks. In this video, I'll be talking about the clone detection app and the features available with Simulink check. The clone fiction app is a new Simulink toolship app that simplifies the process of managing large models and helps to factor large models into the useful components.
In this sample model with reference models, clicking on the Fine Points button will find and highlight exact and similar clones in the model hierarchy, clones of subsystems in the models that are exactly the same or differ by some parameters. You can look at the individual clone groups and drill down further to see any parameter difference between the clones. You can also look at potential de facto benefits, which indicate a reduced file size for the generated code. You can choose to refactor these clones to a particular library by clicking on the Replace Clones button.
In this example, all subsistence have now been replaced by the library blocks. The library blocks with different parameters now have a mask to manage the different values for the different instances. You can also check the equivalency of the replaced model by either clicking on the Test Manager or running the test.
One of the latest additions to the settings is the ability to now refactor exact clones into subsystem references. I will again open up the default model. And now by selecting this setting, when I click on Find Clones, it will now only detect exact clones. These clones can then be refactored into subsystem reference files. You can select the file name. Now when you click on Replace Clones, these will be refactored as subsystem references.
This video shows how you can use the clone detection app to find any factor modeling clones. Thank you.
You can also select a web site from the following list:
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.