Technical paper review. Program visualization and explanation for novice C programmers by Matthew Heinsen Egan and Chris McDonald.



Similar documents
Using Eclipse CDT/PTP for Static Analysis

Thomas Jefferson High School for Science and Technology Program of Studies Foundations of Computer Science. Unit of Study / Textbook Correlation

Component visualization methods for large legacy software in C/C++

Scoping (Readings 7.1,7.4,7.6) Parameter passing methods (7.5) Building symbol tables (7.6)

DATA STRUCTURES USING C

The C Programming Language course syllabus associate level

Integrating SNiFF+ with the Data Display Debugger (DDD)

Tool Support for Inspecting the Code Quality of HPC Applications

TEACHING COMPUTER PROGRAMMING WITH PROGRAM ANIMATION

Eastern Washington University Department of Computer Science. Questionnaire for Prospective Masters in Computer Science Students

WESTMORELAND COUNTY PUBLIC SCHOOLS Integrated Instructional Pacing Guide and Checklist Computer Math

Toad for Oracle 8.6 SQL Tuning

Some Scanner Class Methods

For Introduction to Java Programming, 5E By Y. Daniel Liang

1 Introduction. 2 Overview of the Tool. Program Visualization Tool for Educational Code Analysis

Computing Concepts with Java Essentials

A Thread Monitoring System for Multithreaded Java Programs

Inter-Table Indexing in SNMP MIBs

TATJA: A Test Automation Tool for Java Applets

Departamento de Investigación. LaST: Language Study Tool. Nº 143 Edgard Lindner y Enrique Molinari Coordinación: Graciela Matich

VisCG: Creating an Eclipse Call Graph Visualization Plug-in. Kenta Hasui, Undergraduate Student at Vassar College Class of 2015

Eastern Washington University Department of Computer Science. Questionnaire for Prospective Masters in Computer Science Students

Semester Review. CSC 301, Fall 2015

An Exception Monitoring System for Java

Advanced compiler construction. General course information. Teacher & assistant. Course goals. Evaluation. Grading scheme. Michel Schinz

I. INTRODUCTION. International Journal of Computer Science Trends and Technology (IJCST) Volume 3 Issue 2, Mar-Apr 2015

IBM Operational Decision Manager Version 8 Release 5. Getting Started with Business Rules

JiST Graphical User Interface Event Viewer. Mark Fong

Database Application Developer Tools Using Static Analysis and Dynamic Profiling

Lecture 1 Introduction to Android

1/20/2016 INTRODUCTION

JavaFX Session Agenda

Lecture 11 Doubly Linked Lists & Array of Linked Lists. Doubly Linked Lists

Lecture 9. Semantic Analysis Scoping and Symbol Table

1 Copyright 2011, Oracle and/or its affiliates. All rights reserved.

Oracle Solaris Studio Code Analyzer

KITES TECHNOLOGY COURSE MODULE (C, C++, DS)

Microsoft. Access HOW TO GET STARTED WITH

A QUICK OVERVIEW OF THE OMNeT++ IDE

The Mjølner BETA system

Release 2.1 of SAS Add-In for Microsoft Office Bringing Microsoft PowerPoint into the Mix ABSTRACT INTRODUCTION Data Access

Data Structure Reverse Engineering

A tool to facilitate interactive and collaborative learning of execution flow and code for novice computer science students

Interpreters and virtual machines. Interpreters. Interpreters. Why interpreters? Tree-based interpreters. Text-based interpreters

Object Oriented program execution Visualization of Dynamic Program

SQL Server Array Library László Dobos, Alexander S. Szalay

How to make the computer understand? Lecture 15: Putting it all together. Example (Output assembly code) Example (input program) Anatomy of a Computer

Programming Languages

El Dorado Union High School District Educational Services

<Insert Picture Here> Web 2.0 Data Visualization with JSF. Juan Camilo Ruiz Senior Product Manager Oracle Development Tools

An Eclipse Plug-In for Visualizing Java Code Dependencies on Relational Databases

Towards Checking the Usefulness of Verification Tools

Course MS10975A Introduction to Programming. Length: 5 Days

SAS BI Dashboard 4.3. User's Guide. SAS Documentation

Course Information Course Number: IWT 1229 Course Name: Web Development and Design Foundation

Using the Query Analyzer

Maintaining Stored Procedures in Database Application

Semester Thesis Traffic Monitoring in Sensor Networks

Programming and Software Development CTAG Alignments

No no-argument constructor. No default constructor found

Professional Organization Checklist for the Computer Science Curriculum Updates. Association of Computing Machinery Computing Curricula 2008

Data Tool Platform SQL Development Tools

FreeForm Designer. Phone: Fax: POB 8792, Natanya, Israel Document2

1 Abstract Data Types Information Hiding

Schema Classes. Polyhedra Ltd

All Your Code Belongs To Us Dismantling Android Secrets With CodeInspect. Steven Arzt Secure Software Engineering Group Steven Arzt 1

Applying Clang Static Analyzer to Linux Kernel

Java 6 'th. Concepts INTERNATIONAL STUDENT VERSION. edition

DEVELOPMENT OF AN ANALYSIS AND REPORTING TOOL FOR ORACLE FORMS SOURCE CODES

Real Vision Software, Inc. Create a Spool File Capture

Module 10. Coding and Testing. Version 2 CSE IIT, Kharagpur

Skyline Interactive Tool Support

JAWAA: Easy Web-Based Animation from CS 0 to Advanced CS Courses

2. Advance Certificate Course in Information Technology

C Compiler Targeting the Java Virtual Machine

1 File Processing Systems

Table of Contents. Overview...2. System Requirements...3. Hardware...3. Software...3. Loading and Unloading MIB's...3. Settings...

Helping you avoid stack overflow crashes!

Instrumentation Software Profiling

CA Compiler Construction

Visualising Java Data Structures as Graphs

ANDROID APPS DEVELOPMENT FOR MOBILE GAME

Syntax Check of Embedded SQL in C++ with Proto

Modeling Kahn Process Networks in the Dynamic Dataflow Formalism

Static Code Analysis Procedures in the Development Cycle

Extending the Linked Data API with RDFa

#820 Computer Programming 1A

Texas Essential Knowledge and Skills Correlation to Video Game Design Foundations 2011 N Video Game Design

CSCI 3136 Principles of Programming Languages

Implementation of Breiman s Random Forest Machine Learning Algorithm

Transcription:

Technical paper review Program visualization and explanation for novice C programmers by Matthew Heinsen Egan and Chris McDonald Garvit Pahal Indian Institute of Technology, Kanpur October 28, 2014 Garvit Pahal (IITK) Technical paper review October 28, 2014 1 / 28

Overview 1 Introduction 2 Prior Work 3 Foundation project - SeeC 4 System developed Graph Visualization Natural Language Explanation 5 Integration with SeeC 6 Problems with the system 7 Overview Garvit Pahal (IITK) Technical paper review October 28, 2014 2 / 28

Table of Contents 1 Introduction 2 Prior Work 3 Foundation project - SeeC 4 System developed Graph Visualization Natural Language Explanation 5 Integration with SeeC 6 Problems with the system 7 Overview Garvit Pahal (IITK) Technical paper review October 28, 2014 3 / 28

Introduction Task Introduce novice-focused systems for creating graphical visualizations of the runtime memory state of C language programs, and for generating natural language explanations of C program fragments. Garvit Pahal (IITK) Technical paper review October 28, 2014 4 / 28

Introduction Why Program visualization and natural language explanations of program behaviour have been shown to assist novice programmers with improving their programming knowledge, correcting misunderstandings, and debugging programs. These techniques have been used in several novice-focused debugging systems, but few have been developed for the C programming language despite it being widely reported as a difficult language for novices. Garvit Pahal (IITK) Technical paper review October 28, 2014 5 / 28

