131 research outputs found

    Tools and libraries to model and manipulate circular programs

    Get PDF
    This paper presents techniques to model circular lazy programs in a strict, purely functional setting. Circular lazy programs model any algorithm based on multiple traversals over a recursive data structure as a single traversal function. Such elegant and concise circular programs are defined in a (strict or lazy) functional language and they are transformed into efficient strict and deforested, multiple traversal programs by using attribute grammars-based techniques. Moreover, we use standard slicing techniques to slice such circular lazy programs. We have expressed these transformations as an Haskell library and two tools have been constructed: the HaCirctool that refactors Haskell lazy circular programs into strict ones, and the OCirctool that extends Ocaml with circular definitions allowing programmers to write circular programs in Ocaml notation, which are transformed into strict Ocaml programs before they are executed. The first benchmarks of the different implementations are presented and show that for algorithms relying on a large number of traversals the resulting strict, deforested programs are more efficient than the lazy ones, both in terms of runtime and memory consumption.(undefined

    Shortcut fusion rules for the derivation of circular and higher-order monadic programs

    Get PDF
    Functional programs often combine separate parts using intermediate data structures for communicating results. Programs so defined are modular, easier to understand and maintain, but suffer from inefficiencies due to the generation of those gluing data structures. To eliminate such redundant data structures, some program transformation techniques have been proposed. One such technique is shortcut fusion, and has been studied in the context of both pure and monadic functional programs. In this paper, we study several shortcut fusion extensions, so that, alternatively, circular or higher-order programs are derived. These extensions are also provided for effect-free programs and monadic ones. Our work results in a set of generic calculation rules, that are widely applicable, and whose correctness is formally established.(undefined

    Multiple intermediate structure deforestation by shortcut fusion

    Get PDF
    Lecture Notes in Computer Science Volume 8129, 2013.Shortcut fusion is a well-known optimization technique for functional programs. Its aim is to transform multi-pass algorithms into single pass ones, achieving deforestation of the intermediate structures that multi-pass algorithms need to construct. Shortcut fusion has already been extended in several ways. It can be applied to monadic programs, maintaining the global effects, and also to obtain circular and higher-order programs. The techniques proposed so far, however, only consider programs defined as the composition of a single producer with a single consumer. In this paper, we analyse shortcut fusion laws to deal with programs consisting of an arbitrary number of function compositions.FCT -FundaĆ§Ć£o para a CiĆŖncia e a Tecnologia(FCOMP-01-0124-FEDER-022701

    A shortcut fusion rule for circular program calculation

    Get PDF
    Circular programs are a powerful technique to express multiple traversal algorithms as a single traversal function in a lazy setting. In this paper, we present a shortcut deforestation technique to calculate circular programs. The technique we propose takes as input the composition of two functions, such that the first builds an intermediate structure and some additional context information which are then processed by the second one, to produce the final result. Our transformation into circular programs achieves intermediate structure deforestation and multiple traversal elimination. Furthermore, the calculated programs preserve the termination properties of the original ones

    Energy efficient software in an engineering course

    Get PDF
    Sustainable development has become an increasingly important theme not only in the world politics, but also an increasingly central theme for the engineering professions around the world. Software engineers are no exception as shown in various recent research studies. Despite the intensive research on green software, todayā€™s undergraduate computing education often fails to address our environmental responsibility. We present a module on energy efficient software that we introduced as part of an advanced course on software analysis and testing. In this module we study techniques and tools to analyze and optimize energy consumption of software systems. Preliminary results of the first four instances of this course show that students are able to optimize the energy consumption of software systems.ERDF European Regional Development Fund through the Operational Programme for Competitiveness and Internationalisation - COMPETE 2020 Programme within project POCI-01-0145-FEDER006961, and by National Funds through the Portuguese funding agency, FCT - FundaĆ§Ć£o para a CiĆŖncia e a Tecnologia within project POCI-01-0145-FEDER016718 and UID/EEA/50014/2013

    Models for the reverse engineering of Java/Swing applications

    Get PDF
    Interest in design and development of graphical user interface (GUIs) is growing in the last few years. However, correctness of GUI's code is essential to the correct execution of the overall software. Models can help in the evaluation of interactive applications by allowing designers to concentrate on its more important aspects. This paper describes our approach to reverse engineering abstract GUI models-based directly from the Java/Swing legacy code.FundaĆ§Ć£o para a CiĆŖncia e a Tecnologia(FCT) Fundo Europeu de Desenvolvimento Regional (FEDER

    Combining formal methods and functional strategies regarding the reverse engineering of interactive applications

    Get PDF
    Graphical user interfaces (GUIs) make software easy to use by providing the user with visual controls. Therefore, correctness of GUIā€™s code is essential to the correct execution of the overall software. Models can help in the evaluation of interactive applications by allowing designers to concentrate on its more important aspects. This paper describes our approach to reverse engineer an abstract model of a user interface directly from the GUIā€™s legacy code. We also present results from a case study. These results are encouraging and give evidence that the goal of reverse engineering user interfaces can be met with more work on this technique.FundaĆ§Ć£o para a CiĆŖncia e a Tecnologia (FCT) Fundo Europeu de Desenvolvimento Regional (FEDER

    GUI inspection from source code analysis

    Get PDF
    Graphical user interfaces (GUIs) are critical components of todays software. Given their increased relevance, correctness and usability of GUIs are becoming essential. This paper describes the latest results in the development of our tool to reverse engineer the GUI layer of interactive computing systems. We use static analysis techniques to generate models of the user interface behaviour from source code. Models help in graphical user interface inspection by allowing designers to concentrate on its more important aspects. One particularly type of model that the tool is able to generate is state machines. The paper shows how graph theory can be useful when applied to these models. A number of metrics and algorithms are used in the analysis of aspects of the user interface's quality. The ultimate goal of the tool is to enable analysis of interactive system through GUIs source code inspection.FundaĆ§Ć£o para a CiĆŖncia e a Tecnologia(PTDC/EIA-CCO/108995/2008

    Engenharia reversa de sistemas interactivos desenvolvidos em Java2/Swing

    Get PDF
    A manutenĆ§Ć£o e evoluĆ§Ć£o de sistemas interactivos dĆ” origem a problemas importantes que afectam a sua eficiĆŖncia e eficĆ”cia. Neste trabalho pretende-se combinar programaĆ§Ć£o funcional, programaĆ§Ć£o estratĆ©gica, code slicing e modelos com semĆ¢ntica formal na tentativa de fortalecer a tese de que a aplicaĆ§Ć£o destas metodologias e tecnologias, em conjunĆ§Ć£o com um processo de engenharia reversa de cĆ³digo fonte, permite melhorar significativamente o suporte Ć  manutenĆ§Ć£o de sistemas interactivos.FundaĆ§Ć£o para a CiĆŖncia e a Tecnologia (FCT).Fundo Europeu de Desenvolvimento Regional (FEDER) - POSC/EIA/56646/2004

    Automatically inferring ClassSheet models from spreadsheets

    Get PDF
    Many errors in spreadsheet formulas can be avoided if spreadsheets are built automatically from higher-level models that can encode and enforce consistency constraints. However, designing such models is time consuming and requires expertise beyond the knowledge to work with spreadsheets. Legacy spreadsheets pose a particular challenge to the approach of controlling spreadsheet evolution through higher-level models, because the need for a model might be overshadowed by two problems: (A) The benefit of creating a spreadsheet is lacking since the legacy spreadsheet already exists, and (B) existing data must be transferred into the new model-generated spreadsheet.To address these problems and to support the modeldriven spreadsheet engineering approach, we have developed a tool that can automatically infer ClassSheet models from spreadsheets. To this end, we have adapted a method to infer entity/relationship models from relational database to the spreadsheets/ClassSheets realm. We have implemented our techniques in the HAEXCEL framework and integrated it with the ViTSL/Gencel spreadsheet generator, which allows the automatic generation of refactored spreadsheets from the inferred ClassSheet model. The resulting spreadsheet guides further changes and provably safeguards the spreadsheet against a large class of formula errors. The developed tool is a significant contribution to spreadsheet (reverse) engineering, because it fills an important gap and allows a promising design method (ClassSheets) to be applied to a huge collection of legacy spreadsheets with minimal effort.(undefined
    • ā€¦
    corecore