Parameters of LI Implementation of MAAB 5.0 Rules

LI Implementation of MAAB 5.0 Rules can be configured by creating an m-file named lick_config anywhere on Matlab's path. If more than one such file exists on the path, an error is thrown. The m-file must be a function returnung a struct of customised parameters where the field name equals the parameter name and the type must match the respective parameters type. All parameters not found in that struct remain with their default values, as is the case if no lick_config was found at all.


bAllowBadSlLibNames

Type

logical

Default

false

Description

If true, block name checks will allow any name found on blocks in the simulink library along with the same BlockType or MaskType. This includes respective numeric extensions as automatically applied by the Simulink Editor in case of name ambiguities. This exception only refers to the actual library of the name simulink, rather than to all content displayed in Simulink Library Browser.


bAllowMpSwitchEnum

Type

logical

Default

false

Description

If true, multiport switch blocks may also be controlled by a signal of enumerated data type. Otherwise only unsigned integer data types are allowed at the control port (1st inport)


bAllowMpSwitchVecIdx

Type

logical

Default

false

Description

If true, a multiport switch block is allowed to have only one data port, if the signal connected to that port is non-scalar. Otherwise a multiport switch block must always have at least two data ports.


bAllowSctMemPams

Type

logical

Default

false

Description

If true, struct member expressions are considered parameters and parameter name checks will be conducted on all parts of the dot-separated expression individually. Otherwise struct member expressions are not considered a parameter and thus are forbidden to be used in place of a parameter (like in a block mask).


bExclSlprj

Type

logical

Default

true

Description

If true, the Simulink special folder slprj, along with all its contents at any depth, is exempted from all checks regarding file or folder names.


bIgnoreSfInLayer

Type

logical

Default

false

Description

If true, all Stateflow type blocks will be allowed in all types of layers where checking for disallowed blocks in layers.


bIterPosBtm

Type

logical

Default

true

Description

If true, all iterator blocks (For Each, For Iterators, While-Iterators) must be positioned bottom-most within their diagram. Otherwise all these blocks must be positioned top-most


bSigLblSlCkCmpl

Type

logical

Default

true

Description

If true, Signal label check for na_0008 follows the rule interpretation of the Simulink Check implementation. In this case:

Signal labels of signals entering any of the defined blocks are.

If false, all signals will be checked as defined in the rule without the exceptions defined for port label display and labels of indirectly connected signals. This is because the Simulink API supplies no means to check the actual signal display on block ports and in some cases is inconsistent over releases/Simulink versions. There are parameters that indicate if such display should be done, but none to check if any such signal name could be determined and actually is displayed as this feature is obviuosly differing from propagated names available on port level.


bUseVecIdxZero

Type

logical

Default

true

Description

If true, all multiport switches are required to use zero-based indexing. Otherwise all multiport switches must use one-based indexing


cBoolSigsOnlyBlks

Type

Cell Array

Default

{ 'Logic' }

Description

Cell array of strings defining the BlockType or MaskType property of blocks who's inputs shall all be of a logical data type. By default only BlockTypes of those blocks are listed that for backwards compatibility do not error out when connected to non-logical signals and compiled or simulated.


cMdlAprncPams

Type

Cell Array

Default

{ 'ModelBrowserVisibility' 'off'
'ScreenColor' 'white'
'StatusBar' 'on'
'ToolBar' 'on'
'ZoomFactor' '100'
'BackgroundColor' 'white'
'ForegroundColor' 'black'
'ExecutionContextIcon' 'off'
'LibraryLinkDisplay' 'none'
'ShowLinearizationAnnotations' 'on'
'ShowModelReferenceBlockIO' 'off'
'ShowModelReferenceBlockVersion' 'off'
'SampleTimeColors' 'off'
'ExecutionContextIcon' 'off'
'ShowPortDataTypes' 'off'
'PortDataTypeDisplayFormat' 'BaseTypeOnly'
'ShowLineDimensions' 'off'
'ShowStorageClass' 'off'
'ShowTestPointIcons' 'on'
'ShowViewerIcons' 'on'
'WideLines' 'on' }

Description

Each line constitutes a name value pair of a model wide appearance parameter. The default is made up from the MAAB 5.0 na_0004 example values, thus defining an individual set is not a deviation from the standard rule. Any custom set should cover at least all parameters given with the example, though, while the respective expected values might differ arbitrarily.


cNumSigsOnlyBlks

Type

Cell Array

Default

{ 'Compare To Constant'
'Compare To Zero'
'Gain'
'Product'
'RelationalOperator'
'Sum'
'Signum' }

Description

Cell array of strings defining the BlockType or MaskType property of blocks who's inputs shall all be of a numeric data type. By default only BlockTypes and MaskTypes of those blocks are listed that for backwards compatibility do not error out when connected to boolean signals and compiled or simulated.


cSysAprncPams

Type

Cell Array

Default

{ 'ScreenColor' 'white'
'ZoomFactor' '100' }

Description

Each line constitutes a name value pair of a subsystem specific appearance parameter. The default is made up from the MAAB 5.0 na_0004 example values, thus defining an individual set is not a deviation from the standard rule. Any custom set should cover at least the parameters given with the example, though, while the respective expected values might differ arbitrarily.


fBlkAprncFun

Type

Function handle taking in a block handle and retruning a descriptive string and a cell array of required appearance parameters:
[sBlkTypeDesc, cPams] = @(hBlk)

Default

The default function always returns the descriptive string 'Block Default' and the following name value pairs for foreground and background colour:
{ 'BackgroundColor' 'white'
'ForegroundColor' 'black' }

Description

By default, according to th MAAB 5.0 na_0004 example, the same fore- and background colours are defined for all blocks, and no other requirements apply for this rule. Defining an individual set is not a deviation from the standard rule. Any custom set should cover at least the parameters given with the example, though, while the respective expected values might differ arbitrarily. When defining a custom function returning additional parameter requirements take care not to collide with other (appearance) rules.


jExclLibs

Type

java.util.HashSet

Default

[simulink]

Description

The hashset must contain row-vectors of char only. Any links to blocks in libraries listed here are generally ignored in any check. This does not include properties of linking blocks themselves like name, position or colour.


jMlExts

Type

java.util.HashSet

Default

[.m, .p, .mdl, .slx, .<mexext>]

Replace <mexext> with the result of calling mexext function in your Matlab release.

Description

The hashset must contain row-vectors of char only. Any file with an extension matching one of these char vectors is considered a Matlab file. The char vector must always start on a dot or be empty (defines files without any extension).


jResWords

Type

java.util.HashSet

Default

By default the list contains the cell-elements returned by function iskeyword.

Description

The hashset must contain row-vectors of char only. Every element of the hashset represents a reserved word. Reserved words are not allowed to be used as names for several object types. Depending on the check context this list might be used as case-sensitive or case-insensitive.


jResWordsCpp

Type

java.util.HashSet

Default

By default the list contains the sum of reserved tokens defined by the C++20 language standard.

Description

The hashset must contain row-vectors of char only. Every element of the hashset represents a reserved word for the C/C++ programming language family. Reserved C/C++ words are not allowed to be used as names for several object types. Depending on the check context this list might be used as case-sensitive or case-insensitive.


jSlExts

Type

java.util.HashSet

Default

[.mdl, .slx]

Description

The hashset must contain row-vectors of char only. Any file with an extension matching one of these char vectors is considered a Simulink model file. The char vector must always start on a dot or be empty (defines files without any extension). The default value is just an example that should match with all other MAAB 5.0 rules. Providing a custom set of required parameters instead constitutes no deviation from the standard.


jStdBlkPams

Type

java.util.HashMap<java.lang.String, java.util.HashSet>>

Default

{
 Lookup=[InputValues, Table]
 , Lookup_n-D=[BreakpointsForDimensionX, Table]
 , Relay=[OnSwitchValue, OffSwitchValue]/>  , UnitDelay=[InitialCondition]
 , Saturate=[UpperLimit, LowerLimit]
 , Switch=[ThresholdX]
}

Description

The keys of this hash map are strings representing a block- or mask-type. The values are hash sets of strings where each string is the name of a parameter required to be displayed in the respective blocks annotation.

The following extra rules apply:


jStdBlks

Type

java.util.HashMap<java.lang.String, java.util.HashSet>>

Default

empty java.util.HashMap

Description

