Generic programs,are programs,that abstract over types. Generic programs,can be used,to address,several common,programming patterns. This paper discusses,why,generic programming,is use- ful, gives applications of generic programming, and discusses the history of generic programming,and current generic programming activities at Utrecht University. Constructing software.
Let AG be an attribute grammar, with underlying context free grammar G and attribute evaluation rules A . The function that decorates |according to A | a parse tree with attribute values and then delivers the synthesized attribute value of the root node, is denoted [[A]] . We translate G into a functor F such that any parse tree for G is an element of the initial F -algebra. The attribute evaluation rules A are translated to a function ’ such that ([Fj ’]) is, in a precise sense, equivalent to [[A]] .
A nested datatype, also known as a non-regular datatype, is a parametrised datatype whose declaration involves different instances of the accompanying type parameters. Nested datatypes have been mostly ignored in functional programming until recently, but they are turning out to be both theoretically important and useful in practice. The aim of this paper is to suggest a functorial semantics for such datatypes, with an associated calculational theory that mirrors and extends the standard theory for regular datatypes. Though elegant and generic, the proposed approach appears more limited than one would like, and some of the limitations are discussed.
This paper presents an enhanced version of a novel radio interferometric positioning technique for node localization in wireless sensor networks that provides both high accuracy and long range simultaneously. The ranging method utilizes two transmitters emitting radio signals at almost the same frequencies. The relative location is estimated by measuring the relative phase offset of the generated interference signal at two receivers. Here, we analyze how the selection of carrier frequencies affects the precision and maximum range. Furthermore, we describe how the interplay of RF multi-path and ground reflections degrades the ranging accuracy. To address these problems, we introduce a technique that continuously refines the range estimates as it converges to the localization solution. Finally, we present the results of a field experiment where our prototype achieved 4 cm average localization accuracy for a quasi-random deployment of 16 COTS motes covering the area of two football fields. The maximum range measured was 170 m, four times the observed communication range. Consequently, node deployment density is no longer constrained by the localization technique, but rather by the communication range
A large part of the effort in formal program developments is expended on repeating the same derivational patterns over and over again. The problem is compounded by notations that require many marks on paper for expressing one elementary concept, and ‘administrative overhead’, consisting of algorithmically uninteresting but technically necessary steps, like shuffling parts of an expression around without change in computational meaning, and the introduction of local auxiliary definitions for lack of a suitable notation for what is being defined. This can to a large extent be avoided by developing suitable theories, including a notation that is designed to increase the manipulability. After a reflexion on some of the issues, the more technical part of this paper is devoted to an attempt to construct a system of combinators that is better amenable to manipulation than the classical ones.
A polytypic function definition is a function definition that is parametrised with a datatype. It embraces a class of algorithms. As an example we define a simple polytypic “crush” combinator that can be used to calculate polytypically. The ability to define functions polytypically adds another level of flexibility in the reusability of programming idioms and in the design of libraries of interoperable components.
The Sieve of Eratosthenes is an efficient algorithm for computing the successive primes. Rendered informally, it is as follows:1. Write down the successive “plurals”: 2, 3, 4, …2. Repeat:(a) Take the first number that is not circled or crossed out.(b) Circle it.(c) Cross out its proper multiples.3. What is left (i.e. the circled numbers) are the successive prime numbers.
∗This work is sponsored in part by DARPA through the ‘Network Embedded Systems Technology’ program under contract #F30602-01-C-0123, monitored by the Air Force Research Laboratory. The views and conclusions contained in this document are those of the authors and should not be interpreted as representing the official policies, either expressed or implied, of the Defense Advanced Research Projects Agency or the U.S. Government.
In this chapter, a peer-to-peer algorithm is described for approximately solving distributed, real-time, constraint optimization problems. The ANTS challenge problem is formulated as a distributed constraint optimization problem; an approximation version of the classical problem of graph k-coloring is formulated as a distributed constraint optimization problem to enable simple experimental assessment of the algorithm’s performance.
This paper reports on an algorithm for any- time, stochastic, distributed constraint optimization that uses iterated, peer-to-peer interaction to try to achieve rapid, approximate solutions to large constraint problems in which the constraint variables are naturally distributed. Two examples are given — graph coloring and coordina- tion of distributed sensors — together with experimental results on performance. I. I NTRODUCTION Dynamic, distributed constraint optimizationproblems arise naturally in high-latency networks of loosely-coupled nodes that must collaborate to accomplish some time- varying set of tasks. The objective is to determine a time-
This paper reports on a simple, stochastic, scalable, peer-to- peer algorithm for aproximately solving distributed constraint problems in soft real time. The performance of the algorithm is assessed using k-colorings of random graphs having known chromatic number and edge probability ranging from moder- ate to high.
Previous papers have reported on a simple, distributed, synchronous algorithm for approximately k-colouring large graphs in soft real time. In this paper, the effects of asynchronous execution and communication latency are investigated. The main conclusions are that strict synchrony is not required and that considerable communication latency can be tolerated. These results are important for practical applications of the algorithm involving large networks of low-performance hardware equipped with wireless communication.
This paper reports on a simple, decentralized, anytime, stochastic, soft graph-colouring algorithm. The algorithm is designed to quickly reduce the number of colour conflicts in large, sparse graphs in a scalable, robust, low-cost manner. The algorithm is experimentally evaluated in a framework motivated by its application to resource coordination in large, distributed networks.
This report details an approach to the real-time coordination of large networks of short-range sensors that communicate over short-range, low-bandwidth, high-latency radio channels. Each sensor is limited in the distance over which it can scan and in the type of data that it can acquire, so nearby sensors must collaborate to acquire complementary data for accomplishing such tasks as multipletarget detection and tracking. Operational limitations on sensors and real-time requirements on tasks restrict the number of tasks in which a given sensor can collaborate. The quality with which a given task is accomplished and the cost incurred are affected by which particular sensors collaborate in achieving the task. Consequently, a coordination mechanism is required to optimize collaboration. The coordination mechanism reported is fully distributed — each sensor decides for itself which measurements it should take to achieve optimal collaboration with nearby sensors, based what it knows about their intended measurements, and informs those sensors of its own intentions so that they can likewise optimize their own measurements. In order to determine which measurements are optimal, a sensor must have knowledge about the targets that are the intended subjects of the measurements. To this end, each sensor exchanges measurement data with nearby sensors, and operates a data fusion process to maintain local target estimates. The reported coordination mechanism is claimed to be scalable, low-cost, adaptive and robust.
The development of science proceeds in a cycle of activities, the so-called abstraction-specialisation cycle. Abstraction is the process of seeking patterns or commonalities, which are then classified, often in a formal mathematical framework. In the process of abstraction, we gain greater understanding by eliminating irrelevant detail in order to identify what is essential. The result is a collection of general laws which are then put to use in the second phase of the cycle, the specialisation phase. In the specialisation phase the general laws are instantiated to specific cases which, if the abstraction is a good one, leads to novel applications, yet greater understanding, and input for another round of abstraction followed by specialisation.
Stephen Fitzpatrick合作论文数Kestrel Institute10
Miklós Maróti合作论文数Bolyai Institute, University of Szeged1
Roland Backhouse合作论文数School of Computer Science and Information Technology1
Patrik Jansson合作论文数Functional Programming research group, in the Software Technology division at the CSE Department, Chalmers University of Technology and University of Gothenburg, Sweden1