49 research outputs found

    Bidirectional Programming and its Applications

    Get PDF
    Many problems in programming involve pairs of computations that cancel out each other’s effects; some examples include parsing/printing, embed- ding/projection, marshalling/unmarshalling, compressing/de-compressing etc. To avoid duplication of effort, the paradigm of bidirectional programming aims at to allow the programmer to write a single program that expresses both computations. Despite being a promising idea, existing studies mainly focus on the view-update problem in databases and its variants; and the impact of bidirectional programming has not reached the wider community. The goal of this thesis is to demonstrate, through concrete language designs and case studies, the relevance of bidirectional programming, in areas of computer science that have not been previously explored. In this thesis, we will argue for the importance of bidirectional programming in programming language design and compiler implementation. As evidence for this, we will propose a technique for incremental refactoring, which relies for its correctness on a bidirectional language and its properties, and devise a framework for implementing program transformations, with bidirectional properties that allow program analyses to be carried out in the transformed program, and have the results reported in the source program. Our applications of bidirectional programming to new areas bring up fresh challenges. This thesis also reflects on the challenges, and studies their impact to the design of bidirectional systems. We will review various design goals, including expressiveness, robustness, updatability, efficiency and easy of use, and show how certain choices, especially regarding updatability, can have significant influence on the effectiveness of bidirectional systems

    Bidirectional spreadsheet formulas

    Get PDF
    Bidirectional transformations have potential applications in a vast number of computer science domains. Spreadsheets, on the other hand, are widely used for developing business applications, but their formulas are unidirectional, in the sense that their result can not be edited and propagated back to their input cells. In this paper, we interpret such formulas as a well-known class of bidirectional transformations that go by the name of lenses. Being aimed at users that are not proficient with programming languages, we devote particular attention to the seamless embedding of the proposed bidirectional mechanism with the typical workflow of spreadsheet environments, allowing users to have a fine control and understanding of the behavior of the derived backward transformations

    BiYacc: Roll your parser and reflective printer into one

    Get PDF
    In: A. Cunha, E. Kindler (eds.): Proceedings of the Fourth International Workshop on Bidirectional Transformations (Bx 2015), L’Aquila, Italy, July 24, 2015, published at http://ceur-ws.orgLanguage designers usually need to implement parsers and printers. Despite being two related programs, in practice they are designed and implemented separately. This approach has an obvious disadvantage: as a language evolves, both its parser and printer need to be separately revised and kept synchronised. Such tasks are routine but complicated and error-prone. To facilitate these tasks, we propose a language called BiYacc, whose programs denote both a parser and a printer. In essence, BiYacc is a domain-specific language for writing putback-based bidirectional transformations — the printer is a putback transformation, and the parser is the corresponding get transformation. The pairs of parsers and printers generated by BiYacc are thus always guaranteed to satisfy the usual round-trip properties. The highlight that distinguishes this reflective printer from others is that the printer — being a putback transformation — accepts not only an abstract syntax tree but also a string, and produces an updated string consistent with the given abstract syntax tree. We can thus make use of the additional input string, with mechanisms such as simultaneous pattern matching on the view and the source, to provide users with full control over the printing-strategies.JSPS -Japan Society for the Promotion of Science(25240009

    Bidirectional finite state machine based testing

    Get PDF
    Dissertação de mestrado em Computer ScienceThis thesis aims to develop a new methodology that combines model-based testing and bidirectional transformations. More precisely, the method of software testing used is blackbox testing, where the system under test is a black-box. Without knowledge of the blackbox’s internal structures or implementation, the focus is on the inputs and outputs. To infer a model for this black-box, machine learning algorithms are used by submitting test cases against the black-box and observing the correspondent output. The resulting model is a finite state machine that produces the same outputs of the black-box when submitted the same inputs used in its making. Usually, in this approach, new test cases are provided to infer better models. In this thesis, bidirectional techniques will be studied in order to guarantee the conformity between both the model and the instance evolution. This way, it is allowed not only the evolution of the test cases and co-evolution of the model, but also the evolution of the model and the co-evolution of the test cases.Esta tese visa desenvolver uma nova metodologia que combina Model-Based Testing (MBT) e Bidirectional Transformations (Bx). Mais precisamente, o método de teste de software usado é Black-Box Testing (BBT), onde o System Under Test (SUT) é uma black-box. Sem o conhecimento das estruturas internas da black-box ou da sua implementação, o foco está nos inputs e outputs. Para inferir um modelo para esta black-box, são usados algoritmos de aprendizagem através de interrogações à black-box (i.e., casos de teste) e da observação do output correspondente. O modelo resultante é uma Finite State Machine (FSM), que produz os mesmos outputs da black-box, quando lhe são submetidos os mesmos inputs usados na sua criação. Geralmente, nesta abordagem, novos casos de teste são fornecidos para inferir melhores modelos. Nesta tese, serão estudadas técnicas bidireccionais com o objetivo de garantir a conformidade entre as evoluções do modelo e dos casos de teste. Desta forma, é permitida não só a evolução dos casos de teste e co-evolução do modelo, mas também a evolução do modelo e a co-evolução dos casos de teste
    corecore