The procedure below explains how to configure a Universal Language in the CAST Engineering Dashboard. This procedure will be illustrated with the PHP language.
Category for the technology and the module
First of all, you must select a category for an existing APM technology or create a new one. This category achieves two goals:
- identifies the technology name (in the description tag of the category)
- associates the modules with the technology
To create a new category, please insert it before the GrepTag called "GrepTag:APM_next_language". For example, for PHP, a new category "PHP" technology has been created:
Next you need to associate the category to the type of project for the language:
Please note that the category description (here PHP) must be the same as the language name.
Categories for the objects
The relevant objects of the language must now be associated to the APM primitive categories. These categories are of two main types:
- Inventory categories: counts statistics on applications (number of classes, forms, etc.)
- Process categories: identifies objects for APM calculations (source objects, data objects, etc.)
To make the metamodel file more readable, it may be useful to create an applicative category. For example in PHP:
Below is an overview of the APM categories described in the document above. Moreover, inventory categories determine the types of objects that must appear in "inventory" metrics.
APM Client Language Artifacts
Basic programming element (contains source code)
Highest level objects containing source code (used for line counting)
Interface (object oriented languages)
Classes (object oriented languages)
Methods of a class / interface (object oriented languages)
APM Data Members
Members of a class (object oriented languages)
APM Inventory Files
For number of files
APM Inventory Methods
APM Inventory Functions
APM Inventory Functions and Procedures
SQL functions and Procedures
APM Inventory Triggers
APM Inventory Events
APM Inventory Macros
|APM Inventory Programs||Programs|
You also need to define a subset type for your language – this is obligatory. The subset type allows you to create "User-defined modules" for your language type in the CAST Management Studio.
For example, for PHP, the subset has already been defined:
The <inheritedCategory name="PROJECT_SUBSET"/> element is obligatory, the <inheritedCategory name="PHP"/> identifies the language category and the <inheritedCategory name="APM PHP Module"/> is identical to the category defined in the "project" type. Make sure you define a unique "rid" for the subset.
After this, you must modify the parameter values for some Quality Rules, Distributions, Measures, and Sizing Indicators. CAST recommends modifying the following:
BackFired OMG-compliant Automated Function Points
BackFired FP ratio
Distribution of artifacts regarding their size (Lines Of Code)
Distribution of artifacts regarding their coupling
Distribution of artifacts regarding their cyclomatic complexity
The rate of high and very high complexity is evaluated as a % of the number of code lines of the application details
Complexity Volume (% of LoC)
Distribution of artifacts regarding their reuse
Class Complexity Distribution (WMC)
Class Fan-Out Distribution
Class Fan-In Distribution
To do this, you must use the CAST Management Studio and the Assessment Model editor - import the Assessment Model from the CAST Dashboard Service. For example, for the Quality Distribution "Class Fan-Out Distribution" you need to drill down as follows:
- Assessment Model
- Quality Model
- Quality Distributions
- Select the parent distribution ("Class Fan-Out Distribution" in this case)
- Select the appropriate Contextual Parameter
- Click the edit button
- A new tab will be opened as shown below:
- First check that the parameter value you require for your language is present in the list, if not, add it in.
- Then select the value in the list and add in a Technology filter for your new language - the language should be present if you have followed the instructions in the rest of this document.
- Changes will be taken into account during the next Snapshot generation.
CAST Engineering Dashboard Cost Control
To use the CAST Engineering Dashboard Cost Control functionality, you must enter a value for:
- Cost per man-day
- Change effort rates for artifacts of low, average, high and very high complexity.
- New development effort rates for artifacts of low, average, high and very high complexity.
This can be done in two ways:
- With the CAST Engineering Dashboard GUI:
- From Quick Access, in Administrator pages, follow link : Access To Cost Model Administration Page
- Enter Edit technologies cost per man-day
- Enter Edit technologies change effort rates
- Enter Edit technologies new development effort bookmark rates
- With the CAST Engineering Dashboard configuration file (you may need to create this file yourself):
- Edit InstallScripts \ COST \ COST_ConfigData.xml file.
- Enter new nodes of this type COST_CONFIG:
TECHNO_ID: ID of the technology created in the metamodel file. See section 9.2.
PROFILE_NAME: only 1 configuration profile for now. Must be set to 'Default'.
COST_VALUE_INDEX: Indicate the domain and the type of artifact:
- 0 : Cost per man-day
- 1 : Change effort rate for Low complexity artifact
- -1 : New development effort rate for Low complexity artifact
- 2 : Change effort rate for Average complexity artifact
- -2 : New development effort rate for Average complexity artifact
- 3 : Change effort rate for High complexity artifact
- -3 : New development effort rate for High complexity artifact
- 4 : Change effort rate for Very High complexity artifact
- -4 : New development effort rate for Very High complexity artifact
COST_NUM_VALUE: Value for the cost
In all, you must add 9 nodes (1 for Cost per man-day, 4 for new development effort rates and 4 for Change effort rates). Finally, you need to reinstall the CAST Dashboard Service using CAST Server Manager in order that this configuration file is taken into account.
CAST Enlighten Cost Estimation
In same way as described above, you must configure the cost of object modifications per technology. The Cost Estimation feature is based on APM Cost handling, thus it is mandatory to support these technologies in the CAST Engineering Dashboard.
To setup Cost, please launch CAST Enlighten and select Tools > Cost Estimation > Cost Setup:
Quality status thresholds
When adding a new diagnostic-based Metric, default status thresholds will be applied.
The default values are:
- From 0 up to 10% of compliant objects: the grade is '1' and the status is 'Very High Risk' with a red color-code
- From 10 up to 70% of compliant objects: the grade grows linearly from '1' to '2' and the status is still 'Very High Risk' with red color-code
- From 70 up to 90% of compliant objects: the grade grows linearly from '2' to '3' and the status is 'High Risk' with orange color-code
- From 90 up to 99% of compliant objects: the grade grows linearly from '3' to '4' and the status is 'Moderate' with yellow color-code
- From 99 up to 100% of compliant objects: the grade is '4' and the status is 'Low Risk' with green color-code.
The thresholds that drive these statuses can be updated. This can be done in two ways:
- With the CAST Management Studio via the Assessment Model. Drill down as follows:
- Quality Model
- Technical Criteria
- Select the appropriate Technical Criteria
- Grade Impacts
- Select the parent Business Criterion whose weight you need to modify
- Modify the weight
- Changes will be taken into account during the next Snapshot generation
- With the CAST Engineering Dashboard configuration file:
- Edit InstallScripts \ ADG \ ADG_ConfigData.xml file (you may need to create this file yourself).
- Enter new nodes of this type COST_CONFIG:
Where the following is true:
- STATUS: '0' for Diagnostic-based Metrics
- METRIC_ID: ID of the Diagnostic-based Metric created in the Metric Tree.
- THRESHOLD_1: percentage thresholds to switch from the '1' plateau to the '1' to '2' ramp; instead of 10%.
- THRESHOLD_2: percentage thresholds to switch from the '1' to '2' ramp to the '2' to '3' ramp; instead of 70%.
- THRESHOLD_3: percentage thresholds to switch from the '2' to '3' ramp to the '3' to '4' ramp; instead of 90%.
THRESHOLD_4:percentage thresholds to switch from the '3' to '4' ramp to the '4' plateau; instead of 99%.
Note: Thresholds must be strictly ascending yet they can be outside of the 0-100 % interval if one status must never be reached.