Spatial reasoning under imprecision using fuzzy set theory, formal logics and mathematical morphology In spatial reasoning, in particular for applications in image understanding, structure recognition and computer vision, a lot of attention has to be paid to spatial relationships and to the imprecision attached to information and knowledge to be handled. Two main components are knowledge representation and reasoning. We show in this paper that the fuzzy set framework associated to the formalism provided by mathematical morphology and formal logics allows us to derive appropriate representations and reasoning tools. In this paper, we consider spatial reasoning from the point of view of mathematical morphology. Spatial reasoning can be defined as the domain of spatial knowledge representation, in particular spatial relations between spatial entities, and of reasoning on these entities and relations. This field has been largely developed in artificial intelligence, in particular using qualitative representations based on logical formalisms. In image interpretation and computer vision it is much less developed and is mainly based on quantitative representations. A typical example in this domain concerns model-based structure recognition in images, where the model represents spatial entities and relationships between them. This paper extends the work presented in [1] , where examples of model-based structure recognition in images are shown.. Two main components of this domain are spatial knowledge representation and reasoning. In particular spatial relationships constitute an important part of the knowledge we have to handle. Imprecision is often attached to spatial reasoning in images, and can occur at different levels, from knowledge to the type of question we want to answer. The reasoning component includes fusion of heterogeneous spatial knowledge, decision making, inference, recognition. Two types of questions are raised when dealing with spatial relationships:. (1) given two objects (possibly fuzzy), assess the degree to which a relation is satisfied; (2) given one reference object, define the area of space in which a relation to this reference is satisfied (to some degree).. In order to answer these questions and address both representation and reasoning issues, we rely on three different frameworks and their combination:. • mathematical morphology, which is an algebraic theory that has extensions to fuzzy sets and to logical formulas, and can elegantly unify the representation of several types of relationships; • fuzzy set theory, which has powerful features to represent imprecision at different levels, to combine heterogeneous information and to make decisions; • formal logics and the attached reasoning and inference power.. The association of these three frameworks for spatial reasoning is an original contribution of this paper. It allows us to match two important requirements: expressiveness and completeness with respect to the types of spatial information we want to represent [2] . Complexity issues are not addressed in this paper.. In Section 2, we illustrate the importance of modeling imprecision by looking at some other domains where spatial relationships play an important role, such as linguistics or cognition. In Section 3, we address the question of spatial knowledge representation and propose different types of representations in quantitative, semi-quantitative (fuzzy) and qualitative settings, all based on mathematical morphology. In Section 4, we address the question of reasoning on these representations. In this paper we considered spatial reasoning under the light of mathematical morphology. Due to its algebraic nature, it provides a unifying framework for representing different types of spatial relationships in quantitative, fuzzy or semi-quantitative, and symbolic or qualitative settings. Based on these knowledge representations, reasoning can be addressed in a numerical or in a logical way. In particular, we have exhibited some links between morphological representations and several spatial logics that can be of interest for reasoning. These links certainly deserve to be further developed.. Another interesting direction for further research is inference of relations from known ones, applying a sort of transitivity of relations. This has been addressed in a probabilistic framework in [61, 62] . A lot remains to be done in an algebraic framework and for extended spatial entities.. Other relations could be modeled as well, such as ''between'' for instance, and introduced in a reasoning process. Modal logics of betweenness have been proposed [2] but less work has been done in quantitative and semi-qualitative frameworks [63] .. Finally, complexity issues could be addressed.

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


Optimum and heuristic synthesis of multiple word-length architectures Index Terms-Binding, bitwidth, digital signal processing, field-programmable gate array, high-level synthesis, scheduling, word-length. T HE accuracy observable at the outputs of a digital signal processing (DSP) system is a function of the word-lengths used to represent all intermediate variables in the algorithm. However, accuracy is less sensitive to some variables than to others, as is implementation area. It has been demonstrated that by considering error and area information in a structured way, it is possible to achieve highly efficient DSP implementations utilizing different word-lengths for different internal variables [1] - [4] . This paper considers the problem of architectural synthesis for multiple word-length systems. The work described in this paper may be considered as a "post-processing" step to wordlength and scaling determination procedures, as illustrated in Fig. 1 . Breaking the problem in this way means that the procedures described in this paper, unlike some word-length determination techniques, do not depend on the type of DSP system to be synthesised (restricted to linear time invariant systems in [5] , differentiable systems in [6] and [7] , and nonrecursive dataflow in [8] and [9] ). In addition, the complexity of the synthesis algorithms is reduced by breaking the problem into manageable pieces. In this paper, we concern ourselves only with the architectural synthesis block in Fig. 1 . The problems of resource allocation (deciding how many resources of a particular type should be used), resource binding (deciding which operation is to be executed on which resource), and scheduling (deciding at which clock cycle, or "time step," each operation should execute) have all been well studied [10] . However, such work has invariably considered all operations of a particular type, such as "multiply" or "add," to have identical implementations or at least an identical library of possible implementations [11] - [14] .. There has been little previous work [2] , [15] , [16] on architectural synthesis for multiple word-length systems. The multiple word-length paradigm has a significant impact on the traditional problems of high-level synthesis, arising from two factors. First, each computational unit of a specific type, for example "multiply," cannot be assumed to have equal cost in a multiple word-length implementation, since area scales with operator word-length. This issue has been considered by [2] and [15] - [17] . Second, the choice of word-length for an operation can impact on the latency of that operation. For instance, larger bit-parallel multipliers may have longer latency than smaller bit-parallel multipliers. The consideration of multiple word-lengths, therefore, complicates the resource binding problem, and also increases the interaction between binding and scheduling of operations. This issue has not been previously considered in the context of multiple word-length synthesis.. The main original contributions of this paper are therefore:. • the formulation of the multiple word-length architectural synthesis problem; • the transformation of this problem into an integer linear program;. • the construction of a polynomial time heuristic involving scheduling with incomplete word-length information, combined resource binding and word-length selection, and techniques to iteratively refine word-length information; • the evaluation of these approaches, showing that area savings of up to 46% are possible even for modest problem sizes, when compared to previous approaches. Section III provides a more concrete formulation of the problem to be addressed, after which Section IV introduces an integer linear programming (ILP) approach to the problem. The ILP approach is not practical for large problems, due to the computational complexity associated with solving the ILP model. This drawback is the motivation for a polynomial-time heuristic algorithm presented in Section V. Synthesis results are reported and discussed in Section VI and the paper is summarized in Section VII. This paper has presented work addressing the problem of architectural synthesis for multiple word-length systems. It has been demonstrated that the traditional architectural synthesis problems of operation scheduling, resource allocation, and resource binding, can be significantly complicated by the presence of multiple word-length arithmetic.. An ILP construction for the multiple word-length architectural synthesis problem has been formulated. The ILP formulation provides solutions which are optimal with respect to the area-based cost function, but suffers from long run-times which scale up rapidly with relaxation of the latency constraint.. An heuristic solution has been developed based on intertwined scheduling, resource binding/word-length selection, and word-length refinement. This involves techniques for scheduling with incompletely defined word-length information, combining binding and word-length selection, and latency-based word-length refinement based on critical path analysis.. The results from an implementation of both the ILP and the heuristic approach show that significant improvements to system area can be made by allowing noncritical operations to share large word-length resources. The heuristic solution has been shown to be within 17% of the optimal area, over a range of minimum-latency problem sizes for which between one and three orders of magnitude speedup over an ILP solver has been achieved. For nonminimum-latency problems, the execution speedup is even greater, and the heuristic lies within 25% of the optimum solution quality for all but one benchmark.. Excessive sharing of resources could cause timing violations due to the timing overhead of the multiplexers and extra routing introduced. These timing considerations are currently not modeled either in the ILP or the heuristic solution. Experimentation shows, however, that for the target platform used to collect results, such timing violations have not occurred for any of the benchmark circuits in this paper. Similarly, resource sharing causes an area overhead, which has not been modeled by the proposed techniques. Experimentation shows that, while this overhead is likely to reduce the gains presented in this paper somewhat, the savings due to the proposed technique outweigh the overheads of further resource sharing for the target technology and the benchmarks studied. Should the overhead issues be of concern in a different implementation technology, it would be straight-forward to incorporate a simple upper-bound on the sharing of a single resource as an extra set of linear constraints in the ILP formulation, or as a modification of Algorithm 6 in the heuristic solution.. As deep submicron effects become more dominant in digital system design, resource sharing becomes more dependent on physical placement. As well as overcoming the restrictions mentioned above, in the future we aim to incorporate floorplan-based routing measures into the formulation. In addition, we are actively investigating the interaction between the synthesis problem described in this paper and the word-length optimization problem in digital signal processing. The aim in this work is to target power consumption in addition to area optimization [7] . Choi et al. published a short early paper on architectural synthesis for algorithms consisting of operations with different word-lengths [18] . The authors propose a resource binding technique for algorithms that have already been scheduled. The proposed technique partitions the operations into a number of sets. A resource binding is then performed on each of these sets separately, so that operations in different sets cannot share the same resource. The authors compare their approach to a standard "word-length blind" resource binding, and demonstrate that area reductions between 2.8% and 6.8% are obtained over a benchmark set consisting of a fourth-order infinite impulse response filter, a fourth-order least-mean-square adaptive filter, and a 12th-order least-mean-square adaptive filter.. Constantinides et al. have described an approach to the architectural synthesis problem [16] . As with [18] , the techniques proposed in [16] perform resource binding as a post-processing step, when the schedule is already known. Three distinct techniques are proposed: 1) a branch and bound optimal solution; 2) a simulated annealing heuristic; and 3) a novel application-specific heuristic, each based on the coloring of conflict graphs. 1 Kum and Sung have developed some approaches to the architectural synthesis problem for algorithms consisting of operations with possibly different word-lengths [2] , [15] . These approaches include word-length conscious list scheduling [2] , [15] , and recently, also word-length conscious integer linear programming scheduling [2] . There is, however, a key simplifying assumption implicitly present in the work of Kum and Sung: no dependence is considered between the word-length of an operation and the latency of that operation. Indeed, all operation latencies are assumed to be one control-step, independent of the word-length of the resource to which they are bound. The authors present results for a fourth-order IIR filter (implemented as two second-order sections) and a fifth-order elliptic filter [2] . These results indicate that the described heuristic results in an area of between 0% and 46% (average 6%) greater than the optimum obtained through an integer linear program.. Molina, Mendias, and Hermida have also explored resource binding for prescheduled multiple word-length implementations [17] targeting ASICs, however, this work currently only supports multiple word-length addition; multipliers are implemented by breaking them into adders accumulating partial products. Resource sharing is encouraged by allowing the carry chains of adders to be broken and combined with other adders on a cycle-by-cycle basis.. To summarize, the previous work in this field includes techniques for resource binding only [16] - [18] and combined scheduling and binding [2] , with both heuristic [2] , [16] - [18] and optimal [2] , [16] approaches. None of the techniques presented thus far have considered combined scheduling and resource binding in a context where operational latency can vary with resource word-length.

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


