Skip to content
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

aadl.library update #1

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
41 changes: 11 additions & 30 deletions aadl.library/AADL.sysml
Original file line number Diff line number Diff line change
@@ -1,26 +1,7 @@
/**

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't remove the existing copyright notice.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Then, I will add mine too.
By principle, I cannot accept that our free contribution becomes copyrighted by another organization (knowing that we already agreed that it will be copyrighted by both SAE and OMG)

I would however prefer a copyleft approach for such a standardization collaborative work, otherwise it will soon become a complete mess.
A similar issue is the License file in the repository that is also irrelevant in this context.

* AADL Library for SysMLv2
*
* Copyright 2024 Carnegie Mellon University.
*
* NO WARRANTY. THIS CARNEGIE MELLON UNIVERSITY AND SOFTWARE ENGINEERING
* INSTITUTE MATERIAL IS FURNISHED ON AN "AS-IS" BASIS. CARNEGIE MELLON
* UNIVERSITY MAKES NO WARRANTIES OF ANY KIND, EITHER EXPRESSED OR
* IMPLIED, AS TO ANY MATTER INCLUDING, BUT NOT LIMITED TO, WARRANTY OF
* FITNESS FOR PURPOSE OR MERCHANTABILITY, EXCLUSIVITY, OR RESULTS
* OBTAINED FROM USE OF THE MATERIAL. CARNEGIE MELLON UNIVERSITY DOES NOT
* MAKE ANY WARRANTY OF ANY KIND WITH RESPECT TO FREEDOM FROM PATENT,
* TRADEMARK, OR COPYRIGHT INFRINGEMENT.
*
* Licensed under a BSD (SEI)-style license, please see license.txt or
* contact [email protected] for full terms.
*
* [DISTRIBUTION STATEMENT A] This material has been approved for public
* release and unlimited distribution. Please see Copyright notice for
* non-US Government use and distribution.
*
* DM24-0309
*/
/* SysML v2 Domain Library for AADL:
* references:
* SAE AS-5506D AADL chapters 4 to 10
* OMG SysML v2 release 2024-02 */

