Skip to content

Conversation

henrikt-ma
Copy link
Collaborator

This addresses the problem that we didn't specify any difference in semantics of what this means in Base Modelica:

pure external function 'L.P.f'
  input Real 'u';
  output Real 'y';
external "C";
end 'L.P.f';

Clearly, the Modelica semantics makes no sense, since 'L.P.f' is not a valid identifier in C.

The PR proposes to go with the first of the two possible solutions that come to mind:

  • Don't allow leaving out the external-function-call.
  • Specify a different way of deriving the default name of the C function, by requiring that the external function's name is a structured Base Modelica identifier, where it is the last identifier of the unmangled name that gives the name of the C function.

@henrikt-ma henrikt-ma requested review from casella and perost January 20, 2025 11:14
@perost
Copy link
Collaborator

perost commented Jan 20, 2025

I agree in principle, but it seems something's gone wrong with the PR since it includes hundreds of old commits.

@henrikt-ma henrikt-ma changed the base branch from master to MCP/0031 January 20, 2025 11:22
@henrikt-ma
Copy link
Collaborator Author

I agree in principle, but it seems something's gone wrong with the PR since it includes hundreds of old commits.

Wrong base. Thanks for pointing it out!

@HansOlsson HansOlsson added the MCP0031 Base Modelica and MLS modularization (MCP-0031) label Jan 21, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

MCP0031 Base Modelica and MLS modularization (MCP-0031)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants