Privacy-preserving performance measurements Internet performance is an issue of great interest, but it is not trivial to measure. A number of commercial companies try to measure this, as does RIPE, and many individual Internet Service Providers. However, all are hampered in their efforts by a fear of sharing such sensitive information. Customers make decision about "which provider" based on such measurements, and so service providers certainly do not want such data to be public (except in the case of the top provider), but at the same time, it is in everyones' interest to have good metrics in order to reduce the risk of large network problems, and to test the effect of proposed network improvements.This paper shows that it is possible to have your cake, and eat it too. Providers (and other interested parties) can make such measurements, and compute Internet-wide metrics securely in the knowledge that their private data is never shared, and so cannot be abused. Imagine three Internet Service Providers (ISPs) who wish to make measurements of performance. They might wish to make such measurements to test improvements to their network, or detect major faults. ISPs can make internal measurements, but even for large providers the majority of traffic is "off-network" in the sense that it must traverse other networks besides their own. Additionally, it is (anecdotally) reported that many performance problems (congestion, and routing in particular) occur at the links between providers. Hence, inter-provider performance metrics are actually more important than the internal measures. Large-scale asymmetry in Internet (inter-domain) routing leads to the need for one-way performance measurements, but collection of such metrics requires some co-operation between providers. However, efforts to create co-operation are hampered by a fear of sharing sensitive information. Customers make decision about "which provider" based on such measurements, and network operators might also reveal more than they wish to their competitors.. It is sometimes possible to create bilateral agreements to make performance measurements, but these are highly inflexible, and multilateral agreements are very hard to reach. In one case an agreement was created through a trusted third party (RIPE) who now conduct many such measurements primarily in Europe [10] , but other attempts have not been successful (for instance, for several years a group of providers met at NANOG to set up such measurements without ever reaching an agreement). In the United States and Asia no universally trusted third party has emerged. It seems then, that some work needs to be done to create such a measurement infrastructure. On the research side, several such exist (e.g., NIMI [14] , PlanetLab [15] ,and PingER [6] ), but they have well known limitations (primarily in that they focus on academic networks, rather than the commercial Internet). There have also been commercial attempts to build such infra-structure, but the technology behind these has not been subject to the scientific rigour that would be required, for instance, if one were measuring the performance of a new drug. This paper is aimed at creating simple techniques that could be used to allow multilateral performance measurements without the need for a trusted third party, or to expose a provider's sensitive information. The paper is not intended to discount the prior work in the art of making measurements -in fact we rely heavily on all of the excellent work pioneering such measurements (in particular on synchronization of clocks (e.g., see [5, 10] ). This paper, in contrast, presents a method for avoiding the problems of trust implicit in making inter-provider measurements. We use techniques related to those described in [17] , whereby one can perform a distributed calculation without sharing the inputs. Techniques to perform such computations are now well developed, though they have rarely been applied to communications networks (exceptions being [3, 12, 17] ).. The methods stem from seminal work by Yao [20] , who proposed a set of solutions to two-party problems such as the millionaires' problem: two millionaires wish to determine who is richer, but they do not wish to reveal their individual wealth to each other. Yao showed that one could solve a general class of such problems, and subsequent work has generalized this to multiple-parties of varying degrees of honesty. We use techniques from this research area, sometimes called secure-distributed computation, or PrivacyPreserving Data Mining (PPDM). The major differentiator of our work over prior work in PPDM is that in much of the preceding literature (for instance see our own work [17] ), the aim has been to perform data-mining on datasets collected by multiple parties. Each party holds one piece of data, and we wish to perform some algorithm (e.g., regression) on the collection of data. However, in our case, the measurements themselves are distributed. To clarify, in [17] the measurements to be combined were intra-domain measurements (for example of traffic volumes), which can be performed by a single network operator. The goal was to apply PPDM to combine each of these individual datasets to form a global picture (e.g., of the total Internet traffic). In this paper we consider inter-domain measurements, where the measurements themselves require the co-operation of multiple providers.. We show that there are many problems one can solve in this domain: for example, our methods allow a provider to determine its average inter-domain delay without any provider learning interdomain delays between specific providers. Thus one can measure one's own performance without learning any sensitive information about other networks. The methods applied are actually rather simple, requiring only basic mathematical and cryptographic operations, though measuring delay in the presence of packet loss (where we cannot reveal which packets are lost) is somewhat more challenging. We present a new PPDM algorithm that allows computation of average delays where some probe packets are dropped. This paper has shown that there are techniques for solving performance measurement problems that do not require sharing of detailed information. Such techniques have the capability to enable much larger scale Internet performance measurements than are currently available to the research community by removing security and privacy concerns that currently restrict the number of willing participants.. This paper presents a variety of techniques, with different privacy tradeoffs. This work does not stop here, however. There are many variations of the techniques described here, and these may be applicable to other problems such as computing jitter, or other performance metrics. Additionally, it has been shown how to apply such distributed computation to sketches [17] , and such may find utility in cases where the volume of measurements becomes very large. There are approaches to apply such methods to time series. For example, Atallah et al. [1] show that time-series algorithms (such as detecting a linear trend) can be performed, without revealing intermediate values. In the case of detecting a trend, the algorithm will reveal the slope to all parties, without revealing the absolute values. Likewise, detection of anomalies could prove very useful in improving Internet health.

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


Visualization of Intricate Flow Structures for Vortex Breakdown Analysis Figure 1: Vortex breakdown bubble in numerical simulation of a cylindrical container. Flow topology is illustrated with stagnation points (red), singularity paths (yellow), and streamlines (blue) on three axially oriented cutting planes. Volume rendering illustrates additional aspects of flow structure, using a two-dimensional transfer function (widget, right) of a Jacobian-related invariant (horizontal axis) and vorticity (vertical axis).Vortex breakdowns and flow recirculation are essential phenomena in aeronautics where they appear as a limiting factor in the design of modern aircrafts. Because of the inherent intricacy of these features, standard flow visualization techniques typically yield cluttered depictions. The paper addresses the challenges raised by the visual exploration and validation of two CFD simulations involving vortex breakdown. To permit accurate and insightful visualization we propose a new approach that unfolds the geometry of the breakdown region by letting a plane travel through the structure along a curve. We track the continuous evolution of the associated projected vector field using the theoretical framework of parametric topology. To improve the understanding of the spatial relationship between the resulting curves and lines we use direct volume rendering and multi-dimensional transfer functions for the display of flow-derived scalar quantities. This enriches the visualization and provides an intuitive context for the extracted topological information. Our results offer clear, synthetic depictions that permit new insight into the structural properties of vortex breakdowns. Computational Fluid Dynamics (CFD) has become an essential tool in various engineering fields. In aeronautics it is a key element * Email: tricoche@sci.utah.edu in the design of modern aircrafts. The speed of today's computers combined with the increasing complexity of physical models yields numerical simulations that accurately reproduce the subtle flow structures observed in practical experiments and permit to study their impact on flight stability. Yet, to fully exploit the huge amount of information contained in typical data sets, engineers require post-processing techniques providing insight into the results of their computation.. In order to meet these needs the research in Flow Visualization has designed various methods aimed at efficiently exploring fluid flow data and automatically characterizing their essential properties. Unfortunately, vortex breakdowns and their associated flow recirculation patterns remain challenging structures and none of the existing visualization techniques can offer satisfying depictions of these features. Their truly three-dimensional nature is poorly visualized by conventional methods, such as e.g. streamlines and isosurfaces. Stream surfaces [6] improve on these basic techniques but still obscure the intricate internal structures of recirculation bubbles.. The work described in this paper has its origins in the collaboration between engineering and visualization. The problem posed was to find efficient methods to validate two large simulation datasets and analyze the contained features, with an emphasis on vortices and vortex breakdowns. The approach presented in the following consists in compounding two kinds of visualization techniques that had little interaction so far. More precisely, we associate topology-based flow visualization methods and volume rendering. This provides depictions that both convey the subtle structures present in vortical flows, especially during vortex breakdown, and provide an intuitive understanding of their spatial context and associated physical properties.. The central idea of our flow visualization method is to extend the basic and widely used cutting plane technique to make it a flexible and powerful tool for exploring flow volumes in a continuous way. These moving cutting planes, as we term them in this paper, smoothly travel along trajectories that can be either obtained automatically by standard feature extraction schemes or provided by the user to explore a particular region. Building on an existing technique we accurately track the vector field topology observed on the cutting planes. This allows us to detect and visualize essential properties of the flow, especially for recirculation bubbles. Our application of the volume rendering technique is based on the concept of multidimensional transfer functions. In the processing of our data sets this methodology proves extremely useful in permitting the simultaneous and coherent depiction of multiple flow-derived scalar fields, traditionally used to analyze vortical structures. Combined with the topological information gathered by our moving cutting plane this enhances the visualization and facilitates the understanding of both the geometry and the physical properties of our fluid flow data. Observe that although the data at hand are timedependent we chose to restrict our visualization to the analysis of the structural features contained in individual time steps. In this paper we have applied and extended a number of methods to advance the visualization of complicated three-dimensional flow patterns. Parametric topology tracking greatly helps in unraveling the geometry of these structures by reducing the complexity of the generated images. By modifying its original setup to permit its application to an arbitrary 1D parameter space we are able to use it for the exploration of essential flow regions along curves of interest. A subsequent application of volume rendering serves to examine variables that are derived from the flow in an intuitive and interactive manner. Through the use of multidimensional transfer functions interrelations of these variables are easily expressed and visualized. In combination with the vector field analysis provided by parametric topology it is a powerful tool that can dramatically enhance visualizations based on the composition of streamlines and isosurfaces that are typically used in practice. We have demonstrated its usefulness in examples that concerned both the verification of numerical simulations and the inquiry of the vortex breakdown phenomenon.. Future work will address following topics.. • Parametric topology need not be restricted to planes; other curved shapes could be more useful for certain problems.. • In the present work we have focused on individual time steps to investigate the features of the flow. This work must be extended to account for the time-dependency of the original data and the evolution of the visualized structures.. • Because the input data for volume rendering must typically be given in quantized form, it is essentially dimensionless and carries little connection to the original scale. This complicates the interpretation of transfer functions. Some work could be done to provide engineers with a tool more specifically tailored to their needs.. • Concerning multi-dimensional transfer function, there is still a lack of experience as to how they should be chosen appropriately or even automatically. Future research must address this limitation and further investigate the potential of direct volume rendering as a flow visualization tool in practical applications. The study of vortex breakdown is a field of its own in the fluid mechanics community. The corresponding literature mostly uses streamlines or particles advection to observe and analyze the properties of breakdown bubbles [22, 26] . From the viewpoint of Scientific Visualization the phenomenon has not received much attention so far and Kenwright and Haimes [12] published one of the few papers explicitly considering this problem. Vortices, however, are an essential topic of Flow Visualization and have been treated quite extensively. In the absence of a formal characterization of vortical structures, swirling motion around some central region is used as a working definition [20, 24] . Depending on the approach taken, this leads to features that are either lines, surfaces or volumes. Vortex core lines appear to be the most prominent feature type. Banks and Singer [2] extracted them by looking for points with low pressure and high absolute vorticity. Sujudi and Haimes [28] applied a cellwise linear pattern matching strategy to find vortex core lines over tetrahedral grids. This fast method is probably the most widely used in practice. Peikert and Roth [23] showed that this and most other line-based feature detection methods can be reformulated using the concept of Parallel Operator, leading to continuous features. They also proposed a second order method [25] . A famous region-based method is the λ 2 -criterion proposed by Jeong and Hussein [9] . It connects a vortical region to the negative eigenvalues of a symmetric matrix derived from the Jacobian. Alternative techniques were introduced recently [10, 6] . Aside from this line of research, vortices are usually characterized by certain physical quantities like pressure, vorticity or helicity. Finding the corresponding regions can then be formulated as a level set problem and reduced to isosurface extraction. Unfortunately, none of the methods mentioned above is able to deal with the very complex flow behaviors associated with vortex breakdowns.. Although topology-based methods have been widely and successfully applied to the visualization of planar vector fields, the extension of this technique to three-dimensional flows is still incomplete. Early contributions [8, 7] were restricted to the extraction and identification of first-order critical points and the integration of linetype separatrices. Recently, Theisel et al. presented a method for the visualization of so-called saddle connectors [30] . These linetype features avoid occlusion but provide an incomplete structural picture. Mahrous et al. [21] described an approach for the topological segmentation of 3D data sets in which separatrices are obtained as implicit stream surfaces [32] . As a consequence, the accuracy is typically limited in regions of intricate flow. Concerning unsteady data, Tricoche et al. proposed a technique for tracking the topology of planar flows over time [31] . A different approach was introduced later by Theisel and Seidel [29] . The method presented in this paper builds on the original idea of [31] .. Direct volume rendering is a powerful tool for the visualization of scalar volumetric data because of its simplicity and flexibility. Its simplicity facilitates interactive implementation on graphics hardware while its flexibility is grounded in its reliance on the transfer function, which maps from data values to the colors and opacities. Additional flexibility comes from transfer functions with a multi-dimensional domain, allowing the rendering to display not just (soft) isosurfaces of individual data values, but the relationships between them. Multi-dimensional transfer functions were pioneered by Levoy [19] , generalized by Kindlmann and Durkin [13] , and more recently advanced by Kniss et al. for the visualization of scalar datasets [15] , as well as for color cryosection data and meteorological simulations [16] . Note that, starting from scalar quantities provided by CFD simulations, Ebert et al. already proposed to use volume rendering for the visualization of gases in [4] . We use a different approach in the following and show how multi-dimensional transfer functions were integrated in our framework to improve the visualization of vortex breakdown structures.

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


Cedar Fortran and other vector and parallel Fortran dialects The introduction of vector processors and multiprocessors has caused the most dramatic changes in Fortran and its dialects. The emerging generation of supercomputers utilizes both vector processing and multiprocessing. The challenge is to provide language constructs and software tools that will allow the programmer to easily exploit the capabilities of the machine. This paper outlines the development of vector and multiprocessor language constructs in Fortran. Significant architectures, their languages, and optimizers are described. The paper concludes with a description of Cedar Fortran, the language for the Cedar Multiprocessor under development at the University of Illinois, Urbana-Champaign. Cedar is a hierarchical, shared-memory, vector multiprocessor. As such, its language, Cedar Fortran, contains many of the language features that are described for vector processors and multiprocessors. The study of supercomputers and their languages is very much a study in evolution, a study of gradual development interrupted by an occasional dramatic change. The machines and languages that prosper are those most suited to the current environment rather than those with the most aesthetically pleasing characteristics. Through this development, Fortran has proven to be a hearty species that refuses to become extinct. As A. Perlis writes, "Fortran is not a flower, but a weed. It is hardy, occasionally blooms, and grows in every computer." It adapts to changes in the landscape, and it survives attempts to be supplanted with more attractive languages. This paper will describe vector and parallel machines and their corresponding Fortran dialects. The relationship between language features and machine architecture will be explored.. Let us examine the history and development of the Fortran family tree. Fortran was designed to be simple and efficient for executing numeric programs on a uniprocessor *This work was supported in part by the National Science Foundation under Grant No. US NSF MIP-8410110, the US Department of Energy under Grant No. US DOE DE-FGO2-85ER25001, and by a donation from the IBM Corporation. system. It was developed in 1956 by an IBM software team headed by John Backus [1979] and bore some resemblance to the assembly language it was intended to replace. Possessing limited control structures and cumbersome I/O statements, Fortran programs were sometimes difficult to write and read, but Fortran compilers produced fast and efficient code. The Fortran 66 standard did little to alleviate the coarseness of the original Fortran. It was not until the Fortran 77 standard that Fortran became somewhat more palatable to the users of more modern programming languages.. The introduction of vector processors and multiprocessors punctuates the most dramatic changes in Fortran and its dialects. A consensus has been reached about vector statements to the extent that they will probably be part of the next Fortran standard. No consensus has yet been reached with regard to language extensions for multiprocessing. Some proposals for parallel extensions to Fortran will be presented later in this paper. The emerging generation of supercomputers utilizes both vector processing and multiprocessing. The challenge is to provide language constructs and software tools that will allow the programmer to easily exploit the capabilities of the machine. This paper will outline the development of vector and multiprocessor language constructs in Fortran. Significant architectures, their languages, and optimizers will be described. The paper concludes with a description of Cedar Fortran [Guzzi 1987; Padua and Lawrie 1985] , the language for the Cedar multiprocessor [Kuck et al. 1986 ] under development at the University of Illinois, Urbana-Champaign. Cedar is a hierarchical, shared-memory, vector multiprocessor. As such, Cedar Fortran contains many of the language features that will be described for vector processors and multiprocessors. In this paper, we have traced the development of vector extensions to Fortran from their diverse beginnings to the current general consensus. The continuing variety of multiprocessing extensions has also been presented. Most current multiprocessor extensions are still deeply intertwined with their corresponding architectures and operating systems. Cedar Fortran is no exception. Our primary goals in designing and implementing the language were 1. to provide a language that easily allowed direct access to all the power of the Cedar system, both for the programmer and for source-to-source optimization. 2. to provide a Fortran dialect in which users could easily adapt their existing Fortran applications.. In these two goals, we feel we have been reasonably successful. Our secondary goals were 1. to adapt the language to the needs and desires of programmers as they gain experience with parallel programming. 2. to add to the overall knowledge and experience of parallel programming and parallel languages.. We are confident that time will provide a general consensus on multiprocessor Fortran constructs, just as it has with vector constructs. The diversity of multiprocessors is much greater than that of vector processors, and the problem is compounded by the interrelated issues of concurrent execution and proper data allocation. The convergence of ideas and attitudes may, therefore, take more time and effort. Note 1. Autotasking, a new feature of the Cray compiler, generates block-parallel constructs.

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


Semidefinite representation of convex sets Abstract. Let S = {x ∈ R n : g 1 (x) ≥ 0, · · · , gm(x) ≥ 0} be a semialgebraic set defined by multivariate polynomials g i (x). Assume S is convex, compact and has nonempty interior. Let S i = {x ∈ R n : g i (x) ≥ 0} and ∂S i = {x ∈ R n : g i (x) = 0} be its boundary. This paper, as does the subject of semidefinite programming (SDP), concerns Linear Matrix Inequalities (LMIs). The set S is said to have an LMI representation if it equals the set of solutions to some LMI and it is known that some convex S may not be LMI representable [6] . A question arising from [13] , see [6, 14] , is: given S ∈ R n , does there exist an LMI representable setŜ in some higher dimensional space R n+N whose projection down onto R n equals S. Such S is called semidefinite representable or SDP representable. This paper addresses the SDP representability problem.The following are the main contributions of this paper: (i) Assume g i (x) are all concave on S. If the positive definite Lagrange Hessian (PDLH) condition holds, i.e., the Hessian of the Lagrange function for optimization problem of minimizing any nonzero linear function ℓ T x on S is positive definite at the minimizer, then S is SDP representable.for some possibly nonsquare matrix polynomial W (x)) or strictly quasiconcave on S, then S is SDP representable. (iii) If each S i is either sos-convex or poscurv-convex (S i is convex, compact and has smooth boundary with positive curvature), then S is SDP representable. This also holds for S i for which ∂S i ∩ S extends smoothly to the boundary of a poscurv-convex set containing S. (iv) We give the complexity of Schmüdgen and Putinar's matrix Positivstellensatz, which are critical to the proofs of (i)-(iii). One of the main advances in optimization which as had a profound effect on control theory and nonconvex optimization as well as many other disciplines is semidefinite programming (SDP) [14, 26] . This gives effective numerical algorithms for solving problems presented in terms of Linear Matrix Inequalities (LMIs). Arising from this is the very basic issue of which problems can be presented with LMIs and this paper addresses one of the most classical aspects of this problem.. A set S is said to have an LMI representation or be LMI representable if. A i x i 0} for some symmetric matrices A i . Here the notation X 0 (≻ 0) means the matrix X is positive semidefinite (definite). If S has an interior point, A 0 can be assumed to be positive definite without loss of generality. Obvious necessary conditions for S to be LMI representable are that S must be convex and S must also be a basic semialgebraic set S = {x ∈ R n : g 1 (x) ≥ 0, · · · , g m (x) ≥ 0}. where g i (x) are multivariate polynomials. We shall always assume S has an interior point. For example, any convex quadratic constraint {x ∈ R n : a + b T x − x T C T Cx ≥ 0} can be represented by. Key words and phrases. Convex sets, semialgebraic geometry, semidefinite programming (SDP),linear matrix inequality (LMI), sum of squares (SOS), modified Hessian, moments, convex polynomials positive curvature, Schmüdgen and Putinar's matrix Positivstellensatz, positive definite Lagrange Hessian (PDLH) condition, extendable poscurvconvex, positive second fundamental form, poscurv-convex, sos-concave (sos-convex).. the LMI x ∈ R n : I n Cx (Cx). where I n is the n × n identity matrix. Here B T denotes the transpose of matrix B. A basic question (asked in [17] ) is: which convex sets can be represented by LMIs ? It turns out that some convex sets are not LMI representable. Helton and Vinnikov [6] proved that a strong condition called rigid convexity is necessary for a set to have an LMI representation (as well as sufficient in case of dimension two). For instance, the convex set. 2 ) ≥ 0} does not admit an LMI representation [6] , since it is not rigidly convex.. However, the set T is the projection onto x-space of the set S := (x, w) ∈ R 2 × R . Such sets S are called semidefinite representable or SDP representable. Nesterov and Nemirovski ( [13] ), and Nemirovsky ( [14] ) gave collections of examples of SDP representable sets. Thereby leading to the question which sets are SDP representable ? In §4.3.1 of his excellent 2006 survey [14] Nemirovsky said " this question seems to be completely open". Obviously, to be SDP representable, S must be convex and semialgebraic. What are the sufficient conditions that guarantee S is SDP representable ? This paper addresses this kind of question. Sometimes we refer to a semidefinite representation as a lifted LMI representation of the convex set S and to the LMI in (1.2) as the lifted LMI for S.. A construction of the SDP representation for convex sets was proposed by Lasserre and also by Parrilo and goes according to the following idea. Let M denote the space of Borel measures on S and letŜ denote the convex subset of all nonnegative mass one measures. The Krein Millman Theorem ( [2] ) says thatŜ projects down onto S via. UnfortunatelyŜ is infinite dimensional, so unsuitable as an SDP representation. The Lasserre and Parrilo proposal, which will be sketched later, is to cut downŜ by looking at it as the set of all positive mass one linear functionals on the polynomials of some fixed degree N . Moment and sum of squares (SOS) techniques show that this gives an LMI, denoted by L N , for each degree N , and that the projection onto x− space of the setŜ N := {(x, y) : L N (x, y) ≥ 0} contains S for all N . The open question remaining is whether there exists an integer N large enough to produce the equality. The validity of this general type of construction has been supported by very nice recent findings on the SDP representation of convex sets. Parrilo [16] proved this gives a lifted LMI representation in the two dimensional case when the boundary of S is a single rational planar curve of genus zero. Lasserre [11] proved this construction can give arbitrarily accurate approximations when N goes to infinity. The goal of this article is to give some very general sufficient conditions guaranteeing the projections of the constructed LMIs based on moments are equal to S, i.e., S is SDP representable. The contributions of this paper are described in the following.. Let S = {x ∈ R n : g 1 (x) ≥ 0, · · · , g m (x) ≥ 0} be a basic closed semialgebraic set; here the g i (x) are in the ring R[x] of multivariate polynomials with real coefficients and are called the defining polynomials for S. Assume S is convex, compact and has nonempty interior. Let S i = {x ∈ R n : g i (x) ≥ 0} and ∂S i = {x ∈ R n : g i (x) = 0} be its boundary. Denote by ∂S the boundary of S.. First, consider the case that all the defining polynomials g i (x) are concave on S. The positive definite Lagrange Hessian (PDLH) condition requires that for any nonzero vector ℓ ∈ R n , the Hessian of the Lagrange function corresponding to the optimization problem of minimizing ℓ T x over S is positive definite at the minimizer, i.e., −. is positive definite, where u is the minimizer and λ i ≥ 0 are Lagrange multipliers. Remark. In Theorem 1.1, where the g i (x) are concave on S, the matrix − m i=1 λ i ∇ 2 g i (u) must be positive semidefinite. The PDLH condition requires it is positive definite, i.e., its determinant is nonzero, which defines an Zariski open set. So the PDLH is a generic condition subject to the property that g i (x) are concave on S.. Second, consider the case that all the defining polynomials g i (x) are quasi-concave on S. This means the super level set S i (α) = {x ∈ R n : g i (x) ≥ α} is convex in S for every α ∈ g i (S). Therefore the level set ∂S i (α) = {x ∈ R n : g i (x) = α} has nonnegative curvature in S, i.e., for x ∈ S,. We say g i (x) is strictly quasi-concave on S if ∂S i (α) has positive curvature in S, i.e.,. By Exercise 3.44(a) in Boyd and Vandenberghe [1] , the above is equivalent to the modified Hessian. for some constant M > 0. It will be shown (Lemma 5.6) that the constant M can be chosen uniformly for all x ∈ S if f (x) is strictly quasi-concave on S. A polynomial p(x) is said to be a sum of squares (SOS) if p(x) = w(x) T w(x) for some column vector polynomial w(x). The necessary condition for p(x) to be SOS is that it is nonnegative on the whole space R n , but the converse might not be true. We refer to [20] for a survey on SOS polynomials.. n×n is SOS if there exists a possibly nonsquare matrix polynomial W (x) with n columns such that. is compact and has nonempty interior. If each g i (x) is either sos-concave or strictly quasi-concave on S, then S is SDP representable.. Remark. The flat boundary case is included in Theorem 1.2. If some g i (x) is a linear polynomial, then its Hessian is identically zero and hence g i (x) is sos-concave.. Third, consider the case that S is convex but the defining polynomials g i (x) are not quasi-concave on S. This is because the super level sets of g i (x) might not be all convex. We call S i = {x ∈ R n : g i (x) ≥ 0} poscurv-convex if S i is convex, compact and its boundary ∂S i = {x ∈ R n : g i (x) = 0} is smooth and has positive curvature, which means that. S i is called sos-convex if the function g i is sos-concave. We turn now to more general sets S i . We say S i is extendable poscurv-convex with respect to S if there exists a poscurv-convex set T i ⊇ S such that ∂T i ∩ S = ∂S i ∩ S. In other words, ∂S i ∩ S can be extended to become the boundary of a poscurv-convex set. The proofs for the above theorems are based on a variety of techniques, and they produce new results which might be of interest independent of SDP. First, we give degree bounds for polynomials appearing in Schmüdgen's and Putinar's matrix Positivstellensatz, see §4. Second, the proofs also introduce a natural technique of writing a polynomial as a sum of squares by twice integrating its Hessian, which is very suited to handling sos-concavity. These two techniques allow us to obtain bounds on the degrees of polynomials which appear in SOS representations. Third, it is possible that the set S i = {x ∈ R n : g i (x) ≥ 0} is strictly convex but that its defining polynomials g i (x) are neither concave nor quasi-concave. In §6 we show under modest hypotheses that there is a new set of (local) defining polynomials p i for the S i which are strictly concave. This allows us to prove Theorem 1.4 by using the new defining polynomials p i together with the original defining polynomials g i .. The following notations will be used. For. denotes the set of k-times continuously differentiable functions in an open set containing K, and C ∞ (K) denotes the set of infinitely times differentiable (smooth) functions in an open set containing. . For a symmetric matrix A, λ min (A) denotes the smallest eigenvalue of A.. The paper is organized as follows. Section 2 gives the constructions of lifted LMIs when g i are concave on S, and states some theorems about the sharpness of these lifted LMIs, whose proofs will be given in Section 5. Then Section 3 turns to Lasserre and Parrilo type of constructions of lifted LMIs in [11, 16] , and we give a sufficient condition that guarantees these constructed LMIs are the SDP representations of S. Section 4 gives the complexity of Schmüdgen and Putinar's matrix Positivstellensatz. Section 5 gives proofs of theorems in Section 2 and Theorem 1.1 and Theorem 1.2. Section 6 discusses how to find concave defining functions for poscurv-convex sets and then proves Theorem 1.4. Section 7 draws some conclusions.. 2. The SDP representations when g i (x) are concave on S In this section we assume g i (x) are concave on S. Two kinds of SDP representations will be constructed. The proofs of their sharpness will be given in Section 5.. For any integer N , define the monomial vector. T is a square matrix and we write. A α x α for some symmetric matrices A α . When n = 1, the A α are Hankel matrices, and when n > 1, the A α are generalized Hankel matrices. Suppose µ is a nonnegative measure on R n with total mass equal to one. Integrating the above identity gives us. where y α = R n x α dµ(x) are the moments of µ. The matrix M N (y) is also called the moment matrix of order N .

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


Self-identifying sensor data Public-use sensor datasets are a useful scientific resource with the unfortunate feature that their provenance is easily disconnected from their content. To address this we introduce a technique to directly associate provenance information with sensor datasets. Our technique is similar to traditional watermarking but is intended for application to unstructured datasets. Our approach is potentially imperceptible given sufficient margins of error in datasets, and is robust to a number of benign but likely transformations including truncation, rounding, bit-flipping, sampling, and reordering. We provide algorithms for both one-bit and blind mark checking. Our algorithms are probabilistic in nature and are characterized by a combinatorial analysis. Datasets generated by sensor networks often benefit not just the producer but also subsequent generations of users. Many datasets are produced expressly for the public domain. However, conditions of use are typically attached that include the expectation of acknowledgment; that is, data producers expect that users will cite their contributions. Unfortunately the realities of data usage complicate this, as data is passed around and used nth hand. The original source is often forgotten, without malicious intent.. For example, the Hubbard Brook Ecosystem Study (HBES) in New Hampshire provides an on-line interface for downloading a myriad of ecological datasets generated in their experimental forest [18] . Users must complete a "Conditions of Use" form before data is delivered, that entails an obligation to acknowledge the data's provenance. However, there is no direct, irrevocable association of the data itself with its provenance.. In this paper we propose such an association via a technique we call self-identifying data. This technique allows a mark containing provenance information to be embedded in a dataset, and later checked or extracted from the dataset. Associated forms, signatures, files headers, or other types of annotations are unnecessary. Our technique is most reminiscent of watermarking. In this paper we have a presented a system for generating selfidentifying data, which is sensor network data marked with its own metadata in an automatically recoverable manner. Our system is intended to support fair-use policies in the scientific community. Our technique for marking data is similar to previous watermarking techniques for other media, in that we define mark embedding and both one-bit and blind retrieval algorithms that are robust to a number of transformations. Since our system is not intended as a security mechanism per se, the transformations we consider are benign and comprise modifications we expect data users to make in the course of normal study, including sampling, reordering, truncation, and rounding of data. We have performed combinatorial and empirical analysis of our system characterizing its robustness in various scenarios and providing insight into its best use. The issue of how to represent and manage metadata and provenance in sensor network data repositories has received increasing attention as these repositories grow in size and popularity. Previous related work has considered tracking provenance of data as it is republished [14] and during curation of large-scale, interconnected data repositories [2] , as well as leveraging provenance information to increase the utility of sensor data [12] . Research has resulted in online tools for sensor data storage such as SensorBase [17] which have even introduced the notion of "slogging", or logging of sensor data via systems that automate metadata annotation and support sharing with the broader community. While this previous work reflects the importance of issues we have addressed in our work, it mainly considers management and dissemination of metadata and provenance annotations, rather than introducing means to directly associate data with its metadata as in our system.. Our provenance encoding technique can be viewed as a new type of digital watermarking [9, 7] . A vast amount of research exists in this field, with watermarking techniques proposed for a variety of media; most related to our work are techniques for watermarking relational databases [1] . However, relational database watermarking typically relies on schema structure, whereas our technique treats unstructured datasets. The watermarking literature has also considered the use of watermarks to associate data with its provenance information. Previous work has treated this issue in multimedia DBMS [5] and in raw video data [10] . Our work accomplishes similar goals for sensor datasets. However, a key difference with most work on watermarking is that we do not regard the user of the data as an adversary who is attempting to detect or remove the watermark. As such, our technique does not aim to be imperceptible (although we do ensure that embedding does not affect scientific uses of the data), and we do not aim for the metadata to be inalterable. A notable exception is the VEIL system for certifying video provenance [10] , which allows an adversary to remove metadata, but aims to make it difficult for an adversary to introduce false metadata, or to alter data while still associating it with the same metadata.. Tracking provenance in curated databases [4] is another related problem of burgeoning interest. Here the issue is keeping track of the provenance of data originating from multiple sources, manually constructed by domain experts. But work in this area treats structured data and focuses on the "history" of data and how it is manipulated to obtain the curated database. Somewhat more related is work on tracking provenance in automatically-generated data warehouses [3, 6, 8, 13, 16, 20] . This body of work is mostly focused on combining provenance annotations on data warehouses in a systematic manner; by contrast, we aim to directly associate provenance information with unstructured data.

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


