SysML_Validation/SysMLModel [ Context ]
[ Top ] [ SysML_Validation ] [ Context ]
SUMMARY
Validate the SysML Model elements ($Rev: 479 $)
DESCRIPTION
- The model must contain one package named "LogicalSolution"
- The model should contain one package named "Requirements"
- The model must contain a root block, i.e. a block with no parent
SEE ALSO
- Block
DOMAIN
SysMLModel/HasLogicalRequirementPackage [ critique ]
[ Top ] [ SysMLModel ] [ critique ]
SUMMARY
Verify that the SysML model has one "Requirements" package
SPECIFICATION
self.packagedElement->select(p : sysmlModel!Package | p.name = "Requirements").size() > 1;
SOURCE
critique HasLogicalRequirementPackage { check { // Packaged saved to a variable to produce verbose message var LSPack = self.packagedElement.select(p : sysmlModel!Package | p.name = "Requirements"); return LSPack.size() = 1; } message { var prefix : String; if(LSPack.size() = 0) { prefix = "No package named Requirments"; } else { prefix = "More than one package named Requirements"; } return prefix + " found in model " + self.name; } }
SysMLModel/HasLogicalSolutionPackage [ Constraint ]
[ Top ] [ SysMLModel ] [ Constraint ]
SUMMARY
Verify that the SysML model has one "Logical Solution" package
SPECIFICATION
self.packagedElement->select(p : sysmlModel!Package | p.name = "LogicalSolution").size() > 1;
SOURCE
constraint HasLogicalSolutionPackage { check { // Packaged saved to a variable to produce verbose message var LSPack = self.packagedElement.select(p : sysmlModel!Package | p.name = "LogicalSolution"); return LSPack.size() = 1; } message { var prefix : String; if(LSPack.size() = 0) { prefix = "No package named LogicalSolution"; } else { prefix = "More than one package named LogicalSolution"; } return prefix + " found in model " + self.name; } }