Introduction - Background The Problem Our Approach Results - Future Work

High-Level Debuggers: facilities and interfaces Design and Development of a debug-oriented I..E.

by Nikos Papoylias

Committee: Assistant Professor Michail G. Lagoudakis (Supervisor) Assistant Professor Katerina Mania Assistant Professor Vasilis Samoladas Departement of Electronic and Computer Engineering Technical University of Crete, 2009

Nikos Papoylias High-Level Debuggers Introduction - Background The Problem Our Approach Results - Future Work What is this all about ?

From the broad spectrum of computer science we concern ourselves with the fields of: Programming Languages and Tools Human-Computer Interaction More specifically we deal with: Debugging Systems Integrated Development Environments (I.D.Es) By proposing both theoritically and technologically ways to improve these systems.

Nikos Papoylias High-Level Debuggers Introduction - Background The Problem Our Approach Results - Future Work Outline

1 Introduction - Background Motivation: Automation, Debugging and I.D.Es Symbolic-Debuggers, front-ends and systems 2 The Problem The current situation High-Level debugging Related Work 3 Our Approach Rethinking the Debugging Information Flow The 5 pillars of our HLD systems Implementation 4 Results - Future Work Live Demo Future Work

Nikos Papoylias High-Level Debuggers Introduction - Background The Problem Motivation: Automation, Debugging and I.D.Es Our Approach Symbolic-Debuggers, front-ends and systems Results - Future Work Outline

1 Introduction - Background Motivation: Automation, Debugging and I.D.Es Symbolic-Debuggers, front-ends and systems 2 The Problem The current situation High-Level debugging Related Work 3 Our Approach Rethinking the Debugging Information Flow The 5 pillars of our HLD systems Implementation 4 Results - Future Work Live Demo Future Work

Nikos Papoylias High-Level Debuggers Introduction - Background The Problem Motivation: Automation, Debugging and I.D.Es Our Approach Symbolic-Debuggers, front-ends and systems Results - Future Work The Development cycle and debugging

Debuggers are the cardiographs of software

While the term ’debugger’ is attributed to Grace Hopper creator of Cobol. . . debugging as a process is in fact a general characteristic of all human labor.

Nikos Papoylias High-Level Debuggers Introduction - Background The Problem Motivation: Automation, Debugging and I.D.Es Our Approach Symbolic-Debuggers, front-ends and systems Results - Future Work Project workflow and I.D.Es

The succession of programming processes, like coding and debugging, determine the ’project’s workflow’ Debugging and testing cover roughly 50% of this workflow in time An I.D.E. automates and organizes the different parts of the workflow

Nikos Papoylias High-Level Debuggers Introduction - Background The Problem Motivation: Automation, Debugging and I.D.Es Our Approach Symbolic-Debuggers, front-ends and systems Results - Future Work Project workflow and I.D.Es

Emacs was one of the first such integration environment system:

Nikos Papoylias High-Level Debuggers Introduction - Background The Problem Motivation: Automation, Debugging and I.D.Es Our Approach Symbolic-Debuggers, front-ends and systems Results - Future Work Project workflow and I.D.Es

that set an example for modern I.D.Es (Anjuta)

Nikos Papoylias High-Level Debuggers Introduction - Background The Problem Motivation: Automation, Debugging and I.D.Es Our Approach Symbolic-Debuggers, front-ends and systems Results - Future Work Outline

1 Introduction - Background Motivation: Automation, Debugging and I.D.Es Symbolic-Debuggers, front-ends and systems 2 The Problem The current situation High-Level debugging Related Work 3 Our Approach Rethinking the Debugging Information Flow The 5 pillars of our HLD systems Implementation 4 Results - Future Work Live Demo Future Work

Nikos Papoylias High-Level Debuggers Introduction - Background The Problem Motivation: Automation, Debugging and I.D.Es Our Approach Symbolic-Debuggers, front-ends and systems Results - Future Work Debugging inner-workings

System layers and facilities of debugging:

Nikos Papoylias High-Level Debuggers Introduction - Background The Problem Motivation: Automation, Debugging and I.D.Es Our Approach Symbolic-Debuggers, front-ends and systems Results - Future Work Debugging information flow

A typical debugging information flow:

Nikos Papoylias High-Level Debuggers Introduction - Background The Problem Motivation: Automation, Debugging and I.D.Es Our Approach Symbolic-Debuggers, front-ends and systems Results - Future Work Symbolic debugging facilities

A symbolic debugger – like gdb: Allows you to monitor what is going on ’inside’ your program Start your program, specifing anyting that might affect it’s behaviour Make your program stop on specified conditions Examine what has happened when your program stopped or crashed Change things in your program and continue execution

Nikos Papoylias High-Level Debuggers Introduction - Background The Problem Motivation: Automation, Debugging and I.D.Es Our Approach Symbolic-Debuggers, front-ends and systems Results - Future Work Symbolic debugging facilities

Line by line navigation step in, step out, step over. . .

Stack Examination backtrace, up, down. . .

Breakpoints, Watchpoints, Catchpoints break main.:37, watch . . .

Data evaluation/editing print . . .

Nikos Papoylias High-Level Debuggers Introduction - Background The Problem Motivation: Automation, Debugging and I.D.Es Our Approach Symbolic-Debuggers, front-ends and systems Results - Future Work Front-Ends and I.D.Es

Most I.D.Es today, supply a simple front-end to a symbolic debugger:

Nikos Papoylias High-Level Debuggers Introduction - Background The Problem Motivation: Automation, Debugging and I.D.Es Our Approach Symbolic-Debuggers, front-ends and systems Results - Future Work Debugging Systems

While few, function as debugging systems providing some additional facilities, like DDD, Gnat or JBixle do:

Nikos Papoylias High-Level Debuggers Introduction - Background The current situation The Problem High-Level debugging Our Approach Related Work Results - Future Work Outline

1 Introduction - Background Motivation: Automation, Debugging and I.D.Es Symbolic-Debuggers, front-ends and systems 2 The Problem The current situation High-Level debugging Related Work 3 Our Approach Rethinking the Debugging Information Flow The 5 pillars of our HLD systems Implementation 4 Results - Future Work Live Demo Future Work

Nikos Papoylias High-Level Debuggers Introduction - Background The current situation The Problem High-Level debugging Our Approach Related Work Results - Future Work The current situation

Stagnation. . . Today’s advancement in IDEs although constantly offering new features and facilites has left debugging system nearly where there were 20 or more years ago. Adoption of academically proposed features ranges from slow to none.

Nikos Papoylias High-Level Debuggers Introduction - Background The current situation The Problem High-Level debugging Our Approach Related Work Results - Future Work Outline

1 Introduction - Background Motivation: Automation, Debugging and I.D.Es Symbolic-Debuggers, front-ends and systems 2 The Problem The current situation High-Level debugging Related Work 3 Our Approach Rethinking the Debugging Information Flow The 5 pillars of our HLD systems Implementation 4 Results - Future Work Live Demo Future Work

Nikos Papoylias High-Level Debuggers Introduction - Background The current situation The Problem High-Level debugging Our Approach Related Work Results - Future Work High-Level debugging

Our Proposition: "High-level debugging systems" that can intergrate legacy technologies, not by just providing ’graphical access’ but by offering more sophisticated methods of monitoring a software system and new ways for a to form his development cycle.

Nikos Papoylias High-Level Debuggers Introduction - Background The current situation The Problem High-Level debugging Our Approach Related Work Results - Future Work Outline

1 Introduction - Background Motivation: Automation, Debugging and I.D.Es Symbolic-Debuggers, front-ends and systems 2 The Problem The current situation High-Level debugging Related Work 3 Our Approach Rethinking the Debugging Information Flow The 5 pillars of our HLD systems Implementation 4 Results - Future Work Live Demo Future Work

Nikos Papoylias High-Level Debuggers Introduction - Background The current situation The Problem High-Level debugging Our Approach Related Work Results - Future Work Related Work

Published Related Work Domain-specific debugging languages (Duel,opium, others) Replay, reverse debugging and tracing Language-aware tools, Harmonia Project – Berkeley A lot of work on parallel execution

Nikos Papoylias High-Level Debuggers Introduction - Background The current situation The Problem High-Level debugging Our Approach Related Work Results - Future Work Related Work

Related Technological Advancements Gdb 7.0 debugging-scripting, reverse execution JBixle call-graph and data-visualizations (much like ddd) ODB, Cisco debugger and others reverse execution Visual Studio’s visualisers Mathematica Arbitary computation and math visualisations

Nikos Papoylias High-Level Debuggers Introduction - Background Rethinking the Debugging Information Flow The Problem The 5 pillars of our HLD systems Our Approach Implementation Results - Future Work Outline

1 Introduction - Background Motivation: Automation, Debugging and I.D.Es Symbolic-Debuggers, front-ends and systems 2 The Problem The current situation High-Level debugging Related Work 3 Our Approach Rethinking the Debugging Information Flow The 5 pillars of our HLD systems Implementation 4 Results - Future Work Live Demo Future Work

Nikos Papoylias High-Level Debuggers Introduction - Background Rethinking the Debugging Information Flow The Problem The 5 pillars of our HLD systems Our Approach Implementation Results - Future Work Rethinking the debugging information flow

Rearranging the ..

Figure: Before Figure: After

Nikos Papoylias High-Level Debuggers Introduction - Background Rethinking the Debugging Information Flow The Problem The 5 pillars of our HLD systems Our Approach Implementation Results - Future Work Outline

1 Introduction - Background Motivation: Automation, Debugging and I.D.Es Symbolic-Debuggers, front-ends and systems 2 The Problem The current situation High-Level debugging Related Work 3 Our Approach Rethinking the Debugging Information Flow The 5 pillars of our HLD systems Implementation 4 Results - Future Work Live Demo Future Work

Nikos Papoylias High-Level Debuggers Introduction - Background Rethinking the Debugging Information Flow The Problem The 5 pillars of our HLD systems Our Approach Implementation Results - Future Work The 5 pillars of our HLD System

1. Syntax-aware navigation and debugging breadth-first (bottom-up) navigation depth-first navigation (human mode) referenced variables instead of local symbol-browsing, completion, refactoring . . .

Nikos Papoylias High-Level Debuggers Introduction - Background Rethinking the Debugging Information Flow The Problem The 5 pillars of our HLD systems Our Approach Implementation Results - Future Work The 5 pillars of our HLD System

2. Data Visualisation Data as diagrams of abstract graphs and networks a generic A.P.I. for visualising language-oriented datatypes editing and updating, graph expansion, layout capabilites. . .

Nikos Papoylias High-Level Debuggers Introduction - Background Rethinking the Debugging Information Flow The Problem The 5 pillars of our HLD systems Our Approach Implementation Results - Future Work The 5 pillars of our HLD System

3. General-purpose extention language total control over our parser, visulisation sub-system, symbolic-debugger high-level debugging A.P.I. inter-language evaluation, python to C calls

Nikos Papoylias High-Level Debuggers Introduction - Background Rethinking the Debugging Information Flow The Problem The 5 pillars of our HLD systems Our Approach Implementation Results - Future Work The 5 pillars of our HLD System

4. Reverse Debugging Community proposal, high-priority project for FSF based on experimental work done for gdb our implementation integrates syntax-navigation i.e stepping back whole structures can exhibit memory enhancements through selective recording

Nikos Papoylias High-Level Debuggers Introduction - Background Rethinking the Debugging Information Flow The Problem The 5 pillars of our HLD systems Our Approach Implementation Results - Future Work The 5 pillars of our HLD System

5. Innovative interfaces New graphic widgets, dual-panel, graph-widget, console, icon groups . . . Fully scriptable, on-line extentible environment New project management and web-documentation approaches Speech input for debugging controls

