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
Some data-access connections are not being instantiated. #2161
Comments
This problem is caused by the connection This is almost certainly caused by my fix to Issue #2032. I think the problem is that the connection is seen as terminating at a subprogram, and we were trying to treat those kinds of connections specially. I may have overlooked the fact that subprograms can have access connections. |
The problem is in Need to weed this out before hand in the checks around line 661 I think. |
Changed the filter sent to
Fixes the problem above, but causes some of the tests for 2032 to fail. Need to check them out. |
Two of the 3 tests from 2032 that broke are tests that seem to rely on the connection instance connecting to a subprogram subcomponent:
The question I have is this: was the fix in 2032 incomplete? I'm pretty sure we should never have a connection that ends at a subprogram subcomponent. (The problem reported here in 2161 is that we are correctly not connecting to a subprogram, but we didn't record correctly the fact that we should connect to the container of the subcomponent.) I don't think I deliberately allowed the above cases in 2032. I merely captured the reality of what was allowed. Somehow I missed that this cases probably shouldn't be allowed. They feel through the cracks, I think, because the subprogram is not in a thread, process, or processor, but in a data subcomponent. So the big question is: Do we ever want a connection instance to end at a subprogram? |
I went back the master branch to play around with this some more. I have a new observation: If I change the connections to be bidirectional, then the connection instance is created and follows both connections ( It seems that the author of this issue expects that the connection only contain |
Some background. The AADL standard only allows Concurrency_Control_Protocol to be declared on a data sub-component. This is a necessary property to deal with semaphore protocols (not shown in this simplified model to reproduce the issue). We need a data access connection to go from the data sub-component itself down to the "requires access" to that data object. We wrap that inside a subprogram call because that is the only standard way we could think of to specify a worst-case locking time. Analysis tools that handle real-time semaphores need this information, and need it on both ends to do semaphore protocol consistency checking. There are provides and requires access to subprogram and subprogram group declarations in AADL, but that is different than provides and requires access to data. |
Observed yesterday that something seems to be broken with unidirectional access connections. There are cases where the unidirectional connection is not created, but the bidirectional connections are. Spent the day creating a bunch of test cases that explore this across a number of axes:
(The intent here is to see differences in treatment between "final" connection-ending components and components that are not connection-ending.) This gives me 12 AADL packages. Within each one, I have three system variants where the shared subcomponent and the shared access feature are connected in one of three ways:
All cases worked as expected, except for the cases where we have a data subcomponent being connected to a data access feature in subprogram. This bug report covers some of those cases, but not all of them. The tests are being run on the "master" branch. (more details to follow) |
The simplest case that fails is when we connect a
If we change the (NB. This is on the master branch.) |
The next case that doesn't work is when we connect a
Here we never have any connection instances generated. Again, if we change the (NB. This is on the master branch.) |
Finally, is the case where we connect a
Like the first bad example,
Again, if we change the (NB. This is on the master branch.) |
I'm not surprised the case where the the connection has to pass through a I'm not entirely surprised that ending at a subprogram might cause problems because there is a check that tries to eliminate access connections that end at subprograms (see one of the early comments above), but clearly it doesn't eliminate them in all case. I'm not at all sure why it matters that it's |
This is a surprisingly simple problem. The culprit Is at line 392 in
This is specifically dropping connections that go to This is being a problem now for the specific example in the initial report here because before issue 2032, the connection instance was always terminated at the outer edge of the I have removed the above lines of code and they seem to fix the problem for the original example, and for the examples that I created above. Need to run the regression tests and see if it messes anything else up. NB. Undid the change from January 16th. That was incorrect. |
Regression tests were okay, except for need to create new Unit test drivers for this issue now. |
Does instantiation work, i.e., produce a reasonable instance model and report no errors, for the example from #222? |
AH. Okay. The problem in Issue #222 is that the data component is being connected to a feature of a subprogram referenced as called subprogram in a call sequence. This should be filtereed out, but we need to allow the other cases. Need to differentiate between the different uses of subprograms.
|
Okay. Third try. Replaced the original check at line 392 with this one:
|
Summary
When instantiating the AADL model below using the latest development version of OSATE, a data-access connection within the model is not being instantiated.
Expected and Current Behavior
When instantiating this model with OSATE 2.6.1, the instance file contained a connection instance corresponding to the data-access connection
s1
:Steps to Reproduce
DACT.impl
.Environment
The text was updated successfully, but these errors were encountered: