IRM: Integrated File Replication and Consistency Maintenance in P2P Systems Abstract-In peer-to-peer file sharing systems, file replication and consistency maintenance are widely used techniques for high system performance. Despite significant interdependencies between them, these two issues are typically addressed separately. Most file replication methods rigidly specify replica nodes, leading to low replica utilization, unnecessary replicas and hence extra consistency maintenance overhead. Most consistency maintenance methods propagate update messages based on message spreading or a structure without considering file replication dynamism, leading to inefficient file update and hence high possibility of outdated file response. This paper presents an Integrated file Replication and consistency Maintenance mechanism (IRM) that integrates the two techniques in a systematic and harmonized manner. It achieves high efficiency in file replication and consistency maintenance at a significantly low cost. Instead of passively accepting replicas and updates, each node determines file replication and update polling by dynamically adapting to time-varying file query and update rates, which avoids unnecessary file replications and updates. Simulation results demonstrate the effectiveness of IRM in comparison with other approaches. It dramatically reduces overhead and yields significant improvements on the efficiency of both file replication and consistency maintenance approaches. O VER the past years, the immerse popularity of Internet has produced a significant stimulus to peer-to-peer (P2P) file sharing systems. A recent large-scale characterization of HTTP traffic [1] has shown that more than 75 percent of Internet traffic is generated by P2P applications. The percentage of P2P traffic has increased significantly as files such as videos and audios have become almost pervasive. The study also shows that the access to these files is highly repetitive and skewed towards the most popular ones. Such objects can exhaust the capacity of a node, leading to delayed response. File replication is an effective method to deal with the problem of overload condition due to flash crowds or hot files. It distributes load over replica nodes and improves file query efficiency. File consistency maintenance to maintain the consistency between a file and its replicas is indispensable to file replication. Requiring that the replica nodes be reliably informed of all updates could be prohibitively costly in a large system. Thus, file replication should proactively reduce unnecessary replicas to minimize the overhead of consistency maintenance, which in turn provides guarantee for the fidelity of consistency among file replicas considering file replication dynamism. File replication dynamism represents the condition with frequent replica node generation, deletion, and failures. Fig. 1 demonstrates the interrelationship between file replication and consistency maintenance.. Despite the significant interdependencies between file replication and consistency maintenance, they have been studied separately. In most current file replication methods, file owners rigidly specify replica nodes and the replica nodes passively accept replicas. The methods were designed without considering the efficiency of subsequent file consistency maintenance. Specifically, these methods replicate files close to file owners [2] , [3] , [4] , requesters [5] , [6] , or along a query path between a file requester and a file owner [7] . These methods make it difficult to adjust the number of replicas to the time-varying utilization of replicas and to ensure that all replicas are fully utilized. The number of replicas has a significant impact on the overhead of file consistency maintenance. Large number of replicas needs more updates hence high consistency maintenance overhead and vice versa. Therefore, the methods lead to high overhead for unnecessary file replications and consistency maintenance.. On the other hand, in addition to centralized methods [8] , [9] , which are not suitable to decentralized large-scale P2P systems, most consistency maintenance methods update files by relying on a structure [10] , [11] , [12] , [13] , [14] or message spreading [15] , [16] , [17] . Though these methods generally can be applied to all file replication methods, they cannot be exploited to their full potential without considering timevarying and dynamic replica nodes. Structure-based methods assume relatively stable replica nodes, which does not hold true in practice due to dynamic replica nodes caused by file replication. Replica nodes may be continuously and rapidly generated, deleted, and fail. Such file replication dynamism will lead to unsuccessful update propagation, and significantly high overhead for structure maintenance. System-wide message spreading will generate tremendously unnecessary redundant messages. In addition, they cannot guarantee that all replica nodes can receive a update message. Therefore, without taking into account file replication dynamism, consistency maintenance generates unnecessary overhead and cannot help to guarantee the fidelity of replica consistency. Furthermore, as in file replication, passively accepting update messages makes it difficult to avoid unnecessary updates in order to reduce overhead.. Uncoordinated deployment of file replication and consistency maintenance techniques can negate each other's efforts and lead to suboptimal or even low system performance. As a result, on one hand, file replication is faced with a challenge to minimize the number of replicas to reduce the consistency maintenance overhead, without compromising its efficiency in hot spot and query latency reduction. On the other hand, consistency maintenance is faced with a challenge to guarantee the fidelity of replica consistency in a timely fashion with low overhead considering file replication dynamism. This makes it important to integrate the two techniques to enhance their mutual interactions and avoid their conflicting behaviors, ensuring that the two techniques can be exploited to their fullest capacities.. This paper presents an Integrated file Replication and consistency Maintenance mechanism (IRM) that achieves high efficiency in file replication and consistency maintenance at a significantly lower cost. IRM integrates file replication and consistency maintenance in a harmonized and coordinated manner. Basically, each node actively decides to create or delete a replica and to poll for update based on file query and update rates in a totally decentralized and autonomous manner. It replicates highly queried files and polls at a high frequency for frequently updated and queried files. IRM avoids unnecessary file replications and updates by dynamically adapting to timevarying file query and update rates. It improves replica utilization, file query efficiency, and consistency fidelity. A significant feature of IRM is that it achieves an optimized trade-off between overhead and query efficiency as well as consistency guarantees.. IRM is ideal for P2P systems due to a number of reasons. First, IRM does not require a file owner to keep track of replica nodes. Therefore, it is resilient to node joins and leaves, and thus suitable for highly dynamic P2P systems. Second, since each node determines its need for a file replication or replica update autonomously, the decisions can be made based on its actual query rate, eliminating unnecessary replications and validations. This coincides in spirit with the nature of node autonomy of P2P systems. Third, IRM enhances the guarantee of file consistency. It offers the flexibility to use different replica update rate to cater to different consistency requirements determined by the nature of files and user needs. Faster update rate leads to higher consistency guarantee, and vice versa. Fourth, IRM ensures high possibility of up-to-date file responses. A replica node does not serve a request right away during polling period. In contrast, in pushing, a node cannot guarantee the up-to-date status of its response file by passively accepting update. Within the knowledge of the author, there is no other work that addresses the problem of the interrelationship between the file replication and consistency maintenance. While this paper proposes a solution for the problem, the author hopes that this work will stimulate other advanced methods for this crucial problem in P2P file sharing systems.. We will introduce IRM's application in structured P2Ps though it is also applicable to unstructured P2Ps. The rest of this paper is structured as follows: Section 2 presents a concise review of representative file replication and consistency maintenance approaches for P2P systems. Section 3 describes the IRM mechanism including file replication and consistency maintenance algorithms. Section 4 shows the performance of IRM in static as well as dynamic situations in comparison with other approaches by a variety of metrics. Section 5 concludes this paper. In spite of the efforts to develop file replication and file consistency maintenance methods in P2P systems, there has been very little research devoted to tackling both challenges simultaneously. This is unfortunate because they are intimately connected: File replication needs consistency maintenance to keep the consistency between a file and its replicas, and on the other hand, the overhead of consistency maintenance is determined by the number of replicas. Connecting the two important components will greatly enhance system performance. In addition, traditional file replication and consistency maintenance methods either are not sufficiently effective or incur prohibitively high overhead.. This paper proposes an IRM that achieves high efficiency at a significantly lower cost. Instead of passively accepting replicas and updates, nodes autonomously determine the need for file replication and validation based on file query rate and update rate. It guarantees the high utilization of replicas, high query efficiency and fidelity of consistency. Meanwhile, IRM reduces redundant file replicas, consistency maintenance overhead, and unnecessary file updates. Simulation results demonstrate the effectiveness of IRM in comparison with other file replication and consistency maintenance approaches. Its low overhead and high effectiveness are particularly attractive to the deployment of large-scale P2P systems.. We find that IRM relying on polling file owners still cannot guarantee that all file requesters receive up-to-date files, although its performance is better than other consistency maintenance algorithms. We plan to further study and explore adaptive polling methods to fully exploit file popularity and update rate for efficient and effective replica consistency maintenance.. Haiying (Helen) Shen received the BS degree in computer science and engineering from Tongji University, China, in 2000, and the MS and PhD degrees in computer engineering from Wayne State University in 2004 and 2006, respectively. She is currently an assistant professor in the Department of Electrical and Computer Engineering, and the director of the Pervasive Communications Laboratory of Clemson University. Her research interests include distributed and parallel computer systems and computer networks, with an emphasis on peer-to-peer and content delivery networks, wireless networks, resource management in cluster and grid computing, and data mining. Her research work has been published in top journals and conferences in these areas. She was the program cochair for a number of international conferences and member of the Program Committees of many leading conferences. She is a member of the IEEE, the IEEE Computer Society, and the ACM.. . For more information on this or any other computing topic, please visit our Digital Library at www.computer.org/publications/dlib. File replication in P2P systems is targeted to release the load in hot spots and meanwhile decrease file query latency. Most traditional file replication methods rigidly determine the places of replicas and push the replicas to the places. Generally, the methods replicate files near file owners [2] , [3] , [4] , file requesters [5] , [6] , or along a query path from a requester to a owner [16] , [7] . PAST [2] , CFS [3] , and Backslash [4] replicate each file on close nodes near the file's owner. Backslash also pushes cache one hop closer to requesters as soon as nodes are overloaded. In LAR [5] and Gnutella [6] , overloaded nodes replicate a file at requesters. Freenet [16] replicates files on the path from a requester to a file owner. CFS, PAST, LAR [5] cache routing hints along the search path of a query. Cox et al. [7] studied providing DNS service over a P2P network as an alternative to traditional DNS. The caches index entries, which are DNS mappings, along search query paths. Overlook [18] deploys client-access history to place a replica of a popular file on a node with most lookup requests for fast replica location. LessLog [19] determines the replicated nodes by constructing a lookup tree based on IDs to determine the location of the replicated node. In OceanStore [20] , files are replicated and stored on multiple servers for security concern without restricting the placement of replicas. OceanStore maintains two-tier replicas: a small durable primary tier and a large soft-state second tier. Other studies of file replication investigated the relationship between the number of replicas, file query latency, and load balance [21] , [22] , [23] , [24] , [25] , [26] in unstructured P2P systems. In most of these methods, file owners rigidly determine replica nodes and nodes passively accept replicas. They are unable to keep track replica utilization to reduce underutilized replicas and ensure high utilization of existing replicas. Thus, unnecessary replicas lead to a waste of consistency maintenance. Yang et al. proposed Parity Replication in IPNetwork Storages (PRINS) [27] . PRINS replicates the parity of a data block upon each write operation instead of the data block itself. The data block will be recomputed back at the replica storage site upon receiving the parity. PRINS trades off high-speed computation for communication that is costly distributed storages. In our previous work, we proposed an efficient and adaptive decentralized file replication algorithm in P2P file sharing systems called EAD [28] . In the method, traffic hubs that carry more query load and frequently requesters are chosen as replica nodes. The nodes periodically compute their query load to create replicas and remove underutilized replicas. IRM is developed by leveraging EAD. It shares similarity with EAD in file replication strategies. The novelty of IRM lies in the observation of the interrelationship between the file replication and consistency maintenance technologies, and the harmonic integration of the two technologies. The autonomous feature of nodes in the file replication strategies facilitates IRM to flexibly minimize the number of replicas for low cost in subsequent consistency maintenance while maintaining the high effectiveness of file replication in releasing the load in hot spots and improving query efficiency.. Replication in a structured P2P system is to decrease file query time, while replication in an unstructured P2P system is to decrease the search time. Unstructured P2P systems allow for more proactive replications of objects, where an object may be replicated at a node even though the node has not requested the object. Lv et al. [21] and Cohen and Shenker [22] showed that replicating objects proportionally to their popularity achieves optimal load balance but has varied search latency, while uniform replication has the same average search latency for all files but causes load imbalance. Square-Root replication method replicating files proportionally to the square root of their popularity is such that both average search size and capacity utilization rate vary per object, but the variance in utilization is considerably smaller than with uniform replication, and the variance in average search size is considerably smaller than with proportional replication. Tewari and Kleinrock [23] , [24] , [25] showed that proportional replication can optimize flooding-based search, download time, and workload distribution. They also showed that local storage management algorithms such as Least Recently Used (LRU) automatically achieve near-proportional replication and that the system performance with the replica distribution achieved by LRU is very close to optimal. APRE [29] adaptively expands or contracts the replica set of a file in order to improve the sharing process and achieve a low load distribution among the providers. To achieve that it utilizes search knowledge to identify possible replication targets inside query-intensive areas of the overlay. Rubenstein and Sahu [26] also discussed the scalability achieved by the fact that user requests create additional replicas which improves system performance although they focused on the system's ability to find the newly created sources.. Most of the studies focused on protocol design and implementation to avoid hot spots and enhance file availability, but did not address the fundamental issues of how replicas should be managed. File consistency maintenance is actually indispensable to file replication. Along with file replication, numerous file consistency maintenance methods have been proposed. They generally can be classified into two categories: structure based [10] , [11] , [12] , [13] , [14] and message spreading based [15] , [16] , [17] , [6] . Some methods [10] , [11] build one structure for each replicated file. The work in [10] constructs a hierarchical structure with locality consideration, and SCOPE [11] constructs a tree for update propagation. Scribe [12] is a P2P-based publish/subscribe system that provides a decentralized event notification mechanism for publishing systems. The paths from subscribers to the publisher are recorded for update notifications. CUP [13] and DUP [14] propagate update along a routing path. P2P systems are characterized by churn where nodes join and leave continuously and frequently. In these methods, if any node in the structure fails, some replica nodes are no longer reachable. Moreover, they need high overhead for structure maintenance especially in churn. In the category of message-spreading-based methods, Freenet [16] routes an update to other nodes based on key closeness. Lan et al. [17] proposed to use flooding-based push for static objects and adaptive poll for dynamic objects. In hybrid push/poll algorithm [15] , flooding is substituted by rumor spreading to reduce communication overhead. At every step of rumor spreading, a node pushes updates to a subset of related nodes it knows, only providing partial consistency. In these methods, an update is not guaranteed to reach every replica, and redundant messages generate high propagation overhead. Raunak et al. proposed polling method for web cache consistency [30] . Its context is static, in which the proxies are always available. Thus, this method is not applicable for a P2P dynamic environment. Muthitacharoen et al. [31] proposed lease algorithm for consistency. The lease is a commitment on the part of the server to notify the client of any modifications made to that file during the term of the lease. When the lease has expired, a client must request the server to transfer the new contents to itself. rsync [32] is a software application for Unix systems which synchronizes files and directories from one location to another while minimizing data transfer using delta encoding when appropriate. An important feature of rsync not found in most similar protocols is that the mirroring takes place with only one transmission in each direction. IRM shares similarity with the work in [30] , [17] in employing linear increase multiplicative decrease algorithm in polling for consistency. However, the focus of IRM is to integrate file replication and consistency maintenance to enhance their mutual interactions and reduce their overhead. IRM further considers both file update rate and file query rate for polling frequency determination to reduce overhead and avoid overloading file owner.. In most of these file replication and consistency maintenance methods, nodes passively accept replicas and update messages. They are unable to keep track the utilization of replicas to determine the need of file replicas and replica updates. Minimization of the number of replicas helps to reduce unnecessary updates in consistency maintenance, but it should still keep the efficiency of file replication to release the load in hot spots and to improve query efficiency. More importantly, despite the significant interdependencies between file replication and file consistency maintenance, these two issues are typically addressed separately. There has been a increasingly desire for a mechanism combining file replication and consistency maintenance that brings more benefits than overhead. IRM harmonically integrates file replication and consistency maintenance and determines the need of file replication and update based on the balance between profit and cost. In IRM, nodes determine the need of replication of a file and the frequency of update polling based on the file's query rate and update rate in order to provide high efficiency, and meanwhile avoid unnecessary overhead in both file replication and consistency maintenance. IRM shares the similarity with the file replication in unstructured P2P systems in that file popularity is taken into account in file replication. However, these file replication methods cannot be directly applied to structured P2P systems due to their basic protocol differences.

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


Simplifying the automatic design of a fuzzy logic controller using evolutionary programming With the availability of a wide range of Evolutionary Algorithms such as Genetic Algorithms, Evolutionary Programming, Evolutionary Strategies and Differential Evolution, every conceivable aspect of the design of a fuzzy logic controller has been optimized and automated. Although there is no doubt that these automated techniques can produce an optimal fuzzy logic controller, the structure of such a controller is often obscure and in many cases these optimizations are simply not needed. We believe that the automatic design of a fuzzy logic controller can be simplified by using a generic rule base such as the MacVicar-Whelan rule base and using an evolutionary algorithm to optimize only the membership functions of the fuzzy sets. Furthermore, by restricting the overlapping of fuzzy sets, using triangular membership functions and singletons, and reducing the number of parameters to represent the membership functions, the design can be further simplified. This paper describes this method of simplifying the design and some experiments performed to ascertain its validity. Fuzzy logic controllers (FLCs) are rule based systems that use fuzzy linguistic variables (e.g. small, large) to model human rule-of-thumb approaches to problem solving. They have been successfully applied to many control problems because no mathematical modelling is involved; only heuristic knowledge is required. The main problem with FLCs is that there is no generalised design method; their design has been an ad hoc trial and error exercise for a long time. With the advent of global optimization techniques such as Genetic Algorithms (and other evolutionary algorithms) many parts of the design have been optimized and automated such as the derivation of the rule base, the minimization of the number of rules and the membership functions. Every conceivable aspect of the design process has been the object of optimization. Although there is no doubt that these optimization techniques can produce optimum FLC designs, often these designs cannot be interpreted meaningfully.. With the availability of a wide range of powerful Evolutionary Algorithms such as Genetic Algorithms, Evolutionary Programming [1] , Evolutionary Strategies [2, 3] and Differential Evolution [4] , every conceivable aspect of the design of FLCs has been automated and optimized. Although, there is no doubt that these automated techniques can produce optimized FLCs, the structure of such FLCs is often obscure and in many cases these optimizations are simply not needed. We believe that FLC design has been the subject of too much automation; in particular, we feel that in many cases it is not necesssary to optimize the design of the rule base provided that a sound template rule base such as the MacVicar-Whelan rule base [5] is used. This rule base is a standard template rule base built according to common engineering sense and experience with fuzzy logic. The MacVicar-Whelan rule base defines a reasonable set of rules that can be adjusted by excluding, modifying or adding new control rules based on the specificity of the control problem.. Our aim in this paper is to show that the automatic design of FLCs for most control applications can be simplified by using a fixed rule base such as the MacVicar-Whelan rule base and adjusting only the membership functions of the fuzzy sets using an Evolutionary Algorithm such as Evolutionary Programming. We believe that the adjustment of the membership functions can provide enough latitude to meet the requirements of the control problem. Should the adjustment of the membership functions not give satisfactory results, then optimization of the rule base might be contemplated. However, it is believed that this will not often be the case.. Since optimizing membership functions involves optimizing real values and since GAs are not very good at using real-valued representations, we use Evolutionary Programming [1] to perform the optimization. We demonstrate the validity of our simplified approach by designing FLCs to control three plant processes with second order transfer functions that we used in our previous work [6] . We assess the performance of the FLCs by simulating step responses and compare them with those obtained in [6] where the membership functions and the rule base were both optimized. In this paper, we have presented a method for simplifying the automatic design of an FLC by using a generic MacVicar-Whelan rule base and optimizing only the membership functions of the fuzzy sets with the use of Evolutionary Programming. The design was further simplified by restricting the overlapping of fuzzy sets, using triangular membership functions and singletons and reducing the number of parameters to represent the membership functions.. Our design method results in the optimization of a highly reduced number of parameters by Evolutionary Programming. For an FLC with two inputs and one output and with seven fuzzy sets per input/output we need to optimize only 15 parameters as compared to 112 parameters used by other methods. The method not only facilitates the optimization process by using a reduced parameter set; it also results in the design of an FLC with several advantages. First, the rules used by an FLC are clearly understood since we use a generic rule MacVicar-Whelan rule base; second, the number of rules firing at one time is independent of the number of fuzzy sets per input variable because the degree of overlapping of the fuzzy sets has been fixed to two. This obviates the need for reducing the number of rules in the rule base as advocated by several studies. Output computation time is no longer adversely affected by an increase in the number of fuzzy sets per input variable and furthermore a full rule base is safer to use than a partial rule base.. We have tested the method by designing FLCs to control three plant processes and comparing the performance of the FLCs with those having both optimized rule base and membership functions. Based on the experiments carried out, we can affirm that a generic MacVicar-Whelan rule base can be used for most control applications since the performance of FLCs with generic MacVicar-Whelan rule bases was as good as the performance of FLCs with optimized rule base and membership functions in two cases out of three. Thus, we have demonstrated the validity of our method for simplifying FLC automatic designs.

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


Ontologies as facilitators for repurposing web documents This paper investigates the role of ontologies as a central part of an architecture to repurpose existing material from the web. A prototype system called ArtEquAKT is presented, which combines information extraction, knowledge management and consolidation techniques and adaptive document generation.All of these components are co-ordinated using one central ontology, providing a common vocabulary for describing the information fragments as they are processed. Each of the components of the architecture is described in detail and an evaluation of the system discussed. Conclusions are drawn as to the effectiveness of such an approach and further challenges are outlined. r There is a vast amount of information present on the web for a wide range of domains. Despite this challenging information space, web users are able to search for material of interest using commercial search engines such as Google and Yahoo. Such search methods present information to the user in its original form, structured for its original purpose. Often this is more than adequate for the reader, but sometimes they might want something more focused on a particular task, or collated from a broader set of resources.. Let us take a concrete example, one we will use as the basis for much of what follows in this paper. A person wishes to find out information about an artist. Perhaps they have a specific piece of information they wish to find; perhaps they want a summary of his/her work; maybe they just want a biography of his/her life. Typing the name of the artist into a search engine like Google they are returned a set of search results. If they are lucky and the artist is reasonably well known, the first search result may be a useful biography such as those produced at the WebMuseum 1 and the biography may answer all of their questions. However this might not occur for a variety of reasons:. A useful biography of the artist exists, but it is buried amongst a mass of returned results for hotels, art shops, dentist practices that all use the artists name by coincidence or design.. A good biography exists for the artist but it does not contain specific facts that the reader was interested in finding. These may well exist on less comprehensive biography pages.. The artist is relatively unknown, and although a number of web pages contain fragments of information about them, no single page is satisfactory.. The reader is unable to ask specific questions about an artist such as 'What was Holbein's date of birth?' or 'Who were Holbein's influences?'. To solve this problem, what the user needs is a system with a behaviour depicted in Fig. 1 . A system that scours the web looking for any pages or fragments of pages that contain information about the artist and combines them into one final document that satisfies the reader.. To produce such a system requires a solution to a number of key problems:. We have to find documents on the web that might contain useful content.. We have to identify and extract the relevant bits of information from the documents.. We need to be able to understand and structure that which we have extracted if we are to be able to reconfigure it for specific purposes and avoid duplication, or inaccurate information.. We have to establish what inaccurate means in this context.. We need to design suitable document structures which we might wish to produce.. We have to generate the documents from the information we have extracted.. These are not new problems. Some of them are at the core of whole research fields. What we are aiming for in our work is an understanding of how these problems fit together; how they can be assembled into a chain of processes that achieves the goal, and how the success/ failure of any process affects the others. Our approach is to use an ontological model of the domain as a facilitator throughout all the processes. This provides a common vocabulary and specifies the semantics of key relationships within the domain. It can be used as a structure for a knowledge base (KB) of information accumulated from the web, which can then be used as the basis for reasoning and document generation. Fig. 2 illustrates how such a chain of processes might operate. Each process takes its cues from the ontology, which provides a common reference model for all parts of the chain. At the front are the information extraction (IE) technologies. These include the search technologies as well as those technologies carrying out natural language understanding and extraction. The search technologies might use existing information from the KBs and structural information from the ontology to help build their queries. In the case of the current prototype the creation of queries from the ontology is not automatic. The vocabulary and relationships held within the ontology provide an underpining for the IE tools.. Once the raw source information has been harvested, processed and structured, it is passed to the KB technologies for structuring and consolidation. As well as using the ontology to organise the storage of the gathered information, the relationships can be used to help the heuristic based consolidation processes and to help verify the information.. Once a structured KB of information has been collated, stories (constructed sequences of information fragments) can be generated from this using narrative generation tools and techniques. Again, the ontology feeds into the process, with the story template queries being structured around the vocabulary and relationships of the ontology and the subsequent stories adapted so as not to duplicate information. In Section 2 we will describe the ontology used in more detail, including discussion on its design and the appropriation of existing ontologies. More detailed information is included on how the IE techniques are applied using the ontology as a grounding vocabulary (Section 2.3) and the consolidation and verification processes carried out during storage of the extracted information (Sections 2.4 and 2.5). Section 2.6 focuses on the narrative generation aspects of ArtEquAKT. In Section 3, a discussion and an evaluation are provided. Section 4 gives exemplars of the related work in the areas drawn together in the project and finally conclusions are drawn along with suggestions for where this work might develop in the future in Section 5. The system discussed here integrates a variety of tools in order to automate an ontology-based knowledge acquisition process and maintain a knowledge base with which to generate customised biographies.. The ontology is placed at the heart of the system, thus controlling incoming and outgoing knowledge from and to the system components. The IE component uses the vocabulary of the ontology to guide the extraction process. The extraction process tries to match words in web documents with class and relation names in the ontology to determine how to extract from a sentence and where to insert the extracted triple in the ontology.. Skeleton rules for sentence-based relation extraction are currently handcrafted within the system at design-time, which are then executed automatically at run-time. However, these rules are dynamically linked to the relation labels in the ontology. In order for this to work, the ontology terminology has to be set in a clear fashion, thus avoiding obscure relation and class names. It would also help if the labels of relations in particular consist of one main term (e.g. born_in instead of location_of_birth). This enables the extractor process to easily identify the verb or noun to check for in the text documents.. The initial idea of ArtEquAKT was to build an ontology-independent knowledge extraction system. However, in practice there will always be some element of domain dependency when it comes to information extraction, generation, and consolidation. Nevertheless, certain types of knowledge are not limited to any specific domain, such as personal information, dates of personal events, locations, etc. Such knowledge will be treated more or less the same no matter if the person in question is an artist, a painter, a football player, or a politician. On the other hand, information about paintings is domain specific (domain of art), and thus requires special treatment when it comes to identification and extraction (e.g. identifying names and styles of paintings).. As an example we could replace the current artist ontology with a researcher ontology, where the extraction is expected to focus on information about research activities. Since the relation extraction between entities in our artists ontology is mostly determined by the main type of verb used in the source text, we can expect similar extraction performance from a research ontology if the research activities are also identifiable from such a main verb. With respect to entity recognition tools, domain specific entities (e.g. publication styles) need specialised extraction rules that have to be modified when the domain changes.. The important point is that the system is flexible enough to accept new extraction rules and can adapt to some extent to changes in the ontology without having to regenerate affected rules. For example if the relation date_of_birth was changed to born_on in our ontology, then the extraction process will not be affected because both terms (birth and born) are linked in WordNet which is heavily used by ArtEquAKT for term expansion.. Our consolidation tools also make use of the ontology relations to consolidate duplicate instances. For example, multiple instances of the same artist can be consolidated if they have common attribute values as described by the ontology. For this to work the ontology must clearly identify relations that may accept multiple values (e.g. places visited) and those of singular values (e.g. places of birth). But in some cases, conflicting information is extracted from the web, and hence there will be a requirement to store multiple values for such relations, even if they normally take singular values.. Domain knowledge helps in consolidation. For example, paintings are considered the same if they are painted by the same artists with the same name and date. Gazetteers can also be used to support consolidation. If a gazetteer of artist names is available then the consolidation process can check whether there is a unique Rembrandt or not, and if so then all Rembrandts can be merged together. More work needs to be done to develop more knowledge dependent consolidation methods.. Even after the knowledge base has been built using the extraction and consolidation processes, the ontology remains as a unifying presence. The templates used for biography generation contain queries into the paragraph database indexed using the terms of the ontology. They also contain direct queries into the knowledge base which are used to generate simple sentences in cases where paragraphs are not available or not required. The templates are thus implicitly structured around the ontology and the types of relations that have been modelled (family, marriage, etc.) Currently extensions to the ontology require manual additions to the templates in order to be reflected in the biographies. A more integrated approach would be to represent the templates inside the ontology, so that sections of the template would be directly related to the classes in the ontology with whose instances they would be populated. As an example this would mean that if the family classes were extended to included uncles and aunts then this would be automatically reflected in the templates and thus the biographies.. In general the ontology provides a point of focus and cohesion throughout the system, even though the actual component parts are loosely coupled. The ontology not only provides a common vocabulary but also a common understanding of what relations might exist that is drawn on at every stage.. Further work will look at removing the hand crafted elements from each stage of the system and deriving more information from the ontology itself. This will facilitate a more generic system, where changing the ontology is all that is required to change the domain. Once this has been completed, more detailed user evaluations of the system can be carried out as the project moves forward from evaluating the individual components and their interface with the ontology through to more overarching evaluations of the biographies produced by the system as a whole.. As the Semantic Web grows, changing an ontology will increasingly become a job of collation and integration rather than authorship. We are not suggesting that using an ontology as the central part of this kind of extraction and generation system is a magic solution, but rather that it a point of focus that affords a degree of modularity. The ontology needs to be relevant to the processes that use it, for example by having associations to IE services, or relations to domain specific document templates.. Ontologies provide a solid underpinning for the automatic extraction, consolidation and re-representation of knowledge. They encourage consistent modelling, enable more modular and generic systems, and provide a focal point for complex chains of knowledge manipulation processes.

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


Formal validation of pattern matching code When addressing the formal validation of generated software, two main alternatives consist either to prove the correctness of compilers or to directly validate the generated code. Here, we focus on directly proving the correctness of compiled code issued from powerful pattern matching constructions typical of ML like languages or rewrite based languages such as ELAN, Maude or Tom. In this context, our first contribution is to define a general framework for anchoring algebraic pattern-matching capabilities in existing languages like C, Java or ML. Then, using a just enough powerful intermediate language, we formalize the behavior of compiled code and define the correctness of compiled code with respect to pattern-matching behavior. This allows us to prove the equivalence of compiled code correctness with a generic first-order proposition whose proof could be achieved via a proof assistant or an automated theorem prover. We then extend these results to the multi-match situation characteristic of the ML like languages. The whole approach has been implemented on top of the Tom compiler and used to validate the syntactic matching code of the Tom compiler itself. Even if we know, since the beginning of the computer science era, that proving program correctness is profoundly difficult, the quest of software security and dependability due to the general digitalization of most human activities and process control makes this goal both inescapable and extremely important to reach.. When we deal with the previous problem, we should address the whole software conception process that we can reduce, quite schematically, to the following steps: (i) get an informal specification of the software functionalities, (ii) get a formal description of the algorithms assumed to fulfill the informal specification, (iii) get a high-level program implementation of these algorithms, (iv) get a low level program implementation of these programs, (v) get a model of the running hardware.. In this work, we restrict our interest to step (iv) and to high-level languages pattern-matching features. Therefore we address the specific problem of proving the correctness of compiled code issued from pattern-matching constructions appearing in high-level programming languages.. Verifiable -compiler versus compiled-code. The question of compiler correctness, that is to preserve the properties of the input like its semantics and meta-properties of the underlying algorithm as its termination or the respect of heap invariants, is as old as the first compiler implementations. This is a very challenging goal since it consists in proving that any valid input will be correctly compiled. Furthermore, this proof has to be done every time the implementation of the compiler is modified and moreover, the compiler has itself to be compiled.. Much efforts have been done on proving correctness of parts and sometimes even complete compilers either manually [13, 15, 18, 12] or with the help of a proof assistant. But, it is still today mostly out of reach to prove that a program has been correctly compiled. In practice, programmers (and therefore applications) totally rely on the compilers: until one runs the program, we have no idea if the compiler has compiled the program correctly. Even extensively testing the program of course offers no guarantees. So, currently the programmer very often must blindly trust the compiler. But, most of largely used C and Fortran compilers very infrequently generate incorrect code: they are some of the most reliable software tools available. This is due to the large number of developers working to make these compilers correct, as well as the very large number of users who use these compiler, and thus contribute to their debugging. But, when designing a compiler for a new high-level language, the situation is less comfortable: on one side the number of users and written applications is small, on the other side, the introduction of new high level constructs put a lot on the compiler, and so make it even more complex to write. Since the consequences of an incorrect compiler are disastrous (all compiled programs are potentially faulty), this situation contributes to make users less confident in new languages and compiler implementations.. In this paper, we are concerned by a quite different approach consisting in proving automatically the correctness of the compiled code. This "skeptical" approach of the code issued from a compiler allows to deal with two kind of misbehavior: one is due to the classical presence of an unintentional bug of the compiler. The second one concern intended hidden-behavior that could be introduced with malicious intention.. Therefore, assuming a high-level program given as input, we are considering the compiler as a black box escaping our control and we are searching to prove that the generated code is, on its own, correct. This is typical of the seminal work of [3] and more recently of the so called translation validation [19, 17] . A comparable approach presented in [20] is called credible compilation and able to handle pointers in the source program. Note that this is different from the so called proof-carrying code method [16, 24] which is not intended to prove the compiled program to be correct with respect to the source code, but rather on proving certain properties on the output program, such as type safety, memory safety, or the respect of a certain safety invariant.. Matching power. Rewriting and pattern-matching are of general use in mathematics and informatics to describe computation as well as deduction.They are central in systems making the notion of rule an explicit and first class object, like expert and business systems (JRule), programming languages based on equational logic (OBJ) or the rewriting calculus (ELAN) or logic (Maude), functional, possibly logic, programming (ML, Haskell, Curry, Teyjus) and model checkers (Murphi). They are also recognized as crucial components of proof assistants (Coq, Isabelle) and theorem provers for expressing computation as well as strategies.. Since pattern-matching is directly related to the structure of objects and therefore is a very natural programming language feature, it is a first class citizen of functional languages like ML or Haskell and has been considered recently as a useful add-on facility in object programming languages [11] . This is formally backed up by works like [4] and particularly well-suited when describing various transformations of structured entities like, for example, trees/terms, hierarchized objects, and XML documents.. In this context, we are developing the Tom system [14] which provides a generic way to integrate matching power in existing programming languages like Java, C or ML. For example, when using Java as the host language, the sum of two integers can be described in Tom as follows:. Term plus(Term t1, Term t2) { %match(Nat t1, Nat t2) { x,zero -> { return x; } x,suc(y) -> { return suc(plus(x,y)); } } } In this example, given two terms t1 and t2 that represent Peano integers, the evaluation of plus computes their sum. This is implemented by pattern-matching: t1 is matched by the variable x, t2 is possibly matched by one of the two patterns zero or suc(y). When zero matches t2, the result of the addition is x (where x has been instantiated into t1 via matching). When suc(y) matches t2, this means that t2 is rooted by a suc symbol: the subterm y is added to x and the successor of this number is returned. This definition of plus is given in a functional style, but now the plus function can be used elsewhere in a Java program to perform addition.. The general architecture of Tom, depicted as follows, enlightens that a generic matching problem p t is compiled into an intermediate language code (PIL) which we would like to compute a substitution σ iff σ(p) = t. As explained in [2] , implementing a language (possibly domainspecific) as an extension of an existing host language has several advantages. First, we benefit of the existing functionalities and we do not have to re-implement common language constructs. Second, the extensions themselves only need to be transformed to the point where they are expressible in the host language. Third, existing infrastructure can be reused. All these factors result into lower implementation costs and decrease the risk of building an incorrect compiler.. So, in this work we focus on proving the correctness of compiled code issued from pattern-matching constructions, and to the best of our knowledge, this is the first attempt to do so. Other works about pattern-matching compilation address in particular data abstraction e.g. [23] , or optimizations for run-time efficiency or code size e.g. [10, 7] .. Roadmap of the paper. When considering the notion of pattern-matching, we consider a term data-structure against which some patterns are matched. Since the host language is not fixed and could be typically either C, Java or ML, the data-model is unknown. We therefore introduce in Section 2, the notion of formal anchor which formally describes the relationship between the host language data-model and the algebraic notion of term and pattern.. In our language, the host language is also generic, so we have to consider an abstraction which describes the minimal set of functionality the host language should have to express the compilation of pattern-matching. This abstraction is called the intermediate language (PIL) and we define its syntax and its big-step semantics in Section 3.. Then Section 4 uses the proposed framework to define the correctness of a single pattern compilation and to show how this correctness can be reduced to the validation of a first-order proposition.. This result is then extended in Section 5 to support Caml or Tom multi-match constructs, and before concluding, Section 6 provides details about the implementation of these concepts in the current version of Tom.

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


A case for NUMA-aware contention management on multicore systems On multicore systems contention for shared resources occurs when memory-intensive threads are co-scheduled on cores that share parts of the memory hierarchy, such as lastlevel caches and memory controllers. Previous work investigated how contention could be addressed via scheduling. A contention-aware scheduler separates competing threads onto separate memory hierarchy domains to eliminate resource sharing and, as a consequence, mitigate contention. However, all previous work on contention-aware scheduling assumed that the underlying system is UMA (uniform memory access latencies, single memory controller). Modern multicore systems, however, are NUMA, which means that they feature non-uniform memory access latencies and multiple memory controllers. We discovered that contention management is a lot more difficult on NUMA systems, because the scheduler must not only consider the placement of threads, but also the placement of their memory. This is mostly required to eliminate contention for memory controllers contrary to the popular belief that remote access latency is the dominant concern. In this work we quantify the effects on performance imposed by resource contention and remote access latency. This analysis inspires the design of a contention-aware scheduling algorithm for NUMA systems. This algorithm significantly outperforms a NUMA-unaware algorithm proposed before as well as the default Linux scheduler. We also investigate memory migration strategies, which are the necessary part of the NUMA contention-aware scheduling algorithm. Finally, we propose and evaluate a new contention management algorithm that is priority-aware. Contention for shared resources on multicore processors is a well-known problem. Consider a typical multicore system, schematically depicted in Figure 1 , where cores share parts of the memory hierarchy, which we term memory domains, compete for resources such as last-level caches (LLC), system request queues and memory controllers. Multiple studies investigated ways of reducing resource contention and one of the promising approaches that emerged recently is contention-aware scheduling [4, 2, 1] .. Although contention-aware scheduling algorithms are quite new, studies that evaluated them considered primarily centralized memory solutions typical for UMA (Uniform Mem-ory Access) systems, where a single memory node, equipped with the single memory controller can be accessed with the same latency from any core. And yet, newer systems are increasingly turning to NUMA (Non-Uniform Memory Access) designs due to their decentralized and scalable nature. In modern NUMA systems, there are multiple memory nodes, one per memory domain (see Figure 1 ). Local nodes can be accessed in less time than remote ones, and each node has its own memory controller. We discovered that on NUMA systems the problem of contention-aware scheduling is a lot more complex, and simple strategies proposed in the past need serious revising.. Consider a workload of memory-intensive applications, i.e., applications that are characterized by a high rate of requests to main memory. Following the terminology adopted in an earlier study [3] we will refer to these applications as devils. Applications with a low rate of memory requests are referred to as turtles; a more precise definition of these classes is provided later. Previous studies claimed that given two devils it is simply sufficient to separate them into different domains to significantly mitigate resource contention. On NUMA systems, however, the scheduler must consider not only where the applications themselves are placed but also the placement of their memory.. Several observations obtained on the real NUMA servers lead us to this conclusion. The first and quite straightforward observation is that, if a scheduler migrates an application from domain A to domain B in an effort to reduce contention, it may subject the application to remote-access penalties if the memory of the application remains in A. The second more interesting observation, and one that is new to this work, is that even if competing threads themselves are placed on different memory domains, they would still experience contention if their memory is placed on the same node. The contended resource in this case would be the node's memory controller. We discovered that contention for memory controllers is the dominant cause of performance degradation, compared to contention for other resources. Therefore, not only must memory-intensive applications themselves be separated on different memory domains, but so must be their memory. While this idea is simple, implementing NUMA-aware contention management in practice may be difficult, because to avoid contention the scheduler not only needs to migrate the threads, but also their memory. Memory migration incurs overhead. Our study for the first time investigates how to reap the benefits of contentionaware scheduling on NUMA systems while avoiding excessive memory migration overheads.. Based on our findings we implemented a scheduling algorithm DI-NUMA (Distributed Intensity with NUMA awareness) that mitigates resource contention in a NUMA-aware fashion. DI-NUMA is an improvement over a NUMA-unaware DI algorithm, which was proposed in earlier work [4] . Figure 2 shows the average performance across ten runs. These experiments clearly make the case for NUMA-aware contention management on modern multicore systems.. We also observe that in the presence of contention it is difficult to reduce contention significantly for all threads in the workload. However, if some threads are deemed highpriority, the scheduler can improve their performance significantly by preventing them from contending with other applications. This ensures QoS and provides performance isolation for "important" applications. We implement this The contributions of this work in relation to previous work on contention aware scheduling are as follows: (1) We quantify the factors contributing to performance degradation on NUMA, as opposed to UMA, systems and find that memory controller contention is crucial to optimize. (2) To alleviate the memory controller contention, we redesign an existing contention-aware algorithm, such that it works on NUMA systems and delivers significantly better performance relative to NUMA-unaware contention-management algorithms. (3) Finally, we develop a new algorithm that relies on the observation that contention mitigation is especially powerful in reducing the worst-case execution times of chosen applications. This algorithm, Distributed Intensity with Priorities, is for the first time presented and evaluated in this work.

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


Finite Volume Difference Scheme for a Degenerate Parabolic Equation in the Zero-Coupon Bond Pricing In this paper we solve numerically a degenerate parabolic equation with dynamical boundary conditions of zero-coupon bond pricing. First, we discuss some properties of the differential equation. Then, starting from the divergent form of the equation we implement the finite-volume method of S. Wang [16] to discretize the differential problem. We show that the system matrix of the discretization scheme is a M -matrix, so that the discretization is monotone. This provides the non-negativity of the price with respect to time if the initial distribution is nonnegative. Numerical experiments demonstrate the efficiency of our difference scheme near the ends of the interval where the degeneration occurs. Since the Black-Scholes models rely on stochastic differential equations, option pricing rapidly became an attractive topic for specialists in the theory of probability and stochastic methods were developed first for practical applications, along with analytical closed formulas. But soon, with the rapidly growing complexity of the financial products, other numerical solutions became attractive [1, 2, 6, 12, [15] [16] [17] [18] [19] .. There is a large and ever-going number of different interest rate derivative products now, for instance bonds, bonds options, interest rate caps, swap options, etc. Bonds in general carry coupons, but there also exists a special kind of bond without coupons which is called zero coupon bond (ZCB). A ZCB is purchased today a certain price, while at maturity the bond is redeemed for a fixed price. By a similar way to the derivation of the Black-Sholes equation, the problem of ZCB pricing can be reduced to a partial differential equation (see [5, 13] ).. The present paper deals with a degenerate parabolic equation of zero-coupon bond pricing [5, 13] . Since our equation (see (1) , (2) , (3)) in the next section becomes degenerate at the boundary of the domain, classical finite difference methods may fail to give accurate approximations near the boundary. An effective method that resolves the singularity is proposed by S. Wang [16] for the Black-Sholes equation. The method is based on a finite volume formulation of the problem coupled with a fitted local approximation to the solution and an implicit time-stepping technique. The local approximation is determined by a set of two-point boundary value problems defined on the element edges. This fitting technique is based on the idea proposed by Allen and Southwell [8, 10] for convection-diffusion equations and has been extended to one and multidimensional problems by several authors [7, 8, 10] .. This paper is organized as follows. Our model problem is presented in Section 2, where we discuss our basic assumptions and some properties of the solution. The discretization method is developed in Section 3. Section 4 is devoted to the time discretization. We show that the system matrix is a M -matrix, so that the discretization is monotone. In this case the maximum principle is satisfied and thus the discrete solution is non-negative. Numerical experiments show higher accuracy of our scheme in comparison with other known scheme near the degeneracy. We observe and emphasize the fact that in the proposed method, we do not need to refine the mesh near the boundary (degeneration). We have studied a degenerate parabolic equation in the zero-coupon bond pricing. We constructed and discussed a finite volume difference scheme for the problem. We have shown that the numerical scheme results a monotone numerical scheme. The numerical experiments demonstrate the efficiency of our scheme near degeneration.

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


Finding social roles in Wikipedia This paper investigates some of the social roles people play in the online community of Wikipedia. We start from qualitative comments posted on community oriented pages, wiki project memberships, and user talk pages in order to identify a sample of editors who represent four key roles: substantive experts, technical editors, vandal fighters, and social networkers. Patterns in edit histories and egocentric network visualizations suggest potential "structural signatures" that could be used as quantitative indicators of role adoption. Using simple metrics based on edit histories we compare two samples of Wikipedians: a collection of long term dedicated editors, and a cohort of editors from a one month window of new arrivals. According to these metrics, we find that the proportions of editor types in the new cohort are similar those observed in the sample of dedicated contributors. The number of new editors playing helpful roles in a single month's cohort nearly equal the number found in the dedicated sample. This suggests that informal socialization has the potential provide sufficient role related labor despite growth and change in Wikipedia. These results are preliminary, and we describe several ways that the method can be improved, including the expansion and refinement of role signatures and identification of other important social roles. Wikipedia has forever changed how we use, find and think about information. Both pundits like Stephen Colbert and researchers [23] , [13] have been pre-occupied with the question of whether Wikipedia is of sufficient quality and whether its pages constitute legitimate references [23] --which some people argue will never be the case as long as it relies on non-expert volunteers of unknown identity [6] . In this paper, instead of prognosticating about the potential of the Wikipedia project, we focus on understanding how Wikipedia has achieved the success that it has, as a reasonably good resource for many topics that is often the first link suggested in search engine results. How has the "pretty good" and incredibly extensive resource been achieved? And how has this been possible given the absence of the resources and controls of conventional firms and bureaucracies [27] ?. Large-scale, distributed, collaborative projects like Wikipedia are changing how we think about the nature of work. Research suggests that success of Wikipedia has stemmed from three key sources: infrastructural and social features that help people find and define their roles in the organization [4] , [18] , technical innovations that allow substantial economies of scale in the performance of many of those roles [8] , and social mechanisms that support coordination and conflict resolution [26] . This paper concentrates on problem of finding and defining roles in a large, distributed organization and looks to identify the informal roles roles that affect the quality and coordination of participants' contributions.. Following Gleave et al. [12] , we use qualitative methods to identify an initial set of potential roles, and identify potential quantitative signatures of those roles [7] , [29] . Although roles are continually evolving and being recognized in Wikipedia [18] , our qualitative analysis highlights four such roles: technical editors, who correct small errors related to style or formatting of articles; vandal fighters, who revert vandalism and sanction norm violators; substantive experts, who improve the quality of the content of the articles; and finally, social networkers, who support community aspects of Wikipedia and contribute little to the content and form of articles directly.. We then use simple metrics based on edit histories to examine two samples of Wikipedians--a collection of long term dedicated editors, and a cohort of editors from a 6 month window of new arrivals--to explore how users adopt and adapt to these roles. Technical editors and vandal fighters concentrate their edits on content pages while devoting relatively few edits to the discussion pages for those content pages. In contrast, substantive experts show greater investment in discussion, both related to the articles and directly with other editors.. Social networkers also concentrate on discussion and user page edits, but make very few edits to content pages. Egocentric network visualization provide a second set of suggestive patterns. First, social networkers and substantive experts tend to develop denser community structures with more active alters, and engage in more reciprocated ties, while vandal fighters and technical editors are likely to have larger proportions outward links to local isolates. Finally, we find that the proportions of potential editor types in the new cohort are similar to the rates observed in sample of dedicated contributors, suggesting that the informal socialization into helpful roles in Wikipedia was generating enough new role players to sustain and grow the population and proportion of helpful contributors. These results are preliminary, and we suggest several ways that the method can be improved, including the expansion and refinement of role signatures and how these methods could be extended to study role ecology in online communities. Our research began by suggesting that a key to solving the coordination problem inherent in the large, complex task of Wikipedia authorship is provide by the solution to a prior problem, the challenge for each author to find their role(s) in Wikipedia. Through an exploratory analysis we took some steps towards recognizing some important roles in Wikipedia, and we identified potential structural signatures based on name space edit distributions and user talk network features. We tied these potential signatures to role behavior, and provided a preliminary illustration of how some of these features can help assess the role ecology of an online space. In particular we showed evidence that new cohorts of editors were exhibiting edit distributions consistent with role players, and that these new cohorts were generating new potential role players at rates that were probably high enough to meet the replacement demands of the system. Much room is left for improvement and development in new research. The potential structural signatures identified here need to be refined and tested for predictive accuracy. Wikipedia affords an ideal research site for improving the identification of structural signatures because of the high level of contextual detail that is associated with every edit. We showed how namespace level aggregations can be leveraged, but additional details can aid signature identification. For instance, substantive experts will make multiple edits to related sets of content pages, and will likely return to sets of pages repeatedly. These types of details would help refine role predictions. Similar advances are possible with network ties, where the content of a message could be used to code ties as positive, negative, or neutral, could reveal much more fine grained role signatures. The role status of alters could also greatly aid role prediction. Consider the fact that the edit distributions of vandal fighters and technical editors were very similar. Discerning vandal fighters from other technical editors becomes much easier if we can identify obvious vandals, and thus multiple ties to vandals would be a clear distinguishing factor.. Wikipedia is a complex social system. Although our analysis identified a subset of roles, that short list is neither exhaustive nor are these roles mutually exclusive. Many editors are likely to remain generalists, who dabble in a range of role related tasks. Others, might concentrate on a couple roles, and thus exhibit contradictory patterns. As role signatures become more refined, we should aim for systems that can assess degree of role performance, and, ideally, to track assessment across time to monitor role change. Finally, we anticipate a moment where standard demographic methods can be applied to test higher level questions about the role ecology of Wikipedias, and ideally, a large scale comparative study across different Wiki systems could be performed.

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