[furcas-discussion] Constraints regarding ForEachContext.contextElement

Thomas Goldschmidt thomas.goldschmidt at de.abb.com
Fri Feb 18 08:49:59 CET 2011


Hi,

Maybe we should start by thinking again about the different use-cases of 
foreach and from there on define what foreach can and should do including 
a more formal view on its semantics.

I started a Wiki page for it here: 
http://www.furcas.org/wiki/index.php/Foreach-usecases

Cheers,
Thomas


 
Thomas Goldschmidt 

ABB AG
Forschungszentrum
Wallstadter Straße 59
68526 Ladenburg
Office Phone: +49 6203 716134
Office Fax: +49 6203 716253
e-mail: thomas.goldschmidt at de.abb.com

ABB AG
Sitz/Head Office: Mannheim 
Registergericht/Registry Court: Mannheim
Handelsregisternummer/Commercial Register No.: HRB 4664
Geschäftsführung/Managing Board: Peter Smits (Vorsitzender), Joachim 
Schneider, Markus Ochsner, Hans-Georg Krabbe
Vorsitzender des Aufsichtsrats/Chairman of Supervisory Board: Bernhard 
Jucker

Diese E-Mail enthält vertrauliche und/oder rechtlich geschützte 
Informationen. Wenn Sie nicht der richtige Adressat sind oder diese E-Mail 
irrtümlich erhalten haben, informieren Sie bitte sofort den Absender und 
vernichten Sie diese Mail. Das unerlaubte Kopieren sowie die unbefugte 
Weitergabe dieser Mail ist nicht gestattet. 

This e-mail may contain confidential and/or privileged information. If you 
are not the intended recipient (or have received this e-mail in error) 
please notify the sender immediately and destroy this e-mail. Any 
unauthorized copying, disclosure or distribution of the material in this 
e-mail is strictly forbidden.



"Uhl, Axel" <axel.uhl at sap.com> 
Sent by: furcas-discussion-bounces at lists.furcas.org
17.02.2011 17:49

To
furcas-discussion <furcas-discussion at lists.furcas.org>
cc

Subject
[furcas-discussion] Constraints regarding ForEachContext.contextElement






Hi,

looking even closer at the foreach-related code there unfortunately are 
more issues. The specification allows for foreach expressions to have a 
non-EObject result type, such as String or Boolean. I'm pretty sure this 
won't work, and we don't have test cases asserting this functionality 
which is bad. The contextElement reference in ForEachContext is typed as 
EObject. Therefore it's unable to hold String or Boolean values.

Another thing to keep in mind is that generally it is possible that a 
foreach expression results in a Bag containing several occurrences of 
equal elements for each of which an element has been produced. This in 
particular means that the corresponding ForEachContext elements have equal 
contextElement contents. What should our constraints be w.r.t. ordered 
features?

Imagine the following situation: a foreach expression may produce [e1, e2, 
e1] for which elements [f1, f2, f3] are produced. When something changes 
such that the foreach expression only produces [e1, e2] then intuitively 
speaking we may expect the feature to be updated to [f1, f2] and not [f2, 
f3}. See what I mean?

I think we should approach a more formal specification of features such as 
"foreach" because otherwise we'll end up in a big mess.

Opinions on how such a specification for the foreach-feature should look 
like?

Best,
-- Axel
_______________________________________________
Furcas-discussion mailing list
Furcas-discussion at lists.furcas.org
http://lists.furcas.org/cgi-bin/mailman/listinfo/furcas-discussion

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.furcas.org/pipermail/furcas-discussion/attachments/20110218/751963b9/attachment-0001.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: image/gif
Size: 454 bytes
Desc: not available
URL: <http://lists.furcas.org/pipermail/furcas-discussion/attachments/20110218/751963b9/attachment-0001.gif>


More information about the Furcas-discussion mailing list