Biomimetic soft lithography on curved nanostructured surfaces In this paper a nano-molding process using a nature-created master is demonstrated. The eye of night moth Agotis exclamationis having 100 nm-scale structures on a curved surface is used as biomimetic master mold from which nanostructures are replicated onto a flat substrate. Suitable conditions of this simple and cost-efficient process allows for minimal texture damage. The fabrication consists of two steps: first, a negative PDMS mold of the curved eye surface is made, and second, the flexible mold is replicated into a hybrid UV sensitive polymer, on a flat substrate. An accurate copy of the master surface with dense arrays of 200 nm high and 100-120 nm wide posts are generated, thus preserving the integrity of the nanostructures. The known anti-reflecting optical properties of the moth eye were reproduced with a reflectivity reduced by a factor of 2. 3D and curved surfaces are used in many application areas of micro and nanotechnology e.g. for optical and fluidic elements, MEMS and NEMS. The fabrication of curved prototype surfaces and structures is usually a complex and tedious multistep process, especially when aiming to reach the nanometer scale. These drawbacks encourage the development of replication and molding processes, allowing a fast and simple fabrication [1] . Therefore the ability to replicate curved surfaces with complex patterns into another material and substrate in a repeatable manner helps to significantly decrease the process costs and to add surface functionality.. Pattern transfer techniques are of particular interest in the field of biomimicking, allowing the replication of nature-created functional surfaces with unique properties, such as self-cleaning, wettability or transparency enhancement [2] [3] [4] [5] . However, in order to successfully reproduce bio-surfaces some challenges must be overcome: the original bio-molds usually release gases and deteriorate in a short time or contain fragile structures that are difficult to study. As a result, a number of technology tools and methods were developed to mimic and copy surface features and their properties. Costly techniques such as atomic layer deposition (ALD), electroforming or lithographic methods, as well as low cost processes based on self-assembly or etching were exploited to mimic functional bio-surfaces with micro and nanostructures [6] [7] [8] [9] [10] . The direct copying of bio-surfaces of cicada wing and various plant surfaces were made using nanoimprint and casting [4, 5, 11] , so far involving only flat and small areas or micrometer-scale structures. In this work we have directly used a nature-created sample as a mold and developed a simple soft lithography template-based approach to transfer curved and nanopatterned features onto a flat surface. An antireflective surface was for the first time copied from nature created sample, providing a no-cost mold suitable for surface reflectivity studies. The nanopatterns having 100 nm size and 2:1 aspect ratio features with antireflective properties were copied. PDMS elastometer is extensively used as versatile molding material for micro and nanostructures [14, 15] . In order to make the most accurate PDMS copies of the nanoposts we have tested several PDMS solutions and its treatment in vacuum. 5:1, 10:1, 20:1 mixtures of PDMS base elastometer and curing agent solutions, and 10:1 mixture with hexane were prepared. The curing was performed in an oven at 80°C for 1 h. It was found that the standard 10:1 solution results in the best replicated pattern (Fig. 3a) . The harder and more stabile cross linked PDMS made of 5:1 solution was too brittle for further surface shaping, while the 20:1 solution, expected to improve the elasticity, was too viscous to penetrate between the posts for fine pattern transfer. The more liquid PDMS solution can be made by adding 50% weight hexane to the standard PDMS prepolymer [16] . The positive PDMS copies made with hexane indeed resulted in highest posts, nevertheless the posts were irregular and collapsing possibly due to residual hexane effects on Ormostamp. Additionally, we have tested various vacuum levels to help PDMS penetration into sub-50 nm gaps between the posts. When mixed, PDMS base elastometer and curing agent solutions were placed into vacuum with pressures from 10 À2 to 10 À5 mbar. The PDMS preparation in vacuum at the pressure of 10 À5 mbar resulted in significantly improved post height.. The following final nanopost pattern transfer was made by placing a drop of Ormostamp on PDMS mold and covering it with a primed glass substrate for the transfer, and after cross linked in UV light (Fig. 3b) . In order to obtain the copy on a flat surface, before and during the UV curing a slight pressure was applied on the glass slide. The copied posts on the curved surface were well replicated over the whole sample area. Flat or 2D copies of the posts have been also obtained on the area of several square millimeters. Applying pressure to the PDMS mold during the second step of the process resulted in distortion of the microlenses with minimal damage to the nanoposts (Fig. 3c) .. The refractive index of the final nanopost copy in Ormostamp is 1.48, while the refractive index of the cornea of the moth eye lens reported in the literature varies in the range 1.38-1.52 [17, 18] . The close values of refractive indexes of both, the original moth eye and the copy as well as the accurate geometrical copy of the eye surface allow us to reproduce the optical surface performance of the eye. The preliminary measurements of the moth eye reflection intensity ratio from the surface with and without the nanoposts reach the value of 2.1 (Fig. 3d) , showing the efficiency of the nature created antireflective surface. The moth is active at night and profits to a great extent from this nanostructured surface phenomena.. Numerical optical simulations done using the FIMMWAVE and FIMMPROP software (Photon Design, Oxford, UK) have shown that the replicated nanostructures exhibit reduced reflection intensity by a mean value 2.8 in the visible spectrum. Differences between experimental results and simulations may be due to the fabricated nanostructure size uncertainty, as well as incomplete area coverage with nanostructures. However, this demonstrates enhanced transmission of light on the surface having the moth eye-transferred nanostructures, as it was expected. In conclusion, we have demonstrated a simple pattern transfer technique from a biological sample, both curved and flat surfaces having micro and nano-patterns by using a biomimetic template. The results obtained using this bio-inspired nano-molding technique proved that the proposed technology can be used to replicate complex functional surfaces and integrated into PDMS-based fabrication process of small area micro-optical and microfluidic and upscalable systems.

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


On Listing, Sampling, and Counting the Chordal Graphs with Edge Constraints We discuss the problems to list, sample, and count the chordal graphs with edge constraints. The edge constraints are given as a pair of graphs one of which contains the other and one of which is chordal, and the objects we look at are the chordal graphs contained in one and containing the other. This setting is a natural generalization of chordal completions and deletions. For the listing problem, we give an efficient algorithm running in amortized polynomial time per output with polynomial space. For the sampling problem, we give an instance for which a natural Markov chain suffers from an exponential mixing time. For the counting problem, we show some #P-completeness results. These results provide a unified viewpoint from algorithms theory to problems arising from various areas such as statistics, data mining, and numerical computation. A graph is chordal if it has no induced cycle of length more than three. The class of chordal graphs often appears as a tractable case of a lot of problems arising from various areas such as statistics, optimization, numerical computation, etc. In those areas, we often approximate a given graph by a chordal graph and then apply efficient algorithms for chordal graphs to the obtained graph. Evaluation criteria for chordal approximations depend on applications. For example, in the context of graphical modeling in statistics, a chordal approximation is desired to minimize AIC (Akaike's Information Criterion), BIC (Bayesian Information Criterion), MDL (Minimum Description Length), etc. [19, 25, 30] ; in the context of numerical computation, a chordal approximation is desired to minimize the number of added edges (a.k.a. the minimum fill-in problem) [21, 22, 28, 5] ; in the context of discrete optimization, a chordal approximation is desired to minimize the size of a largest clique (a.k.a. the treewidth problem) [20, 13, 14, 4] .. Since we are concerned with various sorts of criteria and often these computational problems are NP-hard, listing algorithms and random-sampling algorithms can be useful universal decisionsupport schemes. An exhaustive list found by an algorithm may provide an exact solution, whereas random samples may provide an approximative solution. Our goal is to provide efficient algorithms for listing problems and random-sampling problems of graphs, or to show the intractability of the problems.. As a chordal approximation, we consider the following two types of changes; either we just insert some edges or we just delete some edges to make a given graph G chordal. A result of the former operation is called a chordal completion of G, and a result of the latter operation is called a chordal deletion of G. As a computational problem, given a graph G we want to deal with all chordal completions of G or all chordal deletions of G.. However, in fact, we study a generalized problem of this kind. Namely, we are given two graphs G and G on the same vertex set such that G is contained in G and one of them is chordal, we want to deal with all chordal graphs that contain G and are contained in G. When G is chordal, this problem generalizes the problem on chordal completions (since a complete graph is chordal), and when G is chordal, this problem generalizes the problem on chordal deletions (since an empty graph is chordal).. There are (at least) two reasons why we study this generalized problem. The first one is clear: this is more general. The second one comes from a more practical aspect. Since the number of chordal completions of a graph can be quite huge, it would be difficult and even impossible in most of the cases to run a listing algorithm to obtain the exhaustive list of the chordal completions. Also for random sampling, if the size of our sample space is quite large then the probability of needling a desired object will be pretty small. Indeed, as Wormald [31] showed, the number of chordal graphs with n vertices is asymptotically ∑ n r=0 ( n r ) 2 r(n−r) , which is roughly 2 n 2 /4+O(n log n) . Thus, dealing with all chordal graphs is impractical, and a simple and natural way to narrow down the size of our list is to introduce a way to filter out some undesired candidates from the list, and a way to find a "suitable" chordal approximation in a more flexible manner when combined with several heuristics or local search strategies. We gave a simple and natural Markov chain for uniform sampling of Ω C (G, G), and showed an example for which the mixing time of the chain is exponential, even when both of G and G are chordal. It is open if there is a rapidly mixing Markov chain. Our Markov chain uses the fact that Ω C (G, G) for given G and G with Condition 1 forms a graded poset. However, it is known that the set of chordal sandwiches generally does not form a lattice even when both G and G are chordal. A future work would include a characterization of the pairs G and G such that. It is open that counting the chordal sandwiches is #P-hard when a given ceiling graph is restricted to be chordal. We conjecture that counting the chordal completions (i.e., when a given ceiling graph is complete) is #P-complete. We can consider listing, counting, and sampling the graph sandwiches for other graph classes, such as interval, proper interval, or perfect graphs. We can show that counting the interval sandwiches is #P-complete even when a given floor graph is connected and interval (see Section B in Appendix). We provide an efficient listing algorithm to enumerate all chordal graphs containing a given G and contained in a given G when G or G is chordal. The running time is polynomial in the input size per output, and the memory usage is bounded by a polynomial in the input size. The algorithm is based on a binary partition method, which is much simpler than the previous algorithms by Kiyomi and Uno [11] to list all chordal deletions and by Kiyomi, Kijima, and Uno [12] to list all chordal completions. Note also that these previous algorithms are not able to deal with our generalized problems.. As for the random sampling, we give two clues that seem to imply that a random sampling is not easy. The first clue is that counting the chordal graphs containing G and contained in G is #P-complete, even when G is chordal. The proof is done by a parsimonious reduction from the forest counting in a graph. To the best of our knowledge, this is the first result on #P-hardness for the graph sandwich problems. We also show that counting the chordal deletions is #P-complete by a Cook reduction from the forest counting. These results imply that a simple binary partition method does not yield a polynomial-time sampling algorithm. The second clue is the following. We apply the Markov chain Monte Carlo (MCMC) method to our problem. The MCMC is a promising approach for an efficient random sampling from a family of objects that is hard to count. We show that a simple and natural Markov chain suffers from slow mixing time; namely, we give an example for which the mixing time of the Markov chain is exponential.. Related work Our generalized concept is actually a special case of the framework proposed by Golumbic, Kaplan, and Shamir [7] who studied the following graph sandwich problem: for a graph property Γ, we are given a pair of graphs G and G such that G is a subgraph of G, and we are asked to decide if there exists a graph G ∈ Γ that is a supergraph of G and at the same time a subgraph of G. Golumbic, Kaplan, and Shamir [7] proved that graph sandwich problems are NP-complete for many graph properties, e.g., chordal graphs, perfect graphs, interval graphs, etc. As discussed above, for listing problems, Kiyomi and Uno [11] proposed algorithms to list the chordal deletions within constant time delay, and Kiyomi, Kijima, and Uno [12] proposed listing algorithms to list the chordal completions within a polynomial time delay. They are both based on the reverse search technique by Avis and Fukuda [1] . As for the counting problem, we are aware of the paper by Wormald [31] that gives an asymptotic number of the chordal graphs with n vertices. However, as far as graph sandwiches are concerned, neither algorithmic results nor hardness results seem to be known. There has been no result about random sampling of a chordal graph, as far as we see. For the related minimum chordal completion/deletion problems, both of which are well-known to be NP-hard [29, 18] , there are some results on polynomial-time approximation, fixed parameter tractability, and exponential-time exact algorithms [17, 16, 4] .

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


Fast and flexible instruction selection with on-demand tree-parsing automata Tree parsing as supported by code generator generators like BEG, burg, iburg, lburg and ml-burg is a popular instruction selection method. There are two existing approaches for implementing tree parsing: dynamic programming, and tree-parsing automata; each approach has its advantages and disadvantages. We propose a new implementation approach that combines the advantages of both existing approaches: we start out with dynamic programming at compile time, but at every step we generate a state for a tree-parsing automaton, which is used the next time a tree matching the state is found, turning the instruction selector into a fast tree-parsing automaton. We have implemented this approach in the Gforth code generator. The implementation required little effort and reduced the startup time of Gforth by up to a factor of 2.5. In the code generator of a compiler, the instruction selection phase translates the program from its form as operations in the intermediate representation into instructions for the target machine.. Tree parsing is a popular instruction selection method. It guarantees optimality (with respect to its machine description). Tree parsing is supported by a number of instruction selection generators such as BEG [ESL89] , burg [FHP92] , iburg [FHP93] , lburg [FH95] , and ml-burg.. There are two existing approaches for implementing treeparsing: tree-parsing automata (used in instruction selectors generated with burg) and dynamic programming 1 (used in instruction selectors generated with the other tools).. Tree-parsing automata are very fast, which is a useful property for implementing JIT compilers. However, they have a number of disadvantages; in particular, they require a complex generator that (depending on the tree grammar) can take much time and space to generate the instruction selector (sometimes too much, see Section 4.2), and the generated instruction selector can also be quite large. Moreover, they do not work with dynamic costs (see Section 3.3), a popular feature of the more sophisticated generators such as BEG and lburg.. Dynamic-programming instruction selectors are relatively small, and their generators are simple, fast, and consume little memory. However, dynamic-programming instruction selectors are slower than automaton-based ones. For example, Fraser et al [FHP92] found instruction selectors generated with iburg to be 6-12 times slower than matchers from burg. This can be a problem in some applications, in particular JIT compilers (see Fig. 13 ).. In this paper we show how to combine the advantages of these two methods by generating a tree-parsing automaton at instructionselector run-time (compile time) instead of at instruction selector generation time (compile-compile time).. The main contributions of this paper are:. • We show how to generate a tree-parsing automaton at instructionselector run-time (Section 3).. • We show how to integrate dynamic costs in a tree-parsing automaton (Section 3.3).. • We show how to reduce the number of states (Section 3.2), and evaluate this optimization empirically (Section 4.5).. • We present empirical results (Section 4), comparing our improved tree-parser generator and the resulting tree parsers to the other approaches in implementation effort and code generation speed.. • We present measurements of the behaviour of our lazy technique for generating the tree-parsing automaton for x86 code on a large number of C source files (Section 5).. In Section 2 we revisit tree parsing and the earlier implementation approaches. Finally, Section 6 presents related work. On-demand tree-parsing automata are a combination of the existing tree-parsing approaches: dynamic programming and treeparsing automata. They start out as tree parsing with dynamic programming, but record the resulting states, and use them for fast automaton-based tree-parsing when a similar tree has to be parsed.. On-demand tree-parsing automata also combine most of the advantages of the existing approaches: from tree-parsing automata the speed (after some warmup overhead); and from dynamic programming the simplicity, the fast generation of tree-parsers for all tree grammars, and (with more implementation effort) the ability to use dynamic costs.. We implemented on-demand automata on top of an existing dynamic programming implementation in less than a day. In our experiments, on-demand tree parsing saved up to 2500 cycles/VM instruction and reduced the Gforth startup speed by up to a factor of 2.5. Tree parsing by dynamic programming [ESL89, FHP93, FH95] is discussed at length in Section 2.2. It is much slower at tree-parser run-time than our on-demand automaton, but it requires a little less effort (significantly less if dynamic costs are supported).. costs and rules irrespective of the child state, resulting in only one state for these VM instruction in all contexts; with 4-6 stack representations, the child state has more influence on the outcome, resulting in a quick rise of the number of states; finally, with 7-9 stack representations, there are no basic blocks in our benchmark code that actually make use of these representations, so they do not result in additional states.. Pre-built tree parsing automata [Cha87, PLG88, BDB90, Pro95] are discussed at length in Section 2.3. Compared to our on-demand automata, their generators are very complicated and can take impractical amounts of time and memory to generate the tree parsers (which may be quite large).. Our on-demand optimization of a dynamic programming into an automaton is related to similar optimizations applied in other areas: regular expression matching, parsing [HKR90] and simulating outof-order processors [SL98] . This section revisits tree parsing and the earlier implementation approaches.

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


DyDAP: A dynamic data aggregation scheme for privacy aware wireless sensor networks End-to-end data aggregation, without degrading sensing accuracy, is a very relevant issue in Wireless Sensor Networks (WSN) that can prevent network congestion to occur. Moreover, privacy management requires that anonymity and data integrity are preserved in such networs. Unfortunately, no integrated solutions have been proposed so far, able to tackle both issues in a unified and general environment. To bridge this gap, in this paper we present an approach for dynamic secure end-to-end data aggregation with privacy function, named DyDAP. It has been designed starting from a UML model that encompasses the most important building blocks of a privacy-aware WSN, including aggregation policies. Furthermore, it introduces an original aggregation algorithm that, using a discrete-time control loop, is able to dynamically handle in-network data fusion to reduce the communication load. The performance of the proposed scheme has been verified using computer simulations, showing that DyDAP avoids network congestion and therefore improves WSN estimation accuracy while, at the same time, guaranteeing anonymity and data integrity. Wireless Sensor Networks (WSN) technologies support data collection and distributed data processing by means of very small sensing devices [1] with limited computation and energy capabilities. WSN are used in many contexts such as telemedicine, surveillance systems, assistance to disabled and elderly people, environmental monitoring, localization of services and users, industrial process control, and systems supporting traffic monitoring/control in urban/suburban areas, military and/or anti-terrorism operations.. Data transmission is one of the most power demanding tasks in WSN and therefore messages forwarding policies and processing techniques should be carefully designed to extend network lifetime. For example, a very common technique consists in keeping WSN nodes silent as long as no relevant information is detected in the monitored area [2] . Then, when some information is detected, wireless interfaces are turned on and sensors transmit the sensed data. However, the main drawback of such an approach is that it can cause network congestion [3] and as a consequence some information may get lost.. To avoid network congestion one solution consists in using proper in-network algorithms (e.g., see [4, 5, 6, 7] ) that can reduce significantly the number of bytes exchanged across the WSN by aggregating data [8, 9, 10] . In fact, in many situations, what is needed are aggregated measures, such as the average temperature of a region, the average humidity, and so on.. Another important issue in WSN is represented by privacy that may be violated by tampering of sensors and/or traffic due to the nature of the wireless channel and its deployment in uncontrolled environments. Thus, privacy aware mechanisms are crucial for several WSN applications such as localization and telemedicine. Among the different aspects characterizing privacy, anonymity is an important requirement for a privacy aware system that aims at protecting the identity of the individuals whose data are handled by the system. Moreover, it may be necessary to take into account privacy also in some application contexts in which data referring to individuals are not directly handled by WSN. For example, in home networks, sensor nodes may collect a large amount of data that may reveal habits of individuals, violating in this way their privacy.. However, the low power resources and the limited computational and storage capabilities of sensor nodes impose severe constraints on how privacy requirements can be satisfied.. Considering together data aggregation and privacy issues is a very challenging problem, falling in the main research area of secure WSN [11] . Many solutions addressing at the same time aggregation and security aspects such as confidentiality, integrity, authentication, and availability can be found in literature (for an exhaustive and very comprehensive view of this topic see [12] ). However, to the best of our knowledge, no solution is able to encompass privacy and end-to-end secure data aggregation. This paper presents an approach that couples a privacy management policy with an original aggregation algorithm able to deal with end-to-end encrypted data. The approach, named DyDAP (Dynamic Data Aggregation with P rivacy functions), is based on the privacy model proposed in previous works [13, 14, 15] . Such a model, defined in UML [16, 17] , represents a general schema that can be easily adopted in different contexts. DyDAP adapts such a schema to the context of WSN by introducing concepts, such as nodes, data, actions that are needed to define a privacy policy along with the existing relationships among them. Moreover, DyDAP integrates an original aggregation algorithm designed by exploiting linear discrete time control theory [10, 18] . Using DyDAP, each node periodically evaluates the amount of data to aggregate in order to control the level of its transmission queue. The aggregation process, which merges spatial correlated data working on encrypted information, involves only linear operations and allows the sink node to estimate the confidence level of the aggregated data.. The main goals fulfilled by our approach are: (i) anonymity management; (ii) data integrity check; (iii) data aggregation to reduce the network load; (iv) end-to-end secure data aggregation. The effectiveness of the approach has been studied using computer simulations.. Notice that simulations are used to evaluate aspects such as congestion, data loss, number of transmitted messages, accuracy, while they are not useful to show that security/privacy goals are satisfied. In fact for these latter aspects we rely on the fact that the techniques used (such as encryption) guarantee "by construction" that such goals are met. In conclusion we show that DyDAP avoids network congestion and improves WSN estimation accuracy, while, at the same time, guaranteeing anonymity management and data integrity.. The rest of the paper is organized as follows. Section 2 introduces the foundations for modeling privacy in the context of WSN. Section 3 describes the reference scenario and the foundations on which DyDAP is based. Section 4 presents DyDAP in detail, while Section 5 reports the simulation results that show the effectiveness of DyDAP. Section 6 presents the most relevant related works. Finally, Section 7 draws some conclusions and provides hints for future works. This paper has presented the problem of secure end-to-end data aggregation and privacy management in WSN. An innovative integrated solution for dynamic data aggregation with privacy function, DyDAP, has been presented. The elements involved in the management of privacy-related information are represented using UML modeling, whereas an algorithm based on discrete-time control theory is exploited for aggregating data. The effectiveness of the proposed framework has been verified using computer simulations. The results show that DyDAPis able to reduce the network load in case of congestion and to improve WSN estimation accuracy, while, at the same time, it guarantees anonymity management and data integrity.. At the moment we are planning to extend our work along several directions in order to analyze in depth the DyDAP behavior and to improve its efficiency. In particular, we are experimenting the application of DyDAP to multimedia sensor networks whose nodes may exchange audio and video signals, showing how the proposed solution can be tailored to many application domains. Furthermore, we are evaluating lightweight optimization strategies for minimizing the variance of the aggregated data, also considering a broader set of topological configurations, such as those containing multiple sinks. In order to improve the level of security towards attacks we are studying game-theoretic approaches to model malicious nodes. As regard data trust we shall combine DyDAP with other cross layer information, i.e., information dealing with node reputation information. Moreover, in this direction we also envisage the possibility of using emerging nano-technologies or hybrid architectures to overcome the power limits. Finally, we will evaluate DyDAP as building block of several secure Internet of Things (IoT) scenarios. WSN applications require to collect a large amount of data and, due to the limited resources in terms of power of sensor nodes, it is necessary to aggregate such data in order to reduce the amount of transmitted information. The wireless nature of the communication channel along with the remote access increase the risk of attacks that can lead to violations of privacy, integrity and confidentiality. In particular the following common threats may occur [32, 33] :. • Eavesdropping: a malicious user could easily discover the communication content by listening to the communication occurring among nodes.. • Masking: a malicious node may mask its real nature behind the identity of a node that is authorized to take part to the communication in order to misroute messages.. In order to preserve privacy in WSN, the available solutions may be classified into two main groups: anonymity mechanisms based on data cloaking [32, 34] and privacy policy based approaches [35] .. The former approach is based on perturbing data following some kind of criterion, for instance K-anonymity guarantees that every record is indistinguishable from at least k-1 other records [36] . In [32, 34, 37, 38] four main data cloaking anonymity approaches ( [32, 37] specific for cloaking localization information) are proposed:. • Decentralize Sensible Data: the basic idea of this approach is to distribute the sensed location data through a spanning tree, so that no single node holds the complete view of the original data.. • Secure Communication Channel: the use of a secure communication protocols, such as SPINS [39] , reduces the eavesdropping and active attack risk by means of encryption techniques.. • Change Data Traffic: the traffic pattern is altered with some bogus data that obfuscate the real position of the nodes.. • Node Mobility: the basic idea is to move the sensor nodes in order to change dynamically the localization information, making it difficult to identify the node.. For instance, [32] proposes a solution that guarantees the anonymous usage of location based information. More specifically, such a solution consists of a cloaking algorithm that regulates the granularity of location information to meet the specified anonymity constraints. This work focuses on localization services and therefore constrains the middleware architecture needed to support the proposed algorithm. Hence, such a solution cannot be considered a general context independent anonymity approach.. Privacy policy based approaches [35, 40, 41] state who can use individuals data, which data can be collected, for what purpose the data can be used, and how they can be distributed. A common policy based approach addresses privacy concerns at database layer after data have been collected [41] . Other works [42] address issues such as access control and authentication. Duri et al. [35] propose a policy-based framework for protecting sensor information. The Mist routing project for mobile users [43] combines location privacy with communication aspects. It faces the source location privacy problem by designing ad hoc routing protocol that keeps the location private from source to routers.. Our work provides a contribution in the field of privacy by defining a rolebased context-independent solution that guarantees nodes anonymity before data are collected into a database. Thus, our solution may be combined with both data cloaking mechanisms and some other privacy policy based approaches.. Secure data aggregation in WSN is a very mature research field and the literature reports many solutions addressing at the same time aggregation issues and security aspects such as confidentiality, integrity, authentication, and availability (an exhaustive and very comprehensive view of this topic can be found in [12] ). The approaches proposed so far can be classified into two big families depending on whether the hop-by-hop or end-to-end cryptography is used. Hop-by-hop encryption is usually based on symmetric key schemes, which demand less computing resources than asymmetric key ones. These algorithms, such as [4, 5, 44, 45, 46, 47, 48, 49, 50] , require each aggregator to decrypt every message it receives to allow in-network processing, thus causing a confidentiality breach. Furthermore, applying several consecutive encryption/decryption operations can negatively impair latencies. Finally, hop-by-hop aggregation requires each node to share secret keys with all its neighbors. In order to face these problems, aggregation algorithms able to work on ciphered data, using either asymmetric or symmetric keys [51] - [56] have been proposed. However, the main limitation of such approaches is that they allow very simple aggregation functions to be used, such as sum and average [12] . Despite this very broad variety of proposals, no single solution has been conceived yet to address confidentiality, integrity, adaptive aggregation and privacy issues at the same time, as DyDAP does.

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


Bureaucratic protocols for secure two-party sorting, selection, and permuting In this paper, we introduce a framework for secure two-party (S2P) computations, which we call bureaucratic computing, and we demonstrate its efficiency by designing practical S2P computations for sorting, selection, and random permutation. In a nutshell, the main idea behind bureaucratic computing is to design data-oblivious algorithms that push all knowledge and influence of input values down to small black-box circuits, which are simulated using Yao's garbled paradigm. The practical benefit of this approach is that it maintains the zero-knowledge features of secure two-party computations while avoiding the significant computational overheads that come from trying to apply Yao's garbled paradigm to anything other than simple two-input functions.1 and 0618680 from the United States National Science Foundation.. As people become more and more concerned about their privacy, privacy-preserving techniques have been receiving increasing attention in the research community, with secure two-party (S2P) computations being one of the primary solutions that have been studied to address this concern. S2P computations allow two parties, say Alice and Bob, to evaluate a public known function, f (X, Y ), on private data, with X belonging to Alice and Y belonging to Bob, without disclosing any information on their inputs other than what can be inferred from the result, f (X, Y ) [14, 30] .. One of the most theoretically elegant and general techniques for achieving S2P computations is Yao's garbled circuit paradigm [30] . In using this paradigm, Alice and Bob compile f (X, Y ) into a Boolean circuit, which they then cooperatively evaluate using cryptographically masked versions of their respective inputs, X and Y . The generality of this technique is derived from the fact it can be applied to any function that can be converted into a Boolean circuit, which implies that it works for any function that can be computed by an algorithm 2 . Bringing Yao's garbled circuit paradigm out of the realm of theoretical computer science, the Fairplay system [25] is a beautiful software system that implements Yao's garbled circuit paradigm to compile Boolean circuits from program specifications and then simulate the resulting circuits using cryptographic masking of the inputs shared by the two parties. Unfortunately, as the popularity of the Fairplay system is growing, people are discovering that Yao's garbled circuit approach incurs major computational costs for anything other than basic functions, like MIN, MAX, ADD, and compare-exchange. Thus, the practical usefulness of Yao's garbled circuit paradigm, and, hence, the Fairplay system, is diminished for more complex computations. For example, using the Fairplay system's implementation of Yao's garbled circuit paradigm, we can turn Quicksort into a circuit, and achieve sorting of an array between Alice and Bob, where each array element si is shared by Alice and Bob (e.g., si = ai ⊕ bi, where ai is known to Alice and bi is known to Bob). We know that Quicksort has an O(n log n) averagecase complexity, and is considered as one of the most efficient sorting algorithms. Nevertheless, we have observed that the running time of Quicksort is Θ(n 2 ) if it is implemented using 2 Recall that the formal definition of an algorithm states that it must terminate on every possible input. We propose a bureaucratic computing framework for algorithm design for S2P computation, and justify its efficiency on S2P sorting, selection and permutation problems. Our system is reasonably fast and will be open source. With the increasing privacy concerns, we believe that the direction to find efficient algorithms for bureaucratic computing is important. This paper makes an important initial step towards this direction. More efficient algorithms will emerge to solve other interesting S2P problems. Bureaucratic computing reveals the inherent relationship between secure two-party computation and oblivious algorithms. We briefly review these two fields in this section.. Applications of S2P can be categorized into two directions. One focuses on developing generic solution using Yao's garbled circuit [13, 14, 30] . Thanks to Fairplay [25] , we can easily build Yao's circuit for a specific problem. However, this general approach is not scalable [1, 24] . For example, directly compiling the bubblesort algorithm into Yao's circuit generates a circuit that contains O(n 2 ) compare-swap gates, each of which requires an expensive oblivious-transfer protocol. The cost of such a generic circuit is quite large with a big n. Another direction aims at designing S2P schemes for a given function or a specific algorithm [1, 3, 6, 8, 11, 24] . They take the approach of reducing the generic circuit construction into many invocations of simpler secure functions of less inputs, or sacrificing partial secret information to gain efficiency. The concept of "data obliviousness of an algorithm" has never been studied in those papers.. Our goal is different. We would like to answer which algorithm is the fastest for a specific S2P computation problem, such as sorting. Bureaucratic framework ensures that the costly effort of applying the generic garbled circuit is spent only on the atomic two-input functions.. This framework roots in the data obliviousness of algorithms. Knuth's book [21] is one of the first places to mention "oblivious algorithm" in details. In [12, 27] , the authors propose "cache-oblivious" algorithms, which are appealing in hardware applications. The motivation is to design algorithms that are independent to hardware parameters, such as cache size and cache-line length. This line of work has little relationship to ours; we study data obliviousness.. Sorting network is an important research topic in hardware and parallelization research [4] . We exam most popular two of them, odd-even merge and bitonic sort. Several studies based on [4] have improved efficiency and simplicity for selection and sorting [7, 22] . Sorting networks are suitable for bureaucratic computing since they are data-oblivious. Shellsort and its variants is another widely-studied technique [19, 28] . These variants are mainly for improving performance. The best known time complexity for Shellsort variant is beyond O(n log n) [28] . To the best of our knowledge, our Randomized Shellsort is the first variant that achieves O(n log n), with a provable very high probability. Moreover, it is, by design, data-oblivious and appropriate for bureaucratic computing. This paper is also (arguably) the first one to propose efficient S2P sorting, selection, and permutation algorithms. Although there is a secure k th -ranked computation method in [1] , their setting is different from ours, in the sense that it allows partial information (i.e., intermediate results) disclosure. Our solution ensures zero knowledge disclosure.. We have already summarized the work related to random permuting in Section 5. We will not repeat it here.

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


RDF metadata for XML access control In this paper we present an access control framework that provides flexible security granularity for XML documents. RDF statements are used to represent security objects and to express security policy. The concepts of simple security object and association security object are defined. Our model allows to express and enforce access control on XML trees and their associations. Access control rules, corresponding to (s, o, ±a) triples, are represented as RDF statements with properties access type, user, and object. A history file is maintained for each user that allows decision-making using temporal data. Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. To copy otherwise, to republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee.

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


Inferring document similarity from hyperlinks Assessing semantic similarity between text documents is a crucial aspect in Information Retrieval systems. In this work, we propose to use hyperlink information to derive a similarity measure that can then be applied to compare any text documents, with or without hyperlinks. As linked documents are generally semantically closer than unlinked documents, we use a training corpus with hyperlinks to infer a function a, b → sim(a, b) that assigns a higher value to linked documents than to unlinked ones. Two sets of experiments on different corpora show that this function compares favorably with OKAPI matching on document retrieval tasks. Automatic techniques to access and organize document collections are essential to fully benefit from large text corpora. Several of these methods require a measure to quantify semantic similarities between text items: e.g. clustering relies on document comparisons, while Information Retrieval (IR) depends on document/query similarities.. In this work, our goal is to infer a measure of similarity relying on the semantic relationships contained in a hyperlinked corpus. In such a corpus, links can be considered as indicators of topic relatedness, i.e. linked documents tend to be semantically closer than unlinked documents [1] . Therefore, we propose to identify a measure of similarity a, b → sim(a, b) such that, for any document d, the documents which are linked to it are considered more similar than those which are not:. where L(d) is the set of documents linked with d. For that purpose, a gradient descent strategy [2] is adopted: we first introduce a parameterized measure of similarity a, b → sim θ (a, b) and a cost C which indicates how far sim θ is from the condition (1), then gradient descent optimization is used to select the parameters θ * which minimize C for a given training corpus Dtrain.. The inferred measure sim θ * can then be applied to any pair of text documents, with or without hyperlinks, in any context where a text similarity measure is needed. In order to evaluate this approach, we compared the inferred measure with the state-of-the-art OKAPI matching measure [3] over two retrieval tasks (see Section 3). In this context, our model LinkLearn is shown to improve both precision at top 10 and average precision with respect to OKAPI.. In the remainder of this paper, Section 2 describes the proposed method, Section 3 presents the experiments and results, and Section 4 draws some conclusions. In this paper, we introduced LinkLearn, a gradient descent approach to derive a document similarity measure from a hyperlinked training corpus: the measure is selected such that, in most cases, a document is considered more similar to the documents with which it is linked than to the other documents. This approach has shown to be effective in an IR context: the use of the similarity measure inferred by LinkLearn has led to higher retrieval performances when compared to the state-of-the-art OKAPI matching measure.

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


