3 research outputs found

    Optimising First-Class Pattern Match Compilation

    No full text
    Pattern matching is the act of checking if a value is in the set of values described by a pattern. Many programming languages provide constructs to pattern match on program values. Pattern matching constructs appear in different variants. Stratego, a term rewriting language, features first-class pattern matching, which attempts to match a pattern with a value. If the match is successful, variables in the pattern are bound. If the pattern does not match, the matching expression fails. Using choice and sequence operators, one can build expressions that attempt to match multiple patterns until a match succeeds, evaluating the expression that corresponds to that pattern. This is a common way of branching in Stratego programs. The Stratego compiler handles each match attempt independently, disregarding the context.In this thesis, we research context-aware compilation of first-class matches, aiming to speed up pattern matching operations without requiring changes to programs. We research the resemblance of Stratego pattern matching with match cases, a pattern matching construct that is ubiquitous in functional-style languages. Previous research shows that match cases can be compiled efficiently by considering all cases together, instead of a single alternative at the time, during compilation. We develop behaviour-preserving translations from first-class matches to match cases and from match cases to decision tree automata. We efficiently represent these automata in Java, the target language of the Stratego compiler. All these changes integrate in the latest upstream version of the Stratego compiler.We evaluate the performance of our altered compiler and observe an average speed-up of 4x on programs that rely heavily on pattern matching, at the cost of a 20% increase in compilation time and space.Computer Scienc

    Optimising First-Class Pattern Matching

    No full text
    Pattern matching is a high-level notation for programs to analyse the shape of data, and can be optimised to efficient low-level instructions. The Stratego language uses first-class pattern matching, a powerful form of pattern matching that traditional optimisation techniques do not apply to directly.In this paper, we investigate how to optimise programs that use first-class pattern matching. Concretely, we show how to map first-class pattern matching to a form close to traditional pattern matching, on which standard optimisations can be applied.Through benchmarks, we demonstrate the positive effect of these optimisations on the run-time performance of Stratego programs. We conclude that the expressive power of first-class pattern matching does not hamper the optimisation potential of a language that features it.Programming Language

    Project Delphi: What is Innovation?

    No full text
    Being a company with over 1500 employees, a lot of data is available about people and their day-to-day pursuits, including projects they are working on. Company X has requested to gain more insight into this data, as it is currently scattered over multiple systems. Specifically, they requested to gain insight into which projects have been started around a certain topic, who is involved in these projects, what the status on these projects is and where these projects are carried out inside the company. Company X wants this data represented in a dynamic, scalable and interactive visualisation. To create a product that fulfils the expectations and needs of Company X, a Proof of Concept (PoC) was created. This basic version was used to make sure that Company X and the development team had the same basic idea of the application to be created and was then extended to an Minimal Viable Product (MVP). Having completed this MVP, additional features were implemented. Such features include making the solution generic for different data sources, the ability to filter and search through the data and highlighting/focusing specific data types. In order to ensure that the visualisation can be used instinctively and deliver the information it is meant to, a user study was set up. In this user study, multiple employees of Company X tested the visualisation by completing a set of tasks within the application. By tracking the different results (i.e. number of clicks, time, subjective opinions), the team was able to derive that the application is quite promising, but still had the need for some improvements to explore its full potential.Bachelor ProjectComputer Scienc
    corecore