Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [qvto-dev] QVT13-69 List and Dict Class/DataType confusion

Hi  Christopher

My interpretation of the current specification is that the phrasing was chosen in order to avoid some anticipated implementation problems. I think that the intent is to make the 'really good flow analyzer' really trivial.

Unfortunately the 'proprietary' motivation is obscured and so difficult to question.

Experience shows that these restrictions are often misguided.

In trying to make sense of this, it would be very helpful to me if you can provide a brief table of:

events that add information to the trace and what that information is
facilities that interrogate the trace and what they access

I would like to finish this resolution over the weekend and so provide a couple of further days for comments before the official preview starts on Wednesday.

So today would be really helpful for the table.

    Regards

        Ed Willink

On 09/10/2015 09:38, Christopher Gerking wrote:

Hi again

 

In general I like the approach of making all object creation visible to ‘resolve’. I consider this as a best practice, but also fairly optimistic to hardwire into the specification.

 

The prohibition implies no ‘object’ instantiations and mapping calls inside a query/helper. However, the same applies to constructor invocations.

 

If we really want to restrict object creation to mappings, then a constructor/object instantiation for type A may be invoked only inside the init section of a mapping with the same return type A, or some super type. In addition we must ensure that there is at most one runtime instantiation inside the init section, and that the instantiated object is eventually assigned to the ‘result’ variable.

 

There must be a really good control flow analyzer to ensure the above restrictions.

 

 

Kind regards

Christopher

 

Von: qvto-dev-bounces@xxxxxxxxxxx [mailto:qvto-dev-bounces@xxxxxxxxxxx] Im Auftrag von Ed Willink
Gesendet: Donnerstag, 8.
Oktober 2015 11:14
An: QVTOML developer mailing list <qvto-dev@xxxxxxxxxxx>
Betreff: [qvto-dev] QVT13-69 List and Dict Class/DataType confusion

 

Hi

Adolfo questions the more explicit prohibition of instance creation in the rephrasing of:

QVT 1.2 8.2.1.12 Helper:

However it is illegal to create or update object instances within a helper operation except for pre-defined types like sets, tuples, and for intermediate properties.

by

QVT 1.3 proposal:

A helper may modify but not create Class instances. A helper may modify mutable DataType values such as List or Dict.
A helper or query may create mutable DataType values such as List or Dict or immutable DataType values such as Tuple, Set or String

I think that the new words are clearer but equivalent.

The prohibition ensures that all object creation is internally visible to 'resolve' which considers only mappings and not helpers.

Anyone agree/disagree?

    REgards

        Ed Willink



_______________________________________________
qvto-dev mailing list
qvto-dev@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/qvto-dev


No virus found in this message.
Checked by AVG - www.avg.com
Version: 2015.0.6140 / Virus Database: 4435/10783 - Release Date: 10/08/15



Back to the top