1,013,997 research outputs found

    A Semantics for Approximate Program Transformations

    Full text link
    An approximate program transformation is a transformation that can change the semantics of a program within a specified empirical error bound. Such transformations have wide applications: they can decrease computation time, power consumption, and memory usage, and can, in some cases, allow implementations of incomputable operations. Correctness proofs of approximate program transformations are by definition quantitative. Unfortunately, unlike with standard program transformations, there is as of yet no modular way to prove correctness of an approximate transformation itself. Error bounds must be proved for each transformed program individually, and must be re-proved each time a program is modified or a different set of approximations are applied. In this paper, we give a semantics that enables quantitative reasoning about a large class of approximate program transformations in a local, composable way. Our semantics is based on a notion of distance between programs that defines what it means for an approximate transformation to be correct up to an error bound. The key insight is that distances between programs cannot in general be formulated in terms of metric spaces and real numbers. Instead, our semantics admits natural notions of distance for each type construct; for example, numbers are used as distances for numerical data, functions are used as distances for functional data, an polymorphic lambda-terms are used as distances for polymorphic data. We then show how our semantics applies to two example approximations: replacing reals with floating-point numbers, and loop perforation

    Experiments with a Convex Polyhedral Analysis Tool for Logic Programs

    Full text link
    Convex polyhedral abstractions of logic programs have been found very useful in deriving numeric relationships between program arguments in order to prove program properties and in other areas such as termination and complexity analysis. We present a tool for constructing polyhedral analyses of (constraint) logic programs. The aim of the tool is to make available, with a convenient interface, state-of-the-art techniques for polyhedral analysis such as delayed widening, narrowing, "widening up-to", and enhanced automatic selection of widening points. The tool is accessible on the web, permits user programs to be uploaded and analysed, and is integrated with related program transformations such as size abstractions and query-answer transformation. We then report some experiments using the tool, showing how it can be conveniently used to analyse transition systems arising from models of embedded systems, and an emulator for a PIC microcontroller which is used for example in wearable computing systems. We discuss issues including scalability, tradeoffs of precision and computation time, and other program transformations that can enhance the results of analysis.Comment: Paper presented at the 17th Workshop on Logic-based Methods in Programming Environments (WLPE2007

    Study of the Oscillation Condition of Quartz Oscillators by Gyrator Transformation

    No full text
    International audienceThe calculation of the oscillation condition is one of the main points of oscillator analysis. Its determination in finite term allows one to calculate the steady state amplitude and frequency of the oscillator. Symbolic solutions provide an additional insight into the behavior of the circuit. As an example the sensitivity of the oscillator to parameter change can be expressed in an exact form. Numerical solutions are not as helpful as symbolic solutions in the design stage. We present a technique, based on the gyrator transformation, to set up the nonlinear equation network in a form suitable to be solved with analytical methods. We develop a symbolic program based on this technique. As an example, the symbolic program is applied to compute the exact expression of the steady state frequency and amplitude of the Van der Pol oscillator and the Colpitts oscillator

    A parallel transformations framework for cluster environments.

    Get PDF
    In recent years program transformation technology has matured into a practical solution for many software reengineering and migration tasks. FermaT, an industrial strength program transformation system, has demonstrated that legacy systems can be successfully transformed into efficient and maintainable structured C or COBOL code. Its core, a transformation engine, is based on mathematically proven program transformations and ensures that transformed programs are semantically equivalent to its original state. Its engine facilitates a Wide Spectrum Language (WSL), with low-level as well as high-level constructs, to capture as much information as possible during transformation steps. FermaT’s methodology and technique lack in provision of concurrent migration and analysis. This provision is crucial if the transformation process is to be further automated. As the constraint based program migration theory has demonstrated, it is inefficient and time consuming, trying to satisfy the enormous computation of the generated transformation sequence search-space and its constraints. With the objective to solve the above problems and to extend the operating range of the FermaT transformation system, this thesis proposes a Parallel Transformations Framework which makes parallel transformations processing within the FermaT environment not only possible but also beneficial for its migration process. During a migration process, many thousands of program transformations have to be applied. For example a 1 million line of assembler to C migration takes over 21 hours to be processed on a single PC. Various approaches of search, prediction techniques and a constraint-based approach to address the presented issues already exist but they solve them unsatisfactorily. To remedy this situation, this dissertation proposes a framework to extend transformation processing systems with parallel processing capabilities. The parallel system can analyse specified parallel transformation tasks and produce appropriate parallel transformations processing outlines. To underpin an automated objective, a formal language is introduced. This language can be utilised to describe and outline parallel transformation tasks whereas parallel processing constraints underpin the parallel objective. This thesis addresses and explains how transformation processing steps can be automatically parallelised within a reengineering domain. It presents search and prediction tactics within this field. The decomposition and parallelisation of transformation sequence search-spaces is outlined. At the end, the presented work is evaluated on practical case studies, to demonstrate different parallel transformations processing techniques and conclusions are drawn

    Assembler to C migration using the FermaT transformation system

    Get PDF
    The FermaT transformation system, based on research carried out over the last twelve years at Durham University and Software Migrations Ltd., is an industrial-strength formal transformation engine with many applications in program comprehension and language migration. This paper describes one application of the system: the migration of IBM 370 Assembler code to equivalent, maintainable C code. We present an example of using the tool to migrate a small, but complex, assembler module to C with no manual intervention required. We briefly discuss a mass migration exercise where 1,925 assembler modules were successfully migrated to C code

    Warm Fusion in Stratego: A Case Study in Generation of Program Transformation Systems.

    Get PDF
    Stratego is a domain specific language for the specification of program transformation systems. The design of Stratego is based on the paradigm of rewriting strategies: user-definable programs in a little language of strategy operators determine where and in what order transformation rules are (automatically) applied to a program. The seperation of rules and strategies supports modularity of specifications. Stratego also provides generic features for specification of program trasversals.In this paper we present a case study of Stratego as applied to a non-trivial problem in program transformation. We demonstrate the use of Stratego in eliminating intermediate data structures from (also known as deforesting) functional programs via the warm fusion algorithm of Launchbury and Sheard. This algorithm has been specified in Stratego and embedded in a fully automatic transformation system for kernel Haskell. The entire system consists of about 2600 lines of specification code, which breaks down into 1850 lines for a general framework for Haskell transformation and 750 lines devoted to a highly modular, easily extensible specification of the warm fusion transformer itself. Its successful design and construction provides further evidence that programs generated from Stratego specifications are suitable for integration into real systems, and that rewriting strategies are a good paradigm for the implementation of such systems.This report contains the complete Stratego specification of the transformation. The first chapter, which will appear as a selfcontained publication, explains the ideas of the transformation, gives an overview of the specification and discusses several techniques used in the specification. The subsequent chapters present the specification of syntax of the language, basic operations, typechecking, simplification, and the actual transformation. In addition to the abstract syntax, a concrete syntax definition in SDF2 is given as an example of connection of a parser frontend to transformation systems built with Stratego

    Design of Dual Bandpass and Bandreject LC Ladder Filters

    Get PDF
    This paper deals with the design of two-passband bandpass and two-stopband bandreject LC ladder filters. The design method is based on the special dual frequency transformation that transforms normalized lowpass to either bandpass with two passbands or to bandreject with two stopbands that are specified by four cutoff frequencies. The paper shows analytical solution relating these four cutoff frequencies to parameters of dual frequency transformation. It enables a direct computation of dual band LC filter elements from a normalized lowpass filter by means of simple relations. These relations have been implemented in the mathematical program Maple (TM) as new user functions. They are supposed to be used as an enhancement of Syntfil package which is intended for analog filter design in program Maple. Specific application is shown on an example of the two-passband bandpass LC filter design
    corecore