Skip to content

gsoc_2011_interpreter

https://www.google.com/accounts/o8/id?id=AItOawnIDK5ERNYzZQUJALcyMjUQXUyiYA_Tij8 edited this page Apr 7, 2011 · 21 revisions
  1. In-browser PyJS Interpreter
    1. Abstract

The purpose of this project is to re-factor and improve python-to-javascript translator component (pyjs) of Pyjamas in order to reach following goals:

1. Translator should be able to translate itself, and resulting javascript should be able to correctly translate python code into javascript code while being run in browser environment, turning pyjs into proper python implementation. 2. Remove deprecated interfaces and provide clean, extensible API for Pyjamas utilities and 3rd party applications/libraries which use pyjs translator, supporting small DSL use-cases in addition to current web applications. 3. Research and attempt to provide support for translating python 3

      1. In-browser interpreting
      1. API and utilities update
      1. Python 3 support
    1. Timeline and milestones
      1. May 10 - May 23

Conduct research on python 3 support:

  • Evaluate changes needed to pyjs to produce compatible AST for python 3 syntax
  • Evaluate changes needed to pyjs to generate correct JavaScript for python 3 AST
  • Evaluate changes needed to pyjslib to execure producted JavaScript and find best approach to minimize such changes
  • Evaluate possibility of executing pyjs with python 3 interpreters, including subsequent in-browser pyjs execution.
  • Provide report on extent of work on python 3 support feasible in terms of this GSoC project and correct this plan accordingly.
      1. Start of Program (May 24)

There is no specific preparation work needed besides python 3 support research since project goals were already discussed extensibly in mailing list prior to GSoC

      1. May 24 - July 11
        1. May 24 - May 30
        2. May 31 - June 6
        3. June 7 - June 13
        4. June 14 - June 20
        5. June 21 - June 27
        6. June 28 - July 4
        7. July 5 - July 11
  • Update classes and API
  • Do planned python 3 improvements
  • Make python parser pass PyJS compilation.
  • Make PyJS being able to compile itself.
  • Create utility to test code compilation via pyjs executed by PyV8
  • Ensure that subsequent compilations of PyJS by itself do not break it
  • Document PyJS changes
      1. Midterm Evaluation (July 12)
  • At this stage PyJS executed by CPython should compile parser and itself into valid JavaScript
  • Compiled into JavaScript PyJS should be able to compile original python sources of PyJS and parser into identical JavaScript when executed via PyV8.
      1. July 13 - Aug 22
        1. July 13 - July 18
        2. July 19 - July 25
        3. July 26 - Aug 1
        4. Aug 2 - Aug 8
        5. Aug 9 - Aug 15
        6. Aug 16 - Aug 22
  • Implement compile(), eval(), exec(), execfile()
  • Implement import using original python code instead of pre-compiled
  • Update all CLI utilities
  • Extend testing to include compiling all tests in run-time by in-browser PyJS
  • Do performance and footprint evaluation
  • Do optimization if nessesary
  • Test whole Pyjamas stack according to QA policy
  • Merge code into master branch
      1. Final Evaluation (Aug 23)
  • At this stage PyJS GSoC branch should be merged back into master branch.
  • PyJS should be documented on Pyjamas Wiki.
  • Pyjamas test plan should be extended to include execution of whole test suite by compiled-in-browser PyJS.
  • All changes should be thoroughly tested according to Pyjamas QA policy.