2. pcm service effect specification

22
Prof. Dr. R. H. Reussner ([email protected]) Lehrstuhl Software-Entwurf und  Qualität Institut für Programmstrukturen und Datenorganisation (IPD) Fakultät für Informatik, Universität Karlsruhe (TH) Universität Karlsruhe (TH) Forschungsunive rsität gegründet 1825 Praktikum Ingenieurmäßige Software-Entwicklung Palladio Component Model Part II (PCM)

Upload: youngmin

Post on 09-Jan-2016

11 views

Category:

Documents


0 download

DESCRIPTION

PCM Tutorials

TRANSCRIPT

7/17/2019 2. PCM Service Effect Specification

http://slidepdf.com/reader/full/2-pcm-service-effect-specification 1/22

Prof. Dr. R. H. Reussner ([email protected])

Lehrstuhl Software-Entwurf und  –Qualität

Institut für Programmstrukturen und Datenorganisation (IPD)

Fakultät für Informatik, Universität Karlsruhe (TH)

Universität Karlsruhe (TH)Forschungsuniversität gegründet 1825

Praktikum IngenieurmäßigeSoftware-Entwicklung

Palladio Component Model – Part II (PCM)

7/17/2019 2. PCM Service Effect Specification

http://slidepdf.com/reader/full/2-pcm-service-effect-specification 2/22

 

X perf=1.00

Xloss=0.01

Software esign

  and Quality

Outline

1.Introductiona. Roles, Process Model, Example

b. Solver (Simulation, Analytical Model)

2.Component Developer

a. Repositoryb. Component, Interface, Data Types

c. SEFF

3.Stochastical Expressions

a. Constants, PMF, PDF, ParameterCharacterisation

b. Parametric Dependencies

Palladio Component Model 30.05.2007 2

Lecture 1

Lecture 2

Lecture 3

7/17/2019 2. PCM Service Effect Specification

http://slidepdf.com/reader/full/2-pcm-service-effect-specification 3/22

 

X perf=1.00

Xloss=0.01

Software esign

  and Quality

▪ Description of the externalvisible actions of acomponent‘s service

▪ Abstraction of internalbehaviour

▪ Describes relationship betweenprovided component side and required

component side▪ Can be parameterised by variables (see next

lecture)

Service Effect Specification

Palladio Component Model 30.05.2007 3

7/17/2019 2. PCM Service Effect Specification

http://slidepdf.com/reader/full/2-pcm-service-effect-specification 4/22

 

X perf=1.00

Xloss=0.01

Software esign

  and Quality

Conceptual Sourcesof the SEFF

▪ CBSE Parametric Contracts▪ UML2 Activities

– Notation

– Some semantic ideas

▪ Software Execution Graphs of SPE

▪ Core Scenario Model (CSM) used in PUMA(Performance by unified model analysis)

▪ KLAPER (Kernel Language for Performanceand Reliability Analyses)

Palladio Component Model 30.05.2007 4

7/17/2019 2. PCM Service Effect Specification

http://slidepdf.com/reader/full/2-pcm-service-effect-specification 5/22

 

X perf=1.00

Xloss=0.01

Software esign

  and Quality

Service Effect SpecificationOverview

Palladio Component Model 30.05.2007 5

ComponentDeveloper

7/17/2019 2. PCM Service Effect Specification

http://slidepdf.com/reader/full/2-pcm-service-effect-specification 6/22

 

X perf=1.00

Xloss=0.01

Software esign

  and Quality

Conceptual Overview

▪ Resource Actions– Internal Action

– Acquire- & Release Action

▪ Communication

– External Call Action

▪ Control Flow

– Loops

– Branches– Fork

Palladio Component Model 30.05.2007 6

7/17/2019 2. PCM Service Effect Specification

http://slidepdf.com/reader/full/2-pcm-service-effect-specification 7/22

 

X perf=1.00

Xloss=0.01

Software esign

  and Quality

Start and Stop Action

▪ Mark beginning and end ofactivities

▪ Every sub activity also has tohave one start and one stopaction

Palladio Component Model 30.05.2007 7

7/17/2019 2. PCM Service Effect Specification

http://slidepdf.com/reader/full/2-pcm-service-effect-specification 8/22

 

X perf=1.00

Xloss=0.01

Software esign

  and Quality

Internal Action

▪ Modells component internal activities likedoing a computation

▪ Specifies the summed up resource demandfor the action

▪ Different resources can be used

Palladio Component Model 30.05.2007 8

7/17/2019 2. PCM Service Effect Specification

http://slidepdf.com/reader/full/2-pcm-service-effect-specification 9/22

 

X perf=1.00

Xloss=0.01

Software esign

  and Quality

Acquire Action

▪ Acquire Actions model the acquisition of alimited resource (Passive Resource Type)

▪ Examples are Database Connections,Pooled Threads, Mutex Locks, …

▪ Serve as synchronisation mechanism forconcurrent executions

Palladio Component Model 30.05.2007 9

7/17/2019 2. PCM Service Effect Specification

http://slidepdf.com/reader/full/2-pcm-service-effect-specification 10/22

 

X perf=1.00

Xloss=0.01

Software esign

  and Quality

Release Action

▪ Release acquired resources again▪ Other waiting jobs can use the resource

now

▪ A FIFO strategy controls the order ofacquisition for the waiting jobs

Palladio Component Model 30.05.2007 10

7/17/2019 2. PCM Service Effect Specification

http://slidepdf.com/reader/full/2-pcm-service-effect-specification 11/22

 

X perf=1.00

Xloss=0.01

Software esign

  and Quality

ExternalCallAction

▪ Models a call using any of the required roles▪ A call must use a required role

▪ Parameter passing and returning can bespecified (next lecture)

Palladio Component Model 30.05.2007 11

7/17/2019 2. PCM Service Effect Specification

http://slidepdf.com/reader/full/2-pcm-service-effect-specification 12/22

 

X perf=1.00

Xloss=0.01

Software esign

  and Quality

Control Flow Specification

▪ Control flow constructs model the course ofactions like in SPE

▪ Concepts available

– Loops

• Loop

• CollectionIterator

– Branches

• Probabilistic

• Guarded

– Forks

Palladio Component Model 30.05.2007 12

7/17/2019 2. PCM Service Effect Specification

http://slidepdf.com/reader/full/2-pcm-service-effect-specification 13/22

 

X perf=1.00

Xloss=0.01

Software esign

  and Quality

Loops

▪ Models repeated behaviour▪ Iteration count has to be specified explicitly

Palladio Component Model 30.05.2007 13

for(int i=0; i<10; i++){

}

7/17/2019 2. PCM Service Effect Specification

http://slidepdf.com/reader/full/2-pcm-service-effect-specification 14/22

 

X perf=1.00

Xloss=0.01

Software esign

  and Quality

CollectionIteratorAction

▪ CollectionIteratorActions iterate over allelements in an instance of aCollectionDataType

▪ The behaviour is executed for every

element

Palladio Component Model 30.05.2007 14

7/17/2019 2. PCM Service Effect Specification

http://slidepdf.com/reader/full/2-pcm-service-effect-specification 15/22

 

X perf=1.00

Xloss=0.01

Software esign

  and Quality

CollectionIteratorAction

Palladio Component Model 30.05.2007 15

void myMethod(int[] intArray)

{

for (int x:intArray) {

do

}

}

7/17/2019 2. PCM Service Effect Specification

http://slidepdf.com/reader/full/2-pcm-service-effect-specification 16/22

 

X perf=1.00

Xloss=0.01

Software esign

  and Quality

Semantic details

▪ Loop and CollectionIterator semanticspreview

– Inner Actions are evaluated stochasticallyindependent wrt. to contained parametric

dependencies– Collection Iterator Actions are evaluated

stochastically dependent wrt. to thecharacterisation of the parameter being iterated

▪ Examples and further details in next lecture

Palladio Component Model 30.05.2007 16

7/17/2019 2. PCM Service Effect Specification

http://slidepdf.com/reader/full/2-pcm-service-effect-specification 17/22

 

X perf=1.00

Xloss=0.01

Software esign

  and Quality

Branches

▪ A branch models optional parts of the controlflow

▪ Exactly one branch must be executed, tomodel an option an empty alternative branchhas to be specified

▪ Two flavours:– Probabilistic Branch Transitions: A probability can be

specified for every branch which is the probability of executing the branch. Probabilities have to sum up

to 1– Guarded Branch Transitions: Guards „protect “ the

execution of the branch. Execute branch which guardis true

Palladio Component Model 30.05.2007 17

7/17/2019 2. PCM Service Effect Specification

http://slidepdf.com/reader/full/2-pcm-service-effect-specification 18/22

 

X perf=1.00

Xloss=0.01

Software esign

  and Quality

Probabilistic Branches

Palladio Component Model 30.05.2007 18

If (someCondition) {

}

else{

}

someCondition == true in

40% of all cases

7/17/2019 2. PCM Service Effect Specification

http://slidepdf.com/reader/full/2-pcm-service-effect-specification 19/22

 

X perf=1.00

Xloss=0.01

Software esign

  and Quality

Guarded Branches

Palladio Component Model 30.05.2007 19

a = …

If (a <= 10) {

} else {

}

7/17/2019 2. PCM Service Effect Specification

http://slidepdf.com/reader/full/2-pcm-service-effect-specification 20/22

 

X perf=1.00

Xloss=0.01

Software esign

  and Quality

Fork

▪ A fork spawns n threads and waits for themto finish

▪ After finishing the forked threads the mainthread continues

Palladio Component Model 30.05.2007 20

7/17/2019 2. PCM Service Effect Specification

http://slidepdf.com/reader/full/2-pcm-service-effect-specification 21/22

 

X perf=1.00

Xloss=0.01

Software esign

  and Quality

Now: Exercises in the Tool

▪ Switch to Eclipse!

Palladio Component Model 30.05.2007 21

7/17/2019 2. PCM Service Effect Specification

http://slidepdf.com/reader/full/2-pcm-service-effect-specification 22/22

 

X perf=1.00

Xloss=0.01

Software esign

  and Quality

Lessons Learned Today

▪ What is a SEFF?▪ What is it used for?

▪ Concepts– Resource Actions

• Internal Action• Acquire- & Release Action

– Communication• External Call Action

– Control Flow• Loops

• Branches

• Forks

Palladio Component Model 30 05 2007 22