Examples of TCGDisjunctiveNormalForm


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

    DecisionTableHierarchy oDecisionTable = new DecisionTableHierarchy(oExpression);
    oDecisionTable.buildUpMaskingMCDCDecisionTable(in_bCreateRowsForUnnecessaryValues);
   
    for(DecisionRowAlternatives oAlternatives : oDecisionTable)
    {
      TCGDisjunctiveNormalForm oDNF = GeneratedFactory.eINSTANCE.createTCGDisjunctiveNormalForm();
      for(DecisionRowInterface oRow : oAlternatives)
      {
        DecisionTableExpressionValueSelection oResultingSelection =
          new DecisionTableExpressionValueSelection();
        oRow.fillValueSelection(oResultingSelection);
        oResultingSelection.setTruthValue(oRow.getTruthValue());
        // TODO: Performanz erh�hen:
        // Hier werden in oRow schon hierarchisch alle Wahrheitswerte
        // der Altenativen vorgehalten - sie m�ssen im folgenden
        // Aufruf nicht erst erneut bestimmt werden!
        TCGDisjunctiveNormalForm oTmpDNF =
          TCGOCLExpressionHelperClass.
          createDNFForExpressionAndDecisionTableRow(oExpression, oResultingSelection);

        TCGConjunctionHelperClass.removeContradictingConjunctions(
            oTmpDNF.getConjunctions());
        if(!oTmpDNF.getConjunctions().isEmpty()) {
          oDNF.getConjunctions().addAll(oTmpDNF.getConjunctions());
        }
      }
      if(!oDNF.getConjunctions().isEmpty()) {
        colRetDNFs.addAll(TCGDisjunctiveNormalFormHelperClass.
          splitUpDNFsAccordingToInequationsAndConfiguration(oDNF));
View Full Code Here

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

      TCGOCLExpression oExpression = in_oOriginalDNF.getOriginalExpression();
      oExpression = TCGOCLExpressionHelperClass.pushDownNots(oExpression);
      DecisionTableFlat oDecisionTable = new DecisionTableFlat(oExpression);
      oDecisionTable.buildUpCompleteDecisionTable();
     
      TCGDisjunctiveNormalForm oPositiveDNF =
        GeneratedFactory.eINSTANCE.createTCGDisjunctiveNormalForm();
      TCGDisjunctiveNormalForm oNegativeDNF =
        GeneratedFactory.eINSTANCE.createTCGDisjunctiveNormalForm();
     
      for(DecisionTableExpressionValueSelection oRow : oDecisionTable)
      {
        TCGDisjunctiveNormalForm oDNF =
          TCGOCLExpressionHelperClass.
          createDNFForExpressionAndDecisionTableRow(oExpression, oRow);
       
        TCGConjunctionHelperClass.removeContradictingConjunctions(
            oDNF.getConjunctions());
        if(!oDNF.getConjunctions().isEmpty()) {
         
          if(DecisionTableRowEvaluator.evaluateExpressionWithValueAssignment(
              oExpression, oRow))
          {
//            System.out.println("### positive: " +
//                TCGDisjunctiveNormalFormHelperClass.toString(oDNF));
            oPositiveDNF.getConjunctions().addAll(oDNF.getConjunctions());
          }
          else
          {
//            System.out.println("### negative: " +
//                TCGDisjunctiveNormalFormHelperClass.toString(oDNF));
            oNegativeDNF.getConjunctions().addAll(oDNF.getConjunctions());
          }
        }
      }
     
      colRetDNFs.addAll(TCGDisjunctiveNormalFormHelperClass.
View Full Code Here

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

  public static boolean checkSatisfactionOfCondition(
      TransitionInstance in_oTransitionInstance,
      TCGDisjunctiveNormalForm in_oDNF)
  {
    // TODO Refactoring: TransitionInstances halten eine Conjunction und nicht eine Menge von Expressions!
    TCGDisjunctiveNormalForm oDNF = GeneratedFactory.eINSTANCE.createTCGDisjunctiveNormalForm();
    TCGConjunction oConjunction = GeneratedFactory.eINSTANCE.createTCGConjunction();
    oDNF.getConjunctions().add(oConjunction);
    // 1) collect all used preconditions backwards in the line of transition instances
    // until an event was called
    // 2) the guard condition of the test goal must be satisfied by the
    // guard conditions of the transition instances
    TransitionInstance oTransitionInstance = in_oTransitionInstance;
View Full Code Here

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

    // complete the value selection row in oNewRow for composite expressions
    boolean bTruthValue = DecisionTableRowEvaluator.evaluateExpressionWithValueAssignment(
        oNewExpression, oNewRow);
   
    // create new dummy DNF with one conjunction
    TCGDisjunctiveNormalForm oDNF = GeneratedFactory.eINSTANCE.createTCGDisjunctiveNormalForm();
    TCGConjunction oConjunction = GeneratedFactory.eINSTANCE.createTCGConjunction();
    oConjunction.setPositiveSubExpressionOfOriginal(bTruthValue);
    oDNF.getConjunctions().add(oConjunction);
    // now create a "resricted" DNF that has (almost) no disjunctions
    // the "restricted" DNF is more or less just a conjunction of expressions
    // matching the current value selection row
    TCGDisjunctiveNormalFormHelperClass.createRestrictedDisjunctiveNormalForm(
        oNewExpression, oNewRow, false, oDNF);
View Full Code Here

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

    ArrayList<TCGOCLExpression> colExpressions =
      splitUpInequationToExpressionList(in_oTCGOCLOperation);
 
    if(!colExpressions.isEmpty())
    {
      TCGDisjunctiveNormalForm oNewDNF = GeneratedFactory.eINSTANCE
        .createTCGDisjunctiveNormalForm();
     
      for(TCGOCLExpression oExpression : colExpressions)
      {
        TCGConjunction oConjunction = GeneratedFactory.eINSTANCE
          .createTCGConjunction();
        oConjunction.getExpressions().add(oExpression);
        oNewDNF.getConjunctions().add(oConjunction);
      }
      return oNewDNF;
    }
    return null;
  }
View Full Code Here

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

            in_colCurrentlyChangedConjunctions);
      }
      // for each conjunction: create a disjunctive normal form
      for(TCGConjunction oConjunction : colCollectedConjunctions)
      {
        TCGDisjunctiveNormalForm oDNF = GeneratedFactory.eINSTANCE.createTCGDisjunctiveNormalForm();
        oDNF.getConjunctions().add(oConjunction);
        if(in_bSplitInequations == false)
        {
          TCGDisjunctiveNormalFormHelperClass.splitUpInequationsInConjunctionList(
            oDNF.getConjunctions());
          removeContradictionsFromConjunctionList(oDNF.getConjunctions(),
            in_colCurrentlyChangedConjunctions);
        }
        colRetValue.add(oDNF);
        // remove weaker expressions in conjunction
        for(TCGConjunction oTmpConjunction : oDNF.getConjunctions())
        {
          removeRedundantExpressions(oTmpConjunction);
        }
  //      System.out.println(TCGDisjunctiveNormalFormHelperClass.toString(oDNF));
 
View Full Code Here

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

    {
      // 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,
View Full Code Here

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

        T result = caseTCGConjunction(tcgConjunction);
        if (result == null) result = defaultCase(theEObject);
        return result;
      }
      case GeneratedPackage.TCG_DISJUNCTIVE_NORMAL_FORM: {
        TCGDisjunctiveNormalForm tcgDisjunctiveNormalForm = (TCGDisjunctiveNormalForm)theEObject;
        T result = caseTCGDisjunctiveNormalForm(tcgDisjunctiveNormalForm);
        if (result == null) result = defaultCase(theEObject);
        return result;
      }
      case GeneratedPackage.TCGOCL_OPERATION: {
View Full Code Here

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

   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @generated
   */
  public NotificationChain basicSetCondition(TCGDisjunctiveNormalForm newCondition, NotificationChain msgs) {
    TCGDisjunctiveNormalForm oldCondition = condition;
    condition = newCondition;
    if (eNotificationRequired()) {
      ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, GeneratedPackage.TCG_REAL_NODE__CONDITION, oldCondition, newCondition);
      if (msgs == null) msgs = notification; else msgs.add(notification);
    }
View Full Code Here

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

    RESOLVED_CONDITION
  }

  public static TCGDisjunctiveNormalForm copyDNF(TCGDisjunctiveNormalForm in_oDNF)
  {
    TCGDisjunctiveNormalForm oDNF = GeneratedFactory.eINSTANCE.createTCGDisjunctiveNormalForm();
    oDNF.getConjunctions().addAll(in_oDNF.getConjunctions());
    oDNF.setOriginalExpression(in_oDNF.getOriginalExpression());
    return oDNF;
  }
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.