Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » GMT (Generative Modeling Technologies) » [TCS] playing with km3 metamodel and syntax
[TCS] playing with km3 metamodel and syntax [message #380601] Sat, 22 December 2007 12:35 Go to next message
Eclipse User
Originally posted by: awiede01.univ-lr.fr

Using the TCS wizard, I started to build very simple projects. My setup
seems ok since I successfully injected different textual files to models
(with different metamodels). Eventually I tried to import km3 and tcs
files from the KM3 2007 project available from the TCS ZOO
( http://dev.eclipse.org/viewcvs/indextech.cgi/org.eclipse.gmt /AM3/dsls/KM3-2007/)
in a new TCS language project.
But then, whenever I write a very simple file like try.km3 below

try.km3:
package pack{
class cl {
attribute att : Integer;
}
}

the parser produce the following error in the "Problems" tab:
Classifier with name = Integer was not found for type of KM3!Attribute

It seems that primitive types aren't recognized?
I can still inject try.km3 to try.km3.xmi and get the corresponding
model (see below),

try.km3.xmi:
<?xml version="1.0" encoding="ISO-8859-1"?>
<Metamodel xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="KM3">
<contents name="pack">
<contents xsi:type="Class" name="cl">
<structuralFeatures xsi:type="Attribute" name="att" lower="1"
upper="1"/>
</contents>
</contents>
</Metamodel>

but the attribute has no type.

I think I don't precisely get the way PrimitiveTypes are handled in TCS,
and help would be appreciated.

Regards.
Antoine
Re: [TCS] playing with km3 metamodel and syntax [message #380603 is a reply to message #380601] Sat, 22 December 2007 13:13 Go to previous messageGo to next message
Eclipse User
Originally posted by: mikael.barbero.gmail.com

Hi Antoine,

You have to declare PrimitiveTypes in each .km3 file (as you would see
in any metamodel in the language Zoo). Here you would have:

package pack{
class cl {
attribute att : Integer;
}
datatype Integer;
}

or define this datatype in another package (but in the same .km3 file).
Let's named it PrimitiveTypes for instance:

package PrimitiveTypes {
datatype Integer;
}

Best regards (and Merry Christmas),
Mikael

Antoine Wiedemann wrote:
> Using the TCS wizard, I started to build very simple projects. My setup
> seems ok since I successfully injected different textual files to models
> (with different metamodels). Eventually I tried to import km3 and tcs
> files from the KM3 2007 project available from the TCS ZOO
> ( http://dev.eclipse.org/viewcvs/indextech.cgi/org.eclipse.gmt /AM3/dsls/KM3-2007/)
> in a new TCS language project.
> But then, whenever I write a very simple file like try.km3 below
>
> try.km3:
> package pack{
> class cl {
> attribute att : Integer;
> }
> }
>
> the parser produce the following error in the "Problems" tab:
> Classifier with name = Integer was not found for type of KM3!Attribute
>
> It seems that primitive types aren't recognized?
> I can still inject try.km3 to try.km3.xmi and get the corresponding
> model (see below),
>
> try.km3.xmi:
> <?xml version="1.0" encoding="ISO-8859-1"?>
> <Metamodel xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI"
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="KM3">
> <contents name="pack">
> <contents xsi:type="Class" name="cl">
> <structuralFeatures xsi:type="Attribute" name="att" lower="1"
> upper="1"/>
> </contents>
> </contents>
> </Metamodel>
>
> but the attribute has no type.
>
> I think I don't precisely get the way PrimitiveTypes are handled in TCS,
> and help would be appreciated.
>
> Regards.
> Antoine



--
Mikaël Barbero - PhD Candidate
ATLAS Group (INRIA & LINA) - University of Nantes
2, rue de la Houssinière
44322 Nantes Cedex 3 - France
tel. +33 2 51 12 58 08 /\ cell.+33 6 07 63 19 00
email: Mikael.Barbero@{gmail.com, univ-nantes.fr}
http://www.sciences.univ-nantes.fr/lina/atl/
Re: [TCS] playing with km3 metamodel and syntax [message #380605 is a reply to message #380603] Wed, 26 December 2007 10:00 Go to previous message
Eclipse User
Originally posted by: awiede01.univ-lr.fr

Thanks a lot Mikaël, I forgot about that!

Mikaël Barbero wrote :
> Hi Antoine,
>
> You have to declare PrimitiveTypes in each .km3 file (as you would see
> in any metamodel in the language Zoo). Here you would have:
>
> package pack{
> class cl {
> attribute att : Integer;
> }
> datatype Integer;
> }
>
> or define this datatype in another package (but in the same .km3 file).
> Let's named it PrimitiveTypes for instance:
>
> package PrimitiveTypes {
> datatype Integer;
> }
>
> Best regards (and Merry Christmas),
> Mikael
>
> Antoine Wiedemann wrote:
>> Using the TCS wizard, I started to build very simple projects. My
>> setup seems ok since I successfully injected different textual files
>> to models (with different metamodels). Eventually I tried to import
>> km3 and tcs files from the KM3 2007 project available from the TCS ZOO
>> ( http://dev.eclipse.org/viewcvs/indextech.cgi/org.eclipse.gmt /AM3/dsls/KM3-2007/)
>> in a new TCS language project.
>> But then, whenever I write a very simple file like try.km3 below
>>
>> try.km3:
>> package pack{
>> class cl {
>> attribute att : Integer;
>> }
>> }
>>
>> the parser produce the following error in the "Problems" tab:
>> Classifier with name = Integer was not found for type of KM3!Attribute
>> It seems that primitive types aren't recognized?
>> I can still inject try.km3 to try.km3.xmi and get the corresponding
>> model (see below),
>>
>> try.km3.xmi:
>> <?xml version="1.0" encoding="ISO-8859-1"?>
>> <Metamodel xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI"
>> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="KM3">
>> <contents name="pack">
>> <contents xsi:type="Class" name="cl">
>> <structuralFeatures xsi:type="Attribute" name="att" lower="1"
>> upper="1"/>
>> </contents>
>> </contents>
>> </Metamodel>
>>
>> but the attribute has no type.
>>
>> I think I don't precisely get the way PrimitiveTypes are handled in
>> TCS, and help would be appreciated.
>>
>> Regards.
>> Antoine
>
>
>
Re: [TCS] playing with km3 metamodel and syntax [message #611097 is a reply to message #380601] Sat, 22 December 2007 13:13 Go to previous message
Eclipse User
Originally posted by: mikael.barbero.gmail.com

Hi Antoine,

You have to declare PrimitiveTypes in each .km3 file (as you would see
in any metamodel in the language Zoo). Here you would have:

package pack{
class cl {
attribute att : Integer;
}
datatype Integer;
}

or define this datatype in another package (but in the same .km3 file).
Let's named it PrimitiveTypes for instance:

package PrimitiveTypes {
datatype Integer;
}

Best regards (and Merry Christmas),
Mikael

Antoine Wiedemann wrote:
> Using the TCS wizard, I started to build very simple projects. My setup
> seems ok since I successfully injected different textual files to models
> (with different metamodels). Eventually I tried to import km3 and tcs
> files from the KM3 2007 project available from the TCS ZOO
> ( http://dev.eclipse.org/viewcvs/indextech.cgi/org.eclipse.gmt /AM3/dsls/KM3-2007/)
> in a new TCS language project.
> But then, whenever I write a very simple file like try.km3 below
>
> try.km3:
> package pack{
> class cl {
> attribute att : Integer;
> }
> }
>
> the parser produce the following error in the "Problems" tab:
> Classifier with name = Integer was not found for type of KM3!Attribute
>
> It seems that primitive types aren't recognized?
> I can still inject try.km3 to try.km3.xmi and get the corresponding
> model (see below),
>
> try.km3.xmi:
> <?xml version="1.0" encoding="ISO-8859-1"?>
> <Metamodel xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI"
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="KM3">
> <contents name="pack">
> <contents xsi:type="Class" name="cl">
> <structuralFeatures xsi:type="Attribute" name="att" lower="1"
> upper="1"/>
> </contents>
> </contents>
> </Metamodel>
>
> but the attribute has no type.
>
> I think I don't precisely get the way PrimitiveTypes are handled in TCS,
> and help would be appreciated.
>
> Regards.
> Antoine



--
Mikaël Barbero - PhD Candidate
ATLAS Group (INRIA & LINA) - University of Nantes
2, rue de la Houssinière
44322 Nantes Cedex 3 - France
tel. +33 2 51 12 58 08 /\ cell.+33 6 07 63 19 00
email: Mikael.Barbero@{gmail.com, univ-nantes.fr}
http://www.sciences.univ-nantes.fr/lina/atl/
Re: [TCS] playing with km3 metamodel and syntax [message #611099 is a reply to message #380603] Wed, 26 December 2007 10:00 Go to previous message
Eclipse User
Originally posted by: awiede01.univ-lr.fr

Thanks a lot Mikaël, I forgot about that!

Mikaël Barbero wrote :
> Hi Antoine,
>
> You have to declare PrimitiveTypes in each .km3 file (as you would see
> in any metamodel in the language Zoo). Here you would have:
>
> package pack{
> class cl {
> attribute att : Integer;
> }
> datatype Integer;
> }
>
> or define this datatype in another package (but in the same .km3 file).
> Let's named it PrimitiveTypes for instance:
>
> package PrimitiveTypes {
> datatype Integer;
> }
>
> Best regards (and Merry Christmas),
> Mikael
>
> Antoine Wiedemann wrote:
>> Using the TCS wizard, I started to build very simple projects. My
>> setup seems ok since I successfully injected different textual files
>> to models (with different metamodels). Eventually I tried to import
>> km3 and tcs files from the KM3 2007 project available from the TCS ZOO
>> ( http://dev.eclipse.org/viewcvs/indextech.cgi/org.eclipse.gmt /AM3/dsls/KM3-2007/)
>> in a new TCS language project.
>> But then, whenever I write a very simple file like try.km3 below
>>
>> try.km3:
>> package pack{
>> class cl {
>> attribute att : Integer;
>> }
>> }
>>
>> the parser produce the following error in the "Problems" tab:
>> Classifier with name = Integer was not found for type of KM3!Attribute
>> It seems that primitive types aren't recognized?
>> I can still inject try.km3 to try.km3.xmi and get the corresponding
>> model (see below),
>>
>> try.km3.xmi:
>> <?xml version="1.0" encoding="ISO-8859-1"?>
>> <Metamodel xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI"
>> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="KM3">
>> <contents name="pack">
>> <contents xsi:type="Class" name="cl">
>> <structuralFeatures xsi:type="Attribute" name="att" lower="1"
>> upper="1"/>
>> </contents>
>> </contents>
>> </Metamodel>
>>
>> but the attribute has no type.
>>
>> I think I don't precisely get the way PrimitiveTypes are handled in
>> TCS, and help would be appreciated.
>>
>> Regards.
>> Antoine
>
>
>
Previous Topic:[TCS] playing with km3 metamodel and syntax
Next Topic:[TCS] UML 2.1.1 TCS
Goto Forum:
  


Current Time: Thu Jul 31 11:51:27 EDT 2014

Powered by FUDForum. Page generated in 0.02257 seconds