Examples of TCGOCLIfThenElse


Examples of net.sf.parteg.base.testcasegraph.generated.TCGOCLIfThenElse

      getPassiveDependentElements(oOperation.getLeft(), out_ReferencedVariables);
      getPassiveDependentElements(oOperation.getRight(), out_ReferencedVariables);
    }
    else if(in_oExpression instanceof TCGOCLIfThenElse)
    {
      TCGOCLIfThenElse oIfThenElse = (TCGOCLIfThenElse)in_oExpression;
      getPassiveDependentElements(oIfThenElse.getCondition(), out_ReferencedVariables);
      getPassiveDependentElements(oIfThenElse.getThenExpression(), out_ReferencedVariables);
      getPassiveDependentElements(oIfThenElse.getElseExpression(), out_ReferencedVariables);     
    }
  }
View Full Code Here

Examples of net.sf.parteg.base.testcasegraph.generated.TCGOCLIfThenElse

        oOperation.setOperationName(oOpExp.getReferredOperation().getName());
        oTCGOCLExpression = oOperation;
      }
      else if(in_oExpression instanceof IfExp)
      {
        TCGOCLIfThenElse oTCGIfExp = GeneratedFactory.eINSTANCE.createTCGOCLIfThenElse();
        IfExp oIfExp = (IfExp)in_oExpression;
        oTCGIfExp.setCondition(transformExpression((OCLExpression)oIfExp.getCondition(),
            in_sOCLTypeId, oContextClass, oContextClass));
        oTCGIfExp.setThenExpression(transformExpression((OCLExpression)oIfExp.getThenExpression(),
            in_sOCLTypeId, oContextClass, oContextClass));
        oTCGIfExp.setElseExpression(transformExpression((OCLExpression)oIfExp.getElseExpression(),
            in_sOCLTypeId, oContextClass, oContextClass));
        oTCGOCLExpression = oTCGIfExp;
      }
      else if(in_oExpression instanceof EnumLiteralExp)
      {
View Full Code Here

Examples of net.sf.parteg.base.testcasegraph.generated.TCGOCLIfThenElse

       * createDisjunctiveNormalForm(oOpExp.getLeft()); } else
       * if(oOpExp.getRight() != null) { return
       * createDisjunctiveNormalForm(oOpExp.getRight()); } }
       */
    } else if (in_oExpression instanceof TCGOCLIfThenElse) {
      TCGOCLIfThenElse oTCGIfThenElse = (TCGOCLIfThenElse) in_oExpression;

      // condition satisfied
      TCGDisjunctiveNormalForm oConditionDNF = createDisjunctiveNormalForm(oTCGIfThenElse
          .getCondition(), in_bSplitInequations);
      TCGDisjunctiveNormalForm oThenDNF = createDisjunctiveNormalForm(oTCGIfThenElse
          .getThenExpression(), in_bSplitInequations);
      TCGDisjunctiveNormalForm oSatisfiedDNF = connectTwoDNFWithAnd(
          oConditionDNF, oThenDNF);

      // condition violated
      oTCGIfThenElse.setCondition(net.sf.parteg.base.testcasegraph.helperclasses.TCGOCLExpressionHelperClass.negateLogicalTCGOCLExpression(oTCGIfThenElse.getCondition()));
      TCGDisjunctiveNormalForm oNotConditionDNF = createDisjunctiveNormalForm(oTCGIfThenElse
          .getCondition(), in_bSplitInequations);
      TCGDisjunctiveNormalForm oElseDNF = createDisjunctiveNormalForm(oTCGIfThenElse
          .getElseExpression(), in_bSplitInequations);
      TCGDisjunctiveNormalForm oViolatedDNF = connectTwoDNFWithAnd(
          oNotConditionDNF, oElseDNF);

      return connectTwoDNFWithOr(oSatisfiedDNF, oViolatedDNF);
View Full Code Here

Examples of net.sf.parteg.base.testcasegraph.generated.TCGOCLIfThenElse

      }
    }
   
    // If-Then-Else
    else if (in_oExpression instanceof TCGOCLIfThenElse) {
      TCGOCLIfThenElse oTCGIfThenElse = (TCGOCLIfThenElse) in_oExpression;

      // condition satisfied
      if(in_oRow.get(oTCGIfThenElse.getCondition()) == true)
      {
        createRestrictedDisjunctiveNormalForm(
            oTCGIfThenElse.getCondition(),
            in_oRow, in_bSplitInequations, out_oDNF);
        createRestrictedDisjunctiveNormalForm(
            oTCGIfThenElse.getThenExpression(),
            in_oRow, in_bSplitInequations, out_oDNF);
        return;
      }
      else
      {
        // condition violated
        oTCGIfThenElse.setCondition(
            net.sf.parteg.base.testcasegraph.helperclasses.TCGOCLExpressionHelperClass.negateLogicalTCGOCLExpression(oTCGIfThenElse.getCondition()));
        createRestrictedDisjunctiveNormalForm(oTCGIfThenElse.getCondition(),
            in_oRow, in_bSplitInequations, out_oDNF);
        createRestrictedDisjunctiveNormalForm(oTCGIfThenElse.getElseExpression(),
              in_oRow, in_bSplitInequations, out_oDNF);
        return;
      }
    }
View Full Code Here

