Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » M2M (model-to-model transformation) » [Declarative QVT] Transformation problem , beginer
[Declarative QVT] Transformation problem , beginer [message #97818] Tue, 20 January 2009 00:09 Go to next message
jorge is currently offline jorgeFriend
Messages: 3
Registered: July 2009
Junior Member
Hello


I am totally new in QVT Relational. I have the following problem, I am
trying to transform a model based on requirements from a model based on
features , but in execution time my program totally crash. This is a
fragment of my code, i think thereÂŽs something wrong with this code. Any
suggestions ?

Thanks !

top relation FeaturesToRequirements {
n1:String;
n2:String;
n3:String;

checkonly domain feature f1: Features::Feature {
description = n1,
rationale = n2,
catalogue = c1 : Features::Catalogue {},
agreement = n3

/*level = l1 : Features::MandatoryLevel {},
composited_by = compo1 : Features::CompositionRule {},
refine_and = ref1 : Features::Feature {},
trace_to = tra1 : Features::TextualRequirement {},
type = ty1 : Features::FeatureType {}*/


};

enforce domain req t1: Requirements::TextualRequirement {
description = n1,
rationale = n2,
catalogue = c2 : Requirements::Catalogue {},
document = doc : Requirements::Document {}

};

when {
CatalogueToCatalogue(c1,c2);
CatalogueToDocument(c1,doc);

}
where {
FeatureToSections(f1,doc,t1) or FeatureToRoot(f1,doc,t1);
}


}




relation FeatureToSections {
n1:String;
checkonly domain feature f1: Features::Feature {
description = n1,
refine_and = ref : Features::Feature {}
};
checkonly domain req doc : Requirements::Document {};
enforce domain req t1: Requirements::TextualRequirement{
section = s1 : Requirements::Section {
heading = n1,
document = doc

}
};
}


relation FeatureToRoot {
n1:String;
checkonly domain feature f1: Features::Feature {
description = n1

};
checkonly domain req doc : Requirements::Document {};

enforce domain req t1: Requirements::TextualRequirement{
document = doc,
section = doc.sections->first()
};
}
Re: [Declarative QVT] Transformation problem , beginer [message #97895 is a reply to message #97818] Tue, 20 January 2009 17:10 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: quentin.glineur.obeo.fr

This is a multi-part message in MIME format.
--------------080307080308070206010709
Content-Type: text/plain; charset=ISO-8859-15; format=flowed
Content-Transfer-Encoding: 8bit

Hi,

First please note that the current compiler is under strong rewriting to
bypass its current limitations. The version available on download is
unstable. A fix will be available by the next eclipse release. I'll
advertise it on the newsgroup.

Now concerning the the style of the transformation, it is difficult to
answer without the metamodels and the wanted semantics. However, here is
my notes.

The rules "FeatureToSections" and "FeatureToRoot" are using several
times the same domain "req". As at runtime you have to choose a
direction, each rule have to refer to a domain at most once.

In the rule "FeaturesToRequirements", the "where" section have a "or"
function. An OCL strict evaluation will then evaluate both the source
(FeatureToSections) and the argument (FeatureToRoot) whereas this latter
has a condition expression for the "feature" domain relaxed compared to
the one for the same domain in "FeatureToSections".
In this case, I guess it is better to use condition expression that
creates a partition of your elements. Maybe like the following:

relation FeatureToRoot {
n1:String;
checkonly domain feature f1: Features::Feature {
description = n1
} {f1.refine_and.oclIsUndefined() };

[...]
}

Regards,

Quentin

jorge a
Re: [Declarative QVT] Transformation problem , beginer [message #98030 is a reply to message #97895] Thu, 22 January 2009 01:52 Go to previous message
jorge is currently offline jorgeFriend
Messages: 3
Registered: July 2009
Junior Member
Hello

Yes finally its working for the moment, thank for that suggestions.

I made note of that.

Regards,


Jorge
Previous Topic:[ATL]Specification attribute not set in uml:Activity
Next Topic:Get The elements from xmi
Goto Forum:
  


Current Time: Fri Mar 29 12:38:42 GMT 2024

Powered by FUDForum. Page generated in 0.02610 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top