Verifying GPU kernels by test amplification We present a novel technique for verifying properties of data parallel GPU programs via test amplification. The key insight behind our work is that we can use the technique of static information flow to amplify the result of a single test execution over the set of all inputs and interleavings that affect the property being verified. We empirically demonstrate the effectiveness of test amplification for verifying race-freedom and determinism over a large number of standard GPU kernels, by showing that the result of verifying a single dynamic execution can be amplified over the massive space of possible data inputs and thread interleavings. Despite its relative infancy, CUDA and related programming languages have already become one of the most widely used models for parallel programming. The appeal of this model is that it offers a way to exploit fine-grained data-parallelism within the comforts of C/C++ style imperative programming. The dramatic performance gains offered by the approach have led to its widespread use in a variety of domains including scientific computing, finance, and computational biology [29] .. CUDA programs are very hard to get right, for all the usual reasons, and a few new ones. First, in the course of execution, a program can spawn millions of threads, which are clustered in multilevel hierarchies that mirror a multi-level shared memory hierarchy. Second, for performance reasons, well-weathered synchronization mechanisms like locks or transactions are eschewed in favor of barriers, and it is up to the programmer to make sure that concurrently executing threads do not conflict by ensuring that their algorithms make threads touch disjoint parts of memory. Third, a key source of efficiency is the extremely fine-grained memory sharing across 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. threads. Memory bandwidth is maximized when threads with successive identifiers access, in lock-step, addresses that are physically adjacent in memory. This can lead to complex striding patterns of memory access that are hard to reason about.. An unfortunate consequence of these factors is that CUDA parallelism is difficult to analyze with existing static or dynamic approaches. Static techniques are thwarted by the complexity of the sharing patterns. A useful static analysis would have to find a succinct symbolic representation for the sets of addresses accessed by each thread. It is common for CUDA code to use modular arithmetic or bit-shifting to access memory indices according to complex linear or even non-linear patterns which makes such analyses difficult. Dynamic techniques are challenged by the combinatorial explosion of thread interleavings and space of possible data inputs: any reasonable number of tests would represent a small subset of the possible behaviors of the system. Finally, mechanisms for enforcing isolation at run-time are likely to impose unacceptable overheads, and would leave the developer the unenviable task of sifting through a huge execution trace to figure out what went wrong.. To attack these challenges, we employ test amplification, a general notion wherein a single dynamic run can be used to learn much more information about a program's behavior than is directly exhibited by that particular execution. Though this notion has been explored in many settings, we contribute a new formulation of test amplification specialized for verifying properties of CUDA kernels, which we call flow-based test amplification. Our technique skirts the limitations of existing static and dynamic approaches by combining their complementary strengths, as follows.. First, we run a dynamic analysis where we log the behavior of the kernel with some fixed test input and under a particular thread interleaving. Second, we use a static information flow analysis to compute the property-integrity inputs, namely, the input variables that actually flow-to, or affect the integrity of, the variables appearing in the property to be verified. Finally, we amplify the result of the test to hold over all the inputs that have the same values for the property-integrity inputs.. Of course, this approach would yield no mileage if all the inputs were property-integrity inputs. Our second contribution is to empirically demonstrate over a large number of CUDA benchmarks, that for key properties like race-freedom and determinism, the set of property-integrity inputs comprises just a small core of configuration inputs. These are typically parameters that describe the dimensions of the thread-and memory-hierarchies and dataset, and which are highly tuned for a given architecture and algorithm. Thus, test amplification allows us to use a single execution over the configuration to verify properties over the massive space of all possible data inputs (non-configuration inputs) and thread interleavings that constitute the behaviors of the kernel.. This simple insight ties together the complementary strengths of well-known static and dynamic approaches, yielding a clean way to analyze CUDA kernels. The static analysis is just a simple flows-to question that can be resolved via taint-propagation and an alias analysis. The dynamic analysis performs the difficult task of actually computing the sets of addresses that are accessed in complex striding patterns. Using the information flow, we can then generalize the dynamic analysis over all possible data inputs. In summary, we make the following contributions:. • We present flow-based test amplification, a hybrid technique specialized for analyzing GPU kernels which uses static information flow to generalize the result of a dynamic analysis over a large space of inputs (Section 3).. • We implement flow-based test amplification for CUDA using the LLVM framework, by implementing static taint-propagation and devising efficient ways to record and analyze traces of CUDA kernels (Section 4).. • We empirically demonstrate the effectiveness of flow-based test amplification for verifying race freedom and determinism of CUDA kernels, by conducting a systematic evaluation over the kernels available in the CUDA SDK [28] and demonstrating that the technique can be used for most kernels. Even when the technique does not apply, a kernel can often be slightly modified to fall under the scope of our analysis (Section 5). As a result, we believe test amplification can be a stepping stone to developing various safety and performance analyses for massively dataparallel programs. We start with an overview of CUDA, and then motivate our technique with a textbook CUDA kernel. In this section we discuss the literature related to our work, which fall under two broad categories: race-freedom and determinism; and test amplification. The literature on enforcing race-freedom and determinism on shared memory multithreaded programs is enormous: we limit ourselves to work that studies problems similar to the domain of GPU programs, with massive, fine-grained datasharing. Because test amplification is such a broad concept, it has appeared in many different forms in the literature. We present an indicative, albeit necessarily incomplete selection of work representative of the breadth of its application.. Race-Freedom and Determinism One closely related piece of work by Boyer et al. presents a dynamic analysis for detecting races in CUDA programs [4] . The work uses an instrumentation much like our own, to generate logs that can be used to dynamically detect races and barrier conflicts. Of course, without amplification, the results only hold for one run at a time, which is not likely to be very useful as the instrumentation imposes large overheads.. Our work is greatly inspired by PUG [23] , a tool that analyzes CUDA programs via the machinery of symbolic execution. PUG logically encodes the program executions and uses an SMT solver to check whether different threads can race within a barrier interval. PUG has several optimizations that mitigate the explosion in thread interleavings. One of these is that it is limited to checking a program with just two threads. Similarly, Vechev et al. [35] use numeric abstract interpretation to compute the sets of indices used to access shared arrays. As both these techniques are fully static, they are limited to programs for which it can infer suitable simple (linear) loop invariants, which precludes usage on many CUDA kernels which often have complex, non-linear loop invariants computed with modular arithmetic and bitwise operations.. There is an enormous literature on dynamic and static race detection for general concurrent programs. Two classical examples include work by Dinning and Schonberg [8] , and Savage et al. [32] that respectively pioneered the use of static and dynamic locksets in order to check for the absence of races. Several authors have built upon that line of work using types [11] , dataflow analysis [10] , and even greatly extended it to checking for higher level properties like atomicity [12, 13] and determinism [31] . Unfortunately, these methods don't apply in our setting as CUDA eschews lock-based synchronization.. Several authors have proposed dynamic mechanisms for enforcing determinism by constraining the scheduler. These include techniques that modify the language run-time [3, 25] or the OS [2] . Due to the run-time overheads, these methods are unlikely to apply in the GPU setting, where programs exhibit a high degree of fine-grained sharing, for example to maximize memory bandwidth.. The general idea of non-interference [18] , in which static information flow has it roots, has been proposed as a means of formalizing correctness properties of multithreaded programs [9] . Previous work has also studied the connection between information flow and concurrency. In particular, Zdancewic and Myers [37] describe the notion of observational determinism wherein a program is secure iff its observable behaviors are independent of secure inputs and scheduling, and Terauchi [34] describes a type system for observational determinism. Our novel contribution is to demonstrate how of static information flow can be used to amplify the results of a single execution across all runs over the same configuration, thereby establishing the property for arbitrary thread interleavings and data values, and to empirically demonstrate the effectiveness of this technique for verifying CUDA programs.. Test Amplification Recent work on dynamic test generation has employed test amplification with the aim of increasing code coverage [5, 6, 16, 33] . Collectively dubbed concolic testing, these techniques use dynamic symbolic execution to collect logical constraints representing input-dependent control flow conditions, then solve the constraints to obtain inputs that steer execution along different paths. At a high level, all these techniques attempt to maximize code coverage by avoiding the generation of test inputs that redundantly follow the same paths. In this context, the identification of equivalence classes of inputs that exercise the same paths may be viewed as an instance of test amplification: a single input is amplified to represent its equivalence class of inputs.. Another form of test amplification has also been explored extensively in work on runtime fault monitoring [17, 19, 21] . By piggybacking symbolic execution on top of a dynamic run, these techniques are able to detect property violations across a much larger space of inputs than those exercised by a particular concrete execution. This method has been used to find buffer overflows [21] , generalized to predict more generic property violations [19] , and adapted to generate concrete test inputs that exercise those violations [17] . Because these techniques only check properties along the tested execution path, they rely on exhaustive path search to verify properties across all executions.. The described dynamic test generation and runtime monitoring techniques fall under what we call symbolic-execution-based test amplification, an umbrella term for techniques that employ symbolic execution to learn additional information from a concrete execution. Flow-based test amplification is potentially less precise than symbolic execution, but is also much cheaper, and as demonstrated by our evaluation, quite effective in the CUDA setting. Recent work on verifying memory-safety of programs with floating-point computation [15] has even combined dynamic symbolic execution with a static flow analysis which establishes that floating-point values do not interfere with non-floating point values, thereby allowing amplification of symbolic execution guarantees over floating point computations. The effectiveness of flow-based test amplification stems from the fact that programs in the domain isolate the data values being operated on (e.g. input arrays or floating point numbers) from those used to determine control-flow and memory accesses.. Finally, test amplification has also appeared in work on the analysis of general concurrent programs. Wang and Stoller [36] describe two dynamic analyses for detecting atomicity violations in concurrent Java programs: one that employs Lipton's theory of reduction [24] to reason about commutativity of concurrent events to infer atomicity, and another that searches for unserializable permutations of events to detect atomicity violations. Both analyses use test amplification in the sense that they examine a single execution but are capable of detecting violations occurring in other possible interleavings. A different instance of test amplification appears in work by Chen and Roşu [7] , which proposes a relaxation of the classical happen-before causality partial order [14, 20] to admit a greater number of compatible interleavings. This relaxation amplifies the partial order to a larger space of possible executions, thus opening subsequent analyses to detect property violations in more interleavings. A key contribution of our work is to demonstrate that enumerating interleavings is simply unnecessary for many CUDA kernels: we can apply static information flow analysis to generalize our determinism guarantee to a massive space of interleavings from a single execution. We have implemented the analyses described in the previous section in the LLVM Compiler Infrastructure [22] . In particular, we have implemented a static taint-based information flow analysis that checks whether CUDA kernels are access invariant, and a dynamic instrumentation-based analysis that checks whether a kernel satisfies the determinism property ΦDet for a particular execution. Though the formalism in the previous section presented a simplified, two-level memory model and one-dimensional thread geometry, our implementation handles the multi-dimensional thread geometries and three-layer memory hierarchy supported by CUDA. Next, we describe the static and dynamic analyses in greater detail. To evaluate our approach, we started with the 68 benchmarks in the NVIDIA CUDA SDK Version 3.0. Of these 68 benchmarks, 7 are small tutorial-like benchmarks with trivial kernels, and so we leave these out. Of the remaining benchmarks, 33 contain features which our analysis cannot run on, due to the limitations previously mentioned. We therefore omitted these as well, which leaves us with 28 benchmarks, for which we report results. These 28 benchmarks contain a total of 76 kernels.. The static analysis runs on one kernel at a time. We manually examined each kernel to determine the correct set of data inputs (non-configuration input variables) to supply the static analysis. We tried to minimize the set of configuration variables by manually examining code to determine the domain-specific interpretation of each input. The separation of data and configuration variables is usually quite immediate. As an example, for the scalarProd benchmark, the set of data input variables is d C, d A, and d B (since these are the input vectors). Since sizeN represents the size of the data set, we consider it to be a configuration variable.. For the dynamic analysis, we run each benchmark containing access invariant kernels with instrumentation turned on. Benchmarks with multiple kernels will produce logs containing entries from several kernels. A postprocessing step separates the entries corresponding to each kernel. The logs can then be processed one kernel at a time.

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


Mid-air display experiments to create novel user interfaces Abstract Displays are the most visible part of most computer applications. Novel display technologies strongly influence and inspire new forms of computer use and interaction. We are particularly interested in the interplay of novel displays and interaction for ubiquitous computing or ambient media environments, as emerging display technologies may become game-changers in how we define and use computers, possibly changing the context of computing fundamentally.We present some of our experiments and lessons learnt with a new category of displays, the "immaterial" FogScreen. It can be described as a novel media platform, exhibiting some fundamental differences to and advantages over other displays. It also enables novel kinds of user interfaces and experiences. In this paper we give insights about the special properties and strengths of the FogScreen by looking at a set of successfully demonstrated interfaces and applications. We also discuss its future potential for user interface design. Mid-air displays can enhance and bring new dimensions for the viewing experience in many ways. The major advantages of the FogScreen technology are its mid-air and immaterial nature and the walk-or reach-through possibility (with a resulting magic and excitement factor), superior image quality and larger screen compared with earlier particle screens. Additional advantages are the translucent, divergent (or correlated) dual-sided display possibility, which enables e.g., face-to-face interaction for multiple viewers, possibility for direct interaction, and its very intriguing appearance. It is an engaging and immersive experience if carefully designed and executed.. The permeability of the FogScreen enables new imaging, visualization and user interface possibilities. The users occupy the same space as the image and can directly interact with the displayed mid-air objects as well as select and manipulate them in a natural and intuitive manner without physical limits imposed by screens or confined display volumes.. There are numerous forms, constructions, sizes, variations and extensions of the screen that could produce very different kinds of devices, displays, content and applications. Midair displays may soon become widely available for location-based advertisement, digital signage and entertainment and in the long term also for consumers at home. They may contribute to transforming the future user interface experience and ambient media. They even seem to be a feasible short-cut technology to create Star Wars -like mid-air displays [13] .. We anticipate stereoscopic and user-tracked VR mid-air displays to be very exciting for the future. Mid-air display features can be extended with other visual, auditory or olfactory technologies or be integrated with other kinds of visual displays. Even untethered tactile feedback in thin air might be possible [8] , which could improve the sense of presence of virtual objects.. Mid-air displays have initially been a novelty, but in the long term they could become lower-cost and have a big impact also on application areas such as CAD, data visualization, digital signage, tele-presence, tele-immersion and tele-conferencing, simulation and entertainment. These displays enable a user to investigate, try out scenarios and search the information and visual space to develop a better understanding of the underlying information.. More work is needed on the interaction technology, user interface and application possibilities, as well as on usability studies and on creating suitable content for the media platform. Our studies have employed only the FogScreen, but the results should be applicable also for other types of walk-through displays (e.g., water and smoke screens), apart from their wetter features and/or worse image quality.. Recent advances in miniaturization and rapidly decreasing cost of projectors, innovative new sensors and mid-air displays makes it reasonable to envision a not-so-distant future in which intelligent, proactive and responsive mid-air content and displays in our daily environment will function as visualization platforms or control panels.. Stephen DiVerdi is a research scientist at Adobe Systems Inc. He received his Ph.D. degree in computer science in 2007 at the University of California, Santa Barbara, where he was a member of the "Four Eyes" lab. His work is focused on applying computer graphics and computer vision to create new modes of interaction between humans and computers. We have demonstrated several types of applications at numerous trade shows, special events and conferences. In our public demos, audiences have interacted with the walk-through Fig. 11 The user can move freely and also reach through or walk to the other side of the screen screen over extended periods of time and reactions have been enthusiastic throughout. We received many favorable comments and witnessed users being thoroughly engaged in the interaction experience when the interface was simple and direct.. However, the whole concept of interactive mid-air display is so new that some viewers had initial difficulties with grasping the idea of walk-through screens and mid-air interactivity. Some simple instructions turned out to be helpful, such as a text in mid-air saying "touch me" [16] . Some older people were even afraid of the flow and rather walked around the screen. This underlines the importance of well-designed content with any media platform.. Jumisko-Pyykkö et al. [9] examined children's game experiences between physical gaming on the FogScreen with hand-held pointer interaction and on a conventional desktop computing. Their results underlined that the players were delighted of the novel mid-air gaming environment, its stimulation of physical activity, and intuitiveness. The interaction with the display was however demanding, which was partly due to the interaction devices used. The immaterial screen is less obtrusive than traditional screens and suit well also for fitness and physical exercise purposes such as virtual boxing, fencing, karate or other martial arts, racket sports etc.. Stereoscopic views on the FogScreen can be generated both with active and passive (e.g., polarized) stereoscopy [4] . The stereoscopic effect seems to be pronounced compared with a traditional silvered projection screen, which may be due to the lack of a reference plane, as objects on the FogScreen appear to float in mid-air, instead of being "anchored" in front of the screen plane. The projecting "cones" emanating from the projectors due to ambient fog or haze may contribute to the exaggerated sense of depth. Also autostereoscopic display (without glasses) for a single viewer is possible in a limited experimental setup with depthfused 3D rendering [11] .. As detailed in the last section, head-tracked perspective rendering presents pseudo 3D imagery even without stereoscopy. As the projection plane is 2D, the eye cannot in fact accommodate to the correct distance. Nevertheless, this creates a strong 3D effect of objects floating in thin air. Such an interactive VR mid-air display can be very large, and does not restrict the user from "touching" and interacting with the objects, leading to a more immersive experience. Fig. 12 The FogScreen can be used for freely accessible mid-air virtual reality spaces, here a 3D model of a cartoony shark, rendered from the perspective of a tracked user. The 3D shark appears fixed in space and the user can walk around it and even stick his head into the shark's mouth. The FogScreen seems intriguing to all sorts of people and makes them excited about engaging with it. It is an entirely novel media platform for special effects, digital signage, gaming, and other applications. As the image quality of the devices will improve, it can also be used as a high-resolution information display. The development of a true volumetric 3D walk-through display remains an open research issue.

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