Similarity measures for mid-surface quality evaluation Mid-surface models are widely used in engineering analysis to simplify the analysis of thin walled parts, but it can be difficult to ensure that the mid-surface model is representative of the solid part from which it was generated. This paper proposes two similarity measures that can be used to evaluate the quality of a mid-surface model by comparing it to a solid model of the same part.Two similarity measures are proposed; firstly a geometric similarity evaluation technique based on the Hausdorff distance and secondly a topological similarity evaluation method which uses geometry graph attributes as the basis for comparison. Both measures are able to provide local and global similarity evaluation for the models.The proposed methods have been implemented in a software demonstrator and tested on a selection of representative models. They have been found to be effective for identifying geometric and topological errors in mid-surface models and are applicable to a wide range of practical thin walled designs. Mid-surface models have received a great deal of interest in recent years because they can reduce the computational cost of performing engineering analyses on thin walled parts. The mid-surface representation of a part is a dimensionally reduced abstraction in which each wall is represented by a surface of zero thickness; for thin walled objects the mid-surfaces provide a simplified description which retains the main shape characteristics of the original design. Mid-surface models are used extensively for the analysis of thin walled parts in engineering analysis applications such as finite element analysis and mould filling/ cooling analysis [1] [2][3] [4] . Mid-surface models have also been used as a basis for feature recognition from thin walled moulded parts [5] .. There are a number of automated mid-surface generation techniques that can create a midsurface abstraction from a CAD solid model, but there are currently no applications that can guarantee to generate a representative mid-surface model for any arbitrary solid part. This is partly due to limitations in the current algorithms, but also because there are many part shapes for which it is not possible to generate a representative mid-surface model [6] . In practice it is often necessary for the analyst to make manual adjustments to an automatically generated mid-surface model before it can be used for engineering analysis. Figure 1. shows an example of good and poor quality mid-surface models generated using a commercial midsurface generation tool (UGS I-DEAS NX). In Figure 1 The motivation for the research presented in this paper is to assist users of mid-surface models who need to judge how well a mid-surface model represents the solid shape from which was been generated. It should be emphasised that mid-surface representations can only accurately represent parts where the wall thickness is small compared to the other dimensions, and the methods presented in this paper are oriented towards practical applications of mid-surface models. For example in finite element analysis 2D meshes constructed on the mid-surface geometry are appropriate when "the length in one of the spatial dimensions, for example the material thickness, is much less than the lengths in the other two dimensions" [7] . Similarly parts designed for injection moulding must have a thin and relatively uniform wall thickness. Bralla [8] states that "uniform wall sections will help to produce warp-free and strain-free molded parts… Dimensional variations…are accentuated by uneven or abrupt wall-thickness changes".. The objective of the research is to develop techniques that can be used to evaluate the accuracy of a mid-surface model by measuring its similarity to the solid model from which it was generated. Two techniques are presented, one to compare the geometric similarity of the two models and the second to compare their topological similarity. The remaining sections of the paper are structured as follows:-Section 2 provides a review of the relevant literature relating to mid-surface model generation and shape similarity measures and Section 3 presents the proposed similarity measures. In Section 4 the demonstrator is described, and in Section 5 case studies are presented. Section 6 discusses the results and conclusions are drawn. This paper has described two similarity measures for comparing mid-surface and solid models. The literature review highlighted that geometric similarity is not sufficient for evaluating mid-surface model quality, and that in order to obtain useful results it is necessary to use a topological measure of similarity in combination with the geometric similarity evaluation.. The geometric similarity measure proposed in this research is based on the Hausdorff distance and requires the models to be discretised into grids of points lying on the model surfaces. The topological similarity evaluation technique uses geometry graph attributes to compare the edge topologies of the two models. The use of both techniques together gives significant advantages over performing only a geometric similarity evaluation because small geometric differences that may not be identified by a geometric method can be identified as differences in model topology.. The GSI and TSI provide a global measure of model similarity and can give confidence to an analyst that a mid-surface model is representative of its parent solid model. The graphical display of local dissimilarity helps the analyst to identify the location of any errors on the mid-surface so that the model can be modified to be more representative if required. The similarity measures have been found to be effective for identifying errors in mid-surface models and are applicable to a range of practical designs.. The geometric similarity evaluation is generic and applicable to any thin walled part. The main limitations are the difficulty in evaluating parts with widely varying wall thickness and in identifying features that are small in comparison to the local wall thickness. The topological similarity evaluation has some limitations in its current form but has been demonstrated to be applicable to a range of practical parts. In particular the current implementation of curved edge evaluation is simplistic (using only the end and mid-points for comparison) and support for filleted edges has not yet been implemented. One other potential limitation of the presented approaches is the computational cost of performing the evaluation for complicated parts; however in testing to date the time taken to perform the evaluations has been found to be acceptable, with all comparisons to date performed in less than two minutes on a Pentium P4 PC. The methodologies presented in this paper provide an initial proposal for mid-surface model similarity evaluation, but further work would be required to develop a fully functional method, in particular:.  A more sophisticated implementation of curved part checking to fully evaluate the curve-curve distances  Further investigation into the evaluation edge fillets  Investigation into the use of local threshold values to provide better support parts with variations in wall thickness. The topology of a CAD solid model can be represented using a graph structure such as the Face Adjacency Graph (FAG) [26] [27] and attributes can be used to capture information about face-edge relationships, for example the concavity/ convexity of the edge. An example of a simple solid model and its FAG is shown in Figure 4 (a) .. The topology of a mid-surface model cannot be represented using this form of graph because it violates that basic requirement of that graph that every edge must be connect exactly two faces. Mid-surface models can be represented using an alternative graph structure such as the Attributed Mid-surface Adjacency Graph (AMAG) proposed by the authors and described in [5] . Attributes can be associated with each edge to represent the edge "order", where the order of an edge refers to the number of adjacent faces using it. The mid-surface representation and geometry graph for the model are shown in Figure 4 (b). It can be observed from the figure that the solid and mid-surface models cannot be compared directly using their geometry graphs because their graphs have fundamentally different structures.

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


