Using AADL to Model a Protodol Stack Didier Delanote, Stefan Van Baelen, Wouter Joosen and Yolande...

22
Using AADL to Model a Protodol Stack Using AADL to Model a Protodol Stack Didier Delanote, Stefan Van Baelen, Wouter Joosen and Yolande Berbers Didier Delanote, Stefan Van Baelen, Wouter Joosen and Yolande Berbers Katholieke Universiteit Leuven Katholieke Universiteit Leuven

Transcript of Using AADL to Model a Protodol Stack Didier Delanote, Stefan Van Baelen, Wouter Joosen and Yolande...

Page 1: Using AADL to Model a Protodol Stack Didier Delanote, Stefan Van Baelen, Wouter Joosen and Yolande Berbers Katholieke Universiteit Leuven.

Using AADL to Model a Protodol StackUsing AADL to Model a Protodol StackDidier Delanote, Stefan Van Baelen, Wouter Joosen and Yolande BerbersDidier Delanote, Stefan Van Baelen, Wouter Joosen and Yolande Berbers

Katholieke Universiteit LeuvenKatholieke Universiteit Leuven

Page 2: Using AADL to Model a Protodol Stack Didier Delanote, Stefan Van Baelen, Wouter Joosen and Yolande Berbers Katholieke Universiteit Leuven.

22

ContentsContents

• Modeling process• Structural aspect• Behavioral aspect• Non-functional aspect• Conclusion• Discussion

Page 3: Using AADL to Model a Protodol Stack Didier Delanote, Stefan Van Baelen, Wouter Joosen and Yolande Berbers Katholieke Universiteit Leuven.

33

Modeling processModeling process

• Network architecture • set of layers and protocols

• Layer • collection of services

• offered to higher layers, using services from lower layers

• Service• set of operations

• implemented using protocols

• Protocol• format and semantics of messages

• specific to one layer

Page 4: Using AADL to Model a Protodol Stack Didier Delanote, Stefan Van Baelen, Wouter Joosen and Yolande Berbers Katholieke Universiteit Leuven.

44

layer 1

layer 2

layer n - 1

layer n

layer 1

layer 2

layer n - 1

Modeling processModeling process

protocol ninterface n interface nlayer

n

protocol n - 1

interface n - 1

interface n - 1

protocol 2interface 2 interface 2

protocol 1interface 1 interface 1

entity 1 entity 2

• OSI: Open Systems Interconnection reference model

Page 5: Using AADL to Model a Protodol Stack Didier Delanote, Stefan Van Baelen, Wouter Joosen and Yolande Berbers Katholieke Universiteit Leuven.

55

Modeling processModeling process

UDP, ICMP

interface 4 interface 4Transport layer

IP, ARPinterface 3 interface 3

MACinterface 2 interface 2

IEEE 802.3interface 1 interface 1

entity 1 entity 2

Network layer

Data link layer

Ethernet layer

Transport layer

Network layer

Data link layer

Ethernet layer

• UDP/IP concrete protocol stack

Page 6: Using AADL to Model a Protodol Stack Didier Delanote, Stefan Van Baelen, Wouter Joosen and Yolande Berbers Katholieke Universiteit Leuven.

66

Modeling processModeling process

• Use AADL to model UDP/IP protocol stack• What requirements should this model conform to?

• High-level• Implementation independent• Structured

• Precise• Significant level of detail• Unambiguous

• Complete• Functional properties• Non-functional properties

Page 7: Using AADL to Model a Protodol Stack Didier Delanote, Stefan Van Baelen, Wouter Joosen and Yolande Berbers Katholieke Universiteit Leuven.

77

ContentsContents

• Modeling process• Structural aspect• Behavioral aspect• Non-functional aspect• Conclusion• Discussion

Page 8: Using AADL to Model a Protodol Stack Didier Delanote, Stefan Van Baelen, Wouter Joosen and Yolande Berbers Katholieke Universiteit Leuven.

88

Structural aspectStructural aspect

• Let’s go back for a moment…• Hardware and software description

• hardware, software and composite components• predefined component categories

• execution platform components

• application software components

• composite components

Processor Memory Device bus

System

Process Subprogram Threadgroup Thread

Data

Page 9: Using AADL to Model a Protodol Stack Didier Delanote, Stefan Van Baelen, Wouter Joosen and Yolande Berbers Katholieke Universiteit Leuven.

99

Structural aspectStructural aspect

Ada AADL

package package

hardware + application system

application process

task thread

procedure subprogram

function subprogram

subprogram parameter subprogram parameter

function call subprogram call

type data component

… …

Page 10: Using AADL to Model a Protodol Stack Didier Delanote, Stefan Van Baelen, Wouter Joosen and Yolande Berbers Katholieke Universiteit Leuven.

1010

Structural aspectStructural aspect

interface 4Transport layer

interface 3

interface 2

interface 1

entity 1

Network layer

Data link layer

Ethernet layer

• Model layer, socket, queue,… as packages of subprograms

package Transport_Layerpublic -- data types data PDU_Length properties Language_Support::Data_Format=> Positive; end PDU_Length;

data Receive_Fifo properties Language_Support::Data_Format=> Record; end Receive_Fifo; -- …

