<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
	<link rel="stylesheet" type="text/css" href="http://oldforge.etsi.org/mantis/css/default.css" />
	<script type="text/javascript"><!--
		if(document.layers) {document.write("<style>td{padding:0px;}<\/style>")}
	// --></script>
	<meta http-equiv="Content-type" content="text/html; charset=utf-8" />
	<meta http-equiv="Pragma" content="no-cache" />
	<meta http-equiv="Cache-Control" content="no-cache" />
	<meta http-equiv="Pragma-directive" content="no-cache" />
	<meta http-equiv="Cache-Directive" content="no-cache" />
	<meta http-equiv="Expires" content="Tue, 17 Dec 2024 09:18:37 GMT" />
	<link rel="shortcut icon" href="/mantis/images/favicon.ico" type="image/x-icon" />
	<link rel="search" type="application/opensearchdescription+xml" title="MantisBT: Text Search" href="http://oldforge.etsi.org/mantis/browser_search_plugin.php?type=text" />	<link rel="search" type="application/opensearchdescription+xml" title="MantisBT: Issue Id" href="http://oldforge.etsi.org/mantis/browser_search_plugin.php?type=id" />	<title>0005884: Relational operators and inlined values [Part 1: Clause 7.1.3] - ETSI's Bug Tracker</title>
<script type="text/javascript" src="/mantis/javascript/min/common.js"></script>
<script type="text/javascript">var loading_lang = "Loading...";</script><script type="text/javascript" src="/mantis/javascript/min/ajax.js"></script>
</head>
<body>
<br /><table class="width100" cellspacing="1"><tr><td class="form-title" colspan="6"><div class="center">ETSI's Bug Tracker - Part 01: TTCN-3 Core Language</div></td></tr><tr><td class="form-title" colspan="6">View Issue Details</td></tr><tr><td class="print-spacer" colspan="6"><hr size="1" /></td></tr><tr class="print-category"><td class="print" width="16%">ID</td><td class="print" width="16%">Project</td><td class="print" width="16%">Category</td><td class="print" width="16%">View Status</td><td class="print" width="16%">Date Submitted</td><td class="print" width="16%">Last Update</td></tr><tr class="print"><td class="print">0005884</td><td class="print">Part 01: TTCN-3 Core Language</td><td class="print">Clarification</td><td class="print">public</td><td class="print">08-05-2011 18:36</td><td class="print">01-07-2011 14:46</td></tr><tr><td class="print-spacer" colspan="6"><hr size="1" /></td></tr><tr class="print"><td class="print-category">Reporter</td><td class="print">Philip Makedonski</td><td class="print" colspan="4">&#160;</td></tr><tr class="print"><td class="print-category">Assigned To</td><td class="print">Ina Schieferdecker</td><td class="print" colspan="4">&#160;</td></tr><tr class="print"><td class="print-category">Priority</td><td class="print">high</td><td class="print-category">Severity</td><td class="print">text</td><td class="print-category">Reproducibility</td><td class="print">N/A</td></tr><tr class="print"><td class="print-category">Status</td><td class="print">closed</td><td class="print-category">Resolution</td><td class="print">fixed</td><td class="print" colspan="2">&#160;</td></tr><tr class="print"><td class="print-category">Platform</td><td class="print"></td><td class="print-category">OS</td><td class="print"></td><td class="print-category">OS Version</td><td class="print"></td></tr><tr class="print"><td class="print-category">Product Version</td><td class="print"></td><td class="print" colspan="4">&#160;</td></tr><tr><td class="print-category">Target Version</td><td class="print">v4.3.2 (interim 2011)</td><td class="print-category">Fixed in Version</td><td class="print">v4.3.2 (interim 2011)</td><td class="print" colspan="2">&#160;</td></tr><tr class="print"><td class="print-category">Clause Reference(s)</td><td class="print" colspan="4">7.1.3</td></tr><tr class="print"><td class="print-category">Source  (company  - Author)</td><td class="print" colspan="4">University of GÃ¶ttingen - Philip Makedonski</td></tr><tr><td class="print-spacer" colspan="6"><hr size="1" /></td></tr><tr class="print"><td class="print-category">Summary</td><td class="print" colspan="5">0005884: Relational operators and inlined values [Part 1: Clause 7.1.3]</td></tr><tr class="print"><td class="print-category">Description</td><td class="print" colspan="5">There has been some discussion regarding the possibility of using inlined value definitions with relational operators. Take for example:<br />
<br />
&#160;&#160;&#160;&#160;type record R<br />
&#160;&#160;&#160;&#160;{<br />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;integer a,<br />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;integer b<br />
&#160;&#160;&#160;&#160;}<br />
<br />
&#160;&#160;&#160;&#160;function f(){<br />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;var R vl_rec1 := {1,2}<br />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;var R vl_rec2 := {1,2}<br />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;if (vl_rec1 == vl_rec2) {}  //(1)<br />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;if (vl_rec2 == {1,2}) {}    //(2)<br />
&#160;&#160;&#160;&#160;}<br />
<br />
As of now, the BNF permits (1) but not (2). <br />
<br />
Clause 7.1.3 states that:<br />
&quot;Two record values, set values, record of values or set of values are equal if and only if their effective value structures are compatible (see clause 6.3) and the actual values of all corresponding fields are equal. record values may also be compared to record of values and set values to set of values. In these cases the same rule applies as for comparing two record or set values.&quot;<br />
<br />
This seems to imply that (2) above (and possibly similar cases) should be accepted as well, although there doesn't seem to be any further evidence pointing to this.<br />
<br />
Some clarity on this would be highly appreciated: <br />
- Is it intentional that (2) is not supported? (I can see various reasons for this, an official statement would be helpful, however)<br />
<br />
The list operator (Clause 7.1.2) causes some confusion in a similar manner.<br />
&#160;<br />
</td></tr><tr class="print"><td class="print-category">Steps To Reproduce</td><td class="print" colspan="5"></td></tr><tr class="print"><td class="print-category">Additional Information</td><td class="print" colspan="5"></td></tr><tr class="print"><td class="print-category">Tags</td><td class="print" colspan="5">No tags attached.</td></tr><tr class="print"><td class="print-category">Relationships</td><td class="print" colspan="5"></td></tr><tr class="print"><td class="print-category">Attached Files</td><td class="print" colspan="5"><img src="http://oldforge.etsi.org/mantis/images/fileicons/doc.gif" alt="doc" />&#160;es_20187301v040205m_CR5884.doc (99,840) <span class="italic">26-05-2011 15:24</span><br />http://oldforge.etsi.org/mantis/file_download.php?file_id=2507&amp;type=bug<br /><img src="http://oldforge.etsi.org/mantis/images/fileicons/generic.gif" alt="?" />&#160;core.bnf (57,277) <span class="italic">30-06-2011 17:51</span><br />http://oldforge.etsi.org/mantis/file_download.php?file_id=2542&amp;type=bug</td></tr><tr><td class="print-spacer" colspan="6"><hr size="1" /></td></tr><tr><td class="form-title">Issue History</td></tr><tr class="print-category"><td class="row-category-history">Date Modified</td><td class="row-category-history">Username</td><td class="row-category-history">Field</td><td class="row-category-history">Change</td></tr><tr class="print"><td class="print">08-05-2011 18:36</td><td class="print"><a href="http://oldforge.etsi.org/mantis/view_user_page.php?id=520">Philip Makedonski</a></td><td class="print">New Issue</td><td class="print"></td></tr><tr class="print"><td class="print">08-05-2011 18:36</td><td class="print"><a href="http://oldforge.etsi.org/mantis/view_user_page.php?id=520">Philip Makedonski</a></td><td class="print">Clause Reference(s)</td><td class="print"> =&gt; 7.1.3</td></tr><tr class="print"><td class="print">08-05-2011 18:36</td><td class="print"><a href="http://oldforge.etsi.org/mantis/view_user_page.php?id=520">Philip Makedonski</a></td><td class="print">Source  (company  - Author)</td><td class="print"> =&gt; University of GÃ¶ttingen - Philip Makedonski</td></tr><tr class="print"><td class="print">24-05-2011 10:40</td><td class="print"><a href="http://oldforge.etsi.org/mantis/view_user_page.php?id=508">Jacob Wieland - Spirent</a></td><td class="print">Note Added: 0010004</td><td class="print"></td></tr><tr class="print"><td class="print">24-05-2011 12:02</td><td class="print"><a href="http://oldforge.etsi.org/mantis/view_user_page.php?id=127">Gyorgy Rethy</a></td><td class="print">Status</td><td class="print">new =&gt; assigned</td></tr><tr class="print"><td class="print">24-05-2011 12:02</td><td class="print"><a href="http://oldforge.etsi.org/mantis/view_user_page.php?id=127">Gyorgy Rethy</a></td><td class="print">Assigned To</td><td class="print"> =&gt; Jacob Wieland - Spirent</td></tr><tr class="print"><td class="print">24-05-2011 18:08</td><td class="print"><a href="http://oldforge.etsi.org/mantis/view_user_page.php?id=127">Gyorgy Rethy</a></td><td class="print">Target Version</td><td class="print"> =&gt; Edition 4.3.2 (interim)</td></tr><tr class="print"><td class="print">24-05-2011 19:13</td><td class="print"><a href="http://oldforge.etsi.org/mantis/view_user_page.php?id=127">Gyorgy Rethy</a></td><td class="print">Priority</td><td class="print">normal =&gt; high</td></tr><tr class="print"><td class="print">25-05-2011 10:29</td><td class="print"><a href="http://oldforge.etsi.org/mantis/view_user_page.php?id=508">Jacob Wieland - Spirent</a></td><td class="print">Note Edited: 0010004</td><td class="print"></td></tr><tr class="print"><td class="print">25-05-2011 10:31</td><td class="print"><a href="http://oldforge.etsi.org/mantis/view_user_page.php?id=508">Jacob Wieland - Spirent</a></td><td class="print">Note Edited: 0010004</td><td class="print"></td></tr><tr class="print"><td class="print">25-05-2011 10:32</td><td class="print"><a href="http://oldforge.etsi.org/mantis/view_user_page.php?id=508">Jacob Wieland - Spirent</a></td><td class="print">Note Edited: 0010004</td><td class="print"></td></tr><tr class="print"><td class="print">26-05-2011 13:05</td><td class="print"><a href="http://oldforge.etsi.org/mantis/view_user_page.php?id=508">Jacob Wieland - Spirent</a></td><td class="print">File Added: core.bnf</td><td class="print"></td></tr><tr class="print"><td class="print">26-05-2011 13:06</td><td class="print"><a href="http://oldforge.etsi.org/mantis/view_user_page.php?id=508">Jacob Wieland - Spirent</a></td><td class="print">File Deleted: core.bnf</td><td class="print"></td></tr><tr class="print"><td class="print">26-05-2011 13:06</td><td class="print"><a href="http://oldforge.etsi.org/mantis/view_user_page.php?id=508">Jacob Wieland - Spirent</a></td><td class="print">File Added: core.bnf</td><td class="print"></td></tr><tr class="print"><td class="print">26-05-2011 13:07</td><td class="print"><a href="http://oldforge.etsi.org/mantis/view_user_page.php?id=508">Jacob Wieland - Spirent</a></td><td class="print">Note Added: 0010086</td><td class="print"></td></tr><tr class="print"><td class="print">26-05-2011 13:11</td><td class="print"><a href="http://oldforge.etsi.org/mantis/view_user_page.php?id=508">Jacob Wieland - Spirent</a></td><td class="print">Assigned To</td><td class="print">Jacob Wieland - Spirent =&gt; Ina Schieferdecker</td></tr><tr class="print"><td class="print">26-05-2011 15:24</td><td class="print"><a href="http://oldforge.etsi.org/mantis/view_user_page.php?id=508">Jacob Wieland - Spirent</a></td><td class="print">File Added: es_20187301v040205m_CR5884.doc</td><td class="print"></td></tr><tr class="print"><td class="print">26-05-2011 15:24</td><td class="print"><a href="http://oldforge.etsi.org/mantis/view_user_page.php?id=508">Jacob Wieland - Spirent</a></td><td class="print">Note Added: 0010090</td><td class="print"></td></tr><tr class="print"><td class="print">30-06-2011 17:50</td><td class="print"><a href="http://oldforge.etsi.org/mantis/view_user_page.php?id=81">Ina Schieferdecker</a></td><td class="print">File Deleted: core.bnf</td><td class="print"></td></tr><tr class="print"><td class="print">30-06-2011 17:51</td><td class="print"><a href="http://oldforge.etsi.org/mantis/view_user_page.php?id=81">Ina Schieferdecker</a></td><td class="print">File Added: core.bnf</td><td class="print"></td></tr><tr class="print"><td class="print">30-06-2011 17:51</td><td class="print"><a href="http://oldforge.etsi.org/mantis/view_user_page.php?id=81">Ina Schieferdecker</a></td><td class="print">Note Added: 0010168</td><td class="print"></td></tr><tr class="print"><td class="print">30-06-2011 17:52</td><td class="print"><a href="http://oldforge.etsi.org/mantis/view_user_page.php?id=81">Ina Schieferdecker</a></td><td class="print">Status</td><td class="print">assigned =&gt; resolved</td></tr><tr class="print"><td class="print">30-06-2011 17:52</td><td class="print"><a href="http://oldforge.etsi.org/mantis/view_user_page.php?id=81">Ina Schieferdecker</a></td><td class="print">Fixed in Version</td><td class="print"> =&gt; Edition 4.3.2 (interim)</td></tr><tr class="print"><td class="print">30-06-2011 17:52</td><td class="print"><a href="http://oldforge.etsi.org/mantis/view_user_page.php?id=81">Ina Schieferdecker</a></td><td class="print">Resolution</td><td class="print">open =&gt; fixed</td></tr><tr class="print"><td class="print">01-07-2011 14:46</td><td class="print"><a href="http://oldforge.etsi.org/mantis/view_user_page.php?id=81">Ina Schieferdecker</a></td><td class="print">Status</td><td class="print">resolved =&gt; closed</td></tr></table>
<br />
<table class="width100" cellspacing="1">
<tr>
	<td class="form-title" colspan="2">
		Notes	</td>
