Reading advice on memory management

Hi! I am doing some work on using functional languages (F# in particular) for game development. My goal is to capture many of the (informal) conventions that are often used in gamedev inside the language, and I have found that the state monad, quotations and a bit of meta-programming can be amazing in this direction: I have even obtained an 8x speedup by creating my own references and by arbitrating shared memory accesses in different threads statically (by comparing the type of the states of the thread to see if they access the same areas of memory) rather than trusting the garbage collector and locking stuff.

I would like to compare my approach to the existing literature, but I get the feeling that I am touching more areas than I can guess :)
So far I have found stuff that is closely related to the system I have built:
- phantom types where types are used to get faster code with less runtime checks
- resource aware programming where types represent useful information for dealing with low-level constructs
- heterogeneous lists to define one's state and in general to implement smarter containers such as custom objects or records

I have also read very little (mostly theoretical, but I would be more interested in the engineering standpoint) about separation logic, which sounds quite close to what I have done with my threads.

Any advice on further reading?

Thanks a lot!

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

Linear logic?

I guess you would be interested in linear logic; more specifically, it's use in type systems. Alas, there aren't many practical implementations of PLs available that make use of linear types.

Even then, you can play with ATS, perhaps you'd find it useful.

Possibly relevant ATS related papers

The ATS papers page probably has some relevant stuff. For example Implementing Reliable Linux Device Drivers in ATS and Safe Programming with Pointers through Stateful Views. If you have access to the ACM digital library or can find it elsewhere you might also like Operating System Development with ATS


...a lot :)

Separation Logic

Peter O'Hearn's work is probably known to you, as he has worked a lot on separation logic and its application to memory management. His page also links to some practical projects, like SpaceInvader, which might be of interest to you.

Separation logic I knew

Separation logic I knew about, but the SpaceInvader project (which looks very intereseting) I had never seen!