The keys of this hash map are strings representing a block-, chart- or mask-type. The values are hash sets of strings where each string is a legal standard base name for the respective type of block. Block names made up from the a associated standard base name and an optional numeric extension are considered generic and should not be displayed, while all other block names should.

A chart-type is the Statflow-class-name of a chart without the preceeding "Stateflow." like "Chart", "EMChart" or "TruthTableChart". A Simulink block containing such a chart usually has BlockType "Subsystem" and with more recent releases no MaskType at all. Therefore the chart-type is determined by the rule check to enable distinction of different types of Stateflow blocks, technically also including the Embedded Matlab block ("EMChart").

This parameter might be overruled by nStdBlksGenDfltNames


nBlkFontSize

Type

double

Default

10

Description

Required value for a block's font-size.


nLnsCrsHndl

Type

double/enum

Default

1

Description

Defines the handling of lines crossing each other.


nMaxBlockNameLen

Type

double

Default

63

Description

The allowed length limit (in characters) of a basic block name (excluding i/o port blocks).


nMaxDatNameLen

Type

double

Default

63

Description

The allowed length limit (in characters) of stateflow data names.


nMaxFolderNameLen

Type

double

Default

63

Description

The allowed length limit (in characters) of a folder name used in a Simulink based project.


nMaxMdlNameLen

Type

double

Default

63

Description

The allowed length limit (in characters) of a model's or library's name.


nMaxPamNameLen

Type

double

Default

63

Description

The allowed length limit (in characters) of a parameter name.


nMaxPortNameLen

Type

double

Default

63

Description

The allowed length limit (in characters) of a port block name.


nMaxSigNameLen

Type

double

Default

63

Description

The allowed length limit (in characters) of the name of a signal or bus.


nMaxSubsysNameLen

Type

double

Default

63

Description

The allowed length limit (in characters) of the name of a structural subsystem.


nProjDirLvlsUp

Type

double

Default

2

Description

If non-empty, used to determine the project root folder of a model based project. If parameter sProjDirRegExp yields a project root folder result, this parameter is unused. Otherwise it specifies the <nProjDirLvlsUp>'th ancestor folder of a model file's path as the model's project root, if such folder exists.


nSigFontSize

Type

double

Default

9

Description

Required value for a signal's font-size.


nStdBlksAutoHndl

Type

double/enum

Default

1

Description

Defines the handling of the auto-hide setting for block names (if present for the release used).


nStdBlksGenDfltNames

Type

double/enum

Default

1

Description

Defines how a list of standard blocks with associated standard base names is retrieved.


nSttFontSize

Type

double

Default

12

Description

Required value for a state's font-size.


nTrnFontSize

Type

double

Default

12

Description

Required value for a transition's font-size.


sBlkFontAngle

Type

char

Default

'normal'

Description

Required value for a block's font-angle.


sBlkFontType

Type

char

Default

'Helvetica'

Description

Required value for a block's font-type.


sBlkFontWeight

Type

char

Default

'normal'

Description

Required value for a block's font-weight.


sSigFontAngle

Type

char

Default

'normal'

Description

Required value for a signal line's font-angle.


sSigFontType

Type

char

Default

'Helvetica'

Description

Required value for a signal line's font-type.


sSigFontWeight

Type

char

Default

'normal'

Description

Required value for a signal line's font-weight.


sSttFontAngle

Type

char

Default

'NORMAL'

Description

Required value for a state's font-angle.


sSttFontType

Type

char

Default

'Helvetica'

Description

Required value for a state's font-type.


sSttFontWeight

Type

char

Default

'NORMAL'

Description

Required value for a state's font-weight.


sTrnFontAngle

Type

char

Default

'NORMAL'

Description

Required value for a transition's font-angle.


sTrnFontType

Type

char

Default

'Helvetica'

Description

Required value for a transition's font-type.


sTrnFontWeight

Type

char

Default

'NORMAL'

Description

Required value for a transition's font-weight.


sProjDirRegExp

Type

char

Default

''

Description

If non-empty, determines the project root folder of a model based project. Is expected to be a regular expression. The first ancestor folder of a model file's path, who's name contains a match to this expression, is considered the model's project root. If no such ancestor folder can be found, parameter nProjDirLvlsUp, if non-empty, serves as a fallback for the root folder search.