Examples of TCGConjunction


Examples of net.sf.parteg.base.testcasetree.generated.TCGConjunction

public class TCGConjunctionHelperClass {

  public static TCGConjunction copyConjunction(TCGConjunction in_oConjunction)
  {
    TCGConjunction oConjunction = GeneratedFactory.eINSTANCE.createTCGConjunction();
    oConjunction.getExpressions().addAll(in_oConjunction.getExpressions());
    return oConjunction;
  }
View Full Code Here

Examples of net.sf.parteg.base.testcasetree.generated.TCGConjunction

    if(io_nCurrentConjunctionsSetIndex >= in_colConjunctionSets.size())
    {
      // without any changeable conjunction, the assembled conjunctions would be no element of MCDC
      if(io_nChangeableConjunctionCounter >= 1)
      {
        TCGConjunction oNewConjunction = GeneratedFactory.eINSTANCE.createTCGConjunction();
        oNewConjunction.setCanChangeValueIfOneExpressionChanges(true);
        if(io_nCurrentPositiveIndex >= 0)
          oNewConjunction.setPositiveSubExpressionOfOriginal(true);
        else
          oNewConjunction.setPositiveSubExpressionOfOriginal(false);
       
        for(TCGConjunction oConjunction : io_colNewConjunctions)
        {
          oNewConjunction.getExpressions().addAll(oConjunction.getExpressions());
        }
        // combine the expressions of all elements
        // TODO #### reduce number of expressions for MCDC
        io_oDNF.getConjunctions().add(oNewConjunction);
      }
View Full Code Here

Examples of net.sf.parteg.base.testcasetree.generated.TCGConjunction

      int in_nCurrentExpressionIndex,
      boolean in_bContainsNegativeExpressions)
  {
    if(in_nCurrentExpressionIndex >= in_oOriginalConjunction.getExpressions().size())
    {
      TCGConjunction oNewConjunction = GeneratedFactory.eINSTANCE.createTCGConjunction();
      oNewConjunction.getExpressions().addAll(io_colExpressionsForNewConjunction);
      oNewConjunction.setPositiveSubExpressionOfOriginal(!in_bContainsNegativeExpressions);
      io_colNewConjunctions.get(in_oOriginalConjunction).add(oNewConjunction);
    }
    else
    {
      TCGOCLExpression oExpression = TestCaseGraphHelper.copyExpression(
          in_oOriginalConjunction.getExpressions().get(in_nCurrentExpressionIndex));
      io_colExpressionsForNewConjunction.add(oExpression);
      addAllPossibleConjunctions(io_colNewConjunctions, in_oOriginalConjunction, io_colExpressionsForNewConjunction,
          in_nCurrentExpressionIndex + 1, in_bContainsNegativeExpressions);
      io_colExpressionsForNewConjunction.remove(oExpression);
     
      TCGOCLExpression oNegatedExpression = TestCaseGraphHelper.copyExpression(oExpression);
      oNegatedExpression = negateTCGOCLExpression(oNegatedExpression);
      TCGDisjunctiveNormalForm oDNF =  createDisjunctiveNormalForm(oNegatedExpression);
      for(TCGConjunction oNewConjunction : oDNF.getConjunctions())
      {
        for(TCGOCLExpression oNewConjExp : oNewConjunction.getExpressions())
        {
          io_colExpressionsForNewConjunction.add(oNewConjExp);
          addAllPossibleConjunctions(io_colNewConjunctions, in_oOriginalConjunction, io_colExpressionsForNewConjunction,
              in_nCurrentExpressionIndex + 1, true);
          io_colExpressionsForNewConjunction.remove(oNewConjExp);
View Full Code Here

Examples of net.sf.parteg.base.testcasetree.generated.TCGConjunction

    // all expressions collected -> assemble the conjunction
    if(in_nCurrentExpressionIndex >= in_oOriginalConjunction.getExpressions().size())
    {
      if(in_nNegativeExpressionCounter == 0)
      {
        TCGConjunction oPositiveConjunction = TCGConjunctionHelperClass.copyConjunction(in_oOriginalConjunction);
        oPositiveConjunction.setPositiveSubExpressionOfOriginal(true);
        oPositiveConjunction.setCanChangeValueIfOneExpressionChanges(true);
        io_colNewConjunctions.setPositiveConjunction(oPositiveConjunction);
      }
      else
      {
        TCGConjunction oNegativeConjunction = GeneratedFactory.eINSTANCE.createTCGConjunction();
        oNegativeConjunction.getExpressions().addAll(io_colExpressionsForNewConjunction);
        oNegativeConjunction.setPositiveSubExpressionOfOriginal(false);
        if(in_nNegativeExpressionCounter == 1)
        {
          oNegativeConjunction.setCanChangeValueIfOneExpressionChanges(true);
          io_colNewConjunctions.getNegativeButChangeableConjunctions().add(oNegativeConjunction);
        }
        else
        {
          oNegativeConjunction.setCanChangeValueIfOneExpressionChanges(false);
          io_colNewConjunctions.getNegativeAndUnchangeableConjunctions().add(oNegativeConjunction);
        }
      }
    }
    else // collect all expression permutations
View Full Code Here

Examples of net.sf.parteg.base.testcasetree.generated.TCGConjunction

      ArrayList<TCGConjunction> io_colCurrentCombinedConjunction)
  {
    if(in_nCurrentIndex >= io_colNewConjunctions.size())
    {
      // assemble the conjunctions of io_colCurrentCombinedConjunction
      TCGConjunction oNewConjunction = GeneratedFactory.eINSTANCE.createTCGConjunction();
      for(TCGConjunction oConjunction : io_colCurrentCombinedConjunction)
      {
        if(oConjunction.isPositiveSubExpressionOfOriginal() == false)
          oNewConjunction.setPositiveSubExpressionOfOriginal(false);
       
        for(TCGOCLExpression oExpression : oConjunction.getExpressions())
        {
          oNewConjunction.getExpressions().add(oExpression);
        }
      }
      // just assembled conjunction
      io_colCombinedConjunctions.add(oNewConjunction);
    }
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.