Home » Modeling » Papyrus » Question about SysML parameters and EMF(Errors and visual notation)
|
Re: Question about SysML parameters and EMF [message #1847268 is a reply to message #1847234] |
Thu, 21 October 2021 14:12 |
|
Hi Rod,
yeah, Papyrus is more catholic than the pope, while Cameo is much more permissive.
Papyrus checks (almost) every rule defined in SysML and UML, the base of SysML.
For example according to the UML specification a activity parameter node shall have exactly one parameter. Papyrus checks this rule, Cameo does not.
I attached a tiny activity model that validates without issues.
I did it with Papyrus 5.2 with the SysML 1.6 add-on.
Maybe it fits as a reference / template.
/Carsten
EDIT:typo
-
Attachment: ActDemo.zip
(Size: 5.22KB, Downloaded 88 times)
[Updated on: Thu, 21 October 2021 14:37] Report message to a moderator
|
|
| | | |
Re: Question about SysML parameters and EMF [message #1847283 is a reply to message #1847280] |
Thu, 21 October 2021 17:02 |
|
The behavior of Papyrus IMHO complies completely with the UML 2.5.1 specification.
Just to cite the UML spec
7.8.12 PackageableElement [Abstract Class]
7.8.12.1 Description
A PackageableElement is a NamedElement that may be owned directly by a Package. A PackageableElement is also able to serve as the parameteredElement of a TemplateParameter.
7.8.12.2 Diagrams
Namespaces, Types, Constraints, Dependencies, Literals, Time, Components, Packages, Information Flows, Deployments, Artifacts, Events, Instances, Generalization Sets
7.8.12.3 Generalizations
ParameterableElement, NamedElement
7.8.12.4 Specializations
Constraint, Dependency, Type, Event, Observation, ValueSpecification, Package, InformationFlow,
GeneralizationSet, InstanceSpecification
7.8.12.5 Attributes
visibility : VisibilityKind [0..1] = public
A PackageableElement must have a visibility specified if it is owned by a Namespace. The default visibility is public.
7.8.12.6 Constraints
namespace_needs_visibility
A PackageableElement owned by a Namespace must have a visibility.
inv: visibility = null implies namespace = null
...
7.8.24 VisibilityKind [Enumeration]
7.8.24.1 Description
VisibilityKind is an enumeration type that defines literals to determine the visibility of Elements in a model.
7.8.24.2 Diagrams
Namespaces
7.8.24.3 Literals
* public
A Named Element with public visibility is visible to all elements that can access the contents of the Namespace that owns it.
* private
A NamedElement with private visibility is only visible inside the Namespace that owns it.
* protected
A NamedElement with protected visibility is visible to Elements that have a generalization relationship to the Namespace that owns it.
* package
A NamedElement with package visibility is visible to all Elements within the nearest enclosing Package (given
that other owning Elements have proper visibility). Outside the nearest enclosing Package, a NamedElement marked as having package visibility is not visible. Only NamedElements that are not owned by Packages can be marked as having package visibility.
|
|
|
Re: Question about SysML parameters and EMF [message #1847304 is a reply to message #1847283] |
Fri, 22 October 2021 09:46 |
|
Hi,
the original issue is not related to UML validation rules, but to the use (by default) of an xtext editor for parameters. This editor allows the user to enter name and type with a single text. But the xtext grammar does not handle spaces in the parameter name (which could be considered as a bug). This editor stores the user input in an invalid text string, if it considers it erroneously., As a workaround, go to the Preferences, then type "Embedded editors" and change the editor type for Parameters from "Advanced" to "Simple Direct Editor".
Ansgar
|
|
| | |
Re: Question about SysML parameters and EMF [message #1847324 is a reply to message #1847315] |
Fri, 22 October 2021 15:19 |
|
Hi Rod,
to point 1:
I am quite sure you clicked the visibility field in the three cases visibility is explicitly set and have not clicked it in the other two cases. Papyrus works deterministic in that regard.
to point 2:
Papyrus simply behaves like that because according to 7.8.12.5 "public" is the default.
/Carsten
|
|
| |
Goto Forum:
Current Time: Fri Apr 26 10:25:13 GMT 2024
Powered by FUDForum. Page generated in 0.04485 seconds
|