-- subprograms subprogram Init end Init; subprogram Bind features socket: in parameter Network_Entity; end Bind; -- …end Transport_Layer;

Page 11: Using AADL to Model a Protodol Stack Didier Delanote, Stefan Van Baelen, Wouter Joosen and Yolande Berbers Katholieke Universiteit Leuven.

1111

Structural aspectStructural aspect

• No generic software component in AADL• Model protocol types as data components • So how to model…

• a protocol layer• a software cache• a software fifo• a socket• …

Page 12: Using AADL to Model a Protodol Stack Didier Delanote, Stefan Van Baelen, Wouter Joosen and Yolande Berbers Katholieke Universiteit Leuven.

1212

Structural aspectStructural aspect

• Packages represent logical grouping of component declarations

• AADL packages and Ada packages are similar• Can we use packages to introduce structure in the

model?

ARP

IP

UDP/ICMP

Ethernet layer

UDP/ICMP-frame

IP-frame

Ethernet-frame

Page 13: Using AADL to Model a Protodol Stack Didier Delanote, Stefan Van Baelen, Wouter Joosen and Yolande Berbers Katholieke Universiteit Leuven.

1313

Structural aspectStructural aspect

• Problem: packages are no more than grouped declarations• no representation in model• no semantic requirements that enforce package structure• nested packages not allowed

package Application

public

--public part of package

-- Processes

------------

process UDPIPdriver

end UDPIPdriver;

end Application;

Page 14: Using AADL to Model a Protodol Stack Didier Delanote, Stefan Van Baelen, Wouter Joosen and Yolande Berbers Katholieke Universiteit Leuven.

1414

ContentsContents

• Modeling process• Structural aspect• Behavioral aspect• Non-functional aspect• Conclusion• Discussion

Page 15: Using AADL to Model a Protodol Stack Didier Delanote, Stefan Van Baelen, Wouter Joosen and Yolande Berbers Katholieke Universiteit Leuven.

1515

BehavioralBehavioral aspectaspect

• Example

subprogram Create_Socket

features

Domain : in parameter Domain;

Con_Type : in parameter Connection;

Protocol : in parameter Protocol;

Socket_Handle : out parameter Valid_Handle;

end Create_Socket;

• Allow to model method interfaces• Calls in thread implementation• Behavior of subprogram

• modeled with behavior annex

Page 16: Using AADL to Model a Protodol Stack Didier Delanote, Stefan Van Baelen, Wouter Joosen and Yolande Berbers Katholieke Universiteit Leuven.

1616

ContentsContents

• Modeling process• Structural aspect• Behavioral aspect• Non-functional aspect• Conclusion• Discussion

Page 17: Using AADL to Model a Protodol Stack Didier Delanote, Stefan Van Baelen, Wouter Joosen and Yolande Berbers Katholieke Universiteit Leuven.

1717

Non-functional aspectNon-functional aspect

• Add properties to analyze system for non-functional properties

• Some properties are easy to model• pragma Priority (100); becomes• Language_Support::Priority => 100;

• for Application_Task'Storage_Size use 2000; becomes• SEI::RAMBudget => 2000.0 B;

• Others need to be calculated or measured• Period => 5 ms;• Compute_Execution_Time => 1 ms .. 2ms;

• Analyses depending on available properties• Schedulability analysis• Resource allocation analysis• …

Page 18: Using AADL to Model a Protodol Stack Didier Delanote, Stefan Van Baelen, Wouter Joosen and Yolande Berbers Katholieke Universiteit Leuven.

1818

ContentsContents

• Modeling process• Structural aspect• Behavioral aspect• Non-functional aspect• Conclusion• Discussion

Page 19: Using AADL to Model a Protodol Stack Didier Delanote, Stefan Van Baelen, Wouter Joosen and Yolande Berbers Katholieke Universiteit Leuven.

1919

ConclusionsConclusions

• Goals• High-level

• Implementation-independent• Structured

• Precise• Significant level of detail• Unambiguous

• Complete• Functional properties• Non-functional properties

is it possible to achieve these goals?

Page 20: Using AADL to Model a Protodol Stack Didier Delanote, Stefan Van Baelen, Wouter Joosen and Yolande Berbers Katholieke Universiteit Leuven.

2020

ConclusionsConclusions

• Goals• High-level

• Implementation independent rather implementation dependent

• Structured packages, components and subprograms

• Precise• Significant level of detail

using language compliance annex, behavior annex,…

• Unambiguous close to implementation

• Complete• Functional properties

structure, behavior and interfaces

• Non-functional properties model or measure

Page 21: Using AADL to Model a Protodol Stack Didier Delanote, Stefan Van Baelen, Wouter Joosen and Yolande Berbers Katholieke Universiteit Leuven.

2121

ConclusionsConclusions

• Benefits• graphical representation• analysis mechanism

• Drawbacks• same abstraction level as code• similar effort

can we make it easier to build an AADL model?

Page 22: Using AADL to Model a Protodol Stack Didier Delanote, Stefan Van Baelen, Wouter Joosen and Yolande Berbers Katholieke Universiteit Leuven.

2222

ContentsContents

• Modeling process• Structural aspect• Behavioral aspect• Non-functional aspect• Conclusion• Discussion