This file is indexed.

/usr/share/titan/help/info/alt.html is in eclipse-titan 6.3.1-1build1.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
<!--
 Copyright (c) 2000-2017 Ericsson Telecom AB
 All rights reserved. This program and the accompanying materials
 are made available under the terms of the Eclipse Public License v1.0
 which accompanies this distribution, and is available at
 http://www.eclipse.org/legal/epl-v10.html

 Contributors:
  Baji, Laszlo
  Balasko, Jeno
  Farkas, Laszlo
  Szabados, Kristof
  Szabo, Janos Zoltan – initial implementation
-->
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta http-equiv="Content-Language" content="en-us">
<title>alt</title>
</head>
<body bgcolor="#DAD3C5" vlink="#0094D2" link="#003258">
<table align="left" border="0" cellspacing="0" cellpadding="0" valign=top>
  <tr>
    <td width=105 height=40><a href="https://projects.eclipse.org/projects/tools.titan"><img src="../images/titan_transparent.gif" border=0 width=105 height=40 align="left" alt="Titan"></a></td>
  </tr>
</table>
<table border="0" align="right" cellpadding="0" cellspacing="0">
  <tr>
    <td><a href="../titan_main.html" alt="contents"><img border="0" src="../images/ao.jpg" width="53" height="40"></a></td>
    <td><a href="../titan_index.html" alt="index"><img border="0" src="../images/up.jpg" width="53" height="40"></a></td>
    <td><a href="all.html" alt="previous"><img border="0" src="../images/left.jpg" width="53" height="40"></a></td>
    <td><a href="altstep.html" alt="next"><img border="0" src="../images/right.jpg" width="53" height="40"></a></td>
  </tr>
</table>
<p><br clear="all">
</p>
<hr>
<h1>alt</h1>
<hr align="left" width="75%">
<p>The statement denotes branching of test behavior due to the reception and handling of communication and/or timer events and/or the termination of parallel test components. The individual
alternatives (or branches) begin with a Boolean guard enabling or disabling the alternative (default is true), continue with an event or “receiving operation�, which can be successful or unsuccessful
(&quot;condition&quot;) and end by an optional statement block.
<ul>
  <li>When entering an alt statement, a snapshot is taken. A new snapshot is triggered by the statement <b><font face="Courier New" color="#003258" size="4">repeat</font></b>.</li>
  <li>It is possible to enable/disable an alternative by means of a Boolean expression placed between the brackets of the alternative.</li>
  <li>The last branch in an alt statement can be defined as an else branch by including the else keyword between the brackets of the alternative.</li>
  <li>alt statements may be nested.</li>
</ul>
<p>Related keywords:</p>
<ul>
  <li><a href="repeat.html"><b><font face="Courier New" color="#003258" size="4">repeat</font></b></a></li>
  <li><a href="else.html"><b><font face="Courier New" color="#003258" size="4">else</font></b></a></li>
</ul>
<hr align="left" width="50%">
<div align="center">
<table border="0" width="90%" bgcolor="#FFB599" cellpadding="4">
  <tr>
    <td width="100%">
    <h3 align="left"><font face="Courier New" color="#003258" size="5"><b>alt {<br>
    &nbsp;&nbsp;&nbsp; [</b></font> [<i>guard_expression</i>] <font face="Courier New" color="#003258" size="5"><b>]</b></font> [<i>condition</i>] <font face="Courier New" color="#003258" size="5"><b>{</b></font>
    [<i>statement_block</i>] <font face="Courier New" color="#003258" size="5"><b>}<br>
    &nbsp;&nbsp;&nbsp; </b></font> ...<font face="Courier New" color="#003258" size="5"><b><br>
    };</b></font> &nbsp;</h3>
    </td>
  </tr>
</table>
</div>
<ul>
  <li>
  <p>The <font face="Courier New" color="#003258" size="4"><b>alt</b></font> keyword introduces the branching definition.</p>
  </li>
  <li>
  <p>Each alternative begins with an optional <i>guard_expression</i> with the following options:</p>
  <ul>
    <li>empty guard (note that the brackets must be written) The <i>statement_block</i> will be executed if <i>condition</i> is met.&nbsp;</li>
    <li>Boolean expression. The <i>statement_block</i> will be executed if the Boolean expression evaluates to true AND <i>condition</i> is met.</li>
    <li>
    <p><font face="Courier New" color="#003258" size="4"><b>else</b></font> keyword. The <i>statement_block</i> will always be executed.&nbsp; No <i>condition</i> may appear in the branch.</p>
    </li>
  </ul>
  </li>
  <li>
  <p><i>condition</i> may be a communication or a timer event or the termination of a parallel test component. The following operations may be written here: <a href="receive.html"><b><font
    face="Courier New" color="#003258" size="4">receive</font></b></a>, <a href="trigger.html"><b><font face="Courier New" color="#003258" size="4">trigger</font></b></a>, <a href="getcall.html"><b><font
    face="Courier New" color="#003258" size="4">getcall</font></b></a>, <a href="getreply.html"><b><font face="Courier New" color="#003258" size="4">getreply</font></b></a>, <a href="catch.html"><b><font
    face="Courier New" color="#003258" size="4">catch</font></b></a>, <a href="check.html"><b><font face="Courier New" color="#003258" size="4">check</font></b></a>, <a href="timeout.html"><b><font
    face="Courier New" color="#003258" size="4">timeout</font></b></a> and <a href="done.html"><b><font face="Courier New" color="#003258" size="4">done</font></b></a>.</p>
  </li>
  <li>
  <p>The optional <i>statement_block</i> contains one or more statements separated by semicolons. When empty, the curly brackets must be written.</p>
  </li>
  <li>
  <p><b>...</b> indicates that&nbsp; several branches may occur in the <font face="Courier New" color="#003258" size="4"><b>alt</b></font> body. There is no separator between them.</p>
  </li>
</ul>
<hr align="left" width="50%">
<p>Example:
<p><font face="Courier New">alt {&nbsp;<br>
&nbsp;&nbsp;&nbsp;[]&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;L1_PCO.receive { setverdict(pass) }&nbsp;<br>
&nbsp;&nbsp;&nbsp;[x&lt;=1] L2_PCO.receive { setverdict(inconc) }&nbsp;<br>
&nbsp;&nbsp;&nbsp;[else]&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{ setverdict(fail); stop }&nbsp;<br>
};</font>
<p>The first branch is activated if a message has been received on port L1_PCO. The verdict is set to pass. The second branch is activated if a message has been received on port L2_PCO and the
variable x is not grater then one. In this case the verdict is set to inconclusive. The last branch is activated if none of the ports has received a messages. The verdict is set to fail and test
execution is stopped.</p>
<hr align="left" width="25%">
<hr align="left" width="25%">
<p><a HREF="BNF.html#altconstruct">BNF definition</a> of <font face="Courier New"> alt</font></p>
</body>
</html>