Relational programming with CrocoPat

Many structural analyses of software systems are naturally formalized as relational queries, for example, the detection of design patterns, patterns of problematic design, code clones, dead code, and differences between the as-built and the as-designed architecture. This paper describes CrocoPat, an application-independent tool for relational programming. 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. The language is easy to use, because it is based on the well-known first-order predicate logic. The tool is easy to integrate into other software systems, because it is a small command-line tool that uses a simple text format for input and output of relations.

[1]  Dirk Beyer,et al.  Efficient relational calculation for software analysis , 2005, IEEE Transactions on Software Engineering.

[2]  Holger Giese,et al.  Symbolic invariant verification for systems with dynamic structural adaptation , 2006, ICSE.

[3]  Bruce J. MacLennan Overview of relational programming , 1983, SIGP.

[4]  Jim Q. Ning,et al.  Knowledge-based program analysis , 1990, IEEE Software.

[5]  Hausi A. Müller,et al.  Rigi User’s Manual , 1998 .

[6]  Paul DuBois,et al.  MySQL Reference Manual , 2002 .

[7]  Emden R. Gansner,et al.  A C++ data model supporting reachability analysis and dead code detection , 1997, ESEC '97/FSE-5.

[8]  W. Schafer,et al.  Towards pattern-based design recovery , 2002, Proceedings of the 24th International Conference on Software Engineering. ICSE 2002.

[9]  Richard C. Holt,et al.  Software architecture transformations , 2000, Proceedings 2000 International Conference on Software Maintenance.

[10]  Ondrej Lhoták,et al.  Points-to analysis using BDDs , 2003, PLDI '03.

[11]  Alfred V. Aho,et al.  Universality of data retrieval languages , 1979, POPL.

[12]  Andreas Winter,et al.  Querying as an enabling technology in software reengineering , 1999, Proceedings of the Third European Conference on Software Maintenance and Reengineering (Cat. No. PR00090).

[13]  Rudolf Berghammer,et al.  Implementation of Relational Algebra Using Binary Decision Diagrams , 2001, RelMiCS.

[14]  Daniel Jackson,et al.  Alloy: a lightweight object modelling notation , 2002, TSEM.

[15]  Richard A. O'Keefe,et al.  The Craft of Prolog , 1990 .

[16]  Alex Quilici,et al.  A memory-based approach to recognizing programming plans , 1994, CACM.

[17]  Loe Feijs,et al.  A relational approach to support software architecture analysis , 1998 .

[18]  Linda M. Wills,et al.  Recognizing a program's design: a graph-parsing approach , 1990, IEEE Software.

[19]  Rick Kazman,et al.  Assessing architectural complexity , 1998, Proceedings of the Second Euromicro Conference on Software Maintenance and Reengineering.

[20]  Alberto O. Mendelzon,et al.  Reverse Engineering by Visualizing and Querying , 1995, Softw. Concepts Tools.

[21]  Daniel Jackson,et al.  Automating first-order relational logic , 2000, SIGSOFT '00/FSE-8.

[22]  Oliver Ciupke,et al.  Automatic detection of design problems in object-oriented reengineering , 1999, Proceedings of Technology of Object-Oriented Languages and Systems - TOOLS 30 (Cat. No.PR00278).

[23]  Edmund M. Clarke,et al.  Symbolic Model Checking: 10^20 States and Beyond , 1990, Inf. Comput..

[24]  Jacob T. Schwartz Automatic Data Structure Choice in a Language of Very High Level , 1975, POPL.

[25]  Dirk Beyer,et al.  CrocoPat: efficient pattern analysis in object-oriented programs , 2003, 11th IEEE International Workshop on Program Comprehension, 2003..

[26]  Giuliano Antoniol,et al.  Design pattern recovery in object-oriented software , 1998, Proceedings. 6th International Workshop on Program Comprehension. IWPC'98 (Cat. No.98TB100242).

[27]  Lutz Prechelt,et al.  Design recovery by automated search for structural design patterns in object-oriented software , 1996, Proceedings of WCRE '96: 4rd Working Conference on Reverse Engineering.

[28]  Roy H. Campbell,et al.  Monitoring compliance of a software system with its high-level design models , 1996, Proceedings of IEEE 18th International Conference on Software Engineering.

[29]  Dirk Beyer,et al.  CrocoPat 2.1 Introduction and Reference Manual , 2004, ArXiv.

[30]  Forrest Shull,et al.  AN INDUCTIVE METHOD FOR DISCOVERING DESIGN PATTERNS FROM OBJECT-ORIENTED SOFTWARE SYSTEMS , 1998 .

[31]  David Notkin,et al.  Software Reflexion Models: Bridging the Gap between Design and Implementation , 2001, IEEE Trans. Software Eng..

[32]  Giuliano Antoniol,et al.  Object oriented design pattern inference , 1999, Proceedings IEEE International Conference on Software Maintenance - 1999 (ICSM'99). 'Software Maintenance for Business Change' (Cat. No.99CB36360).

[33]  Rudolf K. Keller,et al.  Pattern-based reverse-engineering of design components , 1999, Proceedings of the 1999 International Conference on Software Engineering (IEEE Cat. No.99CB37002).

[34]  Jens Krinke,et al.  Identifying similar code with program dependence graphs , 2001, Proceedings Eighth Working Conference on Reverse Engineering.

[35]  John Hartman,et al.  Understanding natural programs using proper decomposition , 1991, [1991 Proceedings] 13th International Conference on Software Engineering.

[36]  Randal E. Bryant,et al.  Graph-Based Algorithms for Boolean Function Manipulation , 1986, IEEE Transactions on Computers.

[37]  Richard C. Holt Structural manipulations of software architecture using Tarski relational algebra , 1998, Proceedings Fifth Working Conference on Reverse Engineering (Cat. No.98TB100261).

[38]  Kim Mens,et al.  Declaratively codifying software architectures using virtual software classifications , 1999, Proceedings Technology of Object-Oriented Languages and Systems. TOOLS 29 (Cat. No.PR00275).

[39]  E. F. CODD,et al.  A relational model of data for large shared data banks , 1970, CACM.