skip to main content
10.1145/3079368.3079402acmotherconferencesArticle/Chapter ViewAbstractPublication PagesprogrammingConference Proceedingsconference-collections
research-article

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

Published: 03 April 2017 Publication History

Abstract

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.

References

[1]
Davide Ancona, Massimo Ancona, Antonio Cuni, and Nicholas D. Matsakis. 2007. RPython: A Step Towards Reconciling Dynamically and Statically Typed OO Languages. In Proceedings of the 2007 Symposium on Dynamic Languages (DLS '07). ACM, New York, NY, USA, 53--64.
[2]
Edd Barrett, Carl Friedrich Bolz, and Laurence Tratt. 2013. Unipycation: A Case Study in Cross-language Tracing. In Proceedings of the 7th ACM Workshop on Virtual Machines and Intermediate Languages (VMIL '13). ACM, New York, NY, USA, 31--40.
[3]
Edd Barrett, Carl Friedrich Bolz, and Laurence Tratt. 2015. Approaches to interpreter composition. Computer Languages, Systems & Structures 44, Part C (2015), 199--217. arXiv:1409.0757
[4]
Spenser Bauman, Carl Friedrich Bolz, Robert Hirschfeld, Vasily Kirilichev, Tobias Pape, Jeremy G Siek, and Sam Tobin-Hochstadt. 2015. Pycket: A Tracing JIT for a Functional Language. In Proceedings of the 20th ACM SIGPLAN International Conference on Functional Programming (ICFP 2015), Vol. 50. ACM, New York, NY, USA, 22--34.
[5]
Carl Friedrich Bolz, Adrian Kuhn, Adrian Lienhard, Nicholas D. Matsakis, Oscar Nierstrasz, Lukas Renggli, Armin Rigo, and Toon Verwaest. 2008. Back to the Future in One Week --- Implementing a Smalltalk VM in PyPy. In Self-Sustaining Systems. Lecture Notes in Computer Science, Vol. 5146. Springer Berlin Heidelberg, Berlin, Heidelberg, 123--139.
[6]
Gilad Bracha. 2012. Debug mode is the only mode. https://gbracha.blogspot.com/2012/11/debug-mode-is-only-mode.html. (2012). Talk at the 2012 meeting of the IFPI TC2 Working Group on Language Design.
[7]
Gilad Bracha and David Ungar. 2004. Mirrors: design principles for meta-level facilities of object-oriented programming languages. In ACM SIGPLAN Notices, Vol. 39. ACM, 331--344.
[8]
Paul Butterworth, Allen Otis, and Jacob Stein. 1991. The GemStone Object Database Management System. Commun. ACM 34, 10 (Oct. 1991), 64--77.
[9]
L. A. Chamberland, S. F. Lymer, and A. G. Ryman. 1998. IBM VisualAge for Java. IBM Syst. J. 37, 3 (July 1998), 386--408.
[10]
Thomas E. Cheatham, Jr. 1969. Motivation for Extensible Languages. SIGPLAN Not. 4, 8 (Aug. 1969), 45--49.
[11]
Lukas Diekmann and Laurence Tratt. 2014. Eco: A Language Composition Editor. In Software Language Engineering: 7th International Conference, SLE 2014, Västerås, Sweden, September 15-16, 2014. Proceedings, Benoît Combemale, David J. Pearce, Olivier Barais, and Jurgen J. Vinju (Eds.). Springer International Publishing, Cham, 82--101.
[12]
Sebastian Erdweg, Tijs van der Storm, Markus Völter, Meinte Boersma, Remi Bosman, William R. Cook, Albert Gerritsen, Angelo Hulshout, Steven Kelly, Alex Loh, Gabriël D. P. Konat, Pedro J. Molina, Martin Palatnik, Risto Pohjonen, Eugen Schindler, Klemens Schindler, Riccardo Solmi, Vlad A. Vergu, Eelco Visser, Kevin van der Vlist, Guido H. Wachsmuth, and Jimi van der Woning. 2013. The State of the Art in Language Workbenches. In Software Language Engineering: 6th International Conference, SLE 2013, Indianapolis, IN, USA, October 26-28, 2013. Proceedings, Martin Erwig, Richard F. Paige, and Eric Van Wyk (Eds.). Number 8225 in Lecture Notes in Computer Science. Springer International Publishing, Cham, 197--217.
[13]
Tim Felgentreff. 2013. Topaz Ruby. http://lanyrd.com/2013/wrocloverb/sccygw/, https://github.com/topazproject/topaz. (March 2013). Invited Talk at the 2013 edition of Wroclove.rb.
[14]
Tim Felgentreff, Tobias Pape, Patrick Rein, and Robert Hirschfeld. 2016. How to Build a High-Performance VM for Squeak/Smalltalk in Your Spare Time: An Experience Report of Using the RPython Toolchain. In Proceedings of the 11th Edition of the International Workshop on Smalltalk Technologies (IWST'16). ACM, New York, NY, USA, Article 21, 10 pages.
[15]
Adele Goldberg. 1984. Smalltalk-80: The Interactive Programming Environment. Addison-Wesley Longman, Boston, MA, USA. The Red Book.
[16]
Adele Goldberg and David Robson. 1983. Smalltalk-80: The Language and Its Implementation. Addison-Wesley Longman, Boston, MA, USA. The Blue Book.
[17]
Matthias Grimmer, Chris Seaton, Thomas Würthinger, and Hanspeter Mössenböck. 2015. Dynamically Composing Languages in a Modular Way: Supporting C Extensions for Dynamic Languages. In Proceedings of the 14th International Conference on Modularity. ACM, New York, NY, USA, 1--13.
[18]
Dan Ingalls, Ted Kaehler, John Maloney, Scott Wallace, and Alan Kay. 1997. Back to the Future: The Story of Squeak, a Practical Smalltalk Written in Itself. SIGPLAN Not. 32, 10 (Oct. 1997), 318--326.
[19]
Microsoft. 2017. Debugging in Visual Studio. (Jan. 2017). https://msdn.microsoft.com/en-us/library/sc65sadd(d=default,l=en-us,v=vs.140).aspx
[20]
Eliot Miranda. 2011. The Cog Smalltalk Virtual Machine: Writing a JIT in a High-level Dynamic Language. In 5th Workshop on Virtual Machines and Intermediate Languages (VMIL).
[21]
Michael Perscheid, Michael Haupt, Robert Hirschfeld, and Hidehiko Masuhara. 2012. Test-driven fault navigation for debugging reproducible failures. Information and Media Technologies 7, 4 (2012), 1377--1400.
[22]
M Ragan-Kelley, F Perez, B Granger, T Kluyver, P Ivanov, J Frederic, and M Bussonier. 2014. The Jupyter/IPython architecture: a unified view of computational research, from interactive exploration to communication and publication. In AGU Fall Meeting Abstracts, Vol. 1. 07.
[23]
Lukas Renggli, Tudor Gîrba, and Oscar Nierstrasz. 2010. Embedding Languages without Breaking Tools. In ECOOP 2010 -- Object-Oriented Programming: 24th European Conference, Maribor, Slovenia, June 21-25, 2010. Proceedings, Theo D'Hondt (Ed.). Springer Berlin Heidelberg, Berlin, Heidelberg, 380--404.
[24]
Armin Rigo and Samuele Pedroni. 2006. PyPy's approach to virtual machine construction. In Companion to the 21st ACM SIGPLAN symposium on Object-oriented programming systems, languages, and applications (OOPSLA '06). ACM, New York, NY, USA, 944--953.
[25]
Chris Seaton, Michael L. Van De Vanter, and Michael Haupt. 2014. Debugging at Full Speed. In Proceedings of the Workshop on Dynamic Languages and Applications (Dyla'14). ACM, New York, NY, USA, Article 2, 13 pages.
[26]
Matthias Springer. 2016. Inter-language Collaboration in an Object-oriented Virtual Machine. arXiv preprint (2016). arXiv:1606.03644
[27]
Richard M. Stallman, Roland Pesch, and Stan Shebs. 2011. Debugging with GDB: The GNU Source-Level Debugger, V 7.3.1 (10th ed.). GNU Press, Boston, MA, USA.
[28]
Marcel Taeumel, Bastian Steinert, and Robert Hirschfeld. 2012. The VIVIDE programming environment: connecting run-time information with programmers' system knowledge. In Proceedings of the ACM International Symposium on New Ideas, New Paradigms, and Reflections on Programming and Software (Onward! 2012). ACM, New York, NY, USA, 117--126.
[29]
Steven L Tanimoto. 2013. A perspective on the evolution of live programming. In Live Programming (LIVE), 2013 1st International Workshop on. IEEE, 31--34.
[30]
Michael L. Van De Vanter. 2015. Building Debuggers and Other Tools: We Can "Have It All". In Proceedings of the 10th Workshop on Implementation, Compilation, Optimization of Object-Oriented Languages, Programs and Systems (ICOOOLPS '15). ACM, New York, NY, USA, Article 2, 3 pages.
[31]
Bret Victor. 2012. Stop drawing dead fish. (May 2012). http://san-francisco.siggraph.org/stop-drawing-dead-fish/ Talk to the San Fransicso ACM SIG-GRAPH.

Recommendations

Comments

Information & Contributors

Information

Published In

cover image ACM Other conferences
Programming '17: Companion Proceedings of the 1st International Conference on the Art, Science, and Engineering of Programming
April 2017
193 pages
ISBN:9781450348362
DOI:10.1145/3079368
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 the author(s) 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].

In-Cooperation

  • AOSA: Aspect-Oriented Software Association

Publisher

Association for Computing Machinery

New York, NY, United States

Publication History

Published: 03 April 2017

Permissions

Request permissions for this article.

Check for updates

Author Tags

  1. IDEs
  2. Python
  3. Smalltalk
  4. VMs
  5. debuggers

Qualifiers

  • Research-article
  • Research
  • Refereed limited

Conference

Programming '17

Contributors

Other Metrics

Bibliometrics & Citations

Bibliometrics

Article Metrics

  • 0
    Total Citations
  • 97
    Total Downloads
  • Downloads (Last 12 months)5
  • Downloads (Last 6 weeks)2
Reflects downloads up to 20 Feb 2025

Other Metrics

Citations

View Options

Login options

View options

PDF

View or Download as a PDF file.

PDF

eReader

View online with eReader.

eReader

Figures

Tables

Media

Share

Share

Share this Publication link

Share on social media