100 research outputs found

    Exploiting parallelism by customizing evaluation

    Get PDF
    NiMo is a totally graphic language from the family of Higher Order Typed languages with a strong Data flow inspiration. The interpreter is a specialized graph transformation system, and therefore the language operational semantics is given in terms of graph transformations. In NiMo parallelization is implicit and the evaluation policy is customizable following a process-centered approach. Here we explore some of the methodological possibilities that it opens. Some classical examples illustrate how combining modes greatly increases processor usage, decreases channel population, and achieves subnet synchronization in a very easy and intuitive way. We also present a stream programming technique and a real case application for generative and multistage-programming.Peer ReviewedPostprint (author’s final draft

    Computation of Lebesgue’s Space-Filling Curve

    Get PDF
    The means of realizing or approximating the Lebesgue space-filling curve (SFC) with binary arithmetic on a uniformly spaced binary grid are not obvious, one problem being its formulation in terms of ternary representations; that impediment can be overcome via use of a binary-oriented Cantor set.  A second impediment, namely the Devil’s Staircase feature, also created by the role of the Cantor set, can be overcome via the definition of a “working inverse”, thereby providing means of achieving compatibility with such a grid. The results indicate an alternative way to proceed, in realizing an approximation to Lebesgue’s SFC, which circumvents any complication raised by Cantor sets and is compatible with binary and integer arithmetic. Well-known constructions such as the z-curve or Morton order, sometimes considered in association with Lebesgue’s SFC, are treated as irrelevant

    Parallel programming using functional languages

    Get PDF
    It has been argued for many years that functional programs are well suited to parallel evaluation. This thesis investigates this claim from a programming perspective; that is, it investigates parallel programming using functional languages. The approach taken has been to determine the minimum programming which is necessary in order to write efficient parallel programs. This has been attempted without the aid of clever compile-time analyses. It is argued that parallel evaluation should be explicitly expressed, by the programmer, in programs. To do achieve this a lazy functional language is extended with parallel and sequential combinators. The mathematical nature of functional languages means that programs can be formally derived by program transformation. To date, most work on program derivation has concerned sequential programs. In this thesis Squigol has been used to derive three parallel algorithms. Squigol is a functional calculus from program derivation, which is becoming increasingly popular. It is shown that some aspects of Squigol are suitable for parallel program derivation, while others aspects are specifically orientated towards sequential algorithm derivation. In order to write efficient parallel programs, parallelism must be controlled. Parallelism must be controlled in order to limit storage usage, the number of tasks and the minimum size of tasks. In particular over-eager evaluation or generating excessive numbers of tasks can consume too much storage. Also, tasks can be too small to be worth evaluating in parallel. Several program techniques for parallelism control were tried. These were compared with a run-time system heuristic for parallelism control. It was discovered that the best control was effected by a combination of run-time system and programmer control of parallelism. One of the problems with parallel programming using functional languages is that non-deterministic algorithms cannot be expressed. A bag (multiset) data type is proposed to allow a limited form of non-determinism to be expressed. Bags can be given a non-deterministic parallel implementation. However, providing the operations used to combine bag elements are associative and commutative, the result of bag operations will be deterministic. The onus is on the programmer to prove this, but usually this is not difficult. Also bags' insensitivity to ordering means that more transformations are directly applicable than if, say, lists were used instead. It is necessary to be able to reason about and measure the performance of parallel programs. For example, sometimes algorithms which seem intuitively to be good parallel ones, are not. For some higher order functions it is posible to devise parameterised formulae describing their performance. This is done for divide and conquer functions, which enables constraints to be formulated which guarantee that they have a good performance. Pipelined parallelism is difficult to analyse. Therefore a formal semantics for calculating the performance of pipelined programs is devised. This is used to analyse the performance of a pipelined Quicksort. By treating the performance semantics as a set of transformation rules, the simulation of parallel programs may be achieved by transforming programs. Some parallel programs perform poorly due to programming errors. A pragmatic method of debugging such programming errors is illustrated by some examples

    The ciao preprocessor

    Get PDF
    Abstract is not available

    Modular average case analysis: Language implementation and extension

    Get PDF
    Motivated by accurate average-case analysis, MOdular Quantitative Analysis (MOQA) is developed at the Centre for Efficiency Oriented Languages (CEOL). In essence, MOQA allows the programmer to determine the average running time of a broad class of programmes directly from the code in a (semi-)automated way. The MOQA approach has the property of randomness preservation which means that applying any operation to a random structure, results in an output isomorphic to one or more random structures, which is key to systematic timing. Based on original MOQA research, we discuss the design and implementation of a new domain specific scripting language based on randomness preserving operations and random structures. It is designed to facilitate compositional timing by systematically tracking the distributions of inputs and outputs. The notion of a labelled partial order (LPO) is the basic data type in the language. The programmer uses built-in MOQA operations together with restricted control flow statements to design MOQA programs. This MOQA language is formally specified both syntactically and semantically in this thesis. A practical language interpreter implementation is provided and discussed. By analysing new algorithms and data restructuring operations, we demonstrate the wide applicability of the MOQA approach. Also we extend MOQA theory to a number of other domains besides average-case analysis. We show the strong connection between MOQA and parallel computing, reversible computing and data entropy analysis

    Support for an integrated approach to program understanding: an application of software visualisation

    Get PDF
    Program Comprehension is a key factor in providing effective software maintenance and enabling successful evolution of software systems. The objective of this research is to provide a framework and mechanism to facilitate the understanding of large software systems. There exist a number of theories and models of Program Comprehension where each favours a different approach to comprehension. It is evident that there is no real consensus on how maintainers understand software systems. The disparities in the comprehension strategies are largely dependent on the personal and circumstantial factors. Factors such as the level of technical competence of the maintainers, the size and complexity of the piece of software, and the types and goals of the maintenance activities can influence the process of comprehension. This research proposes an alternative approach to Program Comprehension. It acknowledges that the process of comprehension is opportunistic, and that the current comprehension theories are inadequate in addressing this. There is a need for a more flexible approach towards comprehension, and the Integrated Approach proposed in this thesis provides a way for the utilisation of the various comprehension theories under a single environment. It recognises that any one of the comprehension theories may become active during comprehension. Under the Integrated Approach, maintainers have the option of selecting and executing the various comprehension strategies as they see fit. The Integrated Approach to comprehension is based on a matrix of Program Relationships between Program Elements of a programming language. In this thesis, these Program Relationships are derived for the C programming language constructs. This work also involves the investigation of the roles of both textual and graphical representations during the comprehension process. Both representations are commonly used to alleviate the problem of information overloading when maintainers trying to understand and maintain a software system. The Integrated Approach is realised in a tool named PUI (program [understanding implements) which provides an environment enabling the utilisation of various comprehension theories

    A task-based message passing framework

    Get PDF
    Over the past decade, it has become clear that parallel and distributed programming will occupy an increasingly larger proportion of a developer's work. While numerous programming languages and libraries have been built to facilitate working with concurrency, developer work is still difficult and error-prone. In this thesis, we propose a task-based message passing framework. The proposed framework combines the actor model with message passing functionality to offer a useful and efficient way to implement parallel and distributed algorithms. The framework is intended to be part of a novel C compiler that will offer built-in task and message features. Perhaps most importantly, the new framework aims to be intuitive and efficient. We have used the framework to implement a parallel sample-sort and a client-server application. Our results demonstrate both strong performance for a parallel sorting algorithm and scalability that extends to thousands of concurrent messages. In addition, we have developed a client server app that emphasizes the intuitive nature of the development cycle for the new model. We conclude that the proposed message passing framework would be well suited to concurrent development environments and offers a simple and efficient way to build applications for the new wave of multi-core hardware platforms
    • …
    corecore