JavaMOP Tutorial
JavaMOP Tutorial
In this tutorial, we shall use JavaMOP to specify monitor specifications and weave their implementation
into the target code.
Add %RV-Monitor_HOME%/lib/rv-monitor.jar;%RV-Monitor_HOME%/lib/rv-monitor-rt.jar;%RV-
Monitor_HOME%\bin; to SystemVariables.Path
Now, we specify properties in .mop file. Further, we use JavaMOP to synthesize specification as .aj files.
We use AspectJ to weave them into Java code. Run the target file to see the results.
c:\code\aspectj\sf>javamop SafeFileWriter.mop
-Processing SafeFileWriter.mop
SafeFileWriter.rvm is generated
SafeFileWriterMonitorAspect.aj is generated
-Processing SafeFileWriter.rvm
SafeFileWriterRuntimeMonitor.java is generated