JavaCFG is an instance of MOP for Java and for CFG specifications. This instance is technically unnecessary, since one can simply run JavaMOP with CFG specifications, which is precisely what the online interface below does. JavaCFG has, however, conceptual (and potentially theoretical) value; many Java users prefer to specify properties exclusively as parametric context free patterns.
Enter your CFG specification in the form below or chose (and modify) one example from the menu - provided examples are also reachable from the menu of the main JavaMOP interface.
Go to JavaMOP for instructions on how to download and install it, as well as on how to compile the AspectJ monitors generated below.

Run JavaCFG Online

Enter your specification or chose (and modify) one example from the menu.
Click Run to run JavaCFG.
The generated monitor can be compiled using any AspectJ compiler;
HERE are instructions on how to do it (must read it if you want to compile the generated aspect monitor!).

Choose an example:

HasNext

SafeFile

SafeFileWriter

SafeLock

SimpleSafeLock

The desired name of the generated monitor aspect will be

MonitorAspect

Please press the Run button once and wait; it may take a few seconds to run JavaCFG; the execution of JavaCFG using this web interface is limited to 2 minutes of CPU time and 500 MB of RAM.