![]() |
OTX Reference
|
|
Comprehensive checker rule listing More...
Classes | |
| class | Severity |
| Severity of the checker rule. More... | |
Public Attributes | |
| Severity.Warning | Core_Chk001 |
| Document name matches file name More... | |
| Severity.Critical | Core_Chk002 |
| Package-wide uniqueness of document names More... | |
| Severity.Critical | Core_Chk003 |
| No dead import links More... | |
| Severity.Warning | Core_Chk004 |
| No unused imports More... | |
| Severity.Critical | Core_Chk005 |
| No use of undefined import prefixes More... | |
| Severity.Warning | Core_Chk006 |
| Match of imported document's data model version More... | |
| Severity.Warning | Core_Chk007 |
| Have specification if no realisation exists More... | |
| Severity.Critical | Core_Chk008 |
| Public main procedure More... | |
| Severity.Critical | Core_Chk009 |
| Mandatory constant initialisation More... | |
| Severity.Warning | Core_Chk010 |
| Unique node names More... | |
| Severity.Warning | Core_Chk011 |
| No disabled nodes More... | |
| Severity.Warning | Core_Chk012 |
| No unreachable realisations in Action and Group nodes More... | |
| Severity.Critical | Core_Chk013 |
| Correct referencing of validities More... | |
| Severity.Critical | Core_Chk014 |
| Correct locator variable type in for-each-loop More... | |
| Severity.Critical | Core_Chk015 |
| Correct nesting of Parallel nodes More... | |
| Severity.Warning | Core_Chk016 |
| No redundant exception catches More... | |
| Severity.Warning | Core_Chk017 |
| Checked exceptions (1) More... | |
| Severity.Warning | Core_Chk018 |
| Checked exceptions (2) More... | |
| Severity.Critical | Core_Chk019 |
| Type-safe exception catches More... | |
| Severity.Critical | Core_Chk020 |
| Correct nesting of Continue node More... | |
| Severity.Critical | Core_Chk021 |
| Correct nesting of Break node More... | |
| Severity.Critical | Core_Chk022 |
| Correct nesting of TerminateLanes node More... | |
| Severity.Critical | Core_Chk023 |
| Type-safe assignments More... | |
| Severity.Critical | Core_Chk024 |
| Correct target for ProcedureCall More... | |
| Severity.Warning | Core_Chk025 |
| Procedure signature has at least one implementing procedure More... | |
| Severity.Warning | Core_Chk026 |
| No duplicate validities for procedures implementing the same signature More... | |
| Severity.Critical | Core_Chk027 |
| Procedure parameters match signature parameters More... | |
| Severity.Warning | Core_Chk028 |
| No Operation (NOP) ProcedureCall More... | |
| Severity.Critical | Core_Chk029 |
| Correct ProcedureCall arguments More... | |
| Severity.Critical | Core_Chk030 |
| Input- and in&output-argument omission More... | |
| Severity.Critical | Core_Chk031 |
| Type-safe ListConcatenate More... | |
| Severity.Critical | Core_Chk032 |
| Type-safe ListAppendItems More... | |
| Severity.Critical | Core_Chk033 |
| Type-safe ListInsertItems More... | |
| Severity.Warning | Core_Chk034 |
| No use of init in list item type definition More... | |
| Severity.Critical | Core_Chk035 |
| ListLiteral item type matches list declaration item type More... | |
| Severity.Critical | Core_Chk036 |
| ListLiteral and ListCreate item types follow item type definition More... | |
| Severity.Critical | Core_Chk037 |
| ListLiteral items are literal terms More... | |
| Severity.Critical | Core_Chk038 |
| Type-safe MapPutItems More... | |
| Severity.Critical | Core_Chk039 |
| Type-safe MapRemoveItems More... | |
| Severity.Critical | Core_Chk040 |
| Type-safe MapContainsKey More... | |
| Severity.Critical | Core_Chk041 |
| Type-safe MapContainsValue More... | |
| Severity.Critical | Core_Chk042 |
| Type-safe MapUnion More... | |
| Severity.Critical | Core_Chk043 |
| Unique keys in MapLiteral More... | |
| Severity.Warning | Core_Chk044 |
| No use of init in map key type definition More... | |
| Severity.Warning | Core_Chk045 |
| No use of init in map value type definition More... | |
| Severity.Warning | Core_Chk046 |
| MapLiteral key&value types match map declaration key&value types More... | |
| Severity.Critical | Core_Chk047 |
| MapLiteral and MapCreate key/value types follow key/value type definition More... | |
| Severity.Critical | Core_Chk048 |
| MapLiteral items are literal terms More... | |
| Severity.Critical | Core_Chk049 |
| Uniform relation operand type More... | |
| Severity.Critical | Core_Chk050 |
| Type-safe variable and constant usage More... | |
| Severity.Critical | Core_Chk051 |
| Immutability of constants, input parameters and context variables More... | |
| Severity.Warning | Core_Chk052 |
| Identifier shadowing More... | |
| Severity.Critical | Core_Chk053 |
| No dangling OtxLink associations More... | |
| Severity.Warning | Core_Chk054 |
| Unused declarations More... | |
| Severity.Critical | Core_Chk055 |
| Unreachable nodes More... | |
| Severity.Critical | Core_Chk056 |
| No modification of collection inside foreach-loops More... | |
| Severity.Warning | Core_Chk057 |
| No use of init in catch header exception type definition More... | |
| Severity.Critical | Core_Chk058 |
| Unique OtxIds More... | |
| Severity.Critical | Core_Chk059 |
| Type-safe ListContainsValue More... | |
| Severity.Deprecation | Core_Chk060 |
| Usage of deprecated elements More... | |
| Severity.Information | Core_Chk061 |
| Usage of util:Compare instead of IsEqual and IsNotEqual More... | |
| Severity.Information | Core_Chk062 |
| Usage of string:Decode instead of ToString for ByteFields More... | |
| Severity.Critical | Core_Chk063 |
| Locator or Value in for-each-loop More... | |
| Severity.Critical | Core_Chk064 |
| Correct value variable type in for-each-loop More... | |
| Severity.Critical | Core_Chk065 |
| No reading of state variables across documents More... | |
| Severity.Critical | Core_Chk066 |
| Correct referencing of MutexLocks More... | |
| Severity.Warning | Core_Chk067 |
| Procedure is visible from the implementing signature More... | |
Comprehensive checker rule listing
To ensure OTX document quality and correctness, the OTX checker uses a two-stage approach:
The checker rules for the second stage are listed in the following.
| Severity.Warning OpenTestSystem.Otx.Core.CheckerRule.Core_Chk001 |
Document name matches file name
<otx> root element should match the filename of the containing file (without the extension ".otx"). | Severity.Critical OpenTestSystem.Otx.Core.CheckerRule.Core_Chk002 |
Package-wide uniqueness of document names
<otx> attribute name must be unique within the scope of all OTX documents belonging to the same package. | Severity.Critical OpenTestSystem.Otx.Core.CheckerRule.Core_Chk003 |
No dead import links
<import> elements) should exist and should be accessible. | Severity.Warning OpenTestSystem.Otx.Core.CheckerRule.Core_Chk004 |
No unused imports
| Severity.Critical OpenTestSystem.Otx.Core.CheckerRule.Core_Chk005 |
No use of undefined import prefixes
OtxLink type attribute, the corresponding prefix definition has to exist in an <import> element. | Severity.Warning OpenTestSystem.Otx.Core.CheckerRule.Core_Chk006 |
Match of imported document's data model version
<import> element) shall be bound to the same data model version as the importing document. For this, the OTX XSD namespaces claimed by the <otx> root elements of both documents (attribute xmlns="http://iso.org/OTX/<version>") shall be identical. | Severity.Warning OpenTestSystem.Otx.Core.CheckerRule.Core_Chk007 |
Have specification if no realisation exists
<realisation> given, the according <specification> element should exist and have content (no empty string). | Severity.Critical OpenTestSystem.Otx.Core.CheckerRule.Core_Chk008 |
Public main procedure
<procedure> attribute visibility shall always be "PUBLIC" if the procedure name is "main". | Severity.Critical OpenTestSystem.Otx.Core.CheckerRule.Core_Chk009 |
Mandatory constant initialisation
| Severity.Warning OpenTestSystem.Otx.Core.CheckerRule.Core_Chk010 |
Unique node names
name attribute should be unique among all nodes in a procedure. | Severity.Warning OpenTestSystem.Otx.Core.CheckerRule.Core_Chk011 |
No disabled nodes
disabled attribute in Node types). | Severity.Warning OpenTestSystem.Otx.Core.CheckerRule.Core_Chk012 |
No unreachable realisations in Action and Group nodes
Action or Group node, the values of the validFor attributes of all <realisation> elements should be distinct. Also, after a <realisation> without validFor attribute, no further <realisation> elements should exist. | Severity.Critical OpenTestSystem.Otx.Core.CheckerRule.Core_Chk013 |
Correct referencing of validities
validFor attribute (in types Procedure, ActionRealisation, GroupRealisation) and the validity attribute (IsValid term) shall refer to a visible validity term, Boolean context variable or global Boolean constant only. | Severity.Critical OpenTestSystem.Otx.Core.CheckerRule.Core_Chk014 |
Correct locator variable type in for-each-loop
ListTerm, then the data type shall be Integer. If the collection is a MapTerm, the data type needs to match the key data type (Countable) of the map produced by the term. MapTerm, the leaves of the term have to be analyzed. Possible leaves are MapValue, MapLiteral or MapCreate. | Severity.Critical OpenTestSystem.Otx.Core.CheckerRule.Core_Chk015 |
Correct nesting of Parallel nodes
Parallel nodes shall not contain other Parallel nodes. (In XML wording: A <parallel> element shall not be the descendant of another <parallel> element). | Severity.Warning OpenTestSystem.Otx.Core.CheckerRule.Core_Chk016 |
No redundant exception catches
<handler>, only one <catch> flow for one exception type should exist. | Severity.Warning OpenTestSystem.Otx.Core.CheckerRule.Core_Chk017 |
Checked exceptions (1)
<throws> declaration. UserException and its base type Exception. These may be thrown when calling a procedure which defines UserException or Exception in its throws-attribute, or by a Throw node. In these places (ProcedureCall action or Throw node), the checker should provide a warning message, if not listed in throws. When this check fails, the author probably implemented an incomplete exception handling. The procedure might work nonetheless. | Severity.Warning OpenTestSystem.Otx.Core.CheckerRule.Core_Chk018 |
Checked exceptions (2)
Handler providing a <catch> applicable to that exception type, but only if the procedure does not already declare that explicit exception type in its throws-attribute (see Core_Chk017). UserException and its base type Exception. These may be thrown when calling a procedure which defines UserException or Exception in its throws-attribute, or by a Throw node. In these places (ProcedureCall action or Throw node), the checker should provide a warning message, if not handled. When this check fails, the author probably implemented an incomplete exception handling. The procedure might work nonetheless. | Severity.Critical OpenTestSystem.Otx.Core.CheckerRule.Core_Chk019 |
Type-safe exception catches
CatchHeader of a <catch> block, the data type of the to-be-caught exception (given by the <type> element) shall match or is a subtype of the type of the handle variable (given by the <handle> element). | Severity.Critical OpenTestSystem.Otx.Core.CheckerRule.Core_Chk020 |
Correct nesting of Continue node
Continue node has to be nested inside of the targeted Loop (In XML wording: the <continue> element has to be a descendant of the targeted <loop> element). In the special case that a Continue node is nested inside of a Parallel node, the targeted Loop node has to be nested inside of the same Parallel node, too. | Severity.Critical OpenTestSystem.Otx.Core.CheckerRule.Core_Chk021 |
Correct nesting of Break node
Break node has to be nested inside of the targeted Loop (In XML wording: the <break> element has to be a descendant of the targeted <loop> element). In the special case that a Break node is nested inside of a Parallel node, the targeted Loop node has to be nested inside of the same Parallel node, too. | Severity.Critical OpenTestSystem.Otx.Core.CheckerRule.Core_Chk022 |
Correct nesting of TerminateLanes node
TerminateLanes node has to be nested inside of a Parallel node (In XML wording: the <terminateLanes> element has to be a descendant of a <parallel> element). | Severity.Critical OpenTestSystem.Otx.Core.CheckerRule.Core_Chk023 |
Type-safe assignments
Assignment action, the data type of the variable (identified by the <result> element) shall correspond to the data type of the value (given by <term>). Automatic type promotion has to be taken into account which allows assigning an Integer to a Float without explicit cast. StringTerm value cannot be assigned to an Integer variable. "Hallo world", " "); is valid "1 2", " "); is invalid | Severity.Critical OpenTestSystem.Otx.Core.CheckerRule.Core_Chk024 |
Correct target for ProcedureCall
ProcedureCall action's procedure attribute shall refer to a Procedure, a Signature without realisation or a Signature with ProcedureSignature realisation. No other SignatureRealisation type but the ProcedureSignature type shall be allowed. ProcedureCall misleadingly calls e.g. an HMI ScreenSignature which has a totally different purpose. | Severity.Warning OpenTestSystem.Otx.Core.CheckerRule.Core_Chk025 |
Procedure signature has at least one implementing procedure
ProcedureCall action at least one implementing procedure should exist which is visible relative to the signature. | Severity.Warning OpenTestSystem.Otx.Core.CheckerRule.Core_Chk026 |
No duplicate validities for procedures implementing the same signature
| Severity.Critical OpenTestSystem.Otx.Core.CheckerRule.Core_Chk027 |
Procedure parameters match signature parameters
realisation.For each parameter, name and datatype will match exactly.If a signature parameter has an explicit init value, the corresponding procedure parameter will provide one also. realisation, this rule is irrelevant because a call to such a signature is a NOP at runtime. | Severity.Warning OpenTestSystem.Otx.Core.CheckerRule.Core_Chk028 |
No Operation (NOP) ProcedureCall
realisation. realisation, the call is a NOP at runtime. In general, calling such a procedure is an indication for a possible programming error.On the other hand, it might also be intended by the author. Therefore, the author should be warned when doing so. | Severity.Critical OpenTestSystem.Otx.Core.CheckerRule.Core_Chk029 |
Correct ProcedureCall arguments
realisation.This concerns parameter names as well as data types. realisation the call is a NOP. In this case it is pointless to match arguments to parameters because parameters are not described yet(specification stage). | Severity.Critical OpenTestSystem.Otx.Core.CheckerRule.Core_Chk030 |
Input- and in&output-argument omission
| Severity.Critical OpenTestSystem.Otx.Core.CheckerRule.Core_Chk031 |
Type-safe ListConcatenate
otherList elements) will have identical data type structures as declared for the modified list(given by the list element). | Severity.Critical OpenTestSystem.Otx.Core.CheckerRule.Core_Chk032 |
Type-safe ListAppendItems
item elements) will have an identical data type structure as declared for the items of the modified list(referenced by the list element). | Severity.Critical OpenTestSystem.Otx.Core.CheckerRule.Core_Chk033 |
Type-safe ListInsertItems
item elements) will have an identical data type structure as declared for the items of the modified list(referenced by the list element). | Severity.Warning OpenTestSystem.Otx.Core.CheckerRule.Core_Chk034 |
No use of init in list item type definition
itemType may, according to the OTX schema, have an init sub element. In its use solely for defining the item type in a List declaration, the init element should not occur here. | Severity.Critical OpenTestSystem.Otx.Core.CheckerRule.Core_Chk035 |
ListLiteral item type matches list declaration item type
itemType of the ListLiteral described by the init element of a List declaration must match to the itemType definition of the declaration. | Severity.Critical OpenTestSystem.Otx.Core.CheckerRule.Core_Chk036 |
ListLiteral and ListCreate item types follow item type definition
items element must match exactly to the type defined by the itemType element. | Severity.Critical OpenTestSystem.Otx.Core.CheckerRule.Core_Chk037 |
ListLiteral items are literal terms
item elements in a ListLiteral may, according to the OTX schema, be of any Term type, not only literal terms.In its use solely for describing literal items of a list, no other term types but literal terms are allowed here. | Severity.Critical OpenTestSystem.Otx.Core.CheckerRule.Core_Chk038 |
Type-safe MapPutItems
item elements) will have an identical data type structure as declared for the items of the modified map(referenced by the map element). This applies in terms of key and value data type declarations. | Severity.Critical OpenTestSystem.Otx.Core.CheckerRule.Core_Chk039 |
Type-safe MapRemoveItems
key elements will have an identical data type structure as declared for the items of the target map.They must be of Countable type. | Severity.Critical OpenTestSystem.Otx.Core.CheckerRule.Core_Chk040 |
Type-safe MapContainsKey
key must match the key type of map. | Severity.Critical OpenTestSystem.Otx.Core.CheckerRule.Core_Chk041 |
Type-safe MapContainsValue
value must match the value type of map. | Severity.Critical OpenTestSystem.Otx.Core.CheckerRule.Core_Chk042 |
Type-safe MapUnion
otherMap elements) will have an identical data type structure as declared for the modified map(given by the map element). This applies in terms of key and value data type declarations. | Severity.Critical OpenTestSystem.Otx.Core.CheckerRule.Core_Chk043 |
Unique keys in MapLiteral
| Severity.Warning OpenTestSystem.Otx.Core.CheckerRule.Core_Chk044 |
No use of init in map key type definition
keyType may, according to the OTX schema, have an init sub element. In its use solely for defining the key type in a Map declaration, the init element should not occur here. | Severity.Warning OpenTestSystem.Otx.Core.CheckerRule.Core_Chk045 |
No use of init in map value type definition
valueType may, according to the OTX schema, have an init sub element. In its use solely for defining the value type in a Map declaration, the init element should not occur here. | Severity.Warning OpenTestSystem.Otx.Core.CheckerRule.Core_Chk046 |
MapLiteral key&value types match map declaration key&value types
keyType and valueType of the MapLiteral described by the init element of a Map declaration must match to the keyType and the valueType definition of the declaration. | Severity.Critical OpenTestSystem.Otx.Core.CheckerRule.Core_Chk047 |
MapLiteral and MapCreate key/value types follow key/value type definition
keyType and the valueType element. | Severity.Critical OpenTestSystem.Otx.Core.CheckerRule.Core_Chk048 |
MapLiteral items are literal terms
key and value elements of items in a MapLiteral may, according to the OTX schema, be of any SimpleTerm / Term type, not only literal terms.In its use solely for describing literal items of a list, no other term types but literal terms are allowed here. | Severity.Critical OpenTestSystem.Otx.Core.CheckerRule.Core_Chk049 |
Uniform relation operand type
| Severity.Critical OpenTestSystem.Otx.Core.CheckerRule.Core_Chk050 |
Type-safe variable and constant usage
| Severity.Critical OpenTestSystem.Otx.Core.CheckerRule.Core_Chk051 |
Immutability of constants, input parameters and context variables
result element will never refer to a constant or an input parameter. | Severity.Warning OpenTestSystem.Otx.Core.CheckerRule.Core_Chk052 |
Identifier shadowing
| Severity.Critical OpenTestSystem.Otx.Core.CheckerRule.Core_Chk053 |
No dangling OtxLink associations
OtxLink type attribute shall exist and shall be accessible. Furthermore, if the target has a visibility attribute (see signatures and procedures), the visibility information has to be taken into account: An OtxLink attribute shall never link to a target which is not visible to the source document.Furthermore, OtxLink type attributes shall point to the correct target category. In detail, this means that
validFor attributes and the validity attribute (occurring in types Procedure, ActionRealisation, GroupRealisation and the IsValid term), a visible Validity term, Boolean context variable or global Boolean constant with corresponding package and name shall exist, procedure attribute (occurring in type ProcedureCall), a visible Signature or Procedure with corresponding package and name shall exist, implements attribute (occurring in type Procedure), a visible ProcedureSignature or unrealised Signature with corresponding package and name shall exist and that name attributes and the valueOf attributes (occurring in the Variable types and the dereferencing terms), a local Declaration or a visible global Declaration with corresponding package and name shall exist. mutexLock attribute (occurring in the MutexFlow type), a local Declaration or a visible global Declaration with corresponding package and name shall exist. OtxLink which implicitly provides their package, document name and entity name. This rule is closely connected to rule Core_Chk003 – no dead import links. | Severity.Warning OpenTestSystem.Otx.Core.CheckerRule.Core_Chk054 |
Unused declarations
| Severity.Critical OpenTestSystem.Otx.Core.CheckerRule.Core_Chk055 |
Unreachable nodes
"no nodes after an endnode" imposed by the OTX Schema works only on the toplevel of a local flow. When all embedded flows in an outer flow end with an endnode, XSD validation cannot identify this. This rule will ensure that all nodes are reachable. | Severity.Critical OpenTestSystem.Otx.Core.CheckerRule.Core_Chk056 |
No modification of collection inside foreach-loops
list property of a ListModifier action or in the map property of a MapModifier action, or for occurrences of the identifier as an l-value(cf.Variable type). This rule cannot fully prevent ConcurrentModificationExceptions to happen because the modification might happen outside of the loop, e.g. in a Parallel lane. | Severity.Warning OpenTestSystem.Otx.Core.CheckerRule.Core_Chk057 |
No use of init in catch header exception type definition
type in CatchRealisation may, according to the OTX schema, have an init sub element(if the to-be-caught exception type is set to UserException). Since the type element's use in a catch block is solely for defining the to-be-caught exception type, the init element should not occur here. | Severity.Critical OpenTestSystem.Otx.Core.CheckerRule.Core_Chk058 |
Unique OtxIds
"UniqueIds" key constraint. | Severity.Critical OpenTestSystem.Otx.Core.CheckerRule.Core_Chk059 |
Type-safe ListContainsValue
value must match the value type of list. | Severity.Deprecation OpenTestSystem.Otx.Core.CheckerRule.Core_Chk060 |
Usage of deprecated elements
| Severity.Information OpenTestSystem.Otx.Core.CheckerRule.Core_Chk061 |
Usage of util:Compare instead of IsEqual and IsNotEqual
IsEqual or IsNotEqual is called with a complex data type for which util:Compare would perform comparison by value, e.g. List, Map, ByteField or dataType:Structure. List, Map and ByteField, util:Compare may be more suitable than IsEqual. IsEqual checks for complex terms only the reference and not the content. | Severity.Information OpenTestSystem.Otx.Core.CheckerRule.Core_Chk062 |
Usage of string:Decode instead of ToString for ByteFields
ToString is called on a ByteField. ByteField, string:Decode should be used with Encoding HEX. | Severity.Critical OpenTestSystem.Otx.Core.CheckerRule.Core_Chk063 |
Locator or Value in for-each-loop
locator and value are optional. However, at least one shall be set; it is illegal to omit both locator and value. | Severity.Critical OpenTestSystem.Otx.Core.CheckerRule.Core_Chk064 |
Correct value variable type in for-each-loop
ListTerm, then the data type needs to match the item data type of the list produced by the term. If the collection is a MapTerm, the data type needs to match the value data type of the map produced by the term. ListTerm or MapTerm, the leaves of the term shall be analysed. Possible leaves are ListValue, ListLiteral or MapCreate. | Severity.Critical OpenTestSystem.Otx.Core.CheckerRule.Core_Chk065 |
No reading of state variables across documents
| Severity.Critical OpenTestSystem.Otx.Core.CheckerRule.Core_Chk066 |
Correct referencing of MutexLocks
MutexFlow) shall refer to a MutexLock declaration. | Severity.Warning OpenTestSystem.Otx.Core.CheckerRule.Core_Chk067 |
Procedure is visible from the implementing signature