Examples of TCGOCLOperation


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

      if(oAtom.getClassification().equals(VariableClassification.PASSIVE_DEPENDENT))
        out_ReferencedVariables.add(oAtom.getElement());
    }
    else if(in_oExpression instanceof TCGOCLOperation)
    {
      TCGOCLOperation oOperation = (TCGOCLOperation)in_oExpression;
      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);
View Full Code Here

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

                  return ErrorClass.NOSOLUTION;
               
                // return contradiction if integer should be equal to a non-integer value
                if(TCGOCLExpressionHelperClass.isLastIntegerComputationWasIncorrect()) {
                  if (oOCLExp instanceof TCGOCLOperation) {
                    TCGOCLOperation oCallExp = (TCGOCLOperation) oOCLExp;
                    if(oCallExp.getOperationName().equals("="))
                      return ErrorClass.CONTRADICTION;
//                    if(oCallExp.getOperationName().equals(">=")) {
//                      oCallExp.setOperationName(">");
//                    }
                  }
View Full Code Here

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

  @Override
  public void setRangeAccordingToRightSideOfExpression(
      TCGOCLExpression in_oExpression) throws Exception {

    if (in_oExpression instanceof TCGOCLOperation) {
      TCGOCLOperation oCallExp = (TCGOCLOperation) in_oExpression;
      // TODO : hack, dass m_nMinValue f�r Polymorphie des Typparameters missbraucht wird -> �ndern!
      ValueType oValueOfExpression = m_oMinValue.createValueFromExpression(
          (TCGOCLExpression) oCallExp.getRight());
      if(oValueOfExpression != null) {
        setRange(oValueOfExpression, oCallExp.getOperationName());
      }
    }
  }
View Full Code Here

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

  public void setRangeAccordingToRightSideOfExpression(
      TCGOCLExpression in_oExpression,
      Map<TCGOCLAtom, TestCaseValidValue> in_colCurrentValueAssignment) throws Exception {

    if (in_oExpression instanceof TCGOCLOperation) {
      TCGOCLOperation oCallExp = (TCGOCLOperation) in_oExpression;
      // TODO : hack, dass m_nMinValue f�r Polymorphie des Typparameters missbraucht wird -> �ndern!
      ValueType oValueOfExpression = m_oMinValue.createValueFromExpression(
          (TCGOCLExpression) oCallExp.getRight(),
          in_colCurrentValueAssignment);
      setRange(oValueOfExpression, oCallExp.getOperationName());
    }
  }
View Full Code Here

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

        setMaxValue(oVTR.getMaxValue());
        setMinIncluded(true);
        setMinValue(oVTR.getMinValue());
      }
      else if(in_oExpression instanceof TCGOCLOperation) {
        TCGOCLOperation oOperation = (TCGOCLOperation)in_oExpression;
        if(oOperation.getOperationName().equals("<")) {
          setMaxIncluded(false);
          setMaxValue(oVTR.getMaxValue());                   
        }
        if(oOperation.getOperationName().equals("<=") ||
            oOperation.getOperationName().equals("=")) {
          setMaxIncluded(true);
          setMaxValue(oVTR.getMaxValue());         
        }
        if(oOperation.getOperationName().equals("=") ||
            oOperation.getOperationName().equals(">=")) {
          setMinIncluded(true);
          setMinValue(oVTR.getMinValue());         
        }
        if(oOperation.getOperationName().equals(">")) {
          setMinIncluded(false);
          setMinValue(oVTR.getMinValue());         
        }
      }
    }
View Full Code Here

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

        oVTR.setRange(oValueOfExpression, "=");       
      }
      return oVTR;
    }
    else if (in_oExpression instanceof TCGOCLOperation) {
      TCGOCLOperation oOperation = (TCGOCLOperation)in_oExpression;
      Map<TCGOCLAtom, Pair<ValueType, ValueType>> colAtomToValueRanges =
        new LinkedHashMap<TCGOCLAtom, Pair<ValueType, ValueType>>();
      for(TCGOCLAtom oAtom : in_colCurrentValueTypeRanges.keySet()) {
        if(!(in_colCurrentValueTypeRanges.get(oAtom) instanceof OrderedValueTypeRange)) {
          return null;
        }
        OrderedValueTypeRange oVTR =
          (OrderedValueTypeRange)in_colCurrentValueTypeRanges.get(oAtom);
        OrderedValueType oMaxVT = oVTR.getMaxValue();
        if(!oVTR.isMaxIncluded())
          oMaxVT = oMaxVT.getLowerValueMinDistance();
        OrderedValueType oMinVT = oVTR.getMinValue();
        if(!oVTR.isMinIncluded())
          oMinVT = oMinVT.getUpperValueMinDistance();

        colAtomToValueRanges.put(oAtom, new Pair<ValueType, ValueType>(
            oMinVT, oMaxVT));
      }
      Pair<ValueType, ValueType> oValueTypePair =
        m_oMinValue.createValueFromExpression(
            oOperation.getRight(), in_colCurrentValueAssignment,
            colAtomToValueRanges);
      if(oValueTypePair != null) {
        OrderedValueType oFirstValue = (OrderedValueType)oValueTypePair.getFirst();
        OrderedValueType oSecondValue = (OrderedValueType)oValueTypePair.getSecond();
        OrderedValueTypeRange<OVT> oVTR = new OrderedValueTypeRange<OVT>(
View Full Code Here

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

  public void setRangeAccordingToRightSideOfExpression(
      TCGOCLExpression in_oExpression) throws Exception {

    TCGOCLExpression oValidExpression = null;
    if (in_oExpression instanceof TCGOCLOperation) {
      TCGOCLOperation oCallExp = (TCGOCLOperation) in_oExpression;
      // TODO : hack, dass Instanz des ValueTypes f�r Polymorphie des Typparameters missbraucht wird -> �ndern!?!
      oValidExpression = oCallExp.getRight();
      if(oValidExpression == null) // again - workaround for "not"
        oValidExpression = oCallExp.getLeft();
    }
    else {
      oValidExpression = (TCGOCLAtom)in_oExpression;
    }
   
View Full Code Here

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

      TCGOCLExpression in_oExpression,
      Map<TCGOCLAtom, TestCaseValidValue> in_colCurrentValueAssignment) throws Exception {
   
    TCGOCLExpression oValidExpression = null;
    if (in_oExpression instanceof TCGOCLOperation) {
      TCGOCLOperation oCallExp = (TCGOCLOperation) in_oExpression;
      // TODO : hack, dass Instanz des ValueTypes f�r Polymorphie des Typparameters missbraucht wird -> �ndern!?!
      oValidExpression = oCallExp.getRight();
      if(oValidExpression == null) // again - workaround for "not"
        oValidExpression = oCallExp.getLeft();
    }
    else {
      oValidExpression = (TCGOCLAtom)in_oExpression;
    }
   
View Full Code Here

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

        getAllowedValues().addAll(oUOVTR.getAllowedValues());
        getForbiddenValues().clear();
        getForbiddenValues().addAll(oUOVTR.getForbiddenValues());
      }
      else if(in_oExpression instanceof TCGOCLOperation) {
        TCGOCLOperation oOperation = (TCGOCLOperation)in_oExpression;
        if(oOperation.getOperationName().equals("=")) {
          getAllowedValues().clear();
          getAllowedValues().addAll(oUOVTR.getAllowedValues());
          getForbiddenValues().clear();
          getForbiddenValues().addAll(oUOVTR.getForbiddenValues());         
        }
View Full Code Here

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

      }
      else if(in_oExpression instanceof OperationCallExp)
      {
        // TODO un�re Operationen einf�hren?
        OperationCallExp oOpExp = (OperationCallExp)in_oExpression;
        TCGOCLOperation oOperation = GeneratedFactory.eINSTANCE.createTCGOCLOperation();
     
        // operation call on the context class
        if(oOpExp.getSource() != null &&
            oOpExp.getSource().getName() != null &&
            oOpExp.getSource().getName().equals("self")) {
          // TODO ...
        }
        else {
          OCLExpression oOCLLeftExpression = (OCLExpression)oOpExp.getSource();
          if(oOCLLeftExpression != null)
            oOperation.setLeft(
                transformExpression(oOCLLeftExpression, in_sOCLTypeId,
                    oContextClass, oContextClass));
          if(oOpExp.getArgument().size() > 0)
            oOperation.setRight(
                transformExpression((OCLExpression)oOpExp.getArgument().get(0),
                    in_sOCLTypeId, oContextClass, oContextClass));
        }
        oOperation.setOperation((EObject)oOpExp.getReferredOperation());
        oOperation.setOperationName(oOpExp.getReferredOperation().getName());
        oTCGOCLExpression = oOperation;
      }
      else if(in_oExpression instanceof IfExp)
      {
        TCGOCLIfThenElse oTCGIfExp = GeneratedFactory.eINSTANCE.createTCGOCLIfThenElse();
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.