Skip to content

hpi-swa-lab/babylonian-programming-smalltalk

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Babylonian Programming / Smalltalk

Build Status Main Build Status Develop

A Smalltalk implementation of Babylonian Programming, enabling Example-based Live Programming for whole systems (for more details on Example-based Live Programming, see publications at the end).

How to install

  1. Get a recent Squeak
  2. Load Metacello
  3. Finally, load Babylonian/S with the following command:
Metacello new
  baseline: 'BabylonianProgramming';
  repository: 'github://hpi-swa-lab/babylonian-programming-smalltalk:main/packages';
  load.
  1. (Recommended) Disable the preference for notifications on saving methods with styles. This prevents that you will be asked whether you want to save style information whenever you save a method with probes.
Preferences disable: #confirmFirstUseOfStyle.

Current State

Babylonian/S screenshot

How To Ensure Tracing for Own Classes

When using Babylonian in your own development, make sure to add

compilerClass

	^ BPCompiler

on your class' side. Otherwise, the trace will disregard that class for performance reasons.

Babylonian ProbeLog

Due to their self-contained nature, traced values of multiple annotations are not entangled, meaning developers must manually reconstruct the program flow in order to know which trace values precede or succeed others in different annotations (possibly throughout different methods). To solve this problem, one can use the ProbeLog. It sets probes and assertions - independent from their origin - into a chronological context. Hence, truthfully bringing printf-like tracing with live feedback to Babylonian Programming. The ProbeLog additionally offers multiple features to enhance it from typical printf-traces:

  • Start debugging from a certain point in the trace by clicking the pause button
  • Know which methods were called starting from an example to the responding trace value with the generated Flame Graph
  • Navigate to a trace value's or example's origin by clicking on it
  • Change an example directly from a lane's title
  • Filter trace values of an annotation by clicking on the eye-icon
  • Double click a trace value to highlight its originating annotation (given the responding morph is visible)
  • Individualize your trace with the ProbeLog's theme support

More detailed information on the interactions and classes can be read here.

image

Related Projects

Related Publications

To cite this work, please use the COP'19 and the Programming'19 paper.

  • Patrick Rein, Jens Lincke, Stefan Ramson, Toni Mattis, Fabio Niephaus, and Robert Hirschfeld. Implementing Babylonian/S by Putting Examples Into Contexts: Tracing Instrumentation for Example-based Live Programming as a Use Case for Context-oriented Programming. In Proceedings of the Workshop on Context-oriented Programming (COP) 2019, co-located with the European Conference on Object-oriented Programming (ECOOP), London, UK, July 15, 2019, ACM DL.
    doi Preprint

  • David Rauch, Patrick Rein, Stefan Ramson, Jens Lincke, and Robert Hirschfeld. Babylonian-style Programming: Design and Implementation of an Integration of Live Examples Into General-purpose Source Code. In Journal on The Art, Science, and Engineering of Programming, vol. 3, no. 3, art. 9, 39 pages, 2019.
    doi Preprint

  • Fabio Niephaus, Patrick Rein, Jakob Edding, Jonas Hering, Bastian König, Kolya Opahle, Nico Scordialo, and Robert Hirschfeld. Example-Based Live Programming for Everyone: Building Language-agnostic Tools for Live Programming With LSP and GraalVM. In Proceedings of the ACM Symposium for New Ideas, New Paradigms, and Reflections on Everything to do with Programming and Software (Onward!) 2020, co-located with the Conference on Object-oriented Programming, Systems, Languages, and Applications (OOPSLA), pages 108-124, Chicago, United States, November 17-18, 2020, ACM DL.
    doi Preprint