Commit f52f60cc authored by Johannes Eder's avatar Johannes Eder
Browse files

test for new dsl to smt transformation

refs 2914
parent bfca7359
package org.fortiss.af3.exploration.ui;
/*--------------------------------------------------------------------------+
$Id: codetemplates.xml 1 2011-01-01 00:00:01Z hoelzl $
| |
| Copyright 2016 ForTISS GmbH |
| |
| Licensed under the Apache License, Version 2.0 (the "License"); |
| you may not use this file except in compliance with the License. |
| You may obtain a copy of the License at |
| |
| http://www.apache.org/licenses/LICENSE-2.0 |
| |
| Unless required by applicable law or agreed to in writing, software |
| distributed under the License is distributed on an "AS IS" BASIS, |
| WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| See the License for the specific language governing permissions and |
| limitations under the License. |
+--------------------------------------------------------------------------*/
import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.List;
import javax.activation.UnsupportedDataTypeException;
import org.eclipse.emf.common.util.EList;
import org.fortiss.af3.component.model.Component;
import org.fortiss.af3.component.model.ComponentArchitecture;
import org.fortiss.af3.component.model.annotation.MemoryRequirement;
import org.fortiss.af3.exploration.dsl_v2.model.arithmetic.ArithmeticFactory;
import org.fortiss.af3.exploration.dsl_v2.model.arithmetic.ArithmeticLiteral;
import org.fortiss.af3.exploration.dsl_v2.model.arithmetic.Minus;
import org.fortiss.af3.exploration.dsl_v2.model.arithmetic.ModelElementPropertyLiteral;
import org.fortiss.af3.exploration.dsl_v2.model.arithmetic.Sum;
import org.fortiss.af3.exploration.dsl_v2.model.booleanp.BooleanpFactory;
import org.fortiss.af3.exploration.dsl_v2.model.booleanp.Exists;
import org.fortiss.af3.exploration.dsl_v2.model.booleanp.ForAll;
import org.fortiss.af3.exploration.dsl_v2.model.booleanp.allocation.Allocation;
import org.fortiss.af3.exploration.dsl_v2.model.booleanp.allocation.AllocationFactory;
import org.fortiss.af3.exploration.dsl_v2.model.booleanp.comparison.ComparisonFactory;
import org.fortiss.af3.exploration.dsl_v2.model.booleanp.comparison.LessEqual;
import org.fortiss.af3.exploration.dsl_v2.model.expression.ExpressionFactory;
import org.fortiss.af3.exploration.dsl_v2.model.expression.ModelElementLiteral;
import org.fortiss.af3.exploration.dsl_v2.model.expression.Set;
import org.fortiss.af3.exploration.dsl_v2.model.function.FunctionFactory;
import org.fortiss.af3.exploration.dsl_v2.model.function.IFunction;
import org.fortiss.af3.exploration.dsl_v2.model.function.Minimize;
import org.fortiss.af3.exploration.smt.AF3ExplorationSMTActivator;
import org.fortiss.af3.exploration.smt.modeltransformation.DSLToSMT2;
import org.fortiss.af3.platform.model.ExecutionUnit;
import org.fortiss.af3.platform.model.PlatformArchitecture;
import org.fortiss.af3.platform.model.annotation.HardwareCost;
import org.fortiss.af3.platform.model.annotation.MemoryPerNode;
import org.fortiss.af3.project.model.FileProject;
import org.fortiss.af3.project.utils.ProjectUtils;
import org.fortiss.tooling.base.model.element.IModelElement;
import org.fortiss.tooling.base.utils.AnnotationUtils;
import org.fortiss.tooling.kernel.model.INamedElement;
import org.fortiss.tooling.kernel.utils.EcoreUtils;
import org.junit.Test;
import com.microsoft.z3.BoolExpr;
import com.microsoft.z3.Context;
import com.microsoft.z3.EnumSort;
import com.microsoft.z3.Expr;
import com.microsoft.z3.FuncDecl;
import com.microsoft.z3.Optimize;
import com.microsoft.z3.Params;
import com.microsoft.z3.Quantifier;
import com.microsoft.z3.Sort;
import com.microsoft.z3.Symbol;
import com.microsoft.z3.Z3Exception;
import com.microsoft.z3.Z3Type;
import com.microsoft.z3.Z3javaAPIWrapper;
/**
* Class to test the model transformation from DSL to SMT.
*
* @author eder
* @author $Author: hoelzl $
* @version $Rev: 18709 $
* @ConQAT.Rating RED Hash:
*/
public class DSLtoSMT2Test {
/** Z3 context. */
private Context context = new Context();
/** For all expression. */
private List<ForAll> exprToSolve = new ArrayList<>();
/** The solver object belonging to the context. */
private Optimize solver;
/** Minimize function. */
private IFunction minimize;
private Minimize minimize2;
/** Test. */
@Test
public void test() {
Params params = context.mkParams();
params.add("priority", "pareto");
solver = context.mkOptimize();
solver.setParameters(params);
try {
createExp();
// quantifierTest();
DSLToSMT2 currentRun = new DSLToSMT2();
for(ForAll fa : exprToSolve) {
BoolExpr expr = (BoolExpr)currentRun.toSMT(context, fa);
solver.Add(expr);
}
// ArithExpr toMinimize = currentRun.transfrom(context, minimize.getArgs());
// System.out.println(minimize.getArgs());
// ArithExpr toMinimize2 = currentRun.transfrom(context, minimize2.getArgs());
// solver.MkMinimize(toMinimize);
// solver.MkMinimize(toMinimize2);
// solver.Add((BoolExpr)Z3javaAPIWrapper.createFunction(context, "test", Z3Type.BOOL));
} catch(Z3Exception e) {
e.printStackTrace();
} catch(UnsupportedDataTypeException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
System.out.println();
// System.out.println(forAll.toString());
// System.out.println(minimize.getArgs().toString());
System.out.println();
System.out.println(solver);
System.out.println();
// Status check = solver.Check();
// for(int i = 0; i < 2; i++) {
System.out.println("\n\n\n");
System.out.println(solver.Check());
System.out.println(solver.getModel());
System.out.println("\n\n\n");
// }
// System.out.println(solver.getUnsatCore());
// assertEquals(Status.SATISFIABLE, check);
}
private BoolExpr quantifierTest() {
EnumSort sort = context.mkEnumSort("TestType", "t1", "t3");
Symbol[] names = new Symbol[] {context.mkSymbol("x")};
Sort[] sorts = new Sort[] {sort};
FuncDecl createFunction =
Z3javaAPIWrapper.createFunction(context, "testFunc", new Sort[] {sort},
context.mkBoolSort());
Expr x = context.mkConst("x", sort);
Expr apply = context.mkApp(createFunction, x);
Quantifier mkForall = context.mkForall(sorts, names, apply, 1, null, null, null, null);
return mkForall;
}
/** Creates a deployment problem using the dsl. */
private void createExp() throws UnsupportedDataTypeException, Z3Exception {
FileProject project =
ProjectUtils.loadProjectFromPlugin(AF3ExplorationSMTActivator.PLUGIN_ID,
"test-data/CONSTRAINTS3.af3_23", true);
EList<ComponentArchitecture> cas =
EcoreUtils.getChildrenWithType(project, ComponentArchitecture.class);
EList<PlatformArchitecture> pas =
EcoreUtils.getChildrenWithType(project, PlatformArchitecture.class);
EList<Component> components = EcoreUtils.getChildrenWithType(cas.get(0), Component.class);
EList<ExecutionUnit> ecus = EcoreUtils.getChildrenWithType(pas.get(0), ExecutionUnit.class);
Set set2 = ExpressionFactory.eINSTANCE.createSet();
set2.setName("Hardware");
Set set1 = ExpressionFactory.eINSTANCE.createSet();
set1.setName("Software");
Set objectiveSumSet = ExpressionFactory.eINSTANCE.createSet();
objectiveSumSet.setName("Hardware");
Set objectivePredicateSet = ExpressionFactory.eINSTANCE.createSet();
objectivePredicateSet.setName("Software");
components.remove(0);// remove root component
Symbol type =
Z3javaAPIWrapper
.createSymbol(context, components.get(0).getClass().getSimpleName());
List<Symbol> symbols = new ArrayList<>();
int i = 0;
for(IModelElement m : components) {
Symbol symbol =
Z3javaAPIWrapper.createSymbol(context, ((INamedElement)m).getName() + i++);
symbols.add(symbol);
}
final Symbol[] array = symbols.toArray(new Symbol[0]);
EnumSort sort = Z3javaAPIWrapper.createEnumSort(context, type, array);
i = 0;
for(Component c : components) {
set1.getEntries().add(c);
objectivePredicateSet.getEntries().add(c);
// component memory constraints
MemoryRequirement annotation =
AnnotationUtils.getAnnotation(c, MemoryRequirement.class);
//
// Expr createFunction =
// Z3javaAPIWrapper.createFunction(context, "Component_" + c.getId() +
// "_MemoryRequirement", Z3Type.INT);
// BoolExpr boolExpr =
// Z3javaAPIWrapper.createEqual(context, createFunction, annotation.getValue()
// .intValue());
// solver.Add(boolExpr);
FuncDecl createFunction =
Z3javaAPIWrapper.createFunction(context, "f_" + "MemoryRequirement" + "_value",
sort, context.mkIntSort());
Expr apply = null;
for(Expr com : sort.getConsts()) {
if(com.toString().equals(c.getName() + i)) {
apply = createFunction.apply(com);
i++;
break;
}
}
BoolExpr boolExpr =
Z3javaAPIWrapper.createEqual(context, apply,
(int)annotation.getLocalMemoryRequirement());
solver.Add(boolExpr);
//
// ArrayList<Expr> allocs = new ArrayList<>();
// // allocation constraints
// for(ExecutionUnit e : ecus) {
// Expr alloc =
// Z3javaAPIWrapper.createFunction(context, "Component_" + c.getId() +
// "_allocation", Z3Type.INT);
// BoolExpr createEqual = Z3javaAPIWrapper.createEqual(context, alloc, e.getId());
// allocs.add(createEqual);
// }
// BoolExpr or = Z3javaAPIWrapper.createOr(context, allocs.toArray(new BoolExpr[0]));
// solver.Add(or);
}
// ArithmeticLiteral cost2 = ArithmeticFactory.eINSTANCE.createArithmeticLiteral();
// cost2.setValue(BigDecimal.ONE);
// Sum objSum2 = ArithmeticFactory.eINSTANCE.createSum();
// Exists existsObjPredicate2 = BooleanpFactory.eINSTANCE.createExists();
// objSum2.setExpression(existsObjPredicate2);
// objSum2.setSet(EcoreUtils.copy(objectiveSumSet));
// objSum2.setTerms(cost2);
// existsObjPredicate2.setSet(EcoreUtils.copy(objectivePredicateSet));
// ModelElementLiteral objLeft2 = ExpressionFactory.eINSTANCE.createModelElementLiteral();
// objLeft2.setSetReference(set1);
// ModelElementLiteral objRight2 = ExpressionFactory.eINSTANCE.createModelElementLiteral();
// objRight2.setSetReference(objectiveSumSet);
// Allocation objAllocation2 = AllocationFactory.eINSTANCE.createAllocation();
// objAllocation2.setLeft(objLeft2);
// objAllocation2.setRight(objRight2);
// existsObjPredicate2.setExpression(objAllocation2);
// minimize2 = FunctionFactory.eINSTANCE.createMinimize();
// minimize2.setArgs(objSum2);
// System.out.println(minimize2.getArgs());
ModelElementPropertyLiteral cost =
ArithmeticFactory.eINSTANCE.createModelElementPropertyLiteral();
cost.setSetReference(objectiveSumSet);
cost.setSpecificationType(HardwareCost.class);
cost.setSetReference(objectiveSumSet);
Sum objSum = ArithmeticFactory.eINSTANCE.createSum();
Exists existsObjPredicate = BooleanpFactory.eINSTANCE.createExists();
objSum.setExpression(existsObjPredicate);
objSum.setSet(objectiveSumSet);
objSum.setTerms(cost);
existsObjPredicate.setSet(objectivePredicateSet);
ModelElementLiteral objLeft = ExpressionFactory.eINSTANCE.createModelElementLiteral();
objLeft.setSetReference(set1);
ModelElementLiteral objRight = ExpressionFactory.eINSTANCE.createModelElementLiteral();
objRight.setSetReference(set2);
Allocation objAllocation = AllocationFactory.eINSTANCE.createAllocation();
objAllocation.setLeft(objLeft);
objAllocation.setRight(objRight);
existsObjPredicate.setExpression(objAllocation);
minimize = FunctionFactory.eINSTANCE.createMinimize();
minimize.setArgs(objSum);
minimize.setArgs(objSum);
// System.out.println(objSum);
int mem = 50;
int costs = 20;
Symbol type2 =
Z3javaAPIWrapper.createSymbol(context, ecus.get(0).getClass().getSimpleName());
List<Symbol> symbols2 = new ArrayList<>();
i = 0;
for(IModelElement m : ecus) {
Symbol symbol =
Z3javaAPIWrapper.createSymbol(context, ((INamedElement)m).getName() + i++);
symbols2.add(symbol);
}
final Symbol[] array2 = symbols2.toArray(new Symbol[0]);
EnumSort sort2 = Z3javaAPIWrapper.createEnumSort(context, type2, array2);
i = 0;
for(ExecutionUnit e : ecus) {
set2.getEntries().add(e);
objectiveSumSet.getEntries().add(e);
// ecu memory constraints
MemoryPerNode annotation = AnnotationUtils.getAnnotation(e, MemoryPerNode.class);
FuncDecl createFunction =
Z3javaAPIWrapper.createFunction(context, "f_" + "MemoryRequirement" + "_value",
sort2, context.mkIntSort());
Expr apply = null;
for(Expr c : sort2.getConsts()) {
if(c.toString().equals(e.getName() + i)) {
apply = createFunction.apply(c);
i++;
break;
}
}
final int memory = 10;// annotation.getMemory() == 50 ? 30 : 20;
BoolExpr boolExpr = Z3javaAPIWrapper.createEqual(context, apply, memory);
solver.Add(boolExpr);
// set2.getEntries().add(e);
// objectiveSumSet.getEntries().add(e);
// // ecu memory constraints
// MemoryPerNode annotation = AnnotationUtils.getAnnotation(e, MemoryPerNode.class);
// Expr createFunction =
// Z3javaAPIWrapper.createFunction(context, e.getName() + "_" + e.getId() +
// "_MemoryRequirement", Z3Type.INT);
// BoolExpr boolExpr =
// Z3javaAPIWrapper.createEqual(context, createFunction, annotation.getMemory());
// // solver.Add(boolExpr);
//
// // objectives
// HardwareCost hardwareCost = AnnotationUtils.getAnnotation(e, HardwareCost.class);
// Expr createCost =
// Z3javaAPIWrapper.createFunction(context, e.getName() + "_" + e.getId() +
// "_HardwareCost", Z3Type.INT);
// BoolExpr boolExpr2 =
// Z3javaAPIWrapper.createEqual(context, createCost, hardwareCost.getCost());
// solver.Add(boolExpr2);
// mem =30;
}
Sum sum = ArithmeticFactory.eINSTANCE.createSum();
sum.setSet(set1);
ModelElementLiteral modelElementLiteral1 =
ExpressionFactory.eINSTANCE.createModelElementLiteral();
modelElementLiteral1.setSetReference(set1);
ModelElementLiteral modelElementLiteral2 =
ExpressionFactory.eINSTANCE.createModelElementLiteral();
modelElementLiteral2.setSetReference(set2);
Allocation allocation = AllocationFactory.eINSTANCE.createAllocation();
allocation.setLeft(modelElementLiteral1);
allocation.setRight(modelElementLiteral2);
sum.setExpression(allocation);
Minus minus = ArithmeticFactory.eINSTANCE.createMinus();
ModelElementPropertyLiteral propertyLiteral =
ArithmeticFactory.eINSTANCE.createModelElementPropertyLiteral();
propertyLiteral.setSetReference(set1);
propertyLiteral.setSpecificationType(MemoryRequirement.class);
ArithmeticLiteral arithmeticLiteral = ArithmeticFactory.eINSTANCE.createArithmeticLiteral();
arithmeticLiteral.setValue(new BigDecimal(10));
minus.setLeft(propertyLiteral);
minus.setRight(arithmeticLiteral);
sum.setTerms(propertyLiteral);
ModelElementPropertyLiteral elementPropertyLiteral2 =
ArithmeticFactory.eINSTANCE.createModelElementPropertyLiteral();
elementPropertyLiteral2.setSetReference(set2);
elementPropertyLiteral2.setSpecificationType(MemoryRequirement.class);
LessEqual lq = ComparisonFactory.eINSTANCE.createLessEqual();
lq.setLeft(sum);
lq.setRight(elementPropertyLiteral2);
ForAll forAll = BooleanpFactory.eINSTANCE.createForAll();
forAll.setSet(set2);
forAll.setExpression(lq);
exprToSolve.add(forAll);
// basic allocation constraint
ForAll forAll2 = BooleanpFactory.eINSTANCE.createForAll();
Exists exists = BooleanpFactory.eINSTANCE.createExists();
final Set swSetCopy = EcoreUtils.copy(set1);
forAll2.setSet(swSetCopy);
forAll2.setExpression(exists);
final Set hwSetCopy = EcoreUtils.copy(set2);
exists.setSet(hwSetCopy);
ModelElementLiteral sw = ExpressionFactory.eINSTANCE.createModelElementLiteral();
sw.setSetReference(swSetCopy);
ModelElementLiteral hw = ExpressionFactory.eINSTANCE.createModelElementLiteral();
hw.setSetReference(hwSetCopy);
Allocation allocationCon = AllocationFactory.eINSTANCE.createAllocation();
allocationCon.setLeft(sw);
allocationCon.setRight(hw);
exists.setExpression(allocationCon);
exprToSolve.add(forAll2);
}
/** Creates a deployment problem using the dsl. */
private void createExp2() throws UnsupportedDataTypeException, Z3Exception {
FileProject project =
ProjectUtils.loadProjectFromPlugin(AF3ExplorationSMTActivator.PLUGIN_ID,
"test-data/CONSTRAINTS3.af3_23", true);
EList<ComponentArchitecture> cas =
EcoreUtils.getChildrenWithType(project, ComponentArchitecture.class);
EList<PlatformArchitecture> pas =
EcoreUtils.getChildrenWithType(project, PlatformArchitecture.class);
EList<Component> components = EcoreUtils.getChildrenWithType(cas.get(0), Component.class);
EList<ExecutionUnit> ecus = EcoreUtils.getChildrenWithType(pas.get(0), ExecutionUnit.class);
Set set2 = ExpressionFactory.eINSTANCE.createSet();
set2.setName("Hardware");
Set set1 = ExpressionFactory.eINSTANCE.createSet();
set1.setName("Software");
Set objectiveSumSet = ExpressionFactory.eINSTANCE.createSet();
objectiveSumSet.setName("Hardware");
Set objectivePredicateSet = ExpressionFactory.eINSTANCE.createSet();
objectivePredicateSet.setName("Software");
components.remove(0);// remove root component
for(Component c : components) {
set1.getEntries().add(c);
objectivePredicateSet.getEntries().add(c);
// component memory constraints
MemoryRequirement annotation =
AnnotationUtils.getAnnotation(c, MemoryRequirement.class);
Expr createFunction =
Z3javaAPIWrapper.createFunction(context, "Component_" + c.getId() +
"_MemoryRequirement", Z3Type.INT);
BoolExpr boolExpr =
Z3javaAPIWrapper.createEqual(context, createFunction, annotation.getValue()
.intValue());
// solver.Add(boolExpr);
ArrayList<Expr> allocs = new ArrayList<>();
// allocation constraints
for(ExecutionUnit e : ecus) {
Expr alloc =
Z3javaAPIWrapper.createFunction(context, "Component_" + c.getId() +
"_allocation", Z3Type.INT);
BoolExpr createEqual = Z3javaAPIWrapper.createEqual(context, alloc, e.getId());
allocs.add(createEqual);
}
BoolExpr or = Z3javaAPIWrapper.createOr(context, allocs.toArray(new BoolExpr[0]));
// solver.Add(or);
}
ModelElementPropertyLiteral cost =
ArithmeticFactory.eINSTANCE.createModelElementPropertyLiteral();
cost.setSetReference(objectiveSumSet);
cost.setSpecificationType(HardwareCost.class);
cost.setSetReference(objectiveSumSet);
// Sum objSum = ArithmeticFactory.eINSTANCE.createSum();
// Exists existsObjPredicate = BooleanpFactory.eINSTANCE.createExists();
// objSum.setExpression(existsObjPredicate);
// objSum.setSet(objectiveSumSet);
// objSum.setTerms(cost);
// existsObjPredicate.setSet(objectivePredicateSet);
ModelElementLiteral objLeft = ExpressionFactory.eINSTANCE.createModelElementLiteral();
objLeft.setSetReference(set1);
ModelElementLiteral objRight = ExpressionFactory.eINSTANCE.createModelElementLiteral();
objRight.setSetReference(set2);
Allocation objAllocation = AllocationFactory.eINSTANCE.createAllocation();
objAllocation.setLeft(objLeft);
objAllocation.setRight(objRight);
// existsObjPredicate.setExpression(objAllocation);
// minimize = FunctionFactory.eINSTANCE.createMinimize();
// minimize.setArgs(objSum);
// minimize.setArgs(objSum);
// System.out.println(objSum);
int mem = 50;
int costs = 20;
Symbol type =
Z3javaAPIWrapper.createSymbol(context, ecus.get(0).getClass().getSimpleName());
List<Symbol> symbols = new ArrayList<>();
for(IModelElement m : ecus) {
Symbol symbol = Z3javaAPIWrapper.createSymbol(context, ((INamedElement)m).getName());
symbols.add(symbol);
}
final Symbol[] array = symbols.toArray(new Symbol[0]);
EnumSort sort = Z3javaAPIWrapper.createEnumSort(context, type, array);
for(ExecutionUnit e : ecus) {
set2.getEntries().add(e);
objectiveSumSet.getEntries().add(e);
// ecu memory constraints
MemoryPerNode annotation = AnnotationUtils.getAnnotation(e, MemoryPerNode.class);
FuncDecl createFunction =
Z3javaAPIWrapper.createFunction(context, "f_" + "MemoryRequirement" + "_value",
sort, context.mkIntSort());
Expr apply = null;
for(Expr c : sort.getConsts()) {
if(c.toString().equals(e.getName())) {
apply = createFunction.apply(c);
}
}
BoolExpr boolExpr =
Z3javaAPIWrapper.createEqual(context, apply, annotation.getMemory());
solver.Add(boolExpr);
// objectives
// HardwareCost hardwareCost = AnnotationUtils.getAnnotation(e, HardwareCost.class);
// Expr createCost =
// Z3javaAPIWrapper.createFunction(context, e.getName() + "_" + e.getId() +
// "_HardwareCost", Z3Type.INT);
// BoolExpr boolExpr2 =
// Z3javaAPIWrapper.createEqual(context, createCost, hardwareCost.getCost());
// solver.Add(boolExpr2);
// mem =30;
}
// Sum sum = ArithmeticFactory.eINSTANCE.createSum();
// sum.setSet(set1);
ModelElementLiteral modelElementLiteral1 =
ExpressionFactory.eINSTANCE.createModelElementLiteral();
modelElementLiteral1.setSetReference(set1);
ModelElementLiteral modelElementLiteral2 =
ExpressionFactory.eINSTANCE.createModelElementLiteral();
modelElementLiteral2.setSetReference(set2);
Allocation allocation = AllocationFactory.eINSTANCE.createAllocation();
allocation.setLeft(modelElementLiteral1);
allocation.setRight(modelElementLiteral2);
// sum.setExpression(allocation);
Minus minus = ArithmeticFactory.eINSTANCE.createMinus();
ModelElementPropertyLiteral propertyLiteral =
ArithmeticFactory.eINSTANCE.createModelElementPropertyLiteral();
propertyLiteral.setSetReference(set1);
propertyLiteral.setSpecificationType(MemoryRequirement.class);
ArithmeticLiteral arithmeticLiteral = ArithmeticFactory.eINSTANCE.createArithmeticLiteral();
arithmeticLiteral.setValue(new BigDecimal(10));
minus.setLeft(propertyLiteral);
minus.setRight(arithmeticLiteral);
// sum.setTerms(propertyLiteral);
ModelElementPropertyLiteral elementPropertyLiteral2 =
ArithmeticFactory.eINSTANCE.createModelElementPropertyLiteral();
elementPropertyLiteral2.setSetReference(set2);
elementPropertyLiteral2.setSpecificationType(MemoryRequirement.class);
LessEqual lq = ComparisonFactory.eINSTANCE.createLessEqual();