## Feldspar: A Domain Specific Language for Digital Signal Processing algorithms (2010)

Venue: | IN: PROC. 8 TH ACM/IEEE INTERNATIONAL CONFERENCE ON FORMAL METHODS AND MODELS FOR CODESIGN. IEEE |

Citations: | 14 - 4 self |

### BibTeX

@INPROCEEDINGS{Axelsson10feldspar:a,

author = {Emil Axelsson and Koen Claessen and Gergely Dévai and Zoltán Horváth and Karin Keijzer and Anders Persson and Mary Sheeran and Josef Svenningsson and András Vajda and et al.},

title = { Feldspar: A Domain Specific Language for Digital Signal Processing algorithms},

booktitle = {IN: PROC. 8 TH ACM/IEEE INTERNATIONAL CONFERENCE ON FORMAL METHODS AND MODELS FOR CODESIGN. IEEE},

year = {2010},

publisher = {}

}

### OpenURL

### Abstract

... 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.

### Citations

356 | BThe landscape of parallel computing research: A view from Berkeley
- Asanovic, Bodik, et al.
- 2006
(Show Context)
Citation Context ... each index (starting from 0) to its value. For example, the first eight powers of 2 can be computed as follows: powersOfTwo :: Data [Int] powersOfTwo = parallel 8 (\i -> 2ˆi) *Main> eval powersOfTwo =-=[1,2,4,8,16,32,64,128]-=- In addition to the above constructs, the core language also contains quite a large number of primitive functions; for example, arithmetic functions ((+), (*), etc.) and relational operators ((==), (<... |

201 | A short cut to deforestation
- Gill, Launchbury, et al.
- 1993
(Show Context)
Citation Context ...allel arrays, which originally gave the inspiration for our symbolic vectors. Our use of fusion for symbolic vectors is closely related to short cut fusion and related techniques for lists and arrays =-=[13]-=-, [19], [5], but there are important differences. Firstly, all symbolic vectors – except those operated on by the memorize function – are guaranteed to be removed and will never have a physical repres... |

166 | Simple unification-based type inference for GADTs
- Jones, Vytiniotis, et al.
- 2006
(Show Context)
Citation Context ...e to represent the abstract syntax of the core language. Each of the given core constructs has a corresponding constructor in the data type. In our case, we use a generalized algebraic data type GADT =-=[20]-=-, which allows the constructors to be completely type safe with regards to the values flowing in the program graph. B. Symbolic vectors An important part of Feldspar is the vector library. This librar... |

153 | N.: SPIRAL: Code generation for DSP transforms
- Püschel, Moura, et al.
(Show Context)
Citation Context ...PLES The functional dataflow approach to algorithm specification used in Feldspar lends itself to a style of description similar to that used in the SPIRAL project and its associated DSL (called SPL) =-=[21]-=-. In SPL, transforms and their decompositions are defined as products of structured matrices, using a small number of constructs for building matrices. Then, a transform of input signal x to output si... |

133 | Modular Domain Specific Languages and Tools
- Hudak
- 1998
(Show Context)
Citation Context ...n DSLs, see the slides and videos from DSL DevCon 2009 [18]. Our approach is to embed a DSL in Haskell, building upon a wealth of earlier work in the functional programming community on embedded DSLs =-=[14]-=-, [7]. In the longer term, we may choose to make a standalone language, but working with an embedded language initially has enabled a more rapid exploration of the design space since we can rely on th... |

87 | Accelerator: using data-parallelism to program GPUs for general-purpose uses
- Tarditi, Puri, et al.
- 2006
(Show Context)
Citation Context ...ain, examples of DSLs with similar aims to ours include Cryptol (a DSL for cryptography from Galois, [17]) and Microsoft’s Accelerator for programming various platforms, including GPUs and multicores =-=[24]-=-. In both Cryptol and Accelerator, all loops are unrolled during code generation. Feldspar provides a step up in expressiveness, as it keeps the loops in the generated programs. One path that we feel ... |

66 | Cheap Deforestation for Non-strict Functional Languages
- Gill
- 1996
(Show Context)
Citation Context ...cuts both ways when it comes to fusion. Functions like reverse can be written and fused without problem when using symbolic vectors, while previous approaches cannot remove the runtime representation =-=[12]-=-. However, a function like filter, which removes elements according to a predicate, is a problem for symbolic vectors because the length of the resulting vector is not known until the vector is comput... |

62 | Playing by the rules: Rewriting as a practical optimisation technique in GHC
- Jones, Tolmach, et al.
- 2001
(Show Context)
Citation Context ...arrays, which originally gave the inspiration for our symbolic vectors. Our use of fusion for symbolic vectors is closely related to short cut fusion and related techniques for lists and arrays [13], =-=[19]-=-, [5], but there are important differences. Firstly, all symbolic vectors – except those operated on by the memorize function – are guaranteed to be removed and will never have a physical representati... |

46 | Stream fusion: From lists to streams to nothing at all
- Coutts, Leshchinskiy, et al.
- 2007
(Show Context)
Citation Context ..., which originally gave the inspiration for our symbolic vectors. Our use of fusion for symbolic vectors is closely related to short cut fusion and related techniques for lists and arrays [13], [19], =-=[5]-=-, but there are important differences. Firstly, all symbolic vectors – except those operated on by the memorize function – are guaranteed to be removed and will never have a physical representation at... |

46 |
Programming in Haskell
- Hutton
- 2007
(Show Context)
Citation Context ...ns to compute the transform. The core language does not offer recursion. As an alternative to recursion, Feldspar provides some standard combinators for composing programs, such as map, fold and scan =-=[15]-=-. The user is also able to implement new combinators for a specific sub-domain. For example, combinators similar to those used in Lava to describe sorting networks and related structures can be define... |

44 | Compiling embedded languages
- Elliott, Finne, et al.
- 2000
(Show Context)
Citation Context ..., see the slides and videos from DSL DevCon 2009 [18]. Our approach is to embed a DSL in Haskell, building upon a wealth of earlier work in the functional programming community on embedded DSLs [14], =-=[7]-=-. In the longer term, we may choose to make a standalone language, but working with an embedded language initially has enabled a more rapid exploration of the design space since we can rely on the con... |

44 | Composing dataflow analyses and transformations
- Lerner, Grove, et al.
(Show Context)
Citation Context ... each index (starting from 0) to its value. For example, the first eight powers of 2 can be computed as follows: powersOfTwo :: Data [Int] powersOfTwo = parallel 8 (\i -> 2ˆi) *Main> eval powersOfTwo =-=[1,2,4,8,16,32,64,128]-=- In addition to the above constructs, the core language also contains quite a large number of primitive functions; for example, arithmetic functions ((+), (*), etc.) and relational operators ((==), (<... |

22 |
DSP specification using the Silage language
- Genin, Hilfinger, et al.
- 1990
(Show Context)
Citation Context ... Scheme with call-by-reference functions [10]. C. Domain Specific Languages The notion of a domain specific language for DSP is not new. The Silage project had aims very similar to ours, for instance =-=[11]-=-. We differ in building on a fully fledged functional programming language, with an advanced type system, higher order functions and a continuously developing infrastructure for the embedding of DSLs.... |

18 |
Cryptol: High assurance, retargetable crypto development and validation
- Lewis, Martin
- 2003
(Show Context)
Citation Context ...to generate C code of sufficiently high performance for use in production [25]. Outside the DSP domain, examples of DSLs with similar aims to ours include Cryptol (a DSL for cryptography from Galois, =-=[17]-=-) and Microsoft’s Accelerator for programming various platforms, including GPUs and multicores [24]. In both Cryptol and Accelerator, all loops are unrolled during code generation. Feldspar provides a... |

7 |
Source Code Optimization Techniques for Data Flow Dominated Embedded Software
- FALK, P
(Show Context)
Citation Context ... each index (starting from 0) to its value. For example, the first eight powers of 2 can be computed as follows: powersOfTwo :: Data [Int] powersOfTwo = parallel 8 (\i -> 2ˆi) *Main> eval powersOfTwo =-=[1,2,4,8,16,32,64,128]-=- In addition to the above constructs, the core language also contains quite a large number of primitive functions; for example, arithmetic functions ((+), (*), etc.) and relational operators ((==), (<... |

5 |
Using Lava to design and verify recursive and periodic sorters
- Claessen, Sheeran, et al.
(Show Context)
Citation Context ...The user is also able to implement new combinators for a specific sub-domain. For example, combinators similar to those used in Lava to describe sorting networks and related structures can be defined =-=[3]-=-, although a more index-oriented style of description now seems appropriate. For example, the following is an iterative sorter based on the balanced periodic merger. swapsT n = indexed (n+1) (\j -> (i... |

5 |
Gpgpu kernel implementation and refinement using obsidian
- Svensson, Claessen, et al.
- 2010
(Show Context)
Citation Context ...h index to its element, similar to Feldspar’s parallel construct. However, Feldspar goes further by providing symbolic vectors, which are handled and optimized purely at the generator level. Obsidian =-=[23]-=- is an embedded language for generalpurpose programming of graphics processing units (GPUs). The aim of Obsidian is to enable a functional programming style to make maximal use of the massive parallel... |

4 |
Building little languages with macros
- Felleisen, Findler, et al.
- 2004
(Show Context)
Citation Context ...languages like Scheme. The idea of building advanced language features using macros is not new. For instance, Felleisen et al. show how to use macros to extend Scheme with call-by-reference functions =-=[10]-=-. C. Domain Specific Languages The notion of a domain specific language for DSP is not new. The Silage project had aims very similar to ours, for instance [11]. We differ in building on a fully fledge... |

3 | SequenceL – An Overview of a Simple Language
- Cooke, Rushton
- 2005
(Show Context)
Citation Context |

3 |
Efficient code generation from the highlevel domain-specific language Feldspar for DSPs
- Dévai, Tejfel, et al.
- 2010
(Show Context)
Citation Context ...y of the for loop. Note that all of this happens instantaneously while running the generator in Haskell. C. Backend Implementation The compiler backend transforms Feldspar core language programs to C =-=[6]-=-. Its input is a Haskell data structure that represents core language programs as dataflow graphs consisting of computation nodes and edges representing the flow of data between the nodes. Compound co... |

1 |
Functional Embedded Language for DSP and PARallelism. http://feldspar.inf.elte.hu
- Feldspar
(Show Context)
Citation Context ...ve us greater ability to capture and exploit potential parallelism. The domain specific language is called Feldspar and it is, together with its associated compiler, available as open source software =-=[9]-=-. The current version of Feldspar deals only with pure data processing; although, we have initiated work to extend the language to encompass control. Figure 1 shows how a high-level Feldspar program i... |

1 |
Developers Conference: applied topics in domain specific languages. http://msdn.microsoft.com/en-us/ data/devcon.aspx
- DSL
- 2009
(Show Context)
Citation Context ...uage, and it is this restrictiveness that gives us hope of achieving the necessary performance. For a recent snapshot of practical developments in DSLs, see the slides and videos from DSL DevCon 2009 =-=[18]-=-. Our approach is to embed a DSL in Haskell, building upon a wealth of earlier work in the functional programming community on embedded DSLs [14], [7]. In the longer term, we may choose to make a stan... |

1 |
Hoopl: Dataflow optimization made simple, 2009. http://research.microsoft. com/en-us/um/people/simonpj/papers/c--/dfopt.pdf
- Ramsey, Dias, et al.
(Show Context)
Citation Context ...ation techniques described in [8] among others. The way our compiler supports optimization by modular design and an optimization framework was described in section III-C. A similar framework is Hoopl =-=[22]-=-. Once the optimization is modular, one has to solve problems related to composition of optimization modules. In [16], an interesting solution to this problem is presented. As our plugin phases also p... |

1 |
Embedded MATLAB, part 1: From MATLAB to embedded C
- Zarrinkoub
- 2008
(Show Context)
Citation Context ...ed away. The MathWorks is developing embedded MATLAB, citing many of the same motivations as those in our project, and aiming to generate C code of sufficiently high performance for use in production =-=[25]-=-. Outside the DSP domain, examples of DSLs with similar aims to ours include Cryptol (a DSL for cryptography from Galois, [17]) and Microsoft’s Accelerator for programming various platforms, including... |