Jeroen Bransen
Utrecht University
Network
Latest external collaboration on country level. Dive into details by clicking on the dots.
Publication
Featured researches published by Jeroen Bransen.
partial evaluation and semantic-based program manipulation | 2014
Jeroen Bransen; Atze Dijkstra; S. Doaitse Swierstra
Many computer programs work with data that changes over time. Computations done over such data usually are repeated completely after a change in the data. For complex computations such repetitive recomputation can become too inefficient. When these recomputations take place on data which has only changed slightly, it often is possible to reformulate the computation to an incremental version which reuses the result of the computation on previous data. Such a situation typically occurs in compilers and editors for structured data (like a program) where program analyses and transformations (for example error checking) are done while editing. Although rewriting to incremental versions thus offers a solution to this problem, a manual rewrite of an already complex computation to its incremental counterpart is tedious, error prone, and inhibits further development of the original computation. We therefore intend to generate such incremental counterparts (semi)automatically by focusing on computations expressed using Attribute Grammars (AGs). In this paper we do groundwork for this goal and develop machinery for incremental attribute grammar evaluation based on change propagation and pure functions. We use pretty printing with free variable annotation to explain our techniques. Furthermore, our techniques also expose rules of conduct for a programmer desiring incrementality: the automatic translation of code to an incremental version does not always directly result in efficiency improvements because code often is written in a style unsuitable for automatic incrementalization. We show some common cases in which (small) code changes facilitating incrementality are required. We evaluate the effectiveness of the overall approach using a simple benchmark for the example, and a more extensive benchmark based on constraint-based type inference implemented with AGs.
practical aspects of declarative languages | 2012
Jeroen Bransen; Arie Middelkoop; Atze Dijkstra; S. Doaitse Swierstra
Attribute Grammars (AGs) are a powerful tool for defining an executable semantics of a programming language, and thus for implementing a compiler. An execution plan for an AG determines a static evaluation order for the attributes which are defined as part of an AG specification. In building the Utrecht Haskell Compiler (UHC), a large scale AG project, we discovered that the Ordered AG approach (Kastens, 1980) for building such plans becomes impractical: the additional dependencies between attributes introduced by this algorithm too often result in grammars for which no execution plan can be generated. To avoid such problems we have implemented a refined version of the algorithm of Kennedy and Warren (1976) as part of our purely functional AG system and show how this algorithm solves the problems that surface with the Ordered AG approach. Furthermore, we present the results of applying this algorithm to the UHC code and show that this approach in some cases also has a positive effect on the runtime of the resulting program.
partial evaluation and semantic-based program manipulation | 2015
Jeroen Bransen; Atze Dijkstra; S. Doaitse Swierstra
Compilers, amongst other programs, often work with data that (slowly) changes over time. When the changes between subsequent runs of the compiler are small, one would hope the compiler to incrementally update its results, resulting in much lower running times. However, the manual construction of an incremental compiler is very hard and error prone and therefore usually not an option. Attribute grammars provide an attractive way of constructing compilers, as they are compositional in nature and allow for aspect oriented programming. In this work we extend previous work on the automatic generation of incremental attribute grammar evaluators, with the purpose of (semi-)automatically generating an incremental compiler from the regular attribute grammar definition, by adding support for incremental evaluation of higher order attributes, a well known extension to the classical attribute grammars that is used in many ways in compiler construction, for example to model different compiler phases.
arXiv: Computation and Language | 2010
Jeroen Bransen
The Lambek-Grishin calculus LG is the symmetric extension of the non-associative Lambek calculus NL. In this paper we prove that the derivability problem for LG is NP-complete.
Science of Computer Programming | 2017
Jeroen Bransen; Atze Dijkstra; S. Doaitse Swierstra
Abstract Compilers, amongst other programs, often work with data that (slowly) changes over time. When the changes between subsequent runs of the compiler are small, one would hope the compiler to incrementally update its results, resulting in much lower rebuilding times. However, the manual construction of an incremental compiler is very hard and error prone and therefore usually not an option. Attribute grammars provide an attractive way of constructing compilers, as they are compositional in nature and allow for aspect oriented programming. In this paper we describe work on the automatic generation of incremental attribute grammar evaluators, with the purpose of (semi-)automatically generating an incremental compiler from a regular attribute grammar definition. The paper includes an informal introduction into attribute grammars, describes how to implement incremental evaluation for a simple example without higher-order attributes as well as for a larger example with higher-order attributes. Higher-order attributes are a well known extension to classical attribute grammars which for example is used to model different compiler phases or iterative transformations of an abstract syntax tree. Incrementality for attribute evaluation is achieved by maintaining additional bookkeeping about which attribute values have changed. We show benchmarks for the implementation technique dealing with higher-order attributes. The benchmarks indicate that the bookkeeping overhead in our prototype implementation comes with a serious hit on performance, further investigation into the reasons and possible remedies for this falls outside the scope of this paper.
tools and algorithms for construction and analysis of systems | 2015
Jeroen Bransen; L. Thomas van Binsbergen; Koen Claessen; Atze Dijkstra
Many computations over trees can be specified using attribute grammars. Compilers for attribute grammars need to find an evaluation order or schedule in order to generate efficient code. For the class of linearly ordered attribute grammars such a schedule can be found statically, but this problem is known to be NP-hard. In this paper, we show how to encode linearly ordered attribute grammar scheduling as a SAT-problem. For such grammars it is necessary to ensure that the dependency graph is cycle free, which we approach in a novel way by transforming the dependency graph to a chordal graph allowing the cycle freeness to be efficiently expressed and computed using SAT solvers. There are two main advantages to using a SAT-solver for scheduling: 1 the scheduling algorithm runs faster than existing scheduling algorithms on real-world examples, and 2 by adding extra constraints we obtain fine-grained control over the resulting schedule, thereby enabling new scheduling optimisations.
implementation and application of functional languages | 2012
Nicolas Wu; José Pedro Magalhães; Jeroen Bransen; Wouter Swierstra
This paper discusses our entry to the 2012 ICFP Programming Contest, written entirely in Haskell. Our solution uses many features of Haskell: pure immutable data structures, laziness, higher-order functions, concurrency, and exception handling. Each of these features plays an essential part in our overall solution, and we demonstrate how these key elements can be composed together. In this exposition, we stress the importance of how the code was structured in such a way that made safely refactoring and extending the model a relatively easy task, and how Haskell’s strong type system made it possible for our team to remain agile under changing specifications.
logical aspects of computational linguistics | 2011
Jeroen Bransen
The Lambek-Grishin calculus LG is the symmetric extension of the non-associative Lambek calculus NL. In this paper we prove that the derivability problem for the product-free fragment of LG is NPcomplete, thus improving on Bransen (2010) where this is shown for LG with product.
partial evaluation and semantic-based program manipulation | 2015
L. Thomas van Binsbergen; Jeroen Bransen; Atze Dijkstra
workshop on generic programming | 2013
Jeroen Bransen; José Pedro Magalhães