ArrayList<TCGOCLExpression> in_colNewExpressions)
{
for(TCGConjunction oConjunction : in_colPostcondition.getConjunctions())
for(TCGOCLExpression oPostCondition : oConjunction.getExpressions())
{
TCGOCLVariableClassificator oClassificator =
new TCGOCLVariableClassificator(oPostCondition);
TCGOCLExpression oActivePostExpression =
oClassificator.getClassifiedElementInExpression(
VariableClassification.ACTIVE_DEPENDENT);
if(oActivePostExpression instanceof TCGOCLAtom)
{
TCGOCLAtom oAtomPostExp = (TCGOCLAtom)oActivePostExpression;
if(TCGOCLExpressionHelperClass.conditionContainsReferenceToObject(
in_oPrecondition, oAtomPostExp.getElement()))
{
oClassificator.shiftSubexpressionToTheLeft(oActivePostExpression);
if(oClassificator.getExpression() instanceof TCGOCLOperation)
{
TCGOCLOperation oOperation =
(TCGOCLOperation)oClassificator.getExpression();
TCGOCLVariableClassificator oRightSubClassificator =
new TCGOCLVariableClassificator(oOperation.getRight());
// does the right side contain a passive dependent element?
TCGOCLExpression oPassiveDependentSubExpression = oRightSubClassificator.getClassifiedElementInExpression(VariableClassification.PASSIVE_DEPENDENT);
TCGOCLExpression oInputParameterSubExpression = oRightSubClassificator.getClassifiedElementInExpression(VariableClassification.INPUT_PARAMETER);
if((oPassiveDependentSubExpression != null) || (oInputParameterSubExpression != null))
{
in_colNewExpressions.add(connectPreconditionAndPostcondition(in_oPrecondition, oPostCondition));
}
else { // does the right side contain just independent elements?
// compare the expressions of both elements!
TCGEquivalenceClass oEqPostconditionClass = ExpressionConverter.getEquivalenceClassForRightSideOfExpression(oOperation);
TCGEquivalenceClass oEqPreconditionClass = ExpressionConverter.getEquivalenceClassForRightSideOfExpression(in_oPrecondition);
if(oEqPostconditionClass != null && oEqPreconditionClass != null)
{
// postcondition
if(ConversionController.outerEquivalenceClassContainsInnerClass(oEqPreconditionClass, oEqPostconditionClass, false))
{
// alle Elemente der Konjunktion durchsuchen
for(TCGConjunction oIndependentConjunction : in_colPostcondition.getConjunctions())
for(TCGOCLExpression oIndependentPostCondition : oIndependentConjunction.getExpressions())
{
// au�er der gerade behandelten Nachbedingung
if(oIndependentPostCondition != oPostCondition)
{
TCGOCLVariableClassificator oIndependentClassificator = new TCGOCLVariableClassificator(oIndependentPostCondition);
if(oIndependentClassificator.getClassifiedElementInExpression(VariableClassification.ACTIVE_DEPENDENT) == null)
{
// die Elemente ohne aktive Variablen weiter in fr�heren Postconditions checken
in_colNewExpressions.add(oIndependentPostCondition);
}
}