I don't find many of the Drupal 6 module yet on Drupal 7 and there are many Drupal 7 module that are not available in Drupal 6. I work in High level synthesis and am sure these can be done using high level compilation techniques, but wondering if there has been already any work in this direction. My question is, is there any module /framework already developed that can automatically convert a Drupal 6 module to Drupal 7 and vice versa?
I will not say that it is fully automatic, but Coder Upgrade, which is a sub-module of Coder, will do a lot of the grunt work for you. However, it is not a 100 % solution, there are always some loose ends to tie up. It is a good idea to use Coder Review afterwards to highlight the areas that need special attention. After that, it should be a simple case of installing the Drupal 7 version of the module, test it, and fix the remaining nits "by hand".
You can download and install it as part of your staging site or use the web-based version: http://dupgrade.com/
It is one way: Drupal 6 to Drupal 7. I know of no tool that goes in the other direction.
See also: https://drupal.org/node/224333 for an overview of the changes from Drupal 6 to Drupal 7.