</tr>
<tr>
	<td class="print-spacer" colspan="2">
		<hr size="1" />
	</td>
</tr>
<tr>
	<td class="nopad" valign="top" width="20%">
		<table class="hide" cellspacing="1">
		<tr>
			<td class="print">
				(0010004)
			</td>
		</tr>
		<tr>
			<td class="print">
				<a href="http://oldforge.etsi.org/mantis/view_user_page.php?id=508">Jacob Wieland - Spirent</a>&#160;&#160;&#160;
			</td>
		</tr>
		<tr>
			<td class="print">
				24-05-2011 10:40&#160;&#160;&#160;
				<br />(edited on:&#32;25-05-2011 10:32)			</td>
		</tr>
		</table>
	</td>
	<td class="nopad" valign="top" width="85%">
		<table class="hide" cellspacing="1">
		<tr>
			<td class="print">
				I wholeheartedly agree. <br />
<br />
To be minimally invasive (because the whole Single/Compound expression stuff is defined differently for values and templates), I propose the following changes to allow this:<br />
<br />
507. EqualExpression ::= RelExpression {EqualOp RelExpression}<br />
/* STATIC SEMANTICS - If more than one RelExpression exists, then the RelExpressions shall evaluate to specific values of compatible types. <br />
If only one RelExpression exists, it shall not derive a CompoundExpression */<br />
<br />
508. RelExpression ::= ShiftExpression [RelOp ShiftExpression] | <br />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;CompoundExpression<br />
/* STATIC SEMANTICS - If both ShiftExpressions exist, then each ShiftExpression shall evaluate to a specific integer, Enumerated or float Value or derivatives of these types */<br />
<br />
514. AddExpression ::= MulExpression {AddOp MulExpression}<br />
/* STATIC SEMANTICS - Each MulExpression shall resolve to a specific Value. If more than one MulExpression exists and the AddOp resolves to StringOp then the MulExpressions shall be valid operands for StringOp. If more than one MulExpression exists and the AddOp does not resolve to StringOp then the MulExpression shall both resolve to type integer or float or derivatives of these types. If only one MulExpression exists, it shall not derive a CompoundExpression. */<br />
<br />
515. MulExpression ::= UnaryExpression {MultiplyOp UnaryExpression} | <br />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;CompoundExpression<br />
<br />
Only MulExpression and RelExpression can be CompoundExpressions because only equality and concatenation are defined on structured values.<br />
The additional STATIC SEMANTIC restrictions are necesssary to avoid ambiguity between SingleExpression and CompoundExpression, i.e. the derivation SingleExpression =&gt;* CompoundExpression must be forbidden so that rule<br />
<br />
Expression ::= SingleExpression | CompoundExpression <br />
<br />
remains unambiguous.<br />
<br />
			</td>
		</tr>
		</table>
	</td>
</tr>
<tr>
	<td class="print-spacer" colspan="2">
		<hr size="1" />
	</td>
</tr>
<tr>
	<td class="nopad" valign="top" width="20%">
		<table class="hide" cellspacing="1">
		<tr>
			<td class="print">
				(0010086)
			</td>
		</tr>
		<tr>
			<td class="print">
				<a href="http://oldforge.etsi.org/mantis/view_user_page.php?id=508">Jacob Wieland - Spirent</a>&#160;&#160;&#160;
			</td>
		</tr>
		<tr>
			<td class="print">
				26-05-2011 13:07&#160;&#160;&#160;
							</td>
		</tr>
		</table>
	</td>
	<td class="nopad" valign="top" width="85%">
		<table class="hide" cellspacing="1">
		<tr>
			<td class="print">
				added changed bnf			</td>
		</tr>
		</table>
	</td>
</tr>
<tr>
	<td class="print-spacer" colspan="2">
		<hr size="1" />
	</td>
</tr>
<tr>
	<td class="nopad" valign="top" width="20%">
		<table class="hide" cellspacing="1">
		<tr>
			<td class="print">
				(0010090)
			</td>
		</tr>
		<tr>
			<td class="print">
				<a href="http://oldforge.etsi.org/mantis/view_user_page.php?id=508">Jacob Wieland - Spirent</a>&#160;&#160;&#160;
			</td>
		</tr>
		<tr>
			<td class="print">
				26-05-2011 15:24&#160;&#160;&#160;
							</td>
		</tr>
		</table>
	</td>
	<td class="nopad" valign="top" width="85%">
		<table class="hide" cellspacing="1">
		<tr>
			<td class="print">
				added proposal in text-form, added notes/examples for concatenation/comparison operators			</td>
		</tr>
		</table>
	</td>
</tr>
<tr>
	<td class="print-spacer" colspan="2">
		<hr size="1" />
	</td>
</tr>
<tr>
	<td class="nopad" valign="top" width="20%">
		<table class="hide" cellspacing="1">
		<tr>
			<td class="print">
				(0010168)
			</td>
		</tr>
		<tr>
			<td class="print">
				<a href="http://oldforge.etsi.org/mantis/view_user_page.php?id=81">Ina Schieferdecker</a>&#160;&#160;&#160;
			</td>
		</tr>
		<tr>
			<td class="print">
				30-06-2011 17:51&#160;&#160;&#160;
							</td>
		</tr>
		</table>
	</td>
	<td class="nopad" valign="top" width="85%">
		<table class="hide" cellspacing="1">
		<tr>
			<td class="print">
				Implemented as proposed with small editorial changes			</td>
		</tr>
		</table>
	</td>
</tr>
</table>
</body>
</html>
