Smalltalks-2017, La Plata, Argentina


Automated Reasoning and the Behavior of the Smalltalk VM

Author: Boris Shingarov
Affiliation: LabWare
Conference: 11th Smalltalks Conference, La Plata, 2017
Slides

Abstract:

In practical engineering of the Smalltalk VMs in industrial use today, the "Just-in-Time" native compiler is programmed via one or another form of direct expression of machine-language program-text output. As such, the execution engine definition is an entanglement of the VM programmer's intuition about what the bytecodes mean, with that person's intuition about what the machine instructions do. The reasoning about why the construct works is carried out informally in the programmer's head, and usually lost (discarded/forgotten) after the construct is written as source code; at best, we may be provided with a U-language remark in a comment.

Attempting to address this problem, the author built two different n-code generators based on two independent principles. In the first approach, the machine automatically finds instruction sequences using a unification algorithm which matches formal definitions of bytecode semantics to formal definitions of processor instruction semantics. In other words, the n-code generator is automatically inferred from a formal processor description. In the second approach, the transformations leading from bytecode to machine code are specified by the human programmer, but the semantics of each representation language is specified with enough formal rigor to allow a mechanical proof of semantic preservation, carried out in an automatic theorem prover.

In retrospect, it turns out that the two code generators are unexpectedly similar in fundamental operation. In this talk, we'll look at both and try to recognize some common principles which should be applicable universally to any effort towards rigorous Smalltalk execution engine construction.


Experiences with the Universally-Live Debugger

Author: Boris Shingarov
Affiliation: LabWare
Conference: 11th Smalltalks Conference, La Plata, 2017
Slides

Abstract:

The live nature of Smalltalk's development paradigm is among the most fundamental reasons of its effectiveness. Unfortunately, in some important cases this liveness gets in the way, for example when debugging low-level parts of the system on which the tools are themselves based. Another example is debugging-into-existence or testing of a partially constructed Smalltalk. Let alone working on the virtual machine itself: the VM programmer is left to use tools such as GDB which don't help in understanding complex VM/VI interactions.

In a number of previous publications, this author introduced the "Universally-Live Smalltalk Debugger" based on executing the "inner VM" under control of a "mother Smalltalk" to achieve four benefits:

  1. debugging of the low-level object engine within Smalltalk
  2. insight into interaction between the lowest levels of the system
  3. early integration testing and high-level debugging of incomplete software
  4. realizing those advantages that may be offered by the underlying debugging server technology, such as reversability, bug transportation, or non-traditional performance metrics.

In contrast to those previous publications which were focusing chiefly on the theoretical basis for ULD, this talk shows the actual experience of ULD's behavior in a matrix of different VM workloads (TAM, VLS) multiplied by different ISAs (PowerPC, AMD64, RISC-V) and different execution substrates (GEM5, OpenOCD, GDB). We hope to extend the discussion of ULD's application to the needs of the wider community.


Photos

The Conference:

La Catedral:

Casa Curutchet: