Architecture – Static Analysis tools to detect architectural patterns

architectural-patternsArchitecturestatic analysis

Currently for school we are working on a research project. The central question of this project is: Which architectural patterns can be detected using static code analysis? With architectural pattern is meant the architectural patterns from the book: Patterns of Enterprise Application Architecture written by Martin Fowler.

During our literature research we didn't find any studies/articals/journals that adress this problem. So for our approach for this rpoject we where thinking to create a prototype of this kind of tool. But first we have to know if there are any (open-source)tools with the same functionality?(detect architectural patterns with a static code analysis)

So my question is do you know a tool that kind detect architectural patterns? We know of the existence of tools that can detect design patterns of the Gang of Four.
And do you have any suggestions for our approach?

Thanks in advance

Best Answer

Anything that is a measurable, well-defined pattern can be parsed.

A deeper question is why would this be important (and important enough to measure and evaluate it with a tool)? How would you meaningfully 'score' or quantify the results, and how would you use those scores? The answer to those questions will tell you why there aren't many tools with that kind of capability, and the ones that are out there with a feature-set advertising this kind of capability are limited, either: pricey, fragile, or some blended combination of the two.

In the past, at least six or eight years ago, I saw these features in the upper end editions of UML tools, like Rational and Sparx Systems (architect/enterprise oriented editions of each respective version). From what I can remember, these products could sometimes 'see' EAA patterns in models of imported/analyzed source. They would suggest complementing patterns and naming for other facets that were participating somehow. Or they would let you 'stub-in' skelatons of these patterns (somewhat useful, but counter to a degree in how patterns are supposed to more often than not, organically emerge).

Identifying patterns of any kind was a very new concept at the time, and in one of the first sets of tools that would incorporate this kind of built-in feature, finding patterns of any kind, but also including EAA patterns. I haven't really looked at them since, so perhaps they are now more refined, stable, and economically feasible.

Perhaps they are also available from someone where the tools operate directly on source (instead of a model), but I am not aware of it.