Added oclAsSet service call migration.

Change-Id: I2efd62efb6bf56f6a352631d3a2467db17a9d52e
diff --git a/plugins/org.eclipse.acceleo.aql.migration/src/org/eclipse/acceleo/aql/migration/converters/ExpressionConverter.java b/plugins/org.eclipse.acceleo.aql.migration/src/org/eclipse/acceleo/aql/migration/converters/ExpressionConverter.java
index 1fe19fc..76e9e47 100644
--- a/plugins/org.eclipse.acceleo.aql.migration/src/org/eclipse/acceleo/aql/migration/converters/ExpressionConverter.java
+++ b/plugins/org.eclipse.acceleo.aql.migration/src/org/eclipse/acceleo/aql/migration/converters/ExpressionConverter.java
@@ -365,29 +365,9 @@
 			output.getArguments().add(AstFactory.eINSTANCE.createNullLiteral());

 			res = output;

 		} else if (isInvokeCall(input)) {

-			Call output = OperationUtils.createCall(input);

-			output.setType(CallType.CALLSERVICE);

-			final String serviceSignature = ((org.eclipse.ocl.expressions.StringLiteralExp<EClassifier>)input

-					.getArgument().get(1)).getStringSymbol();

-			final String serviceName = serviceSignature.substring(0, serviceSignature.indexOf("("));

-			output.setServiceName(serviceName);

-			map(((CollectionLiteralExp)input.getArgument().get(2)).getPart(), output.getArguments());

-			if (output.getArguments().isEmpty()) {

-				output.setServiceName(serviceName + JAVA_SERVICE);

-				final String varName = ((Query)input.eContainer()).getParameter().get(0).getName();

-				final VarRef varRef = AstFactory.eINSTANCE.createVarRef();

-				varRef.setVariableName(varName);

-				output.getArguments().add(varRef);

-				final String serviceClassName = ((org.eclipse.ocl.expressions.StringLiteralExp<EClassifier>)input

-						.getArgument().get(0)).getStringSymbol();

-				try {

-					refactorService(serviceClassName, serviceName);

-				} catch (IOException e) {

-					// TODO Auto-generated catch block

-					e.printStackTrace();

-				}

-			}

-			res = output;

+			res = convertInvokeCall(input);

+		} else if (isOclAsSetCall(input)) {

+			res = convertOclAsSetCall(input);

 		} else {

 			Call output = OperationUtils.createCall(input);

 			output.getArguments().add((Expression)convert(input.getSource()));

@@ -399,6 +379,73 @@
 	}

 

 	/**

+	 * Converts the given oclAsSet {@link OperationCallExp}.

+	 * 

+	 * @param input

+	 *            the oclAsSet {@link OperationCallExp}

+	 * @return the converted oclAsSet {@link OperationCallExp}

+	 */

+	private Expression convertOclAsSetCall(OperationCallExp input) {

+		Call res = AstFactory.eINSTANCE.createCall();

+

+		res.setServiceName("asSet");

+		res.setType(CallType.COLLECTIONCALL);

+		res.getArguments().add((Expression)convert(input.getSource()));

+

+		return res;

+	}

+

+	/**

+	 * Tells if the given {@link OperationCallExp} is an oclAsSet call.

+	 * 

+	 * @param input

+	 *            the {@link OperationCallExp} to check

+	 * @return <code>true</code> if the given {@link OperationCallExp} is an oclAsSet call, <code>false</code>

+	 *         otherwise

+	 */

+	private boolean isOclAsSetCall(OperationCallExp input) {

+		final EOperation referredOperation = input.getReferredOperation();

+		return referredOperation != null && "oclAsSet".equals(referredOperation.getName())

+				&& referredOperation.eContainer() instanceof EClass && "OclAny_Class".equals(

+						((EClass)referredOperation.eContainer()).getName());

+	}

+

+	/**

+	 * Converts the given invoke {@link OperationCallExp}.

+	 * 

+	 * @param input

+	 *            the invoke call

+	 * @return the converted invoke {@link OperationCallExp}

+	 */

+	private Expression convertInvokeCall(OperationCallExp input) {

+		final Call res = OperationUtils.createCall(input);

+

+		res.setType(CallType.CALLSERVICE);

+		final String serviceSignature = ((org.eclipse.ocl.expressions.StringLiteralExp<EClassifier>)input

+				.getArgument().get(1)).getStringSymbol();

+		final String serviceName = serviceSignature.substring(0, serviceSignature.indexOf("("));

+		res.setServiceName(serviceName);

+		map(((CollectionLiteralExp)input.getArgument().get(2)).getPart(), res.getArguments());

+		if (res.getArguments().isEmpty()) {

+			res.setServiceName(serviceName + JAVA_SERVICE);

+			final String varName = ((Query)input.eContainer()).getParameter().get(0).getName();

+			final VarRef varRef = AstFactory.eINSTANCE.createVarRef();

+			varRef.setVariableName(varName);

+			res.getArguments().add(varRef);

+			final String serviceClassName = ((org.eclipse.ocl.expressions.StringLiteralExp<EClassifier>)input

+					.getArgument().get(0)).getStringSymbol();

+			try {

+				refactorService(serviceClassName, serviceName);

+			} catch (IOException e) {

+				// TODO Auto-generated catch block

+				e.printStackTrace();

+			}

+		}

+

+		return res;

+	}

+

+	/**

 	 * Renames the service and add an {@link Object} parameter.

 	 * 

 	 * @param serviceClassName

diff --git a/tests/org.eclipse.acceleo.aql.migration.tests.acceleo3/META-INF/MANIFEST.MF b/tests/org.eclipse.acceleo.aql.migration.tests.acceleo3/META-INF/MANIFEST.MF
index 04ac21b..d879aa9 100644
--- a/tests/org.eclipse.acceleo.aql.migration.tests.acceleo3/META-INF/MANIFEST.MF
+++ b/tests/org.eclipse.acceleo.aql.migration.tests.acceleo3/META-INF/MANIFEST.MF
@@ -25,6 +25,7 @@
  resources.evaluation.ifBlockIndent,
  resources.evaluation.implicitForIterator,
  resources.evaluation.letBlock,
+ resources.evaluation.oclAsSet,
  resources.evaluation.protectedAreaBlock,
  resources.evaluation.queryInvocation,
  resources.evaluation.range,
diff --git a/tests/org.eclipse.acceleo.aql.migration.tests.acceleo3/src/resources/evaluation/oclAsSet/OclAsSet.java b/tests/org.eclipse.acceleo.aql.migration.tests.acceleo3/src/resources/evaluation/oclAsSet/OclAsSet.java
new file mode 100644
index 0000000..9e2ef0c
--- /dev/null
+++ b/tests/org.eclipse.acceleo.aql.migration.tests.acceleo3/src/resources/evaluation/oclAsSet/OclAsSet.java
@@ -0,0 +1,415 @@
+/*******************************************************************************
+ * Copyright (c) 2008, 2012 Obeo.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ * 
+ * Contributors:
+ *     Obeo - initial API and implementation
+ *******************************************************************************/
+package resources.evaluation.oclAsSet;
+
+import java.io.File;
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.acceleo.engine.event.IAcceleoTextGenerationListener;
+import org.eclipse.acceleo.engine.generation.strategy.IAcceleoGenerationStrategy;
+import org.eclipse.acceleo.engine.service.AbstractAcceleoGenerator;
+import org.eclipse.emf.common.util.BasicMonitor;
+import org.eclipse.emf.common.util.Monitor;
+import org.eclipse.emf.common.util.URI;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.resource.ResourceSet;
+
+/**
+ * Entry point of the 'StaticText' generation module.
+ *
+ * @generated
+ */
+public class OclAsSet extends AbstractAcceleoGenerator {
+    /**
+     * The name of the module.
+     *
+     * @generated
+     */
+    public static final String MODULE_FILE_NAME = "/resources/evaluation/oclAsSet/oclAsSet";
+    
+    /**
+     * The name of the templates that are to be generated.
+     *
+     * @generated
+     */
+    public static final String[] TEMPLATE_NAMES = { "testOclAsSet" };
+    
+    /**
+     * The list of properties files from the launch parameters (Launch configuration).
+     *
+     * @generated
+     */
+    private List<String> propertiesFiles = new ArrayList<String>();
+
+    /**
+     * Allows the public constructor to be used. Note that a generator created
+     * this way cannot be used to launch generations before one of
+     * {@link #initialize(EObject, File, List)} or
+     * {@link #initialize(URI, File, List)} is called.
+     * <p>
+     * The main reason for this constructor is to allow clients of this
+     * generation to call it from another Java file, as it allows for the
+     * retrieval of {@link #getProperties()} and
+     * {@link #getGenerationListeners()}.
+     * </p>
+     *
+     * @generated
+     */
+    public OclAsSet() {
+        // Empty implementation
+    }
+
+    /**
+     * This allows clients to instantiates a generator with all required information.
+     * 
+     * @param modelURI
+     *            URI where the model on which this generator will be used is located.
+     * @param targetFolder
+     *            This will be used as the output folder for this generation : it will be the base path
+     *            against which all file block URLs will be resolved.
+     * @param arguments
+     *            If the template which will be called requires more than one argument taken from the model,
+     *            pass them here.
+     * @throws IOException
+     *             This can be thrown in three scenarios : the module cannot be found, it cannot be loaded, or
+     *             the model cannot be loaded.
+     * @generated
+     */
+    public OclAsSet(URI modelURI, File targetFolder,
+            List<? extends Object> arguments) throws IOException {
+        initialize(modelURI, targetFolder, arguments);
+    }
+
+    /**
+     * This allows clients to instantiates a generator with all required information.
+     * 
+     * @param model
+     *            We'll iterate over the content of this element to find Objects matching the first parameter
+     *            of the template we need to call.
+     * @param targetFolder
+     *            This will be used as the output folder for this generation : it will be the base path
+     *            against which all file block URLs will be resolved.
+     * @param arguments
+     *            If the template which will be called requires more than one argument taken from the model,
+     *            pass them here.
+     * @throws IOException
+     *             This can be thrown in two scenarios : the module cannot be found, or it cannot be loaded.
+     * @generated
+     */
+    public OclAsSet(EObject model, File targetFolder,
+            List<? extends Object> arguments) throws IOException {
+        initialize(model, targetFolder, arguments);
+    }
+    
+    /**
+     * This can be used to launch the generation from a standalone application.
+     * 
+     * @param args
+     *            Arguments of the generation.
+     * @generated
+     */
+    public static void main(String[] args) {
+        try {
+            if (args.length < 2) {
+                System.out.println("Arguments not valid : {model, folder}.");
+            } else {
+                URI modelURI = URI.createFileURI(args[0]);
+                File folder = new File(args[1]);
+                
+                List<String> arguments = new ArrayList<String>();
+                
+                /*
+                 * If you want to change the content of this method, do NOT forget to change the "@generated"
+                 * tag in the Javadoc of this method to "@generated NOT". Without this new tag, any compilation
+                 * of the Acceleo module with the main template that has caused the creation of this class will
+                 * revert your modifications.
+                 */
+
+                /*
+                 * Add in this list all the arguments used by the starting point of the generation
+                 * If your main template is called on an element of your model and a String, you can
+                 * add in "arguments" this "String" attribute.
+                 */
+                
+                OclAsSet generator = new OclAsSet(modelURI, folder, arguments);
+                
+                /*
+                 * Add the properties from the launch arguments.
+                 * If you want to programmatically add new properties, add them in "propertiesFiles"
+                 * You can add the absolute path of a properties files, or even a project relative path.
+                 * If you want to add another "protocol" for your properties files, please override 
+                 * "getPropertiesLoaderService(AcceleoService)" in order to return a new property loader.
+                 * The behavior of the properties loader service is explained in the Acceleo documentation
+                 * (Help -> Help Contents).
+                 */
+                 
+                for (int i = 2; i < args.length; i++) {
+                    generator.addPropertiesFile(args[i]);
+                }
+                
+                generator.doGenerate(new BasicMonitor());
+            }
+        } catch (IOException e) {
+            e.printStackTrace();
+        }
+    }
+
+    /**
+     * Launches the generation described by this instance.
+     * 
+     * @param monitor
+     *            This will be used to display progress information to the user.
+     * @throws IOException
+     *             This will be thrown if any of the output files cannot be saved to disk.
+     * @generated
+     */
+    @Override
+    public void doGenerate(Monitor monitor) throws IOException {
+        /*
+         * TODO if you wish to change the generation as a whole, override this. The default behavior should
+         * be sufficient in most cases. If you want to change the content of this method, do NOT forget to
+         * change the "@generated" tag in the Javadoc of this method to "@generated NOT". Without this new tag,
+         * any compilation of the Acceleo module with the main template that has caused the creation of this
+         * class will revert your modifications. If you encounter a problem with an unresolved proxy during the
+         * generation, you can remove the comments in the following instructions to check for problems. Please
+         * note that those instructions may have a significant impact on the performances.
+         */
+
+        //org.eclipse.emf.ecore.util.EcoreUtil.resolveAll(model);
+
+        /*
+         * If you want to check for potential errors in your models before the launch of the generation, you
+         * use the code below.
+         */
+
+        //if (model != null && model.eResource() != null) {
+        //    List<org.eclipse.emf.ecore.resource.Resource.Diagnostic> errors = model.eResource().getErrors();
+        //    for (org.eclipse.emf.ecore.resource.Resource.Diagnostic diagnostic : errors) {
+        //        System.err.println(diagnostic.toString());
+        //    }
+        //}
+
+        super.doGenerate(monitor);
+    }
+    
+    /**
+     * If this generator needs to listen to text generation events, listeners can be returned from here.
+     * 
+     * @return List of listeners that are to be notified when text is generated through this launch.
+     * @generated
+     */
+    @Override
+    public List<IAcceleoTextGenerationListener> getGenerationListeners() {
+        List<IAcceleoTextGenerationListener> listeners = super.getGenerationListeners();
+        /*
+         * TODO if you need to listen to generation event, add listeners to the list here. If you want to change
+         * the content of this method, do NOT forget to change the "@generated" tag in the Javadoc of this method
+         * to "@generated NOT". Without this new tag, any compilation of the Acceleo module with the main template
+         * that has caused the creation of this class will revert your modifications.
+         */
+        return listeners;
+    }
+    
+    /**
+     * If you need to change the way files are generated, this is your entry point.
+     * <p>
+     * The default is {@link org.eclipse.acceleo.engine.generation.strategy.DefaultStrategy}; it generates
+     * files on the fly. If you only need to preview the results, return a new
+     * {@link org.eclipse.acceleo.engine.generation.strategy.PreviewStrategy}. Both of these aren't aware of
+     * the running Eclipse and can be used standalone.
+     * </p>
+     * <p>
+     * If you need the file generation to be aware of the workspace (A typical example is when you wanna
+     * override files that are under clear case or any other VCS that could forbid the overriding), then
+     * return a new {@link org.eclipse.acceleo.engine.generation.strategy.WorkspaceAwareStrategy}.
+     * <b>Note</b>, however, that this <b>cannot</b> be used standalone.
+     * </p>
+     * <p>
+     * All three of these default strategies support merging through JMerge.
+     * </p>
+     * 
+     * @return The generation strategy that is to be used for generations launched through this launcher.
+     * @generated
+     */
+    @Override
+    public IAcceleoGenerationStrategy getGenerationStrategy() {
+        return super.getGenerationStrategy();
+    }
+    
+    /**
+     * This will be called in order to find and load the module that will be launched through this launcher.
+     * We expect this name not to contain file extension, and the module to be located beside the launcher.
+     * 
+     * @return The name of the module that is to be launched.
+     * @generated
+     */
+    @Override
+    public String getModuleName() {
+        return MODULE_FILE_NAME;
+    }
+    
+    /**
+     * If the module(s) called by this launcher require properties files, return their qualified path from
+     * here.Take note that the first added properties files will take precedence over subsequent ones if they
+     * contain conflicting keys.
+     * 
+     * @return The list of properties file we need to add to the generation context.
+     * @see java.util.ResourceBundle#getBundle(String)
+     * @generated
+     */
+    @Override
+    public List<String> getProperties() {
+        /*
+         * If you want to change the content of this method, do NOT forget to change the "@generated"
+         * tag in the Javadoc of this method to "@generated NOT". Without this new tag, any compilation
+         * of the Acceleo module with the main template that has caused the creation of this class will
+         * revert your modifications.
+         */
+
+        /*
+         * TODO if your generation module requires access to properties files, add their qualified path to the list here.
+         * 
+         * Properties files can be located in an Eclipse plug-in or in the file system (all Acceleo projects are Eclipse
+         * plug-in). In order to use properties files located in an Eclipse plugin, you need to add the path of the properties
+         * files to the "propertiesFiles" list:
+         * 
+         * final String prefix = "platform:/plugin/";
+         * final String pluginName = "org.eclipse.acceleo.module.sample";
+         * final String packagePath = "/org/eclipse/acceleo/module/sample/properties/";
+         * final String fileName = "default.properties";
+         * propertiesFiles.add(prefix + pluginName + packagePath + fileName);
+         * 
+         * With this mechanism, you can load properties files from your plugin or from another plugin.
+         * 
+         * You may want to load properties files from the file system, for that you need to add the absolute path of the file:
+         * 
+         * propertiesFiles.add("C:\Users\MyName\MyFile.properties");
+         * 
+         * If you want to let your users add properties files located in the same folder as the model:
+         *
+         * if (EMFPlugin.IS_ECLIPSE_RUNNING && model != null && model.eResource() != null) { 
+         *     propertiesFiles.addAll(AcceleoEngineUtils.getPropertiesFilesNearModel(model.eResource()));
+         * }
+         * 
+         * To learn more about Properties Files, have a look at the Acceleo documentation (Help -> Help Contents).
+         */
+        return propertiesFiles;
+    }
+    
+    /**
+     * Adds a properties file in the list of properties files.
+     * 
+     * @param propertiesFile
+     *            The properties file to add.
+     * @generated
+     * @since 3.1
+     */
+    @Override
+    public void addPropertiesFile(String propertiesFile) {
+        this.propertiesFiles.add(propertiesFile);
+    }
+    
+    /**
+     * This will be used to get the list of templates that are to be launched by this launcher.
+     * 
+     * @return The list of templates to call on the module {@link #getModuleName()}.
+     * @generated
+     */
+    @Override
+    public String[] getTemplateNames() {
+        return TEMPLATE_NAMES;
+    }
+    
+    /**
+     * This can be used to update the resource set's package registry with all needed EPackages.
+     * 
+     * @param resourceSet
+     *            The resource set which registry has to be updated.
+     * @generated
+     */
+    @Override
+    public void registerPackages(ResourceSet resourceSet) {
+        super.registerPackages(resourceSet);
+        if (!isInWorkspace(org.eclipse.emf.ecore.EcorePackage.class)) {
+            resourceSet.getPackageRegistry().put(org.eclipse.emf.ecore.EcorePackage.eINSTANCE.getNsURI(), org.eclipse.emf.ecore.EcorePackage.eINSTANCE);
+        }
+        
+        /*
+         * If you want to change the content of this method, do NOT forget to change the "@generated"
+         * tag in the Javadoc of this method to "@generated NOT". Without this new tag, any compilation
+         * of the Acceleo module with the main template that has caused the creation of this class will
+         * revert your modifications.
+         */
+        
+        /*
+         * If you need additional package registrations, you can register them here. The following line
+         * (in comment) is an example of the package registration for UML.
+         * 
+         * You can use the method  "isInWorkspace(Class c)" to check if the package that you are about to
+         * register is in the workspace.
+         * 
+         * To register a package properly, please follow the following conventions:
+         *
+         * If the package is located in another plug-in, already installed in Eclipse. The following content should
+         * have been generated at the beginning of this method. Do not register the package using this mechanism if
+         * the metamodel is located in the workspace.
+         *  
+         * if (!isInWorkspace(UMLPackage.class)) {
+         *     // The normal package registration if your metamodel is in a plugin.
+         *     resourceSet.getPackageRegistry().put(UMLPackage.eNS_URI, UMLPackage.eINSTANCE);
+         * }
+         * 
+         * If the package is located in another project in your workspace, the plugin containing the package has not
+         * been register by EMF and Acceleo should register it automatically. If you want to use the generator in
+         * stand alone, the regular registration (seen a couple lines before) is needed.
+         * 
+         * To learn more about Package Registration, have a look at the Acceleo documentation (Help -> Help Contents).
+         */
+    }
+
+    /**
+     * This can be used to update the resource set's resource factory registry with all needed factories.
+     * 
+     * @param resourceSet
+     *            The resource set which registry has to be updated.
+     * @generated
+     */
+    @Override
+    public void registerResourceFactories(ResourceSet resourceSet) {
+        super.registerResourceFactories(resourceSet);
+        /*
+         * If you want to change the content of this method, do NOT forget to change the "@generated"
+         * tag in the Javadoc of this method to "@generated NOT". Without this new tag, any compilation
+         * of the Acceleo module with the main template that has caused the creation of this class will
+         * revert your modifications.
+         */
+        
+        /*
+         * TODO If you need additional resource factories registrations, you can register them here. the following line
+         * (in comment) is an example of the resource factory registration.
+         *
+         * If you want to use the generator in stand alone, the resource factory registration will be required.
+         *  
+         * To learn more about the registration of Resource Factories, have a look at the Acceleo documentation (Help -> Help Contents). 
+         */ 
+        
+        // resourceSet.getResourceFactoryRegistry().getExtensionToFactoryMap().put(XyzResource.FILE_EXTENSION, XyzResource.Factory.INSTANCE);
+        
+        /*
+         * Some metamodels require a very complex setup for standalone usage. For example, if you want to use a generator
+         * targetting UML models in standalone, you NEED to use the following:
+         */ 
+        // UMLResourcesUtil.init(resourceSet)
+    }
+    
+}
diff --git a/tests/org.eclipse.acceleo.aql.migration.tests.acceleo3/src/resources/evaluation/oclAsSet/oclAsSet.mtl b/tests/org.eclipse.acceleo.aql.migration.tests.acceleo3/src/resources/evaluation/oclAsSet/oclAsSet.mtl
new file mode 100644
index 0000000..0f31755
--- /dev/null
+++ b/tests/org.eclipse.acceleo.aql.migration.tests.acceleo3/src/resources/evaluation/oclAsSet/oclAsSet.mtl
@@ -0,0 +1,8 @@
+[module oclAsSet(http://www.eclipse.org/emf/2002/Ecore)/]
+
+[comment @main/]
+[template public testOclAsSet(anEClass : EClass)]
+[file ('testOclAsSet', false, 'Cp1252')]
+[anEClass.oclAsSet().name/]
+[/file]
+[/template]
diff --git a/tests/org.eclipse.acceleo.aql.migration.tests.acceleo3/src/resources/evaluation/oclAsSet/oclAsSet.xmi b/tests/org.eclipse.acceleo.aql.migration.tests.acceleo3/src/resources/evaluation/oclAsSet/oclAsSet.xmi
new file mode 100644
index 0000000..ef3f70d
--- /dev/null
+++ b/tests/org.eclipse.acceleo.aql.migration.tests.acceleo3/src/resources/evaluation/oclAsSet/oclAsSet.xmi
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ecore:EPackage xmi:version="2.0"
+    xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+    xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" name="target"
+    nsURI="target" nsPrefix="target">
+  <eClassifiers xsi:type="ecore:EClass" name="ClasseA" eSuperTypes="#//AbstractClass">
+    <eOperations name="computeSomething" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EJavaObject">
+      <eParameters name="doubleParam" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EDouble"/>
+      <eParameters name="anObject" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EJavaObject"/>
+      <eParameters name="someParam" upperBound="-1" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EJavaObject"/>
+    </eOperations>
+    <eStructuralFeatures xsi:type="ecore:EAttribute" name="anAttribute" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
+    <eStructuralFeatures xsi:type="ecore:EAttribute" name="multivaluedAttribute" upperBound="-1"
+        eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean"/>
+    <eStructuralFeatures xsi:type="ecore:EReference" name="aReferenceFromA" eType="ecore:EClass http://www.eclipse.org/emf/2002/Ecore#//EObject"/>
+    <eStructuralFeatures xsi:type="ecore:EReference" name="multivaluedReference" upperBound="-1"
+        eType="ecore:EClass http://www.eclipse.org/emf/2002/Ecore#//EObject"/>
+  </eClassifiers>
+  <eClassifiers xsi:type="ecore:EClass" name="ClasseB" eSuperTypes="#//AbstractClass">
+    <eStructuralFeatures xsi:type="ecore:EAttribute" name="anAttributeOfB" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EChar"/>
+    <eStructuralFeatures xsi:type="ecore:EAttribute" name="anotherAttributeOfB" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//ELongObject"/>
+    <eStructuralFeatures xsi:type="ecore:EReference" name="aReferenceFromB" eType="#//ClasseA"/>
+  </eClassifiers>
+  <eClassifiers xsi:type="ecore:EClass" name="AbstractClass" abstract="true">
+    <eOperations name="anOperationFromAbstractSuperClass" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
+  </eClassifiers>
+</ecore:EPackage>
diff --git a/tests/org.eclipse.acceleo.aql.migration.tests.acceleo3/status/TODO b/tests/org.eclipse.acceleo.aql.migration.tests.acceleo3/status/TODO
index 88c9d48..9eb422e 100644
--- a/tests/org.eclipse.acceleo.aql.migration.tests.acceleo3/status/TODO
+++ b/tests/org.eclipse.acceleo.aql.migration.tests.acceleo3/status/TODO
@@ -29,7 +29,6 @@
 ==================
 stringServices
 	 lineSeparator
-	 oclAsSet
 	 replaceFirst
 	 strtok
 	 substituteFirst
@@ -38,11 +37,7 @@
 	(LOT1) TODO ? OclAny could be replaced by Object but it causes a parser issue [let var : OclAny = self][var/]
 	(LOT1) TODO implement getProperties
 	(LOT1) TODO replace invoke by a direct service call[invoke('misc.MyService','myService(java.lang.Object, java.lang.String)',Sequence{p,'test'})/]
-booleanServices
-	 oclAsSet
 numericServices
-	 Integer.oclAsSet
-	 Real.oclAsSet
 	(LOT1) WIP https://git.eclipse.org/r/#/c/163019/ operations between Real And Integers
 emfServices
 	 current(element)
@@ -53,7 +48,6 @@
 	 eIsSet
 	 eSet
 	 eUnset
-	 oclAsSet
 	(LOT1) WIP https://git.eclipse.org/r/#/c/162936/ eGet(feature) [c.eGet(c.eClass().getEStructuralFeature('name'))/]
 	(LOT1) WIP https://git.eclipse.org/r/#/c/162936/ eGet(feature, resolve) [c.eGet(c.eClass().getEStructuralFeature('name'), true)/]
 sequencesServices
@@ -68,7 +62,6 @@
 	 lastIndexOfSlice
 	 max
 	 min
-	 oclAsSet
 	 product
 	 removeAll
 	 selectByKind
@@ -88,7 +81,6 @@
 	 lastIndexOfSlice
 	 max
 	 min
-	 oclAsSet
 	 product
 	 removeAll
 	 selectByKind
diff --git a/tests/org.eclipse.acceleo.aql.migration.tests.acceleo3/status/TODO_lot1 b/tests/org.eclipse.acceleo.aql.migration.tests.acceleo3/status/TODO_lot1
index f45db07..fb26921 100644
--- a/tests/org.eclipse.acceleo.aql.migration.tests.acceleo3/status/TODO_lot1
+++ b/tests/org.eclipse.acceleo.aql.migration.tests.acceleo3/status/TODO_lot1
@@ -17,15 +17,9 @@
 acceleoServices
 	 TODO ? OclAny could be replaced by Object but it causes a parser issue [let var : OclAny = self][var/]
 	 TODO implement getProperties
-	 TODO replace invoke by a direct service call[invoke('misc.MyService','myService(java.lang.Object, java.lang.String)',Sequence{p,'test'})/]
 numericServices
 	 WIP https://git.eclipse.org/r/#/c/163019/ operations between Real And Integers
-emfServices
-	 WIP https://git.eclipse.org/r/#/c/162936/ eGet(feature) [c.eGet(c.eClass().getEStructuralFeature('name'))/]
-	 WIP https://git.eclipse.org/r/#/c/162936/ eGet(feature, resolve) [c.eGet(c.eClass().getEStructuralFeature('name'), true)/]
 sequencesServices
 	 WIP https://git.eclipse.org/r/#/c/162879/ filter(primitiveType)
-	 WIP https://git.eclipse.org/r/#/c/162938/ append
 orderedSetsServices
 	 WIP https://git.eclipse.org/r/#/c/162879/ filter(primitiveType)
-	 WIP https://git.eclipse.org/r/#/c/162938/ append
diff --git a/tests/org.eclipse.acceleo.aql.migration.tests/resources/evaluation/oclAsSet/generated/testOclAsSet-expected.txt b/tests/org.eclipse.acceleo.aql.migration.tests/resources/evaluation/oclAsSet/generated/testOclAsSet-expected.txt
new file mode 100644
index 0000000..f8661d3
--- /dev/null
+++ b/tests/org.eclipse.acceleo.aql.migration.tests/resources/evaluation/oclAsSet/generated/testOclAsSet-expected.txt
@@ -0,0 +1 @@
+AbstractClass
diff --git a/tests/org.eclipse.acceleo.aql.migration.tests/resources/evaluation/oclAsSet/oclAsSet-expected-runtimeMessages.txt b/tests/org.eclipse.acceleo.aql.migration.tests/resources/evaluation/oclAsSet/oclAsSet-expected-runtimeMessages.txt
new file mode 100644
index 0000000..0be6fd3
--- /dev/null
+++ b/tests/org.eclipse.acceleo.aql.migration.tests/resources/evaluation/oclAsSet/oclAsSet-expected-runtimeMessages.txt
@@ -0,0 +1 @@
+ (null 0 0) null[]
diff --git a/tests/org.eclipse.acceleo.aql.migration.tests/resources/evaluation/oclAsSet/oclAsSet-expected-validation.txt b/tests/org.eclipse.acceleo.aql.migration.tests/resources/evaluation/oclAsSet/oclAsSet-expected-validation.txt
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/tests/org.eclipse.acceleo.aql.migration.tests/resources/evaluation/oclAsSet/oclAsSet-expected-validation.txt
diff --git a/tests/org.eclipse.acceleo.aql.migration.tests/resources/evaluation/oclAsSet/oclAsSet-expected.mtl b/tests/org.eclipse.acceleo.aql.migration.tests/resources/evaluation/oclAsSet/oclAsSet-expected.mtl
new file mode 100644
index 0000000..563b1ce
--- /dev/null
+++ b/tests/org.eclipse.acceleo.aql.migration.tests/resources/evaluation/oclAsSet/oclAsSet-expected.mtl
@@ -0,0 +1,8 @@
+[module oclAsSet('http://www.eclipse.org/emf/2002/Ecore')/]
+
+[comment @main/]
+[template public testOclAsSet(anEClass : ecore::EClass)]
+  [file ('testOclAsSet', overwrite, 'Cp1252')]
+    [anEClass->asSet()->asSequence()->collect(temp1 | temp1.name)/]
+  [/file]
+[/template]
\ No newline at end of file
diff --git a/tests/org.eclipse.acceleo.aql.migration.tests/resources/evaluation/oclAsSet/oclAsSet-origin.mtl b/tests/org.eclipse.acceleo.aql.migration.tests/resources/evaluation/oclAsSet/oclAsSet-origin.mtl
new file mode 100644
index 0000000..0f31755
--- /dev/null
+++ b/tests/org.eclipse.acceleo.aql.migration.tests/resources/evaluation/oclAsSet/oclAsSet-origin.mtl
@@ -0,0 +1,8 @@
+[module oclAsSet(http://www.eclipse.org/emf/2002/Ecore)/]
+
+[comment @main/]
+[template public testOclAsSet(anEClass : EClass)]
+[file ('testOclAsSet', false, 'Cp1252')]
+[anEClass.oclAsSet().name/]
+[/file]
+[/template]
diff --git a/tests/org.eclipse.acceleo.aql.migration.tests/resources/evaluation/oclAsSet/oclAsSet.emtl b/tests/org.eclipse.acceleo.aql.migration.tests/resources/evaluation/oclAsSet/oclAsSet.emtl
new file mode 100644
index 0000000..787fee9
--- /dev/null
+++ b/tests/org.eclipse.acceleo.aql.migration.tests/resources/evaluation/oclAsSet/oclAsSet.emtl
@@ -0,0 +1,199 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xmi:XMI xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" xmlns:mtl="http://www.eclipse.org/acceleo/mtl/3.0" xmlns:ocl.ecore="http://www.eclipse.org/ocl/1.1.0/Ecore">
+  <mtl:Module name="oclAsSet" nsURI="resources::evaluation::oclAsSet::oclAsSet" endHeaderPosition="55">
+    <input>
+      <takesTypesFrom href="http://www.eclipse.org/emf/2002/Ecore#/"/>
+    </input>
+    <ownedModuleElement xsi:type="mtl:Comment">
+      <body startPosition="67" endPosition="73" value=" @main"/>
+    </ownedModuleElement>
+    <ownedModuleElement xsi:type="mtl:Template" name="testOclAsSet" visibility="Public">
+      <body xsi:type="mtl:FileBlock" openMode="OverWrite">
+        <body xsi:type="ocl.ecore:IteratorExp" name="collect" eType="/8/Bag(String)">
+          <source xsi:type="ocl.ecore:OperationCallExp" eType="/8/Set(EClass)">
+            <source xsi:type="ocl.ecore:VariableExp" name="anEClass" referredVariable="/0/testOclAsSet/anEClass">
+              <eType xsi:type="ecore:EClass" href="http://www.eclipse.org/emf/2002/Ecore#//EClass"/>
+            </source>
+            <referredOperation xsi:type="ecore:EOperation" href="http://www.eclipse.org/ocl/1.1.0/oclstdlib.ecore#/0/OclAny_Class/oclAsSet"/>
+          </source>
+          <body xsi:type="ocl.ecore:PropertyCallExp">
+            <eType xsi:type="ocl.ecore:PrimitiveType" href="http://www.eclipse.org/ocl/1.1.0/oclstdlib.ecore#/0/String"/>
+            <source xsi:type="ocl.ecore:VariableExp" name="temp1" referredVariable="/0/testOclAsSet/%/collect/temp1">
+              <eType xsi:type="ecore:EClass" href="http://www.eclipse.org/emf/2002/Ecore#//EClass"/>
+            </source>
+            <referredProperty xsi:type="ecore:EAttribute" href="http://www.eclipse.org/emf/2002/Ecore#//ENamedElement/name"/>
+          </body>
+          <iterator xsi:type="ocl.ecore:Variable" name="temp1">
+            <eType xsi:type="ecore:EClass" href="http://www.eclipse.org/emf/2002/Ecore#//EClass"/>
+          </iterator>
+        </body>
+        <body xsi:type="ocl.ecore:StringLiteralExp" stringSymbol="&#xA;"/>
+        <fileUrl xsi:type="ocl.ecore:StringLiteralExp" stringSymbol="testOclAsSet">
+          <eType xsi:type="ocl.ecore:PrimitiveType" href="http://www.eclipse.org/ocl/1.1.0/oclstdlib.ecore#/0/String"/>
+        </fileUrl>
+        <charset xsi:type="ocl.ecore:StringLiteralExp" stringSymbol="Cp1252">
+          <eType xsi:type="ocl.ecore:PrimitiveType" href="http://www.eclipse.org/ocl/1.1.0/oclstdlib.ecore#/0/String"/>
+        </charset>
+      </body>
+      <parameter name="anEClass">
+        <eType xsi:type="ecore:EClass" href="http://www.eclipse.org/emf/2002/Ecore#//EClass"/>
+      </parameter>
+    </ownedModuleElement>
+  </mtl:Module>
+  <ecore:EPackage name="additions">
+    <eClassifiers xsi:type="ecore:EClass" name="oclstdlib_String_Class">
+      <eAnnotations source="http://www.eclipse.org/ocl/1.1.0/OCL">
+        <references href="http://www.eclipse.org/ocl/1.1.0/oclstdlib.ecore#/0/String"/>
+      </eAnnotations>
+    </eClassifiers>
+    <eClassifiers xsi:type="ecore:EClass" name="oclstdlib_Integer_Class">
+      <eAnnotations source="http://www.eclipse.org/ocl/1.1.0/OCL">
+        <references href="http://www.eclipse.org/ocl/1.1.0/oclstdlib.ecore#/0/Integer"/>
+      </eAnnotations>
+    </eClassifiers>
+    <eClassifiers xsi:type="ecore:EClass" name="oclstdlib_Real_Class">
+      <eAnnotations source="http://www.eclipse.org/ocl/1.1.0/OCL">
+        <references href="http://www.eclipse.org/ocl/1.1.0/oclstdlib.ecore#/0/Real"/>
+      </eAnnotations>
+    </eClassifiers>
+    <eClassifiers xsi:type="ecore:EClass" name="ecore_EObject_Class">
+      <eAnnotations source="http://www.eclipse.org/ocl/1.1.0/OCL">
+        <references href="http://www.eclipse.org/emf/2002/Ecore#//EObject"/>
+      </eAnnotations>
+      <eOperations name="testOclAsSet">
+        <eAnnotations source="http://www.eclipse.org/ocl/1.1.0/OCL">
+          <contents xsi:type="ocl.ecore:Constraint"/>
+        </eAnnotations>
+        <eAnnotations source="MTL" references="/0/testOclAsSet"/>
+        <eType xsi:type="ocl.ecore:PrimitiveType" href="http://www.eclipse.org/ocl/1.1.0/oclstdlib.ecore#/0/String"/>
+        <eParameters name="anEClass">
+          <eType xsi:type="ecore:EClass" href="http://www.eclipse.org/emf/2002/Ecore#//EClass"/>
+        </eParameters>
+      </eOperations>
+    </eClassifiers>
+    <eClassifiers xsi:type="ecore:EClass" name="oclstdlib_OclAny_Class">
+      <eAnnotations source="http://www.eclipse.org/ocl/1.1.0/OCL">
+        <references href="http://www.eclipse.org/ocl/1.1.0/oclstdlib.ecore#/0/OclAny"/>
+      </eAnnotations>
+    </eClassifiers>
+    <eClassifiers xsi:type="ecore:EClass" name="oclstdlib_Collection(T)_Class">
+      <eAnnotations source="http://www.eclipse.org/ocl/1.1.0/OCL">
+        <references href="http://www.eclipse.org/ocl/1.1.0/oclstdlib.ecore#/0/Collection(T)"/>
+      </eAnnotations>
+    </eClassifiers>
+    <eClassifiers xsi:type="ecore:EClass" name="oclstdlib_Sequence(T)_Class">
+      <eAnnotations source="http://www.eclipse.org/ocl/1.1.0/OCL">
+        <references href="http://www.eclipse.org/ocl/1.1.0/oclstdlib.ecore#/0/Sequence(T)"/>
+      </eAnnotations>
+    </eClassifiers>
+    <eClassifiers xsi:type="ecore:EClass" name="oclstdlib_OrderedSet(T)_Class">
+      <eAnnotations source="http://www.eclipse.org/ocl/1.1.0/OCL">
+        <references href="http://www.eclipse.org/ocl/1.1.0/oclstdlib.ecore#/0/OrderedSet(T)"/>
+      </eAnnotations>
+    </eClassifiers>
+    <eClassifiers xsi:type="ecore:EClass" name="ecore_EClass_Class">
+      <eAnnotations source="http://www.eclipse.org/ocl/1.1.0/OCL">
+        <references href="http://www.eclipse.org/emf/2002/Ecore#//EClass"/>
+      </eAnnotations>
+    </eClassifiers>
+  </ecore:EPackage>
+  <ocl.ecore:Variable name="self">
+    <eType xsi:type="ecore:EClass" href="http://www.eclipse.org/emf/2002/Ecore#//EObject"/>
+  </ocl.ecore:Variable>
+  <ocl.ecore:Variable name="self">
+    <eType xsi:type="ecore:EClass" href="http://www.eclipse.org/emf/2002/Ecore#//EClass"/>
+  </ocl.ecore:Variable>
+  <ocl.ecore:Variable name="self">
+    <eType xsi:type="ocl.ecore:PrimitiveType" href="http://www.eclipse.org/ocl/1.1.0/oclstdlib.ecore#/0/String"/>
+  </ocl.ecore:Variable>
+  <ocl.ecore:Variable name="self">
+    <eType xsi:type="ecore:EClass" href="http://www.eclipse.org/emf/2002/Ecore#//EClass"/>
+  </ocl.ecore:Variable>
+  <ocl.ecore:Variable name="self">
+    <eType xsi:type="ecore:EClass" href="http://www.eclipse.org/emf/2002/Ecore#//EClass"/>
+  </ocl.ecore:Variable>
+  <ocl.ecore:Variable name="self">
+    <eType xsi:type="ecore:EClass" href="http://www.eclipse.org/emf/2002/Ecore#//EClass"/>
+  </ocl.ecore:Variable>
+  <ecore:EPackage name="collections">
+    <eClassifiers xsi:type="ocl.ecore:SetType" name="Set(EClass)" instanceClassName="java.util.Set">
+      <elementType xsi:type="ecore:EClass" href="http://www.eclipse.org/emf/2002/Ecore#//EClass"/>
+    </eClassifiers>
+    <eClassifiers xsi:type="ocl.ecore:BagType" name="Bag(String)" instanceClassName="org.eclipse.ocl.util.Bag">
+      <elementType xsi:type="ocl.ecore:PrimitiveType" href="http://www.eclipse.org/ocl/1.1.0/oclstdlib.ecore#/0/String"/>
+    </eClassifiers>
+  </ecore:EPackage>
+  <ocl.ecore:Variable name="self">
+    <eType xsi:type="ecore:EClass" href="http://www.eclipse.org/emf/2002/Ecore#//EClass"/>
+  </ocl.ecore:Variable>
+  <ocl.ecore:Variable name="self">
+    <eType xsi:type="ecore:EClass" href="http://www.eclipse.org/emf/2002/Ecore#//EObject"/>
+  </ocl.ecore:Variable>
+  <ecore:EAnnotation source="positions">
+    <eAnnotations source="positions.0" references="/0/%">
+      <details key="start" value="59"/>
+      <details key="end" value="75"/>
+      <details key="line" value="0"/>
+    </eAnnotations>
+    <eAnnotations source="positions.1" references="/0/testOclAsSet">
+      <details key="start" value="76"/>
+      <details key="end" value="214"/>
+      <details key="line" value="4"/>
+    </eAnnotations>
+    <eAnnotations source="positions.2" references="/0/testOclAsSet/%">
+      <details key="start" value="126"/>
+      <details key="end" value="202"/>
+      <details key="line" value="5"/>
+    </eAnnotations>
+    <eAnnotations source="positions.3" references="/0/testOclAsSet/%/collect">
+      <details key="start" value="168"/>
+      <details key="end" value="192"/>
+      <details key="line" value="0"/>
+    </eAnnotations>
+    <eAnnotations source="positions.4" references="/0/testOclAsSet/%/collect/%">
+      <details key="start" value="168"/>
+      <details key="end" value="187"/>
+      <details key="line" value="0"/>
+    </eAnnotations>
+    <eAnnotations source="positions.5" references="/0/testOclAsSet/%/collect/%/anEClass">
+      <details key="start" value="168"/>
+      <details key="end" value="176"/>
+      <details key="line" value="0"/>
+    </eAnnotations>
+    <eAnnotations source="positions.6" references="/0/testOclAsSet/%/collect/%.1">
+      <details key="start" value="188"/>
+      <details key="end" value="192"/>
+      <details key="line" value="0"/>
+    </eAnnotations>
+    <eAnnotations source="positions.7" references="/0/testOclAsSet/%/collect/%.1/temp1">
+      <details key="start" value="-1"/>
+      <details key="end" value="-1"/>
+      <details key="line" value="0"/>
+    </eAnnotations>
+    <eAnnotations source="positions.8" references="/0/testOclAsSet/%/collect/temp1">
+      <details key="start" value="-1"/>
+      <details key="end" value="-1"/>
+      <details key="line" value="0"/>
+    </eAnnotations>
+    <eAnnotations source="positions.9" references="/0/testOclAsSet/%/%">
+      <details key="start" value="194"/>
+      <details key="end" value="195"/>
+      <details key="line" value="7"/>
+    </eAnnotations>
+    <eAnnotations source="positions.10" references="/0/testOclAsSet/%/%.1">
+      <details key="start" value="133"/>
+      <details key="end" value="147"/>
+      <details key="line" value="0"/>
+    </eAnnotations>
+    <eAnnotations source="positions.11" references="/0/testOclAsSet/%/%.2">
+      <details key="start" value="156"/>
+      <details key="end" value="164"/>
+      <details key="line" value="0"/>
+    </eAnnotations>
+    <eAnnotations source="positions.12" references="/0/testOclAsSet/anEClass">
+      <details key="start" value="106"/>
+      <details key="end" value="123"/>
+      <details key="line" value="4"/>
+    </eAnnotations>
+  </ecore:EAnnotation>
+</xmi:XMI>
diff --git a/tests/org.eclipse.acceleo.aql.migration.tests/resources/evaluation/oclAsSet/oclAsSet.mtl b/tests/org.eclipse.acceleo.aql.migration.tests/resources/evaluation/oclAsSet/oclAsSet.mtl
new file mode 100644
index 0000000..563b1ce
--- /dev/null
+++ b/tests/org.eclipse.acceleo.aql.migration.tests/resources/evaluation/oclAsSet/oclAsSet.mtl
@@ -0,0 +1,8 @@
+[module oclAsSet('http://www.eclipse.org/emf/2002/Ecore')/]
+
+[comment @main/]
+[template public testOclAsSet(anEClass : ecore::EClass)]
+  [file ('testOclAsSet', overwrite, 'Cp1252')]
+    [anEClass->asSet()->asSequence()->collect(temp1 | temp1.name)/]
+  [/file]
+[/template]
\ No newline at end of file
diff --git a/tests/org.eclipse.acceleo.aql.migration.tests/resources/evaluation/oclAsSet/oclAsSet.xmi b/tests/org.eclipse.acceleo.aql.migration.tests/resources/evaluation/oclAsSet/oclAsSet.xmi
new file mode 100644
index 0000000..ef3f70d
--- /dev/null
+++ b/tests/org.eclipse.acceleo.aql.migration.tests/resources/evaluation/oclAsSet/oclAsSet.xmi
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ecore:EPackage xmi:version="2.0"
+    xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+    xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" name="target"
+    nsURI="target" nsPrefix="target">
+  <eClassifiers xsi:type="ecore:EClass" name="ClasseA" eSuperTypes="#//AbstractClass">
+    <eOperations name="computeSomething" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EJavaObject">
+      <eParameters name="doubleParam" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EDouble"/>
+      <eParameters name="anObject" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EJavaObject"/>
+      <eParameters name="someParam" upperBound="-1" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EJavaObject"/>
+    </eOperations>
+    <eStructuralFeatures xsi:type="ecore:EAttribute" name="anAttribute" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
+    <eStructuralFeatures xsi:type="ecore:EAttribute" name="multivaluedAttribute" upperBound="-1"
+        eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean"/>
+    <eStructuralFeatures xsi:type="ecore:EReference" name="aReferenceFromA" eType="ecore:EClass http://www.eclipse.org/emf/2002/Ecore#//EObject"/>
+    <eStructuralFeatures xsi:type="ecore:EReference" name="multivaluedReference" upperBound="-1"
+        eType="ecore:EClass http://www.eclipse.org/emf/2002/Ecore#//EObject"/>
+  </eClassifiers>
+  <eClassifiers xsi:type="ecore:EClass" name="ClasseB" eSuperTypes="#//AbstractClass">
+    <eStructuralFeatures xsi:type="ecore:EAttribute" name="anAttributeOfB" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EChar"/>
+    <eStructuralFeatures xsi:type="ecore:EAttribute" name="anotherAttributeOfB" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//ELongObject"/>
+    <eStructuralFeatures xsi:type="ecore:EReference" name="aReferenceFromB" eType="#//ClasseA"/>
+  </eClassifiers>
+  <eClassifiers xsi:type="ecore:EClass" name="AbstractClass" abstract="true">
+    <eOperations name="anOperationFromAbstractSuperClass" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
+  </eClassifiers>
+</ecore:EPackage>