[pypy-svn] r21570 - pypy/extradoc/talk/22c3

hpk at codespeak.net hpk at codespeak.net
Tue Dec 27 17:35:06 CET 2005


Author: hpk
Date: Tue Dec 27 17:35:05 2005
New Revision: 21570

Added:
   pypy/extradoc/talk/22c3/hpk-tech.txt   (contents, props changed)
Log:
first draft of talk for 22c3 (process with rest2s5.py from 
docutils-svn) 



Added: pypy/extradoc/talk/22c3/hpk-tech.txt
==============================================================================
--- (empty file)
+++ pypy/extradoc/talk/22c3/hpk-tech.txt	Tue Dec 27 17:35:05 2005
@@ -0,0 +1,237 @@
+.. include:: <s5defs.txt>
+
+=================================================
+PyPy - The new Python implementation on the block
+=================================================
+
+:Authors: Holger Krekel & Carl Friedrich Bolz 
+:Date: 28th December 2005 
+
+PyPy/Translation overview
+=========================
+
+.. image:: translation-overview.png
+   :scale: 500
+
+Python implementation facts 
+===========================
+
+- Parser/Compiler produces bytecode
+- Virtual Machine interprets bytecode 
+- strongly dynamically typed
+- clean object model at Python and C level 
+
+Python implementations 
+===========================
+
+- CPython: main Python version (BDFL'ed by Guido)
+- Jython: compiles to Java Bytecode
+- IronPython (MS): compiles to .NET's CLR 
+- PyPy: self-contained - self-translating 
+
+PyPy implementation facts
+============================
+
+- implements full Python language in Python itself 
+- parts implemented in a restricted subset: RPython 
+- "static enough" for full-programm type inference
+- but at boot time we allow unrestricted python! 
+- 350 subscribers to pypy-dev, 150.000 LOCs, 20.000 visitors per month, 
+- MIT license 
+
+PyPy/Python architecture 
+=============================
+[picture]
+
+- parser and compiler
+- bytecode interpreter 
+- Standard Object Space / Type implementations 
+- Python VM = interpreter + Standard Object Space
+- builtin and fundamental modules 
+
+Parser and Compiler
+===================
+
+- parses python source code to AST 
+- compiles AST to code objects (bytecode) 
+- works from the CPython grammar definition 
+- can be modified/extended at runtime (almost) 
+- [showing interactively] ... 
+
+Bytecode interpreter
+====================
+
+- interprets bytecode/code objects through "Frames" 
+- Frames tie to global and local variable scopes
+- implements control flow (loops, branches, exceptions, calls)
+- dispatches all operations on objects to an Object Library
+  ("Space")
+
+Object Spaces
+=============
+
+- library of all python types and operations on them 
+- is not concerned with control flow or bytecode 
+- ... 
+
+Builtin and Fundamental Modules
+===============================
+
+- around 200 builtin functions and classes 
+- fundamental modules like 'sys' and 'os' implemented 
+- quite fully compliant to CPython's regression tests 
+
+Animation on Interpreter/Objspace interaction 
+===============================================
+
+- shown on pygame-window ... 
+
+
+.. Carl 
+
+
+PyPy/Translation architecture
+============================= 
+
+- bytecode interpreter 
+- Flow Object Space 
+- Annotation 
+- Specialising to lltypesystem / ootypesystem 
+- C and LLVM Backends to lltypesystem 
+
+
+Abstract Interpretation
+========================
+
+- bytecode interpreter dispatches to Flow Object Space
+- Flow Object Space implements abstract operations
+- produces flow graphs as a side effect
+- starts from "live" byte code NOT source code
+- pygame demonstration
+
+
+Type Inference 
+===============
+
+- performs forward propagating type inference
+- is used to infer the types in flow graphs
+- needs types of the entry poing function's arguments
+- assumes that the used types are static
+- goes from very special to more general values
+
+Specialization
+===========================
+
+- annotated flow graphs are specialized for language families
+- lltypesystem (for C like languages): C, LLVM
+- ootypesystem (for OO languages): Java, Javascript, Smalltalk
+- result is specialized flow graphs
+- these contain operations at target level
+
+Backends 
+==========
+
+- produce code out of specialized flow graphs
+- complete backends: C, LLVM
+- ongoing: JavaScript, Squeak
+- foreign function calls: manually written glue snippets
+- big example
+
+Translation Aspects
+====================
+
+- implementation decisions (GC, threading, CC) at translation time 
+- most language implementation do a "fixed" decision 
+- translation aspects are weaved into the produced code
+- independent from language semantics (python interpreter)
+
+aspects: Memory Models
+===================================
+
+- Currently implemented: refcounting, Boehm-collector
+- more general exact GCs (copying, mark&sweep, ...) - not yet
+- different allocation strategies - not yet
+
+Aspects: Threading Models
+=================================
+
+- currently implemented: single thread and global interpreter lock 
+- future plans: free threading models
+- stacklessness: don't use the C stack for user-level recursion
+- implemented as a part of the backends
+
+comparison to other approaches 
+===============================
+
+========== =========== ============ =============
+Project    languages   environments impl aspects 
+========== =========== ============ =============
+PyPy       1 (for now) variable     variable        
+Java       variable    1            semi-variable
+.NET       variable    1            semi-variable
+========== =========== ============ =============
+
+- environments: language backends, standard runtime
+  environments
+- implementation aspects: GC, threading, calling
+  conventions, security, ...
+
+
+.. holger
+
+three public releases
+=====================
+
+- 0.6 quite compliant python implementation 
+- 0.7 compliant self-contained python implementation 
+- 0.8 full parser and compiler, "10-50 times" better speed
+
+lots of documentation
+====================== 
+- http://codespeak.net/pypy
+- 23rd December: release of 10 PyPy reports to the EU 
+- talks, papers, slides available on the site 
+
+
+PyPy cross pollination
+======================= 
+- perl6: Object Spaces 
+- llvm
+- cpython 
+- squeak (started last CCC conf)
+- IronPython/Microsoft 
+
+the speed issue
+===============
+- currently 5-15 times slower than CPython 
+- now seriously starting with optmisations at various levels 
+- pypy can translate (R-)python code to something 10-50 times
+  faster compared to running on top of CPython 
+
+pypy development method
+========================
+- sprints
+- test-driven 
+- open source culture 
+- see talk tomorrow 5pm  (29th Dec. 2005)
+
+technical outlook 2006
+======================
+
+- specialising JIT-compiler, processor backends
+- stackless/non-c calling conventions (CPS)
+- GC / threading integration + extensions
+- orthogonal persistence and distribution (see thunk example)
+- built-in security (e-lang ...)
+
+outlook on whole project level 
+==============================
+
+- surviving the EU review in Bruxelles 20th January 2006
+- better interactions with community & contribution
+- taking care about post-EU development (2007++)
+- visiting the US, Japan ... 
+
+
+.. |bullet| unicode:: U+02022
+.. footer:: Holger Krekel, Carl Friedrich Bolz (merlinux) |bullet| 22C3 |bullet| 28th December 2005 



More information about the Pypy-commit mailing list