122 research outputs found

    Functional and dynamic programming in the design of parallel prefix networks

    Get PDF
    A parallel prefix network of width n takes n inputs, a1, a2, . . ., an, and computes each yi = a1 ○ a2 ○ ⋅ ⋅ ⋅ ○ ai for 1 ≀ i ≀ n, for an associative operator ○. This is one of the fundamental problems in computer science, because it gives insight into how parallel computation can be used to solve an apparently sequential problem. As parallel programming becomes the dominant programming paradigm, parallel prefix or scan is proving to be a very important building block of parallel algorithms and applications. There are many different parallel prefix networks, with different properties such as number of operators, depth and allowed fanout from the operators. In this paper, ideas from functional programming are combined with search to enable a deep exploration of parallel prefix network design. Networks that improve on the best known previous results are generated. It is argued that precise modelling in a functional programming language, together with simple visualization of the networks, gives a new, more experimental, approach to parallel prefix network design, improving on the manual techniques typically employed in the literature. The programming idiom that marries search with higher order functions may well have wider application than the network generation described here

    Feldspar: Application and Implementation

    Get PDF
    The Feldspar project aims to develop a domain specific language for Digital Signal Processing algorithm design. From functional descriptions, imperative code (currently C) is generated. The project partners are Ericsson, Chalmers and ELTE, Budapest. The background and motivation for the project have been documented elsewhere [3]. We aim to raise the level of abstraction at which algorithm developers and implementors work, and to generate, from Feldspar descriptions, the kind of code that is currently written by hand. These lecture notes first give a brief introduction to Feldspar and the style of programming that it encourages. Next, we document the implementation of Feldspar as a domain specific language (DSL), embedded in Haskell. The implementation is built using a library called Syntactic that was built for this purpose, but also designed to be of use to other implementors of embedded domain specific languages. We show the implementation of Feldspar in sufficient detail to give the reader an understanding of how the use of the Syntactic library enables the modular construction of an embedded DSL. For those readers who would like to apply these techniques to their own DSL embedded in Haskell, further instructions are given in section 5. The programming examples are available in the CEFP directory of the Feldspar package, version 0.5.0.1: http://hackage.haskell.org/package/ feldspar-language-0.5.0.1 The code can be fetched by running: > cabal unpack feldspar-language-0.5.0.1 All code is written in Haskell, and has been tested using the Glasgow Haskell Compiler (GHC), version 7.0.2, and the packages syntactic-0.8 feldspar-language-0.5.0.1 feldspar-compiler-0.5.0.

    Hailstorm : A Statically-Typed, Purely Functional Language for IoT Applications

    Get PDF
    With the growing ubiquity of Internet of Things (IoT), more complex logic is being programmed on resource-constrained IoT devices, almost exclusively using the C programming language. While C provides low-level control over memory, it lacks a number of high-level programming abstractions such as higher-order functions, polymorphism, strong static typing, memory safety, and automatic memory management.We present Hailstorm, a statically-typed, purely functional programming language that attempts to address the above problem. It is a high-level programming language with a strict typing discipline. It supports features like higher-order functions, tail-recursion and automatic memory management, to program IoT devices in a declarative manner. Applications running on these devices tend to be heavily dominated by I/O. Hailstorm tracks side effects like I/O in its type system using resource types. This choice allowed us to explore the design of a purely functional standalone language, in an area where it is more common to embed a functional core in an imperative shell. The language borrows the combinators of arrowized FRP, but has discrete-time semantics. The design of the full set of combinators is work in progress, driven by examples. So far, we have evaluated Hailstorm by writing standard examples from the literature (earthquake detection, a railway crossing system and various other clocked systems), and also running examples on the GRiSP embedded systems board, through generation of Erlang

    Efficient GPU implementation of a class of array permutations

    Full text link
    Optimal usage of the memory system is a key element of fast GPU algorithms. Unfortunately many common algorithms fail in this regard despite exhibiting great regularity in memory access patterns. In this paper we propose efficient kernels to permute the elements of an array, which can be used to improve the access patterns of many algorithms. We handle a class of permutations known as Bit Matrix Multiply Complement (BMMC) permutations, for which we design kernels of speed comparable to that of a simple array copy. This is a first step towards implementing a set of array combinators based on these permutations.Comment: Submitted to ACM SIGPLAN International Workshop on Functional High-Performance and Numerical Computing 202

    Efficient GPU Implementation of Affine Index Permutations on Arrays

    Get PDF
    Optimal usage of the memory system is a key element of fast GPU algorithms. Unfortunately many common algorithms fail in this regard despite exhibiting great regularity in memory access patterns. In this paper we propose efficient kernels to permute the elements of an array. We handle a class of permutations known as Bit Matrix Multiply Complement (BMMC) permutations, for which we design kernels of speed comparable to that of a simple array copy. This is a first step towards implementing a set of array combinators based on these permutations

    Synchron - An API and Runtime for Embedded Systems

    Get PDF
    Programming embedded systems applications involve writing concurrent, event-driven and timing-aware programs. Traditionally, such programs are written in low-level machine-oriented programming languages like C or Assembly. We present an alternative by introducing Synchron, an API that offers high-level abstractions to the programmer while supporting the low-level infrastructure in an associated runtime system and one-time-effort drivers.Embedded systems applications exhibit the general characteristics of being (i) concurrent, (ii) I/O–bound and (iii) timing-aware. To address each of these concerns, the Synchron API consists of three components - (1) a Concurrent ML (CML) inspired message-passing concurrency model, (2) a message-passing–based I/O interface that translates between low-level interrupt based and memory-mapped peripherals, and (3) a timing operator, syncT, that marries CML’s sync operator with timing windows inspired from the TinyTimber kernel.We implement the Synchron API as the bytecode instructions of a virtual machine called SynchronVM. SynchronVM hosts a Caml-inspired functional language as its frontend language, and the backend of the VM supports the STM32F4 and NRF52 microcontrollers, with RAM in the order of hundreds of kilobytes. We illustrate the expressiveness of the Synchron API by showing examples of expressing state machines commonly found in embedded systems. The timing functionality is demonstrated through a music programming exercise. Finally, we provide benchmarks on the response time, jitter rates, memory, and power usage of the SynchronVM

    A large ‘discovery’ experiment: Gender Initiative for Excellence (Genie) at Chalmers University of Technology

    Get PDF
    Sweden tops gender equality rankings, but Swedish academia is still lacking women in top positions. To address gender inequality in its faculty, Chalmers University of Technology has invested 300 million SEK (30 million Euros) over 10\ua0years in Gender initiative for Excellence (Genie). Genie aims to increase the university’s success and excellence via gender equality efforts. In this editorial, we want to share insights on explicit efforts during Genie’s first 2.5\ua0years with the goal to inspire and advise other universities and researchers

    SAT-Solving in Practice, with a Tutorial Example from Supervisory Control

    Get PDF
    Satisfiability solving, the problem of deciding whether the variables of a propositional formula can be assigned in such a way that the formula evaluates to true, is one of the classic problems in computer science. It is of theoretical interest because it is the canonical NP-complete problem. It is of practical interest because modern SAT-solvers can be used to solve many important and practical problems. In this tutorial paper, we show briefly how such SAT-solvers are implemented, and point to some typical applications of them. Our aim is to provide sufficient information (much of it through the reference list) to kick-start researchers from new fields wishing to apply SAT-solvers to their problems. Supervisory control theory originated within the control community and is a framework for reasoning about a plant to be controlled and a specification that the closed-loop system must fulfil. This paper aims to bridge the gap between the computer science community and the control community by illustrating how SAT-based techniques can be used to solve some supervisory control related problems

    Handling Conflicts in Depth-First Search for LTL Tableau to Debug Compliance Based Languages

    Full text link
    Providing adequate tools to tackle the problem of inconsistent compliance rules is a critical research topic. This problem is of paramount importance to achieve automatic support for early declarative design and to support evolution of rules in contract-based or service-based systems. In this paper we investigate the problem of extracting temporal unsatisfiable cores in order to detect the inconsistent part of a specification. We extend conflict-driven SAT-solver to provide a new conflict-driven depth-first-search solver for temporal logic. We use this solver to compute LTL unsatisfiable cores without re-exploring the history of the solver.Comment: In Proceedings FLACOS 2011, arXiv:1109.239

    Expert range maps of global mammal distributions harmonised to three taxonomic authorities

    Get PDF
    AimComprehensive, global information on species' occurrences is an essential biodiversity variable and central to a range of applications in ecology, evolution, biogeography and conservation. Expert range maps often represent a species' only available distributional information and play an increasing role in conservation assessments and macroecology. We provide global range maps for the native ranges of all extant mammal species harmonised to the taxonomy of the Mammal Diversity Database (MDD) mobilised from two sources, the Handbook of the Mammals of the World (HMW) and the Illustrated Checklist of the Mammals of the World (CMW).LocationGlobal.TaxonAll extant mammal species.MethodsRange maps were digitally interpreted, georeferenced, error-checked and subsequently taxonomically aligned between the HMW (6253 species), the CMW (6431 species) and the MDD taxonomies (6362 species).ResultsRange maps can be evaluated and visualised in an online map browser at Map of Life (mol.org) and accessed for individual or batch download for non-commercial use.Main conclusionExpert maps of species' global distributions are limited in their spatial detail and temporal specificity, but form a useful basis for broad-scale characterizations and model-based integration with other data. We provide georeferenced range maps for the native ranges of all extant mammal species as shapefiles, with species-level metadata and source information packaged together in geodatabase format. Across the three taxonomic sources our maps entail, there are 1784 taxonomic name differences compared to the maps currently available on the IUCN Red List website. The expert maps provided here are harmonised to the MDD taxonomic authority and linked to a community of online tools that will enable transparent future updates and version control
    • 

    corecore