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
114 stars 23 forks source link

ST6RI-759: Feature chains referring to features that do not belong to the owning features are not correctly rendered (PlantUML) #558

Closed himi closed 2 months ago

himi commented 2 months ago

So far, the visualizer wrongly assumed feature chains refer to features directly or indirectly owned by the owning feature of the feature chains. Therefore, the example below was incorrectly rendered:

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

action a3 {
    action a31;
}

as

image

himi commented 2 months ago

After this fix, it is correctly rendered:

Screenshot 2024-04-12 at 10 04 49 AM

himi commented 2 months ago

It can correctly handle more tricky case:

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

    action a2 {
        action a21;
    }

    action a3 :> a2 {
        action a31 {
            action a311;
        }
    }

    action a4 :> a3 {
        first a21 then a41;
        action a41;
    }

    action a5 :> a3;

It is rendered as:

Screenshot 2024-04-12 at 10 15 23 AM

himi commented 2 months ago

This PR also fixes the issue incorrectly handling feature values using feature chains. So the example below

part p0 {
    attribute a1 = 10;
}

attribute a0 = 100;

part p2 {
    attribute a2 = p0.a1;
    attribute a3 = a0;
}

is correctly rendered as:

Screenshot 2024-04-12 at 10 20 33 AM

in interconnection view.

himi commented 2 months ago

This PR fixes the issue reported in https://github.com/Systems-Modeling/SysML-v2-Pilot-Implementation/pull/548#issuecomment-2002110381