Hi,
I want to verify that the «datastore» element is what I need. If not then, then what? And if yes, then I want to verify I am using it correctly.
In the activity diagram below, I tried to describe what I mean, using «datastore» as I currently understand it. The diagram describes a sequence of algorithms, each algorithm working on the same data structures (which were originally input into the activity). Step n does not copy its output data set to Step n+1. The data set is kept as common data during the activity execution. Step 1 finishes and updates the data set, and then Step 2 starts processing the data set updated by Step 2, and so on. So I need some sort of data storage to act as a sort of “accumulator” of the latest values after each step.
On completion of all processing, the activity copies the data storage content to the output parameter.
The data storage exists only during the activity.
So … questions:
1: Is the UML datastore element the correct element to use for
this?
If not then, then what?
2: Assuming datastore is the appropriate element, have I used it correctly?
Thanks
Avi
<Demo Activity.png>
Thanks
Avi
--
--
You received this message because you are subscribed to the Google
Groups "SysML Forum" group.
Public website: http://www.SysMLforum.com
To post to this group, send email to sysml...@googlegroups.com
To unsubscribe from this group, send email to
sysmlforum+...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/sysmlforum?hl=en_US?hl=en
---
You received this message because you are subscribed to the Google Groups "SysML Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sysmlforum+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/sysmlforum/295f6cac-a509-455b-a12e-25b6ef98ac32n%40googlegroups.com.
<Demo Activity.png>
Thank you, James and Wolfgang, for your responses.
Response to James:
(1)
>> Each action can read the list, perform its calculation and append a new value to the end of the list
Btw, the activity’s function is not to add values to the list. It is not key that the data structure is a list, or some other structure. Each process step of the activity updates the same structure, which I showed as a side data store, and I was asking whether the <<datastore>> element is appropriate for this purpose.
Since it seems I was not clear enough, I changed my example diagram slightly – below at end of post. Changes in blue text.
(2)
>> Block … and pass it from action n to action n+1
I should clarify: my activity diagram is not for a general sketch or requirements analysis. Rather, my diagram is part of a large-scale reverse-engineering effort to document how my company’s system is structured and how it really works, at least at the top levels.
In this particular activity, the activity specifically does not copy the structure from to action to action (action n to action n+1), .i.e., it does not physically copy the output structure of action n to the input parameter of action n+1.
Question: However, maybe you mean you are letting me know that, nevertheless, it is system engineering custom to show things as if the data is copied and passed directly from action to action (and I can do without the datastore)? (Assertion (A))
(3) Safety analysis:
My company’s product is mission critical, and thus ongoing formal and comprehensive safety analysis is a major obligation and effort. The safety teams need to know the exact paths of data. So even if your assertion (A) above, is true, would you still say that it is true given that my model provides the input diagrams to perform safety analyses?
(4) Safety analysis of flows that include specific hardware storage:
Further: At time of writing my original question, I had in mind a specific high-level process entirely in software.
On the other hand: At meetings about the top-most system level (from a structural POV, including also hardware), we presented major data flow arteries as flowing directly from module to module – similar to what you write: “pass it from action n to action n+1.
However, a worker pointed out that that is good only as a simplification i.e., as a virtual flow. But from a safety-analysis POV, the design diagrams must eventually address the fact that some data flows do not physically pass directly from module to module, but rather via specific hardware intermediate data storage components. And the need to exactly show these physical flows is in order that the safety teams can perform complete and correct safety analyses of the data flows to provide proof of safety.
So in such cases (the need to show a complete data flow via specific hardware storage for safety analysis), would you agree I should show these storage components as explicit data stores (where in UML this is the <<datastore>> element)?
Again, thank you for your response and looking forward to your further comments on this.
Simplfied example diagram:
Avi
Hi,
<Demo Activity num2.png>
Avi
--
--
You received this message because you are subscribed to the Google
Groups "SysML Forum" group.
Public website: http://www.SysMLforum.com
To post to this group, send email to sysml...@googlegroups.com
To unsubscribe from this group, send email to
sysmlforum+...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/sysmlforum?hl=en_US?hl=en
---
You received this message because you are subscribed to the Google Groups "SysML Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sysmlforum+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/sysmlforum/2352a7b5-bdc7-420b-968b-6bc6262fd510n%40googlegroups.com.
<Demo Activity num2.png>
Hi James,
Thank you so much for the time and effort you are giving.
I only now noticed I was just pushing and pulling the same item all the time. I should be pushing new values each time into the same object. I updated the diagram according to your comments, and as best as i could. Updated diagram is at end of this post.
My apologies you are having to debug my logic, and not just the UML meaning/syntax. Further, my mistake detracts from the real question I asked and from your answers. As mentioned, I updated the diagram, and I respond and answer your other points and questions, as follows beloow. (My responses below are in blue.)
>> I note this has two steps which are presumably described in a sub-Activity diagram?)
Correct.
>> “is the object pushed back to the DataStore the same one that was previously pulled?”
As above, it was a mistake. I should be pushing a new value each time into the same object.
<< “pass by reference” doesn’t work in SysML activity semantics.
Ok - this is a very important basic concept you have just taught. I am just starting out in modeling with activity diagrams and you have just saved from ongoing mistakes.
>> a pointer in software you have to ‘de-reference’ it
Here you have given me something to think about… Question: Do you mean that anyway the ‘de reference’ is a (sort of) copy?
As we know, programmers want to make it clear they want to pass only a reference/pointer – i.e., a reference to a ‘same’ already existing entity, and not to pass a new entity (not a copy). So languages provide special syntaxes to pass by reference. (Btw, I recently noticed articles presenting a difference between 'pass by reference' and 'pass by pointer'.)
Question: So are you saying that that the world’s programmers’ usage of pointers is just a nicety that high-level programming languages (such as ‘C’) provide for us -- but actually there is always a ‘copy’ there, because the ‘de reference’ is a (sort of) copy?
-----------------------------------------
I have a feeling you would still say as before, that from a systems / SysML POV, I could simplify as you wrote earlier:
“pass it from action n to action n+1 … Each
action can read the list, perform it’s calculation and append a new value to
the end of the list …
That way you don’t need the store and each action can simply have one input and one output.
But as I mentioned before, I need to teach how modules are designed.
>>
I have just cross-checked my understanding of DataStore in “A Practical Guide
to SysML”, and there it says that they overwrite tokens if they receive a
subsequent version.
So I prefer the version from “A Practical Guide to SysML” (rather than the UML spec version) 😊. Otherwise it seems I cannot do what I wanted to do – and that is to teach the design of the module.
Concerning your responses to my Safety questions I will get back to you in a later post, if I may.
Note on updated diagram draft below: I initially moved the action pins to the bottoms of the actions to give a better impression that these are outputs. But it caused the diagram to be much less compact, i.e., to look way more complicated.
Below Draft 3 of Example Diagram:
(changes in blue text)
Thanks
Avi
On 31 May 2021, at 04:30, avi-mak <amak...@gmail.com> wrote:
Hi James,
Thank you so much for the time and effort you are giving.
I only now noticed I was just pushing and pulling the same item all the time. I should be pushing new values each time into the same object. I updated the diagram according to your comments, and as best as i could. Updated diagram is at end of this post.
My apologies you are having to debug my logic, and not just the UML meaning/syntax. Further, my mistake detracts from the real question I asked and from your answers. As mentioned, I updated the diagram, and I respond and answer your other points and questions, as follows beloow. (My responses below are in blue.)
>> I note this has two steps which are presumably described in a sub-Activity diagram?)
Correct.
>> “is the object pushed back to the DataStore the same one that was previously pulled?”
As above, it was a mistake. I should be pushing a new value each time into the same object.
This is not how a DataStore works, you can’t manipulate the ObjectTokens already stored, all you can do is add new ObjectTokens. - You can however select which token (or tokens) you want when you ‘Pull’ them.
<< “pass by reference” doesn’t work in SysML activity semantics.
Ok - this is a very important basic concept you have just taught. I am just starting out in modeling with activity diagrams and you have just saved from ongoing mistakes.
I should add that you could make it work, but you would need to define all the extra and unnecessary processing, such as you would need to define a ‘dereferencing’ operation to actually manipulator any data.
>> a pointer in software you have to ‘de-reference’ it
Here you have given me something to think about… Question: Do you mean that anyway the ‘de reference’ is a (sort of) copy?
As we know, programmers want to make it clear they want to pass only a reference/pointer – i.e., a reference to a ‘same’ already existing entity, and not to pass a new entity (not a copy). So languages provide special syntaxes to pass by reference. (Btw, I recently noticed articles presenting a difference between 'pass by reference' and 'pass by pointer'.)
Pass by reference and pass by pointer (variable) is aperculiarity of C++ (and possibly some other languages). In pass by reference all the pointer manipulation is done by the compiler, in C++ you can actually manipulate the value held in the pointer variable. i.e. if “My Age” is stored at memory location 100, and I assign a pointer P to “My Age” then P holds the value of 100, and *P (defrefencing) gives me the value stored at Memory location 100, but I can also manipulate P directly, so P++ increments P to 101 so it is now pointing at a different memory location.
Question: So are you saying that that the world’s programmers’ usage of pointers is just a nicety that high-level programming languages (such as ‘C’) provide for us -- but actually there is always a ‘copy’ there, because the ‘de reference’ is a (sort of) copy?
-----------------------------------------
I have a feeling you would still say as before, that from a systems / SysML POV, I could simplify as you wrote earlier:
“pass it from action n to action n+1 … Each action can read the list, perform it’s calculation and append a new value to the end of the list …
That way you don’t need the store and each action can simply have one input and one output.But as I mentioned before, I need to teach how modules are designed.
I’m not sure I complete understand this comment, but designs is process, so you need at least two views (diagrams) one which is the specification and one which is the design and ana rationale how to transform from one into the other.
>> I have just cross-checked my understanding of DataStore in “A Practical Guide to SysML”, and there it says that they overwrite tokens if they receive a subsequent version.
So I prefer the version from “A Practical Guide to SysML” (rather than the UML spec version) 😊. Otherwise it seems I cannot do what I wanted to do – and that is to teach the design of the module.
Actually the two views are comparable (I now realise). Because the DataStore always gives you a copy then if you push that ObjectToken back in it just adds it to the collection of ObjectTokens.
Concerning your responses to my Safety questions I will get back to you in a later post, if I may.
Note on updated diagram draft below: I initially moved the action pins to the bottoms of the actions to give a better impression that these are outputs. But it caused the diagram to be much less compact, i.e., to look way more complicated.
Below Draft 3 of Example Diagram:
(changes in blue text)
<Demo Activity.png>
Thanks
Avi
To view this discussion on the web visit https://groups.google.com/d/msgid/sysmlforum/8c937cf4-054a-4b5b-87f6-b0dc05c7f7e8n%40googlegroups.com.
<Demo Activity.png>
Hi James,
Again thank you for your responses, which again you write with great care and empathy.
>> I think I understand what you are trying to achieve,
I think you do. I am trying to make the model’s diagrams to be also good as documentation. Documentation that is intuitive as possible also for people non-UML literate.
I had better spell it out:
So far on my MBSE journey I have identified three categories of “modelers” :
(A) Modelers who are System architects and also dedicated MBSE people using SysML for design. They are doing their very best to stick to “canonical” SysML (like the people on this forum…).
(B) Modelers who are system architects using SysML for design (under extreme project pressures ) but do not care at all about the SysML language definition – to the extreme (e.g., “if it suits me to “embed” an action inside an IBD part/property then that’s what I will do). I do not judge anybody.
(C) Modelers who are documentation service providers and also dedicated MBSE people using SysML to document an existing system (reverse engineering, and as a by-product the company also gets a good design model). They are doing their best to stick to “canonical” SysML.
(Are there more categories?)
I am one of the category (C). I use MBSE for documentation, i.e., knowledge transfer – ie to teach how the system works.
->> but actually each ’simplification’ of the diagram is moving you further away.
Nevertheless, I am also still going forward: each deeper explanation you give improves my capability. And even if I find that SysML will not let me model the way I want, then knowing that is also excellent.
Without yet reading the technical stuff, I can already feel that likely I am not going to be able to do what I wanted to do.
Now back to the technical stuff….
>> This is not how a DataStore works, you can’t manipulate the ObjectTokens already stored, all you can do is add new ObjectTokens.
Ok – so now I understand why you originally thought the key characteristic of my data structure is that it is a list/set (of objects, and I was adding (new) objects). Because it seems that is what a datastore is for.
Disappointed.
Ok – so the UML DataStore element is not for what I wanted to do. Is there a different UML element that does do what I want? I am starting to realize there is not… If so, is there a fundamental system engineering reason for that?
>> I should add that you could make it work, but you would need to define all the extra and unnecessary processing, such as you would need to define a ‘dereferencing’ operation to actually manipulator any data.
Yes. I started to think of adding some ‘side’ actions to do ‘push value’ updates to the struct. But it is defeating the purpose of simplicity; it would vastly add to the number of elements on the diagram.
>> “De-referencing means "get me the data held at this address” “
>>” … when you deference a pointer you get the value stored at the location pointed at by the pointer, there is no copying going on.”
Ok. I had thought you wanted to point out to me that at the physical data-bus layer, when you do a ‘get’ you are always causing data to be ‘sent’ along the bus i.e., copied, so there is always a ‘copy’ involved. And this has relevance for safety analysis.
>> “I’m not sure I complete understand this comment, but designs is process, so you need at least two views (diagrams) one which is the specification and one which is the design and ana rationale how to transform from one into the other.”
Indeed. And thank you for pointing that out.
And that is for a separate thread, I guess.
>> Actually the two views are comparable (I now realise). Because the DataStore always gives you a copy then if you push that ObjectToken back in it just adds it to the collection of ObjectTokens.
Either way, it has become clear that «datastore» is not what I need here.
Thank you for the explanations about pointers and de-referencing.
Will later follow up on your responses about safety analysis.
Bottom line, for now – what I will do:
I will delete the datastore element, obviously.
Instead , each action will display a ‘purpose caption’ as follows:
“Do Processing Step n; Update the Result struct.”
And the flow between actions will be control flows (rather than object flows).
Thank you,
Avi
On 2 Jun 2021, at 19:37, Wolfgang Schlicker <wolli.s...@gmail.com> wrote:
Hi Avi,
--
--
You received this message because you are subscribed to the Google
Groups "SysML Forum" group.
Public website: http://www.SysMLforum.com
To post to this group, send email to sysml...@googlegroups.com
To unsubscribe from this group, send email to
sysmlforum+...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/sysmlforum?hl=en_US?hl=en
---
You received this message because you are subscribed to the Google Groups "SysML Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sysmlforum+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/sysmlforum/36f09121-2fc2-4521-94f2-fb4d37922a6dn%40googlegroups.com.
Hi James,
>> This is all good,
Finally … :)
>> but I still don’t understand why outputting the results structure from one action (after it is updated) and inputting into the next action doesn’t describe what you are trying to do?
And indeed this is where we came in. (And it is written somewhere, “the beginning is wedged in the end, and the end is wedged in the beginning”.)
In terms of generalized flow, what you write above does logically describe what I am trying to do. But the code does not exactly work that way.
It could be that you have a basic sys eng axiom that I don’t have yet, i.e., that the way you describe is the accepted system engineering practices and is complete and correct, although it is not exact.
Maybe the specific point of my misunderstanding is this:
To my understanding – and correct me if I am wrong – what you write “outputting the results structure from one action … and inputting into the next action”: would be complete and correct in the case where I have, for example, an action defined as a subroutine fn() with input & output parameters as follows:
fn (in x, out y)
where x and y are of the same struct type.
However, each fn() subroutine in my subroutine sequence has no input or output parameters. Each fn() subroutine reads and updates the results structure directly from within its code body. So that is why I wanted to draw some data storage on the side. And that is the way that non-uml engineers would draw it with their traditional colored lego block diagrams.
But, as I mentioned above, maybe the sys eng norm is that it is complete and correct to draw it as a direct flow from one action to the next, as you say, although it does not seem to me to be a direct flow at all.
Thanks,
Avi
--
--
You received this message because you are subscribed to the Google
Groups "SysML Forum" group.
Public website: http://www.SysMLforum.com
To post to this group, send email to sysml...@googlegroups.com
To unsubscribe from this group, send email to
sysmlforum+...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/sysmlforum?hl=en_US?hl=en
---
You received this message because you are subscribed to the Google Groups "SysML Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sysmlforum+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/sysmlforum/5be6b4f8-756c-4e18-9ed9-af875e8e2741n%40googlegroups.com.
Please excuse me for the typos at the end, there. I guess I must have run out of energy.
Should be: "Thank you very much for your answer. It came just in time -- for me to carry on with my work to present a SysML diagram that is both correct with regards to technical content and also is valid SysML notation. Great thanks for all the clarifications, especially in what turned out to be an unexpectedly long thread."
Again, thank you very much.
Avi