Hello,
On the small description of QVTi in the
QVTd wiki (http://wiki.eclipse.org/M2M/QVT_Declarative_Languages)
it says that at each node (mapping) a new unbound variable is
introduced by one of the input (domain) or middle guard
patterns. What is the rationale behind this restriction? I
understand limiting the number of unbound variables to 1
enforces the loop semantics of nested mappings, but I don’t
understand why they should be introduced in guard patterns.
From a semantics view, I would think of
guards as IF..THEN conditions. So variables and predicates in
guard patterns should only be used to condition the evaluation
of domains and middle bottom patterns. Additionally, if we
consider the base structure of a QVTi transformation:
map container in transformation {
map { --
L to M
check L() {
}
…
}
map
{ -- M To R
…
}
}
Does having a guard in the first domains
(the check L() in the example) makes sense? If it doesn’t and
these initial domains are an exception then the proposed ocl
invariant should reflect this.
Personally I think that the unbound
variable should be introduced in check domains (L to M) or in
MiddleBottomPatterns (M to R).
Regards,
Horacio Hoyos Rodríguez
EngD Student
University of York