3/30/2024 0 Comments Uml sequence diagram if statemetI think some of the confusion of the previous posts is that LiteralString is NOT the guard condition that must evaluate as Boolean LiteralString is the SPECIFICATION of the guard condition. I don't think it's semantically very distant from OpaqueExpression with natural language. As you noted LiteralString works and actually seems to me that it is the default guard type assigned by Photon if you type it in at operand creation. If anyone can get message guard conditions to display on Photon sequence diagrams please share how you do it! Thanks! I can create them (I see them in Model Explorer) but they don't display on the diagrams. Still, I cannot show message guard conditions in your model or mine using Photon, no matter what kludge I try. Encouraged by this, I then discovered that on my model ( which was created with Oxygen and now I'm editing it in Photon), I can ONLY see the guard conditions in the sequence diagram if I delete the old operands and replace them with new ones! I tried may other ways but this seems to be the only one that works.ġ.1 So I suspect some backward compatibility issues between the Photon and Oxygen handling of guard conditionsĢ. Using your model I can confirm that we set up the operand guard conditions in the same way. Many thanks Carsten for uploading your test model! Great help!ġ. the string "at working hours" the interpretation as natural language UML::OpaqueExpression typed as UML::Boolean is quite clear to me, while the interpretation as UML::LiteralString is not. But a UML::LiteralString not being constrained i.e. That definition while being rather vague has the charm, that a natural language UML::OpaqueExpression typed as UML::Boolean is a candidate to be evaluated. That is the rationale why I used the definition But this definition has the issue a natural language UML::OpaqueExpression even typed as UML::Boolean - I also had in mind - does not evaluate either. Given that very definition your statement is absolutely correct. To evaluate means tp perform operations based on a mathmatical calculus on an expression based on a context-free grammar. I make a first approuch to define "to evaluate": But that very formulation you have chosen requires to define what "to evaluate" means. I also thought of your formulation before I wrote mine. Many, many thanks to confirm my statement by formulating an even more restrictive one. Inv: if subExpression->notEmpty() then operand->isEmpty() else operand->notEmpty() endifĪm I am the only one missing the point about guards? Having to define a collating sequence between operands and subexpressions). If a StringExpression has sub-expressions, it cannot have operands and vice versa (this avoids the problem of Inv: operand->forAll (oclIsKindOf (LiteralString)) Then subExpression->iterate(se stringValue: String = '' |Įlse operand->iterate(op stringValue: String = '' | ncat(op.stringValue()))Īll the operands of a StringExpression must be LiteralStrings Values of all the operands or subExpressions that are part of the StringExpression. The query stringValue() returns the String resulting from concatenating, in order, all the component String A StringExpression is an Expression that specifies a String value that is derived by concatenating a sequence of operands with String values or a sequence of subExpressions, some of which might be template parameters.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |