• No results found

This thesis began by examining current techniques in Chapter 2. Current techniques all approach the intractable problem of Worst-Case Execution Time estimation by creating a model of some kind, be it based on measure- ments as from Measurement-Based Techniques (Section 2.2.2) or approx- imation in Static Techniques (Section 2.2.3). The creation of a model is necessary as the systems involved are complicated, and cannot be analysed by exhaustive techniques in any reasonable time. Hence the creation of a simpler model is necessary which is constructed to provide a sound bound on the execution time of a program, typically by means of overapproximation. Focusing on Static techniques, the main approaches used are based on Abstract Interpretation [36] or Symbolic Model Checking [22]. Both of these techniques seek to use some form of approximation in order to reduce the

1. Types of Information: Determine the alphabets used to compactly represent information.

2. Value of Information: Using logical argument and/or experimenta- tion, determine the value of each type of information.

3. Overall Strategy: Decide which information should be discarded during the merging of states.

4. Representation: Pick an appropriate representation to enable the de- sired information to be discarded.

5. Merge Operator : Formally define a lossy merge operator.

6. Recovery Strategy: If necessary, determine how to soundly resolve in- formation which has been discarded.

Figure 6.1: A 6-step process to create a custom compression method

number of states that must be considered during analysis. However, neither approach details how such an approximation can be found, instead leaving it to researchers to identify useful approximations. When a useful approxi- mation is found, for example the approximation of LRU caches by two lists [98], these techniques are immensely powerful. Unfortunately, such approx- imations are hard to find, especially given the fact that there is no method proposed for examining or quantifying the information that is approximated. This results in approximations which have limited scope being proposed, for example the Potential-Leading-Zero (PLZ) approximation of a PLRU cache; while adequate for the Must analysis of a 4-way cache, the PLZ approach cannot fully analyse an 8-way cache.

To propose a solution to this, the thesis introduced the ideas of Lossy Compression in Chapter 3. At the heart of the approximations used by Ab- stract Interpretation and Symbolic Model Checking, the desire is to discard data from a representation which is of low value to the end result. In doing this, the first problem encounter would be a lack of appropriate language to discuss the quantity, value and storage of information in analysis; Informa- tion Theory (Chapter 3) provides this language. This is enhanced by lossless compression algorithms (Section 3.1), which provide techniques to achieve highly efficient representations of data which do not lose any information.

mal methods of Abstract Interpretation and Symbolic Model Checking are used precisely because without using approximations the problems of WCET estimation are intractable. Hence it is necessary to look at Lossy Compres- sion methods (Section 3.2). Lossy Compression utilises the language and ideas of Information Theory in combination with scientific methods to de- termine information that is probably of low value. For example, audio codecs [18, 16] rank the frequencies they encode by how likely it is for the human ear to be able to perceive them. After this ranking is complete, information on frequencies that would not, in that instant, be perceptible is discarded first. This approach is precisely what the use of Abstract Interpretation or Symbolic Model Checking in the WCET is meant to accomplish , but rather than vague guidance provides a concrete method.

Having identified the main problems encountered in creating a lossy compression technique, the main contribution of Chapter 3 is a generic set of instructions for creating a custom lossy compression method for state based problems. When applied to such a problem, the resulting compres- sion method can be used as the basis for either abstract interpretation or symbolic model checking, depending on which technique is more appropri- ate. This method is summarised in Figure 6.1 for easy reference.

To demonstrate that this method is broadly applicable to problems in WCET estimation, it was applied to two unrelated problems: PLRU/HN- MRU Cache Must/May Analysis in Chapter 4 and Loop Bound Analysis in Chapter 5. These problems are typical of WCET Estimation problems as the main challenge to overcome in each is the vast number of possible states to explore. A summary of the application of this method is presented in Table 6.1.

As can be seen in Table 6.1, the same process produces results on both problems, despite the problems not sharing many common features. In fact, the main common features to both problems are the size of the state space to be explored necessitating some form of sound approximation and that not all information is equally valuable. As previously stated, the goal of the generic approach to deriving a custom lossy compression is to be able to reduce the size of the state space while minimising the amount of valuable information discarded. In this regard, the approach is successful in both cases.

Step PLRU-ft Loop Bound Analysis Types of Information Identify pointers, tree

structure, and cache lines

Identify value ranges, excluded values and as- sumptions on variables Value of Information Find that pointers are

least valuable type of data

Find assumptions and excluded values are least valuable

Overall Strategy Discard conflicting in- formation on pointers

Discard data on ex- cluded values / assump- tions when too much data present

Representation Store cache state such that pointers do not af- fect logical positions of cache lines

Store Values Ranges, Exclude values and as- sumptions separately

Merge Operator Merge states which have the same cache lines and tree structure, destroy- ing conflicting pointers

Discard Exclude Ranges / Assumptions if too many are present

Recovery Strategy Consider all possible states

Consider all possible paths

Table 6.1: Comparing the application of using the generic process given in Figure 6.1 on PLRU and Loop Bound Analysis

space is too large for an exhaustive approach and that there exists some type of information which is less valuable than other types of information to the stated goal, it can be inferred that when these two conditions hold the use of lossy compression is appropriate. Specifically, the more information that is of sufficiently low value to the analysis there is, the greater the effect of lossy compression on improving the tractability of the analysis. This is a more specific version of the premise used in Abstract Interpretation and Symbolic Model Checking, where an appropriate approximation must be found. Therefore one can use the generic lossy compression approach as a more guided method for finding such an approximation in problems suspected to be amenable to Abstract Interpretation or Symbolic Model Checking.