Data-flow Analysis for Worst-Case Execution Time Stefan Bygde - - PowerPoint PPT Presentation

data flow analysis for worst case execution time
SMART_READER_LITE
LIVE PREVIEW

Data-flow Analysis for Worst-Case Execution Time Stefan Bygde - - PowerPoint PPT Presentation

Introduction Value Analysis APARTS Parametric WCET Analysis Data-flow Analysis for Worst-Case Execution Time Stefan Bygde School of Innovation, Design and Engineering, M alardalen University, Sweden April 14, 2011 Stefan Bygde Flow


slide-1
SLIDE 1

Introduction Value Analysis APARTS Parametric WCET Analysis

Data-flow Analysis for Worst-Case Execution Time

Stefan Bygde

School of Innovation, Design and Engineering, M¨ alardalen University, Sweden

April 14, 2011

Stefan Bygde Flow Analysis for WCET

slide-2
SLIDE 2

Introduction Value Analysis APARTS Parametric WCET Analysis

Table of contents

1 Introduction 2 Value Analysis

Introduction Abstract Interpretation Abstract Domains

3 APARTS 4 Parametric WCET Analysis

Stefan Bygde Flow Analysis for WCET

slide-3
SLIDE 3

Introduction Value Analysis APARTS Parametric WCET Analysis

Introduction

In real-time systems the worst-case execution time (WCET) of each task has to be bounded to properly schedule it

Stefan Bygde Flow Analysis for WCET

slide-4
SLIDE 4

Introduction Value Analysis APARTS Parametric WCET Analysis

Introduction

In real-time systems the worst-case execution time (WCET) of each task has to be bounded to properly schedule it Methods:

Stefan Bygde Flow Analysis for WCET

slide-5
SLIDE 5

Introduction Value Analysis APARTS Parametric WCET Analysis

Introduction

In real-time systems the worst-case execution time (WCET) of each task has to be bounded to properly schedule it Methods:

Dynamic analysis (measurements)

Stefan Bygde Flow Analysis for WCET

slide-6
SLIDE 6

Introduction Value Analysis APARTS Parametric WCET Analysis

Introduction

In real-time systems the worst-case execution time (WCET) of each task has to be bounded to properly schedule it Methods:

Dynamic analysis (measurements) Static analysis (analyse source/object code)

Stefan Bygde Flow Analysis for WCET

slide-7
SLIDE 7

Introduction Value Analysis APARTS Parametric WCET Analysis

Introduction

In real-time systems the worst-case execution time (WCET) of each task has to be bounded to properly schedule it Methods:

Dynamic analysis (measurements) Static analysis (analyse source/object code) Hybrid methods (Combine static and dynamic somehow)

Stefan Bygde Flow Analysis for WCET

slide-8
SLIDE 8

Introduction Value Analysis APARTS Parametric WCET Analysis

Introduction

In real-time systems the worst-case execution time (WCET) of each task has to be bounded to properly schedule it Methods:

Dynamic analysis (measurements) Static analysis (analyse source/object code) Hybrid methods (Combine static and dynamic somehow)

Stefan Bygde Flow Analysis for WCET

slide-9
SLIDE 9

Introduction Value Analysis APARTS Parametric WCET Analysis

Static WCET Analysis

Static WCET Analysis: automatically derive upper bounds for the WCET of programs

Stefan Bygde Flow Analysis for WCET

slide-10
SLIDE 10

Introduction Value Analysis APARTS Parametric WCET Analysis

Static WCET Analysis

Static WCET Analysis: automatically derive upper bounds for the WCET of programs Typically divided into three parts

Stefan Bygde Flow Analysis for WCET

slide-11
SLIDE 11

Introduction Value Analysis APARTS Parametric WCET Analysis

Static WCET Analysis

Static WCET Analysis: automatically derive upper bounds for the WCET of programs Typically divided into three parts

Flow Analysis (analysis of source code)

Stefan Bygde Flow Analysis for WCET

slide-12
SLIDE 12

Introduction Value Analysis APARTS Parametric WCET Analysis

Static WCET Analysis

Static WCET Analysis: automatically derive upper bounds for the WCET of programs Typically divided into three parts

Flow Analysis (analysis of source code) Low-Level Analysis (analysis of hardware)

Stefan Bygde Flow Analysis for WCET

slide-13
SLIDE 13

Introduction Value Analysis APARTS Parametric WCET Analysis

Static WCET Analysis

Static WCET Analysis: automatically derive upper bounds for the WCET of programs Typically divided into three parts

Flow Analysis (analysis of source code) Low-Level Analysis (analysis of hardware) Calculation (combination of analyses)

Stefan Bygde Flow Analysis for WCET

slide-14
SLIDE 14

