Main Window


The main window is displayed when the UA Assistant application is launched:

Importing a package

The first thing you need to do before you can validate a package, is to import it into the UA Assistant. To do so:

  1. Click the browse button ("...") in the Package path section
  2. A standard Windows Browse for Folder dialog box will be displayed
  3. Locate the folder (directory) that contains your MetaModel, LanguagePattern and (optionally) InformationTracking files, then click OK
  4. The path of your package folder will be displayed in the Package path section (as shown above)
  5. Your package is now imported into the UA Assistant
Validating your package

To check that the package is consistent and conforms to a pre-defined CAST structure, click the Validate button. The following checks will be made on your package:

  • a check to ensure all required files are present in the package folder
  • a check to ensure that the MetaModel, LanguagePattern and (optionally) InformationTracking files are syntactically correct
  • a check to ensure all types and categories referenced in the MetaModel and LanguagePattern files are correctly defined
  • a check to ensure that types defined in the MetaModel file have an associated recognition section in the LanguagePattern file
  • a check to ensure that all types that can have children have a valid body regular expression (because child objects are searched for in the body)
  • a check to ensure that each link used as a Caller has a corresponding regular expression
  • a check to ensure that each link that has been defined a regular expression is used as a Caller
  • a check to ensure that each type and link used in the InformationTracking file is also defined in the MetaModel file
  • a check to ensure that parents of types with no end pattern do not have a nested body
  • a check to ensure that for each type with no end pattern, the list of child objects must be distinct from the list of sibling objects
  • See also Limitations for more information about what may cause the validation to fail.

Results of the validation process will be displayed in the Report section (as shown in the above image).

Validate Package MetaModel file only

Select the above option if you only want to validate the MetaModel file. If you do so, the Universal Assistant will ignore the LanguagePattern file and the option InformationTracking file. This is particularly useful when you only need to validate the MetaModel file when using the Universal Importer tool in CAST Analysis Manager.

Notes

  • Your package folder (directory) must have the same language name as your MetaModel and LanguagePattern files (the check will fail if not). For example, for PHP:

    Directory name > PHP MetaModel name > PHPMetaModel.xml LanguagePattern name > PHPLanguagePattern.xml InformationTracking name > PHPInformationTracking.xml (optional)
  • Note that if your language package does not contain an InformationTracking file, then this will be displayed in the validation report.
  • Please note that it is not necessary to validate the predefined Korn Shell and PHP language packages that are shipped by default by CAST.
Previewing your package

To visualize the results that would be found by the Universal Analyzer based on the current package, use the Preview button (this button is only active once the validation process has been successfully completed).

See Pattern Preview Window for more information about this.

Notes

  • The Preview button is only active once the validation process has been successfully completed.
Saving your package

The save process (Save to Disk option) involves saving your validated language package to your hard drive for later use during installation to the CAST Knowledge Base. This process is a mandatory operation and forms part of the process of integrating a new or modified package into the CAST Knowledge Base.

Once the package has been saved, and in order for the package to be visible in the Universal Analyzer (Language Selection page - see the on-line Help for CAST Analysis Manager), you must integrate it into the CAST Knowledge Base.

To do so, use CAST Server Manager:

  1. Select the database/schema that hosts your CAST Knowledge Base
  2. Select Database/Schema Installation > Load MetaModel > From Disk
  3. Your package will now be integrated into the CAST Knowledge Base and will be visible in the Universal Analyzer (Language Selection page)

Notes

  • Once the package has been saved, your original language package is no longer required.
Closing the application

Use the Exit button to quit the UA Assistant.

See Also

Pattern Preview Window | Limitations


CAST Website