Squeak Makes a Good Python Debugger: Bringing Other Programming Languages Into Smalltalk's Tools

Interactive debuggers are indispensable in many software development scenarios. However, they are often hard to extend and more importantly, their capabilities are limited to an application programming interface (API) provided by the runtime executing the corresponding programming language. We propose an approach that allows to use the live tools of a Smalltalk environment for other programming languages. The approach is based on interpreter-level composition, ultimately making a full-fledged integrated development environment (IDE) part of the language execution process. This allows to directly control interpreters of foreign languages from Smalltalk. It also enables tool reuse and provides the ability to rapidly build new tools. We demonstrate how we have combined Squeak/Smalltalk and PyPy's Python implementation. We then reused Squeak's debugger, so that it enables edit-and-continue style debugging of Python applications---which is currently not supported by Python's PDB or any Python IDE, but which has proven to be invaluable in many debugging scenarios.

[1]  Michael Perscheid,et al.  Test-driven Fault Navigation for Debugging Reproducible Failures , 2012, Inf. Media Technol..

[2]  David Robson,et al.  Smalltalk-80: The Language and Its Implementation , 1983 .

[3]  Robert Hirschfeld,et al.  The VIVIDE programming environment: connecting run-time information with programmers' system knowledge , 2012, Onward! 2012.

[4]  Oscar Nierstrasz,et al.  Embedding Languages without Breaking Tools , 2010, ECOOP.

[5]  Laurence Tratt,et al.  Approaches to interpreter composition , 2014, Comput. Lang. Syst. Struct..

[6]  Jacob Stein,et al.  The GemStone object database management system , 1991, CACM.

[7]  Michael Haupt,et al.  Debugging at Full Speed , 2014, Dyla'14.

[8]  Gilad Bracha,et al.  Mirrors: design principles for meta-level facilities of object-oriented programming languages , 2004, OOPSLA.

[9]  Oscar Nierstrasz,et al.  Back to the Future in One Week - Implementing a Smalltalk VM in PyPy , 2008, S3.

[10]  Sam Tobin-Hochstadt,et al.  Pycket: a tracing JIT for a functional language , 2015, ICFP.

[11]  Matthias Springer,et al.  Inter-language Collaboration in an Object-oriented Virtual Machine , 2016, ArXiv.

[12]  Arthur G. Ryman,et al.  IBM VisualAge for Java , 1998, IBM Syst. J..

[13]  Adele Goldberg,et al.  Smalltalk-80 - the interactive programming environment , 1984 .

[14]  Hanspeter Mössenböck,et al.  Dynamically composing languages in a modular way: supporting C extensions for dynamic languages , 2015, MODULARITY.

[15]  Thomas E. Cheatham Motivation for extensible languages , 1969, SIGP.

[16]  Eelco Visser,et al.  The State of the Art in Language Workbenches - Conclusions from the Language Workbench Challenge , 2013, SLE.

[17]  Laurence Tratt,et al.  Eco: A Language Composition Editor , 2014, SLE.

[18]  M. Ragan-Kelley,et al.  The Jupyter/IPython architecture: a unified view of computational research, from interactive exploration to communication and publication. , 2014 .

[19]  Steven L. Tanimoto,et al.  A perspective on the evolution of live programming , 2013, 2013 1st International Workshop on Live Programming (LIVE).

[20]  Eliot Miranda The Cog Smalltalk Virtual Machine writing a JIT in a high-level dynamic language , 2011 .

[21]  Robert Hirschfeld,et al.  How to Build a High-Performance VM for Squeak/Smalltalk in Your Spare Time: An Experience Report of Using the RPython Toolchain , 2016, IWST.

[22]  Michael L. Van de Vanter Building debuggers and other tools: we can "have it all" , 2015, ICOOOLPS@ECOOP.

[23]  John Maloney,et al.  Back to the Future The Story of Squeak, A Practical Smalltalk Written in Itself , 1997 .

[24]  Samuele Pedroni,et al.  PyPy's approach to virtual machine construction , 2006, OOPSLA '06.

[25]  Richard M. Stallman,et al.  Debugging with GDB: The GNU Source-Level Debugger , 1999 .

[26]  Davide Ancona,et al.  RPython: a step towards reconciling dynamically and statically typed OO languages , 2007, DLS '07.

[27]  Laurence Tratt,et al.  Unipycation: a case study in cross-language tracing , 2013, VMIL '13.