Generic Expression Hardness Results for Primitive Positive Formula Comparison Abstract. We study the expression complexity of two basic problems involving the comparison of primitive positive formulas: equivalence and containment. In particular, we study the complexity of these problems relative to finite relational structures. We present two generic hardness results for the studied problems, and discuss evidence that they are optimal and yield, for each of the problems, a complexity trichotomy. Overview. A primitive positive (pp) formula is a first-order formula defined from atomic formulas and equality of variables using conjunction and existential quantification. The class of primitive positive formulas includes, and is essentially equivalent to, the class of conjunctive queries, which is well-established in relational database theory as a pertinent and useful class of queries, and which has been studied complexity-theoretically from a number of perspectives (see for example [19, 18, 1] ). In this paper, we study the complexity of the following fundamental problems, each of which involves the comparison of two pp-formulas φ, φ ′ having the same free variables, over a relational structure.. -Equivalence: are the formulas φ, φ ′ equivalent-that is, do they have the same satisfying assignments-over the structure? -Containment: are the satisfying assignments of φ contained in those of φ ′ , over the structure?. We study the complexity of these computational problems with respect to various fixed structures. That is, we parameterize each of these problems with respect to the structure to obtain a family of problems, containing one member for each structure, and study the resulting families of problems. To employ the terminology of Vardi [20] , we study the expression complexity of the presented comparison tasks. The suggestion here is that various relational structures-which may represent databases or knowledge bases, according to use-may possess structural characteristics that affect the complexity of the resulting problems, and our interest is in understanding this interplay. The present work focuses on relational structures that are finite (that is, have finite universe), and we assume that the structures under discussion are finite.. In this paper, we present two general expression hardness results on the problems of interest. In particular, each of our two main results provides a sufficient condition on a structure so that the problems are hard for certain complexity classes. Furthermore, we give evidence that our results are optimal, in that the conditions that they involve in fact describe dichotomies in the complexity of the studied problems; put together, our results indicate, for each of the studied problems, a complexity trichotomy.. Our study utilizes universal-algebraic tools that aid in understanding the set of primitive positively definable relations over a given structure. It is known that, relative to a structure, the set of relations that are definable by a primitive positive formula forms a robust algebraic object known as a relational clone; a known Galois correspondence associates, in a bijective manner, each such relational clone with a clone, a set of operations with certain closure properties. This correspondence provides a way to pass from a relational structure B to an algebra A B whose set of operations is the mentioned clone, in such a way that two structures having the same algebra have the same complexity (for each of the mentioned problems). In a previous paper by the present authors [6] , we developed this correspondence and presented some basic complexity results for the problems at hand, including a classification of the complexity of the problems on all two-element structures.. Our hardness results. Our first hardness result (Section 3) yields that for any structure B whose associated algebra A B gives rise to a variety V(A B ) that admits the unary type, both the equivalence and containment problems are Π p 2 -hard. Note that this is the maximal complexity possible for these problems, as the problems are contained in the class Π p 2 . The condition of admitting the unary type originates from tame congruence theory, a theory developed to understand the structure of finite algebras [13] . We observe that this result implies a dichotomy in the complexity of the studied problems under the G-set conjecture for the constraint satisfaction problem (CSP), a conjecture put forth by Bulatov, Jeavons, and Krokhin [7] which predicts exactly where the tractability/intractability dichotomy lies for the CSP. (Recall that the CSP can be formulated as the problem of deciding, given a structure B and a primitive positive sentence φ, whether or not φ holds on B.) In particular, under the G-set conjecture, the structures not obeying the described condition have equivalence and containment problems in coNP. The resolution of the G-set conjecture, on which there has been focused and steady progress over the past decade [9, 14, 10, 3] , would thus, in combination with our hardness result, yield a coNP/Π p 2 -complete dichotomy for the equivalence and containment problems. In fact, our hardness result already unconditionally implies dichotomies for our problems for all classes of structures where the G-set conjecture has already been established, including the class of three-element structures [9] , and the class of conservative structures [8] .. One formulation of the G-set conjecture is that, for a structure B whose associated algebra A B is idempotent, the absence of the unary type in the variety generated by A B implies that the CSP over B is polynomial-time tractable. The presence of the unary type is a known sufficient condition for intractability in the idempotent case [7, 10] , and this conjecture predicts exactly where the tractability/intractability dichotomy lies for the CSP. It should be noted, however, that the boundary that is suggested by our hardness result for the equivalence and containment problems is not the same as the boundary suggested by the G-set conjecture for the CSP. The G-set conjecture, which is typically phrased on idempotent algebras, yields a prediction on the CSP complexity of all structures via a theorem [7] showing that each structure B has the same CSP complexity as a structure B ′ whose associated algebra is idempotent. The mapping from B to B ′ does not preserve the complexity of the problems studied here, and indeed, there are examples of two-element structures B such that our hardness result applies to B-the equivalence and containment problems on B are Π p 2 -complete-but B ′ does not admit the unary type and indeed has a polynomial-time tractable CSP [6] . Our new result requires establishing a deeper understanding of the identified algebras' structure, some of which admit a tractable CSP, in order to obtain hardness.. Our second hardness result (Section 4) shows that for any structure B, if the variety V(A B ) is not congruence modular, then the equivalence and containment problems are coNP-hard. Previous work identified one most general condition for the tractability of the equivalence and containment problems: if the algebra has few subpowers-a combinatorial condition [4, 14] involving the number of subalgebras of powers of an algebra-then these problems are polynomial-time tractable [6, Theorem 7] . This second hardness result appears to perfectly complement this tractability result: there are no known examples of algebras A B (of structures B having finitely many relations) that are not covered by one of these results, and in fact the Edinburgh conjecture predicts that none exist, stating that every such algebra A B that generates a congruence modular variety also has few subpowers. Concerning this conjecture, it should be pointed out that the resolution of the Zadóri conjecture, a closely related conjecture of which the Edinburgh conjecture is a generalization, was recently announced by Libor Barto [2] . The Edinburgh conjecture is of current interest, with recent work presented by Ralph McKenzie and colleagues. We also point out that this conjecture (as with the Zadóri conjecture) is purely algebraic, making no references to notions of computation.. In summary, up to polynomial-time computation, we completely resolve the complexity of the studied problems on all finite structures, showing a P/coNP-complete/Π p 2 -complete trichotomy-modulo two conjectures; one is computational and one is algebraic, and for each there is both highly non-trivial supporting evidence and current investigation. The coNP/Π p 2 -complete dichotomy is presented in Section 3 (see Theorems 5 and 6) and the P/coNPhard dichotomy is presented in Section 4 (see Theorems 11 and 12).

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


Predictable programs in barcodes We explore the challenges for making the programming interfaces for embedded devices open and safe, and present a prototype architecture for delivering verified programs using barcodes. In particular, we consider programs for microwave ovens, which provide a basic open API for controlling cooking times. In our architecture, recipes are written in Java, and their safety properties are formally verified using the model checker Spin. We use off-the-shelf utilities for compressing the byte code, and use two-dimensional barcodes for program delivery. We report on experiments that demonstrate the feasibility of the proposed architecture for predictability and delivery. The aim of this paper is to look at some issues related to the programming of embedded systems through open Application Programming Interface (API) platforms. Our specific case study is programming microwave ovens using twodimensional (2D) barcodes, but the general topic is how embedded systems can be made to have open programming interfaces that enable users and third party vendors to customize their functionality. The open platform idea is really a spectrum that ranges from open source code to modest customization hooks, but it is an important driver in smart devices. For example, Personal Digital Assistants (PDAs) are generally based on open platforms whereas other devices, like cell phones, are sometimes open (the Java phone) but usually not. Other devices, like embedded systems in automobiles, are mainly programmable only by their manufacturer. Microwave ovens occupy an interesting place in this spectrum since they are safety-critical devices that must provide at least a rudimentary open API. Consumers probably would not buy a microwave from Samsung if it could cook food from Samsung, but not from Stouffer's or Pillsbury. The microwave hardware vendors and the third-party software vendors (viz. frozen food manufacturers in this case) have a common interest in improving the interface of the device to accept better programs.. Our objective is to explore two issues of particular interest for open APIs on embedded devices: deliverability and predictability. Deliverability concerns the means used to get a program onto an embedded device. Such devices are often mobile and may have very limited interfaces so practical program delivery is often quite device-specific, as the microwave example shows. Predictability concerns the means of knowing how an open API will be used, or mis-used, by a third party vendor. For example, an operator entering a microwave recipe is likely to see an error in a recipe that recommends heating for 30 hours rather than 30 minutes, but a program in a barcode may not receive a similar sanity check by the operator. This paper describes a prototype implementation of our architecture, together with some experiments and alternatives for various steps. We created a simple microwave oven interface for Java and coded several programs using this interface. Our programs were based on typical recipes we found, but we augmented them with various enhancements that would not be feasible if the operator had to key in the recipe. We studied the problem of predicting resource usage of these programs by expressing desired properties in linear temporal logic and checking them with the model checking tool Spin. We used off-the-shelf compression and barcode encoding techniques to represent the programs, and set up a system to read the code and execute it on a laptop simulating a microwave oven.. Using barcodes printed on food packages to deliver programs seems natural for microwaves. In fact, there have been many similar proposals in recent years to enhance programmability of microwaves. One proposal envisions using a 10 digit number as a program, and a recently-marketed product uses a triple of numbers for programs. However, such programs must be very simple and cannot easily be adapted to the evolution of the devices they program, such as the addition of new sensors and actuators not envisioned when the original code was written. Our architecture uses barcodes to carry programs written in general purpose languages-Java byte-code in our experiments, and thus, provides flexibility. Two-dimensional barcodes have a capacity of 1-2 KB, and our experiments indicate that reasonably interesting recipes can be compressed using off-the-shelf utilities like gzip to meet this resource constraint.. Concerning predictability, our experiments show feasibility of applying existing formal verification technology to formulate and verify safety properties such as establishing the the total cooking time for a given recipe does not exceed a specified limit. Unlike typical applications of model checking, our programs are sequential and non-determinism arises almost exclusively from operator actions, not from concurrent interleaving. Applying a model checker like Spin requires significant effort in manually translating the Java recipes into the modeling language of Spin, as well as in formulating the assumptions about the environment. However, blow-up in computational requirements seems to be less critical in our context, and there is potential for developing domain-specific verification tools that are applicable directly to the source code.. The remaining paper is organized as follows. The second section discusses some of the relevant language issues. The third and fourth sections discuss methods related to predictability and delivery respectively. We provide more details about our prototype and experiments in the fifth section. The sixth section summarizes conclusions and discusses future work. The main contribution of this paper is our experimental prototype which demonstrates feasibility of delivering verified programs in barcodes. Such a set up can be used for open API for controlling myriad of devices from home appliances to medical devices.. We have shown that existing off-the-shelf model checkers like Spin are capable of analyzing the kind of small programs we envision running on top of embedded systems. Unfortunately, Spin requires translating a program into an input language like Promela-an error-prone process that may lead to a model that does not correspond to the original program, and we would like to develop domain-specific tools that can analyze source code.. Finally, while we have not assumed any network connectivity for our prototype, there are interesting architectural possibilities combining barcodes with network access. We plan to explore such alternative architectures in the future.

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