Program Code Analyzers Agenda The Problem Dynamic and Static Tools - - PowerPoint PPT Presentation

program code analyzers agenda the problem dynamic and
SMART_READER_LITE
LIVE PREVIEW

Program Code Analyzers Agenda The Problem Dynamic and Static Tools - - PowerPoint PPT Presentation

Generic Programming and Library Development The Problems Presentation on Program Code Analyzers Dynamic and Static Tools May 18 th 2007 Examples of Tools Program Code Analyzers Agenda The Problem Dynamic and Static Tools


slide-1
SLIDE 1

The Problems Dynamic and Static Tools Examples of Tools Generic Programming and Library Development Presentation on Program Code Analyzers May 18th 2007

Program Code Analyzers – Agenda

  • The Problem
  • Dynamic and Static Tools
  • Examples of Tools
slide-2
SLIDE 2

The Problems Dynamic and Static Tools Examples of Tools Generic Programming and Library Development Presentation on Program Code Analyzers May 18th 2007

The Problems

  • Programmers make errors when coding
  • The Compiler usually only finds syntax

errors, not memory or logical errors

slide-3
SLIDE 3

The Problems Dynamic and Static Tools Examples of Toolss Generic Programming and Library Development Presentation on Program Code Analyzers May 18th 2007

  • These bugs show up at run time
  • But sometimes only rarely, and may

seem invisible

  • We need help to find them!
slide-4
SLIDE 4

The Problems Dynamic and Static Tools Examples of Tools Generic Programming and Library Development Presentation on Program Code Analyzers May 18th 2007

  • Does the code have a reasonable

amount of comments?

  • How long and complex are the

functions/methods?

slide-5
SLIDE 5

The Problems Dynamic and Static Tools Examples of Tools Generic Programming and Library Development Presentation on Program Code Analyzers May 18th 2007

Dynamic and Static Tools

Dynamic Tools

  • Run-time testing
  • Detection of memory errors,

such as leaks or memory writes

  • Memory efficiency
  • Detection of race conditions
  • Construction of run-time call

graphs Static Tools

  • Before run-time
  • Detect common errors
  • Detect potental problems,

such as methods often used incorrectly or unreachable code

  • Calculate metrics for

program code

  • Construction of call graphs
  • Assist in writing test

programs

slide-6
SLIDE 6

The Problems Dynamic and Static Tools Examples of Tools Generic Programming and Library Development Presentation on Program Code Analyzers May 18th 2007

Examples of Tools

  • IDA Pro
  • Purify
  • Resource Standard Metric (RSM)
  • Valgrind
slide-7
SLIDE 7

The Problems Dynamic and Static Tools Examples of Tools Generic Programming and Library Development Presentation on Program Code Analyzers May 18th 2007

Resource Standard Metric (RSM)

  • http://msquaredtechnologies.com/
  • Static source code analyzer
slide-8
SLIDE 8
slide-9
SLIDE 9

The Problems Dynamic and Static Tools Examples of Tools Generic Programming and Library Development Presentation on Program Code Analyzers May 18th 2007

Interactive Disassembler Pro (IDA Pro)

  • http://www.datarescue.com/idabase
  • Disassembler with extensive plugin

interface

slide-10
SLIDE 10
slide-11
SLIDE 11
slide-12
SLIDE 12

int main() { int a[4] = {1,2,3,4}; int b[4] = {5,6,7,8}; cout << dot_product<4>(a, b) << endl; return 0; }

The Problems Dynamic and Static Tools Examples of Tools Generic Programming and Library Development Presentation on Program Code Analyzers May 18th 2007

slide-13
SLIDE 13