1 / 12

Bootstrapping an OODL

Bootstrapping an OODL. Jonathan Bachrach MIT AI Lab. So You Want to Write a New OODL. But, your language P doesn’t exist to write it in? Of course it doesn’t, but why would you want to write P in P anyways? Because it’s a superior language To prove it’s a capable language

watson
Download Presentation

Bootstrapping an OODL

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Bootstrapping an OODL Jonathan Bachrach MIT AI Lab

  2. So You Want to Write a New OODL • But, your language P doesn’t exist to write it in? • Of course it doesn’t, but why would you want to write P in P anyways? • Because it’s a superior language • To prove it’s a capable language • Need a P runtime anyways

  3. Start with Interpreter in D • Write an interpreter for P in D • Advantages • D has a complete IDE • D is a powerful language • Disadvantages • It will only run on machines that D runs on • It will never be faster than an interpreter

  4. How about the runtime and libraries? • Start by writing most of runtime and support libraries in D • Leverage D as much as possible

  5. Stuck in D-land • Write a cross compiler P2C_D • But still have most of P system written in D • Rewrite P runtime & interpreter in C and P • Can’t assume anything cause it’s C • Build all runtime objects by hand • Objects must be constructed in order

  6. P2C_D • Still want to write P2C in D because of • Speed debuggability and interactivity • Will have an entire P system in D including • Runtime • Object System • Libraries • Interpreter • P2C

  7. P2C_P • Finally port P2C to P • Ensure that • P2C_P.P => P2C_D => P2C_P • P2C_P.P => P2C_P => P2C_P’ • P2C_P.P => P2C_P’ => P2C_P’’ • ...

  8. Break Even Point • P is now • Free of D • Powerful enough to write a P compiler in it • You can now write new versions of P in P • You have reached the break-even point • congratulations

  9. Standard MFTL Putdown • “Has it been used for anything besides its own compiler?”* • On the other hand, a language that cannot even be used to write its own compiler is beneath contempt.* • *From hacker’s dictionary

  10. Bootstrapping • Boot from Dylan • Boot steady State

  11. Native Boot Steady State • Goals • Simple • Reduce throw away code • Purely dynamic boot • no reliance on compiler -- sequential execution • Macros • Keep object definitions looking as they do • Define mappers that extract needed info • Ordering • Slowly build up world • Finally original code can get pushed through

  12. Boot Order • Define boot objects in macro • Build empty prototype objects • Setup <lst> basics • Setup hierarchy • Define tagged and boxed objects • Make slots and accessors • Finalize slots • Patch instances • Define repeated objects • Prepare for functions • Define functions • Patch early generics • Define object system

More Related