Table of Contents 1 Introduction 2 Prior Work 3 Foundation project - SeeC 4 System developed Graph Visualization Natural Language Explanation 5 Integration with SeeC 6 Problems with the system 7 Overview Garvit Pahal (IITK) Technical paper review October 28, 2014 6 / 28

Systems developed Zimmermann and Zeller (2002): Their tool extracts information about a programs memory state using the GNU Project Debugger VIP (2005): It is a novice-focused program visualization system that supports a subset of the C++ programming language Hundhausen and Brown (2007) described ALVIS, a radically dynamic programming environment which updates the visualization on every change. It also supports only a subset of C HDPV (2008): It is a data structure visualization system for programs written in C, C++, or Java ITEM/IP-II: This program visualization system supports an educational mini-language named Tortoise, and generates textual explanations of program execution. Bradman (1995): A system designed to assist novice programmers learning C, presented by Smith and Webb Garvit Pahal (IITK) Technical paper review October 28, 2014 7 / 28

Evaluation of these systems Graphical program visualizations and automatically generated explanations of program behaviour have been shown to assist novice programmers with constructing knowledge and debugging programs in most of the evaluations. Garvit Pahal (IITK) Technical paper review October 28, 2014 8 / 28

Table of Contents 1 Introduction 2 Prior Work 3 Foundation project - SeeC 4 System developed Graph Visualization Natural Language Explanation 5 Integration with SeeC 6 Problems with the system 7 Overview Garvit Pahal (IITK) Technical paper review October 28, 2014 9 / 28

SeeC SeeC project was introduced by Heinsen Egan and McDonald (2013) It is a novice-focused system for the standard C programming language that provides execution tracing and runtime error detection. It is built upon the Clang project which is a modular collection of libraries which implement a front-end for compiling C, C++, Objective C, and Objective C++ Garvit Pahal (IITK) Technical paper review October 28, 2014 10 / 28

SeeC Clangs parsing and semantic analysis libraries are used to create an Abstract Syntax Tree (AST) from a programs source code. Figure : Source code Figure : Abstract syntax tree Garvit Pahal (IITK) Technical paper review October 28, 2014 11 / 28

SeeC Each node in the AST represents a declaration or statement in the program and provides rich semantic information. When an execution trace is loaded the programs AST is reconstructed, allowing us to link runtime states to relevant AST nodes. This provides a mapping between the programs static source code and its dynamic state Garvit Pahal (IITK) Technical paper review October 28, 2014 12 / 28

SeeC The AST nodes can be used to retrieve Value objects which can be of type Scalars Arrays Records Pointers File pointers Garvit Pahal (IITK) Technical paper review October 28, 2014 13 / 28

Table of Contents 1 Introduction 2 Prior Work 3 Foundation project - SeeC 4 System developed Graph Visualization Natural Language Explanation 5 Integration with SeeC 6 Problems with the system 7 Overview Garvit Pahal (IITK) Technical paper review October 28, 2014 14 / 28

Graph Visualization The system for graph visualization is built upon SeeC s representation of recreated stated (Value objects). The system produces a graph in the DOT language. Figure : Source code Figure : Graph visualization Garvit Pahal (IITK) Technical paper review October 28, 2014 15 / 28

Layout generation for different value types Scalar: Fill the cell with the string description of the Value. Garvit Pahal (IITK) Technical paper review October 28, 2014 16 / 28

Layout generation for different value types Array: Create a new sub-table in the cell, with two columns, and one row for each element in the array. Place the index of the elements in the left columns cells, and then recursively layout the right columns cells using the elements Values. Garvit Pahal (IITK) Technical paper review October 28, 2014 16 / 28

Layout generation for different value types Record: Create a new sub-table in the cell, with two columns, and one row for each member of the record. Place the names of the members in the left columns cells, and then recursively layout the right columns cells using the members Values. Garvit Pahal (IITK) Technical paper review October 28, 2014 16 / 28

