You Are Here:

Community: Blogs

Hartti Suomela's Forum Nokia Blog

JavaOne - Static and Dynamic Code Analysis

hartti | 11 May, 2007 12:11

Now, only because I came in a couple of minutes late to listen to the talk on static and dynamic analysis of code, I do not know the name of my new idol. Really. This guy from Sun (either Aleksandr Kuzmin or Mikhail Davidov) showed that he knows everything about the code analysis both in theory and in practise. Wov!

 

I do not claim to be an expert of these tools, but here are some snapshots of the talk. (According to the presenter: "Try these tools, you'll love them!")


Static code analysis basically means modeling dynamics of the software relying solely on source code. This method allows you to find defects beyond the limitations of runtime coverage. Control Flow Graph (CFG) is the core component of static analysis, which can be enhanced with dataflow analysis (relate the values of variables in corresponding CFG nodes) and data range analysis.

 

Typical errors detected by static analysis tools

  • illegal pointer access to variable/structure
  • array index out of bounds
  • non-initialized variable/pointer
  • user assertion
  • overflows/underflow, division by zero
  • wrong number of arguments, wrong type too
  • no-termination of call or loop
  • unreachable code (at least 30% of unreachable code reveals real bugs)


In dynamic analysis "the tools insert some analysis code at every line of the source code. They build a database of all program elements and the at runtime the tools check each data value and memory reference against its database to verify consistency and correctness."

 

Typical errors detected by dynamic analysis

  • memory leaks
  • invalid pointers
  • memory corruption
  • memory overflow
  • reading and writing uninitialized memory
  • unused variables/arguments
  • data formatting problems
  • unexpected errors
  • invalid argiments
  • invalid system calls

When starting to use code analysis, one could get a lot of false positives in the beginning, but those can be limited with for example filters and using proper prirization for the rules. Also analyzing threaded applications can lead undeterministic behavior.

 

Some of the tools are free including findbugs and valgrind. Polyspace was mentioned many times during the talk. I guess that means something...

JavaOne - Pointers to SVG resources

hartti | 11 May, 2007 11:41

I decided to attend the Thursday evening's JSR-226 talk by after seeing the nice demos created with SVG during the talks on previous days. And I have to admit it was a excellent overview of SVG in general and also how to use JSR-226 on mobile phones. Thank you Aastha and Venkatesh for a great tutorial!

 

For those of you who are not familiar with SVG, go and check the phoneME UI lab pages, which contain nice overview on SVG. After you have familiarized yourself with the file format, you can also learn the basics of SVG API from these pages.

 

And what tools to use? For coding any IDE does the trick. NetBeans Mobility Pack contains the basic visual tools to create MIDlets utilizing SVG graphics, where you can utilize SVG content created with for example Adobe Illustrator.

 

Even though this talk did not showcase Ikivo Animator, I got a glimpse of that tool in the earlier presentations, and that tool seems to allow you to create really interactive SVG content. (Note, this tool is commercial product which has a 30-day trial version available, and the full version costs 295 Euros).

 

And note also that we have some SVG API related guides on Forum Nokia Web-site

 
 

Rate This

 
 
Bookmark this page: DeliciousDiggFacebookGoogleYahooStumbleUponRedditDiigoTechnocratiTwitter  Share this page Share this page Print this Page Print this page Invite a friend Invite a friend
京ICP备05048969号    Email Newsletters Press Terms & Conditions Privacy Policy Sitemap Contact Us © 2009 Nokia 
RDF Facets: qdcZidentifierQSxhttpE3aE2fE2fblogsE2eforumE2enokiaE2ecomE2fblogE2fpaulE2dcoultonsE2dforumE2dnokiaE2dblogE2farchivesE2f2009E2f04E2fX qdcZtypeQUqfnZE45E78cludedFromGeneralE4cistingsQ qdcZtypeQUqfntypeZBlogContentQ qdcZtypeQUqfntypeZCommunityContentQ qdcZtypeQUqfntypeZE52esourceQ qdcZtypeQUqfntypeZWebpageQ qdcZtypeQUqmarsZManagedE52esourceQ qdcZtypeQUqwebZInformationE52esourceQ qdcZtypeQUqwebZPageQ qdcZtypeQUqwebZE52esourceQ qdcZtypeQUqrdfsZE52esourceQ qfnZtypeQUqfntypeZBlogContentQ qfnZtypeQUqfntypeZCommunityContentQ qfnZtypeQUqfntypeZE52esourceQ qfnZtypeQUqfntypeZWebpageQ qmarsZlanguageQUxhttpE3aE2fE2fswE2enokiaE2ecomE2flanguageE2d1E2fenX qrdfZtypeQUqfnZE45E78cludedFromGeneralE4cistingsQ qrdfZtypeQUqfntypeZBlogContentQ qrdfZtypeQUqfntypeZCommunityContentQ qrdfZtypeQUqfntypeZE52esourceQ qrdfZtypeQUqfntypeZWebpageQ qrdfZtypeQUqmarsZManagedE52esourceQ qrdfZtypeQUqwebZInformationE52esourceQ qrdfZtypeQUqwebZPageQ qrdfZtypeQUqwebZE52esourceQ qrdfZtypeQUqrdfsZE52esourceQ