blob: f8759d3b1e029e1fc50f192368944a0ecbaaa0af [file] [log] [blame]
/**
* <copyright>
*
* Copyright (c) 2012 E.D.Willink and others.
* 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:
* E.D.Willink - Initial API and implementation
*
* </copyright>
*************************************************************************
* This code is 100% auto-generated
* from: pivot
* using: org.eclipse.ocl.examples.codegen.tables.model2tables.mtl
*
* Do not edit it.
*/
package org.eclipse.ocl.examples.pivot.bodies;
import org.eclipse.ocl.examples.domain.elements.DomainCollectionType;
import org.eclipse.ocl.examples.domain.elements.DomainStandardLibrary;
import org.eclipse.ocl.examples.domain.elements.DomainType;
import org.eclipse.ocl.examples.domain.evaluation.DomainEvaluator;
import org.eclipse.ocl.examples.domain.evaluation.InvalidValueException;
import org.eclipse.ocl.examples.domain.library.AbstractBinaryOperation;
import org.eclipse.ocl.examples.domain.library.AbstractUnaryOperation;
import org.eclipse.ocl.examples.domain.library.LibraryBinaryOperation;
import org.eclipse.ocl.examples.domain.library.LibraryIteration;
import org.eclipse.ocl.examples.domain.library.LibraryProperty;
import org.eclipse.ocl.examples.domain.library.LibraryUnaryOperation;
import org.eclipse.ocl.examples.domain.values.CollectionValue;
import org.eclipse.ocl.examples.domain.values.IntegerValue;
import org.eclipse.ocl.examples.domain.values.StringValue;
import org.eclipse.ocl.examples.domain.values.Value;
import org.eclipse.ocl.examples.domain.values.ValueFactory;
import org.eclipse.ocl.examples.library.executor.ExecutorOperation;
import org.eclipse.ocl.examples.library.executor.ExecutorProperty;
import org.eclipse.ocl.examples.library.executor.ExecutorSingleIterationManager;
import org.eclipse.ocl.examples.library.executor.ExecutorType;
import org.eclipse.ocl.examples.library.oclstdlib.OCLstdlibTables;
import org.eclipse.ocl.examples.pivot.PivotTables;
/**
* IteratorExpBodies provides the Java implementation bodies of OCL-defined IteratorExp operations and properties.
*/
@SuppressWarnings("nls")
public class IteratorExpBodies
{
/**
* Implementation of the IteratorExp 'AnyBodyTypeIsBoolean' invariant.
*/
public static class _invariant_AnyBodyTypeIsBoolean extends AbstractUnaryOperation
{
public static _invariant_AnyBodyTypeIsBoolean INSTANCE = new _invariant_AnyBodyTypeIsBoolean();
/*
name = 'any' implies body.type = 'Boolean'
*/
public Value evaluate(DomainEvaluator evaluator, DomainType returnType, final Value self) throws InvalidValueException {
final ValueFactory valueFactory = evaluator.getValueFactory();
final DomainStandardLibrary standardLibrary = valueFactory.getStandardLibrary();
final ExecutorType T_Boolean = OCLstdlibTables.Types._Boolean;
final ExecutorOperation O_Boolean_implies = OCLstdlibTables.Operations._Boolean__implies;
final ExecutorOperation O_String__eq_ = OCLstdlibTables.Operations._String___eq_;
final ExecutorType T_String = OCLstdlibTables.Types._String;
final ExecutorProperty P_NamedElement_name = PivotTables.Properties._NamedElement__name;
final LibraryProperty IP_NamedElement_name = P_NamedElement_name.getImplementation();
final StringValue S_any = valueFactory.stringValueOf("any");
final ExecutorOperation O_OclAny__eq_ = OCLstdlibTables.Operations._OclAny___eq_;
final ExecutorType T_Pivot_ecore__pivot__Type = PivotTables.Types._Type;
final ExecutorProperty P_TypedElement_type = PivotTables.Properties._TypedElement__type;
final LibraryProperty IP_TypedElement_type = P_TypedElement_type.getImplementation();
final ExecutorType T_Pivot_ecore__pivot__OclExpression = PivotTables.Types._OclExpression;
final ExecutorProperty P_LoopExp_body = PivotTables.Properties._LoopExp__body;
final LibraryProperty IP_LoopExp_body = P_LoopExp_body.getImplementation();
final StringValue S_Boolean = valueFactory.stringValueOf("Boolean");
Value leftA_symbol_73;
try {
Value A_symbol_74 = IP_NamedElement_name.evaluate(evaluator, T_String, self, P_NamedElement_name);
DomainType static_A_symbol_75 = valueFactory.typeOf(A_symbol_74, S_any);
LibraryBinaryOperation dynamic_A_symbol_75 = (LibraryBinaryOperation)static_A_symbol_75.lookupImplementation(standardLibrary, O_String__eq_);
Value A_symbol_75 = dynamic_A_symbol_75.evaluate(evaluator, T_Boolean, A_symbol_74, S_any);
leftA_symbol_73 = A_symbol_75;
} catch (InvalidValueException e) {
leftA_symbol_73 = valueFactory.createInvalidValue(e);
}
Value A_symbol_75 = leftA_symbol_73;
Value rightA_symbol_73;
try {
Value A_symbol_76 = IP_LoopExp_body.evaluate(evaluator, T_Pivot_ecore__pivot__OclExpression, self, P_LoopExp_body);
Value A_symbol_77 = IP_TypedElement_type.evaluate(evaluator, T_Pivot_ecore__pivot__Type, A_symbol_76, P_TypedElement_type);
DomainType static_A_symbol_78 = valueFactory.typeOf(A_symbol_77, S_Boolean);
LibraryBinaryOperation dynamic_A_symbol_78 = (LibraryBinaryOperation)static_A_symbol_78.lookupImplementation(standardLibrary, O_OclAny__eq_);
Value A_symbol_78 = dynamic_A_symbol_78.evaluate(evaluator, T_Boolean, A_symbol_77, S_Boolean);
rightA_symbol_73 = A_symbol_78;
} catch (InvalidValueException e) {
rightA_symbol_73 = valueFactory.createInvalidValue(e);
}
Value A_symbol_78 = rightA_symbol_73;
DomainType static_A_symbol_73 = valueFactory.typeOf(A_symbol_75);
LibraryBinaryOperation dynamic_A_symbol_73 = (LibraryBinaryOperation)static_A_symbol_73.lookupImplementation(standardLibrary, O_Boolean_implies);
Value A_symbol_73 = dynamic_A_symbol_73.evaluate(evaluator, T_Boolean, A_symbol_75, A_symbol_78);
return A_symbol_73;
}
}
/**
* Implementation of the IteratorExp 'AnyHasOneIterator' invariant.
*/
public static class _invariant_AnyHasOneIterator extends AbstractUnaryOperation
{
public static _invariant_AnyHasOneIterator INSTANCE = new _invariant_AnyHasOneIterator();
/*
name = 'any' implies iterator->size() = 1
*/
public Value evaluate(DomainEvaluator evaluator, DomainType returnType, final Value self) throws InvalidValueException {
final ValueFactory valueFactory = evaluator.getValueFactory();
final DomainStandardLibrary standardLibrary = valueFactory.getStandardLibrary();
final ExecutorType T_Boolean = OCLstdlibTables.Types._Boolean;
final ExecutorOperation O_Boolean_implies = OCLstdlibTables.Operations._Boolean__implies;
final ExecutorOperation O_String__eq_ = OCLstdlibTables.Operations._String___eq_;
final ExecutorType T_String = OCLstdlibTables.Types._String;
final ExecutorProperty P_NamedElement_name = PivotTables.Properties._NamedElement__name;
final LibraryProperty IP_NamedElement_name = P_NamedElement_name.getImplementation();
final StringValue S_any = valueFactory.stringValueOf("any");
final ExecutorOperation O_Real__eq_ = OCLstdlibTables.Operations._Real___eq_;
final ExecutorType T_Integer = OCLstdlibTables.Types._Integer;
final ExecutorOperation O_Collection_size = OCLstdlibTables.Operations._Collection__size;
final ExecutorType T_Pivot_ecore__pivot__Variable = PivotTables.Types._Variable;
final DomainCollectionType T_OrderedSet_Pivot_ecore__pivot__Variable_ = standardLibrary.getOrderedSetType(T_Pivot_ecore__pivot__Variable);
final ExecutorProperty P_LoopExp_iterator = PivotTables.Properties._LoopExp__iterator;
final LibraryProperty IP_LoopExp_iterator = P_LoopExp_iterator.getImplementation();
final IntegerValue I_1 = valueFactory.integerValueOf(1);
Value leftA_symbol_79;
try {
Value A_symbol_80 = IP_NamedElement_name.evaluate(evaluator, T_String, self, P_NamedElement_name);
DomainType static_A_symbol_81 = valueFactory.typeOf(A_symbol_80, S_any);
LibraryBinaryOperation dynamic_A_symbol_81 = (LibraryBinaryOperation)static_A_symbol_81.lookupImplementation(standardLibrary, O_String__eq_);
Value A_symbol_81 = dynamic_A_symbol_81.evaluate(evaluator, T_Boolean, A_symbol_80, S_any);
leftA_symbol_79 = A_symbol_81;
} catch (InvalidValueException e) {
leftA_symbol_79 = valueFactory.createInvalidValue(e);
}
Value A_symbol_81 = leftA_symbol_79;
Value rightA_symbol_79;
try {
Value A_symbol_82 = IP_LoopExp_iterator.evaluate(evaluator, T_OrderedSet_Pivot_ecore__pivot__Variable_, self, P_LoopExp_iterator);
DomainType static_A_symbol_83 = valueFactory.typeOf(A_symbol_82);
LibraryUnaryOperation dynamic_A_symbol_83 = (LibraryUnaryOperation)static_A_symbol_83.lookupImplementation(standardLibrary, O_Collection_size);
Value A_symbol_83 = dynamic_A_symbol_83.evaluate(evaluator, T_Integer, A_symbol_82);
DomainType static_A_symbol_84 = valueFactory.typeOf(A_symbol_83, I_1);
LibraryBinaryOperation dynamic_A_symbol_84 = (LibraryBinaryOperation)static_A_symbol_84.lookupImplementation(standardLibrary, O_Real__eq_);
Value A_symbol_84 = dynamic_A_symbol_84.evaluate(evaluator, T_Boolean, A_symbol_83, I_1);
rightA_symbol_79 = A_symbol_84;
} catch (InvalidValueException e) {
rightA_symbol_79 = valueFactory.createInvalidValue(e);
}
Value A_symbol_84 = rightA_symbol_79;
DomainType static_A_symbol_79 = valueFactory.typeOf(A_symbol_81);
LibraryBinaryOperation dynamic_A_symbol_79 = (LibraryBinaryOperation)static_A_symbol_79.lookupImplementation(standardLibrary, O_Boolean_implies);
Value A_symbol_79 = dynamic_A_symbol_79.evaluate(evaluator, T_Boolean, A_symbol_81, A_symbol_84);
return A_symbol_79;
}
}
/**
* Implementation of the IteratorExp 'AnyTypeIsSourceElementType' invariant.
*/
public static class _invariant_AnyTypeIsSourceElementType extends AbstractUnaryOperation
{
public static _invariant_AnyTypeIsSourceElementType INSTANCE = new _invariant_AnyTypeIsSourceElementType();
/*
name = 'any' implies type = source.type.oclAsType(CollectionType).elementType
*/
public Value evaluate(DomainEvaluator evaluator, DomainType returnType, final Value self) throws InvalidValueException {
final ValueFactory valueFactory = evaluator.getValueFactory();
final DomainStandardLibrary standardLibrary = valueFactory.getStandardLibrary();
final ExecutorType T_Boolean = OCLstdlibTables.Types._Boolean;
final ExecutorOperation O_Boolean_implies = OCLstdlibTables.Operations._Boolean__implies;
final ExecutorOperation O_String__eq_ = OCLstdlibTables.Operations._String___eq_;
final ExecutorType T_String = OCLstdlibTables.Types._String;
final ExecutorProperty P_NamedElement_name = PivotTables.Properties._NamedElement__name;
final LibraryProperty IP_NamedElement_name = P_NamedElement_name.getImplementation();
final StringValue S_any = valueFactory.stringValueOf("any");
final ExecutorOperation O_OclAny__eq_ = OCLstdlibTables.Operations._OclAny___eq_;
final ExecutorType T_Pivot_ecore__pivot__Type = PivotTables.Types._Type;
final ExecutorProperty P_TypedElement_type = PivotTables.Properties._TypedElement__type;
final LibraryProperty IP_TypedElement_type = P_TypedElement_type.getImplementation();
final ExecutorProperty P_CollectionType_elementType = PivotTables.Properties._CollectionType__elementType;
final LibraryProperty IP_CollectionType_elementType = P_CollectionType_elementType.getImplementation();
final ExecutorType T_Pivot_ecore__pivot__CollectionType = PivotTables.Types._CollectionType;
final ExecutorOperation O_OclAny_oclAsType = OCLstdlibTables.Operations._OclAny__oclAsType;
final ExecutorType T_Pivot_ecore__pivot__OclExpression = PivotTables.Types._OclExpression;
final ExecutorProperty P_CallExp_source = PivotTables.Properties._CallExp__source;
final LibraryProperty IP_CallExp_source = P_CallExp_source.getImplementation();
final Value T_ClassClassifier_Pivot_ecore__pivot__CollectionType_ = valueFactory.createTypeValue(PivotTables.Types._CollectionType);
Value leftA_symbol_85;
try {
Value A_symbol_86 = IP_NamedElement_name.evaluate(evaluator, T_String, self, P_NamedElement_name);
DomainType static_A_symbol_87 = valueFactory.typeOf(A_symbol_86, S_any);
LibraryBinaryOperation dynamic_A_symbol_87 = (LibraryBinaryOperation)static_A_symbol_87.lookupImplementation(standardLibrary, O_String__eq_);
Value A_symbol_87 = dynamic_A_symbol_87.evaluate(evaluator, T_Boolean, A_symbol_86, S_any);
leftA_symbol_85 = A_symbol_87;
} catch (InvalidValueException e) {
leftA_symbol_85 = valueFactory.createInvalidValue(e);
}
Value A_symbol_87 = leftA_symbol_85;
Value rightA_symbol_85;
try {
Value A_symbol_88 = IP_TypedElement_type.evaluate(evaluator, T_Pivot_ecore__pivot__Type, self, P_TypedElement_type);
Value A_symbol_89 = IP_CallExp_source.evaluate(evaluator, T_Pivot_ecore__pivot__OclExpression, self, P_CallExp_source);
Value A_symbol_90 = IP_TypedElement_type.evaluate(evaluator, T_Pivot_ecore__pivot__Type, A_symbol_89, P_TypedElement_type);
DomainType static_A_symbol_91 = valueFactory.typeOf(A_symbol_90);
LibraryBinaryOperation dynamic_A_symbol_91 = (LibraryBinaryOperation)static_A_symbol_91.lookupImplementation(standardLibrary, O_OclAny_oclAsType);
Value A_symbol_91 = dynamic_A_symbol_91.evaluate(evaluator, T_Pivot_ecore__pivot__CollectionType, A_symbol_90, T_ClassClassifier_Pivot_ecore__pivot__CollectionType_);
Value A_symbol_92 = IP_CollectionType_elementType.evaluate(evaluator, T_Pivot_ecore__pivot__Type, A_symbol_91, P_CollectionType_elementType);
DomainType static_A_symbol_93 = valueFactory.typeOf(A_symbol_88, A_symbol_92);
LibraryBinaryOperation dynamic_A_symbol_93 = (LibraryBinaryOperation)static_A_symbol_93.lookupImplementation(standardLibrary, O_OclAny__eq_);
Value A_symbol_93 = dynamic_A_symbol_93.evaluate(evaluator, T_Boolean, A_symbol_88, A_symbol_92);
rightA_symbol_85 = A_symbol_93;
} catch (InvalidValueException e) {
rightA_symbol_85 = valueFactory.createInvalidValue(e);
}
Value A_symbol_93 = rightA_symbol_85;
DomainType static_A_symbol_85 = valueFactory.typeOf(A_symbol_87);
LibraryBinaryOperation dynamic_A_symbol_85 = (LibraryBinaryOperation)static_A_symbol_85.lookupImplementation(standardLibrary, O_Boolean_implies);
Value A_symbol_85 = dynamic_A_symbol_85.evaluate(evaluator, T_Boolean, A_symbol_87, A_symbol_93);
return A_symbol_85;
}
}
/**
* Implementation of the IteratorExp 'ClosureElementTypeIsSourceElementType' invariant.
*/
public static class _invariant_ClosureElementTypeIsSourceElementType extends AbstractUnaryOperation
{
public static _invariant_ClosureElementTypeIsSourceElementType INSTANCE = new _invariant_ClosureElementTypeIsSourceElementType();
/*
name = 'closure' implies
type.oclAsType(CollectionType).elementType =
source.type.oclAsType(CollectionType).elementType
*/
public Value evaluate(DomainEvaluator evaluator, DomainType returnType, final Value self) throws InvalidValueException {
final ValueFactory valueFactory = evaluator.getValueFactory();
final DomainStandardLibrary standardLibrary = valueFactory.getStandardLibrary();
final ExecutorType T_Boolean = OCLstdlibTables.Types._Boolean;
final ExecutorOperation O_Boolean_implies = OCLstdlibTables.Operations._Boolean__implies;
final ExecutorOperation O_String__eq_ = OCLstdlibTables.Operations._String___eq_;
final ExecutorType T_String = OCLstdlibTables.Types._String;
final ExecutorProperty P_NamedElement_name = PivotTables.Properties._NamedElement__name;
final LibraryProperty IP_NamedElement_name = P_NamedElement_name.getImplementation();
final StringValue S_closure = valueFactory.stringValueOf("closure");
final ExecutorOperation O_OclAny__eq_ = OCLstdlibTables.Operations._OclAny___eq_;
final ExecutorType T_Pivot_ecore__pivot__Type = PivotTables.Types._Type;
final ExecutorProperty P_CollectionType_elementType = PivotTables.Properties._CollectionType__elementType;
final LibraryProperty IP_CollectionType_elementType = P_CollectionType_elementType.getImplementation();
final ExecutorType T_Pivot_ecore__pivot__CollectionType = PivotTables.Types._CollectionType;
final ExecutorOperation O_OclAny_oclAsType = OCLstdlibTables.Operations._OclAny__oclAsType;
final ExecutorProperty P_TypedElement_type = PivotTables.Properties._TypedElement__type;
final LibraryProperty IP_TypedElement_type = P_TypedElement_type.getImplementation();
final Value T_ClassClassifier_Pivot_ecore__pivot__CollectionType_ = valueFactory.createTypeValue(PivotTables.Types._CollectionType);
final ExecutorType T_Pivot_ecore__pivot__OclExpression = PivotTables.Types._OclExpression;
final ExecutorProperty P_CallExp_source = PivotTables.Properties._CallExp__source;
final LibraryProperty IP_CallExp_source = P_CallExp_source.getImplementation();
Value leftA_symbol_94;
try {
Value A_symbol_95 = IP_NamedElement_name.evaluate(evaluator, T_String, self, P_NamedElement_name);
DomainType static_A_symbol_96 = valueFactory.typeOf(A_symbol_95, S_closure);
LibraryBinaryOperation dynamic_A_symbol_96 = (LibraryBinaryOperation)static_A_symbol_96.lookupImplementation(standardLibrary, O_String__eq_);
Value A_symbol_96 = dynamic_A_symbol_96.evaluate(evaluator, T_Boolean, A_symbol_95, S_closure);
leftA_symbol_94 = A_symbol_96;
} catch (InvalidValueException e) {
leftA_symbol_94 = valueFactory.createInvalidValue(e);
}
Value A_symbol_96 = leftA_symbol_94;
Value rightA_symbol_94;
try {
Value A_symbol_97 = IP_TypedElement_type.evaluate(evaluator, T_Pivot_ecore__pivot__Type, self, P_TypedElement_type);
DomainType static_A_symbol_98 = valueFactory.typeOf(A_symbol_97);
LibraryBinaryOperation dynamic_A_symbol_98 = (LibraryBinaryOperation)static_A_symbol_98.lookupImplementation(standardLibrary, O_OclAny_oclAsType);
Value A_symbol_98 = dynamic_A_symbol_98.evaluate(evaluator, T_Pivot_ecore__pivot__CollectionType, A_symbol_97, T_ClassClassifier_Pivot_ecore__pivot__CollectionType_);
Value A_symbol_99 = IP_CollectionType_elementType.evaluate(evaluator, T_Pivot_ecore__pivot__Type, A_symbol_98, P_CollectionType_elementType);
Value A_symbol_100 = IP_CallExp_source.evaluate(evaluator, T_Pivot_ecore__pivot__OclExpression, self, P_CallExp_source);
Value A_symbol_101 = IP_TypedElement_type.evaluate(evaluator, T_Pivot_ecore__pivot__Type, A_symbol_100, P_TypedElement_type);
DomainType static_A_symbol_102 = valueFactory.typeOf(A_symbol_101);
LibraryBinaryOperation dynamic_A_symbol_102 = (LibraryBinaryOperation)static_A_symbol_102.lookupImplementation(standardLibrary, O_OclAny_oclAsType);
Value A_symbol_102 = dynamic_A_symbol_102.evaluate(evaluator, T_Pivot_ecore__pivot__CollectionType, A_symbol_101, T_ClassClassifier_Pivot_ecore__pivot__CollectionType_);
Value A_symbol_103 = IP_CollectionType_elementType.evaluate(evaluator, T_Pivot_ecore__pivot__Type, A_symbol_102, P_CollectionType_elementType);
DomainType static_A_symbol_104 = valueFactory.typeOf(A_symbol_99, A_symbol_103);
LibraryBinaryOperation dynamic_A_symbol_104 = (LibraryBinaryOperation)static_A_symbol_104.lookupImplementation(standardLibrary, O_OclAny__eq_);
Value A_symbol_104 = dynamic_A_symbol_104.evaluate(evaluator, T_Boolean, A_symbol_99, A_symbol_103);
rightA_symbol_94 = A_symbol_104;
} catch (InvalidValueException e) {
rightA_symbol_94 = valueFactory.createInvalidValue(e);
}
Value A_symbol_104 = rightA_symbol_94;
DomainType static_A_symbol_94 = valueFactory.typeOf(A_symbol_96);
LibraryBinaryOperation dynamic_A_symbol_94 = (LibraryBinaryOperation)static_A_symbol_94.lookupImplementation(standardLibrary, O_Boolean_implies);
Value A_symbol_94 = dynamic_A_symbol_94.evaluate(evaluator, T_Boolean, A_symbol_96, A_symbol_104);
return A_symbol_94;
}
}
/**
* Implementation of the IteratorExp 'ClosureHasOneIterator' invariant.
*/
public static class _invariant_ClosureHasOneIterator extends AbstractUnaryOperation
{
public static _invariant_ClosureHasOneIterator INSTANCE = new _invariant_ClosureHasOneIterator();
/*
name = 'closure' implies iterator->size() = 1
*/
public Value evaluate(DomainEvaluator evaluator, DomainType returnType, final Value self) throws InvalidValueException {
final ValueFactory valueFactory = evaluator.getValueFactory();
final DomainStandardLibrary standardLibrary = valueFactory.getStandardLibrary();
final ExecutorType T_Boolean = OCLstdlibTables.Types._Boolean;
final ExecutorOperation O_Boolean_implies = OCLstdlibTables.Operations._Boolean__implies;
final ExecutorOperation O_String__eq_ = OCLstdlibTables.Operations._String___eq_;
final ExecutorType T_String = OCLstdlibTables.Types._String;
final ExecutorProperty P_NamedElement_name = PivotTables.Properties._NamedElement__name;
final LibraryProperty IP_NamedElement_name = P_NamedElement_name.getImplementation();
final StringValue S_closure = valueFactory.stringValueOf("closure");
final ExecutorOperation O_Real__eq_ = OCLstdlibTables.Operations._Real___eq_;
final ExecutorType T_Integer = OCLstdlibTables.Types._Integer;
final ExecutorOperation O_Collection_size = OCLstdlibTables.Operations._Collection__size;
final ExecutorType T_Pivot_ecore__pivot__Variable = PivotTables.Types._Variable;
final DomainCollectionType T_OrderedSet_Pivot_ecore__pivot__Variable_ = standardLibrary.getOrderedSetType(T_Pivot_ecore__pivot__Variable);
final ExecutorProperty P_LoopExp_iterator = PivotTables.Properties._LoopExp__iterator;
final LibraryProperty IP_LoopExp_iterator = P_LoopExp_iterator.getImplementation();
final IntegerValue I_1 = valueFactory.integerValueOf(1);
Value leftA_symbol_105;
try {
Value A_symbol_106 = IP_NamedElement_name.evaluate(evaluator, T_String, self, P_NamedElement_name);
DomainType static_A_symbol_107 = valueFactory.typeOf(A_symbol_106, S_closure);
LibraryBinaryOperation dynamic_A_symbol_107 = (LibraryBinaryOperation)static_A_symbol_107.lookupImplementation(standardLibrary, O_String__eq_);
Value A_symbol_107 = dynamic_A_symbol_107.evaluate(evaluator, T_Boolean, A_symbol_106, S_closure);
leftA_symbol_105 = A_symbol_107;
} catch (InvalidValueException e) {
leftA_symbol_105 = valueFactory.createInvalidValue(e);
}
Value A_symbol_107 = leftA_symbol_105;
Value rightA_symbol_105;
try {
Value A_symbol_108 = IP_LoopExp_iterator.evaluate(evaluator, T_OrderedSet_Pivot_ecore__pivot__Variable_, self, P_LoopExp_iterator);
DomainType static_A_symbol_109 = valueFactory.typeOf(A_symbol_108);
LibraryUnaryOperation dynamic_A_symbol_109 = (LibraryUnaryOperation)static_A_symbol_109.lookupImplementation(standardLibrary, O_Collection_size);
Value A_symbol_109 = dynamic_A_symbol_109.evaluate(evaluator, T_Integer, A_symbol_108);
DomainType static_A_symbol_110 = valueFactory.typeOf(A_symbol_109, I_1);
LibraryBinaryOperation dynamic_A_symbol_110 = (LibraryBinaryOperation)static_A_symbol_110.lookupImplementation(standardLibrary, O_Real__eq_);
Value A_symbol_110 = dynamic_A_symbol_110.evaluate(evaluator, T_Boolean, A_symbol_109, I_1);
rightA_symbol_105 = A_symbol_110;
} catch (InvalidValueException e) {
rightA_symbol_105 = valueFactory.createInvalidValue(e);
}
Value A_symbol_110 = rightA_symbol_105;
DomainType static_A_symbol_105 = valueFactory.typeOf(A_symbol_107);
LibraryBinaryOperation dynamic_A_symbol_105 = (LibraryBinaryOperation)static_A_symbol_105.lookupImplementation(standardLibrary, O_Boolean_implies);
Value A_symbol_105 = dynamic_A_symbol_105.evaluate(evaluator, T_Boolean, A_symbol_107, A_symbol_110);
return A_symbol_105;
}
}
/**
* Implementation of the IteratorExp 'ClosureSourceElementTypeIsBodyElementType' invariant.
*/
public static class _invariant_ClosureSourceElementTypeIsBodyElementType extends AbstractUnaryOperation
{
public static _invariant_ClosureSourceElementTypeIsBodyElementType INSTANCE = new _invariant_ClosureSourceElementTypeIsBodyElementType();
/*
name = 'closure' implies
source.type.oclAsType(CollectionType).elementType =
if body.type.oclIsKindOf(CollectionType)
then body.type.oclAsType(CollectionType).elementType
else body.type
endif
*/
public Value evaluate(DomainEvaluator evaluator, DomainType returnType, final Value self) throws InvalidValueException {
final ValueFactory valueFactory = evaluator.getValueFactory();
final DomainStandardLibrary standardLibrary = valueFactory.getStandardLibrary();
final ExecutorType T_Boolean = OCLstdlibTables.Types._Boolean;
final ExecutorOperation O_Boolean_implies = OCLstdlibTables.Operations._Boolean__implies;
final ExecutorOperation O_String__eq_ = OCLstdlibTables.Operations._String___eq_;
final ExecutorType T_String = OCLstdlibTables.Types._String;
final ExecutorProperty P_NamedElement_name = PivotTables.Properties._NamedElement__name;
final LibraryProperty IP_NamedElement_name = P_NamedElement_name.getImplementation();
final StringValue S_closure = valueFactory.stringValueOf("closure");
final ExecutorOperation O_OclAny__eq_ = OCLstdlibTables.Operations._OclAny___eq_;
final ExecutorType T_Pivot_ecore__pivot__Type = PivotTables.Types._Type;
final ExecutorProperty P_CollectionType_elementType = PivotTables.Properties._CollectionType__elementType;
final LibraryProperty IP_CollectionType_elementType = P_CollectionType_elementType.getImplementation();
final ExecutorType T_Pivot_ecore__pivot__CollectionType = PivotTables.Types._CollectionType;
final ExecutorOperation O_OclAny_oclAsType = OCLstdlibTables.Operations._OclAny__oclAsType;
final ExecutorProperty P_TypedElement_type = PivotTables.Properties._TypedElement__type;
final LibraryProperty IP_TypedElement_type = P_TypedElement_type.getImplementation();
final ExecutorType T_Pivot_ecore__pivot__OclExpression = PivotTables.Types._OclExpression;
final ExecutorProperty P_CallExp_source = PivotTables.Properties._CallExp__source;
final LibraryProperty IP_CallExp_source = P_CallExp_source.getImplementation();
final Value T_ClassClassifier_Pivot_ecore__pivot__CollectionType_ = valueFactory.createTypeValue(PivotTables.Types._CollectionType);
final ExecutorOperation O_OclAny_oclIsKindOf = OCLstdlibTables.Operations._OclAny__oclIsKindOf;
final ExecutorProperty P_LoopExp_body = PivotTables.Properties._LoopExp__body;
final LibraryProperty IP_LoopExp_body = P_LoopExp_body.getImplementation();
Value leftA_symbol_111;
try {
Value A_symbol_112 = IP_NamedElement_name.evaluate(evaluator, T_String, self, P_NamedElement_name);
DomainType static_A_symbol_113 = valueFactory.typeOf(A_symbol_112, S_closure);
LibraryBinaryOperation dynamic_A_symbol_113 = (LibraryBinaryOperation)static_A_symbol_113.lookupImplementation(standardLibrary, O_String__eq_);
Value A_symbol_113 = dynamic_A_symbol_113.evaluate(evaluator, T_Boolean, A_symbol_112, S_closure);
leftA_symbol_111 = A_symbol_113;
} catch (InvalidValueException e) {
leftA_symbol_111 = valueFactory.createInvalidValue(e);
}
Value A_symbol_113 = leftA_symbol_111;
Value rightA_symbol_111;
try {
Value A_symbol_114 = IP_CallExp_source.evaluate(evaluator, T_Pivot_ecore__pivot__OclExpression, self, P_CallExp_source);
Value A_symbol_115 = IP_TypedElement_type.evaluate(evaluator, T_Pivot_ecore__pivot__Type, A_symbol_114, P_TypedElement_type);
DomainType static_A_symbol_116 = valueFactory.typeOf(A_symbol_115);
LibraryBinaryOperation dynamic_A_symbol_116 = (LibraryBinaryOperation)static_A_symbol_116.lookupImplementation(standardLibrary, O_OclAny_oclAsType);
Value A_symbol_116 = dynamic_A_symbol_116.evaluate(evaluator, T_Pivot_ecore__pivot__CollectionType, A_symbol_115, T_ClassClassifier_Pivot_ecore__pivot__CollectionType_);
Value A_symbol_117 = IP_CollectionType_elementType.evaluate(evaluator, T_Pivot_ecore__pivot__Type, A_symbol_116, P_CollectionType_elementType);
Value A_symbol_118 = IP_LoopExp_body.evaluate(evaluator, T_Pivot_ecore__pivot__OclExpression, self, P_LoopExp_body);
Value A_symbol_119 = IP_TypedElement_type.evaluate(evaluator, T_Pivot_ecore__pivot__Type, A_symbol_118, P_TypedElement_type);
DomainType static_A_symbol_120 = valueFactory.typeOf(A_symbol_119);
LibraryBinaryOperation dynamic_A_symbol_120 = (LibraryBinaryOperation)static_A_symbol_120.lookupImplementation(standardLibrary, O_OclAny_oclIsKindOf);
Value A_symbol_120 = dynamic_A_symbol_120.evaluate(evaluator, T_Boolean, A_symbol_119, T_ClassClassifier_Pivot_ecore__pivot__CollectionType_);
Value A_symbol_121;
if (A_symbol_120.isTrue()) {
Value A_symbol_122 = IP_LoopExp_body.evaluate(evaluator, T_Pivot_ecore__pivot__OclExpression, self, P_LoopExp_body);
Value A_symbol_123 = IP_TypedElement_type.evaluate(evaluator, T_Pivot_ecore__pivot__Type, A_symbol_122, P_TypedElement_type);
DomainType static_A_symbol_124 = valueFactory.typeOf(A_symbol_123);
LibraryBinaryOperation dynamic_A_symbol_124 = (LibraryBinaryOperation)static_A_symbol_124.lookupImplementation(standardLibrary, O_OclAny_oclAsType);
Value A_symbol_124 = dynamic_A_symbol_124.evaluate(evaluator, T_Pivot_ecore__pivot__CollectionType, A_symbol_123, T_ClassClassifier_Pivot_ecore__pivot__CollectionType_);
Value A_symbol_125 = IP_CollectionType_elementType.evaluate(evaluator, T_Pivot_ecore__pivot__Type, A_symbol_124, P_CollectionType_elementType);
A_symbol_121 = A_symbol_125;
}
else if (A_symbol_120.isFalse()) {
Value A_symbol_126 = IP_LoopExp_body.evaluate(evaluator, T_Pivot_ecore__pivot__OclExpression, self, P_LoopExp_body);
Value A_symbol_127 = IP_TypedElement_type.evaluate(evaluator, T_Pivot_ecore__pivot__Type, A_symbol_126, P_TypedElement_type);
A_symbol_121 = A_symbol_127;
}
else if (A_symbol_120.isNull()) {
A_symbol_121 = valueFactory.throwInvalidValueException("null if condition");
}
else {
A_symbol_121 = valueFactory.throwInvalidValueException("invalid if condition");
}
DomainType static_A_symbol_128 = valueFactory.typeOf(A_symbol_117, A_symbol_121);
LibraryBinaryOperation dynamic_A_symbol_128 = (LibraryBinaryOperation)static_A_symbol_128.lookupImplementation(standardLibrary, O_OclAny__eq_);
Value A_symbol_128 = dynamic_A_symbol_128.evaluate(evaluator, T_Boolean, A_symbol_117, A_symbol_121);
rightA_symbol_111 = A_symbol_128;
} catch (InvalidValueException e) {
rightA_symbol_111 = valueFactory.createInvalidValue(e);
}
Value A_symbol_128 = rightA_symbol_111;
DomainType static_A_symbol_111 = valueFactory.typeOf(A_symbol_113);
LibraryBinaryOperation dynamic_A_symbol_111 = (LibraryBinaryOperation)static_A_symbol_111.lookupImplementation(standardLibrary, O_Boolean_implies);
Value A_symbol_111 = dynamic_A_symbol_111.evaluate(evaluator, T_Boolean, A_symbol_113, A_symbol_128);
return A_symbol_111;
}
}
/**
* Implementation of the IteratorExp 'ClosureTypeIsUniqueCollection' invariant.
*/
public static class _invariant_ClosureTypeIsUniqueCollection extends AbstractUnaryOperation
{
public static _invariant_ClosureTypeIsUniqueCollection INSTANCE = new _invariant_ClosureTypeIsUniqueCollection();
/*
name = 'closure' implies
if
source.type.oclIsKindOf(SequenceType) or
source.type.oclIsKindOf(OrderedSetType)
then type.oclIsKindOf(OrderedSetType)
else type.oclIsKindOf(SetType)
endif
*/
public Value evaluate(DomainEvaluator evaluator, DomainType returnType, final Value self) throws InvalidValueException {
final ValueFactory valueFactory = evaluator.getValueFactory();
final DomainStandardLibrary standardLibrary = valueFactory.getStandardLibrary();
final ExecutorType T_Boolean = OCLstdlibTables.Types._Boolean;
final ExecutorOperation O_Boolean_implies = OCLstdlibTables.Operations._Boolean__implies;
final ExecutorOperation O_String__eq_ = OCLstdlibTables.Operations._String___eq_;
final ExecutorType T_String = OCLstdlibTables.Types._String;
final ExecutorProperty P_NamedElement_name = PivotTables.Properties._NamedElement__name;
final LibraryProperty IP_NamedElement_name = P_NamedElement_name.getImplementation();
final StringValue S_closure = valueFactory.stringValueOf("closure");
final ExecutorOperation O_Boolean_or = OCLstdlibTables.Operations._Boolean__or;
final ExecutorOperation O_OclAny_oclIsKindOf = OCLstdlibTables.Operations._OclAny__oclIsKindOf;
final ExecutorType T_Pivot_ecore__pivot__Type = PivotTables.Types._Type;
final ExecutorProperty P_TypedElement_type = PivotTables.Properties._TypedElement__type;
final LibraryProperty IP_TypedElement_type = P_TypedElement_type.getImplementation();
final ExecutorType T_Pivot_ecore__pivot__OclExpression = PivotTables.Types._OclExpression;
final ExecutorProperty P_CallExp_source = PivotTables.Properties._CallExp__source;
final LibraryProperty IP_CallExp_source = P_CallExp_source.getImplementation();
final Value T_ClassClassifier_Pivot_ecore__pivot__SequenceType_ = valueFactory.createTypeValue(PivotTables.Types._SequenceType);
final Value T_ClassClassifier_Pivot_ecore__pivot__OrderedSetType_ = valueFactory.createTypeValue(PivotTables.Types._OrderedSetType);
final Value T_ClassClassifier_Pivot_ecore__pivot__SetType_ = valueFactory.createTypeValue(PivotTables.Types._SetType);
Value leftA_symbol_129;
try {
Value A_symbol_130 = IP_NamedElement_name.evaluate(evaluator, T_String, self, P_NamedElement_name);
DomainType static_A_symbol_131 = valueFactory.typeOf(A_symbol_130, S_closure);
LibraryBinaryOperation dynamic_A_symbol_131 = (LibraryBinaryOperation)static_A_symbol_131.lookupImplementation(standardLibrary, O_String__eq_);
Value A_symbol_131 = dynamic_A_symbol_131.evaluate(evaluator, T_Boolean, A_symbol_130, S_closure);
leftA_symbol_129 = A_symbol_131;
} catch (InvalidValueException e) {
leftA_symbol_129 = valueFactory.createInvalidValue(e);
}
Value A_symbol_131 = leftA_symbol_129;
Value rightA_symbol_129;
try {
Value leftA_symbol_132;
try {
Value A_symbol_133 = IP_CallExp_source.evaluate(evaluator, T_Pivot_ecore__pivot__OclExpression, self, P_CallExp_source);
Value A_symbol_134 = IP_TypedElement_type.evaluate(evaluator, T_Pivot_ecore__pivot__Type, A_symbol_133, P_TypedElement_type);
DomainType static_A_symbol_135 = valueFactory.typeOf(A_symbol_134);
LibraryBinaryOperation dynamic_A_symbol_135 = (LibraryBinaryOperation)static_A_symbol_135.lookupImplementation(standardLibrary, O_OclAny_oclIsKindOf);
Value A_symbol_135 = dynamic_A_symbol_135.evaluate(evaluator, T_Boolean, A_symbol_134, T_ClassClassifier_Pivot_ecore__pivot__SequenceType_);
leftA_symbol_132 = A_symbol_135;
} catch (InvalidValueException e) {
leftA_symbol_132 = valueFactory.createInvalidValue(e);
}
Value A_symbol_135 = leftA_symbol_132;
Value rightA_symbol_132;
try {
Value A_symbol_136 = IP_CallExp_source.evaluate(evaluator, T_Pivot_ecore__pivot__OclExpression, self, P_CallExp_source);
Value A_symbol_137 = IP_TypedElement_type.evaluate(evaluator, T_Pivot_ecore__pivot__Type, A_symbol_136, P_TypedElement_type);
DomainType static_A_symbol_138 = valueFactory.typeOf(A_symbol_137);
LibraryBinaryOperation dynamic_A_symbol_138 = (LibraryBinaryOperation)static_A_symbol_138.lookupImplementation(standardLibrary, O_OclAny_oclIsKindOf);
Value A_symbol_138 = dynamic_A_symbol_138.evaluate(evaluator, T_Boolean, A_symbol_137, T_ClassClassifier_Pivot_ecore__pivot__OrderedSetType_);
rightA_symbol_132 = A_symbol_138;
} catch (InvalidValueException e) {
rightA_symbol_132 = valueFactory.createInvalidValue(e);
}
Value A_symbol_138 = rightA_symbol_132;
DomainType static_A_symbol_132 = valueFactory.typeOf(A_symbol_135);
LibraryBinaryOperation dynamic_A_symbol_132 = (LibraryBinaryOperation)static_A_symbol_132.lookupImplementation(standardLibrary, O_Boolean_or);
Value A_symbol_132 = dynamic_A_symbol_132.evaluate(evaluator, T_Boolean, A_symbol_135, A_symbol_138);
Value A_symbol_139;
if (A_symbol_132.isTrue()) {
Value A_symbol_140 = IP_TypedElement_type.evaluate(evaluator, T_Pivot_ecore__pivot__Type, self, P_TypedElement_type);
DomainType static_A_symbol_141 = valueFactory.typeOf(A_symbol_140);
LibraryBinaryOperation dynamic_A_symbol_141 = (LibraryBinaryOperation)static_A_symbol_141.lookupImplementation(standardLibrary, O_OclAny_oclIsKindOf);
Value A_symbol_141 = dynamic_A_symbol_141.evaluate(evaluator, T_Boolean, A_symbol_140, T_ClassClassifier_Pivot_ecore__pivot__OrderedSetType_);
A_symbol_139 = A_symbol_141;
}
else if (A_symbol_132.isFalse()) {
Value A_symbol_142 = IP_TypedElement_type.evaluate(evaluator, T_Pivot_ecore__pivot__Type, self, P_TypedElement_type);
DomainType static_A_symbol_143 = valueFactory.typeOf(A_symbol_142);
LibraryBinaryOperation dynamic_A_symbol_143 = (LibraryBinaryOperation)static_A_symbol_143.lookupImplementation(standardLibrary, O_OclAny_oclIsKindOf);
Value A_symbol_143 = dynamic_A_symbol_143.evaluate(evaluator, T_Boolean, A_symbol_142, T_ClassClassifier_Pivot_ecore__pivot__SetType_);
A_symbol_139 = A_symbol_143;
}
else if (A_symbol_132.isNull()) {
A_symbol_139 = valueFactory.throwInvalidValueException("null if condition");
}
else {
A_symbol_139 = valueFactory.throwInvalidValueException("invalid if condition");
}
rightA_symbol_129 = A_symbol_139;
} catch (InvalidValueException e) {
rightA_symbol_129 = valueFactory.createInvalidValue(e);
}
Value A_symbol_139 = rightA_symbol_129;
DomainType static_A_symbol_129 = valueFactory.typeOf(A_symbol_131);
LibraryBinaryOperation dynamic_A_symbol_129 = (LibraryBinaryOperation)static_A_symbol_129.lookupImplementation(standardLibrary, O_Boolean_implies);
Value A_symbol_129 = dynamic_A_symbol_129.evaluate(evaluator, T_Boolean, A_symbol_131, A_symbol_139);
return A_symbol_129;
}
}
/**
* Implementation of the IteratorExp 'CollectElementTypeIsSourceElementType' invariant.
*/
public static class _invariant_CollectElementTypeIsSourceElementType extends AbstractUnaryOperation
{
public static _invariant_CollectElementTypeIsSourceElementType INSTANCE = new _invariant_CollectElementTypeIsSourceElementType();
/*
name = 'collect' implies
type.oclAsType(CollectionType).elementType =
body.type.oclAsType(CollectionType).elementType
*/
public Value evaluate(DomainEvaluator evaluator, DomainType returnType, final Value self) throws InvalidValueException {
final ValueFactory valueFactory = evaluator.getValueFactory();
final DomainStandardLibrary standardLibrary = valueFactory.getStandardLibrary();
final ExecutorType T_Boolean = OCLstdlibTables.Types._Boolean;
final ExecutorOperation O_Boolean_implies = OCLstdlibTables.Operations._Boolean__implies;
final ExecutorOperation O_String__eq_ = OCLstdlibTables.Operations._String___eq_;
final ExecutorType T_String = OCLstdlibTables.Types._String;
final ExecutorProperty P_NamedElement_name = PivotTables.Properties._NamedElement__name;
final LibraryProperty IP_NamedElement_name = P_NamedElement_name.getImplementation();
final StringValue S_collect = valueFactory.stringValueOf("collect");
final ExecutorOperation O_OclAny__eq_ = OCLstdlibTables.Operations._OclAny___eq_;
final ExecutorType T_Pivot_ecore__pivot__Type = PivotTables.Types._Type;
final ExecutorProperty P_CollectionType_elementType = PivotTables.Properties._CollectionType__elementType;
final LibraryProperty IP_CollectionType_elementType = P_CollectionType_elementType.getImplementation();
final ExecutorType T_Pivot_ecore__pivot__CollectionType = PivotTables.Types._CollectionType;
final ExecutorOperation O_OclAny_oclAsType = OCLstdlibTables.Operations._OclAny__oclAsType;
final ExecutorProperty P_TypedElement_type = PivotTables.Properties._TypedElement__type;
final LibraryProperty IP_TypedElement_type = P_TypedElement_type.getImplementation();
final Value T_ClassClassifier_Pivot_ecore__pivot__CollectionType_ = valueFactory.createTypeValue(PivotTables.Types._CollectionType);
final ExecutorType T_Pivot_ecore__pivot__OclExpression = PivotTables.Types._OclExpression;
final ExecutorProperty P_LoopExp_body = PivotTables.Properties._LoopExp__body;
final LibraryProperty IP_LoopExp_body = P_LoopExp_body.getImplementation();
Value leftA_symbol_144;
try {
Value A_symbol_145 = IP_NamedElement_name.evaluate(evaluator, T_String, self, P_NamedElement_name);
DomainType static_A_symbol_146 = valueFactory.typeOf(A_symbol_145, S_collect);
LibraryBinaryOperation dynamic_A_symbol_146 = (LibraryBinaryOperation)static_A_symbol_146.lookupImplementation(standardLibrary, O_String__eq_);
Value A_symbol_146 = dynamic_A_symbol_146.evaluate(evaluator, T_Boolean, A_symbol_145, S_collect);
leftA_symbol_144 = A_symbol_146;
} catch (InvalidValueException e) {
leftA_symbol_144 = valueFactory.createInvalidValue(e);
}
Value A_symbol_146 = leftA_symbol_144;
Value rightA_symbol_144;
try {
Value A_symbol_147 = IP_TypedElement_type.evaluate(evaluator, T_Pivot_ecore__pivot__Type, self, P_TypedElement_type);
DomainType static_A_symbol_148 = valueFactory.typeOf(A_symbol_147);
LibraryBinaryOperation dynamic_A_symbol_148 = (LibraryBinaryOperation)static_A_symbol_148.lookupImplementation(standardLibrary, O_OclAny_oclAsType);
Value A_symbol_148 = dynamic_A_symbol_148.evaluate(evaluator, T_Pivot_ecore__pivot__CollectionType, A_symbol_147, T_ClassClassifier_Pivot_ecore__pivot__CollectionType_);
Value A_symbol_149 = IP_CollectionType_elementType.evaluate(evaluator, T_Pivot_ecore__pivot__Type, A_symbol_148, P_CollectionType_elementType);
Value A_symbol_150 = IP_LoopExp_body.evaluate(evaluator, T_Pivot_ecore__pivot__OclExpression, self, P_LoopExp_body);
Value A_symbol_151 = IP_TypedElement_type.evaluate(evaluator, T_Pivot_ecore__pivot__Type, A_symbol_150, P_TypedElement_type);
DomainType static_A_symbol_152 = valueFactory.typeOf(A_symbol_151);
LibraryBinaryOperation dynamic_A_symbol_152 = (LibraryBinaryOperation)static_A_symbol_152.lookupImplementation(standardLibrary, O_OclAny_oclAsType);
Value A_symbol_152 = dynamic_A_symbol_152.evaluate(evaluator, T_Pivot_ecore__pivot__CollectionType, A_symbol_151, T_ClassClassifier_Pivot_ecore__pivot__CollectionType_);
Value A_symbol_153 = IP_CollectionType_elementType.evaluate(evaluator, T_Pivot_ecore__pivot__Type, A_symbol_152, P_CollectionType_elementType);
DomainType static_A_symbol_154 = valueFactory.typeOf(A_symbol_149, A_symbol_153);
LibraryBinaryOperation dynamic_A_symbol_154 = (LibraryBinaryOperation)static_A_symbol_154.lookupImplementation(standardLibrary, O_OclAny__eq_);
Value A_symbol_154 = dynamic_A_symbol_154.evaluate(evaluator, T_Boolean, A_symbol_149, A_symbol_153);
rightA_symbol_144 = A_symbol_154;
} catch (InvalidValueException e) {
rightA_symbol_144 = valueFactory.createInvalidValue(e);
}
Value A_symbol_154 = rightA_symbol_144;
DomainType static_A_symbol_144 = valueFactory.typeOf(A_symbol_146);
LibraryBinaryOperation dynamic_A_symbol_144 = (LibraryBinaryOperation)static_A_symbol_144.lookupImplementation(standardLibrary, O_Boolean_implies);
Value A_symbol_144 = dynamic_A_symbol_144.evaluate(evaluator, T_Boolean, A_symbol_146, A_symbol_154);
return A_symbol_144;
}
}
/**
* Implementation of the IteratorExp 'CollectHasOneIterator' invariant.
*/
public static class _invariant_CollectHasOneIterator extends AbstractUnaryOperation
{
public static _invariant_CollectHasOneIterator INSTANCE = new _invariant_CollectHasOneIterator();
/*
name = 'collect' implies iterator->size() = 1
*/
public Value evaluate(DomainEvaluator evaluator, DomainType returnType, final Value self) throws InvalidValueException {
final ValueFactory valueFactory = evaluator.getValueFactory();
final DomainStandardLibrary standardLibrary = valueFactory.getStandardLibrary();
final ExecutorType T_Boolean = OCLstdlibTables.Types._Boolean;
final ExecutorOperation O_Boolean_implies = OCLstdlibTables.Operations._Boolean__implies;
final ExecutorOperation O_String__eq_ = OCLstdlibTables.Operations._String___eq_;
final ExecutorType T_String = OCLstdlibTables.Types._String;
final ExecutorProperty P_NamedElement_name = PivotTables.Properties._NamedElement__name;
final LibraryProperty IP_NamedElement_name = P_NamedElement_name.getImplementation();
final StringValue S_collect = valueFactory.stringValueOf("collect");
final ExecutorOperation O_Real__eq_ = OCLstdlibTables.Operations._Real___eq_;
final ExecutorType T_Integer = OCLstdlibTables.Types._Integer;
final ExecutorOperation O_Collection_size = OCLstdlibTables.Operations._Collection__size;
final ExecutorType T_Pivot_ecore__pivot__Variable = PivotTables.Types._Variable;
final DomainCollectionType T_OrderedSet_Pivot_ecore__pivot__Variable_ = standardLibrary.getOrderedSetType(T_Pivot_ecore__pivot__Variable);
final ExecutorProperty P_LoopExp_iterator = PivotTables.Properties._LoopExp__iterator;
final LibraryProperty IP_LoopExp_iterator = P_LoopExp_iterator.getImplementation();
final IntegerValue I_1 = valueFactory.integerValueOf(1);
Value leftA_symbol_155;
try {
Value A_symbol_156 = IP_NamedElement_name.evaluate(evaluator, T_String, self, P_NamedElement_name);
DomainType static_A_symbol_157 = valueFactory.typeOf(A_symbol_156, S_collect);
LibraryBinaryOperation dynamic_A_symbol_157 = (LibraryBinaryOperation)static_A_symbol_157.lookupImplementation(standardLibrary, O_String__eq_);
Value A_symbol_157 = dynamic_A_symbol_157.evaluate(evaluator, T_Boolean, A_symbol_156, S_collect);
leftA_symbol_155 = A_symbol_157;
} catch (InvalidValueException e) {
leftA_symbol_155 = valueFactory.createInvalidValue(e);
}
Value A_symbol_157 = leftA_symbol_155;
Value rightA_symbol_155;
try {
Value A_symbol_158 = IP_LoopExp_iterator.evaluate(evaluator, T_OrderedSet_Pivot_ecore__pivot__Variable_, self, P_LoopExp_iterator);
DomainType static_A_symbol_159 = valueFactory.typeOf(A_symbol_158);
LibraryUnaryOperation dynamic_A_symbol_159 = (LibraryUnaryOperation)static_A_symbol_159.lookupImplementation(standardLibrary, O_Collection_size);
Value A_symbol_159 = dynamic_A_symbol_159.evaluate(evaluator, T_Integer, A_symbol_158);
DomainType static_A_symbol_160 = valueFactory.typeOf(A_symbol_159, I_1);
LibraryBinaryOperation dynamic_A_symbol_160 = (LibraryBinaryOperation)static_A_symbol_160.lookupImplementation(standardLibrary, O_Real__eq_);
Value A_symbol_160 = dynamic_A_symbol_160.evaluate(evaluator, T_Boolean, A_symbol_159, I_1);
rightA_symbol_155 = A_symbol_160;
} catch (InvalidValueException e) {
rightA_symbol_155 = valueFactory.createInvalidValue(e);
}
Value A_symbol_160 = rightA_symbol_155;
DomainType static_A_symbol_155 = valueFactory.typeOf(A_symbol_157);
LibraryBinaryOperation dynamic_A_symbol_155 = (LibraryBinaryOperation)static_A_symbol_155.lookupImplementation(standardLibrary, O_Boolean_implies);
Value A_symbol_155 = dynamic_A_symbol_155.evaluate(evaluator, T_Boolean, A_symbol_157, A_symbol_160);
return A_symbol_155;
}
}
/**
* Implementation of the IteratorExp 'CollectNestedHasOneIterator' invariant.
*/
public static class _invariant_CollectNestedHasOneIterator extends AbstractUnaryOperation
{
public static _invariant_CollectNestedHasOneIterator INSTANCE = new _invariant_CollectNestedHasOneIterator();
/*
name = 'collectNested' implies iterator->size() = 1
*/
public Value evaluate(DomainEvaluator evaluator, DomainType returnType, final Value self) throws InvalidValueException {
final ValueFactory valueFactory = evaluator.getValueFactory();
final DomainStandardLibrary standardLibrary = valueFactory.getStandardLibrary();
final ExecutorType T_Boolean = OCLstdlibTables.Types._Boolean;
final ExecutorOperation O_Boolean_implies = OCLstdlibTables.Operations._Boolean__implies;
final ExecutorOperation O_String__eq_ = OCLstdlibTables.Operations._String___eq_;
final ExecutorType T_String = OCLstdlibTables.Types._String;
final ExecutorProperty P_NamedElement_name = PivotTables.Properties._NamedElement__name;
final LibraryProperty IP_NamedElement_name = P_NamedElement_name.getImplementation();
final StringValue S_collectN___ = valueFactory.stringValueOf("collectNested");
final ExecutorOperation O_Real__eq_ = OCLstdlibTables.Operations._Real___eq_;
final ExecutorType T_Integer = OCLstdlibTables.Types._Integer;
final ExecutorOperation O_Collection_size = OCLstdlibTables.Operations._Collection__size;
final ExecutorType T_Pivot_ecore__pivot__Variable = PivotTables.Types._Variable;
final DomainCollectionType T_OrderedSet_Pivot_ecore__pivot__Variable_ = standardLibrary.getOrderedSetType(T_Pivot_ecore__pivot__Variable);
final ExecutorProperty P_LoopExp_iterator = PivotTables.Properties._LoopExp__iterator;
final LibraryProperty IP_LoopExp_iterator = P_LoopExp_iterator.getImplementation();
final IntegerValue I_1 = valueFactory.integerValueOf(1);
Value leftA_symbol_161;
try {
Value A_symbol_162 = IP_NamedElement_name.evaluate(evaluator, T_String, self, P_NamedElement_name);
DomainType static_A_symbol_163 = valueFactory.typeOf(A_symbol_162, S_collectN___);
LibraryBinaryOperation dynamic_A_symbol_163 = (LibraryBinaryOperation)static_A_symbol_163.lookupImplementation(standardLibrary, O_String__eq_);
Value A_symbol_163 = dynamic_A_symbol_163.evaluate(evaluator, T_Boolean, A_symbol_162, S_collectN___);
leftA_symbol_161 = A_symbol_163;
} catch (InvalidValueException e) {
leftA_symbol_161 = valueFactory.createInvalidValue(e);
}
Value A_symbol_163 = leftA_symbol_161;
Value rightA_symbol_161;
try {
Value A_symbol_164 = IP_LoopExp_iterator.evaluate(evaluator, T_OrderedSet_Pivot_ecore__pivot__Variable_, self, P_LoopExp_iterator);
DomainType static_A_symbol_165 = valueFactory.typeOf(A_symbol_164);
LibraryUnaryOperation dynamic_A_symbol_165 = (LibraryUnaryOperation)static_A_symbol_165.lookupImplementation(standardLibrary, O_Collection_size);
Value A_symbol_165 = dynamic_A_symbol_165.evaluate(evaluator, T_Integer, A_symbol_164);
DomainType static_A_symbol_166 = valueFactory.typeOf(A_symbol_165, I_1);
LibraryBinaryOperation dynamic_A_symbol_166 = (LibraryBinaryOperation)static_A_symbol_166.lookupImplementation(standardLibrary, O_Real__eq_);
Value A_symbol_166 = dynamic_A_symbol_166.evaluate(evaluator, T_Boolean, A_symbol_165, I_1);
rightA_symbol_161 = A_symbol_166;
} catch (InvalidValueException e) {
rightA_symbol_161 = valueFactory.createInvalidValue(e);
}
Value A_symbol_166 = rightA_symbol_161;
DomainType static_A_symbol_161 = valueFactory.typeOf(A_symbol_163);
LibraryBinaryOperation dynamic_A_symbol_161 = (LibraryBinaryOperation)static_A_symbol_161.lookupImplementation(standardLibrary, O_Boolean_implies);
Value A_symbol_161 = dynamic_A_symbol_161.evaluate(evaluator, T_Boolean, A_symbol_163, A_symbol_166);
return A_symbol_161;
}
}
/**
* Implementation of the IteratorExp 'CollectNestedTypeIsBag' invariant.
*/
public static class _invariant_CollectNestedTypeIsBag extends AbstractUnaryOperation
{
public static _invariant_CollectNestedTypeIsBag INSTANCE = new _invariant_CollectNestedTypeIsBag();
/*
name = 'collectNested' implies type.oclIsKindOf(BagType)
*/
public Value evaluate(DomainEvaluator evaluator, DomainType returnType, final Value self) throws InvalidValueException {
final ValueFactory valueFactory = evaluator.getValueFactory();
final DomainStandardLibrary standardLibrary = valueFactory.getStandardLibrary();
final ExecutorType T_Boolean = OCLstdlibTables.Types._Boolean;
final ExecutorOperation O_Boolean_implies = OCLstdlibTables.Operations._Boolean__implies;
final ExecutorOperation O_String__eq_ = OCLstdlibTables.Operations._String___eq_;
final ExecutorType T_String = OCLstdlibTables.Types._String;
final ExecutorProperty P_NamedElement_name = PivotTables.Properties._NamedElement__name;
final LibraryProperty IP_NamedElement_name = P_NamedElement_name.getImplementation();
final StringValue S_collectN___ = valueFactory.stringValueOf("collectNested");
final ExecutorOperation O_OclAny_oclIsKindOf = OCLstdlibTables.Operations._OclAny__oclIsKindOf;
final ExecutorType T_Pivot_ecore__pivot__Type = PivotTables.Types._Type;
final ExecutorProperty P_TypedElement_type = PivotTables.Properties._TypedElement__type;
final LibraryProperty IP_TypedElement_type = P_TypedElement_type.getImplementation();
final Value T_ClassClassifier_Pivot_ecore__pivot__BagType_ = valueFactory.createTypeValue(PivotTables.Types._BagType);
Value leftA_symbol_167;
try {
Value A_symbol_168 = IP_NamedElement_name.evaluate(evaluator, T_String, self, P_NamedElement_name);
DomainType static_A_symbol_169 = valueFactory.typeOf(A_symbol_168, S_collectN___);
LibraryBinaryOperation dynamic_A_symbol_169 = (LibraryBinaryOperation)static_A_symbol_169.lookupImplementation(standardLibrary, O_String__eq_);
Value A_symbol_169 = dynamic_A_symbol_169.evaluate(evaluator, T_Boolean, A_symbol_168, S_collectN___);
leftA_symbol_167 = A_symbol_169;
} catch (InvalidValueException e) {
leftA_symbol_167 = valueFactory.createInvalidValue(e);
}
Value A_symbol_169 = leftA_symbol_167;
Value rightA_symbol_167;
try {
Value A_symbol_170 = IP_TypedElement_type.evaluate(evaluator, T_Pivot_ecore__pivot__Type, self, P_TypedElement_type);
DomainType static_A_symbol_171 = valueFactory.typeOf(A_symbol_170);
LibraryBinaryOperation dynamic_A_symbol_171 = (LibraryBinaryOperation)static_A_symbol_171.lookupImplementation(standardLibrary, O_OclAny_oclIsKindOf);
Value A_symbol_171 = dynamic_A_symbol_171.evaluate(evaluator, T_Boolean, A_symbol_170, T_ClassClassifier_Pivot_ecore__pivot__BagType_);
rightA_symbol_167 = A_symbol_171;
} catch (InvalidValueException e) {
rightA_symbol_167 = valueFactory.createInvalidValue(e);
}
Value A_symbol_171 = rightA_symbol_167;
DomainType static_A_symbol_167 = valueFactory.typeOf(A_symbol_169);
LibraryBinaryOperation dynamic_A_symbol_167 = (LibraryBinaryOperation)static_A_symbol_167.lookupImplementation(standardLibrary, O_Boolean_implies);
Value A_symbol_167 = dynamic_A_symbol_167.evaluate(evaluator, T_Boolean, A_symbol_169, A_symbol_171);
return A_symbol_167;
}
}
/**
* Implementation of the IteratorExp 'CollectNestedTypeIsBodyType' invariant.
*/
public static class _invariant_CollectNestedTypeIsBodyType extends AbstractUnaryOperation
{
public static _invariant_CollectNestedTypeIsBodyType INSTANCE = new _invariant_CollectNestedTypeIsBodyType();
/*
name = 'collectNested' implies type = body.type
*/
public Value evaluate(DomainEvaluator evaluator, DomainType returnType, final Value self) throws InvalidValueException {
final ValueFactory valueFactory = evaluator.getValueFactory();
final DomainStandardLibrary standardLibrary = valueFactory.getStandardLibrary();
final ExecutorType T_Boolean = OCLstdlibTables.Types._Boolean;
final ExecutorOperation O_Boolean_implies = OCLstdlibTables.Operations._Boolean__implies;
final ExecutorOperation O_String__eq_ = OCLstdlibTables.Operations._String___eq_;
final ExecutorType T_String = OCLstdlibTables.Types._String;
final ExecutorProperty P_NamedElement_name = PivotTables.Properties._NamedElement__name;
final LibraryProperty IP_NamedElement_name = P_NamedElement_name.getImplementation();
final StringValue S_collectN___ = valueFactory.stringValueOf("collectNested");
final ExecutorOperation O_OclAny__eq_ = OCLstdlibTables.Operations._OclAny___eq_;
final ExecutorType T_Pivot_ecore__pivot__Type = PivotTables.Types._Type;
final ExecutorProperty P_TypedElement_type = PivotTables.Properties._TypedElement__type;
final LibraryProperty IP_TypedElement_type = P_TypedElement_type.getImplementation();
final ExecutorType T_Pivot_ecore__pivot__OclExpression = PivotTables.Types._OclExpression;
final ExecutorProperty P_LoopExp_body = PivotTables.Properties._LoopExp__body;
final LibraryProperty IP_LoopExp_body = P_LoopExp_body.getImplementation();
Value leftA_symbol_172;
try {
Value A_symbol_173 = IP_NamedElement_name.evaluate(evaluator, T_String, self, P_NamedElement_name);
DomainType static_A_symbol_174 = valueFactory.typeOf(A_symbol_173, S_collectN___);
LibraryBinaryOperation dynamic_A_symbol_174 = (LibraryBinaryOperation)static_A_symbol_174.lookupImplementation(standardLibrary, O_String__eq_);
Value A_symbol_174 = dynamic_A_symbol_174.evaluate(evaluator, T_Boolean, A_symbol_173, S_collectN___);
leftA_symbol_172 = A_symbol_174;
} catch (InvalidValueException e) {
leftA_symbol_172 = valueFactory.createInvalidValue(e);
}
Value A_symbol_174 = leftA_symbol_172;
Value rightA_symbol_172;
try {
Value A_symbol_175 = IP_TypedElement_type.evaluate(evaluator, T_Pivot_ecore__pivot__Type, self, P_TypedElement_type);
Value A_symbol_176 = IP_LoopExp_body.evaluate(evaluator, T_Pivot_ecore__pivot__OclExpression, self, P_LoopExp_body);
Value A_symbol_177 = IP_TypedElement_type.evaluate(evaluator, T_Pivot_ecore__pivot__Type, A_symbol_176, P_TypedElement_type);
DomainType static_A_symbol_178 = valueFactory.typeOf(A_symbol_175, A_symbol_177);
LibraryBinaryOperation dynamic_A_symbol_178 = (LibraryBinaryOperation)static_A_symbol_178.lookupImplementation(standardLibrary, O_OclAny__eq_);
Value A_symbol_178 = dynamic_A_symbol_178.evaluate(evaluator, T_Boolean, A_symbol_175, A_symbol_177);
rightA_symbol_172 = A_symbol_178;
} catch (InvalidValueException e) {
rightA_symbol_172 = valueFactory.createInvalidValue(e);
}
Value A_symbol_178 = rightA_symbol_172;
DomainType static_A_symbol_172 = valueFactory.typeOf(A_symbol_174);
LibraryBinaryOperation dynamic_A_symbol_172 = (LibraryBinaryOperation)static_A_symbol_172.lookupImplementation(standardLibrary, O_Boolean_implies);
Value A_symbol_172 = dynamic_A_symbol_172.evaluate(evaluator, T_Boolean, A_symbol_174, A_symbol_178);
return A_symbol_172;
}
}
/**
* Implementation of the IteratorExp 'CollectTypeIsUnordered' invariant.
*/
public static class _invariant_CollectTypeIsUnordered extends AbstractUnaryOperation
{
public static _invariant_CollectTypeIsUnordered INSTANCE = new _invariant_CollectTypeIsUnordered();
/*
name = 'collect' implies
if
source.type.oclIsKindOf(SequenceType) or
source.type.oclIsKindOf(OrderedSetType)
then type.oclIsKindOf(SequenceType)
else type.oclIsKindOf(BagType)
endif
*/
public Value evaluate(DomainEvaluator evaluator, DomainType returnType, final Value self) throws InvalidValueException {
final ValueFactory valueFactory = evaluator.getValueFactory();
final DomainStandardLibrary standardLibrary = valueFactory.getStandardLibrary();
final ExecutorType T_Boolean = OCLstdlibTables.Types._Boolean;
final ExecutorOperation O_Boolean_implies = OCLstdlibTables.Operations._Boolean__implies;
final ExecutorOperation O_String__eq_ = OCLstdlibTables.Operations._String___eq_;
final ExecutorType T_String = OCLstdlibTables.Types._String;
final ExecutorProperty P_NamedElement_name = PivotTables.Properties._NamedElement__name;
final LibraryProperty IP_NamedElement_name = P_NamedElement_name.getImplementation();
final StringValue S_collect = valueFactory.stringValueOf("collect");
final ExecutorOperation O_Boolean_or = OCLstdlibTables.Operations._Boolean__or;
final ExecutorOperation O_OclAny_oclIsKindOf = OCLstdlibTables.Operations._OclAny__oclIsKindOf;
final ExecutorType T_Pivot_ecore__pivot__Type = PivotTables.Types._Type;
final ExecutorProperty P_TypedElement_type = PivotTables.Properties._TypedElement__type;
final LibraryProperty IP_TypedElement_type = P_TypedElement_type.getImplementation();
final ExecutorType T_Pivot_ecore__pivot__OclExpression = PivotTables.Types._OclExpression;
final ExecutorProperty P_CallExp_source = PivotTables.Properties._CallExp__source;
final LibraryProperty IP_CallExp_source = P_CallExp_source.getImplementation();
final Value T_ClassClassifier_Pivot_ecore__pivot__SequenceType_ = valueFactory.createTypeValue(PivotTables.Types._SequenceType);
final Value T_ClassClassifier_Pivot_ecore__pivot__OrderedSetType_ = valueFactory.createTypeValue(PivotTables.Types._OrderedSetType);
final Value T_ClassClassifier_Pivot_ecore__pivot__BagType_ = valueFactory.createTypeValue(PivotTables.Types._BagType);
Value leftA_symbol_179;
try {
Value A_symbol_180 = IP_NamedElement_name.evaluate(evaluator, T_String, self, P_NamedElement_name);
DomainType static_A_symbol_181 = valueFactory.typeOf(A_symbol_180, S_collect);
LibraryBinaryOperation dynamic_A_symbol_181 = (LibraryBinaryOperation)static_A_symbol_181.lookupImplementation(standardLibrary, O_String__eq_);
Value A_symbol_181 = dynamic_A_symbol_181.evaluate(evaluator, T_Boolean, A_symbol_180, S_collect);
leftA_symbol_179 = A_symbol_181;
} catch (InvalidValueException e) {
leftA_symbol_179 = valueFactory.createInvalidValue(e);
}
Value A_symbol_181 = leftA_symbol_179;
Value rightA_symbol_179;
try {
Value leftA_symbol_182;
try {
Value A_symbol_183 = IP_CallExp_source.evaluate(evaluator, T_Pivot_ecore__pivot__OclExpression, self, P_CallExp_source);
Value A_symbol_184 = IP_TypedElement_type.evaluate(evaluator, T_Pivot_ecore__pivot__Type, A_symbol_183, P_TypedElement_type);
DomainType static_A_symbol_185 = valueFactory.typeOf(A_symbol_184);
LibraryBinaryOperation dynamic_A_symbol_185 = (LibraryBinaryOperation)static_A_symbol_185.lookupImplementation(standardLibrary, O_OclAny_oclIsKindOf);
Value A_symbol_185 = dynamic_A_symbol_185.evaluate(evaluator, T_Boolean, A_symbol_184, T_ClassClassifier_Pivot_ecore__pivot__SequenceType_);
leftA_symbol_182 = A_symbol_185;
} catch (InvalidValueException e) {
leftA_symbol_182 = valueFactory.createInvalidValue(e);
}
Value A_symbol_185 = leftA_symbol_182;
Value rightA_symbol_182;
try {
Value A_symbol_186 = IP_CallExp_source.evaluate(evaluator, T_Pivot_ecore__pivot__OclExpression, self, P_CallExp_source);
Value A_symbol_187 = IP_TypedElement_type.evaluate(evaluator, T_Pivot_ecore__pivot__Type, A_symbol_186, P_TypedElement_type);
DomainType static_A_symbol_188 = valueFactory.typeOf(A_symbol_187);
LibraryBinaryOperation dynamic_A_symbol_188 = (LibraryBinaryOperation)static_A_symbol_188.lookupImplementation(standardLibrary, O_OclAny_oclIsKindOf);
Value A_symbol_188 = dynamic_A_symbol_188.evaluate(evaluator, T_Boolean, A_symbol_187, T_ClassClassifier_Pivot_ecore__pivot__OrderedSetType_);
rightA_symbol_182 = A_symbol_188;
} catch (InvalidValueException e) {
rightA_symbol_182 = valueFactory.createInvalidValue(e);
}
Value A_symbol_188 = rightA_symbol_182;
DomainType static_A_symbol_182 = valueFactory.typeOf(A_symbol_185);
LibraryBinaryOperation dynamic_A_symbol_182 = (LibraryBinaryOperation)static_A_symbol_182.lookupImplementation(standardLibrary, O_Boolean_or);
Value A_symbol_182 = dynamic_A_symbol_182.evaluate(evaluator, T_Boolean, A_symbol_185, A_symbol_188);
Value A_symbol_189;
if (A_symbol_182.isTrue()) {
Value A_symbol_190 = IP_TypedElement_type.evaluate(evaluator, T_Pivot_ecore__pivot__Type, self, P_TypedElement_type);
DomainType static_A_symbol_191 = valueFactory.typeOf(A_symbol_190);
LibraryBinaryOperation dynamic_A_symbol_191 = (LibraryBinaryOperation)static_A_symbol_191.lookupImplementation(standardLibrary, O_OclAny_oclIsKindOf);
Value A_symbol_191 = dynamic_A_symbol_191.evaluate(evaluator, T_Boolean, A_symbol_190, T_ClassClassifier_Pivot_ecore__pivot__SequenceType_);
A_symbol_189 = A_symbol_191;
}
else if (A_symbol_182.isFalse()) {
Value A_symbol_192 = IP_TypedElement_type.evaluate(evaluator, T_Pivot_ecore__pivot__Type, self, P_TypedElement_type);
DomainType static_A_symbol_193 = valueFactory.typeOf(A_symbol_192);
LibraryBinaryOperation dynamic_A_symbol_193 = (LibraryBinaryOperation)static_A_symbol_193.lookupImplementation(standardLibrary, O_OclAny_oclIsKindOf);
Value A_symbol_193 = dynamic_A_symbol_193.evaluate(evaluator, T_Boolean, A_symbol_192, T_ClassClassifier_Pivot_ecore__pivot__BagType_);
A_symbol_189 = A_symbol_193;
}
else if (A_symbol_182.isNull()) {
A_symbol_189 = valueFactory.throwInvalidValueException("null if condition");
}
else {
A_symbol_189 = valueFactory.throwInvalidValueException("invalid if condition");
}
rightA_symbol_179 = A_symbol_189;
} catch (InvalidValueException e) {
rightA_symbol_179 = valueFactory.createInvalidValue(e);
}
Value A_symbol_189 = rightA_symbol_179;
DomainType static_A_symbol_179 = valueFactory.typeOf(A_symbol_181);
LibraryBinaryOperation dynamic_A_symbol_179 = (LibraryBinaryOperation)static_A_symbol_179.lookupImplementation(standardLibrary, O_Boolean_implies);
Value A_symbol_179 = dynamic_A_symbol_179.evaluate(evaluator, T_Boolean, A_symbol_181, A_symbol_189);
return A_symbol_179;
}
}
/**
* Implementation of the IteratorExp 'ExistsBodyTypeIsBoolean' invariant.
*/
public static class _invariant_ExistsBodyTypeIsBoolean extends AbstractUnaryOperation
{
public static _invariant_ExistsBodyTypeIsBoolean INSTANCE = new _invariant_ExistsBodyTypeIsBoolean();
/*
name = 'exists' implies body.type = Boolean
*/
public Value evaluate(DomainEvaluator evaluator, DomainType returnType, final Value self) throws InvalidValueException {
final ValueFactory valueFactory = evaluator.getValueFactory();
final DomainStandardLibrary standardLibrary = valueFactory.getStandardLibrary();
final ExecutorType T_Boolean = OCLstdlibTables.Types._Boolean;
final ExecutorOperation O_Boolean_implies = OCLstdlibTables.Operations._Boolean__implies;
final ExecutorOperation O_String__eq_ = OCLstdlibTables.Operations._String___eq_;
final ExecutorType T_String = OCLstdlibTables.Types._String;
final ExecutorProperty P_NamedElement_name = PivotTables.Properties._NamedElement__name;
final LibraryProperty IP_NamedElement_name = P_NamedElement_name.getImplementation();
final StringValue S_exists = valueFactory.stringValueOf("exists");
final ExecutorOperation O_OclAny__eq_ = OCLstdlibTables.Operations._OclAny___eq_;
final ExecutorType T_Pivot_ecore__pivot__Type = PivotTables.Types._Type;
final ExecutorProperty P_TypedElement_type = PivotTables.Properties._TypedElement__type;
final LibraryProperty IP_TypedElement_type = P_TypedElement_type.getImplementation();
final ExecutorType T_Pivot_ecore__pivot__OclExpression = PivotTables.Types._OclExpression;
final ExecutorProperty P_LoopExp_body = PivotTables.Properties._LoopExp__body;
final LibraryProperty IP_LoopExp_body = P_LoopExp_body.getImplementation();
final Value T_ClassClassifier_Boolean_ = valueFactory.createTypeValue(OCLstdlibTables.Types._Boolean);
Value leftA_symbol_194;
try {
Value A_symbol_195 = IP_NamedElement_name.evaluate(evaluator, T_String, self, P_NamedElement_name);
DomainType static_A_symbol_196 = valueFactory.typeOf(A_symbol_195, S_exists);
LibraryBinaryOperation dynamic_A_symbol_196 = (LibraryBinaryOperation)static_A_symbol_196.lookupImplementation(standardLibrary, O_String__eq_);
Value A_symbol_196 = dynamic_A_symbol_196.evaluate(evaluator, T_Boolean, A_symbol_195, S_exists);
leftA_symbol_194 = A_symbol_196;
} catch (InvalidValueException e) {
leftA_symbol_194 = valueFactory.createInvalidValue(e);
}
Value A_symbol_196 = leftA_symbol_194;
Value rightA_symbol_194;
try {
Value A_symbol_197 = IP_LoopExp_body.evaluate(evaluator, T_Pivot_ecore__pivot__OclExpression, self, P_LoopExp_body);
Value A_symbol_198 = IP_TypedElement_type.evaluate(evaluator, T_Pivot_ecore__pivot__Type, A_symbol_197, P_TypedElement_type);
DomainType static_A_symbol_199 = valueFactory.typeOf(A_symbol_198, T_ClassClassifier_Boolean_);
LibraryBinaryOperation dynamic_A_symbol_199 = (LibraryBinaryOperation)static_A_symbol_199.lookupImplementation(standardLibrary, O_OclAny__eq_);
Value A_symbol_199 = dynamic_A_symbol_199.evaluate(evaluator, T_Boolean, A_symbol_198, T_ClassClassifier_Boolean_);
rightA_symbol_194 = A_symbol_199;
} catch (InvalidValueException e) {
rightA_symbol_194 = valueFactory.createInvalidValue(e);
}
Value A_symbol_199 = rightA_symbol_194;
DomainType static_A_symbol_194 = valueFactory.typeOf(A_symbol_196);
LibraryBinaryOperation dynamic_A_symbol_194 = (LibraryBinaryOperation)static_A_symbol_194.lookupImplementation(standardLibrary, O_Boolean_implies);
Value A_symbol_194 = dynamic_A_symbol_194.evaluate(evaluator, T_Boolean, A_symbol_196, A_symbol_199);
return A_symbol_194;
}
}
/**
* Implementation of the IteratorExp 'ExistsTypeIsBoolean' invariant.
*/
public static class _invariant_ExistsTypeIsBoolean extends AbstractUnaryOperation
{
public static _invariant_ExistsTypeIsBoolean INSTANCE = new _invariant_ExistsTypeIsBoolean();
/*
name = 'exists' implies type = Boolean
*/
public Value evaluate(DomainEvaluator evaluator, DomainType returnType, final Value self) throws InvalidValueException {
final ValueFactory valueFactory = evaluator.getValueFactory();
final DomainStandardLibrary standardLibrary = valueFactory.getStandardLibrary();
final ExecutorType T_Boolean = OCLstdlibTables.Types._Boolean;
final ExecutorOperation O_Boolean_implies = OCLstdlibTables.Operations._Boolean__implies;
final ExecutorOperation O_String__eq_ = OCLstdlibTables.Operations._String___eq_;
final ExecutorType T_String = OCLstdlibTables.Types._String;
final ExecutorProperty P_NamedElement_name = PivotTables.Properties._NamedElement__name;
final LibraryProperty IP_NamedElement_name = P_NamedElement_name.getImplementation();
final StringValue S_exists = valueFactory.stringValueOf("exists");
final ExecutorOperation O_OclAny__eq_ = OCLstdlibTables.Operations._OclAny___eq_;
final ExecutorType T_Pivot_ecore__pivot__Type = PivotTables.Types._Type;
final ExecutorProperty P_TypedElement_type = PivotTables.Properties._TypedElement__type;
final LibraryProperty IP_TypedElement_type = P_TypedElement_type.getImplementation();
final Value T_ClassClassifier_Boolean_ = valueFactory.createTypeValue(OCLstdlibTables.Types._Boolean);
Value leftA_symbol_200;
try {
Value A_symbol_201 = IP_NamedElement_name.evaluate(evaluator, T_String, self, P_NamedElement_name);
DomainType static_A_symbol_202 = valueFactory.typeOf(A_symbol_201, S_exists);
LibraryBinaryOperation dynamic_A_symbol_202 = (LibraryBinaryOperation)static_A_symbol_202.lookupImplementation(standardLibrary, O_String__eq_);
Value A_symbol_202 = dynamic_A_symbol_202.evaluate(evaluator, T_Boolean, A_symbol_201, S_exists);
leftA_symbol_200 = A_symbol_202;
} catch (InvalidValueException e) {
leftA_symbol_200 = valueFactory.createInvalidValue(e);
}
Value A_symbol_202 = leftA_symbol_200;
Value rightA_symbol_200;
try {
Value A_symbol_203 = IP_TypedElement_type.evaluate(evaluator, T_Pivot_ecore__pivot__Type, self, P_TypedElement_type);
DomainType static_A_symbol_204 = valueFactory.typeOf(A_symbol_203, T_ClassClassifier_Boolean_);
LibraryBinaryOperation dynamic_A_symbol_204 = (LibraryBinaryOperation)static_A_symbol_204.lookupImplementation(standardLibrary, O_OclAny__eq_);
Value A_symbol_204 = dynamic_A_symbol_204.evaluate(evaluator, T_Boolean, A_symbol_203, T_ClassClassifier_Boolean_);
rightA_symbol_200 = A_symbol_204;
} catch (InvalidValueException e) {
rightA_symbol_200 = valueFactory.createInvalidValue(e);
}
Value A_symbol_204 = rightA_symbol_200;
DomainType static_A_symbol_200 = valueFactory.typeOf(A_symbol_202);
LibraryBinaryOperation dynamic_A_symbol_200 = (LibraryBinaryOperation)static_A_symbol_200.lookupImplementation(standardLibrary, O_Boolean_implies);
Value A_symbol_200 = dynamic_A_symbol_200.evaluate(evaluator, T_Boolean, A_symbol_202, A_symbol_204);
return A_symbol_200;
}
}
/**
* Implementation of the IteratorExp 'ForAllBodyTypeIsBoolean' invariant.
*/
public static class _invariant_ForAllBodyTypeIsBoolean extends AbstractUnaryOperation
{
public static _invariant_ForAllBodyTypeIsBoolean INSTANCE = new _invariant_ForAllBodyTypeIsBoolean();
/*
name = 'forAll' implies body.type = Boolean
*/
public Value evaluate(DomainEvaluator evaluator, DomainType returnType, final Value self) throws InvalidValueException {
final ValueFactory valueFactory = evaluator.getValueFactory();
final DomainStandardLibrary standardLibrary = valueFactory.getStandardLibrary();
final ExecutorType T_Boolean = OCLstdlibTables.Types._Boolean;
final ExecutorOperation O_Boolean_implies = OCLstdlibTables.Operations._Boolean__implies;
final ExecutorOperation O_String__eq_ = OCLstdlibTables.Operations._String___eq_;
final ExecutorType T_String = OCLstdlibTables.Types._String;
final ExecutorProperty P_NamedElement_name = PivotTables.Properties._NamedElement__name;
final LibraryProperty IP_NamedElement_name = P_NamedElement_name.getImplementation();
final StringValue S_forAll = valueFactory.stringValueOf("forAll");
final ExecutorOperation O_OclAny__eq_ = OCLstdlibTables.Operations._OclAny___eq_;
final ExecutorType T_Pivot_ecore__pivot__Type = PivotTables.Types._Type;
final ExecutorProperty P_TypedElement_type = PivotTables.Properties._TypedElement__type;
final LibraryProperty IP_TypedElement_type = P_TypedElement_type.getImplementation();
final ExecutorType T_Pivot_ecore__pivot__OclExpression = PivotTables.Types._OclExpression;
final ExecutorProperty P_LoopExp_body = PivotTables.Properties._LoopExp__body;
final LibraryProperty IP_LoopExp_body = P_LoopExp_body.getImplementation();
final Value T_ClassClassifier_Boolean_ = valueFactory.createTypeValue(OCLstdlibTables.Types._Boolean);
Value leftA_symbol_205;
try {
Value A_symbol_206 = IP_NamedElement_name.evaluate(evaluator, T_String, self, P_NamedElement_name);
DomainType static_A_symbol_207 = valueFactory.typeOf(A_symbol_206, S_forAll);
LibraryBinaryOperation dynamic_A_symbol_207 = (LibraryBinaryOperation)static_A_symbol_207.lookupImplementation(standardLibrary, O_String__eq_);
Value A_symbol_207 = dynamic_A_symbol_207.evaluate(evaluator, T_Boolean, A_symbol_206, S_forAll);
leftA_symbol_205 = A_symbol_207;
} catch (InvalidValueException e) {
leftA_symbol_205 = valueFactory.createInvalidValue(e);
}
Value A_symbol_207 = leftA_symbol_205;
Value rightA_symbol_205;
try {
Value A_symbol_208 = IP_LoopExp_body.evaluate(evaluator, T_Pivot_ecore__pivot__OclExpression, self, P_LoopExp_body);
Value A_symbol_209 = IP_TypedElement_type.evaluate(evaluator, T_Pivot_ecore__pivot__Type, A_symbol_208, P_TypedElement_type);
DomainType static_A_symbol_210 = valueFactory.typeOf(A_symbol_209, T_ClassClassifier_Boolean_);
LibraryBinaryOperation dynamic_A_symbol_210 = (LibraryBinaryOperation)static_A_symbol_210.lookupImplementation(standardLibrary, O_OclAny__eq_);
Value A_symbol_210 = dynamic_A_symbol_210.evaluate(evaluator, T_Boolean, A_symbol_209, T_ClassClassifier_Boolean_);
rightA_symbol_205 = A_symbol_210;
} catch (InvalidValueException e) {
rightA_symbol_205 = valueFactory.createInvalidValue(e);
}
Value A_symbol_210 = rightA_symbol_205;
DomainType static_A_symbol_205 = valueFactory.typeOf(A_symbol_207);
LibraryBinaryOperation dynamic_A_symbol_205 = (LibraryBinaryOperation)static_A_symbol_205.lookupImplementation(standardLibrary, O_Boolean_implies);
Value A_symbol_205 = dynamic_A_symbol_205.evaluate(evaluator, T_Boolean, A_symbol_207, A_symbol_210);
return A_symbol_205;
}
}
/**
* Implementation of the IteratorExp 'ForAllTypeIsBoolean' invariant.
*/
public static class _invariant_ForAllTypeIsBoolean extends AbstractUnaryOperation
{
public static _invariant_ForAllTypeIsBoolean INSTANCE = new _invariant_ForAllTypeIsBoolean();
/*
name = 'forAll' implies type = Boolean
*/
public Value evaluate(DomainEvaluator evaluator, DomainType returnType, final Value self) throws InvalidValueException {
final ValueFactory valueFactory = evaluator.getValueFactory();
final DomainStandardLibrary standardLibrary = valueFactory.getStandardLibrary();
final ExecutorType T_Boolean = OCLstdlibTables.Types._Boolean;
final ExecutorOperation O_Boolean_implies = OCLstdlibTables.Operations._Boolean__implies;
final ExecutorOperation O_String__eq_ = OCLstdlibTables.Operations._String___eq_;
final ExecutorType T_String = OCLstdlibTables.Types._String;
final ExecutorProperty P_NamedElement_name = PivotTables.Properties._NamedElement__name;
final LibraryProperty IP_NamedElement_name = P_NamedElement_name.getImplementation();
final StringValue S_forAll = valueFactory.stringValueOf("forAll");
final ExecutorOperation O_OclAny__eq_ = OCLstdlibTables.Operations._OclAny___eq_;
final ExecutorType T_Pivot_ecore__pivot__Type = PivotTables.Types._Type;
final ExecutorProperty P_TypedElement_type = PivotTables.Properties._TypedElement__type;
final LibraryProperty IP_TypedElement_type = P_TypedElement_type.getImplementation();
final Value T_ClassClassifier_Boolean_ = valueFactory.createTypeValue(OCLstdlibTables.Types._Boolean);
Value leftA_symbol_211;
try {
Value A_symbol_212 = IP_NamedElement_name.evaluate(evaluator, T_String, self, P_NamedElement_name);
DomainType static_A_symbol_213 = valueFactory.typeOf(A_symbol_212, S_forAll);
LibraryBinaryOperation dynamic_A_symbol_213 = (LibraryBinaryOperation)static_A_symbol_213.lookupImplementation(standardLibrary, O_String__eq_);
Value A_symbol_213 = dynamic_A_symbol_213.evaluate(evaluator, T_Boolean, A_symbol_212, S_forAll);
leftA_symbol_211 = A_symbol_213;
} catch (InvalidValueException e) {
leftA_symbol_211 = valueFactory.createInvalidValue(e);
}
Value A_symbol_213 = leftA_symbol_211;
Value rightA_symbol_211;
try {
Value A_symbol_214 = IP_TypedElement_type.evaluate(evaluator, T_Pivot_ecore__pivot__Type, self, P_TypedElement_type);
DomainType static_A_symbol_215 = valueFactory.typeOf(A_symbol_214, T_ClassClassifier_Boolean_);
LibraryBinaryOperation dynamic_A_symbol_215 = (LibraryBinaryOperation)static_A_symbol_215.lookupImplementation(standardLibrary, O_OclAny__eq_);
Value A_symbol_215 = dynamic_A_symbol_215.evaluate(evaluator, T_Boolean, A_symbol_214, T_ClassClassifier_Boolean_);
rightA_symbol_211 = A_symbol_215;
} catch (InvalidValueException e) {
rightA_symbol_211 = valueFactory.createInvalidValue(e);
}
Value A_symbol_215 = rightA_symbol_211;
DomainType static_A_symbol_211 = valueFactory.typeOf(A_symbol_213);
LibraryBinaryOperation dynamic_A_symbol_211 = (LibraryBinaryOperation)static_A_symbol_211.lookupImplementation(standardLibrary, O_Boolean_implies);
Value A_symbol_211 = dynamic_A_symbol_211.evaluate(evaluator, T_Boolean, A_symbol_213, A_symbol_215);
return A_symbol_211;
}
}
/**
* Implementation of the IteratorExp 'IsUniqueHasOneIterator' invariant.
*/
public static class _invariant_IsUniqueHasOneIterator extends AbstractUnaryOperation
{
public static _invariant_IsUniqueHasOneIterator INSTANCE = new _invariant_IsUniqueHasOneIterator();
/*
name = 'isUnique' implies iterator->size() = 1
*/
public Value evaluate(DomainEvaluator evaluator, DomainType returnType, final Value self) throws InvalidValueException {
final ValueFactory valueFactory = evaluator.getValueFactory();
final DomainStandardLibrary standardLibrary = valueFactory.getStandardLibrary();
final ExecutorType T_Boolean = OCLstdlibTables.Types._Boolean;
final ExecutorOperation O_Boolean_implies = OCLstdlibTables.Operations._Boolean__implies;
final ExecutorOperation O_String__eq_ = OCLstdlibTables.Operations._String___eq_;
final ExecutorType T_String = OCLstdlibTables.Types._String;
final ExecutorProperty P_NamedElement_name = PivotTables.Properties._NamedElement__name;
final LibraryProperty IP_NamedElement_name = P_NamedElement_name.getImplementation();
final StringValue S_isUnique = valueFactory.stringValueOf("isUnique");
final ExecutorOperation O_Real__eq_ = OCLstdlibTables.Operations._Real___eq_;
final ExecutorType T_Integer = OCLstdlibTables.Types._Integer;
final ExecutorOperation O_Collection_size = OCLstdlibTables.Operations._Collection__size;
final ExecutorType T_Pivot_ecore__pivot__Variable = PivotTables.Types._Variable;
final DomainCollectionType T_OrderedSet_Pivot_ecore__pivot__Variable_ = standardLibrary.getOrderedSetType(T_Pivot_ecore__pivot__Variable);
final ExecutorProperty P_LoopExp_iterator = PivotTables.Properties._LoopExp__iterator;
final LibraryProperty IP_LoopExp_iterator = P_LoopExp_iterator.getImplementation();
final IntegerValue I_1 = valueFactory.integerValueOf(1);
Value leftA_symbol_216;
try {
Value A_symbol_217 = IP_NamedElement_name.evaluate(evaluator, T_String, self, P_NamedElement_name);
DomainType static_A_symbol_218 = valueFactory.typeOf(A_symbol_217, S_isUnique);
LibraryBinaryOperation dynamic_A_symbol_218 = (LibraryBinaryOperation)static_A_symbol_218.lookupImplementation(standardLibrary, O_String__eq_);
Value A_symbol_218 = dynamic_A_symbol_218.evaluate(evaluator, T_Boolean, A_symbol_217, S_isUnique);
leftA_symbol_216 = A_symbol_218;
} catch (InvalidValueException e) {
leftA_symbol_216 = valueFactory.createInvalidValue(e);
}
Value A_symbol_218 = leftA_symbol_216;
Value rightA_symbol_216;
try {
Value A_symbol_219 = IP_LoopExp_iterator.evaluate(evaluator, T_OrderedSet_Pivot_ecore__pivot__Variable_, self, P_LoopExp_iterator);
DomainType static_A_symbol_220 = valueFactory.typeOf(A_symbol_219);
LibraryUnaryOperation dynamic_A_symbol_220 = (LibraryUnaryOperation)static_A_symbol_220.lookupImplementation(standardLibrary, O_Collection_size);
Value A_symbol_220 = dynamic_A_symbol_220.evaluate(evaluator, T_Integer, A_symbol_219);
DomainType static_A_symbol_221 = valueFactory.typeOf(A_symbol_220, I_1);
LibraryBinaryOperation dynamic_A_symbol_221 = (LibraryBinaryOperation)static_A_symbol_221.lookupImplementation(standardLibrary, O_Real__eq_);
Value A_symbol_221 = dynamic_A_symbol_221.evaluate(evaluator, T_Boolean, A_symbol_220, I_1);
rightA_symbol_216 = A_symbol_221;
} catch (InvalidValueException e) {
rightA_symbol_216 = valueFactory.createInvalidValue(e);
}
Value A_symbol_221 = rightA_symbol_216;
DomainType static_A_symbol_216 = valueFactory.typeOf(A_symbol_218);
LibraryBinaryOperation dynamic_A_symbol_216 = (LibraryBinaryOperation)static_A_symbol_216.lookupImplementation(standardLibrary, O_Boolean_implies);
Value A_symbol_216 = dynamic_A_symbol_216.evaluate(evaluator, T_Boolean, A_symbol_218, A_symbol_221);
return A_symbol_216;
}
}
/**
* Implementation of the IteratorExp 'IsUniqueTypeIsBoolean' invariant.
*/
public static class _invariant_IsUniqueTypeIsBoolean extends AbstractUnaryOperation
{
public static _invariant_IsUniqueTypeIsBoolean INSTANCE = new _invariant_IsUniqueTypeIsBoolean();
/*
name = 'isUnique' implies type = Boolean
*/
public Value evaluate(DomainEvaluator evaluator, DomainType returnType, final Value self) throws InvalidValueException {
final ValueFactory valueFactory = evaluator.getValueFactory();
final DomainStandardLibrary standardLibrary = valueFactory.getStandardLibrary();
final ExecutorType T_Boolean = OCLstdlibTables.Types._Boolean;
final ExecutorOperation O_Boolean_implies = OCLstdlibTables.Operations._Boolean__implies;
final ExecutorOperation O_String__eq_ = OCLstdlibTables.Operations._String___eq_;
final ExecutorType T_String = OCLstdlibTables.Types._String;
final ExecutorProperty P_NamedElement_name = PivotTables.Properties._NamedElement__name;
final LibraryProperty IP_NamedElement_name = P_NamedElement_name.getImplementation();
final StringValue S_isUnique = valueFactory.stringValueOf("isUnique");
final ExecutorOperation O_OclAny__eq_ = OCLstdlibTables.Operations._OclAny___eq_;
final ExecutorType T_Pivot_ecore__pivot__Type = PivotTables.Types._Type;
final ExecutorProperty P_TypedElement_type = PivotTables.Properties._TypedElement__type;
final LibraryProperty IP_TypedElement_type = P_TypedElement_type.getImplementation();
final Value T_ClassClassifier_Boolean_ = valueFactory.createTypeValue(OCLstdlibTables.Types._Boolean);
Value leftA_symbol_222;
try {
Value A_symbol_223 = IP_NamedElement_name.evaluate(evaluator, T_String, self, P_NamedElement_name);
DomainType static_A_symbol_224 = valueFactory.typeOf(A_symbol_223, S_isUnique);
LibraryBinaryOperation dynamic_A_symbol_224 = (LibraryBinaryOperation)static_A_symbol_224.lookupImplementation(standardLibrary, O_String__eq_);
Value A_symbol_224 = dynamic_A_symbol_224.evaluate(evaluator, T_Boolean, A_symbol_223, S_isUnique);
leftA_symbol_222 = A_symbol_224;
} catch (InvalidValueException e) {
leftA_symbol_222 = valueFactory.createInvalidValue(e);
}
Value A_symbol_224 = leftA_symbol_222;
Value rightA_symbol_222;
try {
Value A_symbol_225 = IP_TypedElement_type.evaluate(evaluator, T_Pivot_ecore__pivot__Type, self, P_TypedElement_type);
DomainType static_A_symbol_226 = valueFactory.typeOf(A_symbol_225, T_ClassClassifier_Boolean_);
LibraryBinaryOperation dynamic_A_symbol_226 = (LibraryBinaryOperation)static_A_symbol_226.lookupImplementation(standardLibrary, O_OclAny__eq_);
Value A_symbol_226 = dynamic_A_symbol_226.evaluate(evaluator, T_Boolean, A_symbol_225, T_ClassClassifier_Boolean_);
rightA_symbol_222 = A_symbol_226;
} catch (InvalidValueException e) {
rightA_symbol_222 = valueFactory.createInvalidValue(e);
}
Value A_symbol_226 = rightA_symbol_222;
DomainType static_A_symbol_222 = valueFactory.typeOf(A_symbol_224);
LibraryBinaryOperation dynamic_A_symbol_222 = (LibraryBinaryOperation)static_A_symbol_222.lookupImplementation(standardLibrary, O_Boolean_implies);
Value A_symbol_222 = dynamic_A_symbol_222.evaluate(evaluator, T_Boolean, A_symbol_224, A_symbol_226);
return A_symbol_222;
}
}
/**
* Implementation of the IteratorExp 'IteratorTypeIsSourceElementType' invariant.
*/
public static class _invariant_IteratorTypeIsSourceElementType extends AbstractUnaryOperation
{
public static _invariant_IteratorTypeIsSourceElementType INSTANCE = new _invariant_IteratorTypeIsSourceElementType();
/*
self.iterator->forAll(type =
source.type.oclAsType(CollectionType).elementType)
*/
public Value evaluate(DomainEvaluator evaluator, DomainType returnType, final Value self) throws InvalidValueException {
final ValueFactory valueFactory = evaluator.getValueFactory();
final DomainStandardLibrary standardLibrary = valueFactory.getStandardLibrary();
final ExecutorType T_Boolean = OCLstdlibTables.Types._Boolean;
final ExecutorOperation O_Collection_forAll = OCLstdlibTables.Operations._Collection__1_forAll;
final ExecutorType T_Pivot_ecore__pivot__Variable = PivotTables.Types._Variable;
final DomainCollectionType T_OrderedSet_Pivot_ecore__pivot__Variable_ = standardLibrary.getOrderedSetType(T_Pivot_ecore__pivot__Variable);
final ExecutorProperty P_LoopExp_iterator = PivotTables.Properties._LoopExp__iterator;
final LibraryProperty IP_LoopExp_iterator = P_LoopExp_iterator.getImplementation();
final ExecutorOperation O_OclAny__eq_ = OCLstdlibTables.Operations._OclAny___eq_;
final ExecutorType T_Pivot_ecore__pivot__Type = PivotTables.Types._Type;
final ExecutorProperty P_TypedElement_type = PivotTables.Properties._TypedElement__type;
final LibraryProperty IP_TypedElement_type = P_TypedElement_type.getImplementation();
final ExecutorProperty P_CollectionType_elementType = PivotTables.Properties._CollectionType__elementType;
final LibraryProperty IP_CollectionType_elementType = P_CollectionType_elementType.getImplementation();
final ExecutorType T_Pivot_ecore__pivot__CollectionType = PivotTables.Types._CollectionType;
final ExecutorOperation O_OclAny_oclAsType = OCLstdlibTables.Operations._OclAny__oclAsType;
final ExecutorType T_Pivot_ecore__pivot__OclExpression = PivotTables.Types._OclExpression;
final ExecutorProperty P_CallExp_source = PivotTables.Properties._CallExp__source;
final LibraryProperty IP_CallExp_source = P_CallExp_source.getImplementation();
final Value T_ClassClassifier_Pivot_ecore__pivot__CollectionType_ = valueFactory.createTypeValue(PivotTables.Types._CollectionType);
Value A_symbol_227 = IP_LoopExp_iterator.evaluate(evaluator, T_OrderedSet_Pivot_ecore__pivot__Variable_, self, P_LoopExp_iterator);
/**
* Implementation of the iterator body.
*/
AbstractBinaryOperation body_A_symbol_228 = new AbstractBinaryOperation()
{
/*
type =
source.type.oclAsType(_'file:/C:/GIT/org.eclipse.ocl/examples/org.eclipse.ocl.examples.pivot/model/Pivot.ecore'::ocl::CollectionType).elementType
*/
public Value evaluate(DomainEvaluator evaluator, DomainType returnType, Value sourceValue, Value iterator1) throws InvalidValueException {
final Value V_1_ = iterator1; // iterator: 1_
Value A_symbol_229 = IP_TypedElement_type.evaluate(evaluator, T_Pivot_ecore__pivot__Type, V_1_, P_TypedElement_type);
Value A_symbol_230 = IP_CallExp_source.evaluate(evaluator, T_Pivot_ecore__pivot__OclExpression, self, P_CallExp_source);
Value A_symbol_231 = IP_TypedElement_type.evaluate(evaluator, T_Pivot_ecore__pivot__Type, A_symbol_230, P_TypedElement_type);
DomainType static_A_symbol_232 = valueFactory.typeOf(A_symbol_231);
LibraryBinaryOperation dynamic_A_symbol_232 = (LibraryBinaryOperation)static_A_symbol_232.lookupImplementation(standardLibrary, O_OclAny_oclAsType);
Value A_symbol_232 = dynamic_A_symbol_232.evaluate(evaluator, T_Pivot_ecore__pivot__CollectionType, A_symbol_231, T_ClassClassifier_Pivot_ecore__pivot__CollectionType_);
Value A_symbol_233 = IP_CollectionType_elementType.evaluate(evaluator, T_Pivot_ecore__pivot__Type, A_symbol_232, P_CollectionType_elementType);
DomainType static_A_symbol_234 = valueFactory.typeOf(A_symbol_229, A_symbol_233);
LibraryBinaryOperation dynamic_A_symbol_234 = (LibraryBinaryOperation)static_A_symbol_234.lookupImplementation(standardLibrary, O_OclAny__eq_);
Value A_symbol_234 = dynamic_A_symbol_234.evaluate(evaluator, T_Boolean, A_symbol_229, A_symbol_233);
return A_symbol_234;
}
};
DomainType static_A_symbol_228 = A_symbol_227.getType();
LibraryIteration dynamic_A_symbol_228 = (LibraryIteration)static_A_symbol_228.lookupImplementation(standardLibrary, O_Collection_forAll);
Value acc_A_symbol_228 = dynamic_A_symbol_228.createAccumulatorValue(evaluator, T_Boolean, T_Boolean);
ExecutorSingleIterationManager manager_A_symbol_228 = new ExecutorSingleIterationManager(evaluator, T_Boolean, body_A_symbol_228, (CollectionValue)A_symbol_227, acc_A_symbol_228);
Value A_symbol_228 = dynamic_A_symbol_228.evaluateIteration(manager_A_symbol_228);
return A_symbol_228;
}
}
/**
* Implementation of the IteratorExp 'OneBodyTypeIsBoolean' invariant.
*/
public static class _invariant_OneBodyTypeIsBoolean extends AbstractUnaryOperation
{
public static _invariant_OneBodyTypeIsBoolean INSTANCE = new _invariant_OneBodyTypeIsBoolean();
/*
name = 'one' implies body.type = Boolean
*/
public Value evaluate(DomainEvaluator evaluator, DomainType returnType, final Value self) throws InvalidValueException {
final ValueFactory valueFactory = evaluator.getValueFactory();
final DomainStandardLibrary standardLibrary = valueFactory.getStandardLibrary();
final ExecutorType T_Boolean = OCLstdlibTables.Types._Boolean;
final ExecutorOperation O_Boolean_implies = OCLstdlibTables.Operations._Boolean__implies;
final ExecutorOperation O_String__eq_ = OCLstdlibTables.Operations._String___eq_;
final ExecutorType T_String = OCLstdlibTables.Types._String;
final ExecutorProperty P_NamedElement_name = PivotTables.Properties._NamedElement__name;
final LibraryProperty IP_NamedElement_name = P_NamedElement_name.getImplementation();
final StringValue S_one = valueFactory.stringValueOf("one");
final ExecutorOperation O_OclAny__eq_ = OCLstdlibTables.Operations._OclAny___eq_;
final ExecutorType T_Pivot_ecore__pivot__Type = PivotTables.Types._Type;
final ExecutorProperty P_TypedElement_type = PivotTables.Properties._TypedElement__type;
final LibraryProperty IP_TypedElement_type = P_TypedElement_type.getImplementation();
final ExecutorType T_Pivot_ecore__pivot__OclExpression = PivotTables.Types._OclExpression;
final ExecutorProperty P_LoopExp_body = PivotTables.Properties._LoopExp__body;
final LibraryProperty IP_LoopExp_body = P_LoopExp_body.getImplementation();
final Value T_ClassClassifier_Boolean_ = valueFactory.createTypeValue(OCLstdlibTables.Types._Boolean);
Value leftA_symbol_235;
try {
Value A_symbol_236 = IP_NamedElement_name.evaluate(evaluator, T_String, self, P_NamedElement_name);
DomainType static_A_symbol_237 = valueFactory.typeOf(A_symbol_236, S_one);
LibraryBinaryOperation dynamic_A_symbol_237 = (LibraryBinaryOperation)static_A_symbol_237.lookupImplementation(standardLibrary, O_String__eq_);
Value A_symbol_237 = dynamic_A_symbol_237.evaluate(evaluator, T_Boolean, A_symbol_236, S_one);
leftA_symbol_235 = A_symbol_237;
} catch (InvalidValueException e) {
leftA_symbol_235 = valueFactory.createInvalidValue(e);
}
Value A_symbol_237 = leftA_symbol_235;
Value rightA_symbol_235;
try {
Value A_symbol_238 = IP_LoopExp_body.evaluate(evaluator, T_Pivot_ecore__pivot__OclExpression, self, P_LoopExp_body);
Value A_symbol_239 = IP_TypedElement_type.evaluate(evaluator, T_Pivot_ecore__pivot__Type, A_symbol_238, P_TypedElement_type);
DomainType static_A_symbol_240 = valueFactory.typeOf(A_symbol_239, T_ClassClassifier_Boolean_);
LibraryBinaryOperation dynamic_A_symbol_240 = (LibraryBinaryOperation)static_A_symbol_240.lookupImplementation(standardLibrary, O_OclAny__eq_);
Value A_symbol_240 = dynamic_A_symbol_240.evaluate(evaluator, T_Boolean, A_symbol_239, T_ClassClassifier_Boolean_);
rightA_symbol_235 = A_symbol_240;
} catch (InvalidValueException e) {
rightA_symbol_235 = valueFactory.createInvalidValue(e);
}
Value A_symbol_240 = rightA_symbol_235;
DomainType static_A_symbol_235 = valueFactory.typeOf(A_symbol_237);
LibraryBinaryOperation dynamic_A_symbol_235 = (LibraryBinaryOperation)static_A_symbol_235.lookupImplementation(standardLibrary, O_Boolean_implies);
Value A_symbol_235 = dynamic_A_symbol_235.evaluate(evaluator, T_Boolean, A_symbol_237, A_symbol_240);
return A_symbol_235;
}
}
/**
* Implementation of the IteratorExp 'OneHasOneIterator' invariant.
*/
public static class _invariant_OneHasOneIterator extends AbstractUnaryOperation
{
public static _invariant_OneHasOneIterator INSTANCE = new _invariant_OneHasOneIterator();
/*
name = 'one' implies iterator->size() = 1
*/
public Value evaluate(DomainEvaluator evaluator, DomainType returnType, final Value self) throws InvalidValueException {
final ValueFactory valueFactory = evaluator.getValueFactory();
final DomainStandardLibrary standardLibrary = valueFactory.getStandardLibrary();
final ExecutorType T_Boolean = OCLstdlibTables.Types._Boolean;
final ExecutorOperation O_Boolean_implies = OCLstdlibTables.Operations._Boolean__implies;
final ExecutorOperation O_String__eq_ = OCLstdlibTables.Operations._String___eq_;
final ExecutorType T_String = OCLstdlibTables.Types._String;
final ExecutorProperty P_NamedElement_name = PivotTables.Properties._NamedElement__name;
final LibraryProperty IP_NamedElement_name = P_NamedElement_name.getImplementation();
final StringValue S_one = valueFactory.stringValueOf("one");
final ExecutorOperation O_Real__eq_ = OCLstdlibTables.Operations._Real___eq_;
final ExecutorType T_Integer = OCLstdlibTables.Types._Integer;
final ExecutorOperation O_Collection_size = OCLstdlibTables.Operations._Collection__size;
final ExecutorType T_Pivot_ecore__pivot__Variable = PivotTables.Types._Variable;
final DomainCollectionType T_OrderedSet_Pivot_ecore__pivot__Variable_ = standardLibrary.getOrderedSetType(T_Pivot_ecore__pivot__Variable);
final ExecutorProperty P_LoopExp_iterator = PivotTables.Properties._LoopExp__iterator;
final LibraryProperty IP_LoopExp_iterator = P_LoopExp_iterator.getImplementation();
final IntegerValue I_1 = valueFactory.integerValueOf(1);
Value leftA_symbol_241;
try {
Value A_symbol_242 = IP_NamedElement_name.evaluate(evaluator, T_String, self, P_NamedElement_name);
DomainType static_A_symbol_243 = valueFactory.typeOf(A_symbol_242, S_one);
LibraryBinaryOperation dynamic_A_symbol_243 = (LibraryBinaryOperation)static_A_symbol_243.lookupImplementation(standardLibrary, O_String__eq_);
Value A_symbol_243 = dynamic_A_symbol_243.evaluate(evaluator, T_Boolean, A_symbol_242, S_one);
leftA_symbol_241 = A_symbol_243;
} catch (InvalidValueException e) {
leftA_symbol_241 = valueFactory.createInvalidValue(e);
}
Value A_symbol_243 = leftA_symbol_241;
Value rightA_symbol_241;
try {
Value A_symbol_244 = IP_LoopExp_iterator.evaluate(evaluator, T_OrderedSet_Pivot_ecore__pivot__Variable_, self, P_LoopExp_iterator);
DomainType static_A_symbol_245 = valueFactory.typeOf(A_symbol_244);
LibraryUnaryOperation dynamic_A_symbol_245 = (LibraryUnaryOperation)static_A_symbol_245.lookupImplementation(standardLibrary, O_Collection_size);
Value A_symbol_245 = dynamic_A_symbol_245.evaluate(evaluator, T_Integer, A_symbol_244);
DomainType static_A_symbol_246 = valueFactory.typeOf(A_symbol_245, I_1);
LibraryBinaryOperation dynamic_A_symbol_246 = (LibraryBinaryOperation)static_A_symbol_246.lookupImplementation(standardLibrary, O_Real__eq_);
Value A_symbol_246 = dynamic_A_symbol_246.evaluate(evaluator, T_Boolean, A_symbol_245, I_1);
rightA_symbol_241 = A_symbol_246;
} catch (InvalidValueException e) {
rightA_symbol_241 = valueFactory.createInvalidValue(e);
}
Value A_symbol_246 = rightA_symbol_241;
DomainType static_A_symbol_241 = valueFactory.typeOf(A_symbol_243);
LibraryBinaryOperation dynamic_A_symbol_241 = (LibraryBinaryOperation)static_A_symbol_241.lookupImplementation(standardLibrary, O_Boolean_implies);
Value A_symbol_241 = dynamic_A_symbol_241.evaluate(evaluator, T_Boolean, A_symbol_243, A_symbol_246);
return A_symbol_241;
}
}
/**
* Implementation of the IteratorExp 'OneTypeIsBoolean' invariant.
*/
public static class _invariant_OneTypeIsBoolean extends AbstractUnaryOperation
{
public static _invariant_OneTypeIsBoolean INSTANCE = new _invariant_OneTypeIsBoolean();
/*
name = 'one' implies type = Boolean
*/
public Value evaluate(DomainEvaluator evaluator, DomainType returnType, final Value self) throws InvalidValueException {
final ValueFactory valueFactory = evaluator.getValueFactory();
final DomainStandardLibrary standardLibrary = valueFactory.getStandardLibrary();
final ExecutorType T_Boolean = OCLstdlibTables.Types._Boolean;
final ExecutorOperation O_Boolean_implies = OCLstdlibTables.Operations._Boolean__implies;
final ExecutorOperation O_String__eq_ = OCLstdlibTables.Operations._String___eq_;
final ExecutorType T_String = OCLstdlibTables.Types._String;
final ExecutorProperty P_NamedElement_name = PivotTables.Properties._NamedElement__name;
final LibraryProperty IP_NamedElement_name = P_NamedElement_name.getImplementation();
final StringValue S_one = valueFactory.stringValueOf("one");
final ExecutorOperation O_OclAny__eq_ = OCLstdlibTables.Operations._OclAny___eq_;
final ExecutorType T_Pivot_ecore__pivot__Type = PivotTables.Types._Type;
final ExecutorProperty P_TypedElement_type = PivotTables.Properties._TypedElement__type;
final LibraryProperty IP_TypedElement_type = P_TypedElement_type.getImplementation();
final Value T_ClassClassifier_Boolean_ = valueFactory.createTypeValue(OCLstdlibTables.Types._Boolean);
Value leftA_symbol_247;
try {
Value A_symbol_248 = IP_NamedElement_name.evaluate(evaluator, T_String, self, P_NamedElement_name);
DomainType static_A_symbol_249 = valueFactory.typeOf(A_symbol_248, S_one);
LibraryBinaryOperation dynamic_A_symbol_249 = (LibraryBinaryOperation)static_A_symbol_249.lookupImplementation(standardLibrary, O_String__eq_);
Value A_symbol_249 = dynamic_A_symbol_249.evaluate(evaluator, T_Boolean, A_symbol_248, S_one);
leftA_symbol_247 = A_symbol_249;
} catch (InvalidValueException e) {
leftA_symbol_247 = valueFactory.createInvalidValue(e);
}
Value A_symbol_249 = leftA_symbol_247;
Value rightA_symbol_247;
try {
Value A_symbol_250 = IP_TypedElement_type.evaluate(evaluator, T_Pivot_ecore__pivot__Type, self, P_TypedElement_type);
DomainType static_A_symbol_251 = valueFactory.typeOf(A_symbol_250, T_ClassClassifier_Boolean_);
LibraryBinaryOperation dynamic_A_symbol_251 = (LibraryBinaryOperation)static_A_symbol_251.lookupImplementation(standardLibrary, O_OclAny__eq_);
Value A_symbol_251 = dynamic_A_symbol_251.evaluate(evaluator, T_Boolean, A_symbol_250, T_ClassClassifier_Boolean_);
rightA_symbol_247 = A_symbol_251;
} catch (InvalidValueException e) {
rightA_symbol_247 = valueFactory.createInvalidValue(e);
}
Value A_symbol_251 = rightA_symbol_247;
DomainType static_A_symbol_247 = valueFactory.typeOf(A_symbol_249);
LibraryBinaryOperation dynamic_A_symbol_247 = (LibraryBinaryOperation)static_A_symbol_247.lookupImplementation(standardLibrary, O_Boolean_implies);
Value A_symbol_247 = dynamic_A_symbol_247.evaluate(evaluator, T_Boolean, A_symbol_249, A_symbol_251);
return A_symbol_247;
}
}
/**
* Implementation of the IteratorExp 'RejectOrSelectHasOneIterator' invariant.
*/
public static class _invariant_RejectOrSelectHasOneIterator extends AbstractUnaryOperation
{
public static _invariant_RejectOrSelectHasOneIterator INSTANCE = new _invariant_RejectOrSelectHasOneIterator();
/*
name = 'reject' or name = 'select' implies iterator->size() = 1
*/
public Value evaluate(DomainEvaluator evaluator, DomainType returnType, final Value self) throws InvalidValueException {
final ValueFactory valueFactory = evaluator.getValueFactory();
final DomainStandardLibrary standardLibrary = valueFactory.getStandardLibrary();
final ExecutorType T_Boolean = OCLstdlibTables.Types._Boolean;
final ExecutorOperation O_Boolean_implies = OCLstdlibTables.Operations._Boolean__implies;
final ExecutorOperation O_Boolean_or = OCLstdlibTables.Operations._Boolean__or;
final ExecutorOperation O_String__eq_ = OCLstdlibTables.Operations._String___eq_;
final ExecutorType T_String = OCLstdlibTables.Types._String;
final ExecutorProperty P_NamedElement_name = PivotTables.Properties._NamedElement__name;
final LibraryProperty IP_NamedElement_name = P_NamedElement_name.getImplementation();
final StringValue S_reject = valueFactory.stringValueOf("reject");
final StringValue S_select = valueFactory.stringValueOf("select");
final ExecutorOperation O_Real__eq_ = OCLstdlibTables.Operations._Real___eq_;
final ExecutorType T_Integer = OCLstdlibTables.Types._Integer;
final ExecutorOperation O_Collection_size = OCLstdlibTables.Operations._Collection__size;
final ExecutorType T_Pivot_ecore__pivot__Variable = PivotTables.Types._Variable;
final DomainCollectionType T_OrderedSet_Pivot_ecore__pivot__Variable_ = standardLibrary.getOrderedSetType(T_Pivot_ecore__pivot__Variable);
final ExecutorProperty P_LoopExp_iterator = PivotTables.Properties._LoopExp__iterator;
final LibraryProperty IP_LoopExp_iterator = P_LoopExp_iterator.getImplementation();
final IntegerValue I_1 = valueFactory.integerValueOf(1);
Value leftA_symbol_252;
try {
Value leftA_symbol_253;
try {
Value A_symbol_254 = IP_NamedElement_name.evaluate(evaluator, T_String, self, P_NamedElement_name);
DomainType static_A_symbol_255 = valueFactory.typeOf(A_symbol_254, S_reject);
LibraryBinaryOperation dynamic_A_symbol_255 = (LibraryBinaryOperation)static_A_symbol_255.lookupImplementation(standardLibrary, O_String__eq_);
Value A_symbol_255 = dynamic_A_symbol_255.evaluate(evaluator, T_Boolean, A_symbol_254, S_reject);
leftA_symbol_253 = A_symbol_255;
} catch (InvalidValueException e) {
leftA_symbol_253 = valueFactory.createInvalidValue(e);
}
Value A_symbol_255 = leftA_symbol_253;
Value rightA_symbol_253;
try {
Value A_symbol_256 = IP_NamedElement_name.evaluate(evaluator, T_String, self, P_NamedElement_name);
DomainType static_A_symbol_257 = valueFactory.typeOf(A_symbol_256, S_select);
LibraryBinaryOperation dynamic_A_symbol_257 = (LibraryBinaryOperation)static_A_symbol_257.lookupImplementation(standardLibrary, O_String__eq_);
Value A_symbol_257 = dynamic_A_symbol_257.evaluate(evaluator, T_Boolean, A_symbol_256, S_select);
rightA_symbol_253 = A_symbol_257;
} catch (InvalidValueException e) {
rightA_symbol_253 = valueFactory.createInvalidValue(e);
}
Value A_symbol_257 = rightA_symbol_253;
DomainType static_A_symbol_253 = valueFactory.typeOf(A_symbol_255);
LibraryBinaryOperation dynamic_A_symbol_253 = (LibraryBinaryOperation)static_A_symbol_253.lookupImplementation(standardLibrary, O_Boolean_or);
Value A_symbol_253 = dynamic_A_symbol_253.evaluate(evaluator, T_Boolean, A_symbol_255, A_symbol_257);
leftA_symbol_252 = A_symbol_253;
} catch (InvalidValueException e) {
leftA_symbol_252 = valueFactory.createInvalidValue(e);
}
Value A_symbol_253 = leftA_symbol_252;
Value rightA_symbol_252;
try {
Value A_symbol_258 = IP_LoopExp_iterator.evaluate(evaluator, T_OrderedSet_Pivot_ecore__pivot__Variable_, self, P_LoopExp_iterator);
DomainType static_A_symbol_259 = valueFactory.typeOf(A_symbol_258);
LibraryUnaryOperation dynamic_A_symbol_259 = (LibraryUnaryOperation)static_A_symbol_259.lookupImplementation(standardLibrary, O_Collection_size);
Value A_symbol_259 = dynamic_A_symbol_259.evaluate(evaluator, T_Integer, A_symbol_258);
DomainType static_A_symbol_260 = valueFactory.typeOf(A_symbol_259, I_1);
LibraryBinaryOperation dynamic_A_symbol_260 = (LibraryBinaryOperation)static_A_symbol_260.lookupImplementation(standardLibrary, O_Real__eq_);
Value A_symbol_260 = dynamic_A_symbol_260.evaluate(evaluator, T_Boolean, A_symbol_259, I_1);
rightA_symbol_252 = A_symbol_260;
} catch (InvalidValueException e) {
rightA_symbol_252 = valueFactory.createInvalidValue(e);
}
Value A_symbol_260 = rightA_symbol_252;
DomainType static_A_symbol_252 = valueFactory.typeOf(A_symbol_253);
LibraryBinaryOperation dynamic_A_symbol_252 = (LibraryBinaryOperation)static_A_symbol_252.lookupImplementation(standardLibrary, O_Boolean_implies);
Value A_symbol_252 = dynamic_A_symbol_252.evaluate(evaluator, T_Boolean, A_symbol_253, A_symbol_260);
return A_symbol_252;
}
}
/**
* Implementation of the IteratorExp 'RejectOrSelectTypeIsBoolean' invariant.
*/
public static class _invariant_RejectOrSelectTypeIsBoolean extends AbstractUnaryOperation
{
public static _invariant_RejectOrSelectTypeIsBoolean INSTANCE = new _invariant_RejectOrSelectTypeIsBoolean();
/*
name = 'reject' or name = 'select' implies type = Boolean
*/
public Value evaluate(DomainEvaluator evaluator, DomainType returnType, final Value self) throws InvalidValueException {
final ValueFactory valueFactory = evaluator.getValueFactory();
final DomainStandardLibrary standardLibrary = valueFactory.getStandardLibrary();
final ExecutorType T_Boolean = OCLstdlibTables.Types._Boolean;
final ExecutorOperation O_Boolean_implies = OCLstdlibTables.Operations._Boolean__implies;
final ExecutorOperation O_Boolean_or = OCLstdlibTables.Operations._Boolean__or;
final ExecutorOperation O_String__eq_ = OCLstdlibTables.Operations._String___eq_;
final ExecutorType T_String = OCLstdlibTables.Types._String;
final ExecutorProperty P_NamedElement_name = PivotTables.Properties._NamedElement__name;
final LibraryProperty IP_NamedElement_name = P_NamedElement_name.getImplementation();
final StringValue S_reject = valueFactory.stringValueOf("reject");
final StringValue S_select = valueFactory.stringValueOf("select");
final ExecutorOperation O_OclAny__eq_ = OCLstdlibTables.Operations._OclAny___eq_;
final ExecutorType T_Pivot_ecore__pivot__Type = PivotTables.Types._Type;
final ExecutorProperty P_TypedElement_type = PivotTables.Properties._TypedElement__type;
final LibraryProperty IP_TypedElement_type = P_TypedElement_type.getImplementation();
final Value T_ClassClassifier_Boolean_ = valueFactory.createTypeValue(OCLstdlibTables.Types._Boolean);
Value leftA_symbol_261;
try {
Value leftA_symbol_262;
try {
Value A_symbol_263 = IP_NamedElement_name.evaluate(evaluator, T_String, self, P_NamedElement_name);
DomainType static_A_symbol_264 = valueFactory.typeOf(A_symbol_263, S_reject);
LibraryBinaryOperation dynamic_A_symbol_264 = (LibraryBinaryOperation)static_A_symbol_264.lookupImplementation(standardLibrary, O_String__eq_);
Value A_symbol_264 = dynamic_A_symbol_264.evaluate(evaluator, T_Boolean, A_symbol_263, S_reject);
leftA_symbol_262 = A_symbol_264;
} catch (InvalidValueException e) {
leftA_symbol_262 = valueFactory.createInvalidValue(e);
}
Value A_symbol_264 = leftA_symbol_262;
Value rightA_symbol_262;
try {
Value A_symbol_265 = IP_NamedElement_name.evaluate(evaluator, T_String, self, P_NamedElement_name);
DomainType static_A_symbol_266 = valueFactory.typeOf(A_symbol_265, S_select);
LibraryBinaryOperation dynamic_A_symbol_266 = (LibraryBinaryOperation)static_A_symbol_266.lookupImplementation(standardLibrary, O_String__eq_);
Value A_symbol_266 = dynamic_A_symbol_266.evaluate(evaluator, T_Boolean, A_symbol_265, S_select);
rightA_symbol_262 = A_symbol_266;
} catch (InvalidValueException e) {
rightA_symbol_262 = valueFactory.createInvalidValue(e);
}
Value A_symbol_266 = rightA_symbol_262;
DomainType static_A_symbol_262 = valueFactory.typeOf(A_symbol_264);
LibraryBinaryOperation dynamic_A_symbol_262 = (LibraryBinaryOperation)static_A_symbol_262.lookupImplementation(standardLibrary, O_Boolean_or);
Value A_symbol_262 = dynamic_A_symbol_262.evaluate(evaluator, T_Boolean, A_symbol_264, A_symbol_266);
leftA_symbol_261 = A_symbol_262;
} catch (InvalidValueException e) {
leftA_symbol_261 = valueFactory.createInvalidValue(e);
}
Value A_symbol_262 = leftA_symbol_261;
Value rightA_symbol_261;
try {
Value A_symbol_267 = IP_TypedElement_type.evaluate(evaluator, T_Pivot_ecore__pivot__Type, self, P_TypedElement_type);
DomainType static_A_symbol_268 = valueFactory.typeOf(A_symbol_267, T_ClassClassifier_Boolean_);
LibraryBinaryOperation dynamic_A_symbol_268 = (LibraryBinaryOperation)static_A_symbol_268.lookupImplementation(standardLibrary, O_OclAny__eq_);
Value A_symbol_268 = dynamic_A_symbol_268.evaluate(evaluator, T_Boolean, A_symbol_267, T_ClassClassifier_Boolean_);
rightA_symbol_261 = A_symbol_268;
} catch (InvalidValueException e) {
rightA_symbol_261 = valueFactory.createInvalidValue(e);
}
Value A_symbol_268 = rightA_symbol_261;
DomainType static_A_symbol_261 = valueFactory.typeOf(A_symbol_262);
LibraryBinaryOperation dynamic_A_symbol_261 = (LibraryBinaryOperation)static_A_symbol_261.lookupImplementation(standardLibrary, O_Boolean_implies);
Value A_symbol_261 = dynamic_A_symbol_261.evaluate(evaluator, T_Boolean, A_symbol_262, A_symbol_268);
return A_symbol_261;
}
}
/**
* Implementation of the IteratorExp 'RejectOrSelectTypeIsSourceType' invariant.
*/
public static class _invariant_RejectOrSelectTypeIsSourceType extends AbstractUnaryOperation
{
public static _invariant_RejectOrSelectTypeIsSourceType INSTANCE = new _invariant_RejectOrSelectTypeIsSourceType();
/*
name = 'reject' or name = 'select' implies type = source.type
*/
public Value evaluate(DomainEvaluator evaluator, DomainType returnType, final Value self) throws InvalidValueException {
final ValueFactory valueFactory = evaluator.getValueFactory();
final DomainStandardLibrary standardLibrary = valueFactory.getStandardLibrary();
final ExecutorType T_Boolean = OCLstdlibTables.Types._Boolean;
final ExecutorOperation O_Boolean_implies = OCLstdlibTables.Operations._Boolean__implies;
final ExecutorOperation O_Boolean_or = OCLstdlibTables.Operations._Boolean__or;
final ExecutorOperation O_String__eq_ = OCLstdlibTables.Operations._String___eq_;
final ExecutorType T_String = OCLstdlibTables.Types._String;
final ExecutorProperty P_NamedElement_name = PivotTables.Properties._NamedElement__name;
final LibraryProperty IP_NamedElement_name = P_NamedElement_name.getImplementation();
final StringValue S_reject = valueFactory.stringValueOf("reject");
final StringValue S_select = valueFactory.stringValueOf("select");
final ExecutorOperation O_OclAny__eq_ = OCLstdlibTables.Operations._OclAny___eq_;
final ExecutorType T_Pivot_ecore__pivot__Type = PivotTables.Types._Type;
final ExecutorProperty P_TypedElement_type = PivotTables.Properties._TypedElement__type;
final LibraryProperty IP_TypedElement_type = P_TypedElement_type.getImplementation();
final ExecutorType T_Pivot_ecore__pivot__OclExpression = PivotTables.Types._OclExpression;
final ExecutorProperty P_CallExp_source = PivotTables.Properties._CallExp__source;
final LibraryProperty IP_CallExp_source = P_CallExp_source.getImplementation();
Value leftA_symbol_269;
try {
Value leftA_symbol_270;
try {
Value A_symbol_271 = IP_NamedElement_name.evaluate(evaluator, T_String, self, P_NamedElement_name);
DomainType static_A_symbol_272 = valueFactory.typeOf(A_symbol_271, S_reject);
LibraryBinaryOperation dynamic_A_symbol_272 = (LibraryBinaryOperation)static_A_symbol_272.lookupImplementation(standardLibrary, O_String__eq_);
Value A_symbol_272 = dynamic_A_symbol_272.evaluate(evaluator, T_Boolean, A_symbol_271, S_reject);
leftA_symbol_270 = A_symbol_272;
} catch (InvalidValueException e) {
leftA_symbol_270 = valueFactory.createInvalidValue(e);
}
Value A_symbol_272 = leftA_symbol_270;
Value rightA_symbol_270;
try {
Value A_symbol_273 = IP_NamedElement_name.evaluate(evaluator, T_String, self, P_NamedElement_name);
DomainType static_A_symbol_274 = valueFactory.typeOf(A_symbol_273, S_select);
LibraryBinaryOperation dynamic_A_symbol_274 = (LibraryBinaryOperation)static_A_symbol_274.lookupImplementation(standardLibrary, O_String__eq_);
Value A_symbol_274 = dynamic_A_symbol_274.evaluate(evaluator, T_Boolean, A_symbol_273, S_select);
rightA_symbol_270 = A_symbol_274;
} catch (InvalidValueException e) {
rightA_symbol_270 = valueFactory.createInvalidValue(e);
}
Value A_symbol_274 = rightA_symbol_270;
DomainType static_A_symbol_270 = valueFactory.typeOf(A_symbol_272);
LibraryBinaryOperation dynamic_A_symbol_270 = (LibraryBinaryOperation)static_A_symbol_270.lookupImplementation(standardLibrary, O_Boolean_or);
Value A_symbol_270 = dynamic_A_symbol_270.evaluate(evaluator, T_Boolean, A_symbol_272, A_symbol_274);
leftA_symbol_269 = A_symbol_270;
} catch (InvalidValueException e) {
leftA_symbol_269 = valueFactory.createInvalidValue(e);
}
Value A_symbol_270 = leftA_symbol_269;
Value rightA_symbol_269;
try {
Value A_symbol_275 = IP_TypedElement_type.evaluate(evaluator, T_Pivot_ecore__pivot__Type, self, P_TypedElement_type);
Value A_symbol_276 = IP_CallExp_source.evaluate(evaluator, T_Pivot_ecore__pivot__OclExpression, self, P_CallExp_source);
Value A_symbol_277 = IP_TypedElement_type.evaluate(evaluator, T_Pivot_ecore__pivot__Type, A_symbol_276, P_TypedElement_type);
DomainType static_A_symbol_278 = valueFactory.typeOf(A_symbol_275, A_symbol_277);
LibraryBinaryOperation dynamic_A_symbol_278 = (LibraryBinaryOperation)static_A_symbol_278.lookupImplementation(standardLibrary, O_OclAny__eq_);
Value A_symbol_278 = dynamic_A_symbol_278.evaluate(evaluator, T_Boolean, A_symbol_275, A_symbol_277);
rightA_symbol_269 = A_symbol_278;
} catch (InvalidValueException e) {
rightA_symbol_269 = valueFactory.createInvalidValue(e);
}
Value A_symbol_278 = rightA_symbol_269;
DomainType static_A_symbol_269 = valueFactory.typeOf(A_symbol_270);
LibraryBinaryOperation dynamic_A_symbol_269 = (LibraryBinaryOperation)static_A_symbol_269.lookupImplementation(standardLibrary, O_Boolean_implies);
Value A_symbol_269 = dynamic_A_symbol_269.evaluate(evaluator, T_Boolean, A_symbol_270, A_symbol_278);
return A_symbol_269;
}
}
/**
* Implementation of the IteratorExp 'SortedByElementTypeIsSourceElementType' invariant.
*/
public static class _invariant_SortedByElementTypeIsSourceElementType extends AbstractUnaryOperation
{
public static _invariant_SortedByElementTypeIsSourceElementType INSTANCE = new _invariant_SortedByElementTypeIsSourceElementType();
/*
name = 'sortedBy' implies
type.oclAsType(CollectionType).elementType =
body.type.oclAsType(CollectionType).elementType
*/
public Value evaluate(DomainEvaluator evaluator, DomainType returnType, final Value self) throws InvalidValueException {
final ValueFactory valueFactory = evaluator.getValueFactory();
final DomainStandardLibrary standardLibrary = valueFactory.getStandardLibrary();
final ExecutorType T_Boolean = OCLstdlibTables.Types._Boolean;
final ExecutorOperation O_Boolean_implies = OCLstdlibTables.Operations._Boolean__implies;
final ExecutorOperation O_String__eq_ = OCLstdlibTables.Operations._String___eq_;
final ExecutorType T_String = OCLstdlibTables.Types._String;
final ExecutorProperty P_NamedElement_name = PivotTables.Properties._NamedElement__name;
final LibraryProperty IP_NamedElement_name = P_NamedElement_name.getImplementation();
final StringValue S_sortedBy = valueFactory.stringValueOf("sortedBy");
final ExecutorOperation O_OclAny__eq_ = OCLstdlibTables.Operations._OclAny___eq_;
final ExecutorType T_Pivot_ecore__pivot__Type = PivotTables.Types._Type;
final ExecutorProperty P_CollectionType_elementType = PivotTables.Properties._CollectionType__elementType;
final LibraryProperty IP_CollectionType_elementType = P_CollectionType_elementType.getImplementation();
final ExecutorType T_Pivot_ecore__pivot__CollectionType = PivotTables.Types._CollectionType;
final ExecutorOperation O_OclAny_oclAsType = OCLstdlibTables.Operations._OclAny__oclAsType;
final ExecutorProperty P_TypedElement_type = PivotTables.Properties._TypedElement__type;
final LibraryProperty IP_TypedElement_type = P_TypedElement_type.getImplementation();
final Value T_ClassClassifier_Pivot_ecore__pivot__CollectionType_ = valueFactory.createTypeValue(PivotTables.Types._CollectionType);
final ExecutorType T_Pivot_ecore__pivot__OclExpression = PivotTables.Types._OclExpression;
final ExecutorProperty P_LoopExp_body = PivotTables.Properties._LoopExp__body;
final LibraryProperty IP_LoopExp_body = P_LoopExp_body.getImplementation();
Value leftA_symbol_279;
try {
Value A_symbol_280 = IP_NamedElement_name.evaluate(evaluator, T_String, self, P_NamedElement_name);
DomainType static_A_symbol_281 = valueFactory.typeOf(A_symbol_280, S_sortedBy);
LibraryBinaryOperation dynamic_A_symbol_281 = (LibraryBinaryOperation)static_A_symbol_281.lookupImplementation(standardLibrary, O_String__eq_);
Value A_symbol_281 = dynamic_A_symbol_281.evaluate(evaluator, T_Boolean, A_symbol_280, S_sortedBy);
leftA_symbol_279 = A_symbol_281;
} catch (InvalidValueException e) {
leftA_symbol_279 = valueFactory.createInvalidValue(e);
}
Value A_symbol_281 = leftA_symbol_279;
Value rightA_symbol_279;
try {
Value A_symbol_282 = IP_TypedElement_type.evaluate(evaluator, T_Pivot_ecore__pivot__Type, self, P_TypedElement_type);
DomainType static_A_symbol_283 = valueFactory.typeOf(A_symbol_282);
LibraryBinaryOperation dynamic_A_symbol_283 = (LibraryBinaryOperation)static_A_symbol_283.lookupImplementation(standardLibrary, O_OclAny_oclAsType);
Value A_symbol_283 = dynamic_A_symbol_283.evaluate(evaluator, T_Pivot_ecore__pivot__CollectionType, A_symbol_282, T_ClassClassifier_Pivot_ecore__pivot__CollectionType_);
Value A_symbol_284 = IP_CollectionType_elementType.evaluate(evaluator, T_Pivot_ecore__pivot__Type, A_symbol_283, P_CollectionType_elementType);
Value A_symbol_285 = IP_LoopExp_body.evaluate(evaluator, T_Pivot_ecore__pivot__OclExpression, self, P_LoopExp_body);
Value A_symbol_286 = IP_TypedElement_type.evaluate(evaluator, T_Pivot_ecore__pivot__Type, A_symbol_285, P_TypedElement_type);
DomainType static_A_symbol_287 = valueFactory.typeOf(A_symbol_286);
LibraryBinaryOperation dynamic_A_symbol_287 = (LibraryBinaryOperation)static_A_symbol_287.lookupImplementation(standardLibrary, O_OclAny_oclAsType);
Value A_symbol_287 = dynamic_A_symbol_287.evaluate(evaluator, T_Pivot_ecore__pivot__CollectionType, A_symbol_286, T_ClassClassifier_Pivot_ecore__pivot__CollectionType_);
Value A_symbol_288 = IP_CollectionType_elementType.evaluate(evaluator, T_Pivot_ecore__pivot__Type, A_symbol_287, P_CollectionType_elementType);
DomainType static_A_symbol_289 = valueFactory.typeOf(A_symbol_284, A_symbol_288);
LibraryBinaryOperation dynamic_A_symbol_289 = (LibraryBinaryOperation)static_A_symbol_289.lookupImplementation(standardLibrary, O_OclAny__eq_);
Value A_symbol_289 = dynamic_A_symbol_289.evaluate(evaluator, T_Boolean, A_symbol_284, A_symbol_288);
rightA_symbol_279 = A_symbol_289;
} catch (InvalidValueException e) {
rightA_symbol_279 = valueFactory.createInvalidValue(e);
}
Value A_symbol_289 = rightA_symbol_279;
DomainType static_A_symbol_279 = valueFactory.typeOf(A_symbol_281);
LibraryBinaryOperation dynamic_A_symbol_279 = (LibraryBinaryOperation)static_A_symbol_279.lookupImplementation(standardLibrary, O_Boolean_implies);
Value A_symbol_279 = dynamic_A_symbol_279.evaluate(evaluator, T_Boolean, A_symbol_281, A_symbol_289);
return A_symbol_279;
}
}
/**
* Implementation of the IteratorExp 'SortedByHasOneIterator' invariant.
*/
public static class _invariant_SortedByHasOneIterator extends AbstractUnaryOperation
{
public static _invariant_SortedByHasOneIterator INSTANCE = new _invariant_SortedByHasOneIterator();
/*
name = 'sortedBy' implies iterator->size() = 1
*/
public Value evaluate(DomainEvaluator evaluator, DomainType returnType, final Value self) throws InvalidValueException {
final ValueFactory valueFactory = evaluator.getValueFactory();
final DomainStandardLibrary standardLibrary = valueFactory.getStandardLibrary();
final ExecutorType T_Boolean = OCLstdlibTables.Types._Boolean;
final ExecutorOperation O_Boolean_implies = OCLstdlibTables.Operations._Boolean__implies;
final ExecutorOperation O_String__eq_ = OCLstdlibTables.Operations._String___eq_;
final ExecutorType T_String = OCLstdlibTables.Types._String;
final ExecutorProperty P_NamedElement_name = PivotTables.Properties._NamedElement__name;
final LibraryProperty IP_NamedElement_name = P_NamedElement_name.getImplementation();
final StringValue S_sortedBy = valueFactory.stringValueOf("sortedBy");
final ExecutorOperation O_Real__eq_ = OCLstdlibTables.Operations._Real___eq_;
final ExecutorType T_Integer = OCLstdlibTables.Types._Integer;
final ExecutorOperation O_Collection_size = OCLstdlibTables.Operations._Collection__size;
final ExecutorType T_Pivot_ecore__pivot__Variable = PivotTables.Types._Variable;
final DomainCollectionType T_OrderedSet_Pivot_ecore__pivot__Variable_ = standardLibrary.getOrderedSetType(T_Pivot_ecore__pivot__Variable);
final ExecutorProperty P_LoopExp_iterator = PivotTables.Properties._LoopExp__iterator;
final LibraryProperty IP_LoopExp_iterator = P_LoopExp_iterator.getImplementation();
final IntegerValue I_1 = valueFactory.integerValueOf(1);
Value leftA_symbol_290;
try {
Value A_symbol_291 = IP_NamedElement_name.evaluate(evaluator, T_String, self, P_NamedElement_name);
DomainType static_A_symbol_292 = valueFactory.typeOf(A_symbol_291, S_sortedBy);
LibraryBinaryOperation dynamic_A_symbol_292 = (LibraryBinaryOperation)static_A_symbol_292.lookupImplementation(standardLibrary, O_String__eq_);
Value A_symbol_292 = dynamic_A_symbol_292.evaluate(evaluator, T_Boolean, A_symbol_291, S_sortedBy);
leftA_symbol_290 = A_symbol_292;
} catch (InvalidValueException e) {
leftA_symbol_290 = valueFactory.createInvalidValue(e);
}
Value A_symbol_292 = leftA_symbol_290;
Value rightA_symbol_290;
try {
Value A_symbol_293 = IP_LoopExp_iterator.evaluate(evaluator, T_OrderedSet_Pivot_ecore__pivot__Variable_, self, P_LoopExp_iterator);
DomainType static_A_symbol_294 = valueFactory.typeOf(A_symbol_293);
LibraryUnaryOperation dynamic_A_symbol_294 = (LibraryUnaryOperation)static_A_symbol_294.lookupImplementation(standardLibrary, O_Collection_size);
Value A_symbol_294 = dynamic_A_symbol_294.evaluate(evaluator, T_Integer, A_symbol_293);
DomainType static_A_symbol_295 = valueFactory.typeOf(A_symbol_294, I_1);
LibraryBinaryOperation dynamic_A_symbol_295 = (LibraryBinaryOperation)static_A_symbol_295.lookupImplementation(standardLibrary, O_Real__eq_);
Value A_symbol_295 = dynamic_A_symbol_295.evaluate(evaluator, T_Boolean, A_symbol_294, I_1);
rightA_symbol_290 = A_symbol_295;
} catch (InvalidValueException e) {
rightA_symbol_290 = valueFactory.createInvalidValue(e);
}
Value A_symbol_295 = rightA_symbol_290;
DomainType static_A_symbol_290 = valueFactory.typeOf(A_symbol_292);
LibraryBinaryOperation dynamic_A_symbol_290 = (LibraryBinaryOperation)static_A_symbol_290.lookupImplementation(standardLibrary, O_Boolean_implies);
Value A_symbol_290 = dynamic_A_symbol_290.evaluate(evaluator, T_Boolean, A_symbol_292, A_symbol_295);
return A_symbol_290;
}
}
/**
* Implementation of the IteratorExp 'SortedByIsOrderedIfSourceIsOrdered' invariant.
*/
public static class _invariant_SortedByIsOrderedIfSourceIsOrdered extends AbstractUnaryOperation
{
public static _invariant_SortedByIsOrderedIfSourceIsOrdered INSTANCE = new _invariant_SortedByIsOrderedIfSourceIsOrdered();
/*
name = 'sortedBy' implies
if
source.type.oclIsKindOf(SequenceType) or
source.type.oclIsKindOf(BagType)
then type.oclIsKindOf(SequenceType)
else type.oclIsKindOf(OrderedSetType)
endif
*/
public Value evaluate(DomainEvaluator evaluator, DomainType returnType, final Value self) throws InvalidValueException {
final ValueFactory valueFactory = evaluator.getValueFactory();
final DomainStandardLibrary standardLibrary = valueFactory.getStandardLibrary();
final ExecutorType T_Boolean = OCLstdlibTables.Types._Boolean;
final ExecutorOperation O_Boolean_implies = OCLstdlibTables.Operations._Boolean__implies;
final ExecutorOperation O_String__eq_ = OCLstdlibTables.Operations._String___eq_;
final ExecutorType T_String = OCLstdlibTables.Types._String;
final ExecutorProperty P_NamedElement_name = PivotTables.Properties._NamedElement__name;
final LibraryProperty IP_NamedElement_name = P_NamedElement_name.getImplementation();
final StringValue S_sortedBy = valueFactory.stringValueOf("sortedBy");
final ExecutorOperation O_Boolean_or = OCLstdlibTables.Operations._Boolean__or;
final ExecutorOperation O_OclAny_oclIsKindOf = OCLstdlibTables.Operations._OclAny__oclIsKindOf;
final ExecutorType T_Pivot_ecore__pivot__Type = PivotTables.Types._Type;
final ExecutorProperty P_TypedElement_type = PivotTables.Properties._TypedElement__type;
final LibraryProperty IP_TypedElement_type = P_TypedElement_type.getImplementation();
final ExecutorType T_Pivot_ecore__pivot__OclExpression = PivotTables.Types._OclExpression;
final ExecutorProperty P_CallExp_source = PivotTables.Properties._CallExp__source;
final LibraryProperty IP_CallExp_source = P_CallExp_source.getImplementation();
final Value T_ClassClassifier_Pivot_ecore__pivot__SequenceType_ = valueFactory.createTypeValue(PivotTables.Types._SequenceType);
final Value T_ClassClassifier_Pivot_ecore__pivot__BagType_ = valueFactory.createTypeValue(PivotTables.Types._BagType);
final Value T_ClassClassifier_Pivot_ecore__pivot__OrderedSetType_ = valueFactory.createTypeValue(PivotTables.Types._OrderedSetType);
Value leftA_symbol_296;
try {
Value A_symbol_297 = IP_NamedElement_name.evaluate(evaluator, T_String, self, P_NamedElement_name);
DomainType static_A_symbol_298 = valueFactory.typeOf(A_symbol_297, S_sortedBy);
LibraryBinaryOperation dynamic_A_symbol_298 = (LibraryBinaryOperation)static_A_symbol_298.lookupImplementation(standardLibrary, O_String__eq_);
Value A_symbol_298 = dynamic_A_symbol_298.evaluate(evaluator, T_Boolean, A_symbol_297, S_sortedBy);
leftA_symbol_296 = A_symbol_298;
} catch (InvalidValueException e) {
leftA_symbol_296 = valueFactory.createInvalidValue(e);
}
Value A_symbol_298 = leftA_symbol_296;
Value rightA_symbol_296;
try {
Value leftA_symbol_299;
try {
Value A_symbol_300 = IP_CallExp_source.evaluate(evaluator, T_Pivot_ecore__pivot__OclExpression, self, P_CallExp_source);
Value A_symbol_301 = IP_TypedElement_type.evaluate(evaluator, T_Pivot_ecore__pivot__Type, A_symbol_300, P_TypedElement_type);
DomainType static_A_symbol_302 = valueFactory.typeOf(A_symbol_301);
LibraryBinaryOperation dynamic_A_symbol_302 = (LibraryBinaryOperation)static_A_symbol_302.lookupImplementation(standardLibrary, O_OclAny_oclIsKindOf);
Value A_symbol_302 = dynamic_A_symbol_302.evaluate(evaluator, T_Boolean, A_symbol_301, T_ClassClassifier_Pivot_ecore__pivot__SequenceType_);
leftA_symbol_299 = A_symbol_302;
} catch (InvalidValueException e) {
leftA_symbol_299 = valueFactory.createInvalidValue(e);
}
Value A_symbol_302 = leftA_symbol_299;
Value rightA_symbol_299;
try {
Value A_symbol_303 = IP_CallExp_source.evaluate(evaluator, T_Pivot_ecore__pivot__OclExpression, self, P_CallExp_source);
Value A_symbol_304 = IP_TypedElement_type.evaluate(evaluator, T_Pivot_ecore__pivot__Type, A_symbol_303, P_TypedElement_type);
DomainType static_A_symbol_305 = valueFactory.typeOf(A_symbol_304);
LibraryBinaryOperation dynamic_A_symbol_305 = (LibraryBinaryOperation)static_A_symbol_305.lookupImplementation(standardLibrary, O_OclAny_oclIsKindOf);
Value A_symbol_305 = dynamic_A_symbol_305.evaluate(evaluator, T_Boolean, A_symbol_304, T_ClassClassifier_Pivot_ecore__pivot__BagType_);
rightA_symbol_299 = A_symbol_305;
} catch (InvalidValueException e) {
rightA_symbol_299 = valueFactory.createInvalidValue(e);
}
Value A_symbol_305 = rightA_symbol_299;
DomainType static_A_symbol_299 = valueFactory.typeOf(A_symbol_302);
LibraryBinaryOperation dynamic_A_symbol_299 = (LibraryBinaryOperation)static_A_symbol_299.lookupImplementation(standardLibrary, O_Boolean_or);
Value A_symbol_299 = dynamic_A_symbol_299.evaluate(evaluator, T_Boolean, A_symbol_302, A_symbol_305);
Value A_symbol_306;
if (A_symbol_299.isTrue()) {
Value A_symbol_307 = IP_TypedElement_type.evaluate(evaluator, T_Pivot_ecore__pivot__Type, self, P_TypedElement_type);
DomainType static_A_symbol_308 = valueFactory.typeOf(A_symbol_307);
LibraryBinaryOperation dynamic_A_symbol_308 = (LibraryBinaryOperation)static_A_symbol_308.lookupImplementation(standardLibrary, O_OclAny_oclIsKindOf);
Value A_symbol_308 = dynamic_A_symbol_308.evaluate(evaluator, T_Boolean, A_symbol_307, T_ClassClassifier_Pivot_ecore__pivot__SequenceType_);
A_symbol_306 = A_symbol_308;
}
else if (A_symbol_299.isFalse()) {
Value A_symbol_309 = IP_TypedElement_type.evaluate(evaluator, T_Pivot_ecore__pivot__Type, self, P_TypedElement_type);
DomainType static_A_symbol_310 = valueFactory.typeOf(A_symbol_309);
LibraryBinaryOperation dynamic_A_symbol_310 = (LibraryBinaryOperation)static_A_symbol_310.lookupImplementation(standardLibrary, O_OclAny_oclIsKindOf);
Value A_symbol_310 = dynamic_A_symbol_310.evaluate(evaluator, T_Boolean, A_symbol_309, T_ClassClassifier_Pivot_ecore__pivot__OrderedSetType_);
A_symbol_306 = A_symbol_310;
}
else if (A_symbol_299.isNull()) {
A_symbol_306 = valueFactory.throwInvalidValueException("null if condition");
}
else {
A_symbol_306 = valueFactory.throwInvalidValueException("invalid if condition");
}
rightA_symbol_296 = A_symbol_306;
} catch (InvalidValueException e) {
rightA_symbol_296 = valueFactory.createInvalidValue(e);
}
Value A_symbol_306 = rightA_symbol_296;
DomainType static_A_symbol_296 = valueFactory.typeOf(A_symbol_298);
LibraryBinaryOperation dynamic_A_symbol_296 = (LibraryBinaryOperation)static_A_symbol_296.lookupImplementation(standardLibrary, O_Boolean_implies);
Value A_symbol_296 = dynamic_A_symbol_296.evaluate(evaluator, T_Boolean, A_symbol_298, A_symbol_306);
return A_symbol_296;
}
}
}