On the expressiveness of implicit provenance in query and update languages Information describing the origin of data, generally referred to as provenance, is important in scientific and curated databases where it is the basis for the trust one puts in their contents. Since such databases are constructed using operations of both query and update languages, it is of paramount importance to describe the effect of these languages on provenance.In this article we study provenance for query and update languages that are closely related to SQL, and compare two ways in which they can manipulate provenance so that elements of the input are rearranged to elements of the output: implicit provenance, where a query or update only provides the rearranged output, and provenance is provided implicitly by a default provenance semantics; and explicit provenance, where a query or update provides both the output and the description of the provenance of each component of the output. Although explicit provenance is in general more expressive, we show that the classes of implicit provenance operations expressible by query and update languages correspond to natural semantic subclasses of the explicit provenance queries.One of the consequences of this study is that provenance separates the expressive power of query and update languages. The model is also relevant to annotation propagation schemes in which annotations on the input to a query or update have to be transferred to the output or vice versa. The provenance of data-its origin and how it came to be included in a database-has recently sparked interest in database research (see e.g., the surveys by Tan [2004] , Bose and Frew [2005] , and Simmhan et al. [2005] ). The topic is particularly important in those scientific databases, sometimes referred to as curated databases, that are constructed by a labor-intensive process of copying, correcting, and annotating data from other sources (the yearly Nucleic Acids Research Database Issue [Galperin 2008 ] lists many examples from molecular biology). Since curated databases are becoming a form of recognized scientific publication, it is vital to ensure that they are of high quality. Provenance records that summarize the construction process leading to the current database state are particularly important in assessing data quality.. Indeed, a good provenance record should provide an adequate description of how the database has evolved over time, when changes have been made, who is responsible for them, which external sources have been consulted or copied, and how these copies have been reorganized or corrected. If errors are discovered, the provenance record should make it possible to identify other copies that may require correction. In addition, some forms of provenance records are intended to ensure repeatability or reproducibility of scientific experiments carried out in silico, and help avoid repeating expensive computations. This is the case, for example, in geospatial information systems and scientific workflow management systems [Bose and Frew 2005; Simmhan et al. 2005] .. In practice, provenance-if it is recorded at all-is usually recorded manually. This adds to the already expensive cost of manual data curation, and the resulting provenance records can easily be incomplete or incorrect. Automated provenance recording support is therefore clearly desirable, and already customized provenance-recording systems have been designed for particular curated databases on a case-by-case basis.. It is not yet well understood, however, what constitutes reasonable correctness conditions for recording provenance, nor is it clear what principles should govern the design of automatic provenance-recording systems. The systems investigated so far employ several different (and often ad hoc) definitions of provenance, based on informal motivations describing where results come from [Wang and Madnick 1990; Buneman et al. 2001; Bhagwat et al. 2005] or what data the result was influenced by [Woodruff and Stonebraker 1997; Cui et al. 2000; Buneman et al. 2001; Green et al. 2007] . What makes these definitions correct, reasonable, or even suitable for a given purpose? So far, work on provenance has not provided clear answers to such questions. To be trustworthy, a system should provide transparent, high-level guarantees concerning the provenance it records. Indeed, a system whose provenance-recording behavior is inconsistent with its user's expectations only gives a false sense of security that adequate provenance information is being recorded when it is not.. So far research on provenance has focused on recording provenance for data returned by queries, or on recording provenance for data updated by means of manual copy-paste operations [Buneman et al. 2006] . However, many applications use database bulk updates as well. In particular, curated databases are often constructed by first copying data from other sources and subsequently adapting this data to address the specific needs of the domain at hand. While the database curator may perform these adaptions using a friendly user-interface, they are nevertheless transparently translated into update statements for execution by the database system. It is therefore also important to study provenance-recording for the bulk-updates present in most database systems.. In this article, we focus on the source tagging [Wang and Madnick 1990 ] and where-provenance [Buneman et al. 2001 ] interpretations of provenance, and develop a semantic foundation that helps to justify the intuition of whereprovenance as showing where the results of queries and updates come from in the input. In particular, we define semantics for query and update languages in which where-provenance is recorded implicitly and characterize the expressiveness of these semantics with regard to a language in which where-provenance records can be constructed explicitly. Our results are an initial and, we believe, significant step towards understanding the semantics of where-provenance in databases.. For brevity, we will refer to the form of where-provenance we will study simply as "provenance" or "implicit provenance" in what follows. We wish to emphasize, however, that our results do not address other kinds of provenance such as lineage [Woodruff and Stonebraker 1997; Cui et al. 2000] , whyprovenance [Buneman et al. 2001] , and how-provenance [Green et al. 2007 ] that aim to describe which parts of the input influenced certain parts of the output. Nevertheless, we believe that comparable semantic foundations can and should be developed for them.. Provenance as color propagation. At the basis of our development lies the following method for linking items in the output of a database operation (be it a query or update) to items in its input [Wang and Madnick 1990; Bhagwat et al. 2005] Figure 1 in which the atomic data values, the records, and the tables R and S themselves are all annotated with identifiers, or colors r, s, r 1 , s 1 , . . . Then the color of an output item can naturally be viewed as a link back to an item in R or S that has the same color. This is illustrated in Figure 2 (Q a ), for example, where the output atom 1 is linked to the atom 1 in R, the record (8, 9) is linked to the second record in R, and so on. The special blank color ⊥ indicates that a data item does not come from the input but was introduced by the query or update that produced Figure 2 (Q a ) itself. This is the case, for example, for the atom 5, the output record (1, 5) , and the output table itself. In this respect, any function mapping colored databases to colored databases can be seen as not only transforming input databases to output databases, but also as recording provenance of the items in the output: the provenance of output item o is simply the input item i with the same color, if it exists. For this reason, we call functions mapping colored databases to colored databases provenance-aware database operations, or pados for short. (A formal definition ensuring basic well-definedness properties of pados is given in Section 4.2.) In general, a pado can produce links that violate certain basic constraints that one would expect to hold for any provenance model describing where data comes from. We therefore introduce the classes of copying and kind-preserving pados. A copying pado can only link o to i if o is an exact copy of i, thereby formalizing a natural intuition that if object o comes from i then i and o are identical. During data curation, however, it is often the case that an item is initially copied from another database, and later restructured by, for example, removing some fields, adding some items, and so on. In this case, o will not be a verbatim copy of i. For that reason, we also introduce the class of kind-preserving pados that can link o to i only if o and i have the same kind of structure. We define two implicit provenance semantics, one for queries and one for updates, that respect these constraints. Provenance. There is a substantial body of research on provenance (also sometimes termed lineage or pedigree) in both database and scientific computing settings, which is nicely surveyed in Bose and Frew [2005] , Simmhan et al. [2005] , and Tan [2004] . Wang and Madnick [1990] introduced a provenance model called Polygen that provides source tagging, associating each field of the output of a query with sets of input locations from which the data was copied (original sources) or whose values influenced the output (intermediate sources). Cui et al. [2000] studied lineage, in which an output tuple is associated with a set of input tuples that influenced the output. These techniques only track the provenance of tuples or fields in flat relational data. Buneman et al. [2001] defined two forms of provenance called why-and where-provenance for queries in a deterministic tree data model. None of these approaches have considered clear, high-level semantic criteria capturing the intuitions behind the motivating terms "comes from" or "influenced by.". The Trio project [Benjelloun et al. 2006 ] has investigated combining tuplelevel lineage with uncertainty and probability information. Green et al. [2007] have introduced a semiring-valued relational model and shown that it generalizes several approaches including set, bag, probabilistic, and incompleteinformation databases. These techniques focus on record-level annotations and are more closely related to why-provenance and lineage. It is not yet clear what semantic guarantees these approaches provide or what guarantees would be desirable. Cheney et al. [2007] have investigated an alternative dependencytracking approach to provenance for N RC; this approach is based on an analogy between data provenance and techniques from programming languages such as dependency analysis and program slicing.. Provenance has also been studied in the geospatial and Grid computing communities [Bose and Frew 2005; Foster and Moreau 2006; Simmhan et al. 2005] . Here, the motivation is to record the execution of a workflow that constructs large data sets in order to avoid repeated computation, detect and track down errors, and provide repeatability. Our model of provenance is fine-grained in that it tracks the origins of individual objects, whereas workflow provenance is typically coarse-grained in that it only tracks macroscopic processing steps involved in producing data files, images, or other aggregate objects.. Annotation. There has also been significant work on annotation in databases that is relevant to provenance. Tan [2003] studied query containment and equivalence in the presence of annotations. The DBNotes system [Bhagwat et al. 2005] propagates annotations through conjunctive SQL queries. DBNotes only considers annotations on atomic values and does not address updates, but their approach to annotation-propagation for queries is closely related to ours. In fact, they consider three annotation-propagation schemes: default, defaultall, and custom. The default propagation is essentially the same as the implicit provenance semantics that we propose for N RC. The default-all propagation scheme combines the annotations propagated by all equivalent queries. For example, the query select A, C from R x where x.A = x.B is rewritten to the union of this and the equivalent (under normal semantics) query select B, C from R x where x.A = x.B. In the custom propagation scheme, the query annotations on any input field can be transferred to any output field, at the option of the user. This is similar to our explicit annotation-propagating queries; however, the induced provenance mapping need not be copying. Geerts et al. [2006] have developed Mondrian, a database system that supports block annotations, in which a color can be associated with a subset of the fields in a record. Mondrian supports an algebra capable of querying data and annotations alike. This algebra is essentially the relational algebra, extended with a few operators providing special annotation-querying behavior. Geerts and Van den Bussche [2007] have studied the expressiveness of such annotation-propagating query languages; they proved expressive complete with regard to relational algebra queries that have explicit access to the block annotations. While this result is superficially similar to ours, the crucial difference lies in the fact that Mondrian queries annotations which may or may not be viewed as provenance, while we propagate annotations in order to define provenance. The expressiveness results are therefore with regard to different classes of explicit queries.

