Tracing What, How, and Why Copyright © Curt Hill, 2004-2006.

Slides:



Advertisements
Similar presentations
Chapter 15 Debugging. Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display Debugging with High Level Languages.
Advertisements

 Monday, 9/9/02, Slide #1 CS106 Introduction to CS1 Monday, 9/9/02  QUESTIONS?? (Exercises, Lab #1, etc.)  Today:  More on float objects  C++ concept:
Chapter 10 Recursion. Copyright © 2005 Pearson Addison-Wesley. All rights reserved Chapter Objectives Explain the underlying concepts of recursion.
About the Presentations The presentations cover the objectives found in the opening of each chapter. All chapter objectives are listed in the beginning.
Lesson 1-1 Algebra Check Skills You’ll Need 1-5
Computer Programming and Basic Software Engineering 4. Basic Software Engineering 1 Writing a Good Program 4. Basic Software Engineering.
Objectives Understand the basic concepts and definitions relating to testing, like error, fault, failure, test case, test suite, test harness. Explore.
Copyright © Curt Hill Java Looking at our first console application in Eclipse.
Chapter 4 Recursion. Copyright © 2004 Pearson Addison-Wesley. All rights reserved.1-2 Chapter Objectives Explain the underlying concepts of recursion.
$1,000,000 $500,000 $100,000 $50,000 $10,000 $5000 $1000 $500 $200 $100 Is this your Final Answer? YesNo Question 2? Correct Answer Wrong Answer.
Lecture Notes - Copyright © S. C. Kothari, All rights reserved.1 Efficient Debugging CPRE 556 Lecture 19.
Copyright © Curt Hill The IF Revisited If part 4 Style and Testing.
Copyright © 2004 – 2013 Curt Hill Java Debugging In Eclipse.
Summary CGS 3460, Lecture 43 April 26, 2006 Hen-I Yang.
Copyright © 2009 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 12 Recursion.
Copyright Curt Hill The Assignment Operator and Statement The Most Common Statement you will use.
Debugging and Printing George Mason University. Today’s topics Review of Chapter 3: Printing and Debugging Go over examples and questions debugging in.
Compilers and Interpreters
Debugging Watch and Text Output Alice. Debugging Techniques Several techniques are helpful in eliminating errors (bugs) in programs: careful design incremental.
Copyright © Curt Hill The Assignment Operator and Statement The Most Common Statement you will use.
Debugging and Testing Hussein Suleman March 2007 UCT Department of Computer Science Computer Science 1015F.
The LC-3 – Chapter 6 COMP 2620 Dr. James Money COMP
Copyright © Curt Hill Software Development Methodology What do you need to know?
Copyright © 2016 Curt Hill Static Code Analysis What it is and does.
FOP: Multi-Screen Apps
MATH 224 – Discrete Mathematics
Static Code Analysis What it is and does. Copyright © 2016 Curt Hill.
Programming and Debugging with the Dragon and JTAG
14 Compilers, Interpreters and Debuggers
Regression Testing with its types
ME 142 Engineering Computation I
PowerShell Introduction Copyright © 2016 – Curt Hill.
Computer Terms Review from what language did C++ originate?
Testing and Debugging PPT By :Dr. R. Mall.
Side Effect Operators Changing the value of variables
Putting Objects in Motion
Copyright © 2008 by Helene G. Kershner
Copyright © 2008 by Helene G. Kershner
2_Testing Testing techniques.
An Automated Testing Framework
CIS 336 PAPERS Education Your Life-- cis336papers.com.
DEBUGGING.
Static Methods 14-Nov-18.
The C++ IF Statement Part 2 Copyright © Curt Hill
Doing things more than once
Concepts From Alice Switching to Java Copyright © Curt Hill.
Compilers, Make and SubVersion
Test Case Purification for Improving Fault Localization
Physics-based simulation for visual computing applications
The most important decision statement
Arrays in Java What, why and how Copyright Curt Hill.
Operations with Radical Expressions
Compound Statements A Quick Overview
Copyright © by Curt Hill
Recursion (part 1) October 24, 2007 ComS 207: Programming I (in Java)
Accomplishing Executables
Error Correction Codes
Control Structure Testing
The Java switch Statement
Information Systems and Business Intelligence
CPRE 416-Software Evolution and Maintenance-Lecture 11
Java Looking at our first console application in Eclipse
Consider the following code:
The IF Revisited A few more things Copyright © Curt Hill.
Chapter 15 Debugging.
QTP Test Process
Recursion (part 1) October 25, 2006 ComS 207: Programming I (in Java)
The IF Revisited A few more things Copyright © Curt Hill.
Methods Scope How are names handled?
Chapter 15 Debugging.
Presentation transcript:

Tracing What, How, and Why Copyright © Curt Hill, 2004-2006

What? Tracing is the simulation of a computer program or part of a computer program We “play computer” The results should be the same as if the program were executed on a real machine The simulation needs to cover every relevant aspect of the computation Copyright © Curt Hill, 2004-2006

Elbonian Computers Copyright © Curt Hill, 2004-2006

Why? Essential debugging tool Important learning technique A correct trace demonstrates that you understand the fundamentals We will have tracing exercises in class and on tests Copyright © Curt Hill, 2004-2006

How? Find the first statement to be executed Write down all the variables Used to record their current value As new variables are encountered they may be added to the list For each statement that is encountered: Determine its action Record changes to any variables Show the final values when execution is complete Copyright © Curt Hill, 2004-2006

An example Java Console C++ Java Window Copyright © Curt Hill, 2004-2006

Right and Wrong There is a right way and a wrong way to do tracing The right way is this The wrong way is to attempt to analyze this algebraically That approach does not allow for a change in variables Copyright © Curt Hill, 2004-2006