Examples of net.sf.parteg.base.testcasegraph.generated.TCGOCLIfThenElse

      createVariableReferences(oOperation.getLeft(), in_oTransition);
      createVariableReferences(oOperation.getRight(), in_oTransition);
    }
    else if(in_oExpression instanceof TCGOCLIfThenElse)
    {
      TCGOCLIfThenElse oIfThenElse = (TCGOCLIfThenElse)in_oExpression;
      createVariableReferences(oIfThenElse.getCondition(), in_oTransition);
      createVariableReferences(oIfThenElse.getElseExpression(), in_oTransition);
      createVariableReferences(oIfThenElse.getThenExpression(), in_oTransition);
    }
  }
View Full Code Here

Examples of net.sf.parteg.base.testcasegraph.generated.TCGOCLIfThenElse

        colRows.addAll(changeRowValue(colRightNegativeRows, true));
      }
    }
    else if(in_oExpression instanceof TCGOCLIfThenElse)
    {
      TCGOCLIfThenElse oIfThenElse = (TCGOCLIfThenElse)in_oExpression;
      ArrayList<DecisionTableExpressionValueSelection> colCondRows =
        getMCDCForExpression(oIfThenElse.getCondition(), in_colAtomicExpressions);
      ArrayList<DecisionTableExpressionValueSelection> colThenRows =
        getMCDCForExpression(oIfThenElse.getThenExpression(), in_colAtomicExpressions);
      ArrayList<DecisionTableExpressionValueSelection> colElseRows =
        getMCDCForExpression(oIfThenElse.getElseExpression(), in_colAtomicExpressions);
     
      ArrayList<DecisionTableExpressionValueSelection> colCondPositiveRows =
        new ArrayList<DecisionTableExpressionValueSelection>();
      ArrayList<DecisionTableExpressionValueSelection> colCondNegativeRows =
        new ArrayList<DecisionTableExpressionValueSelection>();
View Full Code Here

Examples of net.sf.parteg.base.testcasegraph.generated.TCGOCLIfThenElse

        return bValue;
      }
    }
    else if(in_oExpression instanceof TCGOCLIfThenElse)
    {
      TCGOCLIfThenElse oIfThenElse = (TCGOCLIfThenElse)in_oExpression;
      if(evaluateExpressionWithValueAssignment(oIfThenElse.getCondition(), in_oRow))
      {
        bValue = evaluateExpressionWithValueAssignment(oIfThenElse.getThenExpression(), in_oRow);
        in_oRow.put(in_oExpression, bValue);
        return bValue;
      }
      else
      {
        bValue = evaluateExpressionWithValueAssignment(oIfThenElse.getElseExpression(), in_oRow);
        in_oRow.put(in_oExpression, bValue);
        return bValue;
      }
    }
    return true; // default value for boolean atoms
View Full Code Here

Examples of net.sf.parteg.base.testcasegraph.generated.TCGOCLIfThenElse

        return selectRowsForNot(oLeftRows, oRightRows, in_bCreateRowsForUnnecessaryValues);
      }
    }
    else if(in_oExpression instanceof TCGOCLIfThenElse)
    {
      TCGOCLIfThenElse oIfThenElse = (TCGOCLIfThenElse)in_oExpression;
      DecisionRowSelector oIfRows =
        getMCDCForExpression(oIfThenElse.getCondition(),
            in_colAtomicExpressions, in_bCreateRowsForUnnecessaryValues);
      DecisionRowSelector oNotIfRows = selectRowsForNot(oIfRows, new DecisionRowSelector(),
          in_bCreateRowsForUnnecessaryValues);
      DecisionRowSelector oThenRows =
        getMCDCForExpression(oIfThenElse.getThenExpression(),
            in_colAtomicExpressions, in_bCreateRowsForUnnecessaryValues);
      DecisionRowSelector oElseRows =
        getMCDCForExpression(oIfThenElse.getElseExpression(),
            in_colAtomicExpressions, in_bCreateRowsForUnnecessaryValues);

      // if A then B else C is the same as (A and B) or (not A and C)
      return selectRowsForOr(
          selectRowsForAnd(oIfRows, oThenRows, in_bCreateRowsForUnnecessaryValues),
View Full Code Here

Examples of net.sf.parteg.base.testcasegraph.generated.TCGOCLIfThenElse

            m_colExpressions.add(oOperation.getRight());
      }
    }
    else if(in_oExpression instanceof TCGOCLIfThenElse)
    {
      TCGOCLIfThenElse oIfThenElse = (TCGOCLIfThenElse)in_oExpression;
      if(!isBooleanOperation(oIfThenElse.getCondition()))
        m_colExpressions.add(oIfThenElse.getCondition());
      if(!isBooleanOperation(oIfThenElse.getThenExpression()))
        m_colExpressions.add(oIfThenElse.getThenExpression());
      if(!isBooleanOperation(oIfThenElse.getElseExpression()))
        m_colExpressions.add(oIfThenElse.getElseExpression());
    }
  }
View Full Code Here

Examples of net.sf.parteg.base.testcasegraph.generated.TCGOCLIfThenElse

          run(oOpExp.getLeft(), in_oVisitor);
        if(oOpExp.getRight() != null)
          run(oOpExp.getRight(), in_oVisitor);     
      }
      else if(in_oExp instanceof TCGOCLIfThenElse) {
        TCGOCLIfThenElse oIfThenElseExp = (TCGOCLIfThenElse)in_oExp;
        if(oIfThenElseExp.getCondition() != null)
          run(oIfThenElseExp.getCondition(), in_oVisitor);
        if(oIfThenElseExp.getThenExpression() != null)
          run(oIfThenElseExp.getThenExpression(), in_oVisitor);     
        if(oIfThenElseExp.getElseExpression() != null)
          run(oIfThenElseExp.getElseExpression(), in_oVisitor);             
      }
    }
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.