On this page:

Target audience:

CAST Administrators

Summary: This page describes what you need to do if you have existing custom Universal Analyzer extensions (language packages) used with previous versions of CAST AIP and you want to use them with this release and any future release of CAST AIP.

Introduction

CAST has made changes to the way in which Universal Analyzer extensions (language packages) are handled:

  • The Universal Analyzer is unicode compliant, therefore it can work with unicode encoded source files. As such, the extension's configuration XML files also need to be unicode compliant.
  • CAST uses the Perl Regular Expression engine called BOOST (previously the TCL engine was used), therefore Regular Expressions that are defined in your extension files must use the BOOST Regular Expression format.
  • A change to the metamodel format has also been introduced.
  • For those working on custom Universal Analyzer extensions created for use with CAST AIP 6.4.x, a specific change is required.

Each change is detailed below.

XML configuration file encoding

All XML files used in the extension must use the UTF-8 encoding as follows:

  • The XML declaration (the first line of the file) must include the UTF-8 encoding attribute (as shown below) therefore you need to check that any existing XML files include the correct declaration:
<?xml version="1.0" encoding="utf-8" ?>
  • All XML files must be saved in UTF-8 format

The following files are involved:

  • xxxMetaModel.xml
  • xxxLanguagePattern.xml
  • xxxInformationTracking.xml
  • xxxCastMetrics.xml

Regular Expression formatting

You must ensure that any Regular Expressions you have defined in your extension's configuration files (for example to detect specific objects) are compatible with the new BOOST Regular Expression engine.You can find out more about this engine here: http://www.boost.org/doc/libs/release/libs/regex/doc/html/boost_regex/syntax/perl_syntax.html.

The following files are involved:

  • xxxLanguagePattern.xml
  • xxxCastMetrics.xml

Braces

All braces ( { and } ) in regular expressions need to be escaped with a backslash ( \ ). For instance, if you want to match one or more letters, followed by one or more blanks, followed by an opening brace:

  • Correct: [A-Za-z]+[ ]+\{
  • Wrong: [A-Za-z]+[ ]+{

Note that inside character sets ( […] ) the backslash is not necessary. For instance "[A-Za-z$({]" is correct and will match any letter, or the dollar sign, or the opening parenthesis, or the opening brace.

Extended ASCII characters

You cannot specify extended ASCII characters with the "\x…" notation any longer. Use character classes instead. For instance, to match any alpha-numeric character, including accented letters:

  • Correct: [[:alpha:]]
  • Wrong: [A-Za-z0-9\x80-\xFF]

Metamodel changes

If you have developed the metamodel for your custom Universal Analyzer extension using the Excel file provided by CAST, then you must ensure that the following line is removed from your existing XXXmetamodel.xml file:

<tree parent="EnlightenUniversalObjects" category="EnlightenTree"/>

Custom extensions created for use with CAST AIP 6.4.x

In custom extensions developed for CAST AIP 6.4.x, references to the stored procedure ADG_CENTRAL_RESULT_STD (in either the metric tree XML file injected by CAST Server Manager or in the Assessment Model PMX file) must be replaced by references to the stored procedure ADG_CENTRAL_RESULT_DIAG when adapting the extension for use with CAST AIP 7.0.x (or higher).

Testing your changes

CAST highly recommends that you install a "test" CAST environment (i.e. all CAST schemas) to check that the changes you have made to the extension files are:

  • valid
  • do not cause syntax errors during the analysis
  • produce the same results as the existing language package

Once the extension has been tested and you are happy with the results, you can then apply it to your "production" CAST environment, either as part of a migration process to the current version of CAST AIP or by installing the extension from scratch in the current version of CAST AIP.