Permalink
Browse files

[#89]: Relax input spec grammar by using Xtext options

Finished the mapping grammar

Task-Url: http://github.com/roberthilbrich/assist-public/issues/89
  • Loading branch information...
RobertHilbrich committed Oct 10, 2018
1 parent e04d2c6 commit eb14e8fca002c11204b7d0d979f3c8338ea08fd0
@@ -146,7 +146,7 @@ Task:
(',' restrictMappingToHardwareElements+=[HardwareElement|QualifiedName])*
'}' ';'
)
)
)*
'}';
/* General Feature Requirements - see #38 */
@@ -85,7 +85,7 @@ class CustomPropertiesTests extends AbstractMappingTest {
/* Lets check these properties for the cores */
for (core : assistModel.allCores) {
Assert.assertEquals(assistModel.allCores.indexOf(core), core.getCustomIntProperty("MyIntProperty"))
Assert.assertEquals(core.name, core.getCustomIntProperty("MyStringProperty"))
Assert.assertEquals(core.name, core.getCustomStringProperty("MyStringProperty"))
}
}
}
@@ -22,9 +22,9 @@ class AssistModel {
int minHypPeriodLength = "-1"
int taskSwitchDelay = "0"
contains Compartment[1..*] compartments
contains Compartment[0..*] compartments
contains Application[1..*] applications
contains Application[0..*] applications
contains DislocalityRelation[0..*] dislocalityRelations
contains ColocalityRelation[0..*] colocalityRelations
@@ -126,7 +126,7 @@
* <!-- end-user-doc -->
* @return the value of the '<em>Compartments</em>' containment reference list.
* @see ch.hilbri.assist.model.ModelPackage#getAssistModel_Compartments()
* @model containment="true" required="true"
* @model containment="true"
* @generated
*/
EList<Compartment> getCompartments();
@@ -142,7 +142,7 @@
* <!-- end-user-doc -->
* @return the value of the '<em>Applications</em>' containment reference list.
* @see ch.hilbri.assist.model.ModelPackage#getAssistModel_Applications()
* @model containment="true" required="true"
* @model containment="true"
* @generated
*/
EList<Application> getApplications();
@@ -3637,8 +3637,8 @@ public void initializePackageContents() {
initEAttribute(getAssistModel_SystemName(), theEcorePackage.getEString(), "systemName", "", 0, 1, AssistModel.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
initEAttribute(getAssistModel_MinHypPeriodLength(), theEcorePackage.getEInt(), "minHypPeriodLength", "-1", 0, 1, AssistModel.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
initEAttribute(getAssistModel_TaskSwitchDelay(), theEcorePackage.getEInt(), "taskSwitchDelay", "0", 0, 1, AssistModel.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
initEReference(getAssistModel_Compartments(), this.getCompartment(), null, "compartments", null, 1, -1, AssistModel.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
initEReference(getAssistModel_Applications(), this.getApplication(), null, "applications", null, 1, -1, AssistModel.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
initEReference(getAssistModel_Compartments(), this.getCompartment(), null, "compartments", null, 0, -1, AssistModel.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
initEReference(getAssistModel_Applications(), this.getApplication(), null, "applications", null, 0, -1, AssistModel.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
initEReference(getAssistModel_DislocalityRelations(), this.getDislocalityRelation(), null, "dislocalityRelations", null, 0, -1, AssistModel.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
initEReference(getAssistModel_ColocalityRelations(), this.getColocalityRelation(), null, "colocalityRelations", null, 0, -1, AssistModel.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
initEReference(getAssistModel_DissimilarityRelations(), this.getDissimilarityRelation(), null, "dissimilarityRelations", null, 0, -1, AssistModel.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);

0 comments on commit eb14e8f

Please sign in to comment.