From d4d425fa0320975d50688aa571228df8dd3643a9 Mon Sep 17 00:00:00 2001 From: pdissaux Date: Fri, 17 May 2024 17:32:18 +0200 Subject: [PATCH] aadl.library update proposed changed Ellidiss - 17 May 2024 --- aadl.library/AADL.sysml | 41 +++++---------- aadl.library/AADL_Project.sysml | 38 ++++++++++++++ aadl.library/AADL_example_0001.sysml | 63 ++++++++++++++++++++++++ aadl.library/Deployment_Properties.sysml | 17 +++++++ aadl.library/Thread_Properties.sysml | 14 ++++++ aadl.library/Timing_Properties.sysml | 14 +++++- 6 files changed, 155 insertions(+), 32 deletions(-) create mode 100644 aadl.library/AADL_example_0001.sysml create mode 100644 aadl.library/Deployment_Properties.sysml create mode 100644 aadl.library/Thread_Properties.sysml diff --git a/aadl.library/AADL.sysml b/aadl.library/AADL.sysml index f9a8acc..886599c 100644 --- a/aadl.library/AADL.sysml +++ b/aadl.library/AADL.sysml @@ -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 permission@sei.cmu.edu 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; - - abstract connection def ActualProcessorBinding :> ActualBinding; - abstract connection def ActualMemoryBinding :> ActualBinding; - abstract connection def ActualConnectionBinding :> ActualBinding; - abstract connection def ActualFunctionBinding :> ActualBinding; - abstract attribute def Property; + } diff --git a/aadl.library/AADL_Project.sysml b/aadl.library/AADL_Project.sysml index 552f973..6742d75 100644 --- a/aadl.library/AADL_Project.sysml +++ b/aadl.library/AADL_Project.sysml @@ -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, */ + enum Periodic; + enum Sporadic; + enum Aperiodic; + enum Timed; + enum Hybrid; + enum Background; + } + + alias Periodic for Supported_Dispatch_Protocols::Periodic; + 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; } diff --git a/aadl.library/AADL_example_0001.sysml b/aadl.library/AADL_example_0001.sysml new file mode 100644 index 0000000..4dcf0e6 --- /dev/null +++ b/aadl.library/AADL_example_0001.sysml @@ -0,0 +1,63 @@ +/* SysML v2 Domain Library for AADL: + * 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; + } + +} \ No newline at end of file diff --git a/aadl.library/Deployment_Properties.sysml b/aadl.library/Deployment_Properties.sysml new file mode 100644 index 0000000..c6c069b --- /dev/null +++ b/aadl.library/Deployment_Properties.sysml @@ -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 { + end part sw : AADL::Component; + end part hw : AADL::Component; + } + + attribute def Scheduling_Protocol :> AADL::Property, Supported_Scheduling_Protocols; + +} \ No newline at end of file diff --git a/aadl.library/Thread_Properties.sysml b/aadl.library/Thread_Properties.sysml new file mode 100644 index 0000000..211f6ae --- /dev/null +++ b/aadl.library/Thread_Properties.sysml @@ -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; + +} \ No newline at end of file diff --git a/aadl.library/Timing_Properties.sysml b/aadl.library/Timing_Properties.sysml index bce025c..710b52c 100644 --- a/aadl.library/Timing_Properties.sysml +++ b/aadl.library/Timing_Properties.sysml @@ -1,4 +1,14 @@ +/* SysML v2 Domain Library for AADL: + * 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; + } \ No newline at end of file