-
Notifications
You must be signed in to change notification settings - Fork 11
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
Clean up confusing terminology in API #767
Comments
An |
The
Here are some ideas:
Footnotes
|
For |
Side comment; would it make sense to make these changes while also incorporating the new elements from FMI3.0? So if backwards compatibility is not achievable, then there is a good reason for it? |
Perhaps. I don't know yet whether FMI 3.0 support will necessarily lead to backwards-incompatible changes to our interfaces, though; it could be that the new features only require additive changes. (Without having thought deeply about it, I suspect the big question is about array types and whether they can be supported by the current Personally, I am not so worried about backwards compatibility, though, as long as we are still in the pre-1.0 stage and therefore have made no promises about it. But we shouldn't break client code often, nor should we break it for unimportant stuff. That's partly why I created this issue. The idea was to get all current API problems on the table and deal with them in one fell swoop before we finally commit to a 1.0 API, after which we do have to maintain backwards compatibility. |
About this comment that I made earlier:
It reminds me of another issue that we could potentially address with an API change and code refactoring: The |
First off, a lot of good questions already from @kyllingstad in this thread. I think we should use To me at least the word The |
First of all, thank you very much @kyllingstad . This discussion is very important I feel. Fantastic that you opened and guide it! I agree with @restenb . Maybe as an additional proposal: For what we termed If there is a place where |
In the survey paper by Gomes et al. which I mentioned earlier, they have made an effort to define and use a precise terminology for various co-simulation concepts. Maybe there is something we can use there. For example, they define the phrase “simulation unit”, which refers to one of the components/subsimulators/model instances in a co-simulation. (But, as they point out, a co-simulation also fulfils the criteria for being a simulation unit, which opens the door to nested co-simulations.) |
To me terms like Calling it a |
As the libcosim API has grown, it has grown messy and unintuitive in places (as APIs tend to do). I am therefore opening this issue to highlight the current issues with it and to get feedback and suggestions for a possible future refactoring. This is by no means urgent, it's more on the “things to consider before a 1.0 release” list.
The most annoying part of it (to me, at least), is the whole simulator/slave stack. Here, we have two interfaces,
simulator
andslave
, each of which has a purpose to serve, but the names do not make those purposes nor their differences evident in any way. Not to mentionslave_simulator
, the (only) implementation of the former interface, which only confuses things even more. Why the FMI-basedslave
implementation should be calledslave_instance
is not crystal clear either. Layer mix-ups aside, the names have their individual issues too.simulator
represents a subsimulator, but the name would be equally good for the whole co-simulator. We haveslave
, but we don't have amaster
. And so on.Then there is
model
, which is the blueprint for aslave
. (That is, aslave
is an instance of amodel
, and multiple instances can be created based on the same model.) But the term strongly suggests that the entity in question is based on a mathematical model, which need not be the case. For example, it could be an interface to a hardware device. A similar blueprint/instance relationship applies to functions, which were a late addition to the library. There, we use the namesfunction_type
andfunction
, respectively. Perhaps something similar could be used for subsimulators?FInally, I am not too fond of
execution
. If I remember correctly, we borrowed it from HLA terminology, but it does not seem to have caught on in the FMI sphere. And even though I wrote the code for that class and have been using it for years, it still feels strange to me.I have some ideas for improvements, but I'll save them for the comments below.
The text was updated successfully, but these errors were encountered: