Shared Buffer Implementations of Signal Processing Systems Using Lifetime Analysis Techniques There has been a proliferation of block-diagram environments for specifying and prototyping DSP systems. These include tools from academia, such as Ptolemy, and commercial tools, such We have developed a powerful SDF compiler framework that improves upon our previous efforts demonstrably. By incorporating lifetime analysis into all aspects of scheduling and allocation, the framework is able to generate schedules and allocations that reuse buffer memory, thereby reducing the overall memory usage dramatically. However, in order to produce code competitive to hand-coded implementations, there are many ways in which additional optimization problems can be formulated. One particular problem that has not been addressed is the issue of recognizing regularity that might occur in graphical specifications (for instance, a fine-grained description of an FIR filter). Regularity extraction has been applied in the past to high level synthesis [26] [27], and Keutzer [14] has applied pattern matching algorithms from compiler design to silicon compilers; perhaps these techniques can be applied in the context of SDF compilers. In addition, it would be useful to study techniques that can make use of the regularity implied by the use of hierarchy and graphical higher-order functions [18] in dataflow specifications. Lifetime analysis techniques for sharing memory are well known in a number of contexts. The first is for register allocation in traditional compilers; given a scheduled dataflow graph, register allocation techniques determine whether the variables in the graph can be shared by looking at their lifetimes. In the simplest form, this problem can be formulated as an interval graph coloring problem that has an elegant polynomial-time solution. However, the problem of scheduling the graph so that the overall register requirement is minimized is an NP-hard problem [30] . Register allocation problems are made somewhat simpler because the variables in question all have the same size. The allocation problem becomes NP-complete if variables are of differing sizes, as for example, in allocating arrays of different sizes to memory.. Fabri [8] studies the more general problem of overlaying arrays and strings in imperative languages. Fabri models array lifetimes as weighted interval graphs and uses coloring heuristics for generating memory allocations. She also studies transformation techniques for lowering the overall memory cost;. these techniques attempt to minimize the lower and upper bounds on the extended chromatic number of the weighted interval graph. Some transformation techniques found to be effective for reducing overall storage include the renaming transformation, where by the use of judicious renaming of aggregate variables, lifetimes can be fragmented, allowing greater opportunities for overlaying; the technique of recalculation, where some variables are recalculated when needed, rather than holding them in storage; code motion techniques that reorder the program statements in a semantics preserving manner; and loop splitting.. There are important differences between Fabri's work and ours. Fabri considers general imperative language code, and hence has to solve allocation problems for a more general class of interval graphs. We apply our techniques on SDF graphs, and because the SDF model of computation is restricted, the interval graphs in our problem have a more restricted structure, enabling us to use simpler allocation heuristics more effectively. For instance, the liveness profile of an array in our framework is always periodic (in a certain technical sense), and these periods can be deduced from the SDF graph and the specific class of schedules that we use, whereas in a general setting, liveness profiles may not be periodic, and deducing these profiles can be expensive algorithmically. Also, the SDF model and SDF schedules present unique problems for deducing the liveness profiles, and thus the interval graphs, in an efficient manner; these techniques have not been presented or studied in any previous work. We show that for the important class of single appearance schedules, these deductions can be made in polynomial time in the size of the SDF Also, previous work has not addressed the relationship been loop fusion and the extended chromatic number. Finally, even though certain subsets of the techniques we present in this paper have been studied in the compilers community, to date they have not been used in block-diagram compilers. An additional contribution of this paper is to show that many of the techniques used in traditional compilers can be specialized and applied fruitfully in block diagram based DSP programming environments.. Vanhoof, Bolsens and De Man have observed that in general, the full address space of an array does not always contain live data [33] . Thus, they define an "address reference window" as the maximum distance between any two live data elements throughout the lifetime of an array, and fold multiple array elements into a single window element using a modulo operation in the address calculation. This concept is similar to our use of the maximum number of live tokens as the size of each individual SDF buffer. The number of logically distinct memory elements in a buffer for an edge is equal to , which can be much larger than the maximum number of live tokens that reside on simultaneously [4] .. In a synthesis tool called ATOMIUM, De Greef, Catthoor, and De Man have developed lifetime analysis and memory allocation techniques for single-assignment, static control-flow specifications that involve explicit looping constructs, such as for loops [11] . This is in contrast to SDF, in which all iteration is specified implicitly, and the use of looping is left entirely up to the compiler. However, once a single appearance schedule is specified, we have a set of nested loops. Thus, some relationships can be observed between the lifetime analysis techniques we develop for single appearance schedules, and those of ATOM-IMUM. In particular, the class of specifications addressed by ATOMIUM exhibits more general and less predictable array accessing behavior than the buffer access patterns that emerge from SDF-based single appearance schedules. We exploit the increased predictability of single appearance schedules in our work using novel lifetime analysis formulations that are derived from a tree-based schedule representation. This results in thorough optimization with significantly more efficient (lower complexity) algorithms. Furthermore, through our in-depth focus on the restricted, but useful, class of SDF-based single appearance schedules, we expose fundamental relationships between scheduling and buffer sharing in multirate signal processing systems.. Ritz et al. [29] give an approach to minimizing buffer memory that operates only on flat SASs since buffer memory reduction is tertiary to their goal of reducing code size and context-switch overhead (defined roughly as the rate at which the schedule switches between various actors). We do not take context-switch into account in our scheduling techniques because our primary concern is memory minimization; off-chip memory is often a bottleneck in embedded systems implementations and is better avoided.. Flat SASs have a smaller context switch overhead then nested schedules do, especially if the codegeneration strategy used is that of procedure calls. Ritz et al. formulate the problem of minimizing buffer memory on flat SASs as a non-linear integer programming problem that chooses the appropriate topological sort and proceeds to allocate based on that schedule. This formulation does not lead to any polynomialtime algorithms, and can lead to much more expensive memory allocations than those obtainable through nested schedules. For example, in Section 10, we show that on a satellite receiver example, Ritz's technique yields an allocation that is more than 100% larger than the allocation achieved by techniques developed in this paper. However, the techniques in this paper do not take context-switch overhead into account (since we assume inline code generation, the effect of context switches is arguably less significant), and are thus able to operate on a much larger class of SASs than the class of flat SASs. Also, the techniques in this paper are all provably polynomial-time algorithms.. Goddard and Jeffay use a dynamic scheduling strategy for reducing memory requirements of SDF graphs, and develop an earliest-deadline-first (EDF) type of dynamic scheduler [10] . However, experiments in the Ptolemy system have shown that dynamic scheduling can be more than twice as slow as static schedules [36] ; hence, for many embedded applications, this penalty on throughput might be intolerable.. Sung et al. consider expanding the SAS to allow 2 or more appearances of some actors if the buffering memory can be reduced [31] . They give heuristic techniques for performing this expansion and show that the buffering can be reduced significantly by allowing an actor to appear more than once. This technique is useful since it allows one to trade-off buffering memory versus code size in a systematic way.. SASs will give the least code size only if each actor in the schedule is distinct and has a distinct codeblock that implements its functionality. In reality, however, many actors in the graph will be different instantiations of the same basic actor, with different parameters perhaps. In this case, inline code generated from a SAS is not necessarily code-size optimal since the different instantiations of a single actor could all share the same code [31] . Hence, it might be profitable to implement procedure calls instead of inline code for the various instantiations, so that code can be shared. The procedure call would pass the appropriate parameters. A study of this optimization is done in [31] where the authors formulate precise metrics that can be used to determine the gain or loss from implementing code sharing compared to the overhead of Ade has developed lower bounds on memory requirements of SDF specifications, assuming that each buffer is assigned to separate storage [1] . Exploring the incorporation of buffer sharing opportunities into this analysis is a useful direction for further investigation.. As already mentioned, dataflow is a natural model of computation to use as the underlying model for a block-diagram language for designing DSP systems. The blocks in the language correspond to actors in a dataflow graph, and the connections correspond to directed edges between the actors. These edges not only represent communication channels, conceptually implemented as FIFO queues, but also establish precedence constraints. An actor fires in a dataflow graph by removing tokens from its input edges and producing tokens on its output edges. The stream of tokens produced this way corresponds naturally to a discrete time signal in a DSP system. In this paper, we consider a subset of dataflow called synchronous dataflow (SDF) [17] . In SDF, each actor produces and consumes a fixed number of tokens, and these numbers are known at compile time. In addition, each edge has a fixed initial number of tokens, called delays. A schedule is a sequence of actor firings. We compile an SDF graph by first constructing a valid schedule -a finite schedule that fires each actor at least once, does not deadlock, and produces no net change in the number of tokens queued on each edge. Corresponding to each actor in the schedule, we instantiate a code block or procedure call that is obtained from a library of predefined actors. The resulting We define to be the total number of samples exchanged on edge by actor ; i.e, .

O O O O O O O O B I O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B I O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B I O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B I O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B I O B I O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B I O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B I O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B I O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O


Morphological Diversity and Sparsity for Multichannel Data Restoration Abstract Over the last decade, overcomplete dictionaries and the very sparse signal representations they make possible, have raised an intense interest from signal processing theory. In a wide range of signal processing problems, sparsity has been a crucial property leading to high performance. As multichannel data are of growing interest, it seems essential to devise sparsity-based tools accounting for such specific multichannel data. Sparsity has proved its efficiency in a wide range of inverse problems. Hereafter, we address some multichannel inverse problems issues such as multichannel morphological component separation and inpainting from the perspective of sparse representation. In this paper, we introduce a new sparsity-based multichannel analysis tool coined multichannel Morphological Component Analysis (mMCA). This new framework focuses on multichannel morphological diversity to better represent multichannel data. This paper presents conditions under which the mMCA converges and recovers the sparse multichannel representation. Several experiments are presented to demonstrate the applicability of our approach on This paper addresses several multichannel data recovery problems such as multichannel morphological component decomposition and inpainting. We first need to define with care what multichannel data are. Such data are often physically composed of m observations (a color layer in color images, an observation at a fixed frequency for multispectral data and so on). One classical example of such multichannel data are the hyperspectral data provided by satellite observations; a fixed geographic area is observed at m different frequencies. More formally, we assume that each observation is made of t samples. We will write each observation as a 1 × t row vector {x i } i=1,...,m . For convenience, those m vectors are stacked in a m × t matrix X = [x T 1 · · · x T m ] T . In a wide range of applications, the data X are often degraded by the acquisition system (convolution, missing data to quote a few) and contaminated by additive noise of finite variance. The various restoration problems we address in this paper are modeled as follows:. where F is the degradation mapping, X is the original multichannel data to be recovered and N models noise or model imperfections. The mapping F will depend on the recovery problem.. In the last decade sparsity has been one of the leading concepts in many areas of signal and image processing (restoration [1] , feature extraction [2] , source separation [3] [4] [5] , to name only a few). In a wide range of applications and viewpoints, researchers have advocated the use of overcomplete signal representations. Indeed, the attractiveness of redundant signal representations lies in their ability to sparsely represent a large class of signals. Furthermore, overcomplete representations allow more flexibility in signal representation and entail effectiveness at many signal processing tasks such as restoration, separation, compression, estimation etc. In neuroscience, the mammalian primary visual system has been shown to be probably in need of overcomplete representations [6] .. In our representation, a monochannel row vector signal x ∈ R 1×t is assumed to be the linear combination of T > t signal waveforms or atoms {φ i } i=1,...,T : x = i=1 α i φ i , where α i = φ i , x are called the decomposition coefficients of x in the dictionary = [φ T 1 , . . . , φ T T ] T (the T × t matrix whose lines are the atoms normalized to a unit 2 -norm). The signal x is said to be sparse in if only a few of the entries of the row vector α = [α 1 · · · α T ] are non-zero. We define Λ x , the support of x in , as the set of indices of the non-zero entries in α:. From a heuristic viewpoint, the use of sparse representations are motivated by their ability to compactly represent the structure in the data. For instance, in image processing, a number of dictionaries have been designed that can capture very different features in an image: discrete cosine basis for globally oscillating patterns, wave atoms for local oscillatory textures [7] , wavelets for pointwise singularities [8] , curvelets for edges and contours [9, 10] .. Returning to the problem in (1), a first and somewhat naive approach would consist in treating separately m single-channel restoration problems. 1 However, this is clearly suboptimal since, as we pointed out earlier, the m single channel observations share some joint structure requiring a coherent processing of the m channels simultaneously. For instance, the color layers of color images have often similar patterns. Thus recovering each observation separately is far from being optimal. Such inter-observation structures have to be properly modeled in order to enhance multichannel data restoration. A first sparsity-based solution consists in assuming that each channel must share the same sparsity pattern i.e. the same support in . Such solutions have been proposed for several applications in previous work on multichannel sparse decomposition including [11, 12] , in which all channels are constrained to have a common sparsity pattern, and [13] [14] [15] in which a specific 1 Note that this solution may only hold if the degradation mapping applies on each channel separately:. sparsity measure is used. In this paper, we address a more general problem as we assume no constraint on the sparsity pattern of the different channels. We adopt a different point of view and model inter-observation structures as sparse patterns in a specific representation. The multichannel data are no longer modeled as a concatenation of observations that are individually sparse in a spatial/temporal representation but as a single signal that is sparse in a multichannel representation.. Contributions In this paper we propose solving multichannel data restoration problems within the paradigm of multichannel sparse representations. Section 2 introduces a new sparsity-based framework for analyzing multichannel signals coined multichannel Morphological Component Analysis (mMCA). In Sect. 2.2.1 we enlighten the connections between mMCA and other extensions of sparse decomposition problems to the multichannel case. Section 2.3 extends the MCA algorithm [16, 17] to the multichannel case and introduces convergence results proving the efficiency of mMCA in providing sparse decompositions. Two applications in data recovery issues of the proposed mMCA algorithm are described: multichannel morphological component decomposition in Sect. 3.1 and inpainting in Sect. 3.2. We also put forward a mMCA-based adaptive restoration algorithm to better match the sparse representation to the multichannel data at hand. We recalled the tremendous effectiveness of sparsity-based methods in signal restoration. In this paper we empha- size on multichannel sparse dictionaries to better represent multichannel data. Indeed, more than a concatenation of monochannel signals, multichannel data are spatially and spectrally structured. We introduce a general sparsity-based framework coined multichannel Morphological Component Analysis (mMCA) that accounts for the specific structure of multichannel data. We enlighten the links between mMCA and extensions of general sparse decomposition problems to the multichannel case. New theoretical results are put forward that prove the efficiency of mMCA in providing sparse multichannel decompositions in dictionaries built as a union of tensor products of orthonormal bases. Experiments are given showing that the mMCA framework provides an effective tool for devising sparsity-based solutions to some restoration problems such as multichannel morphological component separation and color image inpainting. We also extend the mMCA algorithm to solve hyperspectral data inpainting issues. An adaptive scheme is also proposed to adapt the sparse representation to data. We illustrate the astounding enhancement provided by such an adaptive algorithm. Future work will be devoted to i) extending the mMCA framework to deal with other inverse problems such as multichannel deconvolution, ii) devising more adaptive mMCA-based algorithm for multichannel data decomposition.

O O O B O B I B O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B O O O O O O O O O O B I O O O O O O O O O O O O O O O B I B O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B I O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B I O O O O O O O O O O O O O O O O O O B I O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B I O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B O O O O O O O O O O O O O O O O O O O O B I O O O O O O O O O O O O O O O O O O O O O O O B O O O O O O O O O O O O O O O B O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B I O O O O O O O O O O O O O O O O B O O O O O O O O O O O O O O O O O O O O B I O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B I B O O O O O O O O O O O O O O B O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B O O O O O O O O O O O O O O O O O O O O O O O O O O B O O O O O O O O O O O O O O O O O O O B O O O O O O O O O O O O O O O O O O O O O O O O B I O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B I B O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B O O O O O O O O O B I O O O O O O O O O O O O B O O O O O O O O O O O O O B I O O O O O O O O B I O O O O O O O O O O O O O O O O O O O O O O O O B I O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B I O


Using Traits of Web Macro Scripts to Predict Reuse To help people find code that they might want to reuse, repositories of end-user code typically sort scripts by number of downloads, ratings, or other information based on prior uses of the code. However, this information is unavailable when code is new or when it has not yet been reused. Addressing this problem requires identifying reusable code based solely on information that exists when a script is created. To provide such a model for web macro scripts, we identified script traits that might plausibly predict reuse, then used IBM CoScripter repository logs to statistically test how well each corresponded to actual reuse.These tests confirmed that the traits generally did correspond to higher levels of reuse as anticipated. We then developed a machine learning model that uses these traits as features to predict reuse of macros.Evaluating this model on repository logs showed that its accuracy is comparable to that of existing machine learning models for predicting reuse-but with a much simpler structure that lends itself to automatically generating explanations of predictions. Further tests revealed that the difference-ofproportions metric used internally by our model to incorporate information from features is more accurate than the traditional entropy-based metric used in most existing models. Sensitivity analysis revealed that our model is quite robust; its quality is greatly reduced only when parameters are set to such extreme values that the model becomes inordinately selective. Testing the model with individual traits showed that the most useful traits were related to author expertise and indicators of mass appeal. Based on these results, we outline opportunities for using our model to improve repositories of end-user code. End users sometimes complete programming tasks by reusing existing code. Examples of reusable code include spreadsheets, educational simulations, and web macros-scripts that automate form-filling and navigation operations in a web browser [15] . Interviews of office workers have revealed the importance of reuse in web macro programming [14] . One motivation for reuse is that copying and customizing a script sometimes is faster than creating one from scratch. Another motivation is that an end user may not know how to perform a task, so a macro not only automates the task, but it also shows how to accomplish the task.. Since not all end-user code is equally reusable, repositories typically provide a few limited features aimed at helping people to find reusable code. For example, many repositories display download counters, ratings, and other popularity measures for each script, as indicators of whether other people have successfully reused scripts. Repositories can also use these popularity measures to help sort search results.. However, using these popularity measures to identify reusable code is problematic, since they depend on information that is available only after at least one person has tried to reuse a script. This is a serious limitation because it introduces a circularity-in order for these tools to help people find useful code, many people must have already found that code.. IBM's CoScripter repository of web macros illustrates these limitations [14] , which are shared by repositories of spreadsheets [35] , educational simulations [31] , and other end-user code. To find a reusable macro in the CoScripter repository, users can sort scripts by number of executions in the past week, number of times scripts have been marked as a "favorite," and similar popularity measures based on prior use. But these measures are unavailable for most scripts. Of the 4681 scripts that are publicly visible as of April 2010, only 27 (0.6%) have been run in the past week, and only 55 (1.1%) have ever been marked even once as a favorite. Consequently, the repository's popularity-based sorting features essentially place the vast majority of scripts in a blanket coarse-grained category of "unpopular" (or perhaps "not yet popular"), thus providing virtually no help in distinguishing reusable code from less reusable code.. Reusability of code must therefore be predicted based on information other than popularity. Prior work has shown that doing so is feasible in the context of professional programming. For example, one approach computes object-oriented metrics that empirically correspond to reusability [1] . This approach is attractive because it operates directly on code, requiring no information about popularity; moreover, most of these metrics are straightforward to compute, so it is easy for a programmer to understand why certain code is identified by the model as reusable while other code is not. While this approach is appropriate for Java-like code, it is not applicable to scripts and spreadsheets that lack object-oriented structure.. Likewise, for similar reasons, it is not possible to apply other existing approaches that rely on types, inheritance hierarchies, call graphs, specifications, or careful documentation.. In order to identify code that is likely to be reusable, we have developed a new model that uses traits of scripts as machine learning features, then predicts whether each script will ever be reused. Unlike popularity-based approaches, our model requires only information that is available at the moment that a script is created (though our model could be extended in future work to also incorporate information generated after script creation); consequently, it can be applied even to code that has not yet been downloaded, marked as a favorite, or otherwise reused or rated. Unlike existing approaches aimed at object-oriented code, the code traits used by our model are extremely simple and do not depend on objectoriented structure, call graphs, types, or similar trappings of the kinds of languages more typically used by professional software engineers. Because our model has a simple structure, it is also potentially conducive to explaining its predictions, and we anticipate that it will even be possible someday to automatically generate explanations to users of why a repository has identified particular end-user scripts as reusable.. To our knowledge, ours is the first model that can provide any prediction about the reuse of scripts in that vast mass of "unpopular" code that repositories currently leave unsorted.. We have tested this model on CoScripter repository logs, showing that it can predict with 70-80% recall (at 40% false positive rate) whether a script will ever be reused-an accuracy comparable to that of comparable models used on similar software engineering problems. It is also robust: when we analyzed the sensitivity of our model to parameter perturbations, we found that model quality was largely unaffected for all but the most extreme parameter values. One reason for its accuracy may be its internal metrics: when comparing different model variants, we found that the difference-of-proportions metric used internally by our model to incorporate information from traits is more accurate than a traditional entropy-based metric commonly used in machine learning models. To understand other reasons for its accuracy, we tested the model's accuracy when trained on individual traits, and learned that the traits with highest usefulness to the model were those related to author expertise and indicators of a script's mass appeal.. The remainder of this paper is organized as follows. In Section 2, we introduce web macro scripting and discuss the limitations of existing models for identifying reusable code. In Section 3, we identify web macro traits that might plausibly serve as predictors of reuse, and we discuss statistical tests aimed at assessing how well these empirically do correspond to levels of reuse. In Sections 4 and 5, we present and evaluate our model that combines script traits to predict reuse. In Section 6, we discuss limitations and threats to validity. In Section 7, we conclude by outlining opportunities for future work, including the development of repository enhancements based on our new model. End-user programmers are the millions of people who, although it is not their main job, create spreadsheets, scripts, and other programs to automate computations and organize data [27] . Web macro scripting is a form of end-user programming that automates repetitive tasks on the web, such as navigating and filling out forms. As we describe in this section, the traits of end users' web macro scripting are such that existing approaches have not addressed the need to identify macros that people would want to reuse.

O O O O O O O O B O O O O O O O O O O B B O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B O O O O O O O O O O O O O O O O O O O O O O O O O O O O B O O O O O O O O O O O O O O O O O B O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B O O O O O O O O O B O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B O O O O O O O O O O O O O O O O O B O O O O O O O O O O O O O O O O O O O O O B O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B I O O O O O O O O O B O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B O O O O O O O O O O B O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B O O O O O O O O O O O O O O O O O B O O O O O O O O O O O O O O O O O B O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B I O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B


On the expressiveness of single-pass instruction sequences Abstract. We perceive programs as single-pass instruction sequences. A single-pass instruction sequence under execution is considered to produce a behaviour to be controlled by some execution environment. Threads as considered in basic thread algebra model such behaviours. We show that all regular threads, i.e. threads that can only be in a finite number of states, can be produced by single-pass instruction sequences without jump instructions if use can be made of Boolean registers. We also show that, in the case where goto instructions are used instead of jump instructions, a bound to the number of labels restricts the expressiveness. With the work presented in this paper, we carry on the line of research with which a start was made in [2] . The working hypothesis of this line of research is that single-pass instruction sequence is a central notion of computer science which merits investigation for its own sake. In this line of research, program algebra is taken for the basis of the investigations. Program algebra is a setting suited for investigating single-pass instruction sequences. It does not provide a notation for programs that is intended for actual programming.. The starting-point of program algebra is the perception of a program as a single-pass instruction sequence, i.e. a finite or infinite sequence of instructions of which each instruction is executed at most once and can be dropped after it has been executed or jumped over. This perception is simple, appealing, and links up with practice. A single-pass instruction sequence under execution is considered to produce a behaviour to be controlled by some execution environment. Threads as considered in basic thread algebra model such behaviours: upon each action performed by a thread, a reply from the execution environment determines how the thread proceeds. A thread may make use of services, i.e. components of the execution environment.. Each Turing machine can be simulated by means of a thread that makes use of a service. The thread and service correspond to the finite control and tape of the Turing machine. The threads that correspond to the finite controls of Turing machines are examples of regular threads, i.e. threads that can only be in a finite number of states. The behaviours of all single-pass instruction sequences considered in program algebra are regular threads and each regular thread is produced by some single-pass instruction sequence. In this paper, we show that each regular thread can be produced by some single-pass instruction sequence without jump instructions if use can be made of services that make up Boolean registers.. The primitive instructions of program algebra include jump instructions. An interesting variant of program algebra is obtained by leaving out jump instructions and adding labels and goto instructions. It is easy to see that each regular thread can also be produced by some single-pass instruction sequence with labels and goto instructions. In this paper, we show that a bound to the number of labels restricts the expressiveness of this variant.. This paper is organized as follows. First, we review basic thread algebra and program algebra (Sections 2 and 3). Next, we present a mechanism for interaction of threads with services and give a description of Boolean register services (Sections 4 and 5). After that, we show that each regular thread can be produced by some single-pass instruction sequence without jump instructions if use can be made of Boolean register services (Section 6). Then, we introduce the variant of program algebra obtained by leaving out jump instructions and adding labels and goto instructions (Section 7). Following this, we show that a bound to the number of labels restricts the expressiveness of this variant (Section 8). Finally, we make some concluding remarks (Section 9). Program algebra is a setting suited for investigating single-pass instruction sequences. In this setting, we have shown that each behaviour that can be produced by a single-pass instruction sequence under execution can be produced by a single-pass instruction sequence without jump instructions if use can be made of Boolean register services. This is considered an interesting expressiveness result. An important variant of program algebra is obtained by leaving out jump instructions and adding labels and goto instructions. We have also shown that a bound to the number of labels restricts the expressiveness of this variant.. Earlier expressiveness results on single-pass instruction sequences as considered in program algebra are collected in [6] . Program algebra does not provide a notation for programs that is intended for actual programming. However, to demonstrate that single-pass instruction sequences as considered in program algebra are suited for explaining programs in the form of assembly programs as well as programs in the form of structured programs, a hierarchy of program notations rooted in program algebra is introduced in [2] . One program notation belonging to this hierarchy, called PGLD g , is a simple program notation, close to existing assembly languages, with labels and goto instructions. We remark that a projection from the set of all PGLD g programs to the set of all closed PGA g terms can easily be devised.. The idea that programs are in essence single-pass instruction sequences underlies the choice for the name program algebra. The name seems to imply that program algebra is suited for investigating programs in general. We do not intend to claim this generality, which in any case does not matter when investigating single-pass instruction sequences. The name program algebra might as well be used as a collective name for algebras that are based on any viewpoint concerning programs. To our knowledge, it is not common to use the name as such.

O O B O O O O O O O O O O O O O B I I O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B I I O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B I I O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B I I O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B I O O O O B I I O O O O O O O B I O O O O O B I I O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B I O O O O O O B I I O O O O O O O O O O O O O O O O O O O O B O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B I O O O O O B I I O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B I I O O O O O O O B I I O O O O O O O O O O O O O O O O O B O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B O O O O B O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O


Separation numbers of trees Let G be a graph on n vertices. Given a bijection f:V(G)->{1,2,...,n}, let |f|=min{|f(u)-f(v)|:uv@?E(G)}. The separation numbers(G) (also known as antibandwidth [T. Calamoneri, A. Massini, L. Torok, I. Vrt'o, Antibandwidth of Complete k-ary trees, Electronic Notes in Discrete Mathematics 24 (2006), 259-266; A. Raspaud, H. Schroder, O. Sykora, L. Torok, I. Vrt'o, Antibandwidth and cyclic antibandwidth of meshes and hypercubes, Discrete Mathematics 309 (2009) 3541-3552] of G is then max{|f|} over all such bijections f of G. We study the case when G is a forest, obtaining the following results. 1.Let F be a forest in which each component is a star. Then s(F)=n-@m2, where @m is the minimum value of @?X|-|Y@? over all bipartitions (X,Y) of F. 2.Let d be the maximum degree of a tree T on n vertices. Then (a)s(T)>=n2-c"1nd, and (b)s(T)>=n2-c"2d^2log"dn, where c"1 and c"2 are absolute constants. We give constructions showing that the bound (a) is asymptotically tight when d is in the range n^1^3=4 is an absolute constant. We also show that for h>=3 and odd d>=3, we have s(T"h^d)=n2-@Q(d^2+dh), where T"h^d is the symmetric d-ary tree of height h, improving the estimates obtained in the first of the above-mentioned references. We let [a, b] denote the set of integers x with a ≤ x ≤ b. By a labeling for a graph G on n vertices we mean a bijection f : V (G) → [1, n] . Let |f | denote min{|f (x) − f (y)| : xy ∈ E(G)}, and let s(G) = max{|f |} over all labelings. We call s(G) the separation number of G. In this paper we seek tight bounds on this parameter when G is a forest, in terms of n and the maximum degree d.. The separation of G is sometimes called the antibandwidth of G since it can be viewed as dual to the well-known bandwidth

B O O O O O O O O O O O O O O O O O O B O O O O B O O O O O O O O B O O O O O O O O O O O O O O O O O O O O O O B O O B O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B O O O O O O O O O O O O O O O O O O O O O O O O O O O O B O O O O O O B O O O O O O O O O O O O B


A hybrid algorithm for constrained portfolio selection problems Abstract Since Markowitz's seminal work on the meanvariance model in modern portfolio theory, many studies have been conducted on computational techniques and recently meta-heuristics for portfolio selection problems. In this work, we propose and investigate a new hybrid algorithm integrating the population based incremental learning and differential evolution algorithms for the portfolio selection problem. We consider the extended mean-variance model with practical trading constraints including the cardinality, floor and ceiling constraints. The proposed hybrid algorithm adopts a partially guided mutation and an elitist strategy to promote the quality of solution. The performance of the proposed hybrid algorithm has been evaluated on the extended benchmark datasets in the OR Library. The computational results demonstrate that the proposed hybrid algorithm is not only effective but also efficient in solving the mean-variance model with real world constraints. In this work, we have proposed an efficient and effective hybrid algorithm (PBILDE) to solve the portfolio selection problem with cardinality, floor and ceiling constraints. The proposed PBILDE algorithm hybridizes a PBIL and a DE to explore and exploit the complex and constrained search space of the problem concerned. It also adopts a partially guided mutation and an elitist strategy to enhance the evolution over the search space. For the unconstrained Table 9 Comparison results of our hybrid algorithm (PBILDE) against Woodside-Oriakhi et al. [56] problem, PBILDE outperforms in almost all instances compared against DE and PBIL with similar or higher computational expenses. It also outperforms other existing approaches in the literature for the constrained problem. Results justify the effectiveness of the elitism and partially guided mutation in PBILDE. The comparison results against the PBIL, DE, as well as several algorithms in the literature again show that the proposed hybrid algorithm is highly competitive in most cases. The proposed PBILDE algorithm may be further extended to solve different PSP models with various constraints in our future work.

O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B I I I O B I O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O


A Simulated Annealing Approach to Approximate Bayes Computations Approximate Bayes Computations (ABC) are used for parameter inference when the likelihood function of the model is expensive to evaluate but relatively cheap to sample from. In particle ABC, an ensemble of particles in the product space of model outputs and parameters is propagated in such a way that its output marginal approaches a delta function at the data and its parameter marginal approaches the posterior distribution. Inspired by Simulated Annealing, we present a new class of particle algorithms for ABC, based on a sequence of Metropolis kernels, associated with a decreasing sequence of tolerances w.r.t. the data. Unlike other algorithms, our class of algorithms is not based on importance sampling. Hence, it does not suffer from a loss of effective sample size due to re-sampling. We prove convergence under a condition on the speed at which the tolerance is decreased. Furthermore, we present a scheme that adapts the tolerance and the jump distribution in parameter space according to some mean-fields of the ensemble, which preserves the statistical independence of the particles, in the limit of infinite sample size. This adaptive scheme aims at converging as close as possible to the correct result with as few system updates as possible via minimizing the entropy production of the process. The performance of this new class of algorithms is compared against two other recent algorithms on two toy examples as well as on a real-world example from genetics. One way of implementing parameter inference in the Bayesian framework is to generate parameter samples from the posterior distribution. where f (θ θ θ) denotes the prior distribution encoding our knowledge about the parameter vector θ θ θ before the experiment, f (y|θ θ θ) is the likelihood function, that is, the probability density of outputs given the parameter vector θ θ θ, evaluated at the measurement vector (data) y, and f (y) is the corresponding prior density of the data. Numerical methods such as the Metropolis algorithm [15] require many evaluations of the likelihood function to generate such a sample. However, for complex stochastic models, the likelihood function is often prohibitively expensive to evaluate. Therefore, in recent years, algorithms have been suggested that generate samples from (1) by sampling model outputs from the likelihood and comparing them with the data rather than evaluating the likelihood. As far as we know, the origin of these algorithms is to be found in population genetics. Tavaré et al. [24] replaced the output of a genetic model by a summary statistic and adopted a rejection technique to generate samples from the posterior. Weiss et al. [26] extended this method sampling a vector of summary statistics and introducing a tolerance for its distance from the observed summary statistics. Thus, their algorithm generates samples from an approximate posterior. Algorithms that generate samples from an approximate posterior via sampling outputs from the likelihood are nowadays called Approximate Bayes Computations (ABC). Marjoram et al. [14] used Markov chains to produce samples from an approximate posterior. Their algorithm combines a random walk in parameter space with drawing from the likelihood and an acceptance/rejection step that accounts for the prior and only accepts moves into an ball around the target y. However, a small static tolerance leads to a high rejection rate. Therefore, Toni et al. [25] suggested using a decreasing sequence of tolerances and letting an ensemble of particles of constant size N evolve towards an approximate posterior. Their algorithm consists of an iteration of importance sampling steps, where each iteration consists of drawing a new ensemble from the old one with weights and subsequent re-sampling. This re-sampling leads to a loss of effective sample size at each iteration step. There are several adaptive versions of ensemble (or particle) ABC algorithms. Beaumont et al. [2] use the empirical variances of the ensemble to adapt the jump distribution in parameter space. Del Moral et al. [5] and Lenormand et al. [11] use the particles' distance from the target to adapt the tolerance. Recent variants of the algorithm of del Moral et al appeared in [10] and [20] . All of the mentioned algorithms generate samples from the probability distribution proportional to f (θ θ θ)f (x|θ θ θ)χ( − ρ(x, y)), where ρ is some metric on the output space and χ denotes the Heaviside function whose value is unity if its argument is non-negative and 0 otherwise. The effect of kernels different from the Heaviside function has been considered, e.g., in [27] . For a recent review on ABC algorithms, the reader is referred to [13] .. In this paper, we present a new class of (adaptive) ensemble algorithms that are of order O(N ) and do not suffer from a loss of effective sample size. The idea is to start with an ensemble of particles drawn from an arbitrary distribution (e.g. the prior) in the product space of parameters and outputs and apply a sequence of Markov kernels, (P k ), each of which having Z −1 ( k )f (θ θ θ)f (x|θ θ θ)e −ρ(x,y)/ k as equilibrium distribution. The key question is then how fast we should decrease k in order to have a fast convergence and at the same time not to acquire an additional bias due to a too fast convergence. This problem is reminiscent of Simulated Annealing, which is one of our sources of inspiration. We will give a convergence proof for a schedule that satisfies. where n is the dimension of the output space and α > 0 is defined in (4) . Furthermore, we will present an adaptive schedule that attempts convergence to the correct posterior while minimizing the required simulations from the likelihood. Both the jump distribution in parameter space and the tolerance are adapted using mean fields of the ensemble. The adaptation of we suggest is motivated from non-equilibrium thermodynamics, where this control parameter is naturally interpreted as a temperature. We adapt according to the particles' distance to the target (energy) in such a way that the entropy production in the system, which is a measure for the waste of computation, is minimized. A first order approximation of the entropy production is calculated using the so-called endoreversibility assumption, which states that the system undergoes only reversible changes, and which is approximately satisfied if either the mixing in parameter space is fast enough or annealing is slow enough. Under this assumption the only source of entropy production is the flow of energy (or rather heat) from the system to the environment, the latter being defined by the control parameter that is used for the transitions and can be interpreted as the temperature of a heat reservoir the system is in contact with. In cases where the influence of the prior on the posterior is strong, we actively control this prior influence with a second control parameter, which allows us to extend the scope of the endoreversibility assumption. Necessary and sufficient conditions for the minimization of entropy production, for endoreversible processes, have been derived in [22] . For sufficiently slow processes, for which a linearity assumption holds, the condition is a constant entropy production rate [19] , which has been applied to Simulated Annealing, e.g., in [18] . In cases where the prior influence on the posterior is small, we go beyond the linearity assumption and suggest a scheme with non-constant entropy production rate.. The tolerance that can be achieved in reasonable time is limited by the dimension of the output space. This deficiency is inherent to all ABC algorithms simply because drawing an output from an -ball around y scales like n . Methods to reduce this bias are investigated elsewhere (see, e.g., [7] , [12] ).. The paper is organized as follows: In Subsect. 2.1, we explain the main idea behind our class of algorithms. In Subsect. 2.2, the explicit scheme together with a convergence proof is given. The adaptive scheme is developed in Subsect. 2.3. Sect. 3 contains an application to two toy models, for which the posterior is available analytically, as well as a comparison with two recent adaptive ABC algorithms [5] , [11] . Sect. 4 contains an application in genetics. Conclusions are drawn in Sect. 5. We have presented a framework of particle algorithms for Approximate Bayes Computations that is inspired by Simulated Annealing. Its main advantage compared to the sequential ABC algorithms the authors are aware of is the fact that it is not based on importance sampling. Therefore, the effective sample size of our algorithms does not decrease over time. As the interactions between the particles in the adaptive algorithm are of mean-field type, the statistical independence of the particles is preserved (see, e.g., [4] ). The cost for this gain of efficiency is the fact that our system is necessarily out of equilibrium. That is, in addition to the bias due to non-zero equilibrium tolerances e 1 and e 2 , we have a bias due to our system being out of equilibrium (i.e. 1 being larger than e 1 ). There is a trade-off between these two kinds of bias reflected in the choice of the tuning parameter v. Choosing a larger v might result in a smaller e 1 , for a given computation time, but in a larger bias of the second kind. Choosing v too large, in combination with too slow mixing in parameter space, expressed through a too small β, might lead to a third kind of bias, a violation of the endoreversibility assumption (13) or (40). This kind of bias is impossible to correct for and has to be avoided by a careful choice of tuning parameters.. In Sect. 2.2 we proved convergence to the correct posterior, for cooling that is slower than a certain inverse power of time. In Sect. 2.3 we presented an adaptive cooling scheme that is designed to achieve convergence to the correct posterior with a minimum of computational effort. Therefore, the control variable e 1 is adjusted according to the particles' distance to the target in such a way that the entropy production in the system, which is a measure for the waste of computation, is minimized. If the prior is important, a second control variable is used to control its influence. Using this adaptive scheme, tuning essentially reduces to the choice of β, related to the mixing speed in parameter space, and v, related to the annealing speed.. In our scheme the characteristic function χ( − ρ(x, y)), which is often used in ABC calculations, is replaced by the Boltzmann factor exp(−ρ(x, y)/ ). With this replacement, moves are not only accepted if they end up in an -ball around the target but they are more likely accepted if they move closer to the target.. Finally, our algorithm is of the order O(N ), with some overhead due to occasional meanfield updates needed for the update of the tolerance(s) and the jump distribution. Importance sampling algorithms are typically of the order O(N 2 ), due to the weighting step, but see the algorithm by del Moral et al [5] , which scales like O(N ). However, all the algorithms mentioned in this article scale like O(N ) with the number of simulations from the likelihood, which is usually the most costly step. Like all sequential ABC algorithms, our scheme is well suited for parallelization.. The overhead, in our scheme, is significantly larger if the prior is informative. Furthermore, in this case, we can only derive an optimal schedule for relatively slow annealing (linearity assumption). For strongly informative priors, a simple ABC rejection algorithm should be considered as an alternative to a sequential schedule.. The biggest disadvantage inherent to all ABC algorithms is that the tolerance leads to a bias that grows with the dimension of the output space n. Therefore, it is important to use summary statistics to reduce the output dimension or employ local approximations of the likelihood, for ABC to be useful for problems with large output dimensions (see, e.g., [7] and [12] ).. Drawing the initial sample for our adaptive algorithm generates, as a side product, a larger sample from the joint prior. In our adaptive scheme we use this prior information, for the redefinition of the metric (14) or to estimate the sample average U( ) and the metric L(U). Note that, at the same time, this information can be used to establish appropriate summary statistics, as described in [7] .

O B I O O B I I B I I O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B I O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B I I O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B I O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B I O O O O O O O O O O O O O O O O O O O O O O O O O O O B O O O O O O O O O O O O O O O O O O O O O B O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B O O O O O O O O O O O O O O O O O O O O O O O O O B O O O O O O O O O B I O O O O O O O O O O O O O O O O O O O O O O O O O O O B O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B I I O O O O B I O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O


Centrality metric for dynamic networks Centrality is an important notion in network analysis and is used to measure the degree to which network structure contributes to the importance of a node in a network. While many different centrality measures exist, most of them apply to static networks. Most networks, on the other hand, are dynamic in nature, evolving over time through the addition or deletion of nodes and edges. A popular approach to analyzing such networks represents them by a static network that aggregates all edges observed over some time period. This approach, however, under or overestimates centrality of some nodes. We address this problem by introducing a novel centrality metric for dynamic network analysis. This metric exploits an intuition that in order for one node in a dynamic network to influence another over some period of time, there must exist a path that connects the source and destination nodes through intermediaries at different times. We demonstrate on an example network that the proposed metric leads to a very different ranking than analysis of an equivalent static network. We use dynamic centrality to study a dynamic citations network and contrast results to those reached by static network analysis. The structure of many complex systems, from biological and social systems to the World Wide Web and more recently the Social Web, can be represented as a network. Ability to * Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. To copy otherwise, to republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. MLG '10, July [24] [25] 2010 Washington, DC, USA Copyright l' 2010 ACM I978-1-4503-0214-2/10/07... $10.00 MLG '10 Washington, DC USA analyze networks in order to identify important nodes and discover hidden structure has led to important scientific and technological breakthroughs. As a single profound example, PageRank [23] algorithm, which ranks Web documents by analyzing the structure of hyperlinks between them, has revolutionized both Internet search and commerce. Network analysis algorithms are also used to discover communities of like-minded individuals [20] , identify influential people [17] and blogs [18] , rank scientists [24] and find important scientific papers [29, 6, 26] . With few exceptions, these metrics and algorithms have been applied to static networks. Realworld networks, however, are dynamic in nature, because their topology can change over time with addition of new nodes and edges or removal of existing ones. This paper defines a novel centrality metric for dynamic networks. The metric generalizes the path-based centrality used in network analysis [4, 12] which measures centrality of a node by the number of paths, of any length, that connect it to other nodes. The dynamic centrality metric exploits an intuition that in order for a message sent by one node in a network to reach another after some period of time, there must exist a path that connects the source and destination nodes through intermediaries at different times. A distinctive feature of this metric is that it is parameterized by factors that set both time and length scale of interactions. These parameters can in some cases be estimated from data. We use dynamic centrality to rank nodes by the number of time-dependent paths that connect them to other nodes in the network. In addition to discovering best connected, or influential, nodes, the method can identify nodes that are most connected to a specific node and, therefore, have highest influence on it. We perform detailed analysis of a toy dynamic network and show that dynamic network analysis can lead to a vastly different ranking than analysis of an equivalent static network. We also study a real-world dynamic network that represents scientific citations data set. We find optimal parameters for the metric by fitting it to the citation chains' temporal and length distributions. We show that dynamic centrality can produce a radically different view of what the important nodes in the network are than static measures and leads to new insights about the structure of the dynamic network.. In Section 2 we review existing research on network analysis and identify challenges in extending it to dynamic networks. We define dynamic centrality in Section 3 and present mathematical formalism that allows us to compute it from the snapshots of the network over time. We demonstrate in Section 3.3 how this metric can be used to rank nodes in a dynamic network. In Sec. 4 we apply dynamic centrality to study the scientific papers citations network and show that dynamic centrality can lead to a drastically different view of importance than analysis performed on an equivalent static network. We have presented a novel formulation of centrality for dynamic networks that measures the number of paths that exist over time in a network. Given snapshots of the network at different times showing the connected nodes, we can calculate dynamic centrality and use this metric to rank nodes by how well connected they are over time to the rest of the network. In addition, we can identify nodes that are best connected to, and therefore, exert most influence on, a given node. We can also vary the time and length scale parameters to identify nodes that are globally or locally connected. Table 2 : List of articles with highest total DC scores for α = 0 and α = 0.2 along with their number of citations (#C) and PageRank (PR) rank.. Dynamic centrality gives a different view of importance in a network than other measures, such as static centrality and PageRank. We illustrated the differences on an example network. In addition, we applied dynamic centrality to study scientific papers citations network. Even though this data set has been extensively studied in the past, we were able to discover interesting new facts, including an influential articles that were overlooked by other approaches.. Citations networks are limited in their dynamics, since edges can only appear, but never disappear. We plan to apply our approach to more general dynamic networks.

B O O B I B O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B O O O O O O O O B O B O O O O O O O O O O O O O O O O O O O O O O O O O O B O O O O O O O O O O O O O O O O O O O O O B O O O O O O O O O O O B O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B O B O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B O O B I O O O O O B O O O O O O O O B O O O O O O O O O O O O O O O O O O O B O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B I O O O B O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B O O O O O O O O O O O B O O O O O O O O O O O O O O O O O O O O O O O O B O B I O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B O O O O O O O O O O O O O O O B O O O O O O O O O O O O O O O B O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B O O O O O O O O O O O O O O O O O O O O O O B I


Towards a VMM-based usage control framework for OS kernel integrity protection Protecting kernel integrity is one of the fundamental security objectives in building a trustworthy operating system (OS). For this end, a variety of approaches and systems have been proposed and developed. However, access control models used in most of these systems are not expressive enough to capture important security requirements such as continuous policy enforcement and mutable process and object attributes. Even worse, most existing protection mechanisms in these systems reside in the same space as the running OS, which unfortunately can be disabled or subverted after an attacker successfully exploits kernel-level vulnerabilities (or features) to compromise the OS kernel. The increasing number of kernel-level rootkit attacks clearly demonstrates this threat.In this paper we present a simple but effective usage control model UCONKI with unique properties of decision continuity and attribute mutability for OS kernel integrity protection. Further, to enforce UCONKI security policies, we propose a virtual machine monitor (VMM) based architecture that is isolated and protected from other untrusted processes inside a virtual machine (VM). We have implemented a proof-of-concept prototype in Linux to demonstrate the feasibility of our approach. Our experiments with 18 realworld kernel rootkits show that our approach is able to successfully detect and prevent all kernel integrity violations from them. Beyond kernel integrity protection, we also explore additional opportunities for general OS security, such as the confinement of process activities as well as the protection of system utility programs at the VMM level. Despite efforts for decades, commodity operating systems (OS) today continue to be buggy, and vulnerabilities such as buffer overflows are frequently found. Exploiting a kernel-level vulnerability not only gives an attacker access to system resources, but also allows the attacker to modify the operating system kernel and important system utilities, hence compromising the integrity of the entire system. Due to the fact that all user applications rely on the integrity of kernel and core system utilities, compromising any part of the kernel leads to complete penetration of the entire system.. A variety of approaches such as [11, 16] have been proposed and deployed to enhance the security and trustworthiness of OS kernel. Unfortunately, most, if not all, existing protection mechanisms reside in the same space as the victim OS kernel. As a result, once an attacker takes control of the machine, the protection mechanism could be potentially disabled or subverted. For example, many security mechanisms use loadable kernel modules to define and enforce access control policies. With the very same OS feature or by exploiting a kernel-level vulnerability, an attacker can directly compromise the underlying access control mechanism so that security checks are disabled or defined security policies are changed [23, 24] .. Typically, kernel integrity protection is achieved through access control mechanisms by confining a process's activities. Several access control models have been developed. Traditional Unix systems implement discretionary access control (DAC) policies with access control lists (ACL's), which however cannot prevent attacks such as Trojan horses [10] . Early mandatory access control (MAC) polices, such as the Bell-LaPadula secrecy policy [6] and the Biba integrity policy [7] , define clear security goals, but are too restrictive for convenient use of applications. These approaches provide insufficient support for data and application integrity, separation of duty and least privilege requirements. Recent efforts at MAC systems (e.g., Flask [22] and SELinux [16] ) use flexible and convenient access control models, but demonstrate that particular secu-rity goals are more difficult to meet. Flexible access control models typically result in more complex policies, so it is more difficult to determine if these policies have desired effects. For example, SELinux supports a variety of policies by using an extended Type Enforcement model [8] for most policy development. However, a typical SELinux system for Linux 2.6.18 has 29 different classes of objects, hundreds of possible operations, and over 50,000 policy rules. Understanding and configuring a policy that guarantees satisfaction of system security goals is nontrivial and difficult even for a security expert.. Another significant shortcoming of existing MAC models in many Unix and Linux systems is that they cannot satisfy increasing security requirements such as continuous authorization enforcement. In traditional access control models, once an authorization decision has been made, there is no further checks during the access process. However, it is desired in many systems where a decision can be revoked after granting if some conditions change during the access. A related aspect of this continuous security check requirement is the update of subject and object attributes. Subject and object attributes are factors to make decisions of access requests by a reference monitor. In dynamic systems, attribute values can be changed, not only because of system administrative purposes, but also, and more importantly, because of the side-effects of historical or ongoing accesses from subjects. Attribute changes, recursively, can result in further decision checks of a granted access or affect future access requests. Note that interactive security properties can be achieved with these two aspects. For example, in a Linux kernel, the system call table contains the addresses of sensitive system functions. Typically, a regular user-level process is not allowed to modify this table, while a legitimate installation of a system component (e.g., anti-virus software) may need to modify the system call table, thus the address space of the table needs to be updated. With traditional access control model such as DAC, any hijacked root process such as a rootkit can change the system call table. Existing MAC policies such as SELinux [16] and LOMAC [11] can prevent this but lack the capability to update object attributes (e.g., system call table function pointers) after a legitimate access. As another example, during a process's sensitive operation such as reading a sensitive data file, the process should be in a "good" running state such that whenever the process's integrity is changed, its access should be revoked immediately since a compromised process can maliciously release data to other entities. Access control models in existing operating systems only enforce integrity check before an access, while continuous security check during the access is not supported.. Aiming to overcome these problems and enhance the trustworthiness of security mechanism, we propose a novel framework with an access control model for policy specification and an enforcement architecture for kernel integrity protection. Specifically, a simple but effective usage control model (UCON) is used in our framework. The decision continuity and attribute mutability properties of UCON can provide flexible and fine-grained access control [17, 26] . To precisely specify kernel integrity policies, we develop an event-based logic model of UCON in this paper called UCONKI. In the enforcement architecture, our approach utilizes virtual machine monitor (VMM) technology to "vertically" control access to sensitive kernel objects in a single virtual machine (VM) running on top of the VMM (as opposed to "horizontal" control across multiple VMs running on the VMM). Access requests must go through the VMM layer. Our VMM-base approach maintains the lowest level accesses to the system and ensures that such accesses can not be compromised by internal processes of a VM. We implement a prototype system to show the feasibility of our framework.. We demonstrate how our architecture and example policy can be used to detect and prevent real-world kernel rootkits. Beyond integrity protection in an OS kernel, we also explore extensions of our model and architecture to support more general security objectives for both OS and user space applications. Our extensions include extra control decision components such as conditions and obligations, authorization attribute management, and trusted policy enforcement.. The remainder of this paper is organized as follows. Section 2 provides the overview of our framework and threat assumptions. Section 3 presents the event-based logic model for UCON. Section 4 describes the proposed VMM-based architecture. Section 5 illustrates an implemented prototype according to our architecture and evaluates some experimental results. Extensions of our model and architecture are investigated in Section 6 for general OS security requirements. Section 7 presents related work on access control models and policy enforcement for OS protection. Section 8 summarizes this paper and presents our ongoing and future work. We present a security framework to protect OS kernel integrity which includes a policy model and an enforcement architecture. To meet flexible and fine-grained authorization requirements, a simple UCONKI model is proposed. We define an event-predicate-action logic model to specify policies for kernel integrity purposes. Our proposed architecture can support attribute mutuality and decision continuity by leveraging the capabilities of strong isolation and resource monitoring of VMMs. We implement a proof-of-concept prototype to demonstrate the effectiveness of our approach. Experiments show that our system can successfully detect and prevent a variety of real-world rootkit attacks.. Based on this framework, we are extending our model and architecture to support general OS security objectives, including the protection of OS resources and services, and user level applications. With the strong expressive power of UCON and increasing capabilities of VMMs, our goal is to build a general framework for OS security. A logic policy model of UCON has been proposed in previous work [26, 27] . In this model, activities performed by subjects and security system are called "actions" without distinctions. In this paper, we consider the activities performed by a subject as "events" and the reactive activities performed by a security system as "actions", which is more intuitive and precise. Another difference in our approach is that we use event-predicate-action (EPA) in our logic specification, and we focus on a higher level access control policies, while previous model focuses on atomic actions and temporal properties during a single usage process.. Traditional MAC polices, such as the Bell-LaPadula secrecy policy [6] and the Biba integrity policy [7] , define clear security goals, but are too restrictive for convenient use of applications. These approaches are very coarse-grained for least privilege requirements. A different form of MAC known as Type Enforcement (TE) [8] offers several advantages over the traditional models. In TE, security policies can be easily customized, and users and individual programs can be easily limited to least privilege through the definition of domains and domain transitions. However, TE also has its limitations. Since the security policy logic is defined through labels and there are no implicit relationships among labels, it would be cumbersome to express a complex Bell-LaPadula or BiBa lattice using TE. TE also does not directly address dynamic security policy requirements, which are often needed in real-world environments. UCON can provide flexible, fine-grained, and dynamic access control. Additional comparison details can be found in previous work [17, 26] .. The policy enforcement mechanisms in the systems, like SELinux [16] , Systrace [19] and Nooks [25] , reside in the same space as the running OS. Once an intruder takes control of the machine, the protection mechanism can be potentially disabled or subverted. An advantage of our mechanism over these systems is that an attacker can not comprise our protection mechanism from a guest VM.. Co-processor based systems, such as the system introduced by Zhang et al. [28] and Copilot [14, 18] , monitor operating system by polling kernel memory periodically. Since they use separate co-processor such as PCI card, and are independently connected to monitor stations, they can reliably detect intrusions and cannot easily be compromised by an attacker with root privilege. While these approaches can perform very efficient detection, they cannot perform any prevention as they cannot interpose the host's executions. Also the view of the monitor is limited to memory. Our VMM based approach not only can detect intrusions but prevent malicious activities by intercepting events in real time. Note that our architecture is derived from a general methodology known as "virtual machine introspection" (VMI) [12] . We point out that VMI is mainly used for intrusion detection purposes, while our architecture is mainly for access control policy enforcement.. The Secure Hypervisor (sHype) [20] project aims to support controlled sharing of resources between VMs on a platform, such as memory, CPU cycles, and network bandwidth. While sHype protects sharing of resources between VMs in a "horizontal" way, our architecture "vertically" controls access to sensitive kernel resources in a single VM running on top of the VMM.

O O O B I O O O B I O O B I O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B I O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B I O O O O O O O O O O O O O B I O O O O O O O O O O O O O B O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B I O O O O B I O O O O O O O O O O O O O O O O O O O O O O O O O O O O B O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B I O O O O O O O O O O O O O O O O O O O O B I O O O O O O O O O O O O O O O O O B I O O O O B I O O O O O O O B I O O O O O O O O O B I O O O B I O O O O O O O O O O O O O O O B I O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B I O O O O O O O O O O O O O B I O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B O O O B I O O O B O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B I O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B I O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B I O O O O O O O O O B I O O O O O O B I O B O O O O O O O O O O O O O B O O O O O B I O O O O O O B I O O O O O O O O B O O O O O O O O O O O O O O O B O O O O O O O O O O O O O O O O O O O O B O O O O O O O O O O O B O O O O O O B O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B I O O O O O O O O O O O O O O O O O O O O O O O O O O O B I O O O O O O O O O O O O O O B O O O O O O O O O O O O O O O O O B I O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B O O O O O O O O O O O O O O O O O O O O O B O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B I O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B O O O O O O B I O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B I O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B