[pypy-svn] r54543 - pypy/extradoc/talk/pycon-italy-2008
antocuni at codespeak.net
antocuni at codespeak.net
Thu May 8 00:23:36 CEST 2008
Author: antocuni
Date: Thu May 8 00:23:35 2008
New Revision: 54543
Modified:
pypy/extradoc/talk/pycon-italy-2008/author.latex
pypy/extradoc/talk/pycon-italy-2008/motivation.txt
pypy/extradoc/talk/pycon-italy-2008/stylesheet.latex
pypy/extradoc/talk/pycon-italy-2008/technical.txt
Log:
use beamer boxes for code examples
Modified: pypy/extradoc/talk/pycon-italy-2008/author.latex
==============================================================================
--- pypy/extradoc/talk/pycon-italy-2008/author.latex (original)
+++ pypy/extradoc/talk/pycon-italy-2008/author.latex Thu May 8 00:23:35 2008
@@ -1,4 +1,6 @@
+\definecolor{rrblitbackground}{rgb}{0.0, 0.0, 0.0}
+
\title{PyPy and The Art of Generating Virtual Machines}
-\author[Antonio Cuni]{Antonio Cuni -- DISI, Università degli Studi di Genova}
+\author[Antonio Cuni]{Antonio Cuni\\DISI, Università degli Studi di Genova}
\institute[PyCon Due 2008]{PyCon Due 2008 - Firenze}
\date{May 10, 2008}
Modified: pypy/extradoc/talk/pycon-italy-2008/motivation.txt
==============================================================================
--- pypy/extradoc/talk/pycon-italy-2008/motivation.txt (original)
+++ pypy/extradoc/talk/pycon-italy-2008/motivation.txt Thu May 8 00:23:35 2008
@@ -1,4 +1,4 @@
-.. include:: <s5defs.txt>
+.. include:: beamerdefs.txt
PyPy and The Art of Generating Virtual Machines
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Modified: pypy/extradoc/talk/pycon-italy-2008/stylesheet.latex
==============================================================================
--- pypy/extradoc/talk/pycon-italy-2008/stylesheet.latex (original)
+++ pypy/extradoc/talk/pycon-italy-2008/stylesheet.latex Thu May 8 00:23:35 2008
@@ -3,5 +3,8 @@
\setbeamertemplate{navigation symbols}{}
\definecolor{darkgreen}{rgb}{0, 0.5, 0.0}
-\newcommand{\docutilsrolegreen}[1]{\color{darkgreen} #1 \normalcolor}
-\newcommand{\docutilsrolered}[1]{\color{red} #1 \normalcolor}
+\newcommand{\docutilsrolegreen}[1]{\color{darkgreen}#1\normalcolor}
+\newcommand{\docutilsrolered}[1]{\color{red}#1\normalcolor}
+
+\newcommand{\green}[1]{\color{darkgreen}#1\normalcolor}
+\newcommand{\red}[1]{\color{red}#1\normalcolor}
Modified: pypy/extradoc/talk/pycon-italy-2008/technical.txt
==============================================================================
--- pypy/extradoc/talk/pycon-italy-2008/technical.txt (original)
+++ pypy/extradoc/talk/pycon-italy-2008/technical.txt Thu May 8 00:23:35 2008
@@ -1,7 +1,7 @@
-Translation details
+Translation details (1)
=======================
.. raw:: html
@@ -31,7 +31,7 @@
also uses Flow Graph transformation and rewriting.
-Type Systems
+Type Systems (1)
=========================
We model the different targets through different type systems:
@@ -42,7 +42,7 @@
- OO (object oriented targets): classes and instances
with inheritance and dispatching
-Type systems (2)
+Type Systems (2)
===========================
Translation:
@@ -56,7 +56,7 @@
* then they are sent to the backends.
-Translation aspects
+Translation aspects (1)
========================
The interpreters in RPython are free of low-level details
@@ -167,14 +167,38 @@
PE for dummies
==============
-+---------------------+--------------------+-----------------------+
-| | def f(x, y): | | *(case x=3)* | | *(case x=10)* |
-| | x2 = x * x | | def f_3(y): | | def f_10(y): |
-| | y2 = y * y | | y2 = y * y | | y2 = y * y |
-| | return x2 + y2 | | return 9 + y2 | | return 100 + y2 |
-+---------------------+--------------------+-----------------------+
+|example<| Example |>|
+::
-* What happens if x is the bytecode instead of an integer?
+ def f(x, y):
+ x2 = x * x
+ y2 = y * y
+ return x2 + y2
+
+|end_example|
+
+|pause|
+|column1|
+|alert<| case x=3 |>|
+::
+
+ def f_3(y):
+ y2 = y * y
+ return 9 + y2
+
+|end_alert|
+
+|pause|
+|column2|
+|alert<| case x=10 |>|
+::
+
+ def f_10(y):
+ y2 = y * y
+ return 100 + y2
+
+|end_alert|
+|end_columns|
Challenges
@@ -279,7 +303,7 @@
Rainbow architecture
====================
-* (translation time)
+|alert<| Translation time |>|
* Low-level flowgraphs are produced
@@ -287,23 +311,30 @@
* The *rainbow codewriter* translates flowgraphs into rainbow bytecode
-* (compile-time)
+|end_alert|
+
+|pause|
+|example<| Compile-time |>|
* The rainbow interpreter executes the bytecode
* As a result, it procude executable code
-* (runtime)
+|end_example|
-* The code produced by the rainbow interpreter is executed
+|pause|
+|alert<| Runtime |>|
+* The produced code is executed
+
+|end_alert|
Coloring
=================
-* Green: compile-time value
-* Red: runtime value
+* :green:`Green`: compile-time value
+* :red:`Red`: runtime value
* The hints give constraints from which the colors
of all values are derived
@@ -311,32 +342,79 @@
We reuse the type inference
framework to propagate colors
-PE with colors
-====================
+Partial Evaluation with Colors
+==============================
-* Green operations: unchanged, executed at compile-time
+* :green:`Green operations`: unchanged, executed at compile-time
-* Red operations: converted into corresponding code emitting code
+* :red:`Red operations`: converted into corresponding code emitting code
-+-----------------------------------------------+-----------------------------------------+----------------------------------------------+
-| | ``def f(`` :green:`x`, :red:`y` ``):`` | | *(case x=3)* | | *(case x=10)* |
-| | :green:`x2` = :green:`x` ``*`` :green:`x` | | ``def f_3(y):`` | | ``def f_10(y):`` |
-| | :red:`y2` = :red:`y` ``*`` :red:`y` | | ``y2 = y * y`` | | ``y2 = y * y`` |
-| | ``return`` :green:`x2` ``+`` :red:`y2` | | ``return 9 + y2`` | | ``return 100 + y2`` |
-+-----------------------------------------------+-----------------------------------------+----------------------------------------------+
+|pause|
+|column1|
+|example<| Example |>|
-PE Control Flow
-===========================
+.. raw:: latex
+
+ \smallskip
+ \begin{rtbliteral}
+ def~f(\green{x},~\red{y}):~\\
+ ~~\green{x2}~=~\green{x}~*~\green{x}~\\
+ ~~\red{y2}~=~\red{y}~*~\red{y}~\\
+ ~~return~\green{x2}~+~\red{y2}
+ \end{rtbliteral}
+ \smallskip
+
+|end_example|
+
+|pause|
+|column2|
+|alert<| case x=10 |>|
+::
+
+ def f_10(y):
+ y2 = y * y
+ return 100 + y2
+
+|end_alert|
+|end_columns|
+
+
+Partial Evaluate Control Flow
+===============================
- red split points: schedule multiple compilation states
- merge points: merge logic to reuse code for equivalent states
-+-----------------------------+----------------------------+
-| | ``if`` :red:`x`: | | :green:`(case y != 0)` |
-| | ``print "x is true"`` | | ``if x:`` |
-| | ``if`` :green:`y`: | | ``print "x is true"`` |
-| | ``print "y is true"`` | | ``print "y is true"`` |
-+-----------------------------+----------------------------+
+|pause|
+|column1|
+|example<| Example |>|
+
+.. raw:: latex
+
+ \smallskip
+ \begin{rtbliteral}
+ if~\red{x}:\\
+ ~~print~"x is true"\\
+ if~\green{y}:\\
+ ~~print~"y is true"
+ \end{rtbliteral}
+ \smallskip
+
+|end_example|
+
+|pause|
+|column2|
+|alert<| case y != 0 |>|
+::
+
+ if x:
+ print "x is true"
+ print "y is true"
+
+
+|end_alert|
+|end_columns|
+
Promotion
=================
More information about the Pypy-commit
mailing list