Home » Archived » M2M (model-to-model transformation) » [QVTO] mapping main or just main (Newbie question)
[QVTO] mapping main or just main (Newbie question) [message #104087] |
Sat, 25 April 2009 11:03 |
Toñi Reina Messages: 209 Registered: July 2009 |
Senior Member |
|
|
Hi all,
I'm just starting with QVTO, and to be familiar with the tool, I'm
using the examples included in the book named "Modeling Project: A
Domain-Specific Language (DSL) Toolkit".
In the book there's a simple example for refactoring a model. I'm
writing this transformation from scratch, but something curious
happened, and I'd like to know if it is a QVT compiler problem or
there's something more.
I have started the example by using the Eclipse assitant: New >
Other> Operational QVT Transformation. As a result, a new file with
..qvto extension is created. In the created file, the assistant has
generated a skeleton similar to the following one:
transformation reset();
mapping main() {
}
Then I write the rest of the transformation code (following the book
example). Thus, the mapping main has the following implementation:
mapping main() {
model.rootObjects()[Model].groups.map resetValues();
}
However, the compiler reports an error and saying that it expects a
:= instead a . just after model.
I have solved the problem by deleting the word mapping, thus the main
is now:
main() {
model.rootObjects()[Model].groups.map resetValues();
}
My question is if this error is due to a compiler QVT implementation
problem, or if the word mapping means something that cause the
compilation error.
Thanks,
Toñi
|
|
|
Re: [QVTO] mapping main or just main (Newbie question) [message #104104 is a reply to message #104087] |
Sat, 25 April 2009 12:17 |
Richard Gronback Messages: 605 Registered: July 2009 |
Senior Member |
|
|
Hi Toni,
Just ignore the "mapping main" references in the book. They were written
using a legacy "feature" of QVT, and should all just be main() without the
mapping keyword.
Thanks,
Rich
On 4/25/09 7:03 AM, in article gsuqmn$mgm$1@build.eclipse.org, "Toñi Reina
Quintero" <reinaqu@lsi.us.es> wrote:
> Hi all,
>
> I'm just starting with QVTO, and to be familiar with the tool, I'm
> using the examples included in the book named "Modeling Project: A
> Domain-Specific Language (DSL) Toolkit".
>
> In the book there's a simple example for refactoring a model. I'm
> writing this transformation from scratch, but something curious
> happened, and I'd like to know if it is a QVT compiler problem or
> there's something more.
>
> I have started the example by using the Eclipse assitant: New >
> Other> Operational QVT Transformation. As a result, a new file with
> .qvto extension is created. In the created file, the assistant has
>
> generated a skeleton similar to the following one:
>
> transformation reset();
>
> mapping main() {
>
> }
>
> Then I write the rest of the transformation code (following the book
> example). Thus, the mapping main has the following implementation:
>
> mapping main() {
> model.rootObjects()[Model].groups.map resetValues();
> }
>
> However, the compiler reports an error and saying that it expects a
> := instead a . just after model.
>
> I have solved the problem by deleting the word mapping, thus the main
> is now:
>
> main() {
> model.rootObjects()[Model].groups.map resetValues();
> }
>
> My question is if this error is due to a compiler QVT implementation
> problem, or if the word mapping means something that cause the
> compilation error.
>
> Thanks,
> Toñi
--
Thanks,
Rich
|
|
|
Re: [QVTO] mapping main or just main (Newbie question) [message #104114 is a reply to message #104104] |
Sat, 25 April 2009 14:06 |
Toñi Reina Messages: 209 Registered: July 2009 |
Senior Member |
|
|
Ok,
thanks Richard. Then, I think the template for generating the
scheleton code should be modified, because the code generated by the
assistant is the one I show below, and as it can be seen, it has the
"mapping main".
transformation reset();
mapping main() {
}
Richard Gronback escribió:
> Hi Toni,
>
> Just ignore the "mapping main" references in the book. They were written
> using a legacy "feature" of QVT, and should all just be main() without the
> mapping keyword.
>
> Thanks,
> Rich
>
>
> On 4/25/09 7:03 AM, in article gsuqmn$mgm$1@build.eclipse.org, "Toñi Reina
> Quintero" <reinaqu@lsi.us.es> wrote:
>
>> Hi all,
>>
>> I'm just starting with QVTO, and to be familiar with the tool, I'm
>> using the examples included in the book named "Modeling Project: A
>> Domain-Specific Language (DSL) Toolkit".
>>
>> In the book there's a simple example for refactoring a model. I'm
>> writing this transformation from scratch, but something curious
>> happened, and I'd like to know if it is a QVT compiler problem or
>> there's something more.
>>
>> I have started the example by using the Eclipse assitant: New >
>> Other> Operational QVT Transformation. As a result, a new file with
>> .qvto extension is created. In the created file, the assistant has
>>
>> generated a skeleton similar to the following one:
>>
>> transformation reset();
>>
>> mapping main() {
>>
>> }
>>
>> Then I write the rest of the transformation code (following the book
>> example). Thus, the mapping main has the following implementation:
>>
>> mapping main() {
>> model.rootObjects()[Model].groups.map resetValues();
>> }
>>
>> However, the compiler reports an error and saying that it expects a
>> := instead a . just after model.
>>
>> I have solved the problem by deleting the word mapping, thus the main
>> is now:
>>
>> main() {
>> model.rootObjects()[Model].groups.map resetValues();
>> }
>>
>> My question is if this error is due to a compiler QVT implementation
>> problem, or if the word mapping means something that cause the
>> compilation error.
>>
>> Thanks,
>> Toñi
>
|
|
|
Re: [QVTO] mapping main or just main (Newbie question) [message #104194 is a reply to message #104114] |
Mon, 27 April 2009 13:53 |
Radomil Dvorak Messages: 249 Registered: July 2009 |
Senior Member |
|
|
Hi Toni,
I suggest that you use milestone or integration builds from the current
Galileo development stream.
It provides a richer set of QVT language features and also reports
deprecation
warnings on legacy constructs, so it could be helpful to get over problems
like this.
Regards,
/Radek
On Sat, 25 Apr 2009 16:06:06 +0200, Toñi Reina Quintero
<reinaqu@lsi.us.es> wrote:
> Ok,
>
> thanks Richard. Then, I think the template for generating the
> scheleton code should be modified, because the code generated by the
> assistant is the one I show below, and as it can be seen, it has the
> "mapping main".
>
> transformation reset();
>
> mapping main() {
>
> }
>
> Richard Gronback escribió:
>> Hi Toni,
>> Just ignore the "mapping main" references in the book. They were
>> written
>> using a legacy "feature" of QVT, and should all just be main() without
>> the
>> mapping keyword.
>> Thanks,
>> Rich
>> On 4/25/09 7:03 AM, in article gsuqmn$mgm$1@build.eclipse.org, "Toñi
>> Reina
>> Quintero" <reinaqu@lsi.us.es> wrote:
>>
>>> Hi all,
>>>
>>> I'm just starting with QVTO, and to be familiar with the tool, I'm
>>> using the examples included in the book named "Modeling Project: A
>>> Domain-Specific Language (DSL) Toolkit".
>>>
>>> In the book there's a simple example for refactoring a model. I'm
>>> writing this transformation from scratch, but something curious
>>> happened, and I'd like to know if it is a QVT compiler problem or
>>> there's something more.
>>>
>>> I have started the example by using the Eclipse assitant: New >
>>> Other> Operational QVT Transformation. As a result, a new file with
>>> .qvto extension is created. In the created file, the assistant has
>>>
>>> generated a skeleton similar to the following one:
>>>
>>> transformation reset();
>>>
>>> mapping main() {
>>>
>>> }
>>>
>>> Then I write the rest of the transformation code (following the book
>>> example). Thus, the mapping main has the following implementation:
>>>
>>> mapping main() {
>>> model.rootObjects()[Model].groups.map resetValues();
>>> }
>>>
>>> However, the compiler reports an error and saying that it expects a
>>> := instead a . just after model.
>>>
>>> I have solved the problem by deleting the word mapping, thus the
>>> main
>>> is now:
>>>
>>> main() {
>>> model.rootObjects()[Model].groups.map resetValues();
>>> }
>>>
>>> My question is if this error is due to a compiler QVT implementation
>>> problem, or if the word mapping means something that cause the
>>> compilation error.
>>>
>>> Thanks,
>>> Toñi
>>
|
|
|
Re: [QVTO] mapping main or just main (Newbie question) [message #104257 is a reply to message #104194] |
Wed, 29 April 2009 18:28 |
Toñi Reina Messages: 209 Registered: July 2009 |
Senior Member |
|
|
Thanks, I'll try it.
Radek Dvorak escribió:
> Hi Toni,
>
> I suggest that you use milestone or integration builds from the current
> Galileo development stream.
> It provides a richer set of QVT language features and also reports
> deprecation
> warnings on legacy constructs, so it could be helpful to get over
> problems like this.
>
> Regards,
> /Radek
>
>
>
> On Sat, 25 Apr 2009 16:06:06 +0200, Toñi Reina Quintero
> <reinaqu@lsi.us.es> wrote:
>
>> Ok,
>>
>> thanks Richard. Then, I think the template for generating the
>> scheleton code should be modified, because the code generated by the
>> assistant is the one I show below, and as it can be seen, it has the
>> "mapping main".
>>
>> transformation reset();
>>
>> mapping main() {
>>
>> }
>>
>> Richard Gronback escribió:
>>> Hi Toni,
>>> Just ignore the "mapping main" references in the book. They were
>>> written
>>> using a legacy "feature" of QVT, and should all just be main()
>>> without the
>>> mapping keyword.
>>> Thanks,
>>> Rich
>>> On 4/25/09 7:03 AM, in article gsuqmn$mgm$1@build.eclipse.org,
>>> "Toñi Reina
>>> Quintero" <reinaqu@lsi.us.es> wrote:
>>>
>>>> Hi all,
>>>>
>>>> I'm just starting with QVTO, and to be familiar with the tool, I'm
>>>> using the examples included in the book named "Modeling Project: A
>>>> Domain-Specific Language (DSL) Toolkit".
>>>>
>>>> In the book there's a simple example for refactoring a model. I'm
>>>> writing this transformation from scratch, but something curious
>>>> happened, and I'd like to know if it is a QVT compiler problem or
>>>> there's something more.
>>>>
>>>> I have started the example by using the Eclipse assitant: New >
>>>> Other> Operational QVT Transformation. As a result, a new file with
>>>> .qvto extension is created. In the created file, the assistant has
>>>>
>>>> generated a skeleton similar to the following one:
>>>>
>>>> transformation reset();
>>>>
>>>> mapping main() {
>>>>
>>>> }
>>>>
>>>> Then I write the rest of the transformation code (following the book
>>>> example). Thus, the mapping main has the following implementation:
>>>>
>>>> mapping main() {
>>>> model.rootObjects()[Model].groups.map resetValues();
>>>> }
>>>>
>>>> However, the compiler reports an error and saying that it expects a
>>>> := instead a . just after model.
>>>>
>>>> I have solved the problem by deleting the word mapping, thus the
>>>> main
>>>> is now:
>>>>
>>>> main() {
>>>> model.rootObjects()[Model].groups.map resetValues();
>>>> }
>>>>
>>>> My question is if this error is due to a compiler QVT implementation
>>>> problem, or if the word mapping means something that cause the
>>>> compilation error.
>>>>
>>>> Thanks,
>>>> Toñi
>>>
>
|
|
|
Goto Forum:
Current Time: Fri Apr 19 20:28:03 GMT 2024
Powered by FUDForum. Page generated in 0.03438 seconds
|