O O O O O B 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 B O O O O O O O O O O O B 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 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 B O O O O O O B O O O B 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 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 B O O O O 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 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 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 O O O O O O O O O O O O O O O O O O O O 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 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 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 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 O O O O O O O O O O O O O O O O O O O O O O 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 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 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 O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O 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 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 B 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 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 B 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 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 B O O O O O O O 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 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 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 B 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 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 B 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 O O O O O O O O O O O O O O O O O O O O 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 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 O O O O O O O O O O O O O O O O O O O O O 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 O O O O O O O O O O O O


An experimental ambiguity detection tool Although programs convey an unambiguous meaning, the grammars used in practice to describe their syntax are often ambiguous, and completed with disambiguation rules. Whether these rules achieve to the removal of all the ambiguities while preserving the original intended language can be difficult to ensure. We present an experimental ambiguity detection tool for GNU Bison, and illustrate how it can assist a grammatical development for a subset of Standard ML. With the broad availability of parser generators that implement Generalized LR (GLR) (Tomita, 1986) or the Earley (1970) algorithm, it might seem that struggles with the dreaded report grammar.y: conflicts: 223 shift/reduce, 35 reduce/reduce are now over. General parsers of these families simulate the various nondeterministic choices in parallel with good performance, and return all the legitimate parses for the input (see Scott and Johnstone (2006) for a survey).. What our naive account overlooks is that all the legitimate parses according to the grammar might not always be correct in the intended language. With programming languages in particular, a program is expected to have a unique interpretation, and thus a single parse should be returned. Nevertheless, the grammar developed to describe the language is often ambiguous: ambiguous grammars are more concise and readable (Aho et al., 1975) . The language definition should therefore include some disambiguation rules to decide which parse to choose.. In this paper, we present a tool for GNU Bison (Donnely and Stallman, 2006) 1 that pinpoints possible ambiguities in context-free grammars (CFGs). Grammar and parser developers can then use the ambiguities reported by the * Expanded version of an article presented at the 7th Workshop on Language Descriptions, Tools and Applications (LDTA'07). Published in Science of Computer Programming 75(1-2): 71-84, 2010. doi:10.1016/j.scico.2009.07.002 .. 1 The modified Bison source is available from the author's webpage, at the address http: //www.lsv.ens-cachan.fr/ ∼ schmitz/.. tool to write disambiguation rules where they are needed. Since the problem of finding all the ambiguities in a CFG is undecidable (Cantor, 1962; Chomsky and Schützenberger, 1963; Floyd, 1962) , our tool implements a conservative algorithm (Schmitz, 2007) : it guarantees that no ambiguity will be overlooked, but it might return false positives as well. We attempt to motivate the use of such a tool for grammatical engineering (Klint et al., 2005) .. • We first describe a well-known difficult subset of the syntax of Standard ML (Milner et al., 1997 ) (Section 2.1) that combines a genuine ambiguity with a LR conflict requiring unbounded lookahead (Section 2.2). A generalized parser parses correctly the corresponding Standard ML programs, but might return more than one parse (Section 2.3).. • We detail how our tool identifies the ambiguity as such and discards the conflict (Section 3) before succinctly presenting the algorithm we employ.. • We put our technique to the test and compare it experimentally with other conservative ambiguity methods (Section 4).. • Finally, we examine the shortcomings of the tool and provide some leads for its improvement (Section 5). Our ambiguity checking algorithm attempts to find ambiguities as two different parse trees describing the same sentence. Of course, there is in general an infinite number of parse trees with an infinite number of derived sentences, and we make therefore some approximations when visiting the trees.. We consider here approximations based on LR(0) items: a dot in a grammar production − → ⋅ can also be seen as a position in an elementary tree-a tree of height one-with root and leaves labeled by . When moving from item to item, we are also moving inside all the syntax trees that contain the corresponding elementary trees. The LR(0) item approximation is such that positions represented by the same item are considered as identical regardless of their actual context; Figure 5 presents two such equivalent positions in a derivation tree. We call this equivalence relation item 0 .. In order to find potential ambiguities modulo our approximation, we further need to walk through the derivation trees. With LR(0) items, this means that we can move inside a dotted production without any loss of precision, but that upwards moves are performed regardless of any context. These eligible single moves from item to item are in fact the transitions in a nondeterministic LR (0) automaton (thereafter called LR(0) NFA). All the moves from item to item that we describe in the following can be checked on the trees of Figures 2 and 3.. Since we want to find two different trees, we work with pairs of concurrent items, starting from a pair ( − → ⋅ ⟨dec⟩ $, − → ⋅ ⟨dec⟩ $) at the beginning of all trees, and ending on a pair ( −. these, we pair items that could be reached upon reading a common prefix of a sentential form, hence following trees that derive the same sentence modulo our approximations.. The notion of equivalence of positions in derivation trees is the basis for a framework for context-free grammar approximations, which generalizes more complex constructions, like the item Π equivalence of LR-Regular parsers (Čulik and Cohen, 1973; Heilbrunner, 1983) . The LR(0) NFA is a special case of a more general position automaton that abstracts left-to-right walks inside the grammar trees. Our algorithm in its full generality guarantees that all ambiguities are caught for any such position automaton (Schmitz, 2007) . The paper reports on an ambiguity detection tool. In spite of its experimental state, the tool has been successfully used on a very difficult portion of the Stan-dard ML grammar. The tool also improves on the dreaded LALR(1) conflicts report, albeit at a much higher computational price.. We hope that the need for such a tool, the results obtained with this first implementation, and the solutions described for the current limitations will encourage the investigation of better ambiguity detection techniques. The integration of our method with the one designed by Brabrand et al. is another promising solution.

O O 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 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 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 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 O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O


Fast direction-aware proximity for graph mining In this paper we study asymmetric proximity measures on directed graphs, which quantify the relationships between two nodes or two groups of nodes. The measures are useful in several graph mining tasks, including clustering, link prediction and connection subgraph discovery. Our proximity measure is based on the concept of escape probability. This way, we strive to summarize the multiple facets of nodes-proximity, while avoiding some of the pitfalls to which alternative proximity measures are susceptible. A unique feature of the measures is accounting for the underlying directional information. We put a special emphasis on computational efficiency, and develop fast solutions that are applicable in several settings. Our experimental study shows the usefulness of our proposed direction-aware proximity method for several applications, and that our algorithms achieve a significant speedup (up to 50,000x) over straightforward implementations. Measuring node proximity is a fundamental problem in many graph mining settings. While most of existing measurements are (implicitly or explicitly) designed for undirected graphs; edge directions in the graph provide a new perspective to proximity measurement: measuring the proximity from A to B; rather than between A and B (See Figure 1) . Here, we study the role of direction in measuring proximity on graphs. To be specific, we will try to answer the following questions in this paper: We begin (Section 2) by proposing a novel direction-aware proximity definition, based on the notion of escape probability of random walks. It is carefully designed to deal with practical problems such as the inherent noise and uncertainties associated with real life networks. Moreover, the proposed definition is generalized to measure group proximities by defining group escape probability. Then, in Section 3, we address computational efficiency, by concentrating on two scenarios: (1) the computation of a single proximity on a large, disk resident graph (with possibly millions of nodes). ( 2) The computation of multiple pairwise proximities on a medium sized graph (with up to a few tens of thousand nodes).. For the former scenario, we develop an iterative solution to avoid matrix inversion, with convergence guarantee. For the latter scenario, we develop an efficient solution, which requires only a single matrix inversion, making careful use of the so-called block-matrix inversion lemma. Finally (Sections 4-5), we apply our directionaware proximity to some real life problems. We demonstrate some encouraging results of the proposed direction-aware proximity for predicting the existence of links together with their direction. Other applications include directed center-piece subgraphs, and attribute graphs. In this work, we study the role of directionality in measuring proximity on graphs. We define a direction-aware proximity measure based on the random walk notion of escape probability. This measure naturally weights and quantifies the multiple relationships which are reflected through the many paths connecting node pairs. Moreover, the proposed proximity measure is carefully designed to deal with practical situations such as accounting for noise and facing partial information. A useful generalization of the measure deals with proximity between groups of nodes.. Given the growing size of networked data, a good proximity measure should be accompanied with a fast algorithm. Consequently we offer fast solutions, addressing two settings. First, an iterative algorithm, with convergence guarantee, to compute a single node-to-node proximity value on a large graph. Second, an accurate algorithm that computes all (or many) pairwise proximities on a medium sized graph. These proposed algorithms achieve orders of magnitude speedup compared to straightforward approaches, without quality loss.. We have studied the applications of the proposed proximity measure to real datasets. Encouraging results demonstrate that the measure is effective for link prediction. Importantly, being directionaware, it enables predicting not only the existence of the link but also its direction. Another application is the so-called directed center-piece subgraph, where we employ the proposed proximity measure to carefully select presentable subgraphs that capture relations among a set of query nodes. In addition, our proposed group proximity is useful to explore the relationship among attributes by building Attribute Graph. In the literature, there are several measures of node proximity. Most standard measures are based on basic graph theoretical concepts -the shortest path length and the maximum flow. However the dependency of these measures on a single element of the graph -the shortest path or the minimum cut -makes them more suitable to managed networks, but inappropriate for measuring the random nature of relationships within social networks or other self organizing networks. Consequently, some works suggested more involved measures such as the sink-augmented delivered current [6] , cycle free effective conductance [15] , survivable network [11] , random walks with restart [14, 17] and more. Notice that none of the existing methods meets all the three desirable properties that our approach meets: (a) dealing with directionality, (b) quality of the proximity score and (c) scalability.. Graph proximity is an important building block in many graph mining settings. Representative work includes connection subgraph [6, 15, 19] , personalized PageRank [13] , neighborhood formulation in bipartite graphs [18] , content-based image retrieval [14] , cross modal correlation discovery [17] , the BANKS system [1] , link prediction [16] , detecting anomalous nodes and links in the graph [18] , ObjectRank [2] and RelationalRank [9] .

O O B O B I O O B O O O B O O O O O O O B O O O O O O O O O O O O O O B I O O O B I O B 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 B 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 B B O O B O O O O O O O B 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 B 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 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 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 B O O O B O O O O O O O O O B O O O O O O O B O O O 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 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 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 B 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 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 O O 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 B 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 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 B 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 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 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 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 B O O O O O B O O O O O O O B I 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 B I O O O O O O O O O O O O O O O O O O


Online oblivious routing We consider an online version of the oblivious routing problem. Oblivious routing is the problem of picking a routing between each pair of nodes (or a set of flows), without knowledge of the traffic or demand between each pair, with the goal of minimizing the maximum congestion on any edge in the graph. In the online version of the problem, we consider a "repeated game" setting, in which the algorithm is allowed to choose a new routing each night, but is still oblivious to the demands that will occur the next day. The cost of the algorithm at every time step is its competitive ratio, or the ratio of its congestion to the minimum possible congestion for the demands at that time step.We present an algorithm that is (1 + ) competitive with respect to the best algorithm that uses a single routing for the entire sequence of days (known as the optimal static routing). Our result is a strengthening of the recent result of Azar et al [4] , who gave a polynomial time algorithm to find an oblivious routing with the best possible competitive ratio, in that our algorithm achieves a competitive ratio arbitrarily to close to that of Azar et al [4] , while at the same time performing nearly as well as the optimal static routing for the given sequence of demands 1 . Routing virtual circuits in undirected networks is a widely studied problem. Given a graph G, an instance of the problem is a sequence of requests, where each request consists of a source-sink pair (i, j) and a bandwidth requirement d(i, j). For each request, the algorithm is required to specify a flow or path for routing traffic from i to j. The goal is to minimize edge congestion, or the total bandwidth consumed on any link. In this paper we will be considering only the fractional version of this problem (a routing is a collection of flows).. Algorithms designed for this problem can be broadly classified into two kinds, oblivious and adaptive. An oblivious algorithm is one which determines a collection of flows, one for each source-sink pair (i, j), without any knowledge of the demands. An adaptive algorithm on the other hand, on receiving the demand d(i, j), picks a flow for (i, j) based on demands seen previously. As expected, adaptive algorithms can obtain a "better quality" routing in comparison to oblivious algorithms. However, oblivious algorithms are attractive in that they can be computed in advance, have low implementation overhead and can be implemented in a fully distributed manner.. We use competitive analysis to judge the performance of an algorithm. Given the sequence of demands d, let r * d be the routing for which the maximum edge congestion is minimized. An algorithm (or, routing r) is called α-competitive with respect to r * d , if the maximum congestion under r is at most α times that under r * d . Räcke [16] showed that for every undirected graph G, there exists an oblivious routing that is O(log 3 n) competitive for any set of demands. Very recently, Azar et al. [4] gave a polynomial time algorithm that, given the graph G, computes the routing with the best possible competitive ratio for that graph using the ellipsoid method. We call this routing the minimax optimal routing ρ(G), and its competitive ratio, the minimax optimal cost. We use this terminology because the problem can naturally be thought of as an (exponentialsize) matrix game, in which the rows correspond to routings, the columns correspond to sets of demands, and the matrix entries contain the competitive ratio of that algorithm on that input.. In this paper we consider a strengthening of Azar et al's result in the following way. Suppose that each day we are faced with an oblivious routing problem on the same graph G. As before, we want to be competitive against the optimal routing, irrespective of the set of demands. However, if it turns out the demands do have some particular structure, or come from some non-adversarial distribution, then we would like our algorithm to get the best possible competitive ratio on those types of demands.. We formulate the problem as the following online game: We have a network where requests are to be routed obliviously. However, the routing can be changed from day to day. On the morning of day t, the network administrator chooses an "oblivious routing of the day", given by the routing r t . During the day requests arrive according to the vector of demands d t and are routed according to r t . At the end of the day the administrator incurs a cost c t , which is equal to the competitive ratio of the routing r t with respect to the optimal routing for demand vector d t . The goal of the administrator is to minimize the average competitive ratio over all days. The routing problem has been widely studied in both adaptive and oblivious models. The best known adaptive algorithm for general graphs is due to Aspnes et al [1] , who give a log n competitive centralized algorithm. Awerbuch et al [3] achieve the same competitive ratio in a distributed setting.. In the oblivious model, it is well known that deterministic approaches (which must select a single path for each demand) perform very poorly in the worst case [6, 11] . This motivates the use of randomization. A randomized oblivious routing algorithm specifies a probability distribution on the paths between i and j for every (i, j) pair. We will view this as selecting a multi-commodity flow on the graph, and routing each packet probabilistically according to its flow densities.. Until recently, oblivious routing algorithms with good worstcase guarantees were known only for specific types of networks [18, 13] . However, Räcke [16] recently obtained a rather surprising result which implies the existence of a good randomized oblivious routing for every undirected graph. Azar et al [4] extend this work to give an algorithm based on the ellipsoid method that finds this minimax optimal routing in polynomial time.. Our online oblivious variant of the problem is closely related to the online convex programming problem, defined and studied by Kalai and Vempala [12] and Zinkevich [21] . The online convex programming problem is defined as follows: At each time step the algorithm is required to pick a vector x t ∈ F where F is a convex set. The adversary then presents the algorithm with a convex function c t . The cost incurred by the algorithm is c t (x t ), and the objective of the algorithm is to minimize the sum of costs over all time steps. This setting is closely related to the problem of prediction and regression under linear loss functions (see [8, 19, 20] and references therein), and the previously-mentioned problem of designing nearly-optimal strategies for repeated games [17, 7] . We review the algorithm of Zinkevich [21] in detail in Section 3 and adapt it to our setting.. The framework of online convex programming is general enough that it allows us to consider several interesting ex-tensions of the problem. For example, instead of minimizing the total cost (in our case, the competitive ratio) over all days, one can consider minimizing some convex function of these costs, that penalizes high costs very heavily. Alternatively, we can consider minimizing the sum of costs subject to the constraint that the cost incurred by the algorithm is no more than twice the minimax optimal cost. We discuss these extensions in Section 5.. The rest of this paper is organized as follows: We begin with a description of the problem and notation in section 2. Section 3 describes an algorithm for the online convex programming problem due to Zinkevich [21] . In section 4, we present our main result: a (1 + )-competitive algorithm for the online oblivious routing problem. In section 5, we extend our basic algorithm to other cost functions and optimization objectives. We conclude in section 6.

B B I O O O B B O O B I O B I O O O O O O B 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 B O O O O O B O O B B O O O O O O O B 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 B O O B 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 B O O O O O O O O O O O B O O O O B O O O B 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 B O B 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 B O O O B O O O O B O O O O B O O 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 O O O B O O O O O O O O O B 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 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 B O O O O O O O O O O O O O O O O O B 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 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 O O O O O O B O O B O O O O O O O O O B O O O O O B O O O B O 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 B 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 B O B O O O B O O O B O O O O O O O O B O O O O O O O B 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 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 O O O 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 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 B O O O O O O O O O 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 B 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 O O O O O O O O O O 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 B 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 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 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 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 B 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 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 B O O O O O O O O O O B O O O O O O O O O O B O B 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 B 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 B 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 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 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 B 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 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 B O O B B I O O O O O O O O B O O B O O O O O O O O O


Finite elements modelling of scattering problems for flexural waves in thin plates: Application to elliptic invisibility cloaks, rotators and the mirage effect Abstract. We propose a finite elements algorithm to solve a fourth order partial differential equation governing the propagation of time-harmonic bending waves in thin elastic plates. Specially designed perfectly matched layers are implemented to deal with the infinite extent of the plates. These are deduced from a geometric transform in the biharmonic equation. To numerically illustrate the power of elastodynamic transformations, we analyse the elastic response of an elliptic invisibility cloak surrounding a clamped obstacle in the presence of a cylindrical excitation i.e. a concentrated point force. Elliptic cloaking for flexural waves involves a density and an orthotropic Young's modulus which depend on the radial and azimuthal positions, as deduced from a coordinates transformation for circular cloaks in the spirit of Pendry et al. [Science 312, 1780[Science 312, (2006], but with a further stretch of a coordinate axis. We find that a wave radiated by a concentrated point force located a couple of wavelengths away from the cloak is almost unperturbed in magnitude and in phase. However, when the point force lies within the coating, it seems to radiate from a shifted location. Finally, we emphasize the versatility of transformation elastodynamics with the design of an elliptic cloak which rotates the polarization of a flexural wave within its core. In 2006, Pendry et al. have shown that by surrounding a finite size object with a coating consisting of a metamaterial, we can render this system transparent to electromagnetic radiation [1] . The cornerstone of this work is the geometric transformation. where r ′ , θ ′ and z ′ are radially contracted cylindrical coordinates and (x,y,z) is the Cartesian basis. This transformation maps the disk D R 2 \{0} = {r : 0 < r ≤ R 2 } onto an annulus D R 2 \D R 1 = {r : R 1 ≤ r ≤ R 2 }. In other words, if a source located in R 2 \D R 2 radiates in vacuum, the electromagnetic field cannot reach the disk D R 1 and therefore this region is a shelter for any object. In layman terms, a point in the space is transformed into a disc leading to the creation of a hole in the physical space where waves cannot penetrate from outside but are guided around this area in a way that anything we put inside this disc would be invisible to exterior observers, in the context of electromagnetism [1] [2] [3] [4] [5] , or neutral, in the context of elastodynamics [6] [7] [8] [9] [10] [11] [12] . From a geometric point of view, the change of coordinates means that in the annulus we should work in a stretched space with associated metric tensor T = J t rr ′ J rr ′ /det(J rr ′ ), (1.2) with J rr ′ = ∂(r,θ,z) ∂(r ′ ,θ ′ ,z ′ ). the Jacobian of the transformation from free to contracted cylindrical coordinates, J t rr ′ its transpose and det(J rr ′ ) its determinant. In terms of material parameters, the only thing to do in the annulus is to replace the material (homogeneous and isotropic) by an equivalent one that is inhomogeneous (its characteristics are no longer piecewise constant but merely depend on r ′ , θ ′ , z coordinates) and anisotropic ones (tensorial nature) whose properties are given by [3, [13] [14] [15] ε ′ = εT −1 , and µ. Variants of this formula appear in many instances in the existing literature, such as in the book on the geometry of electromagnetism by Post, back in 1962 [16] . However, it seems that Pendry and Ward were the first ones to apply it to simplify the computational analysis of certain types of photonic materials in 1996 [17] . The diagonalised form of the tensors ε ′ = Diag(ε r ,ε θ ,ε 3 ) and µ ′ = Diag(µ r ,µ θ ,µ 3 ) was given in [1] . Mimicking the heterogeneous and anisotropic nature of the tensors of permittivity and permeability given by eq. (1.4) became possible only when Pendry suggested the use of newly discovered metamaterials which are composite structures manufactured for their exotic properties enabling one to control the electromagnetic field. A team lead by Pendry and Smith implemented this idea using a metamaterial consisting of concentric layers of Split Ring Resonators (SRR), which made a copper cylinder invisible to an incident plane wave at 8.5 GHz as predicted by the numerical simulations [2] . Independently, Leonhardt studied conformal invisibility by solving the Schrödinger equation which is valid in the geometric optics limit [18] .. A different path to invisibility was followed by McPhedran et al. [19] who proposed to cloak a countable set of line sources using anomalous resonance when it lies in the close neighbourhood of a cylindrical coating filled with a negative index material which is nothing but a cylindrical version of the celebrated perfect lens of Sir John Pendry [20] .. An impedance matching route to invisibility was further developed by Alu and Engheta [21] . Although very promising, their proposal relies on a specific knowledge of the material properties of the object being concealed. Recently, these authors gave the experimental proof of their idea [22] .. Other routes to invisibility are based on homogenization; A team led by Shalaev [4] has shown the possibility to make an object nearly invisible in TE polarization. A reduced set of material parameters was introduced to relax the constraint on the permeability, thus leading to an impedance mismatch with vacuum which was shown to preserve the cloak effectiveness to a good extent.. Farhat et al. [23] analyzed cloaking of transverse electric (TE) fields through homogenization of radially symmetric metallic structures. The cloak consists of concentric layers cut into a large number of small infinitely conducting sectors which is equivalent to a highly anisotropic permittivity. This structure was shown to work for different wavelengths provided they are ten times larger than the outermost sectors.. Soon after, Cummer and Schurig [6] analyzed the 2D acoustic cloaking for pressure waves in a transversely anisotropic fluid by exploiting the analogy with TE electromagnetic waves. Torrent and Sanchez-Dehesa [7] subsequently investigated this cloaking for concentric layers of solid lattices behaving as anisotropic fluids in the homogenization limit. Using a similar approach, Farhat et al. [8] independently demonstrated cloaking of surface liquid waves using a micro-structured metallic cloak which was experimentally validated at 10 Hz. Quite remarkably, Chen and Wu [9] and Cummer et al. [24] noticed that a 3D acoustic cloaking for pressure waves in a fluid can be envisaged since the wave equation retains its form under geometric changes.. However, when one moves to the domain of elastodynamics, Milton, Briane and Willis [10] have shown that the governing equations are not invariant under coordinate transformations and consequently that if cloaking exists for such type of waves, it would be of a different nature than its acoustic and electromagnetic counterparts. Indeed, the equation of propagation of elastic waves in solids (Navier equation) with a time harmonic dependence can be written in the weak form:. where u(x,y,z,t) = u(x,y,z)e −iωt , is the three-component vector displacement field, ρ 0 is the scalar density of the elastic medium, C is the rank 4 elasticity tensor, ω is the wave angular frequency, and t is the time. Moreover, Milton, Briane and Willis noticed [10] that by introducing the geometric trans- . which importantly preserves the symmetry of the new elasticity tensor C ′ +S ′ . However, this transformed equation contains S ′ and D ′ which are two rank 3 (symmetric) tensors such that D ′ pqr = S ′ qr p and ρ ′ pq is a rank 2 tensor whose expressions can be found in [10] . Nevertheless, Brun, Guenneau and Movchan recently discovered that if one does not constrain the symmetry of the elasticity tensor, equation (1.7) takes the form for the case of fully coupled in-plane shear and pressure waves:. where C ′ is a rank four tensor with only the main symmetries and ρ ′ a scalar quantity, both of them spatially varying, see [11] . Farhat, Guenneau, Enoch and Movchan further considered the case of biharmonic bending waves propagating in thin plates and have shown that by considering a radially dependent isotropic mass density and a radially dependent and orthotropic flexural rigidity, it was possible to extend cloaking by refraction to the case of out-of-plane elastic waves [25] .. In this paper, we give a numerical analysis of the biharmonic problem based on the Finite Elements Method (FEM) which is an approximation technique for the partial differential equations (PDE) and require a variational formulation of the problem to be studied (expressing expressions in a weak form). Indeed, the COMSOL formulation of the fourth order biharmonic equation is given, supplied with appropriate boundary conditions (clamped or stress-free) and Perfectly Matched Layers (PMLs). In the last section, elliptic cloaking is numerically performed and the rotator and mirage effects established for these waves confirming that they behave in a way similar to electromagnetic and acoustic waves.

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 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 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 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 O O 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 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 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 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 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 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 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 B I I 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


Reducing generational copy reserve overhead with fallback compaction As programming languages with managed runtimes become increasingly popular, it is essential that virtual machines are implemented efficiently. The performance of the memory management subsystem can be a defining factor in the performance of the virtual machine as a whole. We present a technique by which garbage collector performance can be improved.We describe an algorithm that combines a standard generational copying collector with a mark and compact collector. We observe that, since most objects do not survive a garbage collection, it is not necessary to reserve space to copy them all. The result is a generational copying collector that operates with a smaller copy reserve overhead than traditional Appel-style collectors. We maintain correctness in the worst case through the use of mark and compact collection. When the reduced copy reserve overflows, a compacting phase ensures that all data are accommodated.We have implemented this algorithm within the framework of Jikes RVM and MMTk. For most benchmarks examined, our experiments show that performance is comparable to or better than a standard generational copying collector. With the current popularity of VM-based languages such as Java or C# comes the need for high-performance virtual machines. A vital component of any such system is the garbage collector; its efficiency can determine the speed of the system as a whole. This paper presents a technique through which garbage collection performance can be improved.. The advantages and disadvantages of many popular uniprocessor garbage collection techniques have been widely discussed [1] .. 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. ISMM'06 June 10-11, 2006 Generational copying collectors have been shown to improve cache performance through spatial locality, but suffer the space overhead of a copy reserve. Generational mark and sweep collectors are able to use all available space, but can lead to a fragmented heap. Compacting collectors provide both spatial locality and good heap utilization, but require multiple sweeps of the heap, leading to poor performance.. The algorithm outlined in this paper combines the positive features of generational copying and compacting collectors. It behaves as a generational copying collector, but uses a far smaller copy reserve. When that copy reserve is found to be insufficient, it falls back on a compacting collector to copy all remaining objects. Since the compacting collector is rarely used, the performance penalty related to compaction is seldom encountered. However, the reduced copy reserve allows garbage collections to occur less frequently, leading to less time spent in garbage collection, and higher overall throughput.. All garbage collection algorithms must account for the worst case in order to maintain correctness. The worst case behavior of a copying garbage collector occurs when all objects survive a collection. In this case, every object must be copied from the old space to the new, leading to long collection pauses. More significant, however, is the space required by those objects. Space must be reserved to receive these objects should the worst case arise.. In practice, however, the worst case virtually never occurs. Indeed, the survival rate of objects in the nursery of a generational collector is very low -we observe it to be frequently below 10%. As a result, 90% of the space allocated as a copy reserve is wasted. Clearly this is unsatisfactory; less space available to the allocator means that fewer objects can be allocated between collections. As a consequence, the space wasted by the copy reserve leads to more frequent collections, using processor time that could be assigned to the mutator. Additionally, these frequent collections give objects less time to die, meaning that short-lived objects are copied into the mature space. Not only does this add to the copying overhead, but it fills the mature space faster, leading to more frequent major collections.. The algorithm we propose eliminates the need for this wasted space. Since the vast majority of collections do not require the full copy reserve, we provide only what is needed in the common case. In doing so, we reduce the collection frequency, and improve performance.. However, the worst case behavior remains, and must be accounted for. In our system, we do not aim for high performance in the worst case -we simply require correctness. As such, when our estimate of the required copy reserve is too low, and the copied objects overflow, we switch to a compacting collector. This allows us to rearrange the objects in their current space, without allocating any further memory. We aim to set aside sufficient space for the copy reserve as to make expensive compacting collections rare. Indeed, in the vast majority of cases it is not necessary to fall back on the compacting collector at all, meaning that the only difference between our algorithm and a traditional generational copying collector is that of space utilization.. The remainder of this paper is structured as follows: Section 2 provides an overview of the work upon which we build. Section 3 details the design of our collection algorithm, while Section 4 discusses closely related work. Section 5 outlines some of the more interesting points of our implementation, for which experimental results are given in Section 6. Finally, Section 7 concludes. We have presented a generational copying algorithm that makes use of a reduced copy reserve to improve performance. On the rare occasion when the reduced copy reserve is insufficient, our collector falls back on a compaction technique. This ensures correctness in the worst case.. We have provided details of our implementation, and shown an evaluation of the collector. We found that the choice of copy reserve size is critical to the performance of the algorithm. If this reserve is set too high, the benefits of improved space utilization are lost. If, on the other hand, the copy reserve is too small, overall performance is hurt by the frequent use of the compacting collector.. Our experiments show that, when a reasonably-sized copy reserve is used, our collector outperforms both the traditional generational copying and generational mark sweep collectors in most cases. Using a 10% copy reserve, we observe an average speedup of 4% over a standard generational copying collector, with a maximum speedup of almost 20%. For the remainder of this section, we will look in detail at 202 jess, 213 javac and 228 jack. Figures 5 to 10 show the results.. Each graph shows the elapsed time for a benchmark run using a given configuration on the left y-axis, plotted as a line with 90% confidence intervals, and show the number of collections on the right y-axis, plotted as stacked bars. Using Figures 5 and 8 as examples, Figure 5 (a) and Figure 5(b) show the performance over various heap sizes of 202 jess using the GenCopy and GenMS collectors. Figures 8(a) to 8(c) show the results over a range of heap sizes when a copy reserve of 5%, 10% and 80% is used. The remaining graphs (Figure 8(d), 8 (e) and 8(f)) show a varying copy reserve percentage for a fixed heap size.. Figures 5(a) and 5(b) show that the performance of 202 jess is better using GenCopy than it is using GenMS. Additionally, 0 Figure 7 . 228 jack when run with traditional collectors neither collector performs many major collections, indicating that the survival rate in the nursery is low. GenCopy benefits from this, since it uses a variable-sized nursery, while GenMS uses a fixed size. As a result, the nursery is able to take up more of the heap under GenCopy, leading to fewer collections.. It can be seen from Figure 8 that the performance of GenCC is almost always better than GenMS. This is to be expected, since GenCC takes advantage of the low nursery survival rate, and is able to perform far fewer collections. Additionally, GenCC's performance is almost always comparable to or better than GenCopy. The improvement is most noticeable at small copy reserve sizes.. Very little compaction is performed when running 202 jess. since the nursery survival rate is low. The compacting collector is only initiated when the copy reserve is set to its minimum. Since the minimum copy reserve consists of eight pages used to copy VM and GC data, Figures 8(d) to 8(e) show that, in most cases, the survivors of a nursery collection fit entirely inside that minimum space.. Figures 6(a) and 6(b) show that there are significantly more major collections in 213 javac than in 202 jess. This indicates that the nursery survival rate is higher. Of the benchmarks presented, 213 javac exhibits the effects of the generational hypotheses most clearly and is, as a result, the most interesting of the SPECjvm98 benchmarks from a garbage collection perspective.. It can be seen in Figure 9 (a) that when the 213 javac benchmark is run using a small copy reserve, several compacting collections are triggered. However, despite the additional overhead of these collections, GenCC outperforms GenCopy. This is particularly noticeable at larger heap sizes, where more space is available for the collector to manage. Additionally, in the majority of cases, GenCC outperforms GenMS.. The performance advantage becomes smaller once the copy reserve percentage is increased. Figure 9 (f) shows an 80% copy re-0 0 serve, where it can be seen that the performance of GenCC degrades to similar to or worse than GenCopy. This is expected since, while theoretically the GenCC algorithm with 100% copy reserve should be identical to GenCopy, the implementation adds some overheads that lead to performance degradation. For example, the implementation of the block copying mechanism relies on maintaining additional state regarding mapped pages, and can require additional system calls to manage the memory space correctly. Additionally, support for the reference chaining technique requires that a check be made on some memory accesses during GC. For large heaps, this is a minor effect, as can be seen in Figures 9(e) and 9(f). However, when a smaller heap is used in Figure 9 (d) these overheads can lead to significant performance loss at higher copy reserve sizes. It is expected that a production version of the GenCC algorithm would generally be used with the copy reserve set at a suitable value (determined experimentally or dynamically). As a result, these overheads would not be an issue. Figures 7 and 10 show performance data for 228 jack. It can be seen in Figures 7(a) and 7(b) that the traditional collectors perform few major collections. As in the case of 202 jess, this indicates that the nursery survival rate is low. Figure 10 (a) shows that, even with a copy reserve of 5%, the compacting collector is not triggered. This is a result of the low nursery survival rate. The GenCC collector here outperforms both the GenCopy and GenMS collectors. As the copy reserve increases, the performance of GenCC converges with that of the traditional collectors.. Figures 10(d), 10(e) and 10(f) indicate that compaction occurs only when the copy reserve is at its minimum. If these extreme cases are discounted, it can be seen that the performance of GenCC is comparable to or better than both GenCopy and GenMS for all three heap sizes. There are several pieces of work that use a reduced copy reserve in order to improve generational copying collector performance. Additionally, some research has been performed in dynamically switching between multiple collection techniques in order to exploit the best properties of each. The algorithm presented in this paper combines a generational copying collector with a mark compact collector. This section outlines the background upon which this work builds. Timing and garbage collection information for each of the selected benchmarks was gathered. Both generational copying and generational mark sweep collectors were analyzed for comparison with the new generational copying/compacting collector.. The methodology used to obtain the numbers was the same for each collector. First, a VM was built configured with the appropriate collector. Next, each benchmark was run 11 times within a single VM invocation. The first run served as a warm-up, compiling all necessary methods using Jikes RVM's optimizing compiler (at optlevel 2). This eliminated the overhead of compilation from subsequent runs. The results for the compilation run were discarded. The remaining ten runs were used as timing runs. A full-heap garbage collection was performed before each timing run.

O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O 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 B I I 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 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 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 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 B I 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 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 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 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 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 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 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 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 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 O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O 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


Efficient Computation of Sparse Hessians Using Coloring and Automatic Differentiation The computation of a sparse Hessian matrix H using automatic differentiation (AD) can be made efficient using the following four-step procedure.1. Determine the sparsity structure of H.2. Obtain a seed matrix S that defines a column partition of H using a specialized coloring on the adjacency graph of H. The coloring variant used in the second step depends on whether the recovery in the fourth step is direct or indirect: a direct method uses star coloring, and an indirect method uses acyclic coloring. In an earlier work, we had designed and implemented effective heuristic algorithms for these two NP-hard coloring problems. Recently, we integrated part of the developed software with the AD tool ADOL-C, which has recently acquired a sparsity detection capability. In this paper, we provide a detailed description and analysis of the recovery algorithms, and experimentally demonstrate the efficacy of the coloring techniques in the overall process of computing the Hessian of a given function using ADOL-C as an example of an AD tool. We also present new analytical results on star and acyclic coloring of chordal graphs. The experimental results show that sparsity exploitation via coloring yields enormous savings in runtime and makes the computation of Hessians of very large size feasible.The results also show that evaluating a Hessian via an indirect method is often faster than a direct evaluation. This speedup is achieved without compromising numerical accuracy. Background.. Solvers for nonlinear optimization problems such as IPOPT [19] and LOQO [18] require second-order derivatives of the Lagrangian function. Further, exact. Hessians are needed in parametric sensitivity analysis, such as in the control of dynamical systems in real time [2] . A Hessian matrix or Hessian-vector products can be computed accurately using automatic differentiation (AD), a generic name for a set of chain-rule based techniques for evaluating derivatives of a function given as a computer program [11] .. A Hessian matrix that arises in a large-scale application is typically sparse. Sparsity, along with symmetry, can be exploited to reduce the runtime and the storage required to compute the Hessian using AD (or estimate it using finite differences). Matrix compression has been found to be an effective technique in this context: Given an n × n Hessian matrix H of known sparsity structure, an n×p seed matrix S, with p as small as possible, is determined;. then the numerical values in the n × p compressed matrix B ≡ HS are obtained using AD;. and finally the nonzero entries of the original Hessian H are recovered from the compressed representation B.. One way a matrix H is compressed to form a matrix B is to partition the columns of H into p structurally disjoint groups and let each column of B be the sum of the columns of H that belong to the same group. Mathematically, S is an n × p matrix whose (j, k) entry is 1 if column h j of the matrix H belongs to group k, and 0 otherwise. Since the matrix S defines a partitioning of the columns of H, each of its entries is either zero or one, and in every row r of S there exists exactly one column c where the entry s rc is equal to one.. The criteria used to find a suitable seed matrix S where the parameter p is minimizedthe specific partitioning problem-depends on whether the numerical values of the entries of the Hessian H are to be recovered from the compressed matrix B directly or indirectly (via substitution). In a direct recovery, no further arithmetic is required, whereas in a recovery via substitution, a set of simple triangular systems of equations needs to be solved implicitly.. The partitioning requirements for a seed matrix suitable for a substitution method are less strict than the requirements for a seed matrix appropriate for a direct method. Hence, the former usually results in a smaller p compared to the latter.. The computation of a seed matrix requires only structural information. Such matrix problems can be formulated conveniently and solved as graph problems. Coleman and Moré [4] showed that a star coloring of the adjacency graph of a Hessian models the partitioning problem that occurs in the computation of the Hessian via a direct method. Coleman and. Cai [3] showed that the corresponding model in a substitution-based computation is acyclic coloring. These specialized graph coloring problems are described in Section 2.. In a previous work, we had developed effective heuristic algorithms for the NP-hard star and acyclic coloring problems, and showed that the algorithms are superior to previous approaches [9] . In an even earlier work [8] , we had provided a comprehensive review of the role of graph coloring in the efficient computation of Jacobians and Hessians. Recently, we have developed efficient algorithms for recovering the numerical values of a Hessian from a compressed representation obtained using a star or an acyclic coloring. These algorithms take advantage of two-colored structures that the associated coloring algorithms maintain.. Our implementations of the coloring as well as the recovery algorithms, which form part of the software package COLPACK [10] , have been integrated with ADOL-C, an operator overloading based AD tool for the differentiation of functions specified in C/C++ [12] .. Walther [20] has recently developed a sparsity detection technique for Hessians and added the functionality to ADOL-C.. Contributions. Our contributions in this paper are analytical as well as experimental.. In terms of theory, in Section 3, we provide a detailed description and analysis of the Hessian recovery algorithms mentioned earlier. Our analysis includes time complexity as well as numerical stability: we show that our recovery algorithms are linear in the size of the problem and that indirect recovery using two-colored trees is nearly as stable as direct recovery. We also present, in Section 4, new results on star and acyclic coloring of chordal graphs, a class to which adjacency graphs of banded matrices belong.. Experimentally, we demonstrate in Section 5 the advantage coloring techniques offer in sparse Hessian computation using AD. We use two test-cases: a real-world power transmission problem and a synthetic unconstrained quadratic optimization problem. In both cases, we compute Hessians of various dimensions and sparsity structures, including banded and random structures, using ADOL-C. The results obtained show that sparsity exploitation via star and acyclic coloring enables one to compute affordably Hessians of dimensions that could not have been computed otherwise. For sizes where dense Hessian computation is at least possible, the saving in runtime obtained by exploiting sparsity via coloring is dramatic.. Further, an indirect method that uses acyclic coloring quite often is found to be faster than a direct method that relies on star coloring, considering the overall process. This speedup is achieved without compromising numerical accuracy. The experimental results also show that both the star and the acyclic coloring heuristic algorithm we used find optimal solutions for banded matrices.. Related work. In sparse Hessian computation, an approach that can be used either orthogonal to or in combination with compression is the use of elimination techniques on the computational graph of the Hessian. This approach was first considered by Dixon [6] and is the subject of current research in the AD community. Partial separability is another related approach used in sparse Hessian computation. Gay [7] has considered such an approach and its implementation using AMPL. We studied compression-based calculation of sparse Hessians using automatic differentiation. We considered the case where a matrix is compressed such that the recovery is direct (star coloring) and the case where the recovery requires additional arithmetic work (acyclic coloring). Our experimental results showed that sparsity exploitation via star and acyclic coloring enables one affordably to compute Hessians of dimensions that could not have been computed otherwise. For sizes where a computation that does not exploit sparsity is at least possible, the results showed that the techniques render dramatic savings in runtime. We believe savings of similar magnitude would be attained should an AD tool other than ADOL-C be used, since the execution time for the Hessian-seed matrix product is likely to dominate the overall runtime for any reasonable function. The experimental results also showed that, for real-world optimization problems, an acyclic coloring-based method is faster than a star coloring-based method, considering the overall process. Furthermore, we showed, both analytically and experimentally, that indirect recovery using two-colored trees is numerically as stable as direct recovery.

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 O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O 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 O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O 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 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 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 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 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 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 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 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 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 B I 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 I 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 B I 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 B I O O O O O O O O O O B I 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