Child pages
  • XOR vs. CHOICE Modelling
Skip to end of metadata
Go to start of metadata

Problem Statement:

XOR and also the already deprecated CHOICE stereotype do not allow to model allreuired situations that can occur in a model

2023-02-17 IISOMI Meeting notes

Question from Andrea:

Is the {xor} Constraint managed by the uml2yang tool – i.e. translated into a choice statement as specified in Draft_TR-531_UML-YANG_Mapping_Gdls_v1.1.03.docx, paragraph 6.3?

By the way, I fail to create a similar constraint in Papyrus, “xor” keyword is refused…

Resolution: From the constraints UML page, click the green plus sign on the Specification.  Add a LiteralString with 'xor' in Value.

The translation to yang is manual.  The xmi2yang tool does not have the functionality to automatically create the choice.


2023-02-24 IISOMI Meeting Minutes

  • Bernd noted that choice is deprecated.
  • Andrea noted that a constraint could be composed as a list of connection and node.
  • Nigel note that a simple solution could be simply to provide a list of elements where each element could be a structure with optional parameters, one for node and one for connection. We could then cater for more sophisticated structures where the element in the list provides an alternative link and connection. Then of course there may be even deeper semantics where there are preferences at particular places etc., e.g., one of this list of nodes with this one preferred or one of this list of connections etc. Adding metadata and rules within the structure content may be more appropriate.
  • Andrea agreed that it may indeed be more appropriate to provide a simple list of optional parameters.
  • Nigel noted that there may be a very sophisticated and complex requirement for alternatives and options that would appear to need a more sophisticated structure.
  • Bernd noted that we need an action to gather requirements.

2023-03-10 IISOMI Meeting Minutes

  • Nigel Davis  Sketch basis for requirements for more sophisticated structures to be used in routing constraints and elsewhere.

Andrea presented slides on node rule group that deal with rules for forwarding in a node.

Andrea noted that the contention may be across the whole device and Nigel added that it may be a subset of the devices ports.

It was recognised that there are many complex rule scenarios.




Discussed fixed connection rules.

This illustrated the need for a more complex rule mechanism that than provided by simple XOR or CHOICE. 

Andrea provided a overview of the purpose.

In an IETF context the connectivity matrix is for the same purpose.

2023-05-26 IISOMI Meeting Minutes

XOR in UML means: One and only one of the alternatives need to be used.
Choice in YANG allows also to have non of the alternatives if optional.

YANG does also allow to define a kind of "xor" using containers with when statements that are mutually exclusive.
This could be defined in UML using conditional relationships with mutually exclusive conditions; i.e., without using the xor-constraint in UML.

2023-07-14 IISOMI Meeting Minutes

2023-07-21 IISOMI Meeting Minutes

Insufficient time to cover, so action moved out.

  • Nigel Davis  Sketch basis for requirements for more sophisticated structures to be used in routing constraints and elsewhere (occurrences).

  • No labels