Network


Latest external collaboration on country level. Dive into details by clicking on the dots.

Hotspot


Dive into the research topics where Josef Svenningsson is active.

Publication


Featured researches published by Josef Svenningsson.


international conference on functional programming | 2002

Shortcut fusion for accumulating parameters & zip-like functions

Josef Svenningsson

We present an alternative approach to shortcut fusion based on the function unfoldr,. Despite its simplicity the technique can remove intermediate lists in examples which are known to be difficult. We show that it can remove all lists from definitions involving zip-like functions and functions using accumulating parameters.


formal methods | 2010

Feldspar: A domain specific language for digital signal processing algorithms

Emil Axelsson; Koen Claessen; Gergely Dévai; Zoltán Horváth; Karin Keijzer; Bo Lyckegård; Anders Persson; Mary Sheeran; Josef Svenningsson; András Vajdax

A new language, Feldspar, is presented, enabling high-level and platform-independent description of digital signal processing (DSP) algorithms. Feldspar is a pure functional language embedded in Haskell. It offers a high-level dataflow style of programming, as well as a more mathematical style based on vector indices. The key to generating efficient code from such descriptions is a high-level optimization technique called vector fusion. Feldspar is based on a low-level, functional core language which has a relatively small semantic gap to machine-oriented languages like C. The core language serves as the interface to the back-end code generator, which produces C. For very small examples, the generated code performs comparably to hand-written C code when run on a DSP target. While initial results are promising, to achieve good performance on larger examples, issues related to memory access patterns and array copying will have to be addressed.


implementation and application of functional languages | 2010

The design and implementation of feldspar an embedded language for digital signal processing

Emil Axelsson; Koen Claessen; Mary Sheeran; Josef Svenningsson; David Engdal; Anders Persson

Feldspar is a domain specific language, embedded in Haskell, for programming digital signal processing algorithms. The final aim of a Feldspar program is to generate low level code with good performance. Still, we chose to provide the user with a purely functional DSL. The language is implemented as a minimal, deeply embedded core language, with shallow extensions built upon it. This paper presents full details of the essential parts of the implementation. Our initial conclusion is that this approach works well in our domain, although much work remains.


trends in functional programming | 2012

Combining Deep and Shallow Embedding for EDSL

Josef Svenningsson; Emil Axelsson

When compiling embedded languages it is natural to use an abstract syntax tree to represent programs. This is known as a deep embedding and it is a rather cumbersome technique compared to other forms of embedding, typically leading to more code and being harder to extend. In shallow embeddings, language constructs are mapped directly to their semantics which yields more flexible and succinct implementations. But shallow embeddings are not well-suited for compiling embedded languages. We present a technique to combine deep and shallow embedding in the context of compiling embedded languages in order to provide the benefits of both techniques. In particular it helps keeping the deep embedding small and it makes extending the embedded language much easier. Our technique also has some unexpected but welcome knock-on effects. It provides fusion of functions to remove intermediate results for free without any additional effort. It also helps to give the embedded language a more natural programming interface.


implementation and application of functional languages | 2011

Generic monadic constructs for embedded languages

Anders Persson; Emil Axelsson; Josef Svenningsson

We present a library of generic monadic constructs for embedded languages. It is an extension of Syntactic, a Haskell library for defining and processing generic abstract syntax. Until now, Syntactic has been mostly suited to implement languages based on pure, side effect free, expressions. The presented extension allows the pure expressions to also contain controlled side effects, enabling the representation of expressions that rely on destructive updates for efficiency. We demonstrate the usefulness of the extension by giving examples from the embedded language Feldspar which is implemented using Syntactic.


implementation and application of functional languages | 2000

A Usage Analysis with Bounded Usage Polymorphism and Subtyping

Jörgen Gustavsson; Josef Svenningsson

Usage analysis aims to predict the number of times a heap allocated closure is used. Previously proposed usage analyses have proved not to scale up well to large programs. In this paper we present a powerful and accurate type based analysis designed to scale up for large programs. The key features of the type system are usage subtyping and bounded usage polymorphism. Bounded polymorphism can lead to huge constraint sets so to express constraints compactly we introduce a new expressive form of constraints which allows constraints to be represented compactly through calls to constraint abstractions.


