Life & Leisure

Steps of life to be remembered

Testing Tips for Today

leave a comment »

Shape analysis (software)

Shape analysis is a static code analysis technique that discovers and verifies properties of linked, dynamically allocated data structures in (usually imperative) computer programs. It is typically used at compile time to find software bugs or to verify high-level correctness properties of programs.

In Java programs, it can be used to ensure that a sort method correctly sorts a list.

For C programs, it might look for places where a block of memory is not properly freed. Although shape analyses are very powerful, they usually take a long time to run. For this reason, they have not seen widespread acceptance outside of universities and research labs (where they are
only used experimentally).

Shape analysis has been applied to a variety of problems:

  • Finding memory leaks, including Java-style leaks where a pointer to an unused object is not nulled out
  • Discovering cases where a block of memory is freed more than once (in C)
  • Finding dereferences of “dangling pointers” (pointers to freed memory in C)
  • Finding array out-of-bounds errors Checking type-state properties (for example, ensuring that a
  • file is open() before it is read())
  • Ensuring that a method to reverse a linked list does not introduce cycles into the list
  • Verifying that a sort method returns a result that is in sorted order

Resouce : http://en.wikipedia.org/wiki/Shape_analysis_%28software%29

Written by aizat84

June 20, 2008 at 8:27 am

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: