archives

Encoding Information Flow in Haskell

Encoding Information Flow in Haskell by Peng Li and Steve Zdancewic.

This paper presents an embedded security sublanguage for enforcing information-flow policies in the standard Haskell programming language. The sublanguage provides useful information-flow control mechanisms including dynamic secirity lattices, run-time code privileges and declassification, without modifying the base language. This design avoids the redundant work of producing new languages, lowers the threshold for adopting security-typed languages, and also provides great flexibility and modularity for using security-policy frameworks.

The embedded security sublanguage is designed using a sstandard combinator interface called arrows. Computations constructed in the sublanguage have static and explicit control-flow components, making it possible to implement information-flow control using static-analysis techniques at run time, while providing strong security guarantees. This paper presents a concrete Haskell implementation and an example application demonstrating the proposed techniques.

Very interesting use of arrows. EDSL in Haskell with privilege informations encoded in the type, & more; fun!

[Edit: corrected link]

Writing an interpreter, targeting a VM or writing from scratch?

I'm going to write myself a small functional language just for fun. I've previously written an interpreter in Haskell for LC but now I want to try going the route of modern (popular, whatever) languages such as Python or Ruby. So exactly how are those languages implemented?
  • Do they generate byte code for a virtual machine?
  • Does the virtual machine handle garbage collection?
  • What virtual machine would be good to target if I need to implement typical things such tail call optimizations and closures?
  • Is parsers/lexers for modern languages handwritten or do they use something like Flex/Bison?
  • Is it easier to write an interpreter in C or to generate byte code?

A brief survey of quantum programming languages

Peter Selinger. A brief survey of quantum programming languages.
In Proceedings of the 7th International Symposium on Functional and Logic Programming, Nara, Japan. Springer LNCS 2998, pp. 1-6, 2004.

A brief but useful survey of quantum programming languages (six pages), that I think wasn't mentioned here before.

Section 2.1 describes the common target hardware models (the quantum circuit model, QRAM, and quantum Turing Machines).

Section 2.2 is about imperative quantum languages (e.g., QCL), and section 2.3 discusses functional quantum languages.

Scheme simulator for quantum computation

While on the subject of quantum computing, I think some of you might enjoy playing with this Scheme DSEL for quantum computation from André van Tonder.