Presentation is loading. Please wait.

Presentation is loading. Please wait.

Moscow ML Code Generation for Microsoft.Net Niels Jørgen Kokholm Copenhagen Programming Language Seminar December 12th 2002.

Similar presentations


Presentation on theme: "Moscow ML Code Generation for Microsoft.Net Niels Jørgen Kokholm Copenhagen Programming Language Seminar December 12th 2002."— Presentation transcript:

1 Moscow ML Code Generation for Microsoft.Net Niels Jørgen Kokholm Copenhagen Programming Language Seminar December 12th 2002

2 COPLASp2 Moscow ML Standard ML batch compiler (mosmlc) Standard ML Basis Library Interactive evaluation system (mosml) … Runs on CaML light runtime Written in Standard ML (and C)

3 December 12th 2002COPLASp3 Microsoft.Net Microsoft.NET Framework/ECMA CLI –Common Language Runtime (CLR) Virtual “stack” machine specification similar to JVM –.NET Framework class libraries Implementations: –MS.NET SDK –MS SSCLI (rotor) –Mono –DotGNU Portable.NET

4 December 12th 2002COPLASp4 What Work in progress With Peter Sestoft Long time goal: port Moscow ML to CLR Started as four week project at ITU –May ’02 Andrzej Wasowski/PS

5 December 12th 2002COPLASp5 Why Assess usability of CLR as execution platform for functional languages and the portability of Moscow ML Expand the range of HW/SW platforms on which Moscow ML run (or avoid porting CaML Light) Leverage the safety and productivity potential of strongly typed languages in high-end, distributed, XML-aware, E-yada yada yada Learn about code generation in a non-toy setting and about.NET

6 December 12th 2002COPLASp6 Plan Overall plan –Feasibility study Can it be done with reasonable performance –CLR code generation For pure Standard ML programs –Basis Library part 1 Parts used by compiler –Bootstrap compiler –Interactive system –Basis Library part 2

7 December 12th 2002COPLASp7 CLR code generation + library part.3 –May 2002 Bootstrap compiler –October 2002 –No floating point types, quote/antiquote, … –No complete regression test Performance compared to current Moscow ML –Small code benchmarks: 1-4 times as slow –Bootstrapped compiler: 5 times as slow  Status

8 December 12th 2002COPLASp8 Related work Moscow ML on JVM –Peter Berthelsen, master thesis 1998 SML.NET –Andrew Kennedy, Claudio Russo, Nick Benton ( MS Research), released June 2002 –Standard ML compiler on CLR –Bootstrapped from SML/NJ F# –Don Syme, MS Research –O’CaML on CLR

9 December 12th 2002COPLASp9 CaML light vs. CLR

10 December 12th 2002COPLASp10 Moscow ML Code Generation 1.Parsing, typecheck, translation 2.Compilation: a)Closure splitting b)Expression compilation 3.Byte code emission

11 December 12th 2002COPLASp11 Changing the backend 1 Textual assembler vs RTCG? Verifiable or unverifiable code? Efficiency

12 December 12th 2002COPLASp12 Changing the backend 2 Representation of run time values Correct tail recursion Exception handling Boxing of primitive types

13 December 12th 2002COPLASp13 Runtime value representation

14 December 12th 2002COPLASp14 Closures

15 December 12th 2002COPLASp15 Exception handling

16 December 12th 2002COPLASp16 Boxing of primitive types

17 December 12th 2002COPLASp17 Performance comparisons


Download ppt "Moscow ML Code Generation for Microsoft.Net Niels Jørgen Kokholm Copenhagen Programming Language Seminar December 12th 2002."

Similar presentations


Ads by Google