[go: up one dir, main page]
More Web Proxy on the site http://driver.im/ skip to main content
10.1145/1176617.1176753acmconferencesArticle/Chapter ViewAbstractPublication PagessplashConference Proceedingsconference-collections
Article

PyPy's approach to virtual machine construction

Published: 22 October 2006 Publication History

Abstract

The PyPy project seeks to prove both on a research and a practical level the feasibility of constructing a virtual machine (VM) for a dynamic language in a dynamic language - in this case, Python. The aim is to translate (i.e. compile) the VM to arbitrary target environments, ranging in level from C/Posix to Smalltalk/Squeak via Java and CLI/.NET, while still being of reasonable efficiency within these environments.A key tool to achieve this goal is the systematic reuse of the Python language as a system programming language at various levels of our architecture and translation process. For each level, we design a corresponding type system and apply a generic type inference engine - for example, the garbage collector is written in a style that manipulates simulated pointer and address objects, and when translated to C these operations become C-level pointer and address instructions.

References

[1]
B. Alpern, C. R. Attanasio, J. J. Barton, M. G. Burke, P. Cheng, J.-D. Choi, A. Cocchi, S. J. Fink, D. Grove, M. Hind, S. F. Hummel, D. Lieber, V. Litvinov, M. F. Mergen, T. Ngo, J. R. Russell, V. Sarkar, M. J. Serrano, J. C. Shepherd, S. E. Smith, V. C. Sreedhar, H. Srinivasan, and J. Whaley. The Jalapeno virtual machine. IBM Systems Journal, 39(1):211--, 2000.
[2]
C. S. Ananian. The static single information form. Master's thesis, Massachusetts Institute of Technology, September 1999.
[3]
M. Arnold, S. Fink, D. Grove, M. Hind, and P. F. Sweeney. Architecture and policy for adaptive optimization in virtual machines. Technical Report 23429, IBM Research, November 2004.
[4]
AT&T. Graphviz - graph visualization software. http://www.graphviz.org/.
[5]
S. M. Blackburn, P. Cheng, and K. S. McKinley. Oil and Water? High Performance Garbage Collection in Java with MMTk. In ICSE, pages 137--146, 2004.
[6]
H. Boehm. A garbage collector for C and C++. http://www.hpl.hp.com/personal/Hans_Boehm/gc/.
[7]
H.-J. Boehm and M. Weiser. Garbage collection in an uncooperative environment. Softw. Pract. Exper., 18(9):807--820, 1988.
[8]
G. Bracha. Pluggable type systems. In OOPSLA04 Workshop on Revival of Dynamic Languages, October 2004.
[9]
R. Cytron, J. Ferrante, B. K. Rosen, M. N. Wegman, and F. K. Zadeck. Efficiently computing static single assignment form and the control dependence graph. ACM Transactions on Programming Languages and Systems, 13(4):451--490, October 1991.
[10]
L. Damas and R. Milner. Principal type-schemes for functional programs. In POPL '82: Proceedings of the 9th ACM SIGPLAN-SIGACT symposium on Principles of programming languages, pages 207--212, New York, NY, USA, 1982. ACM Press.
[11]
D. Ingalls, T. Kaehler, J. Maloney, S. Wallace, and A. Kay. Back to the future: the story of Squeak, a practical Smalltalk written in itself. In OOPSLA '97: Proceedings of the 12th ACM SIGPLAN conference on Object-oriented programming, systems, languages, and applications, pages 318--326, New York, NY, USA, 1997. ACM Press.
[12]
N. Jones, C. Gomard, and P. Sestoft. Partial Evaluation and Automatic Program Generation. P-H, 1993.
[13]
R. Kelsey. Pre-scheme: A scheme dialect for systems programming.
[14]
C. Lattner and V. Adve. LLVM: A Compilation Framework for Lifelong Program Analysis & Transformation. In Proceedings of the 2004 International Symposium on Code Generation and Optimization (CGO'04), Palo Alto, California, Mar 2004.
[15]
R. Milner. A theory of type polymorphism in programming. J. Comput. Syst. Sci., 17(3):348--375, 1978.
[16]
PyPy Team. PyPy - Architecture Overview. Web page. http://codespeak.net/pypy/dist/pypy/doc/archi-tecture.html.
[17]
PyPy Team. PyPy - Translation. Web page, in-progress. http://codespeak.net/pypy/dist/pypy/doc/trans-lation.html.
[18]
PyPy Team. Complete python implementation running on top of cpython. Technical report, PyPy Consortium, 2005. http://codespeak.net/svn/pypy/extradoc/eu-report/.
[19]
A. Rigo. Representation-based just-in-time specialization and the psyco prototype for python. In PEPM '04: Proceedings of the 2004 ACM SIGPLAN symposium on Partial evaluation and semantics-based program manipulation, pages 15--26, New York, NY, USA, 2004. ACM Press.
[20]
A. Rigo, M. Hudson, and S. Pedroni. Compiling dynamic language implementations. Technical report, PyPy Consortium, 2005. http://codespeak.net/svn/pypy/extradoc/eu-report/.
[21]
D. Ungar, A. Spitz, and A. Ausch. Constructing a metacircular virtual machine in an exploratory programming environment. In OOPSLA '05: Companion to the 20th annual ACM SIGPLAN conference on Object-oriented programming, systems, languages, and applications, pages 11--20, New York, NY, USA, 2005. ACM Press.
[22]
G. van Rossum et al. CPython 2.4.3, March 2006. http://www.python.org/download/releases/2.4.3/.
[23]
T. Wang and S. F. Smith. Precise constraint-based type inference for java. In ECOOP '01: Proceedings of the 15th European Conference on Object-Oriented Programming, pages 99--117, London, UK, 2001. Springer-Verlag.
[24]
R. P. Weicker. Dhrystone benchmark: rationale for version 2 and measurement rules. SIGPLAN Not., 23(8):49--62, 1988.

Cited By

View all
  • (2024)HiPy: Extracting High-Level Semantics from Python Code for Data ProcessingProceedings of the ACM on Programming Languages10.1145/36897378:OOPSLA2(736-762)Online publication date: 8-Oct-2024
  • (2023)Evaluating the Impact of Possible Dependencies on Architecture-Level MaintainabilityIEEE Transactions on Software Engineering10.1109/TSE.2022.317128849:3(1064-1085)Online publication date: 1-Mar-2023
  • (2023)Pattern-based circular reference detection in PythonScience of Computer Programming10.1016/j.scico.2023.102932227(102932)Online publication date: Apr-2023
  • Show More Cited By

Recommendations

Comments

Please enable JavaScript to view thecomments powered by Disqus.

Information & Contributors

Information

Published In

cover image ACM Conferences
OOPSLA '06: Companion to the 21st ACM SIGPLAN symposium on Object-oriented programming systems, languages, and applications
October 2006
530 pages
ISBN:159593491X
DOI:10.1145/1176617
  • General Chair:
  • Peri Tarr,
  • Program Chair:
  • William R. Cook
Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than ACM must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from [email protected]

Sponsors

Publisher

Association for Computing Machinery

New York, NY, United States

Publication History

Published: 22 October 2006

Permissions

Request permissions for this article.

Check for updates

Author Tags

  1. Python
  2. metacircularity
  3. retargettable code generation
  4. type inference
  5. virtual machine

Qualifiers

  • Article

Conference

OOPSLA06
Sponsor:

Upcoming Conference

Contributors

Other Metrics

Bibliometrics & Citations

Bibliometrics

Article Metrics

  • Downloads (Last 12 months)40
  • Downloads (Last 6 weeks)9
Reflects downloads up to 22 Dec 2024

Other Metrics

Citations

Cited By

View all
  • (2024)HiPy: Extracting High-Level Semantics from Python Code for Data ProcessingProceedings of the ACM on Programming Languages10.1145/36897378:OOPSLA2(736-762)Online publication date: 8-Oct-2024
  • (2023)Evaluating the Impact of Possible Dependencies on Architecture-Level MaintainabilityIEEE Transactions on Software Engineering10.1109/TSE.2022.317128849:3(1064-1085)Online publication date: 1-Mar-2023
  • (2023)Pattern-based circular reference detection in PythonScience of Computer Programming10.1016/j.scico.2023.102932227(102932)Online publication date: Apr-2023
  • (2023)Python meets JIT compilers: A simple implementation and a comparative evaluationSoftware: Practice and Experience10.1002/spe.326754:2(225-256)Online publication date: 5-Sep-2023
  • (2022)RegCPython: A Register-based Python Interpreter for Better PerformanceACM Transactions on Architecture and Code Optimization10.1145/356897320:1(1-25)Online publication date: 16-Dec-2022
  • (2022)Ease Virtual Machine Level Tooling with Language Level Ordinary Object PointersProceedings of the 14th ACM SIGPLAN International Workshop on Virtual Machines and Intermediate Languages10.1145/3563838.3567676(1-12)Online publication date: 29-Nov-2022
  • (2022)Exploiting Metaobjects to Reinforce Data Leakage AttacksProceedings of the 25th International Symposium on Research in Attacks, Intrusions and Defenses10.1145/3545948.3545965(17-29)Online publication date: 26-Oct-2022
  • (2022)Differential testing of simulation-based VM generatorsProceedings of the 37th ACM/SIGAPP Symposium on Applied Computing10.1145/3477314.3507171(1280-1283)Online publication date: 25-Apr-2022
  • (2022)An Empirical Study of Type-Related Defects in Python ProjectsIEEE Transactions on Software Engineering10.1109/TSE.2021.308206848:8(3145-3158)Online publication date: 1-Aug-2022
  • (2022)Differential Testing of Simulation-Based Virtual Machine GeneratorsReuse and Software Quality10.1007/978-3-031-08129-3_7(103-119)Online publication date: 10-Jun-2022
  • Show More Cited By

View Options

Login options

View options

PDF

View or Download as a PDF file.

PDF

eReader

View online with eReader.

eReader

Media

Figures

Other

Tables

Share

Share

Share this Publication link

Share on social media