-
Notifications
You must be signed in to change notification settings - Fork 2
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
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,26 +1,7 @@ | ||
/** | ||
* 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 { | ||
|
||
|
@@ -60,6 +41,8 @@ standard library package AADL { | |
|
||
part def Data :> Component { | ||
attribute :>> category = ComponentCategory::Data; | ||
|
||
attribute value: Base::DataValue; | ||
} | ||
|
||
part def Device :> Component { | ||
|
@@ -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 { | ||
|
@@ -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 { | ||
|
@@ -176,12 +163,6 @@ standard library package AADL { | |
connection def FeatureGroupConnection :> Connection; | ||
connection def ParameterConnection :> Connection; | ||
|
||
abstract connection def ActualBinding; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Leave the existing 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. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. There are three topics in your comment:
|
||
|
||
abstract connection def ActualProcessorBinding :> ActualBinding; | ||
abstract connection def ActualMemoryBinding :> ActualBinding; | ||
abstract connection def ActualConnectionBinding :> ActualBinding; | ||
abstract connection def ActualFunctionBinding :> ActualBinding; | ||
|
||
abstract attribute def Property; | ||
|
||
} |
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; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Both approaches are acceptable for me. 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; | ||
} | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
/* SysML v2 Domain Library for AADL: | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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. There was a problem hiding this comment. Choose a reason for hiding this commentThe 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 |
||
* 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; | ||
} | ||
|
||
} |
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 { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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. There was a problem hiding this comment. Choose a reason for hiding this commentThe 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; | ||
|
||
} |
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; | ||
|
||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,14 @@ | ||
/* SysML v2 Domain Library for AADL: | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We started this discussion during the Reston meeting. |
||
* 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; | ||
|
||
} |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.