Sjaak Smetsers
Radboud University Nijmegen
Network
Latest external collaboration on country level. Dive into details by clicking on the dots.
Publication
Featured researches published by Sjaak Smetsers.
foundations of software technology and theoretical computer science | 1993
Erik Barendsen; Sjaak Smetsers
In this paper we describe a Curry-like type system for graphs and extend it with uniqueness information to indicate that certain objects are only ‘locally accessible’. The correctness of type assignment guarantees that no external access on such an object will take place in the future. We prove that types are preserved under reduction (for both type systems) for a large class of rewrite systems. Adding uniqueness information provides a solution to two problems in implementations of functional languages: efficient space behaviour and interfacing with non-functional operations.
international conference on functional programming | 1991
Sjaak Smetsers; Eric Nöcker; John H. G. van Groningen; Rinus Plasmeijer
In this paper we will discuss how a good code generator can be built for (lazy) functional languages. Starting from Concurrent Clean, an experimental lazy functional programming language, code is generated for an intermediate abstract machine: the ABC machine. In this first pass many well-known optimisation techniques are included. However, we will also present some new ideas in this area, like the way in which strictness can be incorporated, and the implementation of higher order functions. In a second pass, the ABC code is translated to concrete target code for the Motorola MC680x0 processor. Again many optimisation methods appear to be applicable. Some of them (for example register allocation algorithms) are common for the implementation of other types of languages, but have to be adapted because of the specific properties of both source language and target machine. Other optimisations are specific for lazy functional languages, e.g. the implementation of higher order functions, efficient memory management and the optimised graph reduction. Measurements demonstrate that due to the optimisations of both passes very fast code can be generated. We have compared Concurrent Clean with two other functional languages, namely Lml and Hope, and also with the imperative language C. With respect to both functional languages this comparison clearly goes in favour of Concurrent Clean. Furthermore, we can conclude that, when using the presented compilation techniques, a lazy functional language is able to compete even with an imperative language such as C.
symposium/workshop on haskell | 2005
Artem Alimarine; Sjaak Smetsers; Arjen van Weelden; Marko C. J. D. van Eekelen; Rinus Plasmeijer
Invertible programming occurs in the area of data conversion where it is required that the conversion in one direction is the inverse of the other. For that purpose, we introduce bidirectional arrows (bi-arrows). The bi-arrow class is an extension of Haskells arrow class with an extra combinator that changes the direction of computation.The advantage of the use of bi-arrows for invertible programming is the preservation of invertibility properties using the bi-arrow combinators. Programming with bi-arrows in a polytypic or generic way exploits this the most. Besides bidirectional polytypic examples, including invertible serialization, we give the definition of a monadic bi-arrow transformer, which we use to construct a bidirectional parser/pretty printer.
mathematics of program construction | 2004
Artem Alimarine; Sjaak Smetsers
Generic functions are defined by induction on the structural representation of types. As a consequence, by defining just a single generic operation, one acquires this operation over any particular type. An instance on a specific type is generated by interpretation of the type’s structure. A direct translation leads to extremely inefficient code that involves many conversions between types and their structural representations. In this paper we present an optimization technique based on compile-time symbolic evaluation. We prove that the optimization removes the overhead of the generated code for a considerable class of generic functions. The proof uses typing to identify intermediate data structures that should be eliminated. In essence, the output after optimization is similar to hand-written code.
international symposium on programming language implementation and logic programming | 1995
Erik Barendsen; Sjaak Smetsers
We extend the Uniqueness Type System with uniqueness polymorphism. Using a notion of ‘principal uniqueness variants’ the type system is shown to be effective in the sense that a uniqueness variant of a given conventional type can be determined automatically. The presented algorithm serves as a basis for type checking in the language Clean. We illustrate the system by some concrete examples.
practical aspects of declarative languages | 2005
Artem Alimarine; Sjaak Smetsers
Generic programming is accepted by the functional programming community as a valuable tool for program development. Several functional languages have adopted the generic scheme of type-indexed values. This scheme works by specialization of a generic function to a concrete type. However, the generated code is extremely inefficient compared to its hand-written counterpart. The performance penalty is so big that the practical usefulness of generic programming is compromised. In this paper we present an optimization algorithm that is able to completely eliminate the overhead introduced by the specialization scheme for a large class of generic functions. The presented technique is based on consumer–producer elimination as exploited by fusion, a standard general purpose optimization method. We show that our algorithm is able to optimize many practical examples of generic functions.
international conference on progress in cryptology | 2014
Daniel J. Bernstein; Bernard van Gastel; Wesley Janssen; Tanja Lange; Peter Schwabe; Sjaak Smetsers
This paper introduces TweetNaCl, a compact reimplementation of the NaCl library, including all 25 of the NaCl functions used by applications. TweetNaCl is published on Twitter and fits into just 100 tweets; the tweets are available from anywhere, any time, in an unsuspicious way. Distribution via other social media, or even printed on a sheet of A4 paper, is also easily possible.
verified software theories tools experiments | 2007
Bart Jacobs; Sjaak Smetsers; Ronny Wichers Schreur
This paper is both a position paper on a particular approach in program correctness, and also a contribution to this area. The approach entails the generation of programs (code) from the executable content of logical theories. This capability already exists within the main theorem provers like Coq, Isabelle and ACL2 and PVS. Here we will focus on issues portraying the use of this methodology, rather than the underlying theory. We illustrate the power of the approach within PVS via two case studies (on unification and compression) that lead to actual running code. We also demonstrate its flexibility by extending the program generation capabilities. This paper fits in a line of ongoing integration of programming and proving.
implementation and application of functional languages | 2002
Diederik van Arkel; John H. G. van Groningen; Sjaak Smetsers
Deforestation was introduced to eliminate intermediate data structures used to connect separate parts of a functional program together. Fusion is a more sophisticated technique, based on a producer-consumer model, to eliminate intermediate data structures. It achieves better results. In this paper we extend this fusion algorithm by refining this model, and by adding new transformation rules. The extended fusion algorithm is able to deal with standard deforestation, but also with higher-order function removal and dictionary elimination. We have implemented this extended algorithm in the Clean 2.0 compiler.
computer science logic | 1996
Marko C. J. D. van Eekelen; Sjaak Smetsers; M.J. Plasmeijer
The lambda calculus forms without any question *the* theoretical backbone of functional programming languages. For the design and implementation of the lazy functional language Concurrent Clean we have used a related computational model: Term Graph Rewriting Systems (TGRSs). This paper wraps up our main conclusions after 10 years of experience with graph rewriting semantics for functional programming languages. TGRSs are not a direct extension of the lambda calculus, so one sometimes has to re-establish known theoretical results. But TGRSs are that much closer to the world of functional programming that its use has been proven to be very worthwhile. In TGRSs functions have names, there are constants, pattern matching and one can choose to either share expressions or copy them.