{ "cells": [ { "cell_type": "markdown", "metadata": { "button": false, "new_sheet": false, "run_control": { "read_only": false }, "slideshow": { "slide_type": "slide" } }, "source": [ "# Tours through the Book\n" ] }, { "attachments": {}, "cell_type": "markdown", "metadata": { "button": false, "new_sheet": false, "run_control": { "read_only": false }, "slideshow": { "slide_type": "slide" } }, "source": [ "While the chapters of this book can be read one after the other, there are many possible paths through the book. In this graph, an arrow _A_ → _B_ means that chapter _A_ is a prerequisite for chapter _B_. You can pick arbitrary paths in this graph to get to the topics that interest you most:" ] }, { "cell_type": "code", "execution_count": 1, "metadata": { "execution": { "iopub.execute_input": "2023-11-12T12:39:18.384661Z", "iopub.status.busy": "2023-11-12T12:39:18.384563Z", "iopub.status.idle": "2023-11-12T12:39:18.422379Z", "shell.execute_reply": "2023-11-12T12:39:18.421945Z" }, "slideshow": { "slide_type": "fragment" } }, "outputs": [], "source": [ "# ignore\n", "from bookutils import rich_output" ] }, { "cell_type": "code", "execution_count": 2, "metadata": { "execution": { "iopub.execute_input": "2023-11-12T12:39:18.424240Z", "iopub.status.busy": "2023-11-12T12:39:18.424086Z", "iopub.status.idle": "2023-11-12T12:39:18.445508Z", "shell.execute_reply": "2023-11-12T12:39:18.445069Z" }, "slideshow": { "slide_type": "subslide" } }, "outputs": [ { "data": { "image/svg+xml": [ "\n", "\n", "\n", "\n", "\n", "Tracer\n", "\n", "\n", "\n", "\n", "Tracing Executions\n", "\n", "\n", "\n", "\n", "\n", "Debugger\n", "\n", "\n", "\n", "\n", "How Debuggers Work\n", "\n", "\n", "\n", "\n", "\n", "Tracer->Debugger\n", "\n", "\n", "\n", "\n", "\n", "Assertions\n", "\n", "\n", "\n", "\n", "Asserting\n", "Expectations\n", "\n", "\n", "\n", "\n", "\n", "Tracer->Assertions\n", "\n", "\n", "\n", "\n", "\n", "DeltaDebugger\n", "\n", "\n", "\n", "\n", "Reducing Failure-\n", "Inducing Inputs\n", "\n", "\n", "\n", "\n", "\n", "Tracer->DeltaDebugger\n", "\n", "\n", "\n", "\n", "\n", "StatisticalDebugger\n", "\n", "\n", "\n", "\n", "Statistical\n", "Debugging\n", "\n", "\n", "\n", "\n", "\n", "Tracer->StatisticalDebugger\n", "\n", "\n", "\n", "\n", "\n", "DynamicInvariants\n", "\n", "\n", "\n", "\n", "Mining Function\n", "Specifications\n", "\n", "\n", "\n", "\n", "\n", "Tracer->DynamicInvariants\n", "\n", "\n", "\n", "\n", "\n", "ChangeDebugger\n", "\n", "\n", "\n", "\n", "Isolating Failure-\n", "Inducing Changes\n", "\n", "\n", "\n", "\n", "\n", "DeltaDebugger->ChangeDebugger\n", "\n", "\n", "\n", "\n", "\n", "DDSetDebugger\n", "\n", "\n", "\n", "\n", "Generalizing Failure\n", "Circumstances\n", "\n", "\n", "\n", "\n", "\n", "DeltaDebugger->DDSetDebugger\n", "\n", "\n", "\n", "\n", "\n", "PerformanceDebugger\n", "\n", "\n", "\n", "\n", "Debugging\n", "Performance Issues\n", "\n", "\n", "\n", "\n", "\n", "DeltaDebugger->PerformanceDebugger\n", "\n", "\n", "\n", "\n", "\n", "Repairer\n", "\n", "\n", "\n", "\n", "Repairing Code\n", "Automatically\n", "\n", "\n", "\n", "\n", "\n", "DeltaDebugger->Repairer\n", "\n", "\n", "\n", "\n", "\n", "StatisticalDebugger->PerformanceDebugger\n", "\n", "\n", "\n", "\n", "\n", "StatisticalDebugger->Repairer\n", "\n", "\n", "\n", "\n", "\n", "Intro_Debugging\n", "\n", "\n", "\n", "\n", "Introduction to\n", "Debugging\n", "\n", "\n", "\n", "\n", "\n", "Intro_Debugging->Tracer\n", "\n", "\n", "\n", "\n", "\n", "Slicer\n", "\n", "\n", "\n", "\n", "Tracking \n", "Failure Origins\n", "\n", "\n", "\n", "\n", "\n", "Intro_Debugging->Slicer\n", "\n", "\n", "\n", "\n", "\n", "Tracking\n", "\n", "\n", "\n", "\n", "Tracking Bugs\n", "\n", "\n", "\n", "\n", "\n", "Intro_Debugging->Tracking\n", "\n", "\n", "\n", "\n", "\n", "ChangeCounter\n", "\n", "\n", "\n", "\n", "Where the Bugs are\n", "\n", "\n", "\n", "\n", "\n", "Tracking->ChangeCounter\n", "\n", "\n", "\n", "\n", "" ], "text/plain": [ "" ] }, "execution_count": 2, "metadata": {}, "output_type": "execute_result" } ], "source": [ "# ignore\n", "sitemap = None\n", "if rich_output():\n", " from IPython.display import SVG\n", " sitemap = SVG(filename='PICS/Sitemap.svg')\n", "sitemap" ] }, { "cell_type": "markdown", "metadata": { "button": false, "new_sheet": false, "run_control": { "read_only": false }, "slideshow": { "slide_type": "slide" } }, "source": [ "But since even this map can be overwhelming, here are a few _tours_ to get you started. Each of these tours allows you to focus on a particular view, depending on whether you are a programmer, student, or researcher." ] }, { "cell_type": "markdown", "metadata": { "slideshow": { "slide_type": "slide" } }, "source": [ "## The Pragmatic Programmer Tour\n", "\n", "You have a program to debug. You want to learn about techniques that help you for debugging. You want to get to the point.\n", "\n", "1. __Start with [Introduction to Debugging](Intro_Debugging.ipynb) to get the basic concepts.__ (You would know most of these anyway, but it can't hurt to get quick reminders).\n", "\n", "2. __Experiment with [interactive debuggers](Debugger.ipynb)__ to observe executions interactively.\n", "\n", "3. __Use [assertions](Assertions.ipynb)__ to have the computer systematically run checks during execution.\n", "\n", "4. __Explore [delta debugging](DeltaDebugger.ipynb) for your program__ and see how it simplifies failure-inducing inputs [and changes](ChangeDebugger.ipynb).\n", "\n", "5. __Visualize [dependencies](Slicer.ipynb) in your program__ and track the flow of data and control in the execution.\n", "\n", "6. __Check out [statistical debugging](StatisticalDebugger.ipynb)__ for a simple way to determine code locations associated with failures.\n", "\n", "7. __See [automatic repairs](Repairer.ipynb) in action__.\n", "\n", "In each of these chapters, start with the \"Synopsis\" parts; these will give you quick introductions on how to use things, as well as point you to relevant usage examples. With this, enough said. Get back to work and enjoy!" ] }, { "cell_type": "markdown", "metadata": { "slideshow": { "slide_type": "slide" } }, "source": [ "## The Young Researcher Tour\n", "\n", "Your school wants you to publish a great paper every few months. You are looking for infrastructures that you can toy with, helping you to build and evaluate cool ideas.\n", "\n", "1. __Toy with [tracer](Tracer.ipynb)__ to collect data on program executions - features you can then [correlate with program failures](StatisticalDebugger.ipynb).\n", "\n", "2. __Extract [dependencies](Slicer.ipynb) from your program__ and use them for runtime verification, fault localization, and better repair.\n", "\n", "3. __Use [automatic repairs](Repairer.ipynb)__ as a starting point to build your own, better repairs. The Python implementation is well documented and extremely easy to expand.\n", "\n", "4. Bring in __[test generation and structured inputs](DDSetDebugger.ipynb)__ to collect input features that relate to failures.\n", "\n", "5. Mine __[version and bug repositories](ChangeCounter.ipynb)__ to explore how bugs and all these features evolve over time.\n", "\n", "For each of these chapters, experiment with the techniques, and then build your own on top. Read the relevant papers to learn more about their motivation and background. And now go and improve the world of automated debugging!" ] }, { "cell_type": "markdown", "metadata": { "button": false, "new_sheet": true, "run_control": { "read_only": false }, "slideshow": { "slide_type": "slide" } }, "source": [ "## Lessons Learned\n", "\n", "* You can go through the book from beginning to end...\n", "* ...but it may be preferable to follow a specific tour, based on your needs and resources.\n", "* Now [go and explore automated debugging](index.ipynb)!" ] } ], "metadata": { "ipub": { "bibliography": "fuzzingbook.bib", "toc": true }, "kernelspec": { "display_name": "Python 3 (ipykernel)", "language": "python", "name": "python3" }, "language_info": { "codemirror_mode": { "name": "ipython", "version": 3 }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", "version": "3.10.2" }, "toc": { "base_numbering": 1, "nav_menu": {}, "number_sections": true, "sideBar": true, "skip_h1_title": true, "title_cell": "", "title_sidebar": "Contents", "toc_cell": false, "toc_position": {}, "toc_section_display": true, "toc_window_display": true }, "toc-autonumbering": false }, "nbformat": 4, "nbformat_minor": 4 }