To save content items to your account,
please confirm that you agree to abide by our usage policies.
If this is the first time you use this feature, you will be asked to authorise Cambridge Core to connect with your account.
Find out more about saving content to .
To save content items to your Kindle, first ensure no-reply@cambridge.org
is added to your Approved Personal Document E-mail List under your Personal Document Settings
on the Manage Your Content and Devices page of your Amazon account. Then enter the ‘name’ part
of your Kindle email address below.
Find out more about saving to your Kindle.
Note you can select to save to either the @free.kindle.com or @kindle.com variations.
‘@free.kindle.com’ emails are free but can only be saved to your device when it is connected to wi-fi.
‘@kindle.com’ emails can be delivered even when you are not connected to wi-fi, but note that service fees apply.
From clarity to efficiency: systematic program design
At the center of computer science, there are two major concerns of study: what to compute, and how to compute efficiently. Problem solving involves going from clear specifications for “what” to efficient implementations for “how”. Unfortunately, there is generally a conflict between clarity and efficiency, because clear specifications usually correspond to straightforward implementations, not at all efficient, whereas efficient implementations are usually sophisticated, not at all clear. What is needed is a general and systematic method to go from clear specifications to efficient implementations.
We give example problems from various application domains and discuss the challenges that lead to the need for a general and systematic method. The example problems are for database queries, hardware design, image processing, string processing, graph analysis, security policy frameworks, program analysis and verification, and mining semi-structured data. The challenges are to ensure correctness and efficiency of developed programs and to reduce costs of development and maintenance.
Example problems and application domains
Database queries. Database queries matter to our everyday life, because databases are used in many important day-to-day applications. Consider an example where data about professors, courses, books, and students are stored, and we want to find all professor-course pairs where the professor uses any of his own books as the textbook for the course and any of his own students as the teaching assistant for the course.
We present a categorical model for intuitionistic linear logic in which objects are polynomial diagrams and morphisms are simulation diagrams. The multiplicative structure (tensor product and its adjoint) can be defined in any locally cartesian closed category, but the additive (product and coproduct) and exponential (-comonoid comonad) structures require additional properties and are only developed in the category Set, where the objects and morphisms have natural interpretations in terms of games, simulation and strategies.
We examine a construction due to Fouché in which a Brownian motion is constructed from an algorithmically random infinite binary sequence. We show that although the construction is provably not computable in the sense of computable analysis, a lower bound for the rate of convergence is computable in any upper bound for the compressibilty of the sequence, making the construction layerwise computable.
Non-interference guarantees the absence of illicit information flow throughout program execution. It can be enforced by appropriate information flow type systems. Much of the previous work on type systems for non-interference has focused on calculi or high-level programming languages, and existing type systems for low-level languages typically omit objects, exceptions and method calls. We define an information flow type system for a sequential JVM-like language that includes all these programming features, and we prove, in the Coq proof assistant, that it guarantees non-interference. An additional benefit of the formalisation is that we have extracted from our proof a certified lightweight bytecode verifier for information flow. Our work provides, to the best of our knowledge, the first sound and certified information flow type system for such an expressive fragment of the JVM.
Every graphon defines a random graph on any given number n of vertices. It was known that the graphon is random-free if and only if the entropy of this random graph is subquadratic. We prove that for random-free graphons, this entropy can grow as fast as any subquadratic function. However, if the graphon belongs to the closure of a random-free hereditary graph property, then the entropy is O(n log n). We also give a simple construction of a non-step-function random-free graphon for which this entropy is linear, refuting a conjecture of Janson.
Substructural logics extending the full Lambek calculus FL have largely benefited from a systematical algebraic approach based on the study of their algebraic counterparts: residuated lattices. Recently, a nonassociative generalization of FL (which we call SL) has been studied by Galatos and Ono as the logic of lattice-ordered residuated unital groupoids. This paper is based on an alternative Hilbert-style presentation for SL which is almost MP-based. This presentation is then used to obtain, in a uniform way applicable to most (both associative and nonassociative) substructural logics, a form of local deduction theorem, description of filter generation, and proper forms of generalized disjunctions. A special stress is put on semilinear substructural logics (i.e., logics complete with respect to linearly ordered algebras). Axiomatizations of the weakest semilinear logic over SL and other prominent substructural logics are provided and their completeness with respect to chains defined over the real unit interval is proved.
We use constructions in monoid and group theory to exhibit an adjunction between the category of partially ordered monoids and lazy monoid homomorphisms and the category of partially ordered groups and group homomorphisms such that the unit of the adjunction is injective. We also prove a similar result for sets acted on by monoids and groups.
We introduce the new notion of a lazy homomorphism for a function f between partially ordered monoids such that f(m ○ m′) ≤ f(m) ○ f(m′).
Every monoid can be endowed with the discrete partial ordering (m ≤ m′ if and only if m=m′), so our constructions provide a way of embedding monoids into groups. A simple counterexample (the two-element monoid with a non-trivial idempotent) and some calculations show that one can never hope for such an embedding to be a monoid homomorphism, so the price paid for injecting a monoid into a group is that we must weaken the notion of a homomorphism to this new notion of a lazy homomorphism.
The computational significance of this is that a monoid is an abstract model of computation – or at least of ‘operations’ – and, similarly, a group models reversible computations/operations. With this reading, the adjunction with its injective unit gives a systematic high-level way of faithfully translating an irreversible system into a ‘lazy’ reversible one.
Informally, but perhaps informatively, we can describe this work as follows: we give an abstract analysis of how we can sensibly add ‘undo’ (in the sense of ‘control-Z’).
The control of a brachiation robot has been the primary objective of this study. A brachiating robot is a type of a mobile arm that is capable of moving from branch to branch similar to a long-armed ape. In this paper, to minimize the actuator work, Pontryagin's minimum principle was used to obtain the optimal trajectories for two different problems. The first problem considers “brachiation between fixed branches with different distance and height,” whereas the second problem deals with the “brachiating and catching of a moving target branch”. Theoretical results show that the control effort in the proposed method is reduced by 25% in comparison with the “target dynamics” method which was proposed by Nakanishi et al. (1998)16 for the same type of robot. As a result, the obtained optimal trajectory also minimizes the brachiation time. Two kinds of controllers, namely the proportional-derivative (PD) and the adaptive robust (AR), were investigated for tracking the proposed trajectories. Then, the previous method on a set-point controller for acrobat robots is improved to represent a new AR controller which allows the system to track the desired trajectory. This new controller has the capability to be used in systems which have uncertainties in the kinematic and dynamic parameters. Finally, theoretical results are presented and validated with experimental observations with a PD controller due to the no chattering phenomenon and small computational efforts.
We show that the expected number of maximal empty axis-parallel boxes amidst n random points in the unit hypercube [0,1]d in $\mathbb{R}^d$ is (1 ± o(1)) $\frac{(2d-2)!}{(d-1)!}$n lnd−1n, if d is fixed. This estimate is relevant to analysis of the performance of exact algorithms for computing the largest empty axis-parallel box amidst n given points in an axis-parallel box R, especially the algorithms that proceed by examining all maximal empty boxes. Our method for bounding the expected number of maximal empty boxes also shows that the expected number of maximal empty orthants determined by n random points in $\mathbb{R}^d$ is (1 ± o(1)) lnd−1n, if d is fixed. This estimate is related to the expected number of maximal (or minimal) points amidst random points, and has application to algorithms for coloured orthogonal range counting.
Surgical and search/rescue robots often work in environments with very strict spatial constraints. The tendon-sheath mechanism is a promising candidate for driving such systems, allowing power sources and actuation motors placed outside to transmit force and energy to the robot at the distal end through the constrained environment. Having both compactness and high force capability makes it very attractive for manipulation devices. On the other hand, the friction attenuation of tendon tension is nonlinear and configuration-dependent due to tendon/sheath interactions throughout the transmission path. This is a major obstacle for the tendon-sheath mechanism to be widely adopted. Here, we focus on the friction analysis for flexible and time-varying tendon-sheath configurations: the most challenging but yet commonly encountered case for real-world applications. Existing results on fixed-path configurations are reviewed, revisited, and extended to flexible and time-varying cases. The effect of tendon length to friction attenuation is modeled. While focusing on tension transmission, tendon elongation is also discussed with the length effect applied. In the end, two-dimensional results are extended to three-dimensional tendon-sheath configurations. All propositions and theorems are validated on a dedicated experimental platform.
In this work, a generalized adaptive control scheme for the global position stabilization of robot manipulators with bounded inputs is proposed. It gives rise to various families of bounded controllers with adaptive gravity compensation. Compared with the adaptive approaches previously developed in a bounded-input context, the proposed scheme guarantees the adaptive regulation objective: globally, avoiding discontinuities in the control expression as well as in the adaptation auxiliary dynamics, preventing the inputs to reach their natural saturation bounds, and imposing no saturation-avoidance restriction on the control gains. Experimental results corroborate the efficiency of the proposed adaptive scheme.
We define a number of stochastic equivalences in the dtsPBC framework, which is a discrete time stochastic extension of finite Petri box calculus (PBC) enriched with iteration. These equivalences allow the identification of stochastic processes that have similar behaviour but are differentiated by the semantics of the calculus. We explain how the equivalences we propose can be used to reduce transition systems of expressions, and demonstrate how to apply the equivalences to compare the stationary behaviour. The equivalences guarantee a coincidence of performance indices for stochastic systems, and can be used for performance analysis simplification. We use a case study to outline a method of modelling, performance evaluation and behaviour preserving reduction of concurrent computing systems, and apply it to the dining philosophers system.
Discrete kinematic synthesis of discretely actuated hyper-redundant manipulators is a new practical problem in robotics. The problem concerns with determining the type of each manipulator module from among several specific types, so that the manipulator could reach several specified target frames with the lowest error. This paper suggests using a breadth-first search method and a workspace mean frame to solve this problem. To reduce errors, two heuristic ideas are proposed: two-by-two searching method and iteration. The effectiveness of the proposed method is verified through several numerical problems.
The present paper addresses the issues that should be covered in order to develop walk-through programming techniques (i.e. a manual guidance of the robot) in an industrial scenario. First, an exact formulation of the dynamics of the tool the human should feel when interacting with the robot is presented. Then, the paper discusses a way to implement such dynamics on an industrial robot equipped with an open robot control system and a wrist force/torque sensor, as well as the safety issues related to the walk-through programming. In particular, two strategies that make use of admittance control to constrain the robot motion are presented. One slows down the robot when the velocity of the tool centre point exceeds a specified safety limit, the other one limits the robot workspace by way of virtual safety surfaces. Experimental results on a COMAU Smart Six robot are presented, showing the performance of the walk-through programming system endowed with the two proposed safety strategies.
Safe navigation of robotic vehicles is considered as a key pre-requisite of successful mission operations within highly adverse and unconstrained environments. While there has been extensive research in the perception of positive obstacles, little progress can be accredited to the field of negative obstacles. This paper hypostatizes an elaborative attempt to address the problem of negative obstacle detection and traversability analysis in the form of gaps by processing 3-dimensional range data. The domain of application concerns Urban Search and Rescue scenarios that reflect environments of increased complexity in terms of diverse terrain irregularities. To allow real-time performance and, in turn, timely prevention of unrecoverable robotic states, the proposed approach is based on the application of efficient image morphological operations for noise reduction and border following the detection and grouping of gaps. Furthermore, we reason about gap traversability, a concept that is novel within the field. Traversability assessments are based on features extracted through Principal Component Analysis by exploring the spatial distribution of the interior of the individual gaps or the orientation distribution of the corresponding contour. The proposed approach is evaluated within a realistic scenario of a tunnel car accident site and a challenging outdoor scenario. Using a contemporary Search and Rescue robot, we have performed extensive experiments under various parameter settings that allowed the robot to always detect the real gaps, and either optimally cross over those that were traversable or otherwise avoid them.
In this article we present a new class of multiple contraction functions—the epistemic entrenchment-based multiple contractions—which are a generalization of the epistemic entrenchment-based contractions (Gärdenfors, 1988; Gärdenfors & Makinson, 1988) to the case of contractions by (possibly nonsingleton) sets of sentences and provide an axiomatic characterization for that class of functions. Moreover, we show that the class of epistemic entrenchment-based multiple contractions coincides with the class of system of spheres-based multiple contractions introduced in Fermé & Reis (2012).
The efficiency of a program is measured in terms of its memory requirements and its running time. In this chapter we shall introduce the concepts stack and heap because a basic understanding of these concepts is necessary in order to understand the memory management of the system, including the garbage collection.
Furthermore, we shall study techniques that in many cases can be used to improve the efficiency of a given function, where the idea is to search for a more general function, whose declaration has a certain form called iterative or tail recursive. Two techniques for deriving tail-recursive functions will be presented: One is based on using accumulating parameters and the other is based on the concept of a continuation, that represents the rest of the computation. The continuation-based technique is generally applicable. The technique using accumulating parameters applies in certain cases only, but when applicable it usually gives the best results. We give examples showing the usefulness of these programming techniques.
We relate the notion of iterative function to while loops and provide examples showing that tail-recursive programs are in fact running faster than the corresponding programs using while loops.
The techniques for deriving tail-recursive functions are useful programming techniques that often can be used to obtain performance gains. The techniques do not replace a conscious choice of good algorithms and data structures. For a systematic study of efficient algorithms, we refer to textbooks on “Algorithms and Data Structures.”
The purpose of this book is to introduce a wide range of readers – from the professional programmer to the computer science student – to the rich world of functional programming using the F# programming language. The book is intended as the textbook in a course on functional programming and aims at showing the role of functional programming in a wide spectrum of applications ranging from computer science examples over database examples to systems that engage in a dialogue with a user.
Why functional programming u sing F#?
Functional programming languages have existed in academia for more than a quarter of a century, starting with the untyped Lisp language, followed by strongly typed languages like Haskell and Standard ML.
The penetration of functional languages to the software industry has, nevertheless, been surprisingly slow. The reason is probably lack of support of functional languages by commercial software development platforms, and software development managers are reluctant to base software development on languages living in a non-commercial environment.
This state of affairs has been changed completely by the appearance of F#, an open-source, full-blown functional language integrated in the Visual Studio development platform and with access to all features in the .NET program library.