Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[m2t-dev] RE: [modeling-pmc] Xpand/Xtend and MTL/QVTO

The point I was trying to make was you don't need "yet another language" to try new things, as you'll duplicate what's already done anyway (e.g. all base expression stuff, QVTO ModelTypes, etc). 

> >> *Constraints + helper methods*
> >> Why should I write all helper methods in a separate file,
> >> when such a method is only used in one or two constraint in
> >> the same file?
> >
> > What's the problem with few OCL's context, def and inv in the same  
> > file? (def: for helpers, inv: for constraints)?
> 
> It's that there are defs in OCL and queries in QVT.
> How do they differ?

Original question was about constraints and helper methods in the same file. To me, single OCL file with constraints (inf) and helpers (def) is possible and hence, solve the issue - nothing to invent here.


> >
> >> *Model transformation with concrete syntax method bodies*
> >
> > Just curious, how you gonna handle FILE statement withing these  
> > templates?
> 
> I don't need a FILE statement therein, because such strings go into  
> the model being transformed not in a file.
> Or do you mean conceptually from a language designer view point?
> 
I mean, how would you forbid clients from using FILE statement from their templates you intend to invoke from a transformation? IOW, language clauses with side-effects (i.e. FILE) might be harmful once you start considering usecases like that one (you may formulate this general usecase as "using template outcome as a string", which ultimately makes FILE statements illegal).


> >> *Code generation uses intermediate model transformations*
> >> When generating code I use helper methods to derive values
> >> from the input model, things like
> >
> > It's already in QVT, no need to invent a thing ;)
> 
> What is in QVT? Code generation capabilities?
> I want to be able to define templates and model 
> transformations in the  
> same file.

The usecase you described was intermediate model (JavaClass), that's the thing already done in QVT. Given one can invoke QVT operations from Xpand - consider problem solved. Not from a single file, though, but as you mentioned, it's "spaghetti" code, and rarely percieved as good code.


Again, the point I'm trying to make is that one don't need to have all the basic stuff done himeself just to research on new approaches. I'm arguing statement you made:
> need something which drives standardization 
> (like EMF does for EMOF).
> A standard can only evolve if we have made some 
> experiences with new things. So how should we 
> do this if we're all stuck to standards?  

First, it turns out a lot of things are already possible with "standards", just need to get using them, rather than ignoring them. Second, nothing prevents you from imporving a standard, trying new things on top of it. I doubt maintaining own expresson language helps in researching new things - instead of spending time on research, one need to fix bugs in basic operations, educate users on their custom language, have these long email threads what's the reason to keep it and so on ;)

Best wishes,
Artem Tikhomirov



> -----Original Message-----
> From: Sven Efftinge [mailto:sven.efftinge@xxxxxxxxx] 
> Sent: Wednesday, August 27, 2008 4:14 PM
> To: Artem Tikhomirov
> Cc: Model to Text
> Subject: Re: [modeling-pmc] Xpand/Xtend and MTL/QVTO
> 
> Hi Artem,
> 
> to make things clear, I don't want to talk QVT, MTL and OCL down.
> I just want to explain why I find it important to further 
> improve how we develop code generators.
> 
> >
> >> *Constraints + helper methods*
> >> Why should I write all helper methods in a separate file,
> >> when such a method is only used in one or two constraint in
> >> the same file?
> >
> > What's the problem with few OCL's context, def and inv in the same  
> > file? (def: for helpers, inv: for constraints)?
> 
> It's that there are defs in OCL and queries in QVT.
> How do they differ?
> 
> >
> >> *Model transformation with concrete syntax method bodies*
> >
> > Just curious, how you gonna handle FILE statement withing these  
> > templates?
> 
> I don't need a FILE statement therein, because such strings go into  
> the model being transformed not in a file.
> Or do you mean conceptually from a language designer view point?
> 
> >
> >
> >> *Code generation uses intermediate model transformations*
> >> When generating code I use helper methods to derive values
> >> from the input model, things like
> >
> > It's already in QVT, no need to invent a thing ;)
> 
> What is in QVT? Code generation capabilities?
> I want to be able to define templates and model 
> transformations in the  
> same file.
> 
> atb,
> Sven
> 
> 



Back to the top