| 1 |
= Google Summer of Code (2013) |
| 2 |
:toc: |
| 3 |
|
| 4 |
== Mentors |
| 5 |
|
| 6 |
The following developers have agreed to serve as mentors for the 2013 Google Summer of Code: |
| 7 |
|
| 8 |
* http://www.cs.rit.edu/%7Emtf[Matthew Fluet] |
| 9 |
* http://www.cse.buffalo.edu/%7Elziarek/[Lukasz (Luke) Ziarek] |
| 10 |
* http://www.cs.purdue.edu/homes/suresh/[Suresh Jagannathan] |
| 11 |
|
| 12 |
== Ideas List |
| 13 |
|
| 14 |
=== Implement a Partial Redundancy Elimination (PRE) Optimization |
| 15 |
|
| 16 |
Partial redundancy elimination (PRE) is a program transformation that |
| 17 |
removes operations that are redundant on some, but not necessarily all |
| 18 |
paths, through the program. PRE can subsume both common subexpression |
| 19 |
elimination and loop-invariant code motion, and is therefore a |
| 20 |
potentially powerful optimization. However, a naïve |
| 21 |
implementation of PRE on a program in static single assignment (SSA) |
| 22 |
form is unlikely to be effective. This project aims to adapt and |
| 23 |
implement the SSAPRE algorithm(s) of Thomas VanDrunen in MLton's SSA |
| 24 |
intermediate language. |
| 25 |
|
| 26 |
Background: |
| 27 |
-- |
| 28 |
* http://onlinelibrary.wiley.com/doi/10.1002/spe.618/abstract[Anticipation-based partial redundancy elimination for static single assignment form]; Thomas VanDrunen and Antony L. Hosking |
| 29 |
* http://cs.wheaton.edu/%7Etvandrun/writings/thesis.pdf[Partial Redundancy Elimination for Global Value Numbering]; Thomas VanDrunen |
| 30 |
* http://www.springerlink.com/content/w06m3cw453nphm1u/[Value-Based Partial Redundancy Elimination]; Thomas VanDrunen and Antony L. Hosking |
| 31 |
* http://portal.acm.org/citation.cfm?doid=319301.319348[Partial redundancy elimination in SSA form]; Robert Kennedy, Sun Chan, Shin-Ming Liu, Raymond Lo, Peng Tu, and Fred Chow |
| 32 |
-- |
| 33 |
|
| 34 |
Recommended Skills: SML programming experience; some middle-end compiler experience |
| 35 |
|
| 36 |
///// |
| 37 |
Mentor: http://www.cs.rit.edu/%7Emtf[Matthew Fluet] |
| 38 |
///// |
| 39 |
|
| 40 |
=== Design and Implement a Heap Profiler |
| 41 |
|
| 42 |
A heap profile is a description of the space usage of a program. A |
| 43 |
heap profile is concerned with the allocation, retention, and |
| 44 |
deallocation (via garbage collection) of heap data during the |
| 45 |
execution of a program. A heap profile can be used to diagnose |
| 46 |
performance problems in a functional program that arise from space |
| 47 |
leaks. This project aims to design and implement a heap profiler for |
| 48 |
MLton compiled programs. |
| 49 |
|
| 50 |
Background: |
| 51 |
-- |
| 52 |
* http://portal.acm.org/citation.cfm?doid=583854.582451[GCspy: an adaptable heap visualisation framework]; Tony Printezis and Richard Jones |
| 53 |
* http://journals.cambridge.org/action/displayAbstract?aid=1349892[New dimensions in heap profiling]; Colin Runciman and Niklas Röjemo |
| 54 |
* http://www.springerlink.com/content/710501660722gw37/[Heap profiling for space efficiency]; Colin Runciman and Niklas Röjemo |
| 55 |
* http://journals.cambridge.org/action/displayAbstract?aid=1323096[Heap profiling of lazy functional programs]; Colin Runciman and David Wakeling |
| 56 |
-- |
| 57 |
|
| 58 |
Recommended Skills: C and SML programming experience; some experience with UI and visualization |
| 59 |
|
| 60 |
///// |
| 61 |
Mentor: http://www.cs.rit.edu/%7Emtf[Matthew Fluet] |
| 62 |
///// |
| 63 |
|
| 64 |
=== Garbage Collector Improvements |
| 65 |
|
| 66 |
The garbage collector plays a significant role in the performance of |
| 67 |
functional languages. Garbage collect too often, and program |
| 68 |
performance suffers due to the excessive time spent in the garbage |
| 69 |
collector. Garbage collect not often enough, and program performance |
| 70 |
suffers due to the excessive space used by the uncollected garbage. |
| 71 |
One particular issue is ensuring that a program utilizing a garbage |
| 72 |
collector "plays nice" with other processes on the system, by not |
| 73 |
using too much or too little physical memory. While there are some |
| 74 |
reasonable theoretical results about garbage collections with heaps of |
| 75 |
fixed size, there seems to be insufficient work that really looks |
| 76 |
carefully at the question of dynamically resizing the heap in response |
| 77 |
to the live data demands of the application and, similarly, in |
| 78 |
response to the behavior of the operating system and other processes. |
| 79 |
This project aims to investigate improvements to the memory behavior of |
| 80 |
MLton compiled programs through better tuning of the garbage |
| 81 |
collector. |
| 82 |
|
| 83 |
Background: |
| 84 |
-- |
| 85 |
* http://www.dcs.gla.ac.uk/%7Ewhited/papers/automated_heap_sizing.pdf[Automated Heap Sizing in the Poly/ML Runtime (Position Paper)]; David White, Jeremy Singer, Jonathan Aitken, and David Matthews |
| 86 |
* http://ieeexplore.ieee.org/xpls/abs_all.jsp?arnumber=4145125[Isla Vista Heap Sizing: Using Feedback to Avoid Paging]; Chris Grzegorczyk, Sunil Soman, Chandra Krintz, and Rich Wolski |
| 87 |
* http://portal.acm.org/citation.cfm?doid=1152649.1152652[Controlling garbage collection and heap growth to reduce the execution time of Java applications]; Tim Brecht, Eshrat Arjomandi, Chang Li, and Hang Pham |
| 88 |
* http://portal.acm.org/citation.cfm?doid=1065010.1065028[Garbage collection without paging]; Matthew Hertz, Yi Feng, and Emery D. Berger |
| 89 |
* http://portal.acm.org/citation.cfm?doid=1029873.1029881[Automatic heap sizing: taking real memory into account]; Ting Yang, Matthew Hertz, Emery D. Berger, Scott F. Kaplan, and J. Eliot B. Moss |
| 90 |
-- |
| 91 |
|
| 92 |
Recommended Skills: C programming experience; some operating systems and/or systems programming experience; some compiler and garbage collector experience |
| 93 |
|
| 94 |
///// |
| 95 |
Mentor: http://www.cs.rit.edu/%7Emtf[Matthew Fluet] |
| 96 |
///// |
| 97 |
|
| 98 |
=== Implement Successor{nbsp}ML Language Features |
| 99 |
|
| 100 |
Any programming language, including Standard{nbsp}ML, can be improved. |
| 101 |
The community has identified a number of modest extensions and |
| 102 |
revisions to the Standard{nbsp}ML programming language that would |
| 103 |
likely prove useful in practice. This project aims to implement these |
| 104 |
language features in the MLton compiler. |
| 105 |
|
| 106 |
Background: |
| 107 |
-- |
| 108 |
* http://successor-ml.org/index.php?title=Main_Page[Successor{nbsp}ML] |
| 109 |
* http://www.mpi-sws.org/%7Erossberg/hamlet/index.html#successor-ml[HaMLet (Successor{nbsp}ML)] |
| 110 |
* http://journals.cambridge.org/action/displayAbstract?aid=1322628[A critique of Standard{nbsp}ML]; Andrew W. Appel |
| 111 |
-- |
| 112 |
|
| 113 |
Recommended Skills: SML programming experience; some front-end compiler experience (i.e., scanners and parsers) |
| 114 |
|
| 115 |
///// |
| 116 |
Mentor: http://www.cs.rit.edu/%7Emtf[Matthew Fluet] |
| 117 |
///// |
| 118 |
|
| 119 |
=== Implement Source-level Debugging |
| 120 |
|
| 121 |
Debugging is a fact of programming life. Unfortunately, most SML |
| 122 |
implementations (including MLton) provide little to no source-level |
| 123 |
debugging support. This project aims to add basic to intermediate |
| 124 |
source-level debugging support to the MLton compiler. MLton already |
| 125 |
supports source-level profiling, which can be used to attribute bytes |
| 126 |
allocated or time spent in source functions. It should be relatively |
| 127 |
straightforward to leverage this source-level information into basic |
| 128 |
source-level debugging support, with the ability to set/unset |
| 129 |
breakpoints and step through declarations and functions. It may be |
| 130 |
possible to also provide intermediate source-level debugging support, |
| 131 |
with the ability to inspect in-scope variables of basic types (e.g., |
| 132 |
types compatible with MLton's foreign function interface). |
| 133 |
|
| 134 |
Background: |
| 135 |
-- |
| 136 |
* http://mlton.org/HowProfilingWorks[MLton -- How Profiling Works] |
| 137 |
* http://mlton.org/ForeignFunctionInterfaceTypes[MLton -- Foreign Function Interface Types] |
| 138 |
* http://dwarfstd.org/[DWARF Debugging Standard] |
| 139 |
* http://sourceware.org/gdb/current/onlinedocs/stabs/index.html[STABS Debugging Format] |
| 140 |
-- |
| 141 |
|
| 142 |
Recommended Skills: SML programming experience; some compiler experience |
| 143 |
|
| 144 |
///// |
| 145 |
Mentor: http://www.cs.rit.edu/%7Emtf[Matthew Fluet] |
| 146 |
///// |
| 147 |
|
| 148 |
=== SIMD Primitives |
| 149 |
|
| 150 |
Most modern processors offer some direct support for SIMD (Single |
| 151 |
Instruction, Multiple Data) operations, such as Intel's MMX/SSE |
| 152 |
instructions, AMD's 3DNow! instructions, and IBM's AltiVec. Such |
| 153 |
instructions are particularly useful for multimedia, scientific, and |
| 154 |
cryptographic applications. This project aims to add preliminary |
| 155 |
support for vector data and vector operations to the MLton compiler. |
| 156 |
Ideally, after surveying SIMD instruction sets and SIMD support in |
| 157 |
other compilers, a core set of SIMD primitives with broad architecture |
| 158 |
and compiler support can be identified. After adding SIMD primitives |
| 159 |
to the core compiler and carrying them through to the various |
| 160 |
backends, there will be opportunities to design and implement an SML |
| 161 |
library that exposes the primitives to the SML programmer as well as |
| 162 |
opportunities to design and implement auto-vectorization |
| 163 |
optimizations. |
| 164 |
|
| 165 |
Background: |
| 166 |
-- |
| 167 |
* http://en.wikipedia.org/wiki/SIMD[SIMD] |
| 168 |
* http://gcc.gnu.org/projects/tree-ssa/vectorization.html[Auto-vectorization in GCC] |
| 169 |
* http://llvm.org/docs/Vectorizers.html[Auto-vectorization in LLVM] |
| 170 |
-- |
| 171 |
|
| 172 |
Recommended Skills: SML programming experience; some compiler experience; some computer architecture experience |
| 173 |
|
| 174 |
///// |
| 175 |
Mentor: http://www.cs.rit.edu/%7Emtf[Matthew Fluet] |
| 176 |
///// |
| 177 |
|
| 178 |
=== RTOS Support |
| 179 |
|
| 180 |
This project entails porting the MLton compiler to RTOSs such as: |
| 181 |
RTEMS, RT Linux, and FreeRTOS. The project will include modifications |
| 182 |
to the MLton build and configuration process. Students will need to |
| 183 |
extend the MLton configuration process for each of the RTOSs. The |
| 184 |
MLton compilation process will need to be extended to invoke the C |
| 185 |
cross compilers the RTOSs provide for embedded support. Test scripts |
| 186 |
for validation will be necessary and these will need to be run in |
| 187 |
emulators for supported architectures. |
| 188 |
|
| 189 |
Recommended Skills: C programming experience; some scripting experience |
| 190 |
|
| 191 |
///// |
| 192 |
Mentor: http://www.cse.buffalo.edu/%7Elziarek/[Lukasz (Luke) Ziarek] |
| 193 |
///// |
| 194 |
|
| 195 |
=== Region Based Memory Management |
| 196 |
|
| 197 |
Region based memory management is an alternative automatic memory |
| 198 |
management scheme to garbage collection. Regions can be inferred by |
| 199 |
the compiler (e.g., Cyclone and MLKit) or provided to the programmer |
| 200 |
through a library. Since many students do not have extensive |
| 201 |
experience with compilers we plan on adopting the later approach. |
| 202 |
Creating a viable region based memory solution requires the removal of |
| 203 |
the GC and changes to the allocator. Additionally, write barriers |
| 204 |
will be necessary to ensure references between two ML objects is never |
| 205 |
established if the left hand side of the assignment has a longer |
| 206 |
lifetime than the right hand side. Students will need to come up with |
| 207 |
an appropriate interface for creating, entering, and exiting regions |
| 208 |
(examples include RTSJ scoped memory and SCJ scoped memory). |
| 209 |
|
| 210 |
Background: |
| 211 |
-- |
| 212 |
* Cyclone |
| 213 |
* MLKit |
| 214 |
* RTSJ + SCJ scopes |
| 215 |
-- |
| 216 |
|
| 217 |
Recommended Skills: SML programming experience; C programming experience; some compiler and garbage collector experience |
| 218 |
|
| 219 |
///// |
| 220 |
Mentor: http://www.cse.buffalo.edu/%7Elziarek/[Lukasz (Luke) Ziarek] |
| 221 |
///// |
| 222 |
|
| 223 |
=== Integration of Multi-MLton |
| 224 |
|
| 225 |
http://multimlton.cs.purdue.edu[MultiMLton] is a compiler and runtime |
| 226 |
environment that targets scalable multicore platforms. It is an |
| 227 |
extension of MLton. It combines new language abstractions and |
| 228 |
associated compiler analyses for expressing and implementing various |
| 229 |
kinds of fine-grained parallelism (safe futures, speculation, |
| 230 |
transactions, etc.), along with a sophisticated runtime system tuned |
| 231 |
to efficiently handle large numbers of lightweight threads. The core |
| 232 |
stable features of MultiMLton will need to be integrated with the |
| 233 |
latest MLton public release. Certain experimental features, such as |
| 234 |
support for the Intel SCC and distributed runtime will be omitted. |
| 235 |
This project requires students to understand the delta between the |
| 236 |
MultiMLton code base and the MLton code base. Students will need to |
| 237 |
create build and configuration scripts for MLton to enable MultiMLton |
| 238 |
features. |
| 239 |
|
| 240 |
Background |
| 241 |
-- |
| 242 |
* http://multimlton.cs.purdue.edu/mML/Publications.html[MultiMLton -- Publications] |
| 243 |
-- |
| 244 |
|
| 245 |
Recommended Skills: SML programming experience; C programming experience; some compiler experience |
| 246 |
|
| 247 |
///// |
| 248 |
Mentor: http://www.cse.buffalo.edu/%7Elziarek/[Lukasz (Luke) Ziarek] |
| 249 |
///// |