An efficient measure of compactness for two-dimensional shapes and its application in regionalization problems A measure of shape compactness is a numerical quantity representing the degree to which a shape is compact. Ways to provide an accurate measure have been given great attention due to its application in a broad range of GIS problems, such as detecting clustering patterns from remote-sensing images, understanding urban sprawl, and redrawing electoral districts to avoid gerrymandering. In this article, we propose an effective and efficient approach to computing shape compactness based on the moment of inertia (MI), a well-known concept in physics. The mathematical framework and the computer implementation for both raster and vector models are discussed in detail. In addition to computing compactness for a single shape, we propose a computational method that is capable of calculating the variations in compactness as a shape grows or shrinks, which is a typical application found in regionalization problems. We conducted a number of experiments that demonstrate the superiority of the MI over the popular isoperimetric quotient approach in terms of (1) computational efficiency; (2) tolerance of positional uncertainty and irregular boundaries; (3) ability to handle shapes with holes and multiple parts; and (4) applicability and efficacy in districting/zonation/regionalization problems. The compactness measure of a shape, also known as its shape index, is a numerical quantity representing the degree to which a shape is compact (Gillman 2002) . Here, shape refers to geometric objects that have a two-dimensional extent, such as objects used to describe a park or a parcel of land, as opposed to one-dimensional features such as network links or three-dimensional features such as a globe. Compactness is acknowledged as one of the most intriguing and important properties of a shape (Angel et al. 2010) and is widely used as a descriptor in a variety of domain tasks. For instance, compactness is a critical factor in defining and analyzing homogeneous habitat regions in ecology (Eason 1992) . Within computer vision, there have been many applications of shape compactness for object matching and pattern recognition (Edwards et al. 2003) . In content-based image *Corresponding author. Email: wenwen@asu.edu retrieval, this factor is used to identify shape signatures for non-rigid shape search and retrieval in large databases (Ovsjanikov et al. 2009 ). In psychological studies, compactness has been introduced to quantify perceptual stability and to understand the causes of perceived shape aesthetics (Friedenberg 2012) .. In GIScience, the quantification and computation of shape compactness has been a long-standing and fundamental research question for a number of reasons. First, a compact region has appealing properties because compactness implies maximum accessibility to all parts of the shape, and a compact shape is likely to be homogeneous, therefore sharing common attributes and properties (Tobler 1970) . Second, identification of shape has a great impact on the search for, and extraction of, spatial patterns, which is essential to analyzing and understanding geographical phenomena, as well as predicting future patterns (Wentz 1997) . Third, the geographical world is populated with spatial objects described through areal representations, making compactness an important part of understanding these objects. Therefore, shape comparison has been given great attention due to its application in a broad range of geographical problems (MacEachren 1985) . For example, there has been a long history of using compactness within political geography to assess the constitutionality of political districts based on their shape (Gibbs 1961 , Rinder et al. 1988 , Fryer and Holden 2007 . In urban morphology studies, Christaller (1968) deduced the emergence of compact hexagonal arrangements of towns in his 'central place theory' (CPT). More recently, compactness has become a well-established principle used to guide city planning, evaluate urban settings, and study urban sprawl (Chandra et al. 2009 ). In addition, compactness is a well-known index to describe the hydrological properties of drainage basins (Bardossy and Schmidt 2002) .. The geospatial applications mentioned above concern the role of compactness as a shape index to measure a single shape. In practice though, there are also a significant number of applications requiring the computation of compactness for two or more adjacent shapes that are grouped together. This type of application, called regionalization, often involves large spatial datasets, such as census data, and requires the aggregation of a large number of shapes into a smaller number of larger regions. Using compactness as a measure in regionalization was discussed as early as the 1960s; Weaver and Hess (1963) emphasized the importance of generating compact regions in designing political districts. Kaiser (1966) and Young (1988) discussed the use of moment of inertia conceptually in measuring the compactness of electoral districts and concluded that moment of inertia is not only good at measuring compactness, but also provides a measure of size. In 1977, Openshaw discussed the importance of achieving a degree of compactness in solving the Modifiable Areal Unit Problem (MAUP) (Openshaw 1977 (Openshaw , 1978 . In 1995, Openshaw and Raw discussed Automatic Zoning Procedure (AZP) for census redesign, which became the basis for the design of the 2001 UK census geography (Martin et al. 2001) . In this procedure, compactness was considered to be an important requirement to meet. Since then, many compactness measures have been proposed by the geography community (Horn et al. 1993) , such as those based upon isoperimetric quotients, reference shape comparison, and moment of inertia. There are also a number of indirect compactness measurements, such as methods based on the distance to a reference point (Haunert and Wolf 2010) , ratio of the actual area of a region to its minimum external peripheral area (Datta et al. 2012) , and those reviewed by Duque et al. (2007) .. To evaluate the efficiency and effectiveness of compactness measures, we propose the following criteria: (1) robust, (2) computationally efficient, and (3) additive. Robust here meaning the algorithm should be able to measure the compactness of any shape. As any digitization process produces some degrees of uncertainty (Goodchild 1996) , a robust measure should also be relatively insensitive to such uncertainty. Moreover, a robust measure should be stable for a given fixed shape regardless of changes in size and spatial resolution. In addition to robustness, computational efficiency is an important factor when problem sizes are very large. A good algorithm for computing compactness should be computationally efficient to the extent that it is not a bottleneck in GIS processing. In addition, for some practical applications such as a regionalization problem, one may need to measure the changing compactness of a region as it is combined with other areas on the fly, instead of recomputing compactness from scratch at each iteration. In fact, an algorithm should be able to obtain a compactness value when merging two or more regions using a simple summation approach; in other words, the algorithm should be 'additive', which is the third criterion. A compactness measurement approach that is additive and easy to compute will reduce computational complexity and improve the computational efficiency and effectiveness when used in real-world applications.. In this article, we propose a new and efficient way to compute compactness based on the concept of the moment of inertia (MI), a well-known quantity in physics. Although earlier research has considered the use of MI (Kaiser 1966 , Massam and Goodchild 1971 , Zhang et al. 2006 , considerable barriers existed in its widespread adoption. First, there was no clear, definable way in which it could be applied. Second, few tests have demonstrated its superiority. We therefore attempt to address both of these barriers. Section 2 reviews the existing methods for computing compactness and their pros and cons. Section 3 discusses in detail the mathematical equations of our proposed trapeziumbased method for computing moment of inertia for both vector and raster data. Section 4 provides details of how this approach can be implemented. Section 5 compares statistically the performance of our proposed method against the commonly used Iso-Perimetric Quotient (IPQ) measure. Section 6 introduces a large practical application of this method in generating a set of 100 compact zones spanning Southern California that are used as the basic spatial units for a large scale economic simulation model. Section 7 concludes the work and proposes directions for future research. Adopting an MI index as a standard for shape measurement has been hampered by the lack of an efficient, computationally simple method of computing the moment of inertia. Previous discussions remained at the conceptual level (Kaiser 1966 , Young 1988 or focused on the implementation of only a single shape's compactness measure (Zhang et al. 2006) . In this article, we proposed a clear mathematical definition and computer implementation of a trapezium-based approach for computing moment of inertia and the corresponding compactness index based upon it. This approach has the advantage of uniquely determining the compactness value, in comparison with the triangular approach proposed by Massam and Goodchild (1971) . Through successive experiments in Section 5, we demonstrated that measuring compactness with the proposed MI shape index has clear advantages over the commonly used IPQ. Moreover, we not only discussed the MI computation for vector data, we also presented a specialized form in which it can be applied to a raster data model. We successfully integrated this measure into a large and practical regionalization problem to demonstrate its easy extendibility and integrity. This article makes a major contribution to geographic analysis through the development of a robust, additive, computationally efficient, and easy-to-integrate compactness measure. It also proposes that an MI shape index should be considered as a standard method for measuring compactness.. Though the discussion in this article has been focused on measurements based on pure geometry, the MI approach is easily extended to applications measuring compactness weighted by the distribution of a property such as population, which is a feature that is not supported by any of the other methods discussed. In a vector model, we could assume that each basic spatial unit (a single shape) had a uniform density ρ, and by weighting each element of area dA in Equation (7) by ρ, a density-weighted shape index can be obtained. When it is desirable to investigate the property at a finer level of detail, the shift can be made to a raster representation and the shape index can be measured by a weighted summation of pixels for that property. This will be the direction taken in our future research in order to extend the methodological framework. We will also promote and broaden the application of the proposed compactness measure to enhance the ability to precisely identify compact spatial clusters, as needed in multiple scientific fields such as spatial epidemiology and criminology.

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


High capacity recurrent associative memories Various algorithms for constructing weight matrices for Hopfield-type associative memories are reviewed, including ones with much higher capacity than the basic model. These alternative algorithms either iteratively approximate the projection weight matrix or use simple perceptron learning.An experimental investigation of the performance of networks trained by these algorithms is presented, including measurements of capacity, training time and their ability to correct corrupted versions of the training patterns. In this paper we aim to survey the current state of knowledge of a range of high capacity neural network associative memory models, and to present an empirical evaluation of those models. Each model employs a fully connected network of threshold devices, similar to that employed in the original Hopfield model [20] .. Networks of the Hopfield type have proved in the past to be amenable to rigorous analysis, and much is known about the behaviour of the standard model under both deterministic and stochastic dynamics [2, 4, 24, 30] . In large part this is due to the strong similarity of such systems to spin glasses, which has enabled some powerful tools of statistical physics to be applied. The standard model uses a very simple weight matrix, formed with a 'one-shot' Hebbian rule, which produces a network with relatively poor capacity and performance. A variety of other learning rules have subsequently been proposed which produce better performance, albeit at the cost of increased complexity. The resulting weight matrices are not as easily analysed as those of the original rule and currently some performance questions, for these types of model, are only open to empirical investigation. It is to these questions that this paper is primarily addressed. Other empirical investigations include those of Forrest [15] , Krätzschmar & Kohring [26] , Schultz [36] and Jagota & Mandziuk [23] .. This paper surveys the main types of variation to the basic Hopfield model, and describes a set of empirical tools for evaluating associative memories of this type. The central part of the paper gives the results of an evaluation of the most important features of such networks.. The next Section of the paper discusses Associative Memories in general and motivates the analysis that follows. Section 3 outlines the important features of the models to be evaluated and Section 4 the relevant evaluation methods. Section 5 gives the results and an analysis of them.. Different analysis tools are relevant to different models. However as already described a distribution can be computed for each model, and these are illustrated in Section 5.1. For models in the first universality class it is also relevant to calculate the maximum capacity, the other classes having fixed maximum capacities, defined by their class. The learning time, usually measured in epochs, is relevant to the iterative methods. The value, and how close it can get to the ideal maximum value max , defined for the Gardner of models is analysed for the two models in this class. Also the Iterative Local Learning method and the Krauth and Mézard method have a T value associated with them, which the aligned local fields need to be driven above. This value can be varied and results compared. Apart from this all models can be compared using the size of the attractor basins after training and an appropriate measurement for this is described next. In this paper we have set out to present, and empirically evaluate, a range of learning rules for high capacity associative memories. The basic model, originally proposed by Hopfield, is very attractive as an abstract model of associative memory, having point attractors amongst which, at low loading, are the trained patterns. In addition the learning rule is one-shot and local. As shown earlier, Storkey's modification to the learning rule maintains these benefits whilst increasing the capacity.. Two quite different approaches to training these networks have been proposed. The first is to use the pseudo-inverse prescription to create a weight matrix in which the trained patterns are guaranteed to be stable. The second approach uses perceptron training, continuing until all the local fields are correctly aligned and above a specified threshold.. Pseudo-inverse rules only work if the patterns are linearly independent, which for random patterns is very likely, up to the dimension of the weight space, implying that such a learning rule will be able store up to N patterns in an N unit network. Two interactive formulations for calculating the pseudo-inverse matrix, in the context of these types of AMs, have been proposed. The first, LL-Eq, is analogous to the delta rule for training perceptrons, it is local and will converge if a solution exists. The BV learning algorithm is faster and incremental: new patterns can be added to an existing weight matrix without destabilising those patterns already learnt. This property is very important: for all the other incremental learning algorithms, the addition of a new pattern to an already formed weight matrix may produce the phenomenon known as catastrophic forgetting [32] , in which significant numbers of previously learnt patterns are destabilized. However, the BV rule relies on a certain amount of non-local information.. The full pseudo-inverse matrix with self-connections has an effective capacity of only N/2, as above this loading the trained patterns do not act as attractors (although they are stable). Simply removing all the self connections overcomes this problem, but as Gorodnichy has shown this is not the best policy. In fact maintaining the connections at 0.15 of their original value appears to give optimal attractor performance for uncorrelated training patterns.. The second, perceptron-inspired approach, is exemplified by the LL rule, which simply continues until all the training patterns are learnt. As is well known, perceptron training will converge on a solution if one exists. The capacity of an individual perceptron is known to be at least 2N for a perceptron with N inputs [10] , so a Hopfield type network of N units (each of which has N-1 inputs) will have a capacity of approximately 2N using this rule. By changing the order of weight updates, according to the Krauth/Mézard prescription, optimal stability measures can be obtained. Once again this comes at a price: the loss of temporal locality in the algorithm -the entire training set must be considered in order to determine the value of a single set of weight updates for each unit.. These two high capacity variations do produce much more effective AMs. The results Section shows a similar performance for the best versions of these rules. It is notable, however, that the simplest of all these variants, standard perceptron learning (LL), is at least as effective as any other rule; however, it is prone to catastrophic forgetting when additional patterns are added.. A potential difficulty with the Class 3 rules is that they produce non-symmetric weight matrices. The reason for this is that although the weight change on weight w ij is always the same as the weight change on w ji , the two weight changes do not necessarily co-occur in any particular epoch. The presence of asymmetric weights immediately complicates the dynamics of the network -there is no energy function and complex behaviour may arise. Nevertheless if the weights are reasonably symmetric, as they appear to be for the Class 3 rules at the loadings considered here, then the behaviour is close to that of the symmetric networks. Nonetheless it is straightforward to force the Class 3 rules to produce symmetric weight matrices and we have examined the consequences of this elsewhere [11] .. From the results presented here it is clear that it is possible to make significant improvements to the performance of recurrent associative memories by modifying the learning algorithm they employ. However, the network models we have investigated still lack certain of the key features that are associated with biological associative memories, such as structured network topologies, sparse connectivity and non-deterministic dynamics. It is our intention to use the results presented here to inform the design of associative memories that are both more biologically plausible and of greater practical use. In this Section the empirical evaluation of the various associative memory models described in Section 3 is presented. The first Section examines the distributions of the models.

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


High-fidelity numerical simulation of the dynamic beam equation A high-fidelity finite difference approximation of the dynamic beam equation is derived. Different types of well-posed boundary conditions are analysed. The boundary closures are based on the summationby-parts (SBP) framework and the boundary conditions are imposed using a penalty (SAT) technique, to guarantee linear stability. The resulting SBP-SAT approximation leads to fully explicit time integration. The accuracy and stability properties of the newly derived SBP-SAT approximations are demonstrated for both 1-D and 2-D problems. The dynamic beam equation (DBE), also known as the Euler-Bernouilli beam equation, is a standard model of flexible body dynamics and is thus of interest in many engineering applications where beams are used as the basis of supporting structure or as axles, e.g when studying vibrations of buildings or railway structures. The DBE is derived from Euler-Bernoulli beam theory, one of the simplest beam theories dating back to the 18th century. The model includes potential energy arising due to strain forces from the bending of the beam and kinetic energy due to the lateral displacement of the beam.. ture the dispersive nature of the equation efficiently it is even more essential that high-order (i.e. higher than second order) spatially accurate numerical methods are used to capture the high-frequency parts of the solution. The time-dependent Schrödinger equation is also a dispersive wave equation that have been successfully solved using the SBP-SAT method [2, 33] . However, the numerical treatment of the DBE is much more challenging due to the high order derivative. Another distinction is that the DBE has a second derivative in time while the Schrödinger equation has a first derivative in time. (By splitting the Schrödinger equation into real and imaginary components it is possible to obtain an equation similar to the DBE for the real component.). Since the wave speed scales as the frequency, the physics require that we take much smaller time-step (k) compared to the spatial grid-size (h), in order to resolve the fastest going waves (i.e., the high-frequency part of the solution). Hence, the physics require k h 2 . In the present study we will derive an explicit time-integration with a CFL condition similar to the physical time-step requirement. This physical restriction on the time-step is another motivation to employ spatially high-order accurate methods to allow for larger h. As the DBE involves a fourth derivative in space, the numerical boundary treatment is challenging. In particular the treatment of clamped BC, requires novel treatment when employing the SBP-SAT technique.. The main focus in the present study is to construct high-order accurate explicit (i.e., do not require solving any equation system to obtain the difference approximation) SBP-SAT approximations of the DBE, for quite general type of BC.. In Section 2 the DBE is introduced, including the most common types of BC. In Section 3 the SBP-SAT method is introduced. Stability analysis of the various SBP-SAT approximations are presented in Section 4. Time integration is analysed and discussed in Section 5. In Section 6 the accuracy and stability properties of the newly developed SBP-SAT approximations are verified by performing numerical simulations. The extension to 2-D applications is addressed in Section 7. Section 8 summarizes the work. The SBP operator for the fourth-order accurate case is presented in the Appendix. The main focus has been to construct explicit, stable and high-order accurate SBP-SAT approximations of the DBE with various BC. To guarantee stability we employ novel SBP operators (derived in [32] ) to approximate the fourth-derivative terms, combined with the SAT technique to impose the BC weakly. One of the main results in the present study is the proof that it is necessary to "borrow" from the fourth-derivative SBP operator in order to derive a stable boundary treatment.. Numerical computations in 1-D and 2-D corroborate the stability-and accuracy-properties and show that the higher-order accurate approximations are superior to the corresponding second-order accurate SBP-SAT schemes.. Another main result concerns the CFL conditions for the DBE involving both first and second derivatives in time. It is shown that explicit RungeKutta methods have severe CFL restrictions and a better choice is to us a time-symmetric finite difference method.. In a coming study we will derive a higher-order accurate time-symmetric finite difference approximation when temporal first derivatives in time are present. We will also extend the SBP-SAT method to the DBE with nonconstant coefficients.

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


Generative models for name disambiguation Name ambiguity is a special case of identity uncertainty where one person can be referenced by multiple name variations in different situations or even share the same name with other people. In this paper, we present an efficient framework by using two novel topic-based models, extended from Probabilistic Latent Semantic Analysis (PLSA) and Latent Dirichlet Allocation (LDA). Our models explicitly introduce a new variable for persons and learn the distribution of topics with regard to persons and words. Experiments indicate that our approach consistently outperforms other unsupervised methods including spectral and DBSCAN clustering. Scalability is addressed by disambiguating authors in over 750,000 papers from the entire CiteSeer dataset. Name queries makes up approximately 5-10% of all searches on the Internet, but they are usually treated by search engines as normal keyword searches without paying attention to the ambiguity of particular names. For example, searching Google for "Yang Song" results in more than 11,000,000 pages, of which even the first page shows five different people's home pages. Beyond the problem of sharing the same name, name misspelling, name abbreviations and other issues compound the challenge of name disambiguation. The same issue also exists in most Digital Libraries (DL), due to the existence of both synonyms and polysems. In the case of synonyms, an author may have multiple name variations in citations, e.g., the author "C. Lee Giles" is sometimes used as "C. L. Giles" in his citations. For polysems, different authors may share the same name label in multiple citations, e.g., both "Guangyu Chen" and "Guilin Chen" are used as "G. Chen" in their citations.. Copyright is held by the author/owner(s). The joint probability of the topic-based PLSA model (see Figure 1 (a)) over d×a×w is defined as the mixture P (d, a, w) = P (d)P (a, w|d) where P (a, w|d) = P z∈Z P (a, w|z)P (z|d). The definition of the generative model can be described as follows. (1) pick a doc d from the corpus D with probability P (d); (2) select a latent class z k with probability P (z k |d); (3) generate a word w with probability P (w|z k ); (4) generate a name a with probability P (a|z k ). Putting it all together, the joint probability can be parameterized by To disambiguate names, we use a hierarchical agglomerative clustering method. Two sets of metrics are applied in our experiments, namely pair-level pairwise F1 score F 1P and cluster-level pairwise F1 score F 1C. We also compare with the basic agglomerative clustering, spectral clustering and DBSCAN method.. We collected meta-data from the CiteSeer digital library. Nine most ambiguous author names from the entire data set are tested, the results are shown in Figure 2 . Table 1 : LDA results of two different "Jun Yang". Table 1 lists an illustrative result from LDA. We depict topics that clearly show the differences for disambiguating authors with exactly the same name. One "Jun Yang" has very high probability of topic "Database" while the other are highly related with the topic "Multimedia", thus they can be clearly disambiguated from each other.. We empirically tested our models for the entire CiteSeer data set with more than 750,000 documents. PLSA yields 418,500 unique authors in 2,570 minutes, while LDA finishes in 4,390 minutes with 418,775 authors. Considering that our methods only make use of a small portion of the text for each instance (metadata plus the first page), we believe the framework can be efficient for large-scale data sets.

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