RestrictED - Static Source Code Analysis using OCL

RestrictED logo

What is RestrictED?

RestrictED is a tool for generic static source code analysis. Based on OCL users can specify code patterns to search for. RestrictED can find violations of naming conventions or check that source code conforms to certain metrics. Depending on the defined OCL queries arbitrary code analyses are possible.

RestrictED is implemented as Eclipse plug-in and uses EMFText to create meta models from syntax definitions of context-free languages.

Download RestrictED

Currently RestrictED is only available bundled with Eclipse Ganymede. We are working hard to provide an update site, but for the time being you must use the bundles provided below. If you are interested in RestrictED, we can also provide source code.

Eclipse Ganymede with RestrictED (Win32)
Eclipse Ganymede with RestrictED (MacOS)
Eclipse Ganymede with RestrictED (Linux 32bit)

Example workspace

Getting started

To get started with RestrictED you should follow these steps:

  1. Download RestrictED for your platform
  2. Download example workspace
  3. Extract both archives with your favorite tool
  4. Run the Eclipse binary
  5. When Eclipse asks for the path to your workspace select the location you extracted the example workspace to
  6. Open example files (.java, .sql or .chart) with the EMF Text Editor (Use right mouse click and "Open with...")
  7. Play around with the OCL queries (located in the .ocl files)

Known problems

  1. The syntax definition for the three languages are not complete. You may encounter parsing errors even though you possibly entered valid Java or SQL.
  2. There is no feedback yet if you have errors in your OCL queries. Erronous queries are simply ignored.
  3. The OCL queries are only evaluated when documents opened with the EMFText editor are saved. This implies that changing the contents of a .ocl file (which is usually edited with the standard Eclipse editor) does not trigger re-evaluation. To tell RestrictED to evaluate again you must save the file that is subject to the queries.

Contact

If you have questions and/or comments dont hesitate to contact us via email:

Mirko Seifert (mirko.seifert@inf.tu-dresden.de)

Roland Samlaus (roland.samlaus@inf.tu-dresden.de)