Monday, October 5, 2009

Concurrencer

Concurrencer is tool to automatically refactor Java code, enabling it to take advantage of new concurrent APIs. Atomic integer operations, concurrent hash map, and a fork/join thread pattern are all supported by the tool.

This approach is useful if the code is already "close" to being parallel friendly. For example, it detects locking when accessing variables and uses the information to decide whether or not a transformation can be applied. If the locking is absent when needed, the program is going to need to be either fixed or redesigned before being able to take advantage of the new APIs.

The semi-automated approach was also useful, as the tool was by the author's admission neither completely correct or complete. Blindly applying changes could cause errors in programs. By allowing the programmer to be involved, tools like this can let the programmer indicate his intent, rather than automatically making changes based on actual implementation.

No comments:

Post a Comment