Skip to content

Clarification about ConvertModifier #3678

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
MikaelJohnssonModelon opened this issue Apr 24, 2025 · 1 comment · May be fixed by #3681
Open

Clarification about ConvertModifier #3678

MikaelJohnssonModelon opened this issue Apr 24, 2025 · 1 comment · May be fixed by #3681
Labels
clarification Specification of feature is unclear, but not incorrect

Comments

@MikaelJohnssonModelon
Copy link

The MSL 3.6 spec only refers to the oldModifers and newModifiers lists, in the convertModifiers function, containing modifiers. I think the intention is to only allowing "component modifiers" and not all forms of modifiers.

In


convertModifiers (" OldClass ",

{" OldModifier1 = default1 ", " OldModifier2 = default2 ", . . .} ,

{" NewModifier1 =. . .% OldModifier2 %. . .", " NewModifier2 =. . .", . . .}

[ , simplify = true ]) ;

the "oldModifiers1..." and "newModifiers1..." modifiers may only have forms pointing to a single element.

For example the following kinds of rules are not allowed:

convertModifiers(Test, {"a = 1"}, {"(a=%a, b=%a)"}, true)
convertModifiers(Test, {"a(b = 1, c = 2)"}, {"a=%a.b + %a.c"}, true)

Is this a correct interpretation?

@HansOlsson
Copy link
Collaborator

The MSL 3.6 spec only refers to the oldModifers and newModifiers lists, in the convertModifiers function, containing modifiers. I think the intention is to only allowing "component modifiers" and not all forms of modifiers.
...
For example the following kinds of rules are not allowed:

convertModifiers(Test, {"a = 1"}, {"(a=%a, b=%a)"}, true) convertModifiers(Test, {"a(b = 1, c = 2)"}, {"a=%a.b + %a.c"}, true)

Is this a correct interpretation?

Yes, and note that the above could be handled as:

convertModifiers(Test, {"a = 1"}, {"a=%a", "b=%a)"}, true) 
convertModifiers(Test, {"a.b = 1", "a.c = 2)"}, {"a=%a.b + %a.c"}, true)

(Except that I have to check whether a hierarchical modifier like the second case is ok for the old modifier)

@HansOlsson HansOlsson added the clarification Specification of feature is unclear, but not incorrect label Apr 27, 2025
@HansOlsson HansOlsson linked a pull request Apr 27, 2025 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
clarification Specification of feature is unclear, but not incorrect
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants