File Exchange

image thumbnail

Reach/Coreach Tool

version 1.6 (416 KB) by

The tool highlights and slices data/control flow dependencies in Simulink models.

3 Downloads

Updated

View License

The Reach/Coreach Tool tracks and highlights data flow and control flow in the model. The tool identifies, for some specified Simulink blocks, parts of the model that depend on those blocks (Reach functionality), or parts of the model that the specified blocks depend upon (Coreach functionality). After the dependencies have been identified, the extraneous blocks can be removed via the tool's model slicing function. For installation instructions and instructions on how to use the tool, see doc/ReachCoreach_UserGuide.pdf in the source files.

For more about the capabilities of the tool and how it can be used in model-based development with Simulink, see the two papers:
Vera Pantelic, Steven Postma, Mark Lawford, Alexandre Korobkine, Bennett Mackenzie, Jeff Ong, Marc Bender, "A Toolset for Simulink: Improving Software Engineering Practices in Development with Simulink," Proceedings of 3rd International Conference on Model-Driven Engineering and Software Development (MODELSWARD 2015), SCITEPRESS, 2015, 50-61. (Best Paper Award)

Vera Pantelic, Steven Postma, Mark Lawford, Monika Jaskolka, Bennett Mackenzie, Alexandre Korobkine, Marc Bender, Jeff Ong, Gordon Marks, Alan Wassyng, “Software engineering practices and Simulink: bridging the gap,” International Journal on Software Tools for Technology Transfer (STTT), 2017, 1-23.

Comments and Ratings (2)

McSCert

McSCert (view profile)

@Bibigul Shektybayeva: Thank you for bringing these points to our attention! Creating a new model when slicing is not currently supported, but we will look into adding support for this.

Hello,
Thanks for sharing this toolbox. I tried using it, and found a small mistake. When you catch an error you have a typo(ex. in ReachCoreach.m, line 208):
try
delete_block(blocksToDelete(i));
catch E
if ~strcmp(E.identifier, 'Simulink:Commands:InvSimulinkObjHandle')
error(E);
end
end
You need to use error(E.message) instead of error(E), then it gives the actual error message.

I also have a question, is it possible to create anew sliced model rather than deleting the un-highlighted blocks? I get an error that the block cannot be deleted while the simulation is running. I would appreciate any suggestions :)

Updates

1.6

Fixed a minor bug.

1.5

Fixed bug involving coreaching from selected lines.

1.4

Updating "Other Requirements" field to reflect that the tool has been testing with R2017a.

1.4

Updating tool name.

1.4

Fixed recursion bugs. Optimized highlighting operation.

1.3

Formatted description text.

1.3

Fixed bugs regarding highlighting for data stores, if blocks, and use with 2016b.

1.2

– Improved usability, handling of buses
– The tool now tracks through For Each subsystems
– Fixed some issues including problems with running the tool on models with data store and Goto/From shadowing

1.1

– The accuracy of tracking through If and Switch Case blocks has been increased.
– Fixed bugs in function Clear.
– The colouring is now done with Simulink's built-in highlighting system.

MATLAB Release
MATLAB 9.2 (R2017a)

Download apps, toolboxes, and other File Exchange content using Add-On Explorer in MATLAB.

» Watch video