[ocl25] Verify that LambdaValueImpl equals needs no ordered support
diff --git a/plugins/org.eclipse.ocl.pivot/src/org/eclipse/ocl/pivot/internal/values/LambdaValueImpl.java b/plugins/org.eclipse.ocl.pivot/src/org/eclipse/ocl/pivot/internal/values/LambdaValueImpl.java
index 94dfae2..f958bbb 100644
--- a/plugins/org.eclipse.ocl.pivot/src/org/eclipse/ocl/pivot/internal/values/LambdaValueImpl.java
+++ b/plugins/org.eclipse.ocl.pivot/src/org/eclipse/ocl/pivot/internal/values/LambdaValueImpl.java
@@ -23,7 +23,9 @@
 import org.eclipse.jdt.annotation.NonNull;
 import org.eclipse.jdt.annotation.Nullable;
 import org.eclipse.ocl.pivot.LambdaLiteralExp;
+import org.eclipse.ocl.pivot.Parameter;
 import org.eclipse.ocl.pivot.PivotPackage;
+import org.eclipse.ocl.pivot.Variable;
 import org.eclipse.ocl.pivot.ids.IdResolver;
 import org.eclipse.ocl.pivot.ids.TypeId;
 import org.eclipse.ocl.pivot.utilities.ValueUtil;
@@ -49,7 +51,8 @@
 			}
 			if (eStructuralFeature instanceof EAttribute) {
 				EAttribute eAttribute = (EAttribute)eStructuralFeature;
-				if (eAttribute == PivotPackage.Literals.NAMED_ELEMENT__NAME) {
+				if ((eAttribute == PivotPackage.Literals.NAMED_ELEMENT__NAME)
+				 && ((thisObject instanceof Parameter) || (thisObject instanceof Variable))) {
 					continue;
 				}
 				if (!eAttribute.isMany()) {
@@ -88,7 +91,8 @@
 						}
 					}
 					else {
-						throw new UnsupportedOperationException();			// FIXME
+						// There are no significant unordered properties of OCLExpression elements
+						// throw new UnsupportedOperationException();
 					}
 				}
 			}
@@ -136,7 +140,8 @@
 						}
 					}
 					else {
-						throw new UnsupportedOperationException();			// FIXME
+						// There are no significant unordered properties of OCLExpression elements
+						// throw new UnsupportedOperationException();
 					}
 				}
 			}
@@ -236,7 +241,13 @@
 						}
 					}
 					else {
-						throw new UnsupportedOperationException();			// FIXME
+						// There are no significant unordered properties of OCLExpression elements
+						// testConstruct_LambdaEqualsIsOrdered confirms that only the following are not ordered
+						// PivotPackage.Literals.ELEMENT__ANNOTATING_COMMENTS
+						// PivotPackage.Literals.ELEMENT__OWNED_COMMENTS
+						// PivotPackage.Literals.ELEMENT__OWNED_EXTENSIONS
+						// These should not be used in LambdaLiteralExps
+						// throw new UnsupportedOperationException();
 					}
 				}
 			}
diff --git a/tests/org.eclipse.ocl.examples.xtext.tests/src/org/eclipse/ocl/examples/pivot/tests/EvaluateConstructsTest4.java b/tests/org.eclipse.ocl.examples.xtext.tests/src/org/eclipse/ocl/examples/pivot/tests/EvaluateConstructsTest4.java
index 9facaf5..37ef9d7 100644
--- a/tests/org.eclipse.ocl.examples.xtext.tests/src/org/eclipse/ocl/examples/pivot/tests/EvaluateConstructsTest4.java
+++ b/tests/org.eclipse.ocl.examples.xtext.tests/src/org/eclipse/ocl/examples/pivot/tests/EvaluateConstructsTest4.java
@@ -14,8 +14,12 @@
 import java.util.Arrays;
 import java.util.Collection;
 
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EClassifier;
+import org.eclipse.emf.ecore.EStructuralFeature;
 import org.eclipse.jdt.annotation.NonNull;
 import org.eclipse.ocl.examples.pivot.tests.EvaluateUMLTest4.MyOCL;
+import org.eclipse.ocl.pivot.PivotPackage;
 import org.eclipse.ocl.pivot.PivotTables;
 import org.eclipse.ocl.pivot.internal.messages.PivotMessagesInternal;
 import org.eclipse.ocl.pivot.messages.PivotMessages;
@@ -100,10 +104,11 @@
 		ocl.dispose();
 	}
 
-	@Test public void testConstruct_lambda() {
+	@Test public void testConstruct_LambdaEval() {
 		BaseLinkingService.DEBUG_RETRY.setState(true);
 		if (useCodeGen) { return; }					// FIXME
 		TestOCL ocl = createOCL();
+//		ocl.assertQueryEquals(null, 18, "Lambda(a : Integer[1]) : Integer[1] {2+a}(9)");
 		ocl.assertQueryResults(null, "Lambda(x : Integer[1]) : Integer[1] {2+x}", "let f = Lambda(a : Integer[1]) : Integer[1] {2+a} in f");
 		ocl.assertQueryResults(null, "Set{Lambda(x : Integer[1]) : Integer[1] {2+x}}", "let f = Lambda(a : Integer[1]) : Integer[1] {2+a} in f.oclAsSet()");
 		ocl.assertQueryResults(null, "Bag{Lambda(x : Integer[1]) : Integer[1] {2+x}}", "let f = Lambda(a : Integer[1]) : Integer[1] {2+a} in 1->collect(f)");
@@ -116,6 +121,38 @@
 		ocl.dispose();
 	}
 
+	@Test public void testConstruct_LambdaEquals() {
+		BaseLinkingService.DEBUG_RETRY.setState(true);
+		if (useCodeGen) { return; }					// FIXME
+		TestOCL ocl = createOCL();
+		ocl.assertQueryTrue(null,  "Lambda(a : Integer[1]) : Integer[1] {2+a} = Lambda(x : Integer[1]) : Integer[1] {2+x}");
+		ocl.assertQueryFalse(null, " Lambda(x:Real) : Real {Tuple{a:Real=0,b:Real=0}.a} = Lambda(x:Real) : Real {Tuple{b:Real=0,a:Real=0}.a}");
+		ocl.assertQueryTrue(null, "Lambda(x:Real) : Real {Tuple{a:Real=0,b:Real=0}.a} = Lambda(x:Real) : Real {Tuple{a:Real=0,b:Real=0}.a}");
+		ocl.dispose();
+	}
+
+	/**
+	 * Confirm that the lack of support for ordered properties in LambdaValueIml is justified.
+	 */
+	@Test public void testConstruct_LambdaEqualsIsOrdered() {
+		EClass oclExpressionEClass = PivotPackage.Literals.OCL_EXPRESSION;
+		for (EClassifier eClassifier : PivotPackage.eINSTANCE.getEClassifiers()) {
+			if (eClassifier instanceof EClass) {
+				EClass eClass = (EClass)eClassifier;
+				if (oclExpressionEClass.isSuperTypeOf(eClass)) {
+					for (EStructuralFeature eStructuralFeature : eClass.getEAllStructuralFeatures()) {
+						if (eStructuralFeature.isMany()
+						&& (eStructuralFeature != PivotPackage.Literals.ELEMENT__ANNOTATING_COMMENTS)
+						&& (eStructuralFeature != PivotPackage.Literals.ELEMENT__OWNED_COMMENTS)
+						&& (eStructuralFeature != PivotPackage.Literals.ELEMENT__OWNED_EXTENSIONS)) {
+							assertEquals(eClass.getName() + "::" + eStructuralFeature.getName() + " ordered", true, eStructuralFeature.isOrdered());
+						}
+					}
+				}
+			}
+		}
+	}
+
 	@Test public void testConstruct_let() {		
 		TestOCL ocl = createOCL();
 		ocl.assertQueryEquals(null, 3, "let a : Integer = 1 in a + 2");