Tuesday, May 08, 2007

Semmle, an original idea


Semmle is a tool to make queries to our code similar to SQL. The following query:
from Class c 
where c.declaresMethod("equals")
and not(c.declaresMethod("hashCode"))
select c.getPackage(),c
returns the results:
Photo Sharing and Video Hosting at Photobucket
from the "framework" working space of my eclipse workspace (All classes that define an equals method but not hashCode).
".QL", an object-oriented query language, allows us to build our own classes to extend the query capabilities.
With a Metrics Library such as Lack of Cohesion of Methods and Afferent Coupling/Efferent Coupling, I only miss an ant task to add this tool to the continuos integration server.
Now, here's an original idea!

1 comment:

Anonymous said...

If you liked the original SemmleCode, you must have a look at the Professional Edition, which was released this week at http://semmle.com.

The improvements are due to the helpful feedback from 100s of early adopters. The tool now comes with even more carefully tuned analyses, tons of visualizations, and more.

Enjoy!

-Oege

[Disclosure: I'm the CEO of Semmle]