Semi-continuous Sized Types and Termination Abstract. Some type-based approaches to termination use sized types: an ordinal bound for the size of a data structure is stored in its type. A recursive function over a sized type is accepted if it is visible in the type system that recursive calls occur just at a smaller size. This approach is only sound if the type of the recursive function is admissible, i.e., depends on the size index in a certain way. To explore the space of admissible functions in the presence of higher-kinded data types and impredicative polymorphism, a semantics is developed where sized types are interpreted as functions from ordinals into sets of strongly normalizing terms. It is shown that upper semi-continuity of such functions is a sufficient semantic criterion for admissibility. To provide a syntactical criterion, a calculus for semicontinuous functions is developed. Termination of computer programs has received continuous interest in the history of computer science, and classical applications are total correctness and termination of partial evaluation. In languages with a notion of computation on the type-level, such as dependently-typed languages or rich typed intermediate languages in compilers [CW99] , termination of expressions that compute a type is required for type checking and type soundness. Further, theorem provers that are based on the Curry-Howard Isomorphism and offer a functional programming language to write down proofs usually reject non-terminating programs to ensure consistency. Since the pioneering work of Mendler [Men87] , termination analysis has been combined with typing, with much success for strongly-typed languages [HPS96, ACG98, Gim98, Xi01, BFG + 04, Bla04]. The resulting technique, type-based termination checking, has several advantages over a purely syntactical termination analysis: (1) It is robust w. r. t. small changes of the analyzed program, since it is working on an abstraction of the program: its type. So if the reformulation of a program (e.g., by introducing a redex) still can be assigned the same sized type, it automatically passes the termination check. (2) In design and justification, type-based termination rests on a technology extensively studied for several decades: types. (3) Type-based termination is essentially a refinement of the typing rules for recursion and for introduction and elimination of data. This is orthogonal to other language constructs, like variants, records, and modules. Thus, a language can be easily enriched by such constructs without change to the termination checker. This is not true if termination checking is a separate static analysis. Orthogonality has an especially pleasing effect: (4) Type-based termination scales to higher-order functions and polymorphism. (5) Last but not least, it effortlessly creates a termination certificate, which is just the typing derivation.. Type-based termination especially plays its strength when combined with higher-order datatypes and higher-rank polymorphism, i. e., occurrence of ∀ to the left of an arrow. Let us see an example. We consider the type of generalized rose trees GRose F A parameterized by an element type A and the branching type F . It is given by two constructors:. leaf : GRose F A node : A → F (GRose F A) → GRose F A Generalized rose trees are either a leaf or a node a fr of a label a of type A and a collection of subtrees fr of type F (GRose F A). Instances of generalized rose trees are binary trees (F A = A × A), finitely branching trees (F A = List A), or infinitely branching trees (F A = Nat → A). Programming a generic equality function for generalized rose trees that is polymorphic in F and A, we will end up with the following equations:. Eq A = A → A → Bool eqGRose : (∀A. Eq A → Eq (F A)) → ∀A. Eq A → Eq (GRose F A) eqGRose eqF eqA leaf leaf = true eqGRose eqF eqA (node a fr ) (node a ′ fr ′ ) = (eqA a a ′ ) ∧ (eqF (eqGRose eqF eqA) fr fr ′ ) eqGRose eqF eqA = false. The generic equality eqGRose takes two parametric arguments, eqF and eqA. The second one is a placeholder for an equality test for type A, the first one lifts an equality test for an arbitrary type A to an equality test for the type F A. The equality test for generalized rose trees, eqGRose eqF eqA, is then defined by recursion on the next two arguments. In the case of two nodes we would expect a recursive call, but instead, the function itself is passed as an argument to eqF , one of its own arguments! Nevertheless, eqGRose is a total function, provided its arguments are total and well-typed. However, with traditional methods, which only take the computational behavior into account, it will be hard to verify termination of eqGRose. This is due to the fact that the polymorphic nature of eqF plays a crucial role. It is easy to find an instance of eqF of the wrong type which makes the program loop. Take, for instance: eqF : Eq (GRose F Nat) → Eq (F (GRose F Nat)) eqF eq fr fr ′ = eq (node 0 fr ) (node 0 fr ′ ). A type-based termination criterion however passes eqGRose with ease: Consider the indexed type GRose ı F A of generalized rose trees whose height is smaller than ı. The types of the constructors are refined as follows:. leaf : ∀F ∀A∀ı. GRose ı+1 F A node : ∀F ∀A∀ı. A → GRose ı F A → GRose ı+1 F A When defining eqGRose for trees of height < ı + 1, we may use eqGRose on trees of height < ı. Hence, in the clause for two nodes, term eqGRose eqF eqA has type Eq (GRose ı F A), and eqF (eqGRose eqF eqA) gets type Eq (F (GRose ı F A)), by instantiation of the polymorphic type of eqF . Now it is safe to apply the last expression to fr and fr ′ which are in F (GRose ı F A), since node a fr and node a ′ fr ′ were assumed to be in GRose ı+1 F A. In essence, type-based termination is a stricter typing of the fixed-point combinator fix which introduces recursion. The unrestricted use, via the typing rule (1), is replaced by a rule with a stronger hypothesis (2):. (1) f : A → A fix f : A (2) f : ∀ı. A(ı) → A(ı + 1) fix f : ∀n. A(n) Soundness of rule (2) can be shown by induction on n. To get started, we need to show fix f : A(0) which requires A(ı) to be of a special shape, for instance A(ı) = GRose ı F B → C (this corresponds to Hughes, Pareto, and Sabry's bottom check [HPS96] ). Then A(0) denotes functions which have to behave well for all arguments in GRose 0 F B, i. e., for no arguments, since GRose 0 F B is empty. Trivially, any program fulfills this condition. In the step case, we need to show fix f : A(n + 1), but this follows from the equation fix f = f (fix f ) since f : A(n) → A(n + 1), and fix f : A(n) by induction hypothesis.. In general, the index ı in A(ı) will be an ordinal number. Ordinals are useful when we want to speak of objects of unbounded size, e. g., generalized rose trees of height < ω that inhabit the type GRose ω F A. Even more, ordinals are required to denote the height of infinitely branching trees: take generalized rose trees with F A = Nat → A. Other examples of infinite branching, which come from the area of type-theoretic theorem provers, are the W -type, Brouwer ordinals and the accessibility predicate [PM92] .. In the presence of ordinal indices, rule (2) has to be proven sound by transfinite induction. In the case of a limit ordinal λ, we have to infer fix f : A(λ) from the induction hypothesis fix f : ∀α < λ. A(α). This imposes extra conditions on the shape of a so-called admissible type A, which are the object of this article. Of course, a monotone A is trivially admissible, but many interesting types for recursive functions are not monotone, like A(α) = Nat α → Nat α → Nat α (where Nat α contains the natural numbers < α). We will show that all those types A(α) are admissible that are upper semi-continuous in α, meaning lim sup α→λ A(α) ⊆ A(λ) for limit ordinals λ. Function types C(α) = A(α) → B(α) will be admissible if A is lower semi-continuous (A(λ) ⊆ lim inf α→λ A(α)) and B is upper semi-continuous. Similar laws will be developed for the other type constructors and put into the form of a kinding system for semi-continuous types.. Before we dive into the mathematics, let us make sure that semi-continuity is relevant for termination. A type which is not upper semi-continuous is A(ı) = (Nat ω → Nat ı ) → Nat ω (see Sect. 5). Assuming we can nevertheless use this type for a recursive function, we can construct a loop. First, define successor succ : ∀ı. Nat ı → Nat ı+1 and predecessor pred : ∀ı. Nat ı+1 → Nat ı . Note that the size index is an upper bound and ω is the biggest such bound for the case of natural numbers, thus, we have the subtyping relations Nat ı ≤ Nat ı+1 ≤ · · · ≤ Nat ω ≤ Nat ω+1 ≤ Nat ω . We have motivated the importance of semi-continuity for the soundness of type-based termination checking, explored the realm of semi-continuous functions from ordinals to semantic types, and developed a calculus for semi-continuous types. We have seen a few interesting examples involving semi-continuous types, many more can be found in the author's thesis [Abe06b, Ch. 6]. These examples cannot be handled by type-based terminatioǹ a la Barthe et al. [BFG + 04, BGP05, BGP06], but our developments could be directly incorporated into their calculus.. In previous work [Abe03] , I have already presented a calculus for admissible recursion types. But the language had neither polymorphism, higher-kinded types, nor semicontinuous types inside each other (Stream ı Nat ı ). Hughes, Pareto, and Sabry [HPS96] have also given criteria for admissible types similar to ours, but more ad-hoc ones, not based on the mathematical concept of semi-continuity. Also, a crucial difference is that we also treat infinitely branching data structures. To be fair, I should say that their work has been a major source of inspiration for me.. As a further direction of research, I propose to develop a kinding system where semicontinuity is first class, i. e., one can abstract over semi-continuous constructors, and kind arrows can carry the corresponding polarities ⊖ or ⊕. First attempts suggest that such a calculus is not straightforward, and a more fine-grained polarity system will be necessary. Important is also the study of semi-continuity properties of dependent types, in order to apply these results to type-based termination in type-theoretic proof assistants. 7.1. Acknowledgments. I would like to thank my PhD supervisor, Martin Hofmann, for discussions on F ω . Thanks to John Hughes for lending his ear in difficult phases of this work; for instance, when I was trying to prove upper semi-continuity of inductive types but then found the Hungry counterexample. Thanks to the anonymous referees of previous versions of this paper who gave insightful and helpful comments.

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


Optimal bounds for decision problems on the CRCW PRAM Abstract. Optimal Q(logn/log logn) lower bounds on the time for CRCW PRAMS with polynomially bounded numbers of processors or memory cells to compute parity and a number of related problems are proven. A strict time hierarchy of explicit Boolean functions of n bits on such machines that holds up to O(logn/loglogn) time is also exhibited. That is, for every time bound T within this range a function is exhibited that can be easily computed using polynomial resources in time T but requires more than polynomial resources to be computed in time T -1. Finally, it is shown that almost all Boolean functions of n bits require logn -loglogn + fi( 1) time when the number of processors is at most polynomial in n. The bounds do not place restrictions on the uniformity of the algorithms nor on the instruction sets of the machines.

O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B O O O O O O O O B O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B O O O O O O B O O O O O O O O O O B O O O O


Constructing a Personal Web Map with Anytime-Control of Web Robots In this paper, we propose a PWM (Personal Web Map) The accessible information through the Internet is increasing explosively as the WWW becomes widespread. In this situation, the WWW is very useful for a user who wants to gather interesting information. However there is a significant issue that a user does not know where the information exists. A practical and simple solution of the problem is to use a search engine like MetaCrawler, AltaVista, YaHoo with the interesting information as a query. The search engine provides a list of relevant Web pages to a user. Unfortunately, since a database of a search engine is very huge and adequate filtering is hard, many Web pages including irrelevant ones may be indicated.. While search engines having large databases are valid, it is important that a user constructs a small, personal database of relevant Web pages to his/her interest like Bookmarks. Since such a Web page database includes only interesting Web pages, irrelevant Web pages are not indicated for a user's query like large search engines. For the personal database of Web pages, it is important that a user can control the construction of a database to customize it. We call such a database PWM: Personal Web Map. PWM is a structured database as a classified Web pages and constructed under user's control. A user can determine keywords as input to a PWM system and a PWM is built by gathering relevant Web pages to them and classifying the gathered Web pages. Also a PWM system show a 2D-map of PWM through a Web browser and a user can give feedback on his/her preference to the system. The construction of PWM is interactive since a user can control the granularity on a PWM.. In this paper, we propose a PWM and develop a method to construct it. First we define a PWM as a structured database. Next we explain anytime-control of multiple Web robots which is suitable to build a PWM and make experiments for evaluation. A PWM system is considered as a multi-agent system using a blackboard model. The blackboard indicates the density distribution in every dimensions under vector representation of Web pages. Clustering a PWM and indicating its 2D-map are done by SOM. Finally we make experiments to evaluate a PWM using four Web robots and verify the utility, and limitation is discussed.. WebWatcher [7] and Letizia [9] are able to indicate the Web pages which a user wants to see next. Using browsing history, they learn to predict useful Web pages for a user. These systems are consider as customizing systems that learn user's preference in searching Web pages. Unfortunately the systems do not build personal Web page databases. SPHINX [12] is a framework in which a user can achieve the personal crawling tasks. However the customization is on searching of Web pages, not building a personal Web page database. Thus the purpose is different from ours.. Fish search [2] is a distributed search algorithm for gathering relevance information. Agents have energy, which is gained from relevant Web pages and lost from irrelevant pages. Agents having hight-energy can reproduce themselves and others having low-energy may die. ARACHNID [10] is a more excellent system that can gather information by learning information agents. In the similar way to fish search, agents reproduce themselves or die depending on their energy, and obtain energy from relevant Web pages. Furthermore ARACHNID is adaptive to the change of an environment. These systems do distributed control of agents, however the control method is inspired by an artificial life approach and different from anytimecontrol.. Kohonen's SOM (Self-Organizing Map) have been used to classify documents in the WWW. WEBSOM [5] [6] is able to classify articles in network news groups and display the clustered results. WEBSOM just does clustering documents when they are given, and has no contribution to information gathering. In this research, we use SOM for clustering gathered Web pages.

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


Lightweight Bytecode Verification Abstract. In this paper, we provide a theoretical foundation for and improvements to the existing bytecode verification technology, a critical component of the Java security model, for mobile code used with the Java "micro edition" (J2ME), which is intended for embedded computing devices. In Java, remotely loaded "bytecode" class files are required to be bytecode verified before execution, that is, to undergo a static type analysis that protects the platform's Java run-time system from socalled type confusion attacks such as pointer manipulation. The data flow analysis that performs the verification, however, is beyond the capacity of most embedded devices because of the memory requirements that the typical algorithm will need. We propose to take a proof-carrying code approach to data flow analysis in defining an alternative technique called "lightweight analysis" that uses the notion of a "certificate" to reanalyze a previously analyzed data flow problem, even on poorly resourced platforms. We formally prove that the technique provides the same guarantees as standard bytecode safety verification analysis, in particular that it is "tamper proof" in the sense that the guarantees provided by the analysis cannot be broken by crafting a "false" certificate or by altering the analyzed code. We show how the Java bytecode verifier fits into this framework for an important subset of the Java Virtual Machine; we also show how the resulting "lightweight bytecode verification" technique generalizes and simulates the J2ME verifier (to be expected as Sun's J2ME "K-Virtual machine" verifier was directly based on an early version of this work), as well as Leroy's "on-card bytecode verifier," which is specifically targeted for Java Cards. In this section we present the context of lightweight bytecode verification. Specifically, we advocate for our approach to Java bytecode type safety verification. Finally, we give an overview of the paper. In Section 2 we formally specify lightweight bytecode verification in a data flow framework. Specifically, we address when a (constraint-based) data flow problem can be converted into a lightweight data flow problem, and we show that the technique is "tamper proof." In Section 3 we apply lightweight verification to Java (bytecode) for an important Java virtual machine subset. In Section 4 we specifically relate lightweight verification for Java to Sun's J2ME bytecode verifier and Leroy's Java on-card verifier. Finally, in Section 5, we draw conclusions about the work. In this paper, we have formally defined lightweight bytecode verification by taking a PCC approach to constraint-based data flow analysis. An approach that we have exploited is to stage Java bytecode verification to perform safely over an untrusted network, on a small platform, in only one straight code pass for an important Java subset.. Lightweight bytecode verification has resulted in important industrial applications: the off-device pre-verifier, the in-device verifier, and the certificate StackMap in the CLDC specification, implemented by the Sun (KVM) and by the company GEMPLUS (for smart cards).. The technique has here been formally proven to be "tamper proof" in the sense that no clever conversion of a certificate can make a program's unsolvable constraint set suddenly appear as solvable. For Java bytecode, the notion of being tamper proof is translated into a formal proof that states that conversion of a lightweight bytecode certificate cannot result in type-unsafe bytecode to pass the lightweight verifier.. Finally, we have obtained a unified description of KVM, Leroy's "Java on-card verifier" and general lightweight bytecode verification as described in this paper. In particular we have found that with a naive certificate (frame types for every jump target), the type safety verification in all three cases requires exactly one frame type of scratch RAM.. Future Directions As "run-once" mobile code becomes a more and more elaborate on all the Java platforms, the cost of bytecode verification is becoming noticeable even on standard systems, so Bracha (2000) proposed to develop the KVM verifier for the standard Java platform. We plan to work with the Java community to make this happen.. One of the most interesting future projects in relation to bytecode safety is to investigate how to replace existing runtime checks by static checks through an en-richment of the Java type system. One first attempt has been an investigation of how to represent field protection information by the type system (Rose and Rose, 2001) ; however, more options should be investigated. In this section we report on work that is directly related to lightweight verification. In Section 4.1 we explain how Sun's lightweight bytecode verification variant, as implemented in the KVM, can be simulated by the present framework. In Section 4.2 we show how lightweight bytecode verification is a generalization of Leroy's proposed "on-card" bytecode verifier for Java Cards. Finally, in Section 4.3, we relate to the automated series of proofs of the lightweight bytecode verification technique that has been implemented by Klein and Nipkow. In general there is a rich literature on general formalizations of the JVM and the bytecode verifier (Barthe et al., 2000; Drossopoulou et al., 1999; Freund and Mitchell, 1999; Hartel and Moreau, 2001; Stärk et al., 2001 ).

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


CONSTRAINED QUADRILATERAL MESHES OF BOUNDED SIZE We introduce a new algorithm to convert triangular meshes of polygonal regions, with or without holes, into strictly convex quadrilateral meshes of small bounded size. Our algorithm includes all vertices of the triangular mesh in the quadrilateral mesh, but may add extra vertices (called Steiner points). We show that if the input triangular mesh has t triangles, our algorithm produces a mesh with at most 3t 2 + 2 quadrilaterals by adding at most t + 2 Steiner points, one of which may be placed outside the triangular mesh domain. We also describe an extension of our algorithm to convert constrained triangular meshes into constrained quadrilateral ones. We show that if the input constrained triangular mesh has t triangles and its dual graph has h connected components, the resulting constrained quadrilateral mesh has at most 3t 2 + 4h quadrilaterals and at most t + 3h Steiner points, one of which may be placed outside the triangular mesh domain. Examples of meshes generated by our algorithm, and an evaluation of the quality of these meshes with respect to a quadrilateral shape quality criterion are presented as well. Finite element (FE) analysis is a powerful tool for numerically solving differential equations of variational problems that arise during structural modeling in engineering and the applied sciences. An essential prerequisite for the use of FE analysis is the availability of a mesh over the problem domain. If the problem domain is a subset of the Euclidean plane, triangular or quadrilateral meshes are typically employed. The accuracy of a problem's solution, and the efficiency with which it is obtained using a particular FE implementation are highly dependent on a variety of mesh parameters, such as the number of elements of the mesh and their shape, as well as the regularity, directionality and grading of the mesh 1,2 . Triangular meshes have been extensively investigated by the meshing community, and their theoretical properties are now well understood 3 . Algorithms for generating provably good triangular meshes of polygonal domains have been proposed and implemented 4, 5, 6, 7 . On the other hand, the generation of good quadrilateral meshes is not as well understood. A few algorithms exist to generate quadrilateral meshes of bounded size 8, 9, 10, 11, 12 , bounded largest angle 10 , and controlled density and directionality 13, 14, 15 for polygonal domains. However, there are no known algorithms to generate quadrilateral meshes of polygonal domains that are provably guaranteed to simultaneously meet several quality criteria. Algorithms to generate such meshes would have great practical value because it has been shown that quadrilateral meshes are more desirable for certain FE-based applications, such as planar stress-strain analysis 16 . The input to two-dimensional meshing algorithms is typically a planar straight line graph (PSLG) that defines a polygonal region, possibly with polygonal holes, and an additional set of vertices and edges in its interior 3 (see Fig. 1 (a)-(b)). A PSLG is a set of vertices and edges that satisfies two constraints. First, if the PSLG contains an edge then it must also contain the two vertices that are the endpoints of the edge. Second, edges can only intersect each other at their shared endpoints. Meshing algorithms that take PSLGs as input are supposed to generate meshes that conform to the input PSLG. In other words, the subset of points of the Euclidean plane covered by the output mesh -the mesh domain -is exactly the same as the subset of points of the polygonal region defined by the PSLG, and the set of vertices and edges of the PSLG are respectively included in and covered by the set of vertices and edges of the output mesh. Fig. 1(c) shows a triangular mesh that conforms to the polygonal region and its corresponding PSLG in Fig. 1(a)-(b) .. The need for constructing meshes of polygonal regions that also conform to some vertices and edges in their interior often arises in practice. For instance, finite element analysis of two-dimensional biological shapes often requires the construction of meshes from segmented two-dimensional images, whose domain is appropriately represented in the Euclidean plane by polygonal regions with vertices and edges in their interiors 17 . Several meshing algorithms can only handle PSLGs that describe polygonal regions with or without polygonal holes. That is, the vertices and edges of the PSLG are exactly the vertices and edges of the (boundary of the) polygonal region defined by it. However, if the PSLG also defines vertices and edges in the interior of the polygonal region then such meshing algorithms cannot guarantee that these vertices and edges will be included in the output mesh. Some exceptions are the algorithms by Chew 4 , Ruppert 5 , and Shewchuk 6, 7 , which are capable of generating triangular meshes for general PSLGs. Hence, their algorithms are particularly useful for building triangular meshes from imaging data of biological shapes.. (a) (b) (c) In this paper we are primarily concerned with the generation of strictly convex quadrilateral meshes that are suitable for FE analysis of problems in which directional features are not present or relevant for the analysis accuracy. Strictly convex quadrilateral meshes are quadrilateral meshes in which each of the four angles of every quadrilateral is strictly less than 180 o . Strictly convex quadrilateral meshes are the only desirable quadrilateral meshes for FE-based applications 18, 2 . The main contributions of our work are two-fold:. (1) We introduce a new algorithm for converting triangular meshes into strictly convex quadrilateral meshes of provably small size. The output quadrilateral mesh contains all vertices in the input triangular mesh, and may contain extra vertices -Steiner points -inserted by our algorithm during the conversion process, one of which may be placed outside the triangular mesh domain. In particular, we show that if the input triangular mesh has t triangles then the output quadrilateral mesh generated by our algorithm has at most 3t 2 + 2 quadrilaterals, obtained by inserting at most t + 2 Steiner points. These results improve upon previously known bounds on quadrilateral mesh size 8 . Our algorithm runs in O(t) time and space. (2) We also show that given a triangular mesh and a constraining subset of its edges, our algorithm can convert the input triangular mesh into a strictly convex quadrilateral mesh whose set of edges covers the constraining set of edges. Furthermore, we show that if the input triangular mesh has t triangles then the output quadrilateral mesh generated by our algorithm has at most 3t 2 + 4h quadrilaterals, obtained by inserting at most t + 3h Steiner points, where h is the number of connected components in the dual graph of the input triangular mesh. One of the Steiner points may be placed outside the triangular mesh domain. Note that this result implies that our algorithm can indirectly handle the same class of PSLGs as the algorithms by Chew 4 , Ruppert 5 , and Shewchuk 6, 7 . We just have to use one of these algorithms to generate the triangular mesh, and then define the constraining subset of edges as consisting of the edges of the triangular mesh that cover the edges of the input PSLG. Hereafter, we refer to the input pair consisting of a triangular mesh and a constraining subset of its edges as a constrained triangular mesh a , and we refer to the corresponding output quadrilateral mesh generated by our algorithm as a constrained quadrilateral mesh.. The remainder of this paper is organized as follows. In Section 2 we introduce some basic concepts related to our work and review some prior work on quadrilateral meshes. In Section 3 we describe the details of our new algorithm for generating quadrilateral meshes of polygonal domains, and its extension to handle general PSLGs. In section 4 we present some quadrilateral meshes obtained from an implementation of our algorithm, and evaluate their quality according to a quadrilateral shape quality metric. In Section 5 we summarize our results and discuss future work. We presented an algorithm for converting triangulations of polygonal regions, with or without polygonal holes, into strictly convex quadrangulations. Our algorithm has a runtime linear in the number of triangles of the input triangulation, offers better bounds than similar algorithms that also produce strictly convex quadrilateral meshes of bounded size 8 , tends to preserve local mesh grading, and is simpler and likely faster than algorithms that produce better quality meshes -in terms of element shape, regularity and directionality control -at the expense of runtime 14, 24, 15 . We also introduced an extension of our algorithm for converting constrained triangulations of polygonal regions, with or without polygonal holes, into constrained, strictly convex quadrangulations, and we showed that these constrained quadrilateral meshes also have small bounded size.. We also provided examples of quadrilateral meshes generated by our algorithm and its extension to produce constrained quadrilateral meshes, and we evaluated the quality of these meshes with respect to a quadrilateral shape quality criterion defined in 18 . We used a post-processing technique, called angle-based smoothing 26 , to improve the shape quality of the quadrilaterals of the meshes used in the examples. Our empirical results show that this technique effectively led to improvements in the shape quality of the quadrilaterals. We also compared the size of the quadrilateral meshes of our examples with the size of their triangular counterparts, and we observed that the sizes of the quadrilateral meshes is about 60% of their triangular counterparts. A comparison between the quality of the quadrilateral meshes generated by our algorithm and the quality of their triangular counterparts, with respect to a particular FE-based application, is given in 17 . Although the combination of our algorithm with the angle-based smoothing can produce quadrilateral meshes with "well-shaped" quadrilaterals, it may be a very time-consuming combination in practice, as the angle-based smoothing is very slow and so are most post-processing techniques to effectively improve mesh element shape quality. Thus, it is natural to try to improve the shape quality of the quadrilaterals produced by our algorithm by modifying the algorithm itself. However, the problem of generating strictly convex quadrilateral meshes with small bounded size and high-quality quadrilaterals is a very difficult one 10 . Some algorithms for generating quadrilateral meshes with high-quality quadrilaterals and no rigorous bounds on mesh size, such as paving 13 , may produce many more than O(n) quadrilaterals, where n is the number of vertices of the input polygonal region, but they are likely to produce better shaped quadrilaterals than algorithms that reconcile provably good bounds on element shape quality and mesh size 10 . Nevertheless, similar ideas to the ones in 10 , such as bounding the largest angle of the quadrilaterals, can be used to improve the shape quality of the quadrilaterals of the small quadrangulations produced by our algorithm (see Section 3.3) without increasing its linear bound on mesh size. We intend to focus on this problem as future work. We also intend to investigate an extension of our algorithm to produce hexahedral meshes from a set of quadrilateral meshes of planar contours. This investigation has been motivated by applications in medical imaging, namely, the generation of three-dimensional meshes of volumetric images from planar image sections 29 .

O O O O O O O O O O O O O O O O O O O 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 B I O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O 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 B I O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B I O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B I O O O O O O O O O O O O O O O O O O O O O O O O O B I O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O 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 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 B O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O 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 algorithms for slew constrained minimum cost buffering As a prevalent constraint, sharp slew rate is often required in circuit design which causes a huge demand for buffering resources. This problem requires ultra-fast buffering techniques to handle large volume of nets, while also minimizing buffering cost. This problem is intensively studied in this paper. First, a highly efficient algorithm based on dynamic programming is proposed to optimally solve slew buffering with discrete buffer locations. Second, a new algorithm is developed to handle the difficult cases in which no assumption is made on buffer input slew. Third, an adaptive buffer selection approach is proposed to efficiently handle slew buffering with continuous buffer locations. Experiments on industrial netlists demonstrate that our algorithms are very effective and highly efficient: we achieve > 100× speed up and save up to 40% buffer area over the commonlyused van Ginneken style buffering. As VLSI technology moves to the 65 nm node and beyond, it has been well documented [1, 2] that the number of buffers on a chip is rising dramatically. Osler [2] cites two IBM ASIC designs where one-fourth of the gates are buffers. For some multi-million gate ASICs, more than a million buffers are required today. This is a surprise to no one as devices continue to scale more quickly than interconnects. Higher relative interconnect resistance forces buffers to be placed closer together to achieve optimal performance. In addition, interconnect resistivity also causes signal integrity to degrade more quickly with each advancing technology. Thus, buffers need to be inserted on long interconnects to meet slew constraints, even if these nets are not timing critical.. In reality, slew constraint is much more prevalent than timing constraint: it is reported in [2] that only a fraction (roughly 5-10%) of nets need to be re-buffered for delay optimization; for the remaining fraction (roughly 90-95%), the slew based buffer insertion was sufficient to meet the net's timing constraint. In other words, it is sufficient to buffer all nets to fix slew violations without worrying about delay. Those small fraction of buffered nets that subsequently show up as critical can then be re-buffered with a delay based objective function. In the IBM physical synthesis methodology [2] , buffers are inserted for satisfying slew constraints early, so that timing analysis uses legal slew constraints. Later, buffers on critical nets are ripped up and re-buffered for delay.. The sheer number of buffers can degrade overall design performance by forcing the rest of the logic to be spread further apart to accommodate those buffers. The buffers themselves are a drain on power and can cause other gates to be sized to higher power levels since they are now further apart on the chip. Therefore, a significant part of the performance of the design depends on using as little buffering resources as possible.. From practical point of view, slew buffering should be as important as timing driven buffering. Unfortunately, there is very little previous work on it. For related works that consider slew and/or noise constraints [3, 4, 5, 6] , they still optimize for delay instead of handling these constraints separately. Buffering of non-critical nets using these techniques may result in unnecessary runtime and resource overhead. Note that the work of [7] also addresses slew constraints without regards to delay. However, that work does not actually model slew; it simplifies the slew constraint to be equivalent to a capacitance constraint which means that interconnect resistivity is not modelled. While appropriate for very large fanout nets (e.g., over 1000 sinks), it essentially becomes equivalent to length-based buffering [8] . Lengthbased buffering [8] tries to achieve a similar result of slew buffering in spirit. However, we show that it can be area inefficient especially in handling multi-fanout nets.. This work proposes a new buffering formulation: find the minimum area (or cost) buffering solution such that slew constraints are satisfied. In this formulation, one does not need to know required arrival time at sinks, so it can be used earlier in the design flow than traditional buffering. It can be done totally independently of timing analysis, i.e., incremental timing is not required between buffering of individual nets. The following highly efficient and practical algorithms are proposed in this paper:. 1. For a single buffer type, an optimal linear time solution is achievable by greedy algorithm. For multiple buffer types, a very efficient optimal slew buffering algorithm is designed under the assumption that the input slew to each buffer is fixed. Experiments show that compared to slew constrained timing buffering, > 100× speedup is achieved while still saving area.. 2. If the input slew to each buffer is not fixed, the dynamic programming cannot be easily applied since the upstream knowledge is needed to compute the input slew. We propose a graph-theoretic approach based new algorithm to handle this difficult case. Experimental results demonstrate that up to 40% buffer area can be further saved.. 3. When buffer positions can be freely chosen, slew buffering may allow more efficient buffer usage. A continuous slew buffering algorithm incorporating adaptive buffer selection idea is proposed for this purpose. It handles 1000 nets in only 40 seconds and often extra 10% buffer area saving can be obtained. The slew buffering problem is intensively studied in this paper. Three new algorithms are proposed, namely, a slew buffering algorithm with the assumption of fixed input slew, a more sophisticated algorithm without this assumption, and a very efficient continuous slew buffering algorithm. Experimental results demonstrate that new algorithms run one to two orders of magnitude faster than the widely-used timing buffering algorithm and meanwhile they can obtain significant amount of area saving. Future work seeks to incorporate our results into a physical synthesis flow. Our algorithms share the same dynamic programming framework as timing buffering [12, 3] in appearance, but have critical underlying differences which will be analyzed in Section 3.1.2 and Section 3.1.3.. In the dynamic programming framework, a set of candidate solutions are propagated from the sinks toward the source along the given tree. Each solution γ is characterized by a three-tuple (C, W, S), where C denotes the downstream capacitance at the current node, W denotes the cost of the solution and S is the accumulated slew degradation Sw defined in Eqn. (2) . At a sink node, the corresponding solution has C equal to the sink capacitance, W = 0 and S = 0. The solution propagation is accomplished by the following operations.. Consider to propagate solutions from a node v to its parent node u through edge e = (u, v). A solution γv at v becomes solution γu at u, which can be computed as. In addition to keeping the unbuffered solution γu, a buffer bi can be inserted at u to generate a buffered solution γ u,buf which can be then computed as. When two sets of solutions are propagated through left child branch and right child branch to reach a branching node, they are merged. Denote the left-branch solution set and the right-branch solution set by Γ l and Γr, respectively. For each solution γ l ∈ Γ l and each solution γr ∈ Γr, the corresponding merged solution γ can be obtained according to:. To ensure that the worst case in the two branches still satisfies slew constraint, we take the maximum slew degradation for the merged solution.. For any two solutions γ1, γ2 at the same node, γ1 dom-. . Whenever a solution becomes dominated, it is pruned from the solution set without further propagation. A solution γ can also be pruned when it is infeasible, i.e., either its accumulated slew degradation S(γ) or the slew rate of any downstream buffer in γ is greater than the slew constraint.

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


Computing contour generators of evolving implicit surfaces The contour generator is an important visibility feature of a smooth object seen under parallel projection. It is the curve on the surface which seperates front-facing from back-facing regions. The apparent contour is the projection of the contour generator onto a plane perpendicular to the view direction. Both curves play an important role in computer graphics.Our goal is to obtain fast and robust algorithms that compute the contour generator with a guarantee of topological correctness. To this end, we first study the singularities of the contour generator and apparent contour for both generic views and generic time-dependent projections, for example, when the surface is rotated or deformed. The singularities indicate when components of the contour generator merge or split as time evolves.We present an algorithm to compute an initial contour generator by using a dynamic step size. An interval test guarantees the topological correctness. This initial contour generator can thus be maintained under a time-dependent projection by examining its singularities. An important visibility feature of a smooth object seen under parallel projection along a certain direction is its contour generator, also known as outline or profile. The contour generator is the curve on the surface that separates front-facing regions from back-facing regions. This curve may have singularities if the direction of projection is nongeneric. The apparent contour is the projection of the contour generator onto a plane perpendicular to the view direction. In many cases, drawing just the visible part of the apparent contour gives a good impression of the shape of the object. In this article, we will not distinguish between visible and invisible parts of the contour generator. Stated otherwise, we assume the surface is transparent. Generically, the apparent contour is a smooth curve with some isolated singularities (see Figure 1 ).. This work is partially supported by the IST Programme of the EU as a Shared-Cost RTD (FET Open) Project under Contract No. We have implemented the computation of the static contour generator using interval classes and the interval Newton solver from the c-xsc library. Table I shows the results on a Pentium 2.80 GHz running Linux. The implicit surface was transformed with a shearing to change the view direction from the default (0, 0, 1). The resulting contour generators are shown in Figures 11, 12 , and 13 for the tangle cube, and in Figures 14 and 15 for the nonalgebraic surface. The table shows the number of contours, the total number of line segments, and timing results for the two phases of finding the initial points, and tracing the contour generator.. At the moment, the (inclusion) functions and derivatives are hard-coded into the implementation, since we do not have an interval Newton implementation working together with automatic differentiation. A solution would be to use a code generator that outputs the inclusion functions of all derivatives. The lack of such a preprocessor makes experimenting with 4D curves tedious. However, as mentioned in the previous section, the time required for updating the contour generator for small time steps is only slightly longer than the results in Table I under "Tracing".. The preprocessing requires computing initial points of the 4D curve. We have computed these points for the tangle cube, for the view direction moving along the 1D path (x − tz, y − (0.2 + t)z, z). This path includes the views shown in Figures 11 and 12 . We separately solved the three sets of equations from the previous section: Table II shows the results for these three sets of equations, as well as the total time for computing the initial points of the 4D curve. The bounding box used is [−3, 3]×[−3, 3]×[−3, 3] . We solved over the intervals [0, 1] and ten subintervals of width 0.1. The final row gives the sum of these ten smaller intervals.. The time for solving over the interval [0, 1] is just over three hours, whereas solving over ten intervals of width 0.1 takes less than 44 minutes. This indicates that the interval Newton implementation in the c-xsc library is far from optimal. Results can be greatly improved by first subdividing the search space. The solver in c-xsc seems to switch to Newton refinement too early in the subdivision process.. To examine the effects of refinement, we split the 4D interval into N 4 subintervals, for N = 8, 16, and 32. These smaller intervals were processed by the c-xcs solver. In Table III , we repeat the results for the single interval and for splitting the time interval into ten subintervals, together with the results for the initial N 4 subdivision. An initial subdivision in 16 4 subintervals reduces the runtime by a factor of up to eight. For further subdivision, the running time increases again due to the overhead of initializing the solver. These experiments show that current implementations of the interval Newton method are far from optimal. However, optimizing generic solvers is beyond the scope of this article.. For algebraic functions such as the tangle cube, of course, other methods for solving systems of equations are available. In this case it would be much faster to use algebraic methods, instead of the generic Interval Newton method.

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


Self-managing agents for dynamic scheduling in manufacturing The main purpose of this paper is to propose a Multi-Agent Autonomic and Bio-Inspired based framework with selfmanaging capabilities to solve complex scheduling problems using cooperative negotiation. Scheduling resolution requires the intervention of highly skilled human problem-solvers. This is a very hard and challenging domain because current systems are becoming more and more complex, distributed, interconnected and subject to rapidly changing. A natural Autonomic Computing (AC) evolution in relation to Current Computing is to provide systems with Self-Managing ability with a minimum human interference. Traditionally scheduling resolution requires the intervention of highly skilled human problem-solvers. This is a very hard and challenging domain because current systems are becoming more and more complex, distributed, interconnected and subject to rapidly changing. For these dynamic optimization problems environments, that are often impossible to avoid in practice, the objective of the optimization algorithm is no longer to simply locate the global optimal solution, but to continuously track the optimum, or to find a robust solution that operates optimally in the presence of perturbations [1] [12] .. The complexity of current computer systems has led the software engineering, distributed systems and management communities to look for inspiration in diverse fields, e.g. robotics, artificial intelligence or biology, to find new ways of designing and managing systems. Hybridization and combination of different approaches seems to be a promising research field of computational intelligence focusing on the development of the next generation of intelligent systems.. A natural Autonomic Computing (AC) evolution in relation to Current Computing is to provide systems with Self-Managing ability with a minimum human interference.. Considering that AC is a grand-challenge vision of the future in which computing systems will manage themselves in accordance with high-level objectives specified by humans, we pretend with the proposed system to give a meaningful contribution in the field of Autonomic Computing application for dynamic scheduling in Manufacturing Systems.. Multi-agent paradigm is emerging for the development of solutions to very hard distributed computational problems. This paradigm is based either on the activity of "intelligent" agents which perform complex functionalities or on the exploitation of a large number of simple agents that can produce an overall intelligent behavior leading to the solution of alleged almost intractable problems.. Bio-Inspired Techniques (BIT) form a class of powerful and practical solution techniques for tackling complex, large-scale combinatorial problems producing efficiently high-quality solutions. From the literature we can conclude that they are adequate for static problems. However, real scheduling problems are quite dynamic, considering the arrival of new orders, orders being cancelled, machine delays or faults, etc. Scheduling problem in dynamic environments have been investigated by a number of authors, see for example [1] . The concept of developing the next era of computing systems is driven by the convergence between Biological Systems and the Digital Computing Systems. We belief that our main challenge in this work through autonomic systems is the effort integration of fourth research areas: Autonomic Computing(AC), Multi-Agent Systems (MAS), Bio-Inspired Techniques (BIT) and Real World Scheduling (RWS).. The remaining sections are organized as follows: Section 2 summarizes some related work on dynamic scheduling trough MAS and Bio-Inspired Techniques. Section 3 presents issues and links for Autonomic Computing. Some aspects of MAS and BIT are discussed on section 4 e 5. In section 6 the scheduling problem under consideration is presented. Section 7 presents the AutoDynAgents System and describes implemented mechanisms.. Finally, the paper presents some conclusions and puts forward some ideas for future work. We believe that a new contribution for the resolution of more realistic scheduling problems (Extended Job Shop Problems) was described in this paper. The particularity of our approach is the procedure to schedule operations, as each machine will first find local optimal or near optimal solutions, succeeded by the interaction with other machines trough cooperation mechanism as a way to find an optimal or near-optimal global schedule.. As result of this project we expect to prove some ideas for which we are now claiming. From these we refer the following:. • Use Autonomic Computing to reproduce Life-like behavior in computation to explain, predict, reconstruct and deploy complex systems, with a minimum human interference.. • Multi-agent Systems are adequate to model and support dynamic and distributed scheduling with Cooperative Negotiation.. • Multi-agent paradigm is often inspired by biologically systems. Observing Manufacturing Systems like evolution-based social systems will be important in order to allow a better understanding and integration between the machinery and humans.. • Learning in Multi-agent Autonomic Systems is a challenging problem, so does Optimization. Optimization in such environments must deal with dynamism.. • Bio-Inspired Techniques can be adapted to deal with dynamic problems, reusing and changing solutions in accordance with system dynamism.

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


A research agenda for distributed software development In recent years, a number of business reasons have caused software development to become increasingly distributed. Remote development of software offers several advantages, but it is also fraught with challenges. In this paper, we report on our study of distributed software development that helped shape a research agenda for this field. Our study has identified four areas where important research questions need to be addressed to make distributed development more effective. These areas are: collaborative software tools, knowledge acquisition and management, testing in a distributed set-up and process and metrics issues. We present a brief summary of related research in each of these areas, and also outline open research issues. During the last two decades, the management, development and maintenance of software have evolved from being concentrated at a single site to being geographically distributed across the globe. This phenomenon is variously referred to as "global", "distributed" or "multi-site" software development. A number of business reasons have contributed to this trend. To start with, the global demand for software products and services beginning in the late 1980s led to a flood of mergers and acquisitions, as IT firms strived to penetrate new markets and complement their product lines. At the same time, companies increasingly chose to focus on core competencies and hand-off or "outsource" some of the other necessary activities to firms specializing in those areas. "Offshoring" brought in further benefits -availability of a large pool of skilled labor, the prospect of being able to do round-theclock development, and most importantly, huge savings that could be accrued through low labor cost in developing countries. For example, a study by McKinsey [1] reports that the software development costs in India are 4 times less than that in US and for the period between 2003 to 2008 US savings from offshoring would grow from $6.7 billion to $20.0 billion. Of course, the process has also been aided by significant technological advances; in particular, the explosive growth of the Internet, which often makes distances irrelevant, and has made remote collaboration increasingly practical. Little wonder then, that a study in 2000 [2] revealed that 70% of US firms have outsourced some kind of business process, and 203 of US Fortune 500 companies engage in offshore outsourcing; or, that according to a Gartner Inc. estimate [3] in 2004, up to 10% of the workforce in US tech companies would be located in emerging markets by the end of the year.. have a relatively flat organizational structure. Studies indicate that distributed teams that are culturally divided may not be as cohesive as local ones, and this may lead to less trust [24] , poor cooperation and ultimately, conflicts. These difficulties are particularly telling for those software development activities that are communication-intensive. For example, [5] reports on the negative impacts of remote communication, cultural diversity and time differences on the requirements analysis phase of the software lifecycle.. Inadequate informal communication, lack of trust and cultural differences are not the only challenges in distributed software development. There are strategic issues, pertaining to the distribution of work across sites; process differences that can lead to problems in synchronization and system integration; knowledge management challenges that impede timely sharing of knowledge and reduce opportunities for re-use; and finally, technical issues e.g. poor bandwidth, connectivity problems etc. that can have a severe impact on the productivity of remote teams.. These challenges in distributed development often carry a heavy penalty in terms of slowing down multi-site work e.g. [18] reports that distributed work items take about two and one-half times as long to complete as similar items where all the work is collocated. Moreover, while the production costs might be low in distributed software development, there are increased coordination costs involved. The cost-benefit trade-offs in distributed development have been a topic of interest to both researchers and practitioners and a number of studies have been published on the samestudying coordination in distributed software teams [8, 9, 10] and geographically dispersed teams in general [11, 12, 13, 14] .

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


Tractable negotiation in tree-structured domains Multiagent resource allocation is a timely and exciting area of research at the interface of Computer Science and Economics. One of the main challenges in this area is the high complexity of negotiation. In particular, the complexity of the task of identifying rational deals, i.e. deals that are beneficial for all participants, often hinders the successful transfer of theoretical results to practical applications. To address this issue, we propose several protocols designed to tame the complexity of negotiation by exploiting structural properties of the utility functions used by agents to model their preferences over alternative bundles of resources. In particular, we consider domains where utility functions are k-additive (that is, synergies between different resources are restricted to bundles of at most k items) and tree-structured in the sense that the bundles for which there are synergies do not overlap. We show how protocols exploiting these properties can allow for drastically simplified negotiation processes. Multiagent resource allocation is a timely and exciting area of research at the interface of Computer Science and Economics. Applications range from electronic commerce [19] , over logistics [12] , to the exploitation of earth observation satellites [13] . In this paper, we are going to be concerned with a framework where agents negotiate over a finite number of indivisible resources in a distributed manner [9, 18] . Agents are assumed to only negotiate deals that are beneficial for each of the parties involved (which may be more than two). We are interested in negotiation histories that lead to allocations that are optimal from a social point of view; and we consider an allocation optimal if it maximises the sum of utilities of the agents in the system, i.e. if it maximises (utilitarian) social welfare [1] .. Unfortunately, the complexity associated with the task of identifying rational deals, i.e. deals that are beneficial for all participants, is typically very high and often hinders the successful transfer of theoretical results to practical applications. Common approaches to tame this type of complexity are to restrict the range of utility functions agents can use to model their preferences and to exploit the structure of utility functions during negotiation [4, 15, 17] . This is also the approach we are going to follow in this paper. Concretely, we are going to discuss so-called tree-structured domains, where the utility functions of agents are subject to certain structural restrictions. We use a compact representation of utility functions based on the notion of k-additivity, which restricts the synergies between different resources to bundles of at most k items each [11] . Tree-structured domains are sets of k-additive utility functions where the bundles for which there are synergies do not overlap.. We then propose two protocols that restrict negotiation to deals involving only the smallest bundles first, and then incrementally bigger bundles. However, these guided negotiation processes are not guaranteed to converge to an allocation with maximal social welfare, i.e. the protocols need to be enhanced further. The first protocol we propose is made intrusive in the sense that it modifies the structure of agents' utility functions. The second protocol has a centralised flavour and introduces a system agent that can compensate for a temporary loss in utility. This combination of guidance and social compensation allows us to restore the convergence properties of the negotiation framework. We have further analysed a negotiation framework previously studied by several authors [7, 8, 9, 18] . While most work on negotiation in multiagent systems has addressed either bilateral negotiation [16] or auctions [6] , this framework is multilateral, i.e. deals may involve any number of agents and any number of resources. The requirement for full multilateral negotiation stems from the fact that agents are assumed to be both rational and myopic. Recent results have identified situations in which deals involving only a limited number of resources each are required to reach allocations that are optimal from a social point of view [4] .. However, the task of identifying rational deals, i.e. deals that are beneficial for all participants remains highly complex. In this paper, we have shown that if all agents model their preferences by means of tree-structured utility functions, then finding an allocation with maximal social welfare does become feasible by implementing adequate protocols. Two protocols, clearly designed to exploit the specific structure of these functions, have been proposed in this paper. The crucial contribution in our proposal, we believe, is the combination of two ideas:. • The central idea in the ITCP has been to provide a protocol that guides negotiation. In each round, there are only a relatively small number of options as to which deal to choose (and the complexity of these deals increases stepwise, from round to round). The particular choices made in the definition of the ITCP mean that deals are not too far from truly rational deals (certainly if we make some additional assumptions on the nature of utility functions, as discussed earlier).. • The additional idea in the OATCP has been to introduce a system agent that can compensate for a temporary loss in social welfare (provided that such a loss is due to a deal sanctioned by the guidelines implemented in the ITCP). It thereby allows for a wider range of deal sequences leading to the optimal allocation, including sequences of structurally simple deals.. This combination of guidance and social compensation makes our approach work. While our formal results are restricted to tree-structured domains, we believe that the central ideas are general enough to be applied to other scenarios as well. This view is supported by our experimental results with utility functions that are not tree-structured. Our proposal may be considered a hybrid between distributed and centralised approaches to resource allocation. On the one hand, allocations emerge in a distributed manner as a result of a sequence of local negotiation steps. On the other hand, the concept of the system agent introduces a centralised element. One of the main arguments usually given in favour of distributed approaches over centralised ones (such as combinatorial auctions), is that it may not always be possible to find an agent that could act as the central authority (the auctioneer) executing the allocation procedure.. 1 To some degree, the same reservations may be made against our proposal. However, we believe that there is at least one important difference. In a combinatorial auction, the auctioneer is endowed with the (significant) computational burden of deciding the final allocation (the socalled winner determination problem [6] ). In our approach, on the other hand, there are no computationally hard tasks associated with the role of the system agent. Of course, in the context of the tree-structured domains studied here, the centralised task is not prohibitively hard in itself. Still, our work shows that it can also be distributed safely amongst agents by employing our protocols. Importantly, our experiments suggest that the ideas underlying the design of these protocols also have a more general appeal.. A potential problem with our approach is that agents could stop participating in negotiation before the optimal allocation has been reached. Indeed, it may be rational for them to do so, because our protocols allow certain agents to temporarily enjoy higher utility than they would enjoy in the socially optimal allocation. In this sense, the framework loses the "anytime character" of the original system [18] , where every new allocation would be guaranteed to have higher social welfare than its predecessor. This anytime character is particularly important because of the prohibitively high complexity of the general framework [3, 7, 8] . If optimal allocations cannot be guaranteed to be found within a reasonable amount of time, then the original framework does at least guarantee some improvement over the initial allocation when time runs out. In our proposal, the anytime character of the framework is far less important, because it dramatically reduces the complexity of negotiation and thereby makes convergence to an optimal allocation within a reasonable amount of time a realistic option. Nevertheless, the issue of incentive compatibility in the OATCP protocol remains an interesting topic for future work. A possible interpretation of the ITCP would be that it works with a sequence of progressively more fine-grained approximations to the real utility functions in such a way that structurally simple deals become individually rational (wrt. these approximations). Of course, these are approximations wrt. the representation of utility functions (in k-additive form), but not necessarily wrt. the values that utility functions assign to bundles of resources. These two dimensions may, however, coincide in many practical cases. If we assume that the synergetic effect of a bundle of resources reduces as the cardinality of that bundle increases, then the sequence of auxiliary utility functions used in the ITCP will indeed be progressively more accurate in terms of the values they assign to bundles as negotiation develops. In other words, if the coefficients in the k-additive form are high for single resources, and if they get smaller as the size of the respective term increases, then the utility functions used in the ITCP become more accurate in each round. This is a very reasonable assumption to make: the larger a bundle of resources is, the more difficult would it be for an agent to estimate the additional benefit incurred by owning all the resources in that bundle together (beyond the benefit incurred by the relevant subsets). Indeed, the very same (cognitive) argument is one of the main reasons why k-additive utilities with low values of k are not only computationally attractive but also highly relevant in practice.. Nevertheless, the ITCP does violate the postulate of full individual rationality for all stages of a negotiation process. Also, because of its "intrusive" aspect, this protocol is not completely satisfactory: it cannot be applied when agents are not under the control of the designer or when they are not willing to temporarily manipulate their own preferences in order to implement the protocol correctly. Clearly, such a protocol would be of little use when agents are humans, or simply when privacy issues prevent the designer from directly accessing the agents' preferences.

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