Leveraging .NET meta-programming components from F#
Author:
Open Access
- 16 September 2006
- conference paper
- Published by Association for Computing Machinery (ACM)
- p. 43-54
Abstract
Language-integrated meta-programming and extensible compilation have been recurring themes of programming languages since the invention of LISP. A recent real-world application of these techniques is the use of small meta-programs to specify database queries, as used in the Microsoft LINQ extensions for .NET. It is important that .NET languages such as F# are able to leverage the functionality provided by LINQ and related components for heterogeneous execution, both for pragmatic reasons and as a first step toward applying more disciplined, formal approaches to these problems. This paper explores the use of a modest meta-programming extension to F# to access and leverage the functionality of LINQ and other components. We do this by demonstrating an implementation of language integrated SQL queries using the LINQ/SQLMetal libraries. We also sketch two other applications: the execution of data-parallel quoted F# programs on a GPU via the Accelerator libraries, and dynamic native-code compilation via LINQ.Keywords
This publication has 21 references indexed in Scilit:
- LINQ2006
- The Essence of Data Access in CωLecture Notes in Computer Science, 2005
- Implicitly Heterogeneous Multi-stage ProgrammingLecture Notes in Computer Science, 2005
- GPGPU2004
- MetaKlaim: a type safe multi-stage language for global computingMathematical Structures in Computer Science, 2004
- Template meta-programming for Haskell2002
- ILX: Extending the .NET Common IL for Functional Language InteroperabilityElectronic Notes in Theoretical Computer Science, 2001
- Macros as multi-stage computations2001
- MetaML and multi-stage programming with explicit annotationsTheoretical Computer Science, 2000
- Comprehension syntaxACM SIGMOD Record, 1994