.. include:: crossreferences.asc .. |title| replace:: Translation of RPython .. |wp| replace:: WP31 .. |start| replace:: M1 .. |p1| replace:: X .. |m1| replace:: 4 .. |p2| replace:: Y .. |m2| replace:: 4 .. |p3| replace:: |e| .. |m3| replace:: |e| .. |p4| replace:: |e| .. |m4| replace:: |e| .. |p5| replace:: |e| .. |m5| replace:: |e| .. |p6| replace:: |e| .. |m6| replace:: |e| .. include:: wp-toptable.asc .. include:: wp-tablebegin.asc **Objectives** - Ability to translate arbitrary RPython source code (e.g. the one produced in WP21_ into low-level code (C, Pyrex, Java, others). - Creation of a stand-alone, not-PyPy-related tool for general optimization of arbitrary but suitably restricted Python application or parts thereof. .. include:: wp-tableend.asc .. include:: wp-tablebegin.asc **Description of work** *Part a): Code Analysis* - Analyse code to produce the relevant typing information. - Investigate whether we can use the annotation object space only or if additional AST-based control flow analysis is needed. - Give a formal definition of RPython. *Part b): Code Production* - Compare different low-level environments that we could target (C, Pyrex, others?). Select at least one suitable target. - Produce low-level code out of the data gathered in Part a). - Again investigate how this is best done (AST-guided translation or reverse-engeneering of the low-level control flow gathered by the annotation object space). - Provide some measure for the efficiency of the generated code, in comparison to Standard Python. Note that this task can actually start earlier than M1, but finally becomes dependent from it. .. include:: wp-tableend.asc .. include:: wp-tablebegin.asc **Deliverables** - DL???: Tool for Analysis of restricted Python Programs - DL???: Passing all applicable elements of the standard test suite. .. include:: wp-tableend.asc .. include:: wp-tablebegin.asc **Milestones and Expected Result** - Initial Complete Self-Contained PyPy Interpreter - Initial Measures of Efficiency