- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I've found an extremely powerful tool for source code analysis and manipulation. One problem remains: it targets Java. The concept deserves attention, however: reading a Java program to create objects in main memory that represent the program's source code. Representing source code as objects means that e.g. a variable used in an expression can be traced back to its declaration by calling a method on its object-representation.
This object-rich representation opens the door for the smart user to write code that manipulates his programs. E.g. declaring as local a set of previously-COMMON arrays so as to allow running some subroutine in a multi-threaded way, where these now-local arrays to be passed down to inner-subroutines. This example shows a well-defined, but error-prone code manipulation if done by hand.
Now, the typical phrase : "Does anybody know ... " a similar tool for Fortran ? The following requirements seem fair enough :
The tool should be able to :
1) parse
2) build abstract syntax tree
3) resolve references (e.g. find matching declaration for a variable use, etc.). I think this is called "build the symbol table". Dunno for sure.
4) discard syntactic artifacts useless for the final user
5) instantiate an object representation of the work done so far, in C++ or Java.
Any hints ?
This object-rich representation opens the door for the smart user to write code that manipulates his programs. E.g. declaring as local a set of previously-COMMON arrays so as to allow running some subroutine in a multi-threaded way, where these now-local arrays to be passed down to inner-subroutines. This example shows a well-defined, but error-prone code manipulation if done by hand.
Now, the typical phrase : "Does anybody know ... " a similar tool for Fortran ? The following requirements seem fair enough :
The tool should be able to :
1) parse
2) build abstract syntax tree
3) resolve references (e.g. find matching declaration for a variable use, etc.). I think this is called "build the symbol table". Dunno for sure.
4) discard syntactic artifacts useless for the final user
5) instantiate an object representation of the work done so far, in C++ or Java.
Any hints ?
Link Copied
1 Reply
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Has anyone experimented with source-to-source transformations of Fortran programs ?
E.g. by using the Nestor library
http://www.cri.ensmp.fr/~silber/nestor/
E.g. by using the Nestor library
http://www.cri.ensmp.fr/~silber/nestor/
Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page