Package net.sf.parteg.base.testcasegraph.generated

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


  /**
   * copies the TCGOCLExpression
   */
  public static TCGOCLExpression copyExpression(TCGOCLExpression in_oExpression)
  {
    TCGOCLExpression oTCGOCLExpression = null;
    if(in_oExpression != null)
    {
      if(in_oExpression instanceof TCGOCLAtom)
      {
        TCGOCLAtom oOldAtom = (TCGOCLAtom)in_oExpression;
        oTCGOCLExpression = copyAtom(oOldAtom);
      }
      else if(in_oExpression instanceof TCGOCLOperation)
      {
        TCGOCLOperation oOldOperation = (TCGOCLOperation)in_oExpression;
        oTCGOCLExpression = copyOperation(oOldOperation);
      }
      else if(in_oExpression instanceof TCGOCLIfThenElse)
      {
        TCGOCLIfThenElse oOldIfThenElse = (TCGOCLIfThenElse)in_oExpression;
        oTCGOCLExpression = copyIfThenElse(oOldIfThenElse);
      }
      oTCGOCLExpression.setClassification(in_oExpression.getClassification());
      oTCGOCLExpression.setOclReference(in_oExpression.getOclReference());
      oTCGOCLExpression.setPositiveAssignmentOfOriginal(in_oExpression.isPositiveAssignmentOfOriginal());
      oTCGOCLExpression.setTransitionContext(in_oExpression.getTransitionContext());
    }
    return oTCGOCLExpression;   
  }
View Full Code Here


  public static boolean expressionIsIsolatedOnLeftSide(
      TCGOCLExpression in_oOCLExp,
      TCGOCLExpression in_oSurroundingExp)
  {
    // TODO bisher ohne boolesche Ausdr�cke betrachtet
    TCGOCLExpression oSurroundingExp = in_oSurroundingExp;
   
    // ignore all "not"s
    while(oSurroundingExp instanceof TCGOCLOperation &&
        ((TCGOCLOperation)oSurroundingExp).getOperationName() != null &&
        ((TCGOCLOperation)oSurroundingExp).getOperationName().equals("not")) {
View Full Code Here

  public static void removeDoubleNots(TCGConjunction in_oConjunction)
  {
    List<TCGOCLExpression> colRemoveExps = new ArrayList<TCGOCLExpression>();
    List<TCGOCLExpression> colAddExps = new ArrayList<TCGOCLExpression>();
    for(TCGOCLExpression oExp : in_oConjunction.getExpressions()) {
      TCGOCLExpression oNewExp = TCGOCLExpressionHelperClass.removeDoubleNots(oExp);
      if(oNewExp != oExp) {
        colRemoveExps.add(oExp);
        colAddExps.add(oNewExp);
      }
    }
View Full Code Here

  }

  public static TCGOCLExpression convertConjunctionToExpression(
      TCGConjunction in_oConjunction) {
    if (!in_oConjunction.getExpressions().isEmpty()) {
      TCGOCLExpression oExpression = TCGOCLExpressionHelperClass
          .copyExpression(in_oConjunction.getExpressions().get(0));
      for (int i = 1; i < in_oConjunction.getExpressions().size(); ++i) {
        TCGOCLOperation oNewOperation = GeneratedFactory.eINSTANCE
            .createTCGOCLOperation();
        oNewOperation.setLeft(oExpression);
View Full Code Here

  public static ArrayList<TCGConjunction> negatedDisjunctionByNegatingEachExpressionOnce(TCGConjunction in_oConjunction)
  {
    ArrayList<TCGConjunction> colResultValues = new ArrayList<TCGConjunction>();
    for(int i = 0; i < in_oConjunction.getExpressions().size(); ++i)
    {
      TCGOCLExpression oExpression = in_oConjunction.getExpressions().get(i);
      TCGOCLExpression oExpressionCopy = TCGOCLExpressionHelperClass.copyExpression(oExpression);
      oExpressionCopy = net.sf.parteg.base.testcasegraph.helperclasses.TCGOCLExpressionHelperClass.negateLogicalTCGOCLExpression(oExpressionCopy);
      for(TCGConjunction oNewConjunction : TCGDisjunctiveNormalFormHelperClass.createDisjunctiveNormalForm(oExpressionCopy, false).getConjunctions())
      {
        for(int j = 0; j < in_oConjunction.getExpressions().size(); ++j)
        {
View Full Code Here

                in_bSplitInequations));
      }
    } else // collect all expression permutations
    {
      // recursion for positive expressions
      TCGOCLExpression oExpression = TCGOCLExpressionHelperClass
          .copyExpression(in_oOriginalConjunction.getExpressions()
              .get(in_nCurrentExpressionIndex));
      TCGDisjunctiveNormalForm oDNF = TCGDisjunctiveNormalFormHelperClass.createDisjunctiveNormalForm(oExpression, in_bSplitInequations);
      io_colTemporarilyCollectedDNFs.add(oDNF);
 
      getNegativeConjunctionPermutationsForConjunction(io_colNewConjunctions,
          in_oOriginalConjunction, io_colTemporarilyCollectedDNFs,
          in_nCurrentExpressionIndex + 1,
          in_nNegativeExpressionCounter,
          in_bSplitInequations);
      io_colTemporarilyCollectedDNFs.remove(oDNF);
 
      // recursion for negative expressions
      TCGOCLExpression oNegativeExpression = TCGOCLExpressionHelperClass
          .copyExpression(oExpression);
      oNegativeExpression = net.sf.parteg.base.testcasegraph.helperclasses.TCGOCLExpressionHelperClass.negateLogicalTCGOCLExpression(oNegativeExpression);
      oDNF = TCGDisjunctiveNormalFormHelperClass.createDisjunctiveNormalForm(oNegativeExpression, in_bSplitInequations);
      io_colTemporarilyCollectedDNFs.add(oDNF);
      getNegativeConjunctionPermutationsForConjunction(io_colNewConjunctions,
View Full Code Here

        T result = caseTCGEvent(tcgEvent);
        if (result == null) result = defaultCase(theEObject);
        return result;
      }
      case GeneratedPackage.TCGOCL_EXPRESSION: {
        TCGOCLExpression tcgoclExpression = (TCGOCLExpression)theEObject;
        T result = caseTCGOCLExpression(tcgoclExpression);
        if (result == null) result = defaultCase(theEObject);
        return result;
      }
      case GeneratedPackage.TCG_CONJUNCTION: {
View Full Code Here

   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @generated
   */
  public void setLeft(TCGOCLExpression newLeft) {
    TCGOCLExpression oldLeft = left;
    left = newLeft;
    if (eNotificationRequired())
      eNotify(new ENotificationImpl(this, Notification.SET, GeneratedPackage.TCGOCL_OPERATION__LEFT, oldLeft, left));
  }
View Full Code Here

   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @generated
   */
  public void setRight(TCGOCLExpression newRight) {
    TCGOCLExpression oldRight = right;
    right = newRight;
    if (eNotificationRequired())
      eNotify(new ENotificationImpl(this, Notification.SET, GeneratedPackage.TCGOCL_OPERATION__RIGHT, oldRight, right));
  }
View Full Code Here

   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @generated
   */
  public void setOriginalExpression(TCGOCLExpression newOriginalExpression) {
    TCGOCLExpression oldOriginalExpression = originalExpression;
    originalExpression = newOriginalExpression;
    if (eNotificationRequired())
      eNotify(new ENotificationImpl(this, Notification.SET, GeneratedPackage.TCG_DISJUNCTIVE_NORMAL_FORM__ORIGINAL_EXPRESSION, oldOriginalExpression, originalExpression));
  }
View Full Code Here

TOP

Related Classes of net.sf.parteg.base.testcasegraph.generated.TCGOCLExpression

Copyright © 2018 www.massapicom. 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.