standard library package AADL {

Expand Down Expand Up @@ -60,6 +41,8 @@ standard library package AADL {

part def Data :> Component {
attribute :>> category = ComponentCategory::Data;

attribute value: Base::DataValue;
}

part def Device :> Component {
Expand All @@ -81,6 +64,8 @@ standard library package AADL {

part def Processor :> Component {
attribute :>> category = ComponentCategory::Processor;

attribute Scheduling_Protocol : Deployment_Properties::Scheduling_Protocol;
}

part def System :> Component {
Expand All @@ -104,6 +89,8 @@ standard library package AADL {

attribute Compute_Execution_Time : Timing_Properties::Compute_Execution_Time;
attribute Period : Timing_Properties::Period;
attribute Dispatch_Protocol : Thread_Properties::Dispatch_Protocol;
attribute Priority : Thread_Properties::Priority;
}

part def ThreadGroup :> Component {
Expand Down Expand Up @@ -176,12 +163,6 @@ standard library package AADL {
connection def FeatureGroupConnection :> Connection;
connection def ParameterConnection :> Connection;

abstract connection def ActualBinding;

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Leave the existing ActualBinding connection defs in place. I know that you moved ActualProcessorBinding into Deployment_Properties and turned it into an allocation, but doing so breaks the translators.

After speaking with @jjhugues about this, we concluded that it would be best to leave both approaches in the library for now. We need to have further discussions about whether the AADL binding properties should be SysML connections or allocations before switching to allocations and updating the translators. I think that in the end, allocations are probably the way we will go, but we aren't there yet.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There are three topics in your comment:

  1. what is the best mapping for bindings: I agree this still requires discussions. After the meeting in Reston, allocation seems to be the best candidate for now.
  2. location of the property definitions: I think we agreed that the best approach - for now - was to follow the structure of the AADL standard document. Binding properties are defined in appendix A1. The goal is to ease adoption of the SysML library by current AADL users and to ensure good visibility about the coverage of the mapping.
  3. several of us are developping tool prototypes. It is part of the job to update the prototypes with regards to changes in the common standard that we are elaborating together. It will not work if we constrain these changes to the current version of one of the tools.


abstract connection def ActualProcessorBinding :> ActualBinding;
abstract connection def ActualMemoryBinding :> ActualBinding;
abstract connection def ActualConnectionBinding :> ActualBinding;
abstract connection def ActualFunctionBinding :> ActualBinding;

abstract attribute def Property;

}
38 changes: 38 additions & 0 deletions aadl.library/AADL_Project.sysml
Original file line number Diff line number Diff line change
@@ -1,4 +1,42 @@
/* SysML v2 Domain Library for AADL:
* references:
* SAE AS-5506D AADL appendix A8
* OMG SysML v2 release 2024-02 */

standard library package AADL_Project {

enum def Supported_Dispatch_Protocols {
/* Periodic, Sporadic, Aperiodic, Timed, Hybrid, Background, <project-specified> */
enum Periodic;
enum Sporadic;
enum Aperiodic;
enum Timed;
enum Hybrid;
enum Background;
}

alias Periodic for Supported_Dispatch_Protocols::Periodic;

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should have a discussion about aliases for enumeration literals. I can see why you added them since enumeration literals in AADL are always referred to by a simple name and are never qualified. However, I feel that this could clutter the namespace. It might be a reasonable approach to use imports in the files that have values.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Both approaches are acceptable for me.
It's more a question of modelling guidelines.

The real question is the status of the AADL_Project property set that was never well defined. To which extend is it actually customizable at an end-user or tool level ? Shouldn't we consolidate at least a common subset of these enumeration literals in the standard library. I believe we have enough feedback now to achieve that.

alias Sporadic for Supported_Dispatch_Protocols::Sporadic;
alias Aperiodic for Supported_Dispatch_Protocols::Aperiodic;
alias Timed for Supported_Dispatch_Protocols::Timed;
alias Hybrid for Supported_Dispatch_Protocols::Hybrid;
alias Background for Supported_Dispatch_Protocols::Background;

enum def Supported_Scheduling_Protocols {
/* FixedTimeline, Cooperative, RMS, EDF, SporadicServer, SlackServer, ARINC653 */
enum RM;
enum DM;
enum EDF;
enum HPF;
enum ARINC653;
}

alias RM for Supported_Scheduling_Protocols::RM;
alias DM for Supported_Scheduling_Protocols::DM;
alias EDF for Supported_Scheduling_Protocols::EDF;
alias HPF for Supported_Scheduling_Protocols::HPF;
alias ARINC653 for Supported_Scheduling_Protocols::ARINC653;

attribute def Time :> ISQ::DurationValue {
attribute :>> num: ScalarValues::Integer;
}
Expand Down
63 changes: 63 additions & 0 deletions aadl.library/AADL_example_0001.sysml
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
/* SysML v2 Domain Library for AADL:

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This example is not a part of the library a should be excluded from this Pull Request. It might make sense to create a separate directory or even a separate repo for examples. Again, we should probably discuss where we can put examples.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

But we do need a way to store an exchange examples that are associated with a precise version of the library
Either we agree on some version numbering or we put library and examples in the same commits
Up to you.

* example 0001
* references:
* SAE AS-5506D AADL 2.3
* OMG SysML v2 release 2024-02 */

package AADL_Example_0001 {

import AADL_Project::*;
import AADL_Project::Time_Units::*;

part def System_Def :> AADL::System {

part Hardware: Hardware_Def;
part Software: Software_Def;

allocation SwToHw: Deployment_Properties::Actual_Processor_Binding
allocate Software to Hardware;
}

part def Hardware_Def :> AADL::Processor {
attribute :>> Scheduling_Protocol = Supported_Scheduling_Protocols::HPF;
}

part def Software_Def :> AADL::Process {

port Input: AADL::DataPort { in :>> type: Int; }
port Output: AADL::DataPort { out :>> type: Int; }

part Sender: Thread_100Hz_Def {
attribute :>> Priority = 2;
attribute :>> Compute_Execution_Time = 1 [ms]..2 [ms];
}
part Receiver: Thread_100Hz_Def {
attribute :>> Priority = 1;
attribute :>> Compute_Execution_Time = 2 [ms]..2 [ms];
}

connection ToSe: AADL::PortConnection
connect Input to Sender.Input;
connection SeToRe: AADL::PortConnection
connect Sender.Output to Receiver.Input;
connection ReTo: AADL::PortConnection
connect Receiver.Output to Output;

}

part def Thread_100Hz_Def :> AADL::Thread {

port Input: AADL::DataPort { in :>> type: Int; }
port Output: AADL::DataPort { out :>> type: Int; }

attribute :>> Dispatch_Protocol = Periodic;
attribute :>> Period = 10 [ms];

/* annotation language BA .... */
}

part def Int :> AADL::Data {
attribute :>> value: ScalarValues::Integer;
}

}
17 changes: 17 additions & 0 deletions aadl.library/Deployment_Properties.sysml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
/* SysML v2 Domain Library for AADL:
* references:
* SAE AS-5506D AADL appendix A1
* OMG SysML v2 release 2024-02 */

standard library package Deployment_Properties {

import AADL_Project::*;

allocation def Actual_Processor_Binding {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please add a comment stating that this is a possible approach for handling AADL binding properties and that we need to have further discussions about it.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No problem to add comments here and in other places too.

end part sw : AADL::Component;
end part hw : AADL::Component;
}

attribute def Scheduling_Protocol :> AADL::Property, Supported_Scheduling_Protocols;

}
14 changes: 14 additions & 0 deletions aadl.library/Thread_Properties.sysml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
/* SysML v2 Domain Library for AADL:
* references:
* SAE AS-5506D AADL appendix A2
* OMG SysML v2 release 2024-02 */

standard library package Thread_Properties {

import AADL_Project::*;

attribute def Dispatch_Protocol :> AADL::Property, Supported_Dispatch_Protocols;

attribute def Priority :> AADL::Property, ScalarValues::Integer;

}
14 changes: 12 additions & 2 deletions aadl.library/Timing_Properties.sysml
Original file line number Diff line number Diff line change
@@ -1,4 +1,14 @@
/* SysML v2 Domain Library for AADL:

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should also have a conversation about style. The changes to this file are style-only: file comments, import statement, and whitespace. What should the style be for the library?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We started this discussion during the Reston meeting.
Maybe the best would be to align with other existing sysml standard libraries ?

* references:
* SAE AS-5506D AADL appendix A3
* OMG SysML v2 release 2024-02 */

standard library package Timing_Properties {
attribute def Compute_Execution_Time :> AADL::Property, AADL_Project::Time_Range;
attribute def Period :> AADL::Property, AADL_Project::Time;

import AADL_Project::*;

attribute def Compute_Execution_Time :> AADL::Property, Time_Range;

attribute def Period :> AADL::Property, Time;

}