Dependability modeling and analysis of software systems specified with UML The goal is to survey dependability modeling and analysis of software and systems specified with UML, with focus on reliability, availability, maintainability, and safety (RAMS). From the literature published in the last decade, 33 approaches presented in 43 papers were identified. They are evaluated according to three sets of criteria regarding UML modeling issues, addressed dependability characteristics, and quality assessment of the surveyed approaches. The survey shows that more works are devoted to reliability and safety, fewer to availability and maintainability, and none to integrity. Many methods support early life-cycle phases (from requirements to design). More research is needed for tool development to automate the derivation of analysis models and to give feedback to designers. Dependability is a nonfunctional property (NFP) of a system, defined by Avizienis et al. [2004] as the ability to avoid failures that are more frequent and severe than acceptable. Dependability encompasses a set of attributes: reliability, availability, maintainability, integrity, and safety. The assessment of these attributes may imply quantitative and/or qualitative evaluation of the system, which has been a research topic since the early times of computing; the use of models for this purpose is extensively recognized [Lyu Authors' addresses: S. Bernardi, Centro Universitario de la Defensa, Academia General Militar, Zaragoza, Spain; email: simonab@unizar.es; J. Merseguer, Departamento de Informática e Ingeniería de Sistemas, Universidad de Zaragoza, Zaragoza, Spain; email: jmerse@unizar.es; D. C. Petriu, Department of Systems and Computer Engineering, Carleton University, Canada; email: petriu@sce.carleton.ca. Permission to make digital or hard copies of part or all of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies show this notice on the first page or initial screen of a display along with the full citation. Copyrights for components of this work owned by others than ACM must be honored. Abstracting with credit is permitted. To copy otherwise, to republish, to post on servers, to redistribute to lists, or to use any component of this work in other works requires prior specific permission and/or a fee. Permissions may be requested from 1996]. A model is an abstraction of the system for the purpose of understanding it before building it [Rumbaugh et al. 1991] . A software system model describes a specific system view; in a broad sense we can distinguish behavioral and structural software views, which together constitute the model of the system. A dependability model considers the abstractions needed to represent the failures of the system and their consequences. This implies that in some manner the dependability model needs to be related to the behavioral model of the system or at least to its abnormal behaviors. Models are developed using different kinds of languages and/or notations, some of them with an underlying mathematical formalism supporting some kind of analysis (e.g., fault trees, Markov chains, Petri nets, or Bayesian networks). These are called formal models, analyzable models, or models for analysis. The task of developing models is known as modeling, while the task of analyzing quantitative or qualitative properties is known as analysis.. According to the literature, dependability attributes are assessed through formal dependability models or using technical methods (e.g., FMEA, HAZOP) [IEC-60300-3-1 2003] . However, the focus of this survey is not on dependability analysis models per se, but on approaches for modeling and analyzing dependability in the context of UML software models used for software development. We are particularly interested in works contributing toward the integration of dependability modeling and analysis within the UML-based model-driven software development process [Schmidt 2006] . Figure 1 shows an ideal process, where a UML software model used by the software developers is extended with dependability annotations and then (automatically) transformed into a formal dependability model, which is solved with existing solvers and methods. The dependability results from the formal model are mapped to feedback to the developers, expressed in terms of the software model. The process bridges two domains-the software modeling domain and the dependability analysis domain-and is dealing with two categories of models and modeling languages: (a) for software development and (b) for dependability analysis. This survey is focused on how and what dependability annotations need to be added to UML software models (i.e., in the software modeling domain) in order to support the derivation of dependability analysis models that can be used for dependability analysis.. The most widely used modeling language for software development is the Unified Modeling Language [UML 2005] , standardized by the Object Management Group (OMG). There is a large body of work extending UML with concepts required for carrying out quantitative and qualitative analyses of different nonfunctional properties, such as performance, schedulability, dependability, security. For instance, a UMLbased methodology for unifying dependability modeling and analysis by associating the concepts of UML models, dependability, and mathematical analysis was promoted the surveyed works dealing with the dependability analysis aspect, two approaches can be recognized. A first approach transforms the UML-annotated models-such as the (nonformal) dependability model-into a formal dependability model used for analysis (e.g., Fault Trees [Vesely et al. 1981] for safety and reliability analysis, stochastic Petri nets [Ajmone-Marsan et al. 1995] for reliability analysis), as in Figure 1 . Such formal models, as well as methods and tools for their analysis, have been studied and developed for many years, even before the introduction of UML.. The second approach uses the very same annotated UML model, without model transformations, to apply well-known dependability techniques (e.g., HAZard and OPerability study [ In this section we analyze, from a critical perspective, the set of contributions presented in Section 4. We use the criteria presented in Section 3 as guidelines for our discussion. Some considerations about the fulfillment of the dependability concepts from the checklist (Table I ) by the surveyed works will be also provided. In Table XVII , we have summarized the approaches and labeled them with an identifier that will be used throughout this section. The table is arranged according to the order of presentation of the approaches in Section 4, and the last column indicates the concrete subsection where the approach is discussed.

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


Modeling and simulating electronic textile applications This paper describes our design of a simulation environment for electronic textiles (e-textiles) and our experiences with that environment. This simulation environment, based upon Ptolemy II, enables us to model a diverse range of areas related to the design of electronic textiles, including the physical environment they will be used in, the behavior of the sensors incorporated into the fabric, the on-fabric network, the power consumption of the system, and the execution of the application and system software. This paper focuses on two aspects of the system, modeling the motion of a person wearing the e-textile and modeling the effect of faults in the e-textile system. To partially validate this environment, we compare simulation results against results from two different physical prototypes, a large-scale acoustic beamformer and a pair of shape-sensing pants. Electronic textiles (e-textiles) are fabrics with interconnections and electronics woven into them. The electronics consist of both processing and sensing elements, distributed throughout the fabric. Potential applications for e-textiles include wearable computing (e.g., context-awareness [1] [6], medical monitoring [7] [13] [18] , and military uniforms) and sensor networks. E-textiles are embedded systems with a unique form factor, and are an extreme form of distributed Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. To copy otherwise, to republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. computing: physically spread over a relatively smaller space, but having a greater dependence on physical locality of computation, lower bandwidth for communication, less available energy, and requiring knowledge of the dynamic shape of the fabric.. The design space for e-textiles is large, with many choices for yarns, weaves, components, system software, interconnection networks, and sensor placement. While the area is still in its infancy, it is clear that prototyping alone cannot adequately explore the design space for most applications. Consequently, a simulation environment is necessary, one that allows a designer to adequately model a range of areas, including the physical environment in which the e-textile will be operating, the behavior of sensing and processing elements, and software execution. At the same time, simulation results are not useful unless the simulation environment has been validated against experimentally measured data. Consequently, we have built prototypes and compared their actual behavior to the behavior predicted by simulation.. In this paper, we describe the current status of our simulation environment for e-textiles and present results generated by both the environment and associated prototypes for two applications, a large-scale acoustic beamforming fabric for locating vehicles and a pair of pants for classifying and analyzing wearer motions. The remainder of the paper is organized as follows. Section 2 presents background material on e-textiles. Section 3 describes the elements of the simulation environment. Results from the environment for both applications are presented in Section 4. Finally, Section 5 summarizes the paper, presents conclusions, and discusses future work. Design considerations for e-textile applications encompass a range of areas, including the physical environment, sensor behavior, human body size and motion, the shape of the cloth, garment and fabric manufacturability, and standard computer engineering areas such as networking, power consumption, and software execution. A simulation environment for e-textiles must be able to readily model aspects of each of these areas. This paper has described a simulation environment designed to aid in the exploration of the e-textile design space. In addition, features allowing for the inclusion of live sensor data and the integration of physical and simulated elements of an e-textile make it a useful tool for debugging e-textile prototypes.. Aspects of this environment were demonstrated in two case study applications. In the case of fault and power analysis of the acoustic beamformer, we were able to explore the effects of fault introductions that would be prohibitively expensive to study using actual e-textile prototypes. In particular, we showed that the choice of battery configuration will affect both the fault tolerance and the accuracy of the e-textile, and that a trade-off exists between them. For the context-aware pants, the results of the simulation environment were verified against ground truth data, showing a close correspondence between the simulation and actual data.. For our future work, we would like to extend the model to include the manufacturability of the e-textile. One of our goals is to stay as close as practically possible to existing manufacturing techniques for textiles and garments. By doing so, e-textiles will be able to take advantage of the cost-effectiveness of textile and garment manufacturing techniques. We envision that e-textiles are an enabling technology for pervasive computing, and as such, must be inexpensive if they are to be widely deployed. Adding manufacturability to the environment would provide feedback to the e-textile designer about the cost of points in the design space.. Another aspect that we believe must be added to the environment is the motion and draping of the cloth. At the present time, we assume that the sensors for wearable e-textiles are at fixed position on the body, which would be true for tight-fitting garments (e.g., spandex). However, most garments move with respect to the body and change shape as the user moves about. Consequently, sensors will not be at fixed locations on the body. For some applications the change in position of the sensors relative to joints and other important features of the body must be accounted for. If they are not accounted for, then the simulation environment will not provide accurate information about the characteristics of the e-textile design space. In order to help the reader understand the elements in the e-textiles simulation environment, this section provides background material on current applications of e-textiles and the design issues arising from those applications. The first part of this section reviews extant research in e-textiles and their applications. The remainder of the section examines the issues involved in the design of e-textiles.

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


Addressing CBIR efficiency, effectiveness, and retrieval subjectivity simultaneously This work is about Content Based Image Retrieval (CBIR), focusing on developing a Fast And Semantics-Tailored (FAST) image retrieval methodology. Specifically, the contributions of FAST methodology to the CBIR literature include: (1) development of a new indexing method based on fuzzy logic to incorporate color, texture, and shape information into a region based approach to improving the retrieval effectiveness and robustness (2) development of a new hierarchical indexing structure and the corresponding Hierarchical, Elimination-based A* Retrieval algorithm (HEAR) to significantly improve the retrieval efficiency without sacrificing the retrieval effectiveness; it is shown that HEAR is guaranteed to deliver a logarithm search in the average case (3) employment of user relevance feedbacks to tailor the semantic retrieval to each user's individualized query preference through the novel Indexing Tree Pruning (ITP) and Adaptive Region Weight Updating (ARWU) algorithms. Theoretical analysis and experimental evaluations show that FAST methodology holds a great promise in delivering fast and semantics-tailored image retrieval in CBIR. This work addresses the topic of general purpose content based image retrieval (CBIR). CBIR has received intensive attention in the literature of multimedia information indexing and retrieval since this area was started years ago, and consequently a broad range of techniques is proposed.. The majority of the early research focuses on global features of imagery. The most fundamental and popularly used feature is the color histogram and its variants, which was used in the classic systems such as IBM QBIC [5] and Berkeley Chabot [11] . Since color histograms do not carry spatial information, which was considered to be related to the semantics of image content, efforts have been reported in the literature to incorporate the spatial information into the histograms. One approach is to use the Color Correlograms, proposed by Huang et al. [6] , to address this issue.. Recently region-based approaches have been shown to be more effective. A region-based retrieval system segments images into regions, and retrieves images based on the similarities derived from the regions. Berkeley Blobworld [1] and UCSB NeTra [10] compare images based on individual regions. Wang et al. [16] proposed an integrated region matching scheme called IRM allowing for matching a region in one image to several regions of another image. Later, Chen and Wang [4] proposed an improved approach called UFM based on applying fuzzy logic to the different region features to improve the retrieval effectiveness of IRM. Recently Jing et al. [7] presented a region-based inverted file structure analogous to that in text retrieval to index the image database, with each entry of the file corresponding to a cluster (called codeword) in the region space.. While the majority of the literature in CBIR focuses on the indexing and retrieval effectiveness, much less attention is paid to the indexing and retrieval efficiency issue. There are two reasons attributing to this status. First, historically CBIR research was motivated in the beginning to demonstrate that indexing directly in the image domain could deliver better retrieval effectiveness than indexing through collateral information such as key words, and this perception was carried on over the years; the retrieval efficiency issue, on the other hand, was not considered to be the focus of the research in the CBIR community, as the general perception was that this issue would be resolved by directly making use of the existing indexing methods developed from the high dimensional space data structure research. Examples of these data structures include k-d tree, R-tree and its variants, SS-tree, and TV-tree. A good review on these data structures can be found in [9] . Second, technically many CBIR algorithms involve complicated distributions in a high dimensional feature space, and it is difficult to directly "order" features in such a high dimensional space using "normal" data structures.. While theoretically any high dimensional feature space indexing method (which almost all the CBIR methods employ) can use the existing high dimensional indexing data structures to address the retrieval efficiency, practically this is not the case because when the dimensionality becomes very high (which is true for almost all the CBIR methods and thus is called curse of dimensionality [9] ) the overhead for online bookkeeping becomes so demanding that the overall savings in efficiency becomes questionable. Some data structures, such as SS-tree and TV-tree, attempt to address this problem, but their overall performances are limited due to the assumptions they are subject to [9] . Consequently, it is observed that the efficiency issue must be addressed with the specific indexing method [2] . Due to this consideration, a few efforts in the literature started to address the efficiency issue directly in designing CBIR algorithms. For example, Castelli et al [2] proposed a clustering and singular value decomposition method for approximate similarity search in a high dimensional feature space.. Since the evaluation of CBIR retrieval is typically subjective, in recent years methods incorporating user relevance feedbacks start to show promise in resolving this issue. Two directions of research are observed in incorporating user relevance feedback in CBIR: (1) developing a weighting scheme to explicitly "guide" the retrieval [12] . (2) applying machine learning techniques such as Bayesian net and Support Vector Machine to reduce the problem to a standard reasoning and classification problem [14] .. Based on an extensive literature review, we have identified three problems in the current status of CBIR research: (1) the indexing effectiveness still needs to be improved (2) the retrieval efficiency needs to be addressed directly in the indexing method (3) the retrieval subjectivity issue needs to be further addressed to better deliver a semantic retrieval. This work is motivated to address these three issues simultaneously. The ultimate goal of this project is to design a CBIR methodology that can deliver fast and semantics-tailored image retrieval capability. By fast, we mean the efficiency issue is well addressed; by semantics-tailored, we mean that the user query preference is inferred online to allow an individualized retrieval to better address the retrieval effectiveness and subjectivity issues. Consequently, we call the methodology FAST, which is a significant extension of our previous work FUZZYCLUB [17] . The contributions of FAST are reflected in these three aspects. Below we address these three aspects of FAST methodology, and report the experimental evaluations before we conclude this paper. We have developed a new CBIR methodology based on the goal of delivering Fast And Semantics Tailored retrieval, and thus we call it FAST. FAST incorporates a new indexing scheme, a hierarchical indexing structure with a hierarchical, eliminationbased A* retrieval online search algorithm called HEAR. We have shown that HEAR offers the significant strength to guarantee a logarithm search instead of a linear search in the average case. FAST also offers the user relevance feedback capability to not only address the individualized retrieval based on the user intended semantics, but also take advantage of the hierarchical indexing tree and HEAR to achieve faster and more semanticstailored retrieval through applying the ITP and ARWU algorithms. The promise FAST demonstrates and the benefits FAST offers are sufficiently supported by the extensive experimental evaluations.

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


Towards generic refactoring We define a challenging and meaningful benchmark for genericity in language processing, namely the notion of generic program refactoring. We provide the first implementation of the benchmark based on functional strategic programming in Haskell. We use the basic refactoring of abstraction extraction as the running example. Our implementation comes as a functional programming framework with hot spots for the language-specific ingredients for refactoring, e.g., means for abstraction construction and destruction, and recognisers for name analysis. The language-parametric framework can be instantiated for various, rather different languages, e.g., Java, Prolog, Haskell, or XML schema. Refactoring The very term refactoring has recently been pushed a lot in the context of object-oriented programming, 1 but the related idea of semantics-preserving program transformation is as old as the notion of a high-level programming language (think of Fortran, Algol, APL, etc.). A proper program refactoring is meant to "improve" the internal structure of a program [7] , be it. • to make the program more comprehensible,. • to enable its reuse, or. • to prepare a subsequent adaptation.. In a broader sense, one might also include • program refinement, or. • manual optimisation.. It is usually assumed that a refactoring is initiated by the programmer who identifies a certain part or aspect of a program that needs to be changed, and who supplies program identifiers, points out source or target locations, or chooses among possible variations on a refactoring. This sets refactoring apart from fully automated transformations such as a optimisation in a compiler which is transparent for the programmer. Refactoring is also different from other forms of transformational programming where one is rather interested in the mathematical calculation of a usually efficient program from a specification [23, 2] . Typical refactorings are concerned with extracting or inlining abstractions, with moving around code between scopes, and with introducing or eliminating interfaces. Forms of program transformation with relevance to refactoring are typically studied with more commitment to a particular paradigm or even a specific programming language: object-oriented programs [22, 7, 17] , logic programs [27, 25] , (higher-order) functional programs [25, 1, 14, 29] , grammars or syntax definitions [24, 15] , preprocessing [6, 12] , and XML [16] . Commitment to a more specific setting allows one to make more technical contributions, to supply a refactoring framework which is immediately useful for the given language. Refactoring browsers [20, 28] are based on such commitment. Our generic setting allows us to make a conceptual contribution, namely an umbrella for refactoring approaches. Our framework is original in that the technicalities of refactoring such as focus, scope, name analyses, construction, and destruction are treated in a generic (i.e., language-parametric) manner. Our framework comes as an executable specification.. An important initial contribution to the idea of generic transformations originated from the Stratego project [31] where traversal schemes have been identified as reusable building blocks of program transformations. In [30] , basic traversal schemes but also algorithms for variable analysis, unification, and substitution were specified in Stratego. We cover such algorithms in the lower tier of our framework together with generic functionality for focusing, abstraction processing and others. We also establish a higher tier with the generic refactorings. Stratego is a language with prime support for term traversal, but without strong typing, and without support for general higher-order functions. We contend that these additional features make our functional strategic setup more suitable for highly parameterised frameworks.. Our approach is integrated with ordinary functional programming, with the notion of (first-order) abstract syntax in the sense of algebraic datatypes in functional programming. A completely different approach has been proposed in the context of the Ergo project at CMU: the use of higher-order abstract syntax [26] for program representation and program manipulation. To execute the corresponding specifications, one depends on specific language support, as available for example in λProlog. By viewing binding constructs of a language as higher-order terms in this setting, one obtains a very much different style of rewriting where some issues like keeping track of free or bound names are very concisely handled. It is almost mandatory to also attempt a framework for generic refactoring based on higher-order abstract syntax. We consider this as a topic of future work.. Previous work in the programming language field has lead to se-mantical frameworks [19, 21] , or reusable libraries for executable language definition [5, 10] . Our generic refactoring effort addresses yet another dimension of reuse in language design and implementation: it emphasises the transformation dimension. We do not argue that a framework like the one we have proposed is particularly strong because it would enable reuse of program transformations in actual end-user tools such as convenient-to-use refactoring browsers. This would be like saying that modular semantics has significantly simplified compiler implementation in practice. We rather think that ... the ability to capture commonalities in different programming languages as executable specifications provides key insight into language design.

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