Introduction Value Analysis APARTS Parametric WCET Analysis

Static WCET Analysis

Static WCET Analysis: automatically derive upper bounds for the WCET of programs Typically divided into three parts

Flow Analysis (analysis of source code) Low-Level Analysis (analysis of hardware) Calculation (combination of analyses)

There is no method to find the exact WCET in general (uncomputable)

Stefan Bygde Flow Analysis for WCET

slide-15
SLIDE 15

Introduction Value Analysis APARTS Parametric WCET Analysis

Static WCET Analysis

Static WCET Analysis: automatically derive upper bounds for the WCET of programs Typically divided into three parts

Flow Analysis (analysis of source code) Low-Level Analysis (analysis of hardware) Calculation (combination of analyses)

There is no method to find the exact WCET in general (uncomputable) Static analysis is typically safe and therefore pessimistic

Stefan Bygde Flow Analysis for WCET

slide-16
SLIDE 16

Introduction Value Analysis APARTS Parametric WCET Analysis

Static WCET Analysis

Static WCET Analysis: automatically derive upper bounds for the WCET of programs Typically divided into three parts

Flow Analysis (analysis of source code) Low-Level Analysis (analysis of hardware) Calculation (combination of analyses)

There is no method to find the exact WCET in general (uncomputable) Static analysis is typically safe and therefore pessimistic

Stefan Bygde Flow Analysis for WCET

slide-17
SLIDE 17

Introduction Value Analysis APARTS Parametric WCET Analysis

Data Flow Analysis

Derive facts about a programs flow

Stefan Bygde Flow Analysis for WCET

slide-18
SLIDE 18

Introduction Value Analysis APARTS Parametric WCET Analysis

Data Flow Analysis

Derive facts about a programs flow

Loop Bounds

Stefan Bygde Flow Analysis for WCET

slide-19
SLIDE 19

Introduction Value Analysis APARTS Parametric WCET Analysis

Data Flow Analysis

Derive facts about a programs flow

Loop Bounds Infeasible Paths

Stefan Bygde Flow Analysis for WCET

slide-20
SLIDE 20

Introduction Value Analysis APARTS Parametric WCET Analysis

Data Flow Analysis

Derive facts about a programs flow

Loop Bounds Infeasible Paths Possible values for variables etc.

Stefan Bygde Flow Analysis for WCET

slide-21
SLIDE 21

Introduction Value Analysis APARTS Parametric WCET Analysis

Data Flow Analysis

Derive facts about a programs flow

Loop Bounds Infeasible Paths Possible values for variables etc.

Propagate properties of interest through the control flow graph of the program

Stefan Bygde Flow Analysis for WCET

slide-22
SLIDE 22

Introduction Value Analysis APARTS Parametric WCET Analysis Introduction Abstract Interpretation Abstract Domains

Value Analysis

Determine possible values for program variables

Stefan Bygde Flow Analysis for WCET

slide-23
SLIDE 23

Introduction Value Analysis APARTS Parametric WCET Analysis Introduction Abstract Interpretation Abstract Domains

Value Analysis

Determine possible values for program variables Why values?

Stefan Bygde Flow Analysis for WCET

slide-24
SLIDE 24

Introduction Value Analysis APARTS Parametric WCET Analysis Introduction Abstract Interpretation Abstract Domains

Value Analysis

Determine possible values for program variables Why values?

Program flow dependent on values

Stefan Bygde Flow Analysis for WCET

slide-25
SLIDE 25

Introduction Value Analysis APARTS Parametric WCET Analysis Introduction Abstract Interpretation Abstract Domains

Value Analysis

Determine possible values for program variables Why values?

Program flow dependent on values Often necessary to find infeasible paths, or loop bounds or

  • ther constraints on program flow

Stefan Bygde Flow Analysis for WCET

slide-26
SLIDE 26

Introduction Value Analysis APARTS Parametric WCET Analysis Introduction Abstract Interpretation Abstract Domains

Abstract Interpretation

soundly approximating program semantics, applicable in static analysis

Stefan Bygde Flow Analysis for WCET

slide-27
SLIDE 27

Introduction Value Analysis APARTS Parametric WCET Analysis Introduction Abstract Interpretation Abstract Domains

Abstract Interpretation

soundly approximating program semantics, applicable in static analysis Common technique in WCET Analysis

Stefan Bygde Flow Analysis for WCET

slide-28
SLIDE 28

Introduction Value Analysis APARTS Parametric WCET Analysis Introduction Abstract Interpretation Abstract Domains

Abstract Interpretation

soundly approximating program semantics, applicable in static analysis Common technique in WCET Analysis Concretely, derive for each variable and program point

A set of possible values This set is guaranteed to contain all possible values May contain values which are not reached during execution

Stefan Bygde Flow Analysis for WCET

slide-29
SLIDE 29

Introduction Value Analysis APARTS Parametric WCET Analysis Introduction Abstract Interpretation Abstract Domains

Abstract Domains

Represents different ways of approximating set of values

Stefan Bygde Flow Analysis for WCET

slide-30
SLIDE 30

Introduction Value Analysis APARTS Parametric WCET Analysis Introduction Abstract Interpretation Abstract Domains

Abstract Domains

Represents different ways of approximating set of values Compact representation of a set of values

Stefan Bygde Flow Analysis for WCET

slide-31
SLIDE 31

Introduction Value Analysis APARTS Parametric WCET Analysis Introduction Abstract Interpretation Abstract Domains

Abstract Domains

Represents different ways of approximating set of values Compact representation of a set of values Examples:

Stefan Bygde Flow Analysis for WCET

slide-32
SLIDE 32

Introduction Value Analysis APARTS Parametric WCET Analysis Introduction Abstract Interpretation Abstract Domains

Abstract Domains

Represents different ways of approximating set of values Compact representation of a set of values Examples:

Intervals: α({1, 4, 7}) = [1, 7] = {1, 2, 3, 4, 5, 6, 7}

Stefan Bygde Flow Analysis for WCET

slide-33
SLIDE 33

Introduction Value Analysis APARTS Parametric WCET Analysis Introduction Abstract Interpretation Abstract Domains

Abstract Domains

Represents different ways of approximating set of values Compact representation of a set of values Examples:

Intervals: α({1, 4, 7}) = [1, 7] = {1, 2, 3, 4, 5, 6, 7} Congruences: α({1, 4, 7}) = 1 + 3Z = {1 + 3n|n ∈ Z}

Stefan Bygde Flow Analysis for WCET

slide-34
SLIDE 34

Introduction Value Analysis APARTS Parametric WCET Analysis Introduction Abstract Interpretation Abstract Domains

Abstract Domains

Represents different ways of approximating set of values Compact representation of a set of values Examples:

Intervals: α({1, 4, 7}) = [1, 7] = {1, 2, 3, 4, 5, 6, 7} Congruences: α({1, 4, 7}) = 1 + 3Z = {1 + 3n|n ∈ Z}

Abstract domains can be arbitrarily combined for increased precision

Stefan Bygde Flow Analysis for WCET

slide-35
SLIDE 35

Introduction Value Analysis APARTS Parametric WCET Analysis

Static Analysis on Low-Level: APARTS

EU-funded project based on mobility

Stefan Bygde Flow Analysis for WCET

slide-36
SLIDE 36

Introduction Value Analysis APARTS Parametric WCET Analysis

Static Analysis on Low-Level: APARTS

EU-funded project based on mobility Challenge: data-flow analysis on low-level (or executable) code

Stefan Bygde Flow Analysis for WCET

slide-37
SLIDE 37

Introduction Value Analysis APARTS Parametric WCET Analysis

Static Analysis on Low-Level: APARTS

EU-funded project based on mobility Challenge: data-flow analysis on low-level (or executable) code Problems:

Stefan Bygde Flow Analysis for WCET

slide-38
SLIDE 38

Introduction Value Analysis APARTS Parametric WCET Analysis

Static Analysis on Low-Level: APARTS

EU-funded project based on mobility Challenge: data-flow analysis on low-level (or executable) code Problems:

Dynamic control flow

Stefan Bygde Flow Analysis for WCET

slide-39
SLIDE 39

Introduction Value Analysis APARTS Parametric WCET Analysis

Static Analysis on Low-Level: APARTS

EU-funded project based on mobility Challenge: data-flow analysis on low-level (or executable) code Problems:

Dynamic control flow Memory model

Stefan Bygde Flow Analysis for WCET

slide-40
SLIDE 40

Introduction Value Analysis APARTS Parametric WCET Analysis

Static Analysis on Low-Level: APARTS

EU-funded project based on mobility Challenge: data-flow analysis on low-level (or executable) code Problems:

Dynamic control flow Memory model Finite-sized integers

Stefan Bygde Flow Analysis for WCET

slide-41
SLIDE 41

Introduction Value Analysis APARTS Parametric WCET Analysis

Static Analysis on Low-Level: APARTS

EU-funded project based on mobility Challenge: data-flow analysis on low-level (or executable) code Problems:

Dynamic control flow Memory model Finite-sized integers

  • Tech. Report available

Stefan Bygde Flow Analysis for WCET

slide-42
SLIDE 42

Introduction Value Analysis APARTS Parametric WCET Analysis

Problems with Static WCET Analysis

Stefan Bygde Flow Analysis for WCET

slide-43
SLIDE 43

Introduction Value Analysis APARTS Parametric WCET Analysis

Problems with Static WCET Analysis

The execution time of a task is often highly dependent on input

Stefan Bygde Flow Analysis for WCET

slide-44
SLIDE 44

Introduction Value Analysis APARTS Parametric WCET Analysis

Problems with Static WCET Analysis

The execution time of a task is often highly dependent on input The worst-case execution time of a task will correspond to the worst possible input combination

Stefan Bygde Flow Analysis for WCET

slide-45
SLIDE 45

Introduction Value Analysis APARTS Parametric WCET Analysis

Problems with Static WCET Analysis

The execution time of a task is often highly dependent on input The worst-case execution time of a task will correspond to the worst possible input combination

The worst case may not execute in practice Can lead to unnecessary over-estimations, especially when input data is known

Stefan Bygde Flow Analysis for WCET

slide-46
SLIDE 46

Introduction Value Analysis APARTS Parametric WCET Analysis

Parametric WCET analysis

Instead of derive an upper bound as a single number, we derive a formula in terms of some input values

Stefan Bygde Flow Analysis for WCET

slide-47
SLIDE 47

Introduction Value Analysis APARTS Parametric WCET Analysis

Parametric WCET analysis

Instead of derive an upper bound as a single number, we derive a formula in terms of some input values This has several benefits and applications

Stefan Bygde Flow Analysis for WCET

slide-48
SLIDE 48

Introduction Value Analysis APARTS Parametric WCET Analysis

Parametric WCET analysis

Instead of derive an upper bound as a single number, we derive a formula in terms of some input values This has several benefits and applications

If the input data is known, the WCET will be more precise than the global WCET and can be obtained quickly

Stefan Bygde Flow Analysis for WCET

slide-49
SLIDE 49

Introduction Value Analysis APARTS Parametric WCET Analysis

Parametric WCET analysis

Instead of derive an upper bound as a single number, we derive a formula in terms of some input values This has several benefits and applications

If the input data is known, the WCET will be more precise than the global WCET and can be obtained quickly More information on the timing behaviour of the program in general

Stefan Bygde Flow Analysis for WCET

slide-50
SLIDE 50

Introduction Value Analysis APARTS Parametric WCET Analysis

Parametric WCET analysis

Instead of derive an upper bound as a single number, we derive a formula in terms of some input values This has several benefits and applications

If the input data is known, the WCET will be more precise than the global WCET and can be obtained quickly More information on the timing behaviour of the program in general Reusable in different contexts

Stefan Bygde Flow Analysis for WCET

slide-51
SLIDE 51

Introduction Value Analysis APARTS Parametric WCET Analysis

Parametric WCET analysis

Instead of derive an upper bound as a single number, we derive a formula in terms of some input values This has several benefits and applications

If the input data is known, the WCET will be more precise than the global WCET and can be obtained quickly More information on the timing behaviour of the program in general Reusable in different contexts

Quick summary of our methodology:

Stefan Bygde Flow Analysis for WCET

slide-52
SLIDE 52

Introduction Value Analysis APARTS Parametric WCET Analysis

Parametric WCET analysis

Instead of derive an upper bound as a single number, we derive a formula in terms of some input values This has several benefits and applications

If the input data is known, the WCET will be more precise than the global WCET and can be obtained quickly More information on the timing behaviour of the program in general Reusable in different contexts

Quick summary of our methodology:

Perform relational abstract interpretation

Stefan Bygde Flow Analysis for WCET

slide-53
SLIDE 53

Introduction Value Analysis APARTS Parametric WCET Analysis

Parametric WCET analysis

Instead of derive an upper bound as a single number, we derive a formula in terms of some input values This has several benefits and applications

If the input data is known, the WCET will be more precise than the global WCET and can be obtained quickly More information on the timing behaviour of the program in general Reusable in different contexts

Quick summary of our methodology:

Perform relational abstract interpretation Count parametrically the number of possible program states

Stefan Bygde Flow Analysis for WCET

slide-54
SLIDE 54

Introduction Value Analysis APARTS Parametric WCET Analysis

Parametric WCET analysis

Instead of derive an upper bound as a single number, we derive a formula in terms of some input values This has several benefits and applications

If the input data is known, the WCET will be more precise than the global WCET and can be obtained quickly More information on the timing behaviour of the program in general Reusable in different contexts

Quick summary of our methodology:

Perform relational abstract interpretation Count parametrically the number of possible program states Parametrically calculate a formula for the WCET

More can be found in my lic. thesis

Stefan Bygde Flow Analysis for WCET

slide-55
SLIDE 55

Introduction Value Analysis APARTS Parametric WCET Analysis

The end

Thank you!

Stefan Bygde Flow Analysis for WCET