Systems-Modeling / SysML-v2-Pilot-Implementation

Proof-of-concept pilot implementation of the SysML v2 textual notation and visualization
GNU Lesser General Public License v3.0
130 stars 24 forks source link

ST6RI-748: Standard library elements are rendered without SHOWLIB and SHOWINHERITED styles (PlantUML) #548

Closed himi closed 8 months ago

himi commented 8 months ago

The standard library elements are rendered even without SHOWLIB and SHOWINHERITED style if they are referred by some connectors. Also this PR limits the maximum number of elements to be processed, which is useful for rendering with SHOWLIB style.

himi commented 8 months ago

With COMPMOST style and in Tree view, after this fix,

package TestStdLibElemInherit {
    action a1 {
        first start then a11;
        action a11;
    }

    action a2 {
        action a21;
    }

    action a3 :> a2 {
        first a21 then a31;
        action a31;
    }   
}

is rendered as: Screenshot 2024-03-06 at 10 05 04 AM

And with SHOWLIB style, it is rendered as: Screenshot 2024-03-06 at 10 06 15 AM

himi commented 8 months ago

Even with SHOWINHERITED style (and without SHOWLIB), we get the same result: Screenshot 2024-03-06 at 10 08 30 AM

But with SHOWLIB style, it renders enormous amount of inherited elements: Screenshot 2024-03-06 at 10 10 02 AM

It takes some time to render it but due to the new limitation mechanism, it won't take so long time, it's finished in a few seconds in my Mac mini M1 environment.

himi commented 8 months ago

Note that it is related to https://github.com/Systems-Modeling/SysML-v2-Pilot-Implementation/pull/537#issuecomment-1974914500

himi commented 8 months ago

Sorry, I need to check it again. I got confused.

seidewitz commented 8 months ago

In addition, if the declaration for action a1 is changed to

    action a1 {
        first a3.a31 then a11;
        action a11;
    }

then this is rendered as image While a3 acts semantically as if it is featured by Anything, so it can be used as shown in the succession in a1, syntactically it is not actually an inherited member of a1, so showing it as such is not really correct.

himi commented 8 months ago

It looks the different issue. Again, it's related to a tricky inherit key issue. It can be reproduced with a simpler example:

action a1 {
    first a3.a31 then a11;
    action a11;
}
action a3 {
    action a31;
}
himi commented 8 months ago

After the investigation so far, both issues you reported are quite tricky, related to VPath. And I'm now too busy to work on these. I guess I can work on them in April.

seidewitz commented 8 months ago

If you add these issues to the Jira backlog, then I am OK with approving this PR for the current sprint.

himi commented 8 months ago

Thanks. I created ST6RI-758 and ST6RI-759.