This lecture completes the set on integrating domainspecific languages with generalpurpose programming language. Previous lectures looked at the specific case of programs that create SQL queries: this one addresses the general area of metaprogramming where one piece of code manipulates another; and in particular heterogeneous metaprogramming where these are in different languages. This leads up to an example where F# code to run Conway’s Game of Life on a regular CPU can be automatically transformed to run on a graphics processor.
Link: Slides for Lecture 9
Homework
The next topic will be on languagebased methods for checking and certifying correct code. In anticipation, you should revise what you know about propositional logic and predicate logic.
Read the following slide sets from Discrete Mathematics and Mathematical Reasoning.
You might also find this helpful, on the same topic:
 Mathematics for Computer Science, Chapter 1. (PDF; All chapters)
From Leighton, Tom, and Marten Dijk: 6.042J Mathematics for Computer Science, Fall 2010. (MIT OpenCourseWare: Massachusetts Institute of Technology), http://ocw.mit.edu/courses/electricalengineeringandcomputerscience/6042jmathematicsforcomputersciencefall2010 (Accessed 17 Oct, 2014).
License: Creative Commons BYNCSA
References
The F# Software Foundation F# is a mature, open source, crossplatform, functionalfirst programming language which empowers users and organizations to tackle complex computing problems with simple, maintainable and robust code. Link: http://fsharp.org/ 

F# at Microsoft Research F# is a succinct, expressive, and efficient functional and objectoriented language for Microsoft .NET that helps you write simple code to solve complex problems. Link: http://research.microsoft.com/fsharp 

Don Syme. Leveraging .NET metaprogramming components from F#: integrated queries and interoperable heterogeneous execution. In ML ’06: Proceedings of the ACM SIGPLAN 2006 Workshop on ML, pages 43–54. ACM Press, September 2006. Links: PDF; web page; ACM Digital Library 

Latest Developments in General Purpose GPU Programming with F# Don Syme’s WebLog on F# and Related Topics, 23 April 2014 Link: Blog entry 

QuantAlea: A software and solution provider for high performance and GPU computing. Developers of Alea.cuBase, a complete solution to develop CUDA applications on .NET Links: QuantAlea; Alea.cuBase blog; GPUs for large scale asset management 

Vulpes: F# for deep learning and deep belief nets with GPU computing. Link: GitHub project page 