388 research outputs found

    Views, Program Transformations, and the Evolutivity Problem in a Functional Language

    Get PDF
    We report on an experience to support multiple views of programs to solve the tyranny of the dominant decomposition in a functional setting. We consider two possible architectures in Haskell for the classical example of the expression problem. We show how the Haskell Refactorer can be used to transform one view into the other, and the other way back. That transformation is automated and we discuss how the Haskell Refactorer has been adapted to be able to support this automated transformation. Finally, we compare our implementation of views with some of the literature.Comment: 19 page

    Invertible Program Restructurings for Continuing Modular Maintenance

    Get PDF
    When one chooses a main axis of structural decompostion for a software, such as function- or data-oriented decompositions, the other axes become secondary, which can be harmful when one of these secondary axes becomes of main importance. This is called the tyranny of the dominant decomposition. In the context of modular extension, this problem is known as the Expression Problem and has found many solutions, but few solutions have been proposed in a larger context of modular maintenance. We solve the tyranny of the dominant decomposition in maintenance with invertible program transformations. We illustrate this on the typical Expression Problem example. We also report our experiments with Java and Haskell programs and discuss the open problems with our approach.Comment: 6 pages, Early Research Achievements Track; 16th European Conference on Software Maintenance and Reengineering (CSMR 2012), Szeged : Hungary (2012

    The next 700 Krivine Machines

    Get PDF
    International audienceThe Krivine machine is a simple and natural implementation of the normal weak-head reduction strategy for pure lambda-terms. While its original description has remained unpublished, this machine has served as a basis for many variants, extensions and theoretical studies. In this paper, we present the Krivine machine and some well-known variants in a common framework. Our framework consists of a hierarchy of intermediate languages that are subsets of the lambda-calculus. The whole implementation process (compiler + abstract machine) is described via a sequence of transformations all of which express an implementation choice. We characterize the essence of the Krivine machine and locate it in the design space of functional language implementations. We show that, even within the particular class of Krivine machines, hundreds of variants can be designed

    From Implicit to Explicit Pavings

    Get PDF
    A combinatorial search can either be performed by using an implicit search tree, where an initial state is recursively transformed until some goal state is reached, or by using an explicit search tree, where an initial tree structure containing the root state is iteratively expanded until the leaves match the set of goal states. This paper proposes an exploratory study aimed at showing that explicit search trees can play a distinguished role in the field of numerical constraints. The first advantage of an explicit search is expressiveness: we can write new algorithms or reformulate existing ones in a simple and unified way. The second advantage is efficiency, since an implicit search may also lead to a blowup of redundant computations. This is illustrated through various examples.Une recherche combinatoire peut être réalisée soit en utilisant un arbre de recherche implicite, où l'état initial est récursivement transformé jusqu'à atteindre un état but, soit en utilisant un arbre de recherche explicite, où la structure d'arbre initiale contenant l'état racine est itérativement étendue jusqu'aux feuilles qui satisfont l'ensemble des états buts. Ce rapport propose une étude exploratoire visant à montrer que les arbres de recherche explicites peuvent jouer un rôle notable dans le cas des contraintes numériques. Le premier avantage de la recherche explicite est son expressivité : on peut écrire de nouveaux algorithmes ou reformuler des algorithmes existants d'une manière simple et unifiée. Le second avantage est l'efficacité car une recherche explicite permet d'éviter, dans certains cas, une explosion de calculs redondants. Ceci est illustré à travers plusieurs exemple

    Controlling Contractors with Monads for Hybrid Dynamical Systems

    Get PDF
    Physical systems with intelligent behaviors result from inter-actions of different fields: sensor networks, robotics, optimization, reasoning, etc. Rooted in this philosophy of interdisciplinary, this paper makes a connexion between hybrid dynamical systems, interval-based constraint propagation and functional programming. It shows how to build a monadic program in Haskell to control contractors (constraint propagators) for the state estimation of multi-model (hy- brid) dynamical systems, subject to partial and uncertain measurements. The example of system taken here is an elevator that can either be moving upward, downward or stopped. The altitude is measured directly and the estimation problem is simply to track its motion. The purpose of the Haskell library is to offer both a high-level and flexible framework for building propagation strategies based on user knowledge or user requirements.L'élaboration de sytèmes autonomes est le résultat d'interactions entre différents domaines: réseau de capteurs, robotique, optimisation, raison- nement automatique, etc. Cet article, ancré dans cette philosophie pluridis- ciplinaire, montre une connexion entre les systèmes hybrides dynamiques, la propagation de contraintes sur intervalles et la programmation fonctionnelle. Plus précisément, il montre comment concevoir un programme monadique en Haskell pour contrôler les contracteurs (propagateurs de contraintes) permet- tant l'estimation d'état de systèmes dynamiques multi-modéles (hybrides), su- jets à des mesures partielles et incertaines. L'exemple de système pris ici est un ascenseur qui peut monter, descendre ou être stopé. L'altitude est mesurée directement et le problème d'estimation est simplement de suivre son mouve- ment. L'objectif de la bibliothéque Haskell est d'offrir un cadre à la fois flexible et de haut niveau pour construire des stratégies de propagation basées sur les connaissances ou les pré-requis de l'utilisateur

    Program Transformation based Views for Modular Maintenance

    Get PDF
    PosterNational audienceModular programming is a practical solution for separation of concerns but the support for modularity provided by programming languages does not resolve the classic expression problem and more generally the tyranny of the dominant decomposition: evolutions are modular only on the principal axis of decomposition. To solve this problem, a practical solution would be to be able to choose the architecture of an application each time one has to make it evolve. We provide a prototype tool for the Haskell language to support that. Our tool allows to build transformations to switch Haskell programs from one structure to another. We do this by driving a refactoring tool for Haskell (HaRe): transformations are built by chaining elementary operations of refactoring. Since each elementary refactoring operation preserve the semantics, the whole transformations also do

    Exploring Membranes for Controlling Aspects

    Get PDF
    In most aspect-oriented languages, aspects have an unrestricted global view of computation. Several approaches for aspect scoping and more strongly encapsulated modules have been formulated to restrict this controversial power of aspects. This paper proposes to leverage the concept of programmable membranes developed by Boudol, Schmitt and Stefani, as a means to tame aspects by customizing the semantics of aspect weaving locally. Membranes subsume previous proposals in a uniform framework. Because membranes give structure to computation, they enable flexible scoping of aspects; because they are programmable, they make it possible to define visibility and safety constraints, both for the advised program and for the aspects. We first de- scribe membranes for AOP without committing to any specific language design. In addition, we then illustrate an extension of AspectScheme with membranes, and explore the instantiation of programmable membranes in the Kell calculus. The power and simplicity of membranes open interesting perspectives to unify multiple approaches that tackle the unrestricted power of aspect-oriented programming

    Taming Aspects with Membranes

    Get PDF
    International audienceIn most aspect-oriented languages, aspects have an unrestricted global view of computation. Several approaches for aspect scoping and more strongly encapsulated modules have been formulated to restrict this controversial power of aspects. This paper leverages the concept of programmable membranes of Boudol, Schmitt and Stefani, as a means to tame aspects by customizing the semantics of aspect weaving locally. Membranes have the potential to subsume previous proposals in a uniform framework. Because membranes give structure to computation, they enable flexible scoping of aspects; because they are programmable, they enable visibility and safety constraints, both for the advised program and for the aspects. The power and simplicity of membranes open interesting perspectives to unify multiple approaches that tackle the unrestricted power of aspects

    Lazy Composition of Representations in Java

    Get PDF
    International audienceAbstract. The separation of concerns has been a core idiom of software engineering for decades. In general, software can be decomposed properly only according to a single concern, other concerns crosscut the prevailing one. This problem is well known as “the tyranny of the dominant decomposition”. Similarly, at the programming level, the choice of a representation drives the implementation of the algorithms. This article explores an alternative approach with no dominant representation. Instead, each algorithm is developed in its “natural” representation and a representation is converted into another one only when it is required. To support this approach, we designed a laziness framework for Java, that performs partial conversions and dynamic optimizations while preserving the execution soundness. Performance evaluations over graph theory examples demonstrates this approach provides a practicable alternative to a naive one

    Detection and resolution of aspect interactions

    Get PDF
    Aspect-Oriented Programming (AOP) promises separation of concerns at the implementation level. However, aspects are not always orthogonal and aspect interaction is an important problem. Currently there is almost no support for the detection and resolution of such interactions. The programmer is responsible for identifying interactions between conflicting aspects and implementing conflict resolution code. In this paper, we propose a solution to this problem based on a generic framework for AOP. The contributions are threefold: we present a formal and expressive crosscut language, two static conflict analyses and some linguistic support for conflict resolution
    corecore