Chapter 5. Computation Syntax

Table of Contents

Operands
Simple Calculation Syntax
Functions
Mathematical Functions
Conditional and Level-Related Functions
Temporal Functions
Date Functions
Milestone Functions
String Matching Functions
Queries
Computing Values
Query Scope
Query Conditions
Examples

Computation formulae are used in two contexts:

Basic examples of Computations and Trigger are shown below:

<Measure measureId="CLSTAB_DEBT" defaultValue="0">
<Computation 
targetArtefactTypes="FILE;FOLDER;APPLICATION" 
result="SUM CLASS.I.STABILITY FROM DESCENDANTS" />
</Measure>

<Trigger>
<Test 
expr="COUNT RULE.OCCURRENCES FROM DESCENDANTS" 
bounds="[1;[" 
descrId="PRESENTATION_COMPOUND" />
</Trigger>

A computation is built on operands, i.e. any element defined in the model (rules, indicators, measures, etc...) used with operators and optionally restricted to a predefined scope.

There are two ways to write the formula used to compute the results, depending on the results you are trying to achieve:

The following sections will cover the use of operands and the syntax used for simple calculations and queries.