international conference on functional programming | 2004

Regular expression patterns

Niklas Broberg; Andreas Farre; Josef Svenningsson

We extend Haskell with regular expression patterns. Regular expression patterns provide means for matching and extracting data which goes well beyond ordinary pattern matching as found in Haskell. It has proven useful for string manipulation and for processing structured data such as XML. Regular expression patterns can be used with arbitrary lists, and work seamlessly together with ordinary pattern matching in Haskell. Our extension is lightweight, it is little more than syntactic sugar. We present a semantics and a type system, and show how to implement it as a preprocessor to Haskell.


international conference on functional programming | 2013

Simple and compositional reification of monadic embedded languages

Josef Svenningsson; Bo Joel Svensson

When writing embedded domain specific languages in Haskell, it is often convenient to be able to make an instance of the Monad class to take advantage of the do-notation and the extensive monad libraries. Commonly it is desirable to compile such languages rather than just interpret them. This introduces the problem of monad reification, i.e. observing the structure of the monadic computation. We present a solution to the monad reification problem and illustrate it with a small robot control language. Monad reification is not new but the novelty of our approach is in its directness, simplicity and compositionality.


partial evaluation and semantic-based program manipulation | 2016

Everything old is new again: quoted domain-specific languages

Shayan Najd; Sam Lindley; Josef Svenningsson; Philip Wadler

We describe a new approach to implementing Domain-Specific Languages(DSLs), called Quoted DSLs (QDSLs), that is inspired by two old ideas:quasi-quotation, from McCarthys Lisp of 1960, and the subformula principle of normal proofs, from Gentzens natural deduction of 1935. QDSLs reuse facilities provided for the host language, since host and quoted terms share the same syntax, type system, and normalisation rules. QDSL terms are normalised to a canonical form, inspired by the subformula principle, which guarantees that one can use higher-order types in the source while guaranteeing first-order types in the target, and enables using types to guide fusion. We test our ideas by re-implementing Feldspar, which was originally implemented as an Embedded DSL (EDSL), as a QDSL; and we compare the QDSL and EDSL variants. The two variants produce identical code.


symposium/workshop on haskell | 2013

An EDSL approach to high performance Haskell programming

Johan Ankner; Josef Svenningsson

This paper argues for a new methodology for writing high performance Haskell programs by using Embedded Domain Specific Languages. We exemplify the methodology by describing a complete library, meta-repa, which is a reimplementation of parts of the repa library. The paper describes the implementation of meta-repa and contrasts it with the standard approach to writing high performance libraries. We conclude that even though the embedded language approach has an initial cost of defining the language and some syntactic overhead it gives a more tailored programming model, stronger performance guarantees, better control over optimizations, simpler implementation of fusion and inlining and allows for moving type level programming down to value level programming in some cases. We also provide benchmarks showing that meta-repa is as fast, or faster, than repa. Furthermore, meta-repa also includes push arrays and we demonstrate their usefulness for writing certain high performance kernels such as FFT.

Collaboration


Dive into the Josef Svenningsson's collaboration.

Top Co-Authors

Avatar

Emil Axelsson

Chalmers University of Technology

View shared research outputs
Top Co-Authors

Avatar

Jörgen Gustavsson

Chalmers University of Technology

View shared research outputs
Top Co-Authors

Avatar

Bo Joel Svensson

Chalmers University of Technology

View shared research outputs
Top Co-Authors

Avatar

Mary Sheeran

Chalmers University of Technology

View shared research outputs
Top Co-Authors

Avatar

Jacob Lidman

Chalmers University of Technology

View shared research outputs
Top Co-Authors

Avatar

Koen Claessen

Chalmers University of Technology

View shared research outputs
Top Co-Authors

Avatar

Peter A. Jonsson

Swedish Institute of Computer Science

View shared research outputs
Top Co-Authors

Avatar

Tobias Gedell

Chalmers University of Technology

View shared research outputs
Top Co-Authors

Avatar
Researchain Logo
Decentralizing Knowledge