© Copyright Technische Universität Darmstadt  /  FB Informatik  /  FG Software Technology

IRC - Implementation Restriction Checker

The work on IRC is discontinued; we are currently working on the successor Magellan. Please, visit the Magellan website for further information.

IRC (Implementation Restriction Checker) is a flexible framework to enforce implementation restrictions, for example the EJB programming restrictions or programming idioms. IRC is described in the following paper.

[2004] Michael Eichberg, Mira Mezini, Thorsten Schäfer, Claus Beringer and Karl Matthias Hamel
Enforcing System-Wide Properties
In Proceedings of Australian Software Engineering Conference 2004, IEEE Computer Society Press, Pages 158-167
[IRC.pdf] [BibTeX]

The Framework


An implementation restriction is a constraint on the structural or behavioral aspect of an implementation. On the one hand, implementation restrictions are simply a technical necessity. On the other hand, they can be part of a specification to restrict the freedom of classes implemented according to a specification. A third kind of implementation restrictions are the usage of design patterns and best practices, a development team has committed to. The IRC Framework allows you to enforce these kinds of implementation restrictions.

It consists of the following participants:

  • IRCManager: Manages the registration and deregistration of checker instances and controls the checking process.
  • IRC: The main interface of every restriction checker. It declares only one method: "check(ClassFile classFile)", where ClassFile is a BAT interface to represent a Java class file.
  • IRStatus: An identified issue in a class file. An IRStatus defines the classFile which caused this status, the severity, the broken restriction and a describing text. Further, an IRLocation instance that encapsulates the location corresponding to the status is available.
  • IRLocation: Represents the origin of an IRStatus. A location can be the classFile itself, the class definition, a method, a field or a line number of the corresponding source code. To create specific instances the IRLocation class defines several factory methods.
  • IRException: A simple subclass of java.lang.Exception, which is thrown if a checker can't check a classFile.

A typical application flow looks like this:

  • Step 1: The client creates an IRManager with a reference to a BAT repository.
  • Step 2 and 3: After this, the checker registers IRC instances that will check the implementation restrictions.
  • Step 4: After setup, the client can check class files by invoking the corresponding method of the manager. The manager will return a list of IRStatus objects, representing informational messages, warnings or broken restrictions.

The Plug-in


In addition to the core framework, we also developed a plug-in for the Eclipse IDE. In the following Screenshot you see an error detected by an implementation restriction checker.

Download


Since IRC is discontinued, a download is no longer made available. Please visit the Magellan webpage for information about the successor.