Skip to main content



      Home
Home » Modeling » ATL » How to improve my ATL transformation
How to improve my ATL transformation [message #882305] Wed, 06 June 2012 04:14
Eclipse UserFriend
Is there a way to improve the performance of my ATL transformation, that to perform the injection in a Java XMI model does it in 223 seconds ?

This is the code:

rule createStatement {
	from
		imd : java!MethodDeclaration(
			--seleziono i metodi che hanno l'annotation
			imd.annotations -> exists(a | a.type.type.name='Annotation')
		)
		to		
			
		do{
--ciclo per ogni elemento di tipo SQLQuery che identifica una singola query
for (elemXMLSQL in xml!Element.allInstances()-> select(e | e.name = 'SQLQuery')) {
					--		importante operazione di controllo del valore dell'annotation con il nome della query	
					if(imd.annotations.first().values.first().value.escapedValue.toString().endsWith(elemXMLSQL.getAttrVal('name').concat('"'))){
						
						if(elemXMLSQL.getAttrVal('type').endsWith('SIMPLE_SELECT')){
		
							imd.body.statements <- imd.body.statements -> append(thisModule.createHashMapParams(imd));
							
							for (elemXMLParams in elemXMLSQL.getChildren(Sequence{'params'})) {	
								for (elemXMLParam in elemXMLParams.getChildren(Sequence{'param'})) {	
									imd.body.statements <- imd.body.statements -> append(thisModule.createStatementParams(imd, elemXMLParam));
								}
							}
							--instanzio una nuova hashmap per gli into
							imd.body.statements <- imd.body.statements -> append(thisModule.createHashMapIntos(imd, elemXMLSQL));
							--generazione del blocco if
							imd.body.statements <- imd.body.statements -> append(thisModule.createIfStatementIntos(imd, elemXMLSQL));
							--mRT.performThrough(controlloSqlcode, exControlloSqlcode) ; 
							imd.body.statements <- imd.body.statements -> append(thisModule.createStatementPerformThrough(imd));
						}						
					}
			}
		}
}


thank you so much

[Updated on: Wed, 06 June 2012 04:43] by Moderator

Previous Topic:BPEL 2 XML using ATL
Next Topic:xmi:type instead of xsi:type
Goto Forum:
  


Current Time: Tue Jul 01 13:59:35 EDT 2025

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

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

Back to the top