## Automatic Derivation of Path and Loop Annotations in Object-Oriented Real-Time Programs (1998)

Venue: | Journal of Parallel and Distributed Computing Practices |

Citations: | 17 - 2 self |

### BibTeX

@ARTICLE{Gustafsson98automaticderivation,

author = {Jan Gustafsson and Andreas Ermedahl},

title = {Automatic Derivation of Path and Loop Annotations in Object-Oriented Real-Time Programs},

journal = {Journal of Parallel and Distributed Computing Practices},

year = {1998},

volume = {1}

}

### Years of Citing Articles

### OpenURL

### Abstract

This paper will present a new method, based on the notion of abstract interpretation, that can be used to derive path and loop annotationsautomatically for object-oriented real-time programs. Normally, these annotations,necessary to get a tight calculation of the worst case execution time (WCET ), must be given manually by the programmer. The method is illustrated by showing the analysis of an example in Smalltalk. Keywords: real-time software, object-oriented programming, execution time analysis. 1 Introduction The execution time of most programs varies, depending on the input data and the system state. For programs with some complexity, it can be hard to find the input data that causes the actual worst case execution time, WCETA . Therefore, measurement is not considered a feasible method in the general case. Instead, static analysis, which from the source code derives WCETC (the calculated worst case execution time), has been proposed by many researchers [PK89, PS90, CBW94, LM95, ...

### Citations

2899 | Scheduling Algorithms for Multiprogramming in a Hard Real-Time Environment
- LIU, LAYLAND
- 1973
(Show Context)
Citation Context ... iteration, and when the loop has terminated. 2.5 Termination of the analysis To guarantee termination of the analysis we will use the fact that a real-time program must terminate within a given time =-=[LL73]-=-. This time budget, T budget , should be a realistic upper time limit for the program on a given hardware. The time budget may be calculated during the design phase and can be seen as part of the spec... |

508 |
Concrete Mathematics: A Foundation for Computer Science
- Graham, Knuth, et al.
- 1990
(Show Context)
Citation Context ..., because a new value for i is calculated once for each loop iteration. A recurrence equation describes a value in terms of earlier ones, plus a boundary value. Recurrences are thorougly described in =-=[GKP89]-=-. The recurrence equation above has an open form, i.e., one has to compute all previous valus to yield the current value. A solution to a recurrence has a closed form which gives the value by a single... |

266 | Calculating the maximum execution time of real-time programs - Puschner, Koza - 1989 |

261 |
Smalltalk-80: The Language
- Goldberg, Robson
- 1989
(Show Context)
Citation Context ...ee basic mechanisms: assignments, message passing and return expressions. Smalltalk supports single inheritance and polymorphism and is dynamically typed. For a presentation of Smalltalk, we refer to =-=[GR89]-=-. When analyzing Smalltalk programs we are interested in the values of variables at different points in the program. We call these points control points, denoted by c 0 ; c 1 ; \Delta \Delta \Delta ; ... |

170 | Performance Analysis of Embedded Software Using Implicit Path Enumeration - LI, MALIK - 1995 |

163 | Experiments with a program timing tool based on source-level t iming schema - Park, Shaw - 1991 |

122 |
Predicting Program Execution Times by Analyzing Static and Dynamic
- Park
- 1993
(Show Context)
Citation Context ...n this way, false paths (non-executable paths) can be identified and excluded from the analysis, thereby making tighter WCETC calculation possible. Examples of this type of annotation can be found in =-=[Par93]-=-. But to give these manual annotations is not always a simple task. It is easy to find small examples where, e.g., the maximum number of iterations in a loop is hard to calculate, and where the depend... |

82 |
Compiler analysis of the value ranges for variables
- Harrison
- 1977
(Show Context)
Citation Context .... 9 myOC do: [:el --- "For each element do" (el ! 100) ifTrue: [ el := el2] " take the square" ifFalse: [ el := el3]. "or take the cube" ]. Fig. 3.5. Program fragment Har=-=rison showed as early as 1977 [Har77]-=-, albeit not using the abstract interpretation framework, that interval range analysis could be used to statically calculate possible values for variables. The results could be used to eliminate redun... |

78 | Deriving annotations for tight calculation of execution time
- Ermedahl, Gustafsson
- 1997
(Show Context)
Citation Context ...as well. As shown in the example, also sizes of collections and other useful information for execution time calculation can be extracted. The method is earlier studied by the author for a subset of C =-=[EG97]-=-. We show by a small example in Smalltalk how the method may be extended to object-oriented languages. One of the goals of the method is to be a part of execution time calculation for RealTimeTalk (RT... |

64 | Accurate static branch prediction by value range propagation
- Patterson
- 1995
(Show Context)
Citation Context ..., indeces out of bounds, and more. He has developed a prototype tool, Syntox, which analyses Pascal programs. Patterson describes an analysis similar to the above used for static branch prediction in =-=[Pat95]-=-. The results from his analysis are useful in compiler optimizations, especially for instruction scheduling, cache optimizations and register allocation. Although he doesn't refer to Cousot and Cousot... |

58 | On the false path problem in hard realtime programs
- Altenbernd
- 1996
(Show Context)
Citation Context ...ecutable paths) can be identified and excluded from the calculation, thus making the WCETC as tight as possible. (However, methods based on symbolic execution can find some dependencies automatically =-=[Alt96]-=-). But to give these manual annotations is an error-prone burden. It is easy to find simple examples where, e.g., the maximum number of iterations in a loop is hard to calculate, and where the depende... |

38 | Integrated Program Proof and Worst-Case Timing Analysis of SPARK - Chapman, Wellings, et al. - 1994 |

30 |
Semantics with Applications
- Nielson, Nielson
- 1992
(Show Context)
Citation Context ...s of a control point, since it can be passed several times in e.g., a loop). The concrete semantics (meaning) of a program is defined in terms of the environments that can be generated by the program =-=[NN92]-=-. We will use a semantic function, [[\Delta]], that takes an environment, oe, and a rule on how to modify (or constrain) the environment and returns a modified environment, oe 0 , i.e. oe 0 = [[rule]]... |

24 |
Abstract interpretation: a unified model for static analysis of programs by construction or approximation of fixpoints
- Cousot, Cousot
- 1977
(Show Context)
Citation Context ...extra values as possible), and efficient (in terms of analysis calculations). We will of course face a trade-off between cost of computation and quality of results. Abstract interpretation techniques =-=[CC77]-=- can be used to define a correct relation between the abstract and the concrete domains. 2.1 Analysis of sequences Sequences of expressions are handled quite straightforward. For each expression, the ... |

20 | Computing maximum task execution times with linear programming techniques - Puschner, Schedl - 1995 |

15 | Discrete loops and worst case performance
- Blieberger
- 1994
(Show Context)
Citation Context ...rom the syntax of the loop construct. There are even unterminating loop constructs which we can identify. This is similar to what Patterson is doing in [Pat95]. Blieberger is studying this problem in =-=[Bli94]-=-, where he defines a new kind of loop, discrete loops, which are more general than for-loops, but still analyzable. Of course, syntactic analysis cannot handle all cases, so we have to rely on semanti... |

10 |
Data Flow Analysis and Global Optimization
- Morel
- 1984
(Show Context)
Citation Context ... semantics of the program. Termination of the analysis of non-terminating programs is guaranteed by defining a time budget for the program. In our analysis of a program we will use data flow analysiss=-=[Mor86]-=- to find out possible variable values at different points in the program. Using this information we can find false paths and calculate minimum and maximum iterations in loops. We will not consider rec... |

6 |
Abstract debugging of high-order imperative languages
- Bourdoncle
(Show Context)
Citation Context ...C language (including pointers, functions and recursion) to yield a range for each variable at each point. Bourdoncle uses abstract interpretation and interval range analysis for "abstract debugg=-=ing" [Bou93]-=-. He tries to find potential errors in programs by calculating values of variables. In this way, he can identify possible division by 0, indeces out of bounds, and more. He has developed a prototype t... |

4 |
Using the worst-case execution analyser
- Forsyth
- 1993
(Show Context)
Citation Context ...olic execution. For example, Altenbernd can find false paths automatically for some simple cases (see [Alt96]). Forsyth uses symbolic execution, program annotations and a notion of execution modes in =-=[For92]-=-. With his method, false paths can be excluded and the WCETC values that are calculated are sensitive to both input data and program modes. However, both Altenbernds and Forsyths methods rely on manua... |

1 |
An operational semantics for Smalltalk
- Maki-Turja, Post, et al.
- 1997
(Show Context)
Citation Context ...imit the calculation cost, we have described some ways to make approximations. Future work includes defining a detailed abstract semantics for the analysis, based on a concrete semantics of Smalltalk =-=[MTPG97]-=-, and to develop a prototype tool. Special consideration will be taken to complexity and how the method scales. n (start) n (end) x (start) x (end) Iter. myOC (end) 1 7 2.0..7.0 5.0..10.0 3 f2, 15.0..... |

1 |
Enkat om realtids industrins syn pa verktyg for exekveringstidsanalys, (inquiry towards the real-time industry of its view of tools for execution time analysis
- Ermedahl, Gustavsson
- 1997
(Show Context)
Citation Context ... The authors are conducting an investigation in Swedish industry to find out what the reality looks like. An inquiry has been answered by 50+ companies working with software for embedded systems (see =-=[EG97b]-=-). The main goal of the investigation was to find out how the companies calculate WCETC today, and their attitude towards a WCETC tool (what functions should be included etc.). A part of the questionn... |

1 |
Jukka Maki-Turja, and Ellus Brorsson. Benefits of type inference for an object-oriented real-time language
- Gustafsson, Post
- 1995
(Show Context)
Citation Context ... non-terminating loop. The first and second requirements are relatively easy to check by a tool. The third requirement can be fulfilled by a type inference/type checker for Smalltalk (see for example =-=[GPMTB95]-=-). The fourth requirement can be handled if the inner loop is analyzable by syntactic analysis. If it has to be analysed by semantic loop analysis (according to section 2.3), it must be analyzed in ea... |

1 |
Generalized constant propagation i C
- Verbrugge, Co, et al.
- 1996
(Show Context)
Citation Context ...nge analysis could be used to statically calculate possible values for variables. The results could be used to eliminate redundant tests, choose data representation, and more. In a more recent paper, =-=[VCH96]-=-, Verbrugge et. al. uses abstract interpretation to statically analyze the full C language (including pointers, functions and recursion) to yield a range for each variable at each point. Bourdoncle us... |