Nikos Papoylias High-Level Debuggers Introduction - Background Rethinking the Debugging Information Flow The Problem The 5 pillars of our HLD systems Our Approach Implementation Results - Future Work Outline

1 Introduction - Background Motivation: Automation, Debugging and I.D.Es Symbolic-Debuggers, front-ends and systems 2 The Problem The current situation High-Level debugging Related Work 3 Our Approach Rethinking the Debugging Information Flow The 5 pillars of our HLD systems Implementation 4 Results - Future Work Live Demo Future Work

Nikos Papoylias High-Level Debuggers Introduction - Background Rethinking the Debugging Information Flow The Problem The 5 pillars of our HLD systems Our Approach Implementation Results - Future Work Overview

Five interconnected sub-systems constitute the core: the syntax-parser the symbolic debugger the graph-visualisation sub-system the extention environment and language the project-management module On top of them, lie: High-level debugging A.P.I User interface and facilities

Nikos Papoylias High-Level Debuggers Introduction - Background Rethinking the Debugging Information Flow The Problem The 5 pillars of our HLD systems Our Approach Implementation Results - Future Work Technologies

Over a dozen different technologies and software used. Multi-language approach in C and Python. syntax parser: flex, bison, libc, (n-ary trees), LALR(1) parser symbolic debugger: gdb/mi, PLY visualisation, interfaces: +, , graphviz, dot-language, pocketsphinx, wsj-corpora project management: gnu-make, pkg-config hld-api and scripting: python-introspection, gdb/mi

Nikos Papoylias High-Level Debuggers Introduction - Background The Problem Live Demo Our Approach Future Work Results - Future Work Outline

1 Introduction - Background Motivation: Automation, Debugging and I.D.Es Symbolic-Debuggers, front-ends and systems 2 The Problem The current situation High-Level debugging Related Work 3 Our Approach Rethinking the Debugging Information Flow The 5 pillars of our HLD systems Implementation 4 Results - Future Work Live Demo Future Work

Nikos Papoylias High-Level Debuggers Introduction - Background The Problem Live Demo Our Approach Future Work Results - Future Work Live@Lust

Nikos Papoylias High-Level Debuggers Introduction - Background The Problem Live Demo Our Approach Future Work Results - Future Work Outline

1 Introduction - Background Motivation: Automation, Debugging and I.D.Es Symbolic-Debuggers, front-ends and systems 2 The Problem The current situation High-Level debugging Related Work 3 Our Approach Rethinking the Debugging Information Flow The 5 pillars of our HLD systems Implementation 4 Results - Future Work Live Demo Future Work

Nikos Papoylias High-Level Debuggers Introduction - Background The Problem Live Demo Our Approach Future Work Results - Future Work Misha .IDE innovative and complete

This was only the beggining of our trip from an innovative I.D.E to a complete solution: Interfaces for legacy facilities: catchpoints, watchpoints, tracing

Other common features of I.D.Es: refactoring, unit-testing, profiling, revisioning, ui-design

Nikos Papoylias High-Level Debuggers Introduction - Background The Problem Live Demo Our Approach Future Work Results - Future Work H.L.D. system improvements

We want to further integrate the syntax-parser with the rest of the system: for reverse-debugging memory optimizations for static code analysis on multi-threaded projects for call-graph representations and breakpoints to support incremental parsing

Nikos Papoylias High-Level Debuggers Introduction - Background The Problem Live Demo Our Approach Future Work Results - Future Work Multi-Language, multi-purpose environments

Probing Further: New ideas that have emerged Bidirectional seamless interconnection of more than two languages Desktop and web2.0 unification under one source Literal WYSIWYM programming ..and much, much more in Misha R.evolution

Nikos Papoylias High-Level Debuggers Introduction - Background The Problem Live Demo Our Approach Future Work Results - Future Work Questions ?

Nikos Papoylias High-Level Debuggers