Commit f87416af authored by Reiner Jung's avatar Reiner Jung

Initial generator contribution finished. Because of some strange

problems with the MAMBA jar, I had to incorporate the MAMBA meta-model
smm.ecore into the project. This duplication must be fixed in future,
but for now it is a working solution.
parent c0a74701
...@@ -77,72 +77,72 @@ T__79=79 ...@@ -77,72 +77,72 @@ T__79=79
T__78=78 T__78=78
T__77=77 T__77=77
'deci'=30 'deci'=30
'#'=74 '#'=78
'count'=62
'>='=12 '>='=12
'count'=58
'=='=16 '=='=16
'/'=22 '/'=22
'model'=50 'model'=54
'tera'=34 'tera'=34
'giga'=33 'giga'=33
'measure'=55 'measure'=59
'exists'=69 'exists'=73
'>'=14 '>'=14
'||'=76 '||'=80
'&&'=77 '&&'=81
'forall'=67 'forall'=71
'typedef'=51 'typedef'=55
'+'=18 '+'=18
'.'=71 '.'=75
'gram'=38 'gram'=38
'library'=48 'library'=52
'import'=49 'import'=53
'isKindOf'=47 'isKindOf'=51
'else'=66 'else'=70
'centi'=29 'centi'=29
'{'=63 '{'=67
'sum'=40 'sum'=40
'def'=64
'pico'=25 'pico'=25
'def'=60
'kilo'=31 'kilo'=31
'standard-deviation'=42 'standard-deviation'=42
'floor'=79 'floor'=47
'if'=65 'if'=69
'('=52 '('=56
':'=56 ':'=60
'-'=19 '-'=19
'**'=21 '**'=21
','=61
'second'=37 'second'=37
','=57 'in'=74
'ceil'=80 'select'=63
'in'=70 'ceil'=48
'select'=59
'liter'=39 'liter'=39
']'=73 ']'=77
'milli'=28 'milli'=28
'average'=41 'average'=41
'!'=24 '!'=24
'|'=68 '|'=72
'sd'=43 'sd'=43
'meter'=36 'meter'=36
'nano'=26 'nano'=26
'null'=75 'null'=79
'peta'=35 'peta'=35
'micro'=27 'micro'=27
'::'=54 '::'=58
'collect'=61 'collect'=65
')'=53 ')'=57
'mega'=32 'mega'=32
'%'=23 '%'=23
'max'=44 'max'=44
'}'=64 '}'=68
'size'=81 'size'=49
'abs'=78 'abs'=46
'<='=13 '<='=13
'scope'=62 'scope'=66
'!='=17 '!='=17
'<'=15 '<'=15
'isTypeOf'=46 'isTypeOf'=50
'['=72 '['=76
'*'=20 '*'=20
'min'=45 'min'=45
...@@ -3,8 +3,9 @@ ...@@ -3,8 +3,9 @@
<classpathentry kind="src" path="src"/> <classpathentry kind="src" path="src"/>
<classpathentry kind="src" path="src-gen"/> <classpathentry kind="src" path="src-gen"/>
<classpathentry kind="src" path="xtend-gen"/> <classpathentry kind="src" path="xtend-gen"/>
<classpathentry kind="src" path="model"/>
<classpathentry kind="src" path="model-gen"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/> <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/> <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="lib" path="lib/mamba.jar"/>
<classpathentry kind="output" path="bin"/> <classpathentry kind="output" path="bin"/>
</classpath> </classpath>
...@@ -32,6 +32,7 @@ Export-Package: de.cau.cs.se.measure.definition.language, ...@@ -32,6 +32,7 @@ Export-Package: de.cau.cs.se.measure.definition.language,
de.cau.cs.se.measure.definition.language.scoping, de.cau.cs.se.measure.definition.language.scoping,
de.cau.cs.se.measure.definition.language.generator, de.cau.cs.se.measure.definition.language.generator,
de.cau.cs.se.measure.definition.language.formatting de.cau.cs.se.measure.definition.language.formatting
Bundle-ClassPath: lib/mamba.jar, Bundle-ClassPath: lib/mamba-core-1.0.0-SNAPSHOT.jar,
. .
...@@ -4,5 +4,5 @@ source.. = src/,\ ...@@ -4,5 +4,5 @@ source.. = src/,\
bin.includes = META-INF/,\ bin.includes = META-INF/,\
.,\ .,\
plugin.xml,\ plugin.xml,\
lib/mamba.jar lib/mamba-core-1.0.0-SNAPSHOT.jar
/**
*/
package org.omg.adm.smm.core;
import org.omg.adm.smm.measure.AbstractMeasureElement;
/**
* <!-- begin-user-doc -->
* A representation of the model object '<em><b>Category Relationship</b></em>'.
* <!-- end-user-doc -->
*
* <p>
* The following features are supported:
* <ul>
* <li>{@link org.omg.adm.smm.core.CategoryRelationship#getFrom <em>From</em>}</li>
* <li>{@link org.omg.adm.smm.core.CategoryRelationship#getTo <em>To</em>}</li>
* </ul>
* </p>
*
* @see org.omg.adm.smm.core.CorePackage#getCategoryRelationship()
* @model
* @generated
*/
public interface CategoryRelationship extends SmmRelationship {
/**
* Returns the value of the '<em><b>From</b></em>' reference.
* <!-- begin-user-doc -->
* <p>
* If the meaning of the '<em>From</em>' reference isn't clear,
* there really should be more of a description here...
* </p>
* <!-- end-user-doc -->
* @return the value of the '<em>From</em>' reference.
* @see #setFrom(MeasureCategory)
* @see org.omg.adm.smm.core.CorePackage#getCategoryRelationship_From()
* @model required="true"
* @generated
*/
MeasureCategory getFrom();
/**
* Sets the value of the '{@link org.omg.adm.smm.core.CategoryRelationship#getFrom <em>From</em>}' reference.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @param value the new value of the '<em>From</em>' reference.
* @see #getFrom()
* @generated
*/
void setFrom(MeasureCategory value);
/**
* Returns the value of the '<em><b>To</b></em>' reference.
* <!-- begin-user-doc -->
* <p>
* If the meaning of the '<em>To</em>' reference isn't clear,
* there really should be more of a description here...
* </p>
* <!-- end-user-doc -->
* @return the value of the '<em>To</em>' reference.
* @see #setTo(AbstractMeasureElement)
* @see org.omg.adm.smm.core.CorePackage#getCategoryRelationship_To()
* @model required="true"
* @generated
*/
AbstractMeasureElement getTo();
/**
* Sets the value of the '{@link org.omg.adm.smm.core.CategoryRelationship#getTo <em>To</em>}' reference.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @param value the new value of the '<em>To</em>' reference.
* @see #getTo()
* @generated
*/
void setTo(AbstractMeasureElement value);
} // CategoryRelationship
/**
*/
package org.omg.adm.smm.core;
import org.eclipse.emf.ecore.EFactory;
/**
* <!-- begin-user-doc -->
* The <b>Factory</b> for the model.
* It provides a create method for each non-abstract class of the model.
* <!-- end-user-doc -->
* @see org.omg.adm.smm.core.CorePackage
* @generated
*/
public interface CoreFactory extends EFactory {
/**
* The singleton instance of the factory.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
CoreFactory eINSTANCE = org.omg.adm.smm.core.impl.CoreFactoryImpl.init();
/**
* Returns a new object of class '<em>Smm Model</em>'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return a new object of class '<em>Smm Model</em>'.
* @generated
*/
SmmModel createSmmModel();
/**
* Returns a new object of class '<em>Measure Library</em>'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return a new object of class '<em>Measure Library</em>'.
* @generated
*/
MeasureLibrary createMeasureLibrary();
/**
* Returns a new object of class '<em>Measure Category</em>'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return a new object of class '<em>Measure Category</em>'.
* @generated
*/
MeasureCategory createMeasureCategory();
/**
* Returns a new object of class '<em>Category Relationship</em>'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return a new object of class '<em>Category Relationship</em>'.
* @generated
*/
CategoryRelationship createCategoryRelationship();
/**
* Returns the package supported by this factory.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the package supported by this factory.
* @generated
*/
CorePackage getCorePackage();
} //CoreFactory
/**
*/
package org.omg.adm.smm.core;
import org.eclipse.emf.common.util.EList;
import org.omg.adm.smm.measure.AbstractMeasureElement;
import org.omg.adm.smm.measure.Measure;
/**
* <!-- begin-user-doc -->
* A representation of the model object '<em><b>Measure Category</b></em>'.
* <!-- end-user-doc -->
*
* <p>
* The following features are supported:
* <ul>
* <li>{@link org.omg.adm.smm.core.MeasureCategory#getCategory <em>Category</em>}</li>
* <li>{@link org.omg.adm.smm.core.MeasureCategory#getCategoryElement <em>Category Element</em>}</li>
* <li>{@link org.omg.adm.smm.core.MeasureCategory#getCategoryMeasure <em>Category Measure</em>}</li>
* </ul>
* </p>
*
* @see org.omg.adm.smm.core.CorePackage#getMeasureCategory()
* @model
* @generated
*/
public interface MeasureCategory extends AbstractMeasureElement {
/**
* Returns the value of the '<em><b>Category</b></em>' reference list.
* The list contents are of type {@link org.omg.adm.smm.core.MeasureCategory}.
* <!-- begin-user-doc -->
* <p>
* If the meaning of the '<em>Category</em>' reference list isn't clear,
* there really should be more of a description here...
* </p>
* <!-- end-user-doc -->
* @return the value of the '<em>Category</em>' reference list.
* @see org.omg.adm.smm.core.CorePackage#getMeasureCategory_Category()
* @model
* @generated
*/
EList<MeasureCategory> getCategory();
/**
* Returns the value of the '<em><b>Category Element</b></em>' reference list.
* The list contents are of type {@link org.omg.adm.smm.core.MeasureCategory}.
* <!-- begin-user-doc -->
* <p>
* If the meaning of the '<em>Category Element</em>' reference list isn't clear,
* there really should be more of a description here...
* </p>
* <!-- end-user-doc -->
* @return the value of the '<em>Category Element</em>' reference list.
* @see org.omg.adm.smm.core.CorePackage#getMeasureCategory_CategoryElement()
* @model
* @generated
*/
EList<MeasureCategory> getCategoryElement();
/**
* Returns the value of the '<em><b>Category Measure</b></em>' reference list.
* The list contents are of type {@link org.omg.adm.smm.measure.Measure}.
* <!-- begin-user-doc -->
* <p>
* If the meaning of the '<em>Category Measure</em>' reference list isn't clear,
* there really should be more of a description here...
* </p>
* <!-- end-user-doc -->
* @return the value of the '<em>Category Measure</em>' reference list.
* @see org.omg.adm.smm.core.CorePackage#getMeasureCategory_CategoryMeasure()
* @model
* @generated
*/
EList<Measure> getCategoryMeasure();
} // MeasureCategory
/**
*/
package org.omg.adm.smm.core;
import org.eclipse.emf.common.util.EList;
import org.omg.adm.smm.measure.AbstractMeasureElement;
/**
* <!-- begin-user-doc -->
* A representation of the model object '<em><b>Measure Library</b></em>'.
* <!-- end-user-doc -->
*
* <p>
* The following features are supported:
* <ul>
* <li>{@link org.omg.adm.smm.core.MeasureLibrary#getMeasureElements <em>Measure Elements</em>}</li>
* <li>{@link org.omg.adm.smm.core.MeasureLibrary#getCategoryRelationships <em>Category Relationships</em>}</li>
* </ul>
* </p>
*
* @see org.omg.adm.smm.core.CorePackage#getMeasureLibrary()
* @model
* @generated
*/
public interface MeasureLibrary extends SmmElement {
/**
* Returns the value of the '<em><b>Measure Elements</b></em>' containment reference list.
* The list contents are of type {@link org.omg.adm.smm.measure.AbstractMeasureElement}.
* <!-- begin-user-doc -->
* <p>
* If the meaning of the '<em>Measure Elements</em>' containment reference list isn't clear,
* there really should be more of a description here...
* </p>
* <!-- end-user-doc -->
* @return the value of the '<em>Measure Elements</em>' containment reference list.
* @see org.omg.adm.smm.core.CorePackage#getMeasureLibrary_MeasureElements()
* @model containment="true"
* @generated
*/
EList<AbstractMeasureElement> getMeasureElements();
/**
* Returns the value of the '<em><b>Category Relationships</b></em>' containment reference list.
* The list contents are of type {@link org.omg.adm.smm.core.CategoryRelationship}.
* <!-- begin-user-doc -->
* <p>
* If the meaning of the '<em>Category Relationships</em>' containment reference list isn't clear,
* there really should be more of a description here...
* </p>
* <!-- end-user-doc -->
* @return the value of the '<em>Category Relationships</em>' containment reference list.
* @see org.omg.adm.smm.core.CorePackage#getMeasureLibrary_CategoryRelationships()
* @model containment="true"
* @generated
*/
EList<CategoryRelationship> getCategoryRelationships();
} // MeasureLibrary
/**
*/
package org.omg.adm.smm.core;
import org.eclipse.emf.common.util.EList;
import org.eclipse.emf.ecore.EObject;
import org.omg.adm.smm.extensions.Annotation;
import org.omg.adm.smm.extensions.Attribute;
/**
* <!-- begin-user-doc -->
* A representation of the model object '<em><b>Smm Element</b></em>'.
* <!-- end-user-doc -->
*
* <p>
* The following features are supported:
* <ul>
* <li>{@link org.omg.adm.smm.core.SmmElement#getDescription <em>Description</em>}</li>
* <li>{@link org.omg.adm.smm.core.SmmElement#getName <em>Name</em>}</li>
* <li>{@link org.omg.adm.smm.core.SmmElement#getShortDescription <em>Short Description</em>}</li>
* <li>{@link org.omg.adm.smm.core.SmmElement#getAttribute <em>Attribute</em>}</li>
* <li>{@link org.omg.adm.smm.core.SmmElement#getAnnotations <em>Annotations</em>}</li>
* </ul>
* </p>
*
* @see org.omg.adm.smm.core.CorePackage#getSmmElement()
* @model abstract="true"
* @generated
*/
public interface SmmElement extends EObject {
/**
* Returns the value of the '<em><b>Description</b></em>' attribute.
* <!-- begin-user-doc -->
* <p>
* If the meaning of the '<em>Description</em>' attribute isn't clear,
* there really should be more of a description here...
* </p>
* <!-- end-user-doc -->
* @return the value of the '<em>Description</em>' attribute.
* @see #setDescription(String)
* @see org.omg.adm.smm.core.CorePackage#getSmmElement_Description()
* @model
* @generated
*/
String getDescription();
/**
* Sets the value of the '{@link org.omg.adm.smm.core.SmmElement#getDescription <em>Description</em>}' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @param value the new value of the '<em>Description</em>' attribute.
* @see #getDescription()
* @generated
*/
void setDescription(String value);
/**
* Returns the value of the '<em><b>Name</b></em>' attribute.
* <!-- begin-user-doc -->
* <p>
* If the meaning of the '<em>Name</em>' attribute isn't clear,
* there really should be more of a description here...
* </p>
* <!-- end-user-doc -->
* @return the value of the '<em>Name</em>' attribute.
* @see #setName(String)
* @see org.omg.adm.smm.core.CorePackage#getSmmElement_Name()
* @model
* @generated
*/
String getName();
/**
* Sets the value of the '{@link org.omg.adm.smm.core.SmmElement#getName <em>Name</em>}' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @param value the new value of the '<em>Name</em>' attribute.
* @see #getName()
* @generated
*/
void setName(String value);
/**
* Returns the value of the '<em><b>Short Description</b></em>' attribute.
* <!-- begin-user-doc -->
* <p>