<!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:15:39 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>0007630: example creating empty template is wrong - 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">0007630</td><td class="print">Part 01: TTCN-3 Core Language</td><td class="print">Clarification</td><td class="print">public</td><td class="print">09-03-2017 12:40</td><td class="print">30-12-2017 20:02</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">Jacob Wieland - Spirent</td><td class="print" colspan="4">&#160;</td></tr><tr class="print"><td class="print-category">Assigned To</td><td class="print">Gyorgy Rethy</td><td class="print" colspan="4">&#160;</td></tr><tr class="print"><td class="print-category">Priority</td><td class="print">normal</td><td class="print-category">Severity</td><td class="print">minor</td><td class="print-category">Reproducibility</td><td class="print">have not tried</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">v4.9.1 (published 2017-05)</td><td class="print" colspan="4">&#160;</td></tr><tr><td class="print-category">Target Version</td><td class="print">v4.10.1 (published 2018-05)</td><td class="print-category">Fixed in Version</td><td class="print">v4.10.1 (published 2018-05)</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">15.11</td></tr><tr class="print"><td class="print-category">Source  (company  - Author)</td><td class="print" colspan="4">Spirent - Jacob Wieland</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">0007630: example creating empty template is wrong</td></tr><tr class="print"><td class="print-category">Description</td><td class="print" colspan="5">in section 15.11 in EXAMPLE 1 can be found the following sub-example:<br />
<br />
&quot;<br />
template octetstring mw_myoct3 := ('ABCD'O &amp; ? length(2)) length (1..3);<br />
&#160;// However, this is correct but will not match any value;<br />
&quot;<br />
<br />
According to the definition of template in the definitions in section 3, a template must match at least one value.<br />
<br />
&quot;<br />
A TTCN-3 template identifies a subset of the<br />
values of its type (where the subset may contain a single instance of the type, several instances or all instances) or the<br />
matching mechanism omit.<br />
&quot;<br />
<br />
Since great pains have been taken to assure that no empty types (types containing no value) can be defined in TTCN-3, the above definition excludes also all empty template definitions from validity.<br />
<br />
Therefore, the example is wrong insofar that it explicitly allows such an empty template and should be corrected.<br />
<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;7630.doc (23,552) <span class="italic">09-06-2017 08:59</span><br />http://oldforge.etsi.org/mantis/file_download.php?file_id=3624&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">09-03-2017 12: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">New Issue</td><td class="print"></td></tr><tr class="print"><td class="print">11-04-2017 15:22</td><td class="print"><a href="http://oldforge.etsi.org/mantis/view_user_page.php?id=1021">szabados</a></td><td class="print">Note Added: 0014552</td><td class="print"></td></tr><tr class="print"><td class="print">12-04-2017 08:17</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: 0014553</td><td class="print"></td></tr><tr class="print"><td class="print">12-04-2017 08:17</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 Deleted: 0014553</td><td class="print"></td></tr><tr class="print"><td class="print">12-04-2017 08:20</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: 0014554</td><td class="print"></td></tr><tr class="print"><td class="print">12-04-2017 08:22</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: 0014555</td><td class="print"></td></tr><tr class="print"><td class="print">12-04-2017 08: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: 0014556</td><td class="print"></td></tr><tr class="print"><td class="print">12-04-2017 08: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 Deleted: 0014555</td><td class="print"></td></tr><tr class="print"><td class="print">12-04-2017 08: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 Deleted: 0014554</td><td class="print"></td></tr><tr class="print"><td class="print">17-04-2017 13:18</td><td class="print"><a href="http://oldforge.etsi.org/mantis/view_user_page.php?id=1021">szabados</a></td><td class="print">Note Added: 0014557</td><td class="print"></td></tr><tr class="print"><td class="print">17-04-2017 13:18</td><td class="print"><a href="http://oldforge.etsi.org/mantis/view_user_page.php?id=1021">szabados</a></td><td class="print">Note Deleted: 0014557</td><td class="print"></td></tr><tr class="print"><td class="print">17-04-2017 13:26</td><td class="print"><a href="http://oldforge.etsi.org/mantis/view_user_page.php?id=1021">szabados</a></td><td class="print">Note Added: 0014558</td><td class="print"></td></tr><tr class="print"><td class="print">17-04-2017 13:26</td><td class="print"><a href="http://oldforge.etsi.org/mantis/view_user_page.php?id=1021">szabados</a></td><td class="print">Note Deleted: 0014558</td><td class="print"></td></tr><tr class="print"><td class="print">17-04-2017 13:26</td><td class="print"><a href="http://oldforge.etsi.org/mantis/view_user_page.php?id=1021">szabados</a></td><td class="print">Note Added: 0014559</td><td class="print"></td></tr><tr class="print"><td class="print">17-04-2017 13:26</td><td class="print"><a href="http://oldforge.etsi.org/mantis/view_user_page.php?id=1021">szabados</a></td><td class="print">Note Deleted: 0014559</td><td class="print"></td></tr><tr class="print"><td class="print">17-04-2017 13:28</td><td class="print"><a href="http://oldforge.etsi.org/mantis/view_user_page.php?id=1021">szabados</a></td><td class="print">Note Added: 0014560</td><td class="print"></td></tr><tr class="print"><td class="print">17-04-2017 13:28</td><td class="print"><a href="http://oldforge.etsi.org/mantis/view_user_page.php?id=1021">szabados</a></td><td class="print">Note Deleted: 0014560</td><td class="print"></td></tr><tr class="print"><td class="print">18-04-2017 07:12</td><td class="print"><a href="http://oldforge.etsi.org/mantis/view_user_page.php?id=1021">szabados</a></td><td class="print">Note Added: 0014564</td><td class="print"></td></tr><tr class="print"><td class="print">18-04-2017 07:12</td><td class="print"><a href="http://oldforge.etsi.org/mantis/view_user_page.php?id=1021">szabados</a></td><td class="print">Note Deleted: 0014564</td><td class="print"></td></tr><tr class="print"><td class="print">18-04-2017 07:16</td><td class="print"><a href="http://oldforge.etsi.org/mantis/view_user_page.php?id=1021">szabados</a></td><td class="print">Note Added: 0014565</td><td class="print"></td></tr><tr class="print"><td class="print">18-04-2017 07:16</td><td class="print"><a href="http://oldforge.etsi.org/mantis/view_user_page.php?id=1021">szabados</a></td><td class="print">Note Deleted: 0014565</td><td class="print"></td></tr><tr class="print"><td class="print">18-04-2017 07:18</td><td class="print"><a href="http://oldforge.etsi.org/mantis/view_user_page.php?id=1021">szabados</a></td><td class="print">Note Added: 0014566</td><td class="print"></td></tr><tr class="print"><td class="print">18-04-2017 07:19</td><td class="print"><a href="http://oldforge.etsi.org/mantis/view_user_page.php?id=1021">szabados</a></td><td class="print">Note Deleted: 0014566</td><td class="print"></td></tr><tr class="print"><td class="print">18-04-2017 07:21</td><td class="print"><a href="http://oldforge.etsi.org/mantis/view_user_page.php?id=1021">szabados</a></td><td class="print">Note Added: 0014567</td><td class="print"></td></tr><tr class="print"><td class="print">06-06-2017 14:07</td><td class="print"><a href="http://oldforge.etsi.org/mantis/view_user_page.php?id=82">Jens Grabowski</a></td><td class="print">Project</td><td class="print">TTCN-3 Change Requests =&gt; Part 01: TTCN-3 Core Language</td></tr><tr class="print"><td class="print">06-06-2017 14:08</td><td class="print"><a href="http://oldforge.etsi.org/mantis/view_user_page.php?id=82">Jens Grabowski</a></td><td class="print">Assigned To</td><td class="print"> =&gt; Julien Deltour</td></tr><tr class="print"><td class="print">06-06-2017 14:08</td><td class="print"><a href="http://oldforge.etsi.org/mantis/view_user_page.php?id=82">Jens Grabowski</a></td><td class="print">Status</td><td class="print">new =&gt; assigned</td></tr><tr class="print"><td class="print">09-06-2017 08:59</td><td class="print"><a href="http://oldforge.etsi.org/mantis/view_user_page.php?id=1052">Julien Deltour</a></td><td class="print">File Added: 7630.doc</td><td class="print"></td></tr><tr class="print"><td class="print">09-06-2017 08:59</td><td class="print"><a href="http://oldforge.etsi.org/mantis/view_user_page.php?id=1052">Julien Deltour</a></td><td class="print">Note Added: 0014684</td><td class="print"></td></tr><tr class="print"><td class="print">09-06-2017 08:59</td><td class="print"><a href="http://oldforge.etsi.org/mantis/view_user_page.php?id=1052">Julien Deltour</a></td><td class="print">Status</td><td class="print">assigned =&gt; confirmed</td></tr><tr class="print"><td class="print">09-06-2017 08:59</td><td class="print"><a href="http://oldforge.etsi.org/mantis/view_user_page.php?id=1052">Julien Deltour</a></td><td class="print">Assigned To</td><td class="print">Julien Deltour =&gt; Jacob Wieland - Spirent</td></tr><tr class="print"><td class="print">09-06-2017 08:59</td><td class="print"><a href="http://oldforge.etsi.org/mantis/view_user_page.php?id=1052">Julien Deltour</a></td><td class="print">Status</td><td class="print">confirmed =&gt; assigned</td></tr><tr class="print"><td class="print">09-06-2017 15:13</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: 0014701</td><td class="print"></td></tr><tr class="print"><td class="print">09-06-2017 15:13</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">Status</td><td class="print">assigned =&gt; resolved</td></tr><tr class="print"><td class="print">09-06-2017 15:13</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">Fixed in Version</td><td class="print"> =&gt; v4.10.1 (published 2018-05)</td></tr><tr class="print"><td class="print">09-06-2017 15:13</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">Resolution</td><td class="print">open =&gt; fixed</td></tr><tr class="print"><td class="print">09-06-2017 15:13</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; Gyorgy Rethy</td></tr><tr class="print"><td class="print">30-12-2017 20: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">Note Added: 0014970</td><td class="print"></td></tr><tr class="print"><td class="print">30-12-2017 20: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">resolved =&gt; closed</td></tr><tr class="print"><td class="print">30-12-2017 20: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">Product Version</td><td class="print"> =&gt; v4.9.1 (published 2017-05)</td></tr><tr class="print"><td class="print">30-12-2017 20: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">Target Version</td><td class="print"> =&gt; v4.10.1 (published 2018-05)</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">
				(0014552)
			</td>
		</tr>
		<tr>
			<td class="print">
				<a href="http://oldforge.etsi.org/mantis/view_user_page.php?id=1021">szabados</a>&#160;&#160;&#160;
			</td>
		</tr>
		<tr>
			<td class="print">
				11-04-2017 15:22&#160;&#160;&#160;
							</td>
		</tr>
		</table>
	</td>
	<td class="nopad" valign="top" width="85%">
		<table class="hide" cellspacing="1">
		<tr>
			<td class="print">
				If I understand correctly it should be corrected to:<br />
template octetstring mw_myoct3 := ('ABCD'O &amp; ? length(2)) length (4);<br />
// However, this is correct.<br />
// results in the template 'ABCD??'O<br />
<br />
Maybe we should also add an example, which demonstrates that templates that look fine might actually not match to anything. This is incorrect ... but given the complexity tools might not be able to detect this situation during static analysis.			</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">
				(0014556)
			</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">
				12-04-2017 08:24&#160;&#160;&#160;
							</td>
		</tr>
		</table>
	</td>
	<td class="nopad" valign="top" width="85%">
		<table class="hide" cellspacing="1">
		<tr>
			<td class="print">
				In principle,the restriction of no empty-set-templates is a bit pointless. For me, this should just be a warning and not an error, same as if I write down if false or a false comparison of 1 and 2.<br />
<br />
I mean, what harm can an empty template do? It just never matches, so all branches it guards will not be entered.<br />
<br />
Yes, if they are empty because of a mistake the test writer made, the tool should help and point it out. But, the same can happen with a template that accidentally only matches 10 values instead of an infinte number, so the distinction between 0 and non-0 seems a bit arbitrary.<br />
<br />
The same argument can be made for empty types. What harm can they do? Absolutely none. You simply cannot instantiate any value for those types and their emptiness propagates to surrounding record-layers, if they are the type of non-optional fields. Thus, if they are empty by mistake, the mistake will become apparent as soon as an instance is to be created.			</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">
				(0014567)
			</td>
		</tr>
		<tr>
			<td class="print">
				<a href="http://oldforge.etsi.org/mantis/view_user_page.php?id=1021">szabados</a>&#160;&#160;&#160;
			</td>
		</tr>
		<tr>
			<td class="print">
				18-04-2017 07:21&#160;&#160;&#160;
							</td>
		</tr>
		</table>
	</td>
	<td class="nopad" valign="top" width="85%">
		<table class="hide" cellspacing="1">
		<tr>
			<td class="print">
				Please note that detecting and reporting quality problems does make a difference.<br />
<br />
A template not matching anything -whether because of a typo or architectural misunderstandings- can lead to an incorrect testcase:<br />
- waste of execution time<br />
- increased maintenance cost<br />
- incorrect/misleading result ... leading to faults left in the products<br />
<br />
A distinction between 0/unbound and non-0/bound_with_incorrect_value sound like a technical and theoretical limitation:<br />
At current level of call/data flow checking ... 0/unbound -issues are much easier to detect than off-by-1 issues.<br />
And I believe it might also be theoretically impossible to tell just from the source code, that the requirement of a protocol was mentioning an off-by-1 value.			</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">
				(0014684)
			</td>
		</tr>
		<tr>
			<td class="print">
				<a href="http://oldforge.etsi.org/mantis/view_user_page.php?id=1052">Julien Deltour</a>&#160;&#160;&#160;
			</td>
		</tr>
		<tr>
			<td class="print">
				09-06-2017 08:59&#160;&#160;&#160;
							</td>
		</tr>
		</table>
	</td>
	<td class="nopad" valign="top" width="85%">
		<table class="hide" cellspacing="1">
		<tr>
			<td class="print">
				Please review the proposal			</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">
				(0014701)
			</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">
				09-06-2017 15:13&#160;&#160;&#160;
							</td>
		</tr>
		</table>
	</td>
	<td class="nopad" valign="top" width="85%">
		<table class="hide" cellspacing="1">
		<tr>
			<td class="print">
				looks fine			</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">
				(0014970)
			</td>
		</tr>
		<tr>
			<td class="print">
				<a href="http://oldforge.etsi.org/mantis/view_user_page.php?id=127">Gyorgy Rethy</a>&#160;&#160;&#160;
			</td>
		</tr>
		<tr>
			<td class="print">
				30-12-2017 20:02&#160;&#160;&#160;
							</td>
		</tr>
		</table>
	</td>
	<td class="nopad" valign="top" width="85%">
		<table class="hide" cellspacing="1">
		<tr>
			<td class="print">
				Added to draft V4.9.2			</td>
		</tr>
		</table>
	</td>
</tr>
</table>
</body>
</html>
