saeaadl / aadlv2.2

SAE AADL core language, version 2.2
1 stars 0 forks source link

Allow ports in subprogram types #38

Closed stevevestal closed 4 years ago

stevevestal commented 5 years ago

The only kind of port declaration currently allowed in a subprogram type is an out event data port. This asymmetry seems confusing and unnecessarily restrictive. Source code for a subprogram (or subprogram group) may contain any read/receive or write/send service calls that could appear in source code associated with a thread. Subprogram execution is just a part of thread execution.

The ability to do this is useful for patterns that insert message transformations, e.g., in a transformation subprogram that is a "requires subprogram access" feature of a thread, or a pattern that injects a wrapper into a process to align otherwise inconsistent port types with thread groups (such as FACE UoPs hosted in a process).

reteprelief commented 5 years ago

The reason for the restriction was to use ports for modeling exceptions, which typically are only outgoing. If we allow ports in general then they can play the role of parameter and we would not need parameter as a construct.

stevevestal commented 5 years ago

Ah, yes, I see in the standard that parameters do double-duty as both message ports/queues/buffers and call parameter passing for subprogram objects.

stevevestal commented 5 years ago

Or perhaps a better interpretation is that a port-to-port connection has a subtly different implementation semantics/mechanism than a port-to-parameter connection.

stevevestal commented 4 years ago

Closing this, it can be covered by a suitable semantic interpretation of port to property connections.