CrocoPat manipulates relations of any arity, including graphs (which
are binary relations). Its simple and expressive query and manipulation
language RML is based on first-order predicate calculus. The implementation
is based on the data structure binary
decision diagram (BDD), which is well-known as a compact representation
in computer-aided verification. CrocoPat is easy to integrate with other
tools because it reads and writes relations from and to files in the
simple relational text format RSF. One way of extracting relations in RSF format from a given source-code project is to use a combination of Doxygen and CCVisu.
Comprehension and assessment
Many structural analyses of
software systems can be formalized
as relational queries, for example the detection of design patterns, of
patterns of problematic design, of code clones, of dead code, and of
between the as-built and the as-designed architecture. Through its
efficiency and its expressive language, CrocoPat enables practically
important analyses of real-world software systems that are not possible
with other graph analysis tools, in particular analyses that involve
transitive closures and the detection of patterns in graphs.
While standard BDD packages provide operations
for manipulating relations over bits, the CrocoPat library allows the
manipulation of relations over strings. It relieves programmers of
mapping strings to binary encodings and
user variables to BDD variables.
Dirk Beyer, Andreas Noack, Claus Lewerentz. Efficient
Relational Calculation for Software Analysis. TSE 2005.
RML, a simple language for querying and manipulating relations based on
predicate calculus, and CrocoPat, an interpreter for RML programs. Evaluates RML by giving
example programs for several software analyses and CrocoPat by
comparing its performance with calculators for binary relations, a
Prolog system, and a relational database management system.
Dirk Beyer, Andreas Noack. CrocoPat
Introduction and Reference Manual. Technical Report 2004.
and user's guide for CrocoPat, defines and explains the syntax and semantics
of the extended language.
Dirk Beyer, Andreas Noack,
Claus Lewerentz. Simple
and Efficient Relational Querying of Software Structures. WCRE 2003.
CrocoPat's language, an introduction
to the BDD-based implementation, application examples, and performance