<!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:19:41 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>0004850: type compatibility of union does not coincide with union equality - 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">0004850</td><td class="print">Part 01: TTCN-3 Core Language</td><td class="print">Technical</td><td class="print">public</td><td class="print">13-02-2009 11:49</td><td class="print">26-02-2009 21:16</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">Thomas DeiÃŸ</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">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"></td><td class="print" colspan="4">&#160;</td></tr><tr><td class="print-category">Target Version</td><td class="print">v4.1.1 (published 2009-06)</td><td class="print-category">Fixed in Version</td><td class="print">v4.1.1 (published 2009-06)</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">part1, 6.2., 7.1.3</td></tr><tr class="print"><td class="print-category">Source  (company  - Author)</td><td class="print" colspan="4">Jacob Wieland, Testing Tech.</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">0004850: type compatibility of union does not coincide with union equality</td></tr><tr class="print"><td class="print-category">Description</td><td class="print" colspan="5">reported by Jacob Wieland on draft of edition 4.1:<br />
<br />
I have a problem with the type compatibility of union types vs. the equality of union values in the current draft of the core language standard.<br />
<br />
As I understand it, a union type A is compatible to another union type B (meaning expressions of A can be used as expressions of B, I presume), if all its variants are also present in B - WITH THE SAME NAMES.<br />
<br />
In the section on relational operators, it is stated, that two union values that can be equal need not have the same variant names, just compatible types for 'counterparts' variants, (I guess, counterpart means the variant at the same place in the union types, judging from the examples, maybe this should be clarified further, as well).<br />
<br />
This means that two values of incompatible types can be equal in the case of unions. In my understanding, though, it is normally only allowed for compatible types to apply the comparison operators to. This seems to be a kind of contradiction or at least inconsistency, which could lead to a lot of confusion.<br />
<br />
Therefore, I would propose to either<br />
- change the union type compatibility in such a way that the existent comparison operator semantics can be applied, (i.e. by ignoring the field names and just regarding the order of the fields) OR<br />
- change the equality so that it is consistent with compatibility, i.e. <br />
the type of one of the compared values must be compatible with the type of the other one (which means the variants must be equally named and typed, but not in the same order, as I understand it), thereby getting equal union values if the variant with the same name is chosen in both and the variant values of both are equal.<br />
<br />
Although I like the second variant more, because I like the concept of union type compatibility that has been proposed, the change COULD cause backward incompatibilities in those cases where the current feature of name-independence and order-dependence for equality of union values was used. This is a question that should be asked if anyone knows of a test suite where this feature was used (which I actually doubt, cause it is a very strange definition of union equality in the first place).<br />
<br />
Therefore, I would vote for option 2, i.e. keeping the proposed type compatibility and changing the equality semantics.<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"><table border="0" width="100%" cellpadding="0" cellspacing="1"><tr><td class="print"><span class="nowrap">related to</span>&#160;</td><td class="print">0004508</td><td class="print">closed&#160;</td><td class="print"><span class="nowrap"><a href="http://oldforge.etsi.org/mantis/view_user_page.php?id=81">Ina Schieferdecker</a></span>&#160;</td><td class="print">type compatibility of relational operators&#160;</td></tr></table></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;Resolution CR_4850.doc (158,208) <span class="italic">16-02-2009 11:55</span><br />http://oldforge.etsi.org/mantis/file_download.php?file_id=2001&amp;type=bug<br /><img src="http://oldforge.etsi.org/mantis/images/fileicons/doc.gif" alt="doc" />&#160;Resolution CR_4850_r1.doc (153,600) <span class="italic">16-02-2009 16:31</span><br />http://oldforge.etsi.org/mantis/file_download.php?file_id=2002&amp;type=bug<br /><img src="http://oldforge.etsi.org/mantis/images/fileicons/doc.gif" alt="doc" />&#160;Resolution CR_4850_r2.doc (155,136) <span class="italic">18-02-2009 08:29</span><br />http://oldforge.etsi.org/mantis/file_download.php?file_id=2004&amp;type=bug<br /><img src="http://oldforge.etsi.org/mantis/images/fileicons/doc.gif" alt="doc" />&#160;Resolution CR_4850_r3.doc (159,744) <span class="italic">20-02-2009 12:41</span><br />http://oldforge.etsi.org/mantis/file_download.php?file_id=2009&amp;type=bug<br /><img src="http://oldforge.etsi.org/mantis/images/fileicons/doc.gif" alt="doc" />&#160;Resolution_CR_4850_r4.doc (176,640) <span class="italic">20-02-2009 14:37</span><br />http://oldforge.etsi.org/mantis/file_download.php?file_id=2010&amp;type=bug<br /><img src="http://oldforge.etsi.org/mantis/images/fileicons/doc.gif" alt="doc" />&#160;Resolution_CR_4850_r5.doc (178,688) <span class="italic">20-02-2009 16:23</span><br />http://oldforge.etsi.org/mantis/file_download.php?file_id=2011&amp;type=bug<br /><img src="http://oldforge.etsi.org/mantis/images/fileicons/doc.gif" alt="doc" />&#160;Resolution_CR_4850_r6.doc (259,072) <span class="italic">26-02-2009 09:22</span><br />http://oldforge.etsi.org/mantis/file_download.php?file_id=2015&amp;type=bug<br /><img src="http://oldforge.etsi.org/mantis/images/fileicons/doc.gif" alt="doc" />&#160;Resolution_CR_4850_r7.doc (265,728) <span class="italic">26-02-2009 14:16</span><br />http://oldforge.etsi.org/mantis/file_download.php?file_id=2016&amp;type=bug<br /><img src="http://oldforge.etsi.org/mantis/images/fileicons/doc.gif" alt="doc" />&#160;Resolution_CR_4850_r8.doc (271,360) <span class="italic">26-02-2009 15:58</span><br />http://oldforge.etsi.org/mantis/file_download.php?file_id=2017&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">13-02-2009 11:49</td><td class="print"><a href="http://oldforge.etsi.org/mantis/view_user_page.php?id=112">Thomas DeiÃŸ</a></td><td class="print">New Issue</td><td class="print"></td></tr><tr class="print"><td class="print">13-02-2009 11:49</td><td class="print"><a href="http://oldforge.etsi.org/mantis/view_user_page.php?id=112">Thomas DeiÃŸ</a></td><td class="print">Status</td><td class="print">new =&gt; assigned</td></tr><tr class="print"><td class="print">13-02-2009 11:49</td><td class="print"><a href="http://oldforge.etsi.org/mantis/view_user_page.php?id=112">Thomas DeiÃŸ</a></td><td class="print">Assigned To</td><td class="print"> =&gt; Ina Schieferdecker</td></tr><tr class="print"><td class="print">13-02-2009 11:49</td><td class="print"><a href="http://oldforge.etsi.org/mantis/view_user_page.php?id=112">Thomas DeiÃŸ</a></td><td class="print">Clause Reference(s)</td><td class="print"> =&gt; part1, 6.2., 7.1.3</td></tr><tr class="print"><td class="print">13-02-2009 11:49</td><td class="print"><a href="http://oldforge.etsi.org/mantis/view_user_page.php?id=112">Thomas DeiÃŸ</a></td><td class="print">Source  (company  - Author)</td><td class="print"> =&gt; Jacob Wieland, Testing Tech.</td></tr><tr class="print"><td class="print">13-02-2009 11:50</td><td class="print"><a href="http://oldforge.etsi.org/mantis/view_user_page.php?id=112">Thomas DeiÃŸ</a></td><td class="print">Note Added: 0008098</td><td class="print"></td></tr><tr class="print"><td class="print">13-02-2009 12:49</td><td class="print"><a href="http://oldforge.etsi.org/mantis/view_user_page.php?id=112">Thomas DeiÃŸ</a></td><td class="print">Target Version</td><td class="print"> =&gt; Edition 4.1.1 (not yet published)</td></tr><tr class="print"><td class="print">16-02-2009 05: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">Note Added: 0008102</td><td class="print"></td></tr><tr class="print"><td class="print">16-02-2009 05:47</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">16-02-2009 05:47</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">16-02-2009 05:47</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.1.1 (not yet published)</td></tr><tr class="print"><td class="print">16-02-2009 05:49</td><td class="print"><a href="http://oldforge.etsi.org/mantis/view_user_page.php?id=81">Ina Schieferdecker</a></td><td class="print">Relationship added</td><td class="print">related to 0004508</td></tr><tr class="print"><td class="print">16-02-2009 05: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">Status</td><td class="print">resolved =&gt; closed</td></tr><tr class="print"><td class="print">16-02-2009 09:47</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">Ina Schieferdecker =&gt; Thomas DeiÃŸ</td></tr><tr class="print"><td class="print">16-02-2009 09:47</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">closed =&gt; feedback</td></tr><tr class="print"><td class="print">16-02-2009 09:47</td><td class="print"><a href="http://oldforge.etsi.org/mantis/view_user_page.php?id=127">Gyorgy Rethy</a></td><td class="print">Resolution</td><td class="print">fixed =&gt; reopened</td></tr><tr class="print"><td class="print">16-02-2009 09:47</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: 0008106</td><td class="print"></td></tr><tr class="print"><td class="print">16-02-2009 10:25</td><td class="print"><a href="http://oldforge.etsi.org/mantis/view_user_page.php?id=112">Thomas DeiÃŸ</a></td><td class="print">Note Added: 0008108</td><td class="print"></td></tr><tr class="print"><td class="print">16-02-2009 10:26</td><td class="print"><a href="http://oldforge.etsi.org/mantis/view_user_page.php?id=112">Thomas DeiÃŸ</a></td><td class="print">Assigned To</td><td class="print">Thomas DeiÃŸ =&gt; Gyorgy Rethy</td></tr><tr class="print"><td class="print">16-02-2009 10:26</td><td class="print"><a href="http://oldforge.etsi.org/mantis/view_user_page.php?id=112">Thomas DeiÃŸ</a></td><td class="print">Status</td><td class="print">feedback =&gt; assigned</td></tr><tr class="print"><td class="print">16-02-2009 10:26</td><td class="print"><a href="http://oldforge.etsi.org/mantis/view_user_page.php?id=112">Thomas DeiÃŸ</a></td><td class="print">Resolution</td><td class="print">reopened =&gt; open</td></tr><tr class="print"><td class="print">16-02-2009 10:29</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: 0008109</td><td class="print"></td></tr><tr class="print"><td class="print">16-02-2009 10:29</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 Edited: 0008109</td><td class="print"></td></tr><tr class="print"><td class="print">16-02-2009 11:54</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: 0008111</td><td class="print"></td></tr><tr class="print"><td class="print">16-02-2009 11:55</td><td class="print"><a href="http://oldforge.etsi.org/mantis/view_user_page.php?id=127">Gyorgy Rethy</a></td><td class="print">File Added: Resolution CR_4850.doc</td><td class="print"></td></tr><tr class="print"><td class="print">16-02-2009 16:31</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: Resolution CR_4850_r1.doc</td><td class="print"></td></tr><tr class="print"><td class="print">18-02-2009 08:29</td><td class="print"><a href="http://oldforge.etsi.org/mantis/view_user_page.php?id=112">Thomas DeiÃŸ</a></td><td class="print">File Added: Resolution CR_4850_r2.doc</td><td class="print"></td></tr><tr class="print"><td class="print">20-02-2009 12:41</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: Resolution CR_4850_r3.doc</td><td class="print"></td></tr><tr class="print"><td class="print">20-02-2009 14:37</td><td class="print"><a href="http://oldforge.etsi.org/mantis/view_user_page.php?id=127">Gyorgy Rethy</a></td><td class="print">File Added: Resolution_CR_4850_r4.doc</td><td class="print"></td></tr><tr class="print"><td class="print">20-02-2009 14:46</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: 0008167</td><td class="print"></td></tr><tr class="print"><td class="print">20-02-2009 16:23</td><td class="print"><a href="http://oldforge.etsi.org/mantis/view_user_page.php?id=127">Gyorgy Rethy</a></td><td class="print">File Added: Resolution_CR_4850_r5.doc</td><td class="print"></td></tr><tr class="print"><td class="print">20-02-2009 16:28</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: 0008171</td><td class="print"></td></tr><tr class="print"><td class="print">24-02-2009 07:44</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">Gyorgy Rethy =&gt; Ina Schieferdecker</td></tr><tr class="print"><td class="print">26-02-2009 09:22</td><td class="print"><a href="http://oldforge.etsi.org/mantis/view_user_page.php?id=127">Gyorgy Rethy</a></td><td class="print">File Added: Resolution_CR_4850_r6.doc</td><td class="print"></td></tr><tr class="print"><td class="print">26-02-2009 09:29</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: 0008201</td><td class="print"></td></tr><tr class="print"><td class="print">26-02-2009 14:16</td><td class="print"><a href="http://oldforge.etsi.org/mantis/view_user_page.php?id=127">Gyorgy Rethy</a></td><td class="print">File Added: Resolution_CR_4850_r7.doc</td><td class="print"></td></tr><tr class="print"><td class="print">26-02-2009 14:18</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: 0008203</td><td class="print"></td></tr><tr class="print"><td class="print">26-02-2009 15:58</td><td class="print"><a href="http://oldforge.etsi.org/mantis/view_user_page.php?id=127">Gyorgy Rethy</a></td><td class="print">File Added: Resolution_CR_4850_r8.doc</td><td class="print"></td></tr><tr class="print"><td class="print">26-02-2009 15:59</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: 0008204</td><td class="print"></td></tr><tr class="print"><td class="print">26-02-2009 21:15</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">26-02-2009 21:15</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">26-02-2009 21:16</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">
				(0008098)
			</td>
		</tr>
		<tr>
			<td class="print">
				<a href="http://oldforge.etsi.org/mantis/view_user_page.php?id=112">Thomas DeiÃŸ</a>&#160;&#160;&#160;
			</td>
		</tr>
		<tr>
			<td class="print">
				13-02-2009 11:50&#160;&#160;&#160;
							</td>
		</tr>
		</table>
	</td>
	<td class="nopad" valign="top" width="85%">
		<table class="hide" cellspacing="1">
		<tr>
			<td class="print">
				Discussion so far (email thread):<br />
Hello Gyorgy,<br />
<br />
Regarding this case 3: when checking the definition of equality again, I recognized that we avoided a general statement to require that equality can be applied to values of compatible types only. We defined equality type by type. Therefore we could also allow to compare arbitrary union values. Result in this specific case 3 would be false. Gyorgy, your proposal  is then fine for me.<br />
<br />
I have added a specific proposal below:<br />
<br />
Current text  in clause 7.1.3<br />
Two values of union types are equal if, and only if, the effective value structures of the union types are compatible, the selected fields in both values are the counterparts to each other, the types of the chosen fields are compatible and the actual values of the chosen fields are equal<br />
<br />
New proposal:<br />
Two values of union types are equal if, and only if, the both values are compatible with the type of the other value, the same alternative has been selected in both values, and the actual values of the chosen fields are equal. <br />
<br />
Best regards<br />
<br />
Thomas<br />
<br />
&gt;-----Original Message-----<br />
&gt;From: ext GyÃ¶rgy RÃ©thy [<a href="mailto:mailto:gyorgy.rethy@ericsson.com">mailto:gyorgy.rethy@ericsson.com</a>]<br />
&gt;Sent: Thursday, 12. February 2009 11:39<br />
&gt;To: Deiss, Thomas (NSN - DE/Duesseldorf); Schieferdecker, Ina; ext Jens <br />
&gt;Grabowski<br />
&gt;Cc: Jacob Wieland<br />
&gt;Subject: RE: [MTS-GEN] Approval of TTCN-3 drafts for Edition 4.1.1<br />
&gt;<br />
&gt;Hi Thomas,<br />
&gt;<br />
&gt;In case 3) I would also always return false. Shortly, we are comparing <br />
&gt;two values, u1 and u2. If the name of the selected alternative in both <br />
&gt;values are the same AND the types of the selected alternatives are the <br />
&gt;same (enumerated), compatible (structured types) or has the same root <br />
&gt;type (basic types), comparision returns true, otherwise false.<br />
&gt;<br />
&gt;I think it would an unnecessary complication to separate the case type <br />
&gt;union U1( integer a }; type union U2{integer a, integer b } from the <br />
&gt;case type union U1( integer a }; type union U3{integer c, integer b }<br />
&gt;<br />
&gt;We also do allow comparing values of these integer subtypes, though it <br />
&gt;is clear that they do not have a common subset, thus comparision can <br />
&gt;never be true:<br />
&gt;type integer I1 (0..2); type integer I2 (3..5);<br />
&gt;<br />
&gt;BTW. if the assignment in the example below could be reached, it would <br />
&gt;cause test case error... but it can never be reached:<br />
&gt;var I1 i1; var I2 i2;<br />
&gt;... //some values are allocated to i1 and i2 if (i1 == i2) {i1 := i2}<br />
&gt;<br />
&gt;BR, Gyorgy<br />
&gt;<br />
&gt;<br />
&gt;&gt; -----Original Message-----<br />
&gt;&gt; From: Deiss, Thomas (NSN - DE/Duesseldorf) <br />
&gt;&gt; [<a href="mailto:mailto:thomas.deiss@nsn.com">mailto:thomas.deiss@nsn.com</a>]<br />
&gt;&gt; Sent: 2009-februÃ¡r-12 11:07<br />
&gt;&gt; To: GyÃ¶rgy RÃ©thy; Schieferdecker, Ina; ext Jens Grabowski<br />
&gt;&gt; Cc: Jacob Wieland<br />
&gt;&gt; Subject: RE: [MTS-GEN] Approval of TTCN-3 drafts for Edition 4.1.1<br />
&gt;&gt; <br />
&gt;&gt; Hello Gyorgy,<br />
&gt;&gt; <br />
&gt;&gt; So, if there are two union types U1 and U2, and two values u1 and u2 <br />
&gt;&gt; of type U1 and U2 respectively, then there are three cases:<br />
&gt;&gt; <br />
&gt;&gt; 1) If u1 is compatible with U2 and u2 is compatible with U1, then <br />
&gt;&gt; comparison is possible and if the same alternative is selected and <br />
&gt;&gt; holds the same value the result will be true, otherwise false.<br />
&gt;&gt; 2) If either u1 is compatible with U2 or u2 is compatible with U1, <br />
&gt;&gt; the comparison is allowed, but would always result in false.<br />
&gt;&gt; 3) If neither u1 is compatible with U2 nor u2 is compatible with U2, <br />
&gt;&gt; then this would be an error.<br />
&gt;&gt; <br />
&gt;&gt; Did I get your proposal correctly?<br />
&gt;&gt; If so, then this would be fine from my side.<br />
&gt;&gt; <br />
&gt;&gt; Best regards<br />
&gt;&gt; <br />
&gt;&gt; Thomas<br />
&gt;&gt; <br />
&gt;&gt; &gt;-----Original Message-----<br />
&gt;&gt; &gt;From: ext GyÃ¶rgy RÃ©thy [<a href="mailto:mailto:gyorgy.rethy@ericsson.com">mailto:gyorgy.rethy@ericsson.com</a>]<br />
&gt;&gt; &gt;Sent: Wednesday, 11. February 2009 09:50<br />
&gt;&gt; &gt;To: Deiss, Thomas (NSN - DE/Duesseldorf); Schieferdecker,<br />
&gt;&gt; Ina; ext Jens<br />
&gt;&gt; &gt;Grabowski<br />
&gt;&gt; &gt;Cc: Jacob Wieland<br />
&gt;&gt; &gt;Subject: RE: [MTS-GEN] Approval of TTCN-3 drafts for Edition 4.1.1<br />
&gt;&gt; &gt;Importance: High<br />
&gt;&gt; &gt;<br />
&gt;&gt; &gt;Hi Thomas,<br />
&gt;&gt; &gt;<br />
&gt;&gt; &gt;Your example will never fail with my union compatibility<br />
&gt;&gt; proposal! Once<br />
&gt;&gt; &gt;the equality is true, in both values the same alternatives<br />
&gt;&gt; are chosen<br />
&gt;&gt; &gt;and the asignment will be successful.<br />
&gt;&gt; &gt;What I propose is, in fact, that the comparision &quot;u1 == u2&quot; <br />
&gt;&gt; &gt;should not cause test case error; it should return false<br />
&gt;&gt; instead (thus<br />
&gt;&gt; &gt;the assignment does not get control);<br />
&gt;&gt; &gt;<br />
&gt;&gt; &gt;As I wrote, I can see the situation here to be similar to e.g. <br />
&gt;&gt; &gt;subtyped integers. See the examples:<br />
&gt;&gt; &gt;type integer MyInt1 (0..1);<br />
&gt;&gt; &gt;type integer MyInt2 (1..3);<br />
&gt;&gt; &gt;type integer MyInt3 (2..3);<br />
&gt;&gt; &gt;...<br />
&gt;&gt; &gt;var MyInt1 int1; var MyInt2 int2; var MyInt3 int3; ...<br />
&gt;&gt; &gt;int1 := int2; // may fail if int2 &lt;&gt; 1<br />
&gt;&gt; &gt;int1 := int3; // will fail for sure<br />
&gt;&gt; &gt;int3 := int1; // will fail for sure<br />
&gt;&gt; &gt;if(int1 == int2) {int1 := int2; int2 := int1} //will never fail<br />
&gt;&gt; &gt;if(int1 == int3) {int1 := int3; int3 := int1} //will never<br />
&gt;&gt; fail, just<br />
&gt;&gt; &gt;the body of the if stmt. never executed<br />
&gt;&gt; &gt;<br />
&gt;&gt; &gt;I fact, looking at these examples, compatibility of (the<br />
&gt;&gt; &gt;complete) union types should never be controlled at<br />
&gt;&gt; comparision, just<br />
&gt;&gt; &gt;the compatibility of the selected alternatives (name and<br />
&gt;field_type)<br />
&gt;&gt; &gt;and always return false or true.<br />
&gt;&gt; &gt;<br />
&gt;&gt; &gt;BR, Gyorgy<br />
&gt;&gt; &gt;<br />
&gt;&gt; &gt;&gt; -----Original Message-----<br />
&gt;&gt; &gt;&gt; From: Deiss, Thomas (NSN - DE/Duesseldorf) <br />
&gt;&gt; &gt;&gt; [<a href="mailto:mailto:thomas.deiss@nsn.com">mailto:thomas.deiss@nsn.com</a>]<br />
&gt;&gt; &gt;&gt; Sent: 2009-februÃ¡r-11 8:31<br />
&gt;&gt; &gt;&gt; To: GyÃ¶rgy RÃ©thy; Schieferdecker, Ina; ext Jens Grabowski<br />
&gt;&gt; &gt;&gt; Cc: Jacob Wieland<br />
&gt;&gt; &gt;&gt; Subject: RE: [MTS-GEN] Approval of TTCN-3 drafts for Edition 4.1.1<br />
&gt;&gt; &gt;&gt; <br />
&gt;&gt; &gt;&gt; Hello Gyorgy,<br />
&gt;&gt; &gt;&gt; <br />
&gt;&gt; &gt;&gt; In my opinion, type compatibility and equality should be<br />
&gt;&gt; defined such<br />
&gt;&gt; &gt;&gt; that for two union variables u1, u2 of two different<br />
&gt;types U1, U2,<br />
&gt;&gt; &gt;&gt; the following code never fails in the assignment.<br />
&gt;&gt; &gt;&gt; if (u1 == u2) {<br />
&gt;&gt; &gt;&gt;   u1 := u2;<br />
&gt;&gt; &gt;&gt;   ...<br />
&gt;&gt; &gt;&gt; Additionally, whereever u1 can be used in an operation or<br />
&gt;&gt; expression<br />
&gt;&gt; &gt;&gt; it is possible to use u2. This includes the usage of ischosen(), <br />
&gt;&gt; &gt;&gt; which could be used to check whether a different<br />
&gt;&gt; alternative than the<br />
&gt;&gt; &gt;&gt; currently chosen one has been chosen.<br />
&gt;&gt; &gt;&gt; <br />
&gt;&gt; &gt;&gt; This implies that the definition of equality is<br />
&gt;&gt; symmetrical, I think<br />
&gt;&gt; &gt;&gt; that just requiring that one union type is compatible with<br />
&gt;&gt; the other<br />
&gt;&gt; &gt;&gt; is not sufficient.<br />
&gt;&gt; &gt;&gt; <br />
&gt;&gt; &gt;&gt; Note that this property does not hold for record values<br />
&gt;&gt; (fieldnames<br />
&gt;&gt; &gt;&gt; are not considered in the check for equality), hence the strict <br />
&gt;&gt; &gt;&gt; definition above would be different to the definition of<br />
&gt;&gt; equality of<br />
&gt;&gt; &gt;&gt; other types.<br />
&gt;&gt; &gt;&gt; <br />
&gt;&gt; &gt;&gt; Best regards<br />
&gt;&gt; &gt;&gt; <br />
&gt;&gt; &gt;&gt; Thomas<br />
&gt;&gt; &gt;&gt; <br />
&gt;&gt; &gt;&gt; &gt;-----Original Message-----<br />
&gt;&gt; &gt;&gt; &gt;From: ext GyÃ¶rgy RÃ©thy [<a href="mailto:mailto:gyorgy.rethy@ericsson.com">mailto:gyorgy.rethy@ericsson.com</a>]<br />
&gt;&gt; &gt;&gt; &gt;Sent: Tuesday, 10. February 2009 16:16<br />
&gt;&gt; &gt;&gt; &gt;To: Deiss, Thomas (NSN - DE/Duesseldorf); Schieferdecker,<br />
&gt;&gt; &gt;&gt; Ina; ext Jens<br />
&gt;&gt; &gt;&gt; &gt;Grabowski<br />
&gt;&gt; &gt;&gt; &gt;Cc: Jacob Wieland<br />
&gt;&gt; &gt;&gt; &gt;Subject: RE: [MTS-GEN] Approval of TTCN-3 drafts for<br />
&gt;Edition 4.1.1<br />
&gt;&gt; &gt;&gt; &gt;Importance: High<br />
&gt;&gt; &gt;&gt; &gt;<br />
&gt;&gt; &gt;&gt; &gt;Dear all,<br />
&gt;&gt; &gt;&gt; &gt;<br />
&gt;&gt; &gt;&gt; &gt;we also do support Jacob's proposal, i.e. option two,<br />
&gt;namely that<br />
&gt;&gt; &gt;&gt; &gt;compatibility of union values shall be based on equal field<br />
&gt;&gt; &gt;&gt; name and a<br />
&gt;&gt; &gt;&gt; &gt;compatible value.<br />
&gt;&gt; &gt;&gt; &gt;<br />
&gt;&gt; &gt;&gt; &gt;But this second condition raises another question: <br />
&gt;&gt; &gt;&gt; &gt;compatibility of union types, where the alternatives of<br />
&gt;&gt; one of the<br />
&gt;&gt; &gt;&gt; &gt;types (call it A) is a subset of the alternatives in the<br />
&gt;&gt; &gt;&gt; another type<br />
&gt;&gt; &gt;&gt; &gt;(call it B). In this case, a value of A could always be<br />
&gt;&gt; &gt;&gt; assigned to an<br />
&gt;&gt; &gt;&gt; &gt;instance of B, i.e. A is compatible with B. This is fine in<br />
&gt;&gt; &gt;&gt; the case of<br />
&gt;&gt; &gt;&gt; &gt;assignment( &amp; alike) operations, but may cause problems in<br />
&gt;&gt; &gt;&gt; the case of<br />
&gt;&gt; &gt;&gt; &gt;comparision (being defined as a symmetrical operation).<br />
&gt;&gt; &gt;&gt; &gt;<br />
&gt;&gt; &gt;&gt; &gt;What to do if a value of A (which is compatible with B) is<br />
&gt;&gt; &gt;&gt; compared to<br />
&gt;&gt; &gt;&gt; &gt;an instance of B in which the selected alternative is<br />
&gt;&gt; &gt;outside of the<br />
&gt;&gt; &gt;&gt; &gt;common subset? Error or false? Error could be the principal<br />
&gt;&gt; &gt;&gt; answer but<br />
&gt;&gt; &gt;&gt; &gt;false would be the practical one.<br />
&gt;&gt; &gt;&gt; &gt;I feel this case to be similar to the case of comparing two<br />
&gt;&gt; &gt;subtyped<br />
&gt;&gt; &gt;&gt; &gt;integers, where the value sets of their types do not have<br />
&gt;&gt; a common<br />
&gt;&gt; &gt;&gt; &gt;subset. Thus, I would say, if at least one of the union<br />
&gt;values is<br />
&gt;&gt; &gt;&gt; &gt;compatible to the type of the other value, comparision<br />
&gt;&gt; &gt;should return<br />
&gt;&gt; &gt;&gt; &gt;false in the above case.<br />
&gt;&gt; &gt;&gt; &gt;<br />
&gt;&gt; &gt;&gt; &gt;If you think this is a realistic use case, as one may want<br />
&gt;&gt; &gt;&gt; to restrict<br />
&gt;&gt; &gt;&gt; &gt;the alternatives used in one message and allow the broader<br />
&gt;&gt; &gt;&gt; selection in<br />
&gt;&gt; &gt;&gt; &gt;another message. As we do not have extensibility for<br />
&gt;&gt; types, the way<br />
&gt;&gt; &gt;&gt; &gt;today is to define two - compatible - types (strictly for<br />
&gt;&gt; &gt;&gt; matching it<br />
&gt;&gt; &gt;&gt; &gt;could be enough to define a base value set template, but<br />
&gt;&gt; &gt;&gt; this approach<br />
&gt;&gt; &gt;&gt; &gt;would fail at the first case when the message or the union<br />
&gt;&gt; &gt;&gt; field has to<br />
&gt;&gt; &gt;&gt; &gt;be passed as parameter).<br />
&gt;&gt; &gt;&gt; &gt;<br />
&gt;&gt; &gt;&gt; &gt;BR, Gyorgy<br />
&gt;&gt; &gt;&gt; &gt;<br />
&gt;&gt; &gt;&gt; &gt;&gt; -----Original Message-----<br />
&gt;&gt; &gt;&gt; &gt;&gt; From: Deiss, Thomas (NSN - DE/Duesseldorf) <br />
&gt;&gt; &gt;&gt; &gt;&gt; [<a href="mailto:mailto:thomas.deiss@nsn.com">mailto:thomas.deiss@nsn.com</a>]<br />
&gt;&gt; &gt;&gt; &gt;&gt; Sent: 2009-februÃ¡r-10 7:50<br />
&gt;&gt; &gt;&gt; &gt;&gt; To: Schieferdecker, Ina; ext Jens Grabowski; GyÃ¶rgy RÃ©thy<br />
&gt;&gt; &gt;&gt; &gt;&gt; Subject: FW: [MTS-GEN] Approval of TTCN-3 drafts for<br />
&gt;&gt; Edition 4.1.1<br />
&gt;&gt; &gt;&gt; &gt;&gt; <br />
&gt;&gt; &gt;&gt; &gt;&gt; Good morning together,<br />
&gt;&gt; &gt;&gt; &gt;&gt; <br />
&gt;&gt; &gt;&gt; &gt;&gt; Jacob raised an issue on compatibility of union types and<br />
&gt;&gt; &gt;&gt; equality of<br />
&gt;&gt; &gt;&gt; &gt;&gt; union values. I agree with Jacob's proposal to define<br />
&gt;&gt; &gt;equality for<br />
&gt;&gt; &gt;&gt; &gt;&gt; two union values if the same alternative (indicated by<br />
&gt;&gt; &gt;the name of<br />
&gt;&gt; &gt;&gt; &gt;&gt; the alternative) and the same value is chosen. As usual,<br />
&gt;&gt; &gt;values of<br />
&gt;&gt; &gt;&gt; &gt;&gt; compatible union types can be compared against each other,<br />
&gt;&gt; &gt;&gt; they have<br />
&gt;&gt; &gt;&gt; &gt;&gt; the same alternatives and that the alternatives are defined <br />
&gt;&gt; &gt;&gt; &gt;&gt; identically.<br />
&gt;&gt; &gt;&gt; &gt;&gt; <br />
&gt;&gt; &gt;&gt; &gt;&gt; But  this implies that there is a backwards incompatible<br />
&gt;&gt; &gt;&gt; change, see<br />
&gt;&gt; &gt;&gt; &gt;&gt; the example on equality of union values in clause<br />
&gt;&gt; 7.1.3. With the<br />
&gt;&gt; &gt;&gt; &gt;&gt; definitions above, some of the equal values would no<br />
&gt;&gt; &gt;&gt; longer be equal.<br />
&gt;&gt; &gt;&gt; &gt;&gt; <br />
&gt;&gt; &gt;&gt; &gt;&gt; What do you think, should we go for this change. If yes,<br />
&gt;&gt; &gt;&gt; then I could<br />
&gt;&gt; &gt;&gt; &gt;&gt; ask the tool vendors whether they are aware of any test<br />
&gt;&gt; &gt;&gt; suite  where<br />
&gt;&gt; &gt;&gt; &gt;&gt; this would be a problem, and if ok propose the specific<br />
&gt;&gt; &gt;&gt; text. If no,<br />
&gt;&gt; &gt;&gt; &gt;&gt; then we probably should weaken the definition of type<br />
&gt;&gt; &gt;&gt; compatibility<br />
&gt;&gt; &gt;&gt; &gt;&gt; of union values such that it corresponds to this example: <br />
&gt;&gt; &gt;&gt; Two union<br />
&gt;&gt; &gt;&gt; &gt;&gt; types are compatible if they have the same number of<br />
&gt;&gt; &gt;alternatives,<br />
&gt;&gt; &gt;&gt; &gt;&gt; and in the order of the definition, the types of the<br />
&gt;&gt; &gt;&gt; alternatives are<br />
&gt;&gt; &gt;&gt; &gt;&gt; compatible. Names of alternatives would not be relevant at all.<br />
&gt;&gt; &gt;&gt; &gt;&gt; <br />
&gt;&gt; &gt;&gt; &gt;&gt; I would also  prefer Jacobs proposal.<br />
&gt;&gt; &gt;&gt; &gt;&gt; <br />
&gt;&gt; &gt;&gt; &gt;&gt; Best regards<br />
&gt;&gt; &gt;&gt; &gt;&gt; <br />
&gt;&gt; &gt;&gt; &gt;&gt; Thomas<br />
&gt;&gt; &gt;&gt; &gt;&gt; <br />
&gt;&gt; &gt;&gt; &gt;&gt; PS: Sorry for disturbing in case you received similar<br />
&gt;&gt; &gt;&gt; email already<br />
&gt;&gt; &gt;&gt; &gt;&gt; yesterday, but I had some problems with sending to MTS-GEN<br />
&gt;&gt; &gt;&gt; yesterday.<br />
&gt;&gt; &gt;&gt; &gt;&gt; <br />
&gt;&gt; &gt;&gt; &gt;&gt; &gt;-----Original Message-----<br />
&gt;&gt; &gt;&gt; &gt;&gt; &gt;From: Deiss, Thomas (NSN - DE/Duesseldorf)<br />
&gt;&gt; &gt;&gt; &gt;&gt; &gt;Sent: Monday, 09. February 2009 10:11<br />
&gt;&gt; &gt;&gt; &gt;&gt; &gt;To: 'Jacob Wieland'; MTS-GEN@LIST.ETSI.ORG<br />
&gt;&gt; &gt;&gt; &gt;&gt; &gt;Subject: RE: [MTS-GEN] Approval of TTCN-3 drafts for<br />
&gt;&gt; &gt;Edition 4.1.1<br />
&gt;&gt; &gt;&gt; &gt;&gt; &gt;<br />
&gt;&gt; &gt;&gt; &gt;&gt; &gt;Hello Jacob,<br />
&gt;&gt; &gt;&gt; &gt;&gt; &gt;<br />
&gt;&gt; &gt;&gt; &gt;&gt; &gt;Thanks for pointing this out.<br />
&gt;&gt; &gt;&gt; &gt;&gt; &gt;<br />
&gt;&gt; &gt;&gt; &gt;&gt; &gt;Yes, there is actually an inconsistency between 6.3.2.4 Type <br />
&gt;&gt; &gt;&gt; &gt;&gt; &gt;compatibility of union types and 7.1.3. Relational Operators.<br />
&gt;&gt; &gt;&gt; &gt;&gt; &gt;<br />
&gt;&gt; &gt;&gt; &gt;&gt; &gt;I suggest also to use proposal 2). You are right, this<br />
&gt;&gt; &gt;would be a<br />
&gt;&gt; &gt;&gt; &gt;&gt; &gt;backward incompatible change. And you are also that the term <br />
&gt;&gt; &gt;&gt; &gt;&gt; &gt;'counterpart' in 7.1.3 leaves room for interpretation<br />
&gt;&gt; &gt;&gt; (does it mean<br />
&gt;&gt; &gt;&gt; &gt;&gt; &gt;same name or same position in the definition).<br />
&gt;&gt; &gt;&gt; &gt;&gt; &gt;The example<br />
&gt;&gt; &gt;&gt; &gt;&gt; &gt;  conUniD1 == conUniE1;<br />
&gt;&gt; &gt;&gt; &gt;&gt; &gt;  // returns true<br />
&gt;&gt; &gt;&gt; &gt;&gt; &gt;suggests that it is 'same position in the definition',<br />
&gt;&gt; &gt;&gt; &gt;&gt; independent of<br />
&gt;&gt; &gt;&gt; &gt;&gt; &gt;the name of the alternative. Again, this would contradict the <br />
&gt;&gt; &gt;&gt; &gt;&gt; &gt;definition of compatibility in clause 6.3.2.4.<br />
&gt;&gt; &gt;&gt; &gt;&gt; &gt;Taking compatibility as in clause 6.3.2.4, 'counterpart' <br />
&gt;&gt; &gt;&gt; &gt;&gt; &gt;should really mean that the same alternative (indicated<br />
&gt;&gt; &gt;&gt; by the same<br />
&gt;&gt; &gt;&gt; &gt;&gt; &gt;name) is taken in both values.<br />
&gt;&gt; &gt;&gt; &gt;&gt; &gt;<br />
&gt;&gt; &gt;&gt; &gt;&gt; &gt;Best regards<br />
&gt;&gt; &gt;&gt; &gt;&gt; &gt;<br />
&gt;&gt; &gt;&gt; &gt;&gt; &gt;Thomas<br />
&gt;&gt; &gt;&gt; &gt;&gt; &gt;<br />
&gt;&gt; &gt;&gt; &gt;&gt; &gt;<br />
&gt;&gt; &gt;&gt; &gt;&gt; &gt; <br />
&gt;&gt; &gt;&gt; &gt;&gt; &gt;<br />
&gt;&gt; &gt;&gt; &gt;&gt; &gt;&gt;-----Original Message-----<br />
&gt;&gt; &gt;&gt; &gt;&gt; &gt;&gt;From: MTS_Gen [mailto:MTS-GEN@LIST.ETSI.ORG] On Behalf Of<br />
&gt;&gt; &gt;&gt; &gt;ext Jacob<br />
&gt;&gt; &gt;&gt; &gt;&gt; &gt;&gt;Wieland<br />
&gt;&gt; &gt;&gt; &gt;&gt; &gt;&gt;Sent: Thursday, 05. February 2009 16:02<br />
&gt;&gt; &gt;&gt; &gt;&gt; &gt;&gt;To: MTS-GEN@LIST.ETSI.ORG<br />
&gt;&gt; &gt;&gt; &gt;&gt; &gt;&gt;Subject: Re: [MTS-GEN] Approval of TTCN-3 drafts for<br />
&gt;&gt; &gt;&gt; Edition 4.1.1<br />
&gt;&gt; &gt;&gt; &gt;&gt; &gt;&gt;<br />
&gt;&gt; &gt;&gt; &gt;&gt; &gt;&gt;Hello folks,<br />
&gt;&gt; &gt;&gt; &gt;&gt; &gt;&gt;<br />
&gt;&gt; &gt;&gt; &gt;&gt; &gt;&gt;I have a problem with the type compatibility of union<br />
&gt;&gt; &gt;&gt; &gt;types vs. the<br />
&gt;&gt; &gt;&gt; &gt;&gt; &gt;&gt;equality of union values in the current draft of the<br />
&gt;&gt; &gt;&gt; core language<br />
&gt;&gt; &gt;&gt; &gt;&gt; &gt;&gt;standard.<br />
&gt;&gt; &gt;&gt; &gt;&gt; &gt;&gt;<br />
&gt;&gt; &gt;&gt; &gt;&gt; &gt;&gt;As I understand it, a union type A is compatible to another<br />
&gt;&gt; &gt;&gt; &gt;&gt; union type<br />
&gt;&gt; &gt;&gt; &gt;&gt; &gt;&gt;B (meaning expressions of A can be used as<br />
&gt;expressions of B, I<br />
&gt;&gt; &gt;&gt; &gt;&gt; &gt;presume),<br />
&gt;&gt; &gt;&gt; &gt;&gt; &gt;&gt;if all its variants are also present in B - WITH THE<br />
&gt;&gt; SAME NAMES.<br />
&gt;&gt; &gt;&gt; &gt;&gt; &gt;&gt;<br />
&gt;&gt; &gt;&gt; &gt;&gt; &gt;&gt;In the section on relational operators, it is stated, that<br />
&gt;&gt; &gt;&gt; &gt;&gt; two union<br />
&gt;&gt; &gt;&gt; &gt;&gt; &gt;&gt;values that can be equal need not have the same variant<br />
&gt;&gt; &gt;&gt; &gt;names, just<br />
&gt;&gt; &gt;&gt; &gt;&gt; &gt;&gt;compatible types for 'counterparts' variants, (I guess,<br />
&gt;&gt; &gt;&gt; &gt;counterpart<br />
&gt;&gt; &gt;&gt; &gt;&gt; &gt;&gt;means the variant at the same place in the union types,<br />
&gt;&gt; &gt;&gt; &gt;&gt; judging from<br />
&gt;&gt; &gt;&gt; &gt;&gt; &gt;&gt;the examples, maybe this should be clarified further,<br />
&gt;&gt; as well).<br />
&gt;&gt; &gt;&gt; &gt;&gt; &gt;&gt;<br />
&gt;&gt; &gt;&gt; &gt;&gt; &gt;&gt;This means that two values of incompatible types can be<br />
&gt;&gt; &gt;&gt; &gt;&gt; equal in the<br />
&gt;&gt; &gt;&gt; &gt;&gt; &gt;&gt;case of unions. In my understanding, though, it is<br />
&gt;&gt; &gt;normally only<br />
&gt;&gt; &gt;&gt; &gt;&gt; &gt;&gt;allowed for compatible types to apply the comparison<br />
&gt;&gt; &gt;&gt; operators to.<br />
&gt;&gt; &gt;&gt; &gt;&gt; &gt;&gt;This seems to<br />
&gt;&gt; &gt;&gt; &gt;&gt; &gt;&gt;be a kind of contradiction or at least inconsistency, which<br />
&gt;&gt; &gt;&gt; &gt;&gt; &gt;could lead<br />
&gt;&gt; &gt;&gt; &gt;&gt; &gt;&gt;to a lot of confusion.<br />
&gt;&gt; &gt;&gt; &gt;&gt; &gt;&gt;<br />
&gt;&gt; &gt;&gt; &gt;&gt; &gt;&gt;Therefore, I would propose to either<br />
&gt;&gt; &gt;&gt; &gt;&gt; &gt;&gt;- change the union type compatibility in such a way that<br />
&gt;&gt; &gt;&gt; &gt;&gt; the existent<br />
&gt;&gt; &gt;&gt; &gt;&gt; &gt;&gt;comparison operator semantics can be applied, (i.e. by<br />
&gt;&gt; &gt;&gt; &gt;ignoring the<br />
&gt;&gt; &gt;&gt; &gt;&gt; &gt;&gt;field names and just regarding the order of the fields) OR<br />
&gt;&gt; &gt;&gt; &gt;&gt; &gt;&gt;- change the equality so that it is consistent with<br />
&gt;&gt; &gt;&gt; compatibility,<br />
&gt;&gt; &gt;&gt; &gt;&gt; &gt;&gt;i.e.<br />
&gt;&gt; &gt;&gt; &gt;&gt; &gt;&gt;the type of one of the compared values must be<br />
&gt;&gt; &gt;&gt; compatible with the<br />
&gt;&gt; &gt;&gt; &gt;&gt; &gt;&gt;type of the other one (which means the variants must be<br />
&gt;&gt; &gt;&gt; &gt;&gt; equally named<br />
&gt;&gt; &gt;&gt; &gt;&gt; &gt;&gt;and typed, but not in the same order, as I understand it),<br />
&gt;&gt; &gt;&gt; &gt;&gt; &gt;thereby getting<br />
&gt;&gt; &gt;&gt; &gt;&gt; &gt;&gt;equal union values if the variant with the same name is<br />
&gt;&gt; &gt;&gt; &gt;&gt; &gt;chosen in both<br />
&gt;&gt; &gt;&gt; &gt;&gt; &gt;&gt;and the variant values of both are equal.<br />
&gt;&gt; &gt;&gt; &gt;&gt; &gt;&gt;<br />
&gt;&gt; &gt;&gt; &gt;&gt; &gt;&gt;Although I like the second variant more, because I like the<br />
&gt;&gt; &gt;&gt; &gt;&gt; &gt;concept of<br />
&gt;&gt; &gt;&gt; &gt;&gt; &gt;&gt;union type compatibility that has been proposed, the<br />
&gt;&gt; &gt;&gt; change COULD<br />
&gt;&gt; &gt;&gt; &gt;&gt; &gt;&gt;cause backward incompatibilities in those cases where<br />
&gt;&gt; &gt;the current<br />
&gt;&gt; &gt;&gt; &gt;&gt; &gt;feature of<br />
&gt;&gt; &gt;&gt; &gt;&gt; &gt;&gt;name-independence and order-dependence for equality of<br />
&gt;&gt; &gt;&gt; &gt;union values<br />
&gt;&gt; &gt;&gt; &gt;&gt; &gt;&gt;was used. This is a question that should be asked if anyone<br />
&gt;&gt; &gt;&gt; &gt;&gt; knows of a<br />
&gt;&gt; &gt;&gt; &gt;&gt; &gt;&gt;test suite where this feature was used (which I actually<br />
&gt;&gt; &gt;&gt; &gt;&gt; doubt, cause<br />
&gt;&gt; &gt;&gt; &gt;&gt; &gt;&gt;it is a very strange definition of union equality in the<br />
&gt;&gt; &gt;&gt; &gt;&gt; first place).<br />
&gt;&gt; &gt;&gt; &gt;&gt; &gt;&gt;<br />
&gt;&gt; &gt;&gt; &gt;&gt; &gt;&gt;Therefore, I would vote for option 2, i.e. keeping the<br />
&gt;&gt; &gt;&gt; &gt;&gt; proposed type<br />
&gt;&gt; &gt;&gt; &gt;&gt; &gt;&gt;compatibility and changing the equality semantics.<br />
&gt;&gt; &gt;&gt; &gt;&gt; &gt;&gt;<br />
&gt;&gt; &gt;&gt; &gt;&gt; &gt;&gt;Best regards,<br />
&gt;&gt; &gt;&gt; &gt;&gt; &gt;&gt;<br />
&gt;&gt; &gt;&gt; &gt;&gt; &gt;&gt;Jacob Wieland<br />
&gt;&gt; &gt;&gt; &gt;&gt; &gt;&gt;<br />
&gt;&gt; &gt;&gt; &gt;&gt; &gt;&gt;--<br />
&gt;&gt; &gt;&gt; &gt;&gt; <br />
&gt;&gt; &gt;&gt;---------------------------------------------------------------<br />
&gt;&gt; &gt;&gt; &gt;&gt; &gt;&gt;----------<br />
&gt;&gt; &gt;&gt; &gt;&gt; &gt;&gt;Jacob Wieland<br />
&gt;&gt; &gt;&gt; &gt;&gt; &gt;&gt;Software Engineer<br />
&gt;&gt; &gt;&gt; &gt;&gt; &gt;&gt;<br />
&gt;&gt; &gt;&gt; &gt;&gt; &gt;&gt;Testing Technologies IST GmbH MichaelkirchstraÃŸe 17/18<br />
&gt;&gt; &gt;&gt; &gt;&gt; &gt;&gt;10179 Berlin, Germany<br />
&gt;&gt; &gt;&gt; &gt;&gt; &gt;&gt;<br />
&gt;&gt; &gt;&gt; &gt;&gt; &gt;&gt;Phone     +49 30 726 19 19 34        Email     <br />
&gt;&gt; &gt;&gt; &gt;&gt; <a href="mailto:wieland@testingtech.com">wieland@testingtech.com</a><br />
&gt;&gt; &gt;&gt; &gt;&gt; &gt;&gt;Fax       +49 30 726 19 19 20        Internet  <br />
&gt;&gt; &gt;&gt; www.testingtech.com<br />
&gt;&gt; &gt;&gt; &gt;&gt; <br />
&gt;&gt; &gt;&gt;---------------------------------------------------------------<br />
&gt;&gt; &gt;&gt; &gt;&gt; &gt;&gt;----------<br />
&gt;&gt; &gt;&gt; &gt;&gt; &gt;&gt;<br />
&gt;&gt; &gt;&gt; &gt;&gt; &gt;&gt;UPCOMING EVENTS<br />
&gt;&gt; &gt;&gt; &gt;&gt; &gt;&gt;<br />
&gt;&gt; &gt;&gt; &gt;&gt; &gt;&gt;February 5, Free TTCN-3 Webinar<br />
&gt;&gt; &gt;&gt; &gt;&gt; &gt;&gt;TTCN-3 for Test Automation<br />
&gt;&gt; &gt;&gt; &gt;&gt; &gt;&gt;www.testingtech.com/services/ttcn3_webinar.php<br />
&gt;&gt; &gt;&gt; &gt;&gt; &gt;&gt;<br />
&gt;&gt; &gt;&gt; &gt;&gt; &gt;&gt;February 16-19, 2009, Mobile World Congress Barcelona,<br />
&gt;&gt; &gt;&gt; Spain, Hall<br />
&gt;&gt; &gt;&gt; &gt;&gt; &gt;&gt;2.1, Booth #B77 www.mobileworldcongress.com/<br />
&gt;&gt; &gt;&gt; &gt;&gt; &gt;&gt;<br />
&gt;&gt; &gt;&gt; &gt;&gt; &gt;&gt;February 18, 2009, sepp.med Expertensymposium Deutschland, <br />
&gt;&gt; &gt;&gt; &gt;&gt; &gt;&gt;Herzogenaurach www.seppmed.de/<br />
&gt;&gt; &gt;&gt; &gt;&gt; &gt;&gt;<br />
&gt;&gt; &gt;&gt; &gt;&gt; <br />
&gt;&gt; &gt;&gt;---------------------------------------------------------------<br />
&gt;&gt; &gt;&gt; &gt;&gt; &gt;&gt;----------<br />
&gt;&gt; &gt;&gt; &gt;&gt; &gt;&gt;GeschÃ¤ftsfÃ¼hrung: Theofanis Vassiliou-Gioles,<br />
&gt;Stephan Pietsch<br />
&gt;&gt; &gt;&gt; &gt;&gt; &gt;&gt;Handelsregister HRB 77805, Amtsgericht Charlottenburg Ust<br />
&gt;&gt; &gt;&gt; &gt;&gt; ID Nr.: DE<br />
&gt;&gt; &gt;&gt; &gt;&gt; &gt;&gt;813 143 070<br />
&gt;&gt; &gt;&gt; &gt;&gt; &gt;&gt;<br />
&gt;&gt; &gt;&gt; &gt;&gt; &gt;&gt;This e-mail may contain confidential and privileged<br />
&gt;&gt; &gt;&gt; &gt;&gt; material for the<br />
&gt;&gt; &gt;&gt; &gt;&gt; &gt;&gt;sole use of the intended recipient. Any review, use,<br />
&gt;&gt; &gt;&gt; &gt;&gt; distribution or<br />
&gt;&gt; &gt;&gt; &gt;&gt; &gt;&gt;disclosure by others is strictly prohibited. If you<br />
&gt;&gt; are not the<br />
&gt;&gt; &gt;&gt; &gt;&gt; &gt;&gt;intended recipient (or authorized to receive for the<br />
&gt;&gt; &gt;recipient),<br />
&gt;&gt; &gt;&gt; &gt;&gt; &gt;&gt;please contact the sender by reply e-mail and delete all<br />
&gt;&gt; &gt;&gt; copies of<br />
&gt;&gt; &gt;&gt; &gt;&gt; &gt;&gt;this message.<br />
&gt;&gt; &gt;&gt; &gt;&gt; &gt;&gt;<br />
&gt;&gt; &gt;&gt; &gt;&gt; <br />
&gt;&gt; &gt;&gt; <br />
&gt;&gt; &gt;&gt;-------------------------------------------------------------------<br />
&gt;&gt; &gt;&gt; &gt;&gt; &gt;&gt;Mail archive for MTS-GEN  can be browsed at the<br />
&gt;&gt; following url :<br />
&gt;&gt; &gt;&gt; &gt;&gt; &gt;&gt;         <a href="http://list.etsi.org/MTS-GEN.html">http://list.etsi.org/MTS-GEN.html</a> [<a href="http://list.etsi.org/MTS-GEN.html" target="_blank">^</a>]<br />
&gt;&gt; &gt;&gt; &gt;&gt; <br />
&gt;&gt; &gt;&gt; <br />
&gt;&gt; &gt;&gt;-------------------------------------------------------------------<br />
&gt;&gt; &gt;&gt; &gt;&gt; &gt;&gt;<br />
&gt;&gt; &gt;&gt; &gt;&gt; &gt;<br />
&gt;&gt; &gt;&gt; &gt;&gt; <br />
&gt;&gt; &gt;&gt; &gt;<br />
&gt;&gt; &gt;&gt; <br />
&gt;&gt; &gt;<br />
&gt;&gt; <br />
&gt;			</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">
				(0008102)
			</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">
				16-02-2009 05:46&#160;&#160;&#160;
							</td>
		</tr>
		</table>
	</td>
	<td class="nopad" valign="top" width="85%">
		<table class="hide" cellspacing="1">
		<tr>
			<td class="print">
				7.1.3 corrected as proposed: &quot;Two values of union types are equal if, and only if, both values are compatible with the type of the other value, the same alternative has been selected in both values, and the actual values of the chosen fields are equal.&quot;			</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">
				(0008106)
			</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">
				16-02-2009 09:47&#160;&#160;&#160;
							</td>
		</tr>
		</table>
	</td>
	<td class="nopad" valign="top" width="85%">
		<table class="hide" cellspacing="1">
		<tr>
			<td class="print">
				Unfortunately the proposed text would require that the types of the two values are completely identical and does not specify what should happen if two values of incompatible types (or a value compatible with the type of the other value) is compared (false or error)?			</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">
				(0008108)
			</td>
		</tr>
		<tr>
			<td class="print">
				<a href="http://oldforge.etsi.org/mantis/view_user_page.php?id=112">Thomas DeiÃŸ</a>&#160;&#160;&#160;
			</td>
		</tr>
		<tr>
			<td class="print">
				16-02-2009 10:25&#160;&#160;&#160;
							</td>
		</tr>
		</table>
	</td>
	<td class="nopad" valign="top" width="85%">
		<table class="hide" cellspacing="1">
		<tr>
			<td class="print">
				Seems that the 'if and only if' is not sufficient... Requested cased expressed explicitly.<br />
<br />
Two values of union types are equal if, and only if, both values are compatible with the type of the other value, the same alternative has been selected in both values, and the actual values of the chosen fields are equal. In case that the values are not compatible, a different alternative was chosen, or the actual values are different, the result shall be false.			</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">
				(0008109)
			</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">
				16-02-2009 10:29&#160;&#160;&#160;
							</td>
		</tr>
		</table>
	</td>
	<td class="nopad" valign="top" width="85%">
		<table class="hide" cellspacing="1">
		<tr>
			<td class="print">
				An &quot;if and only if&quot; is content-wise expressive enough - I do not see a need to enumerate the other cases explicitly.<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">
				(0008111)
			</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">
				16-02-2009 11:54&#160;&#160;&#160;
							</td>
		</tr>
		</table>
	</td>
	<td class="nopad" valign="top" width="85%">
		<table class="hide" cellspacing="1">
		<tr>
			<td class="print">
				Pls. see my proposal for the text in the attached file.			</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">
				(0008167)
			</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">
				20-02-2009 14:46&#160;&#160;&#160;
							</td>
		</tr>
		</table>
	</td>
	<td class="nopad" valign="top" width="85%">
		<table class="hide" cellspacing="1">
		<tr>
			<td class="print">
				Pls. find my additions in Resolution_CR_4850_r4.doc. Regarding the union stuff I have restored the sentence saying that comparing two union values shall not cause an error. It is important, as you can remember that the whole discussion on equality started with a mail on the TTCN-3 list (I think from Spain) asking, in which case comparision shall lead to error and in which case to false. So, it is important to be clear and explicit in this respect. Plus some editorials.<br />
<br />
I also added a new subclause on anytype compatibility. It differs slightly from union compatibility as in anytype type names are used as field identifiers. But while the name of a built-in TTCN-3 type denotes the same type in each module, two types with the same name defined in different modules denoting different types, thus shall not be &quot;the same field name&quot;.			</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">
				(0008171)
			</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">
				20-02-2009 16:28&#160;&#160;&#160;
							</td>
		</tr>
		</table>
	</td>
	<td class="nopad" valign="top" width="85%">
		<table class="hide" cellspacing="1">
		<tr>
			<td class="print">
				One more change in version ~r5.doc. The &quot;root&quot; type has nothing to do with type compatibility, therefore referencing to effective structures and clause 6.3 in the definition of root type is not correct; this is relevant only when defining which types are compatible within the whole set of a root type (e.g. which records are compatible and one are not).<br />
E.g.<br />
type integer I1 (0..2);<br />
type integer I2 (3..4);<br />
are not compatible (not a single instance of I1 is compatible with I2 and vice versa), still they have the same root type.			</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">
				(0008201)
			</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">
				26-02-2009 09:29&#160;&#160;&#160;
							</td>
		</tr>
		</table>
	</td>
	<td class="nopad" valign="top" width="85%">
		<table class="hide" cellspacing="1">
		<tr>
			<td class="print">
				Pls. note:<br />
- I tried to apply the text proposed by Jens but did not copied it one-to-one.<br />
- I also copied and reviewede all uses of &quot;root&quot; in Part-1. I highlighted them with yellow for your convenience only, no other meaning behind.<br />
- I have also reviewed the definition of union type to remove inconsistency in the termilogy used in relation to unions and thus prevent misinterpretations.<br />
<br />
Good reading!			</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">
				(0008203)
			</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">
				26-02-2009 14:18&#160;&#160;&#160;
							</td>
		</tr>
		</table>
	</td>
	<td class="nopad" valign="top" width="85%">
		<table class="hide" cellspacing="1">
		<tr>
			<td class="print">
				~r7:<br />
- editorials are corrected, thank for the comments<br />
- three notes added, all of them are related to address; highlighted with blue background to make it easier to find them.			</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">
				(0008204)
			</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">
				26-02-2009 15:59&#160;&#160;&#160;
							</td>
		</tr>
		</table>
	</td>
	<td class="nopad" valign="top" width="85%">
		<table class="hide" cellspacing="1">
		<tr>
			<td class="print">
				in ~r8:<br />
- Thomas's editorial comment is implemented<br />
- word comments are deleted			</td>
		</tr>
		</table>
	</td>
</tr>
</table>
</body>
</html>