Layout generation for different value types Pointer: If the pointer is uninitialized then fill the cell with the placeholder?. If the pointers raw value is zero then fill the cell with the text NULL. If the pointer has no valid dereferences then fill the cell with the placeholder!. Otherwise, leave the cell empty it will be connected appropriately when edges are created. Garvit Pahal (IITK) Technical paper review October 28, 2014 16 / 28

Natural Language Explanation Previous studies have shown that automatically generated natural language explanations of program source code can be useful for novice programmers. Unfortunately, this area lacks new developments for the C programming language. This may be due to the difficulties of developing tools for the C programming language. Garvit Pahal (IITK) Technical paper review October 28, 2014 17 / 28

Natural Language Explanation The explanatory system is built upon the Clang libraries, providing robust and sustainable parsing and semantic analysis of the C programming language. Clang produces the AST (Abstract Syntax Tree) and the system creates natural language explanations for individual nodes in Clangs AST. Garvit Pahal (IITK) Technical paper review October 28, 2014 18 / 28

Natural Language Explanation Figure : Source code Figure : Abstract syntax tree Natural Language Explanation for IfStmt It consists of a condition, a body, and an else. Garvit Pahal (IITK) Technical paper review October 28, 2014 19 / 28

Natural Language Explanation The system can optionally use information about the runtime state of the program when generating explanations. This information is provided to the message formatting system in the same manner as the semantic information provided by the AST nodes. To return to our example, the explanation of if statements can explain whether the body or the else statement is executed based on the value that was produced by the condition statement. Garvit Pahal (IITK) Technical paper review October 28, 2014 20 / 28

Table of Contents 1 Introduction 2 Prior Work 3 Foundation project - SeeC 4 System developed Graph Visualization Natural Language Explanation 5 Integration with SeeC 6 Problems with the system 7 Overview Garvit Pahal (IITK) Technical paper review October 28, 2014 21 / 28

Integration with SeeC The graphical visualization system and explanation generation system are integrated into SeeCs graphical trace viewer. Figure : Integrated system Garvit Pahal (IITK) Technical paper review October 28, 2014 22 / 28

Features of the integrated system Execution of programs are recorded in trace files. The graphical trace viewer can load these traces files, allowing students to inspect the recorded state of the program at any point during its execution. The system also supports contextual navigation based on particular items in the state. A student may also select a particular function call and rewind to the beginning of the call or move forwards until the call is complete. Garvit Pahal (IITK) Technical paper review October 28, 2014 23 / 28

Table of Contents 1 Introduction 2 Prior Work 3 Foundation project - SeeC 4 System developed Graph Visualization Natural Language Explanation 5 Integration with SeeC 6 Problems with the system 7 Overview Garvit Pahal (IITK) Technical paper review October 28, 2014 24 / 28

Problems with the system and modifications required There are some problems with this approach Task of determining which of multiple competing types should be rendered for a particular area of memory. For example in unions. With some modifications, this can be solved. Even relatively simple statements in the C programming language may consist of several AST nodes. A student considering an entire statement must view the explanations for the individual AST nodes. It may be possible to create a system which can combine fragments of explanations to create a unified explanation for an entire statement. Garvit Pahal (IITK) Technical paper review October 28, 2014 25 / 28

Table of Contents 1 Introduction 2 Prior Work 3 Foundation project - SeeC 4 System developed Graph Visualization Natural Language Explanation 5 Integration with SeeC 6 Problems with the system 7 Overview Garvit Pahal (IITK) Technical paper review October 28, 2014 26 / 28

Overview Program Visualization and natural language explanations of program behavious have been used in several debugging systems, but very few have been developed for novices and specially for novice C programmers. The system described in the paper might become a useful tool in assisting novice C programmers that can help them improve their programming knowledge and dedug their programs. Garvit Pahal (IITK) Technical paper review October 28, 2014 27 / 28

Thank You! Questions please Garvit Pahal (IITK) Technical paper review October 28, 2014 28 / 28