-
Key: QVT-11
-
Legacy Issue Number: 10925
-
Status: closed
-
Source: France Telecom R&D ( Mariano Belaunde)
-
Summary:
The type returned by ResolveExp and ResolveInRule is not clear: a OclAny?
The type of the filtered objects?
The semantics of ResolveInRule when no source is passed is also unclear.
The variant 'invresolveIn' (combining inverse and rule scope) is missing.
Consider simplifying ResolveExp definition: instead of an arbitrary condition
expression use a type reference representing both: the returned type and
the filtering expression -
Reported: QVT 1.0b1 — Tue, 17 Apr 2007 04:00 GMT
-
Disposition: Resolved — QVT 1.0
-
Disposition Summary:
Resolution:
(1) Skip the three resolution instructions defined for issue 9390 in ballot1.
(2) Add a new property "ResolveExp::target : Variable [0..1] composes" with the following description text: """a variable whose type indicates the primary condition for filtering the potential result objects. The extra condition (see 'condition' property) may use the variable to express a complementary filtering condition. This variable also has an influence in the type returned by the resolve expression (see type returned by the resolution expression)."""
(3) In Section 8.2.1.22 ResolveExp, just before "semantics" sub-section add a sub-section "Type of a resolve expression" with the following content text: "The type of a ResolveExp expression depends on the type of the 'target' variable and on the multiplicity indication (the 'one' property). If 'one' is true, the returned type is the type of the 'target' variable. Otherwise, the returned type is a Sequence of the type of the 'target' variable. If no target variable is provided the type is either Object (the type representing all types, see Section 8.3.1) either a Sequence of Objects - depending on the multiplicity"
(4) In section 8.2.1.22 ResolveInExp, just before "superclasses" sub-section add the section: "The type of a ResolveInExp expression is computed using the same rules as for the type of a ResolveExp."
(5) In section 8.2.1.22 ResolveInExp, after the sentence " All variants described for the resolve expression are applicable to the resolve in expression" add a new paragraph with the sentence "A resolve in expression may be applied with an empty source argument. In that case it inspects all objects created or updated by the rule (instead of inspecting only the objects created or updated from the source object) ."
(6) In section 8.1.22 ResolveExp, replace the content of Notation section by:
The notation uses one of these three forms:
<resolve_op> '(' (<identifier> ':' )? <typespec> ')' // no extra condition<resolve_op> '(' (<identifier> ':' )? <typespec> ' ' <expression> ')' // with extra condition <resolve_op> '(' ')' // no target, no extra condition
where the <resolve_op> is one of the following: resolve and invresolve and invresolveone. When isDeferred is true the late keyword is used before the operation name. The resolution operator may be called on a list. This is a shorthand for invoking it in the body of a ForEachExpr expression.
myresult := mysourceobject.resolveone(Table);
myresult := mysourceobject.resolveone(t:Tablet.name.startsWith("_"));
myprop := mylist->late resolve(Table);
// shorthand for mylist->forEach i.late resolve(Table)(7) In section 8.2.1.22 ResolveInExp, replace the sentence "The notation uses " by the sentence "The notation uses the same syntax as ResolveExp except that the operation names are one of the following resolveIn, resolveoneIn, invresolveIn or invresolveoneIn".The two variants starting with "inv" prefix correspond to the "inverse" variant (ResolveExp::isInverse == true). Also, after "is the condition to evaluate?", add the sentence: "The reference to the rule is given by a qualified identifier (context class and name). As a limitation of the concrete syntax, it is not possible to provide a reference to a rule is there is an ambiguity (having the same name and context but different parameters).
(8) In Section 8.2.2.5, replace the sentence defining the "condition" property by "An optional additional Boolean condition to be evaluated to filter the potential results." -
Updated: Fri, 6 Mar 2015 20:54 GMT
QVT — Incomplete specification for the resolution operation ResolveExp
- Key: QVT-11
- OMG Task Force: MOF QVT FTF