M-XRAY Release Notes ------------------------ 4.3.0 Final LTS / March 2020 - Final long-term support (LTS) version: This is the final version of MXRAY, since the functionality of MXRAY has been almost completely integrated into MXAM at the time of this release. New features will only be developed in MXAM in the future. This MXRAY LTS version will be supported in the long term and is compatible with all Matlab versions from R2011b to R2019b. - BugFix: Fixed a bug that caused an error when calculating the 'Ineffective Interface' metric on a model that contains a bus creator where Simulink is unable to determine the signal hierarchy at the output port of that bus creator. 4.2.1 / November 2019 - BugFix: Fixed a bug that caused an error with the output "In an assignment A(:) = B, the number of elements in A and B must be the same" when a linked atomic subchart is located in a sub-element of a Stateflow chart (e.g. in a state). - BugFix: Fixed a bug that caused an error with the output "Struct contents reference from a non-struct array object" when the link of a linked atomic subchart is unresolved. - BugFix: Fixed a bug that caused an error with the output "Invalid Simulink object name" when a Stateflow chart contains an atomic box. - BugFix: Fixed a bug that caused an error with the output "In an assignment A(:) = B, the number of elements in A and B must be the same" when a Stateflow chart contains a linked chart as an atomic box. 4.2.0 / June 2019 - New metric for distinguishing between functional and structural subsystems (beta version): A new metric category 'Structural vs. Functional' was added, which contains different metrics to distinguish between structural and functional subsystems. Functional subsystems mainly consist of elementary blocks, whereas structural subsystems mainly consist of subsystems. These metrics give a quick impression of this type of subsystem in order to understand, for example, whether quality problems in the model exist mainly at functional or structural levels. One of the metrics is also displayed in the 'Structural Overview' of the HTML report to quickly identify where structural layers end and functional layers begin. This can help for example with the identification of functional units. The new category contains four metrics. 'Funct Blocks', 'Struct Blocks' and 'Neutral Blocks' contain the number of blocks in the subsystem that have been classified as functional, structural or neutral. '%Funct Blocks Ratio' is calculated by 'Funct Blocks / (Funct Blocks + Struct Blocks)' and is therefore a direct indicator of whether the subsystem is functional (100%), structural (0%) or a hybrid. The last metric is additionally supported by a color map for better differentiation (see new feature below). The metric can be selected via the checkbox 'Structural vs. Functional' from the GUI or via the 'StructVsFunct' parameter of mxray_createReport. - User-defined color maps for any metric values: In the new configuration file mxray_metricColorMaps the user can define color maps for arbitrary metric values. A color map colors the background of a table cell of the report according to the metric value. This is similar to the coloring of quality metrics, except that here the metric values can be mapped to arbitrary colors to highlight certain values. If both a quality metric and a color map are defined for a metric, the quality metric is used for coloring. - Better distinction between 0 and 'not available' in HTML report: To better differentiate between the metric value 0 and metric values that are not available for a certain element in the HTML report, the latter are no longer displayed as '-' but as empty table cells. Before, both kinds of values were displayed as '-'. - Better distinction between 0 and 'not available' in Excel report: To better distinguish between the metric value 0 and the metric values that are not available for a certain element in the Excel report, the former is no longer displayed as an empty cell, but as 0. Previously, both types of values were displayed as empty cells. - BugFix: An error was raised when the level metric was calculated on a model containing Simulink based states (introduced in R2017b). This has been fixed. - BugFix: An error was raised when an Excel report was created with mxray_createReport and a relative path was passed to the 'Directory' parameter. This has been fixed. - BugFix: An error was raised in the calculation of the complexity metric when a TargetLink model was analyzed but no installed TargetLink was available in the executing MATLAB environment. This has been fixed. 4.1.0 / March 2019 - New metric for estimating the Stateflow portion of the model: A new metric called 'Global Complexity Stateflow' has been added which can be used to estimate the proportion of Stateflow in the 'Global Complexity' of the model being analyzed. The new metric has been added to the 'Global Value Summary' of the HTML report. - Entire HTML report is stored as a single file: The plots of the HTML report are now embedded into the HTML file via Base64 encoding and are no longer stored as separate files. Thus, the entire HTML report can be saved/archived/exchanged as a single file. The embedding of the plots can be deactivated via the new 'NoEmbeddedPlots' parameter of mxray_createReport. - Excel report automatically overwrites existing report: In order to have a uniform behavior across all report formats, the Excel report is now automatically overwritten if a report with the same file name already exists. Previously, a corresponding warning dialog was displayed in Excel. Suppressing this dialog is especially important if the report is generated automatically by a script. - BugFix: In rare cases, an error was raised during the HTML report creation ('XData can not contain duplicate values') if buses with more than 1000 elementary signals were used in combination with the '%Elementary Inputs Unused (globally)' metric. This has been fixed. 4.0.2 / December 2018 - BugFix: An error was raised during analysis of a library when the library contains a reference to a subsystem in the same library and the reference is analyzed first. This has been fixed. - BugFix: An error was raised when an Excel report was created and the 'Cross-System Results' checkbox in the GUI was deselected (or 'NoCrossSystem' option of mxray_createReport was used). This has been fixed. 4.0.1 / November 2018 - BugFix: The generic TargetLink weighting factor and the block specific TargetLink weighting factors from the mxray_complexityParametersSimulink.m configuration file were not considered in the complexity calculation. This has been fixed. - BugFix: When subsystems were ignored via the mxray_localMetricIgnoreList.m file, their quality metrics were still colored in the report tables and counted in the 'Subsystem Quality Overview'. This has beed fixed. 4.0.0 / September 2018 - Success Criterion for mxray_createReport (CI license required): To support the new MES Jenkins Plugin and to generally support the use of MXRAY in a continuous integration (CI) setup, a success criterion (or quality gate) can be defined for mxray_createReport with the new 'SuccessCriterion' parameter. If this parameter is given, the function returns a boolean that indicates whether the defined success criterion has been met. This return value can be used by continuous integration tools to mark quality assessment jobs as successful or unsuccessful. The success criterion can be defined as 'good', 'acceptable', 'bad', or 'error'. The respective success criteria are met under the following conditions: 'good': All quality metrics are 'good' (green) and no analysis error occurred. 'acceptable': All quality metrics are 'good' (green) or 'acceptable' (yellow) and no analysis error occurred. 'bad': No analysis error occurred. 'error': No conditions => always met. - Improvements to the level metric: - The level metric is no longer computed for subsystems that are library or model references themselves. Background: Library and model references are listed on individual rows in the report tables to visualize the use of references in the model. Given that the level metric should compute the level depth inside the model, but the content of library and model references is no longer part of the model, it is not appropriate to evaluate the level for such subsystems. - BugFix: If the analysis is started (via mxray_createReport) below the two intermediate helper subsystems below a TargetLink subsystem, the level metric will also exclude these two helper subsystems when computing the metric. Previously, this was only done when the analysis was started above the TargetLink subsystem. - License check for opening subsystems via HTML links: MXRAY now checks for a valid license (feature MXRAY_CAL) when opening subsystems (or Stateflow elements) via the links in the HTML report because this kind of interactive work is a basic MXRAY feature. (Opening systems via the links only works in the MATLAB browser). - Ineffective interface metric considers the comment status of subsystems: Previously, the ineffective interface analysis did not take into account whether subsystems are commented out or commented through, it just followed the signal into the subsystems. Now, the analysis does not follow signals into subsystems that are commented out and follows signals through subsystems that are commented through, regardless of the subsystems' content. - BugFix: When the analysis was started via mxray_createReport directly on a subsystem that is itself a library/model reference, the analysis aborted with an error. This has been fixed. 3.7.0 / June 2018 - Define system files to be analyzed by wildcard pattern in mxray_createReport: The user can now define the system files (slx and mdl-files) to be analyzed in the batch analysis (mxray_createReport) by using search patterns with * and ** wildcards. For example, the following command will analyze all slx and mdl files in C:\MyModels or in any subfolder: >> mxray_createReport('C:\MyModels\**\*') As another example, the following command will analyze all files ending with _lib.mdl or _lib.slx in the C:\MyModels folder. >> mxray_createReport('C:\MyModels\*_lib.*') - BugFix: Fixed bug in HTML-report generation which caused the numbering of headings to stop counting on 5th level. 3.6.1 / August 2019 - BugFix: When subsystems were ignored via the mxray_localMetricIgnoreList.m file, their quality metrics were still colored in the report tables and counted in the 'Subsystem Quality Overview'. This has beed fixed. 3.6.0 / March 2018 - Improvement of loop detection and loop complexity: The 'Loop Complexity' is a term that is added to the 'Local Complexity' metric when the 'Loops' checkbox is selected (or 'Loops' option of mxray_createReport used) to consider that the subsystem is more complex to understand when a feedback loop is part of the subsystem. The following changes have been made to this feature: - The incorporation of feedback loops in complexity calculation was improved to give feedback loops the appropriate weight in: 1. Big subsystems in general. 2. Subsystems where blocks are part of feedback loops that are interconnected via lots of signals. Previously, feedback loops were given too little weight in big subsystems, because feedback loops were added as a separate term 'loop complexity' when computing the local complexity. As the local complexity itself grows superlinearly with the number of elements in the subsystem, but the 'loop complexity' only linearly with the blocks, the influence of feedback loops on complexity decreased rapidly with increasing size of the subsystem. Previously, the 'loop complexity' calculation was based on the number of all signal circuits (elementary circuits) that the block is part of. This number could become extensively high for subsystems where blocks in the feedback loop are connected with lots of signals, as each possible signal path is considered. This has been fixed to only consider if a block is part of a feedback loop at all. Roughly, the formula changed from (N1 + N2) * log2(N3 + N4 + 1) + N1_Loops to (N1 + N2 + log2(N1_Loops + N2_Loops + 1)) * log2(N3 + N4 + 1). Please read the manual for details and rationale. - The 'Loops' column that was added to the report tables when the 'Loops' checkbox was selected has been removed, because the underlying concept of 'number of elementary circuits' has no intuitive counterpart in the subsystem and lacks practical relevance. - The 'Blocks In Loops' metric has been changed so that a single block is counted only once, even if the block is part of multiple elementary circuits. As the elementary circuits have no intuitive counterpart in the subsystem this results in a more intuitive metric. - To emphasize the influence of 'Loop Complexity' on the complexity, an additional table column 'Loop Complexity' has been added to the 'Loops' category, containing the additional term that was added to the base complexity. This column was previously only visible when selecting 'AlgoSL' from mxray_createReport. - GUI: Added possibility to remove multiple items from model list: The model list from the GUI is now multi-selectable so that you can select multiple items (or Ctrl-A for all) and remove them in one go via 'Remove model' - HTML report improvements: - Added subsystem name to the table tooltip so that it is obvious to which subsystem a specific table cell belongs. - Report now opens in a new tab so that previous reports are still accessible from the older tabs. - Faster analysis: Reduced the runtime of the loop detection and incoherence metric. For big models, and both metrics selected, this could speed up the analysis by up to 50%, depending on the size of the model's subsystems and the degree of interconnection. - XML report: Added a time stamp for report creation to the XML report. Added this change to the XML schema and increased the minor report version to 2.1. - BugFix: The GUI was minimized when a key was pressed after start-up. This has been fixed. 3.5.0 / January 2018 - BugFix: The Excel report generation failed with an error about an invalid Excel sheet name under the following conditions: a) A model is analyzed with analysis options that cause an error sheet to be generated for this model. b) The model has a long name so that the Excel sheet name has to be truncated to fit within Excel's 31 char limit. c) The clone groups detection is deselected. This bug is fixed now. - Bugfix: The 'Interface Count' metric could cause MATLAB R2011b to crash during analysis. This is fixed now. - Bugfix: The 'IneffectiveInterface' metric caused the analysis to abort with an error or retrieve incorrect results if duplicated inports are used in the model (inport shadows). This is fixed now. 3.4.0 / October 2017 - Elementary inputs unused listed in HTML report: To supplement the ineffective interface analysis introduced in M-XRAY 3.3, a new 'Ineffective Interface' section was introduced in the HTML report that lists the signal names of the elementary inputs unused. The names can be used to directly start refactoring the subsystem's interface. The new section is linked from the main part so that you can still work in the main table and jump into the details by clicking on and following the linked metric value. - Faster analysis: Reduced the runtime of the general model analysis and HTML report generation. For a reference model with global complexity of approx. 20000 and all details selected for analysis, the runtime of analysis and HTML report generation has been reduced by approx. 50%. - Rework of detailed subsystem quality distributions in HTML report: - Changed plots so that distribution bars are centered on the distribution bin. As a result, distributions for small discrete value ranges become clearer (e.g. bars for 'Level' or 'Inport' are now centered on 0, 1, 2 (...) and not on 0.5, 1.5, 2.5 (...)). - Changed font size to improve appearance on different browsers and to avoid truncated titles when title gets too long (e.g. 'Detailed distribution of %Elementary Inputs Unused (globally)' was previously truncated). - Improved HTML report readability for big models: - The library and model references were excluded from the table of contents to keep it readable for models with many references. - The maximum column width of the 'Path' and 'Name' columns were limited (with word wrap enforced) to keep the first metric values in the visible range without having to scroll horizontally. 3.3.2 / November 2017 - Bugfix: The 'IneffectiveInterface' metric caused the analysis to abort with an error or retrieve incorrect results if duplicated inports are used in the model (inport shadows). This is fixed now. 3.3.1 / July 2017 - Bugfix: The 'Ineffective Interface' metric raised an error when a Stateflow chart from a library was referenced. This is fixed now. 3.3.0 / July 2017 - New metric category for 'Ineffective Interface': New metrics address aspects of the architectural design principles 'Low Coupling' and 'Restricted Size of Interfaces' by measuring the amount and percentage of a subsystem's elementary input signals which are effectively unused inside the subsystem. Elementary input signals are all scalar or vector signals coming into the subsystem's inports either directly or (especially) as part of a bus. The metrics support the quality metrics introduced in 3.2 (inports+outports) and are intended to ensure the clarity, maintainability and testability of a subsystem's interface. The metrics can be selected via the 'Ineffective Interface' checkbox from the GUI or via the 'IneffectiveInterface' parameter of mxray_createReport. - New metrics 'Elementary Inputs' and 'Elementary Outputs': In line with the new 'Ineffective Interface' category and metrics, two informational metrics were added which measure the number of scalar or vector signals coming into the subsystem's inports or leaving through the subsystem's outports either directly or as part of a bus. The metrics can be added to the report via the existing 'Interface Count' checkbox ('Interface' parameter of mxray_createReport) together with the number of inport and outports. - Changed MATLAB downward compatibility: M-XRAY 3.3 is now compatible down to MATLAB R2009b (M-XRAY 3.2 was compatible down to R2007b). - New GUI and report arrangement: - The 'Report details' part of the GUI now has two new main subsections called 'Metrics' and 'General' (instead of 'Major' and 'Minor'). The 'Metrics' section includes all metrics available in M-XRAY. The 'General' subsection includes all general settings like 'Quality Metrics' or 'Global Values' plus additional features like 'Clone Groups' and 'Structural Overview'. - The report column categories introduced in 3.2 were refined, in accordance with the GUI changes, so that each metric selected has it's own column category. Previously, all columns of all selected metrics were combined into one 'Statistics and metrics' category. - New error handling: - The new 'Ineffective Interface' metrics analyze the signal flow and content of busses without compiling the model by accessing the 'SignalHierarchy' and 'BusStruct' properties. This may lead to errors when, for example, bus objects are not available or the model is not properly configured. To give the user as much information as possible in the report, a new error handling was introduced. Therefore new 'Errors' tables in the report list all errors occurred during the analysis. If any metric value could not be generated properly, the corresponding metric entry in the report tables will contain the error ID and a link to the 'Errors' table which includes the detailed error message. - In the HTML report, the 'Errors' section of the 'Cross-System Results' now just contains the 'Errors' table which subsumes the previous 'System Loading Errors' and 'Reference Loading Errors' subsections and the 'Warnings' section. For the 'Single System Results' each system will contain one 'Errors' subsection with an 'Errors' table which lists all errors related to that system only. If no error is related to that system, no 'Errors' subsection will be created. The 'Errors' table of the system subsumes the previous 'Reference Loading Errors' and 'Warnings' subsections. - In the Excel report, corresponding error sheets are generated for cross-system and single system results if any errors occur. - For the XML report, currently all erroneous values are set to -1 which is impossible for all M-XRAY metrics so far. The XML report will be enriched with more error information in future releases. - Additional option(s) to specify report name: - A new GUI checkbox 'Prefix' in the 'Report Output File' section can be used to in/exclude the 'mxray_Report_' prefix from the report file name, which was mandatory so far. - The new 'NoPrefix' parameter of mxray_createReport can be used to exclude the prefix in the command line analysis. - The 'Timestamp' checkbox in the GUI can be used to in/exclude the timestamp postfix from the report file name (according to the 'NoTimeStamp' parameter of mxray_createReport). - New 'User Guide' button in GUI: To give the user fast access to the user guide, a new 'Help' area with a button was added to the GUI which opens the user guide pdf. - Minor change in computation of 'Global Complexity' metrics: The global complexity metrics are now computed from the rounded local complexity values which results in a more consistent report, as the local complexity values are also rounded for the report. This may cause minor deviations of the global complexity values from previous versions as the global values where previously computed from the unrounded local complexities and then rounded for the report. - Changed column names: - The prefix 'Block Count: #' of the report column names of the 'Block Type Count' category (e.g. 'Block Count: #BusSelector) is renamed to 'Block Type Count: ' (e.g. 'Block Type Count: BusSelector'). - The prefix 'Stateflow Elements Complexity #' of the report column names of the 'Stateflow Complexity Factors' category is renamed to 'Stateflow Elements Complexity Count: ' (e.g. 'Stateflow Elements Complexity Count: State'). 3.2.0 / April 2017 - Quality metrics for 'Restricted size of interfaces': - As a first supplement to the incoherence metric introduced in release 3.1, quality metrics for the most direct and obvious form of subsystem coupling were added: Count of subsystem inports and subsystem outports ('Inports' and 'Outports' columns). These simple but important quality metrics help to assure quality standards like ISO 26262 and their demand for a 'Restricted size of interfaces'. - Technically the 'Inports' and 'Outports' metrics are identical to the 'Interface In' and 'Interface Out' values of the previous releases, but are renamed to clarify the meaning. - The 'Interface Count' option of the M-XRAY GUI is set to default. - As a first step, the quality boundaries for 'Inports' and 'Outports' are set very defensive and tolerant. As part of the customization these quality metrics (like all) could be adapted to the company's quality standard. - Emphasis of quality metrics in report: To emphasize the quality metrics in the report and to improve clarity, the following changes were made to the reports (HTML+Excel): - There is a new category (for categories see next point) called 'Quality Metrics' in the tables of the report. This category follows immediately after general Subsystem info like path and name. - All columns of metrics selected as quality metrics (defined in mxray_qualityMetrics.m) are grouped in this category to have all quality metrics of the subsystems at a glance. - Improved readability/clarity of report (HTML+Excel) by adding categories to tables: The columns of the report tables are grouped into categories to improve readability. The first category is 'General Info' which contains the 'Path', 'Name' and 'Info' columns (and 'Level' column if level is no quality metric). All following categories are optional and are only part of the report, if the containing columns are selected for analysis. 1. 'Quality Metrics': Quality metrics defined in mxray_qualityMetrics.m like 'Local Complexity', 'Level', ... 2. 'Statistics And Metrics': All standard statistics and metrics not in 'Quality Metrics' like 'Global Complexity', 'Incoherence', 'Blocks' ... 3. 'Simulink Complexity Factors': Simulink complexity factors like 'N1 (org)' 4. 'Stateflow Complexity Factors': Stateflow complexity factors like 'Stateflow Complexity Unscaled' 5. 'Block Count': All block type specific counts like 'BlockCount: #Integrator' 6. 'Review': All review columns like 'Review Status' - New column 'Quality Failures' in Excel report: This value counts the number of failed quality metrics for each subsystem, which means quality metrics in the red (or 'bad') range. This value is added to the Excel report only, as this number is visually obvious from the 'Quality Metrics' category, but could be helpful to sort for in Excel to extract the worst subsystems in terms of quality failures. - Removed global values of 'Interface In' (now 'Inports') and 'Interface Out' (now 'Outports'): As this metric should only assess the number of local ports, the global columns were removed from the report. If someone is really interested in the global number of inports or outports, this is still possible by selecting the blocktype count and reading the values from the 'BlockCount (global refX): #Inport' and 'BlockCount (global refX): #Outport' columns. - Changed behavior of mxray_localMetricsIgnoreList: Previously, only 'Local Complexity' and 'Cyclomatic Complexity' was set to 'Ignored' for subsystems in this list. Now all local metrics and statistics are set to ignored to have a consistent behavior. - New mxray_createReport option 'NoTimeStamp': With this option you can exclude the time stamp from the report file name. - New installation instructions in HTML format: Previously, there were two places for the 'installation instructions'. One in the 'mxray' folder of the distribution zip and one in the user guide. Now there is only one installation instructions file in HTML format called 'Readme_MXRAY_Installation_EN.html' in the root folder of the distribution zip. 3.1.1 / March 2017 - Restored hook functionality of M-XRAY versions smaller than 2.0: mxray_hookGetModelInfo.m from new hooks directory can be used to enrich the HTML report with artifact specific information. Function can be moved, but must be on MATLAB search path when using M-XRAY. 3.1.0 / October 2016 - New incoherence metric (inverse of cohesion): A new metric computes the incoherence of individual subsystems. The incoherence can be seen as the inverse of a cohesion metric. The incoherence gives you a rough estimate of the parallel divisibility of your subsystem. For instance, an incoherence of 3 tells you that there are roughly 3 separated components in the subsystem which may be separated by refactoring. In combination with the local complexity, the metric gives you a powerful measure to identify refactoring candidates. Subsystems with high local complexity and high incoherence indicate subsystems where it should be easy and effective to restructure the content to reduce complexity and improve readability. - Analysis of Stateflow TruthTables: M-XRAY now also analyses Stateflow TruthTables which can be found either in Stateflow charts or are directly embedded in Simulink via the TruthTable block. As TruthTables are part of Stateflow, their complexity is computed via the new Stateflow metric introduced in M-XRAY 3.0. Corresponding weights for TruthTable elements were added to the mxay_complexityParametersStateflow.m configuration file. - Level-Column in Structural Overview: To improve readability of structural overview, a new column 'L' was added which is identical to the 'Level' column of the main tables (which gives you the depth of the subsystem in the model hierarchy). - Loop Detection: Algorithm of loop detection caused some runtime problems in older release or did not finish at all for some models. Therefore switched to new algorithm and removed 'Warning' from GUI and user guide. - License module update: The integrated FlexNet Publisher libraries have been updated to version 11.14.0.0. This update enables the license module to read dongle ids on systems running the WibuKey driver in version 6.32 or above. Older WibuKey driver versions are still supported. 3.0.3 / March 2017 - Restored hook functionality of M-XRAY versions smaller than 2.0: mxray_hookGetModelInfo.m from new hooks directory can be used to enrich the HTML report with artifact specific information. Function can be moved, but must be on MATLAB search path when using M-XRAY. 3.0.2 / September 2016 - Bugfix: The 'Block Count' checkbox in the M-XRAY GUI was ignored in analysis. This is fixed now. 3.0.1 / July 2016 - Bugfix: If model contains subsystems with a line break in subsystem path, the content of this subsystem (and all subsystems below) was discarded in the analysis. This is fixed now. 3.0.0 / June 2016 - New Stateflow complexity metric: The complexity metric for Stateflow was completely redesigned with the following three core features: 1. Halstead volume: The complexity metric is now computed consistently between Simulink and Stateflow using a Halstead volume N*log2(n) where N is the number of elements and n the number of distinct elements. Therefore the number of distinct elements is now also considered in Stateflow and both metrics (Simulink+Stateflow) show the same super-linear scaling with size. 2. Stateflow Action and Condition code: The Stateflow Action and Condition code is now analyzed precisely and included in the overall Stateflow complexity via its own Halstead volume (code complexity). Every operator and operand is part of the computation and even individual weights can be given for special operators and operands. 3. New definition of complexity decomposition: A key aspect of M-XRAY and the handling of complexity is the concept of complexity decomposition. In Simulink parts of any system can be put into subsystems to structure the system and reduce complexity on a local scale. Anything that is inside a subsystem is regarded as encapsulated and hidden and is not included in the computation of the local complexity of the subsystem above. Following the definition of 'The MathWorks' for Stateflow this decomposition should be done using Subcharts. Therefore since M-XRAY version 3.0 only Subcharts are regarded as own hierarchical elements and the local complexity (and all local values) is computed on this level (definition of decomposition / behavior can be changed in configuration file). All parameters of the new Stateflow metric can be inspected or changed in configuration/mxray_complexityParametersStateflow.m . All parameters were carefully pre-configured by MES using a large number of industry Stateflow systems and discussions with Stateflow engineers. Due to the complete redesign of the metric and the new definition of decomposition, the metric results can differ significantly from results with previous versions of M-XRAY. This is a desired behavior as the new metric should give you a far better indicator of the true complexity. - Additional enhancements of Stateflow analysis: 1. If library references are selected for analysis, the analysis now also follows linked atomic subcharts giving you the same behavior in Stateflow as for linked subsystems in Simulink. 2. The content of Simulink functions in Stateflow is now also analyzed. - GUI+HTML+XML Report: New way to define quality classes for specific analysis values (classification into 'good', 'acceptable' and 'bad' with colors green, yellow and red): 1. The mapping of a given analysis value onto quality classes 'good', 'acceptable' and 'bad' is now called 'quality metric'. 2. The configuration file for the quality metrics is now called 'configuration/mxray_qualityMetrics.m' (formerly mxray_getFilterDefinition.m). Now there are three fixed classes 'good', 'acceptable' and 'bad' with fixed colors green, yellow and red for a consistent behavior over multiple quality metrics. 3. The quality metrics defined in qualityMetrics.m form the basis for all color shadings in the report, as before. The difference is: Previously the complete row of a subsystem was colored and the color was based only on the 'Local Complexity'. Now each cell is colored individually depending on its current column. If the column's analysis value belongs to a quality metric, the cell is colored depending on the quality metric and the analysis value in the cell. Therefore there could be multiple cells with different colors for each row/subsystem. As a side effect the report becomes more readable if there are many subsystems in the red range. 4. There is a new GUI option 'Quality Metrics' ('NoQualityMetrics' for mxray_createReport). With this option you can en-/disable the quality metrics. This means that all color shadings corresponding to the quality metrics are en-/disabled in the report. In addition the creation of the 'Subsystem Quality Overview' (formerly called 'Local Metric Overview') in the HTML-Report and the node (formerly known as ) in the XML-report is en-/disabled by this option. 5. The 'Local Metric Overview' ( XML) is renamed to 'Subsystem Quality Overview' ( XML) as this overview is primarily focused on the quality metrics and is directly coupled the new report options described above. 6. The 'Metric Summary' ( XML) section is removed. The 'Global Metric Values' ( XML) subsection below is moved up one level and called 'Global Value Summary' ( XML) as this subsection should not be restricted to metrics only. The 'Subsystem Quality Overview' (formerly 'Local Metric Overview') is also moved one level up. 7. As there are several changes to the XML report the schema is updated and the 'schemaVersion' attribute of the node is set to 2.0. - Changes in configuration files (mxray/configuration): - mxray_blockweights and mxray_SFweights are now called mxray_complexityParametersSimulink and mxray_complexityParametersStateflow to give them a speaking and consistent name. - Due to the new Stateflow metric, the content of mxray_complexityParametersStateflow differs significantly from mxray_SFweights. - mxray_blockweights() returned two parameters: ri_blocktypeValues and tlFactor. The new function mxray_complexityParametersSimulink also returns this two parameters, but with slightly different names and encapsulated in a struct. Please see the file for details. - New configuration file mxray_cloneGroupsDetectionParameters.m to customize the Clone Groups Detection. - mxray_getFilterDefinitions is now called mxray_qualityMetrics with slight changes in the returned struct. Please see the file for details. - New Section 'Warnings' in HTML-Report: Due to the new analysis of Stateflow Action and Transition code there may occur warnings during the analysis of Stateflow code. If there are such warnings they will be displayed in a new section 'Warnings' in the HTML-Report. - HTML Report: Added tooltips to the tables of the HTML report which display the column name. This is especially useful when scrolling through huge tables where the table column line is not visible anymore. - Clone Groups Detection now default in mxray_createReport: The Clone Groups Detection is now enabled per default in mxray_createReport. The old 'CloneGroupsDetection' parameter is now deprecated and replaced by 'NoCloneGroups' which disables the clone groups detection. - 'Add open models' from the GUI now also recognizes unsaved models. - Cyclomatic Complexity: Fixed bug in Cyclomatic Complexity which caused values to be one above the true value. The Cyclomatic Complexity now also recognizes 'Enable ports'. Cyclomatic Complexity for Stateflow is undefined so far and returns 0 for all elements. - BugFix 'AllColumns' mxray_createReport: The 'AllColumns' parameter of mxray_createReport did not include the 'CC' (Cyclomatic Complexity) option. This is fixed now.