To continue to follow along with this example create a file called script.sml in your AnalysisModule project in Eclipse and copy the contents of Listing 1 into this newly created file.
// need to import the Analyzers to run import mypackage.DWAnalyze import mypackage.DWReport // The state value is used to control the flow through the sml file // It needs to be set to start initially state start // multi is set to the value returned from running the DWAnalyze class. // It is the value that is returned from the analysisRules logic // in this class multi = DWAnalyze:isMultiProcessor if (multi = true) // depending on the value of multi, print some output print DWAnalyze detected a multiprocessor dump else print DWAnalyze did not detect find a multiprocessor dump fi // Next run the DWReport class report DWReport // run the report // Finally exit terminate ok |
As you can see from the comments within Listing 1 this sample script runs the isMultiProcessor rule contained within the DWAnalyze class and prints out an appropriate message according to the result. It then runs the DWReport analyzer.