lbl-srg / ctrl-flow-dev

ctrl-flow development
Other
0 stars 0 forks source link

Parser: Extend Parameters #154

Closed darenkeck-dev closed 1 year ago

darenkeck-dev commented 1 year ago

When a model extends another model in modelica like this (psuedocode):

// in TestPackage.Template

interface A {
    param1: 'a param';
}

interface B extends A {
    param2: 5;
    param3: param1;
}

The following option paths get extracted:

'TestPackage.Template.A': // A class definition
'TestPackage.Template.A.param1': //  'a param'
`TestPackage.Template.A.__extend`: // TestPackage.Template.A
`TestPackage.Template.B.param2`: // 5
`TestPackage.Template.B.param3`: // 'a param'

Right now a link is made to the extended type using the special key __extend. This is incorrect as a reference for 'param3' to 'param1' will fail. We need to be able to handle these parameters on both the FE and BE.

Flintonian commented 1 year ago

Update 'extend' parameters to ensure modelicapaths are valid

darenkeck-dev commented 1 year ago

Fixed with #192

Extend paths are now flattened