Package org.eclipse.ocl.uml

Examples of org.eclipse.ocl.uml.OCLExpression


      {
        // new vertex is not allowed if target vertex is already existing
        if(!(Configuration.getTransitionBasedCoverageCriterion().equals(Configuration.TransitionBasedCoverageCriterion.STATE_COVERAGE) &&
            m_oTestCaseGraphHelper.getHistory().vertexHasEverBeenVisited(oSMTransition.getTarget())))
        {
          OCLExpression oExpression = OCLParser.parseCondition(
              SystemModelHelper.getTransitionGuard(oSMTransition),
              oContextClass, Configuration.getOCLGuardId());
          // guard conditions verarbeiten, aber das event nicht separat erzeugen
          ArrayList<TCGNode> colNodes = m_oTestCaseGraphHelper.createTCGPartFromExpressionForCallEvent(
              oExpression, in_oTCGNode, null, oContextClass, false);
View Full Code Here


        //org.eclipse.uml2.uml.Class oContextClass = Configuration.getContextClass(in_oSMState.getSystemState().getContainer().getStateMachine());
        org.eclipse.uml2.uml.Class oContextClass = Configuration.getContextClassForVertex(oSMTransition.getSource());
        Namespace oNamespace = SystemModelHelper.getNamespaceForEvent(
            oSMTransition.getSource(), in_oEvent);

        OCLExpression oExpression = OCLParser.parseCondition(
            SystemModelHelper.getTransitionGuard(oSMTransition),
            oNamespace, Configuration.getOCLGuardId());
        ArrayList<TCGNode> colNodes = m_oTestCaseGraphHelper.createTCGPartFromExpressionForCallEvent(
            oExpression, in_oTCGNode, in_oEvent, oContextClass, true);
View Full Code Here

    else
    {
      for(Constraint oPreConstraint : in_oOperation.getPreconditions())
      {
        String sPreExpression = SystemModelHelper.getConstraintSpecification(oPreConstraint);
        OCLExpression oExpression = OCLParser.parseCondition(
            sPreExpression, in_oOperation, Configuration.getOCLGuardId());
        ArrayList<TCGNode> colPreNodes = m_oTestCaseGraphHelper.createTCGPartFromExpressionForPrecondition(
            oExpression, in_oNode, in_oOperation, in_oContextClass);
        for(TCGNode oNewTCGNode : colPreNodes)
        {
View Full Code Here

    else
    {
      for(Constraint oPostConstraint : in_oOperation.getPostconditions())
      {
        String sPostExpression = SystemModelHelper.getConstraintSpecification(oPostConstraint);
        OCLExpression oPostExpression = OCLParser.parseCondition(
            sPostExpression, in_oOperation, Configuration.getOCLGuardId());
        ArrayList<TCGNode> colPostNodes = m_oTestCaseGraphHelper.createTCGPartFromExpressionForPostcondition(
            oPostExpression, in_oNode, in_oOperation, in_oContextClass);
        for(TCGNode oPostTCGNode : colPostNodes)
        {
View Full Code Here

          oOperation.getVisibility().equals(VisibilityKind.PUBLIC_LITERAL))
      {
        Constraint oPostConstraint = oOperation.getPostconditions().get(0);
        String sPostExpression =
          SystemModelHelper.getConstraintSpecification(oPostConstraint);
        OCLExpression oExpression = OCLParser.parseCondition(
            sPostExpression, oOperation, Configuration.getOCLPostId());
       
        // resolve variables and build up map from variable to operation
        if(oExpression instanceof PropertyCallExp) {
          PropertyCallExp oPropCallExp = (PropertyCallExp)oExpression;
View Full Code Here

            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)
View Full Code Here

  public static void setInvariantForTCGNode(
      Vertex in_oVertex,
      org.eclipse.uml2.uml.Class in_oContextClass,
      TCGNode in_oTCGNode) throws Exception
  {
    OCLExpression oExpression = OCLParser.parseCondition(
        SystemModelHelper.getStateInvariant(in_oVertex),
        in_oContextClass, Configuration.getOCLGuardId());
    TCGOCLExpression oTCGOCLExp = TransformOCLToTCGOCL.transformExpression(
        oExpression, Configuration.getOCLGuardId(), in_oContextClass);
    in_oTCGNode.setInvariant(oTCGOCLExp);
View Full Code Here

      boolean in_bSplitInequations)
  {
    try
    {
      // abstract syntax tree of guard: OCLExpression
      OCLExpression oExpression = OCLParser.parseCondition(
          in_sOCLCondition, in_oNamespace, in_sOCLKindId);
      // create corresponding DNF with TCGOCLExpressions
      TCGDisjunctiveNormalForm oDNF =
        TCGDisjunctiveNormalFormHelperClass.createDNFForOCLExpression(
            oExpression, in_oNamespace, in_oContextClass,
View Full Code Here

    // empty expression -> return null pointer
    if(in_sExpression.length() == 0)
      return null;
   
    try{
      OCLExpression oExpression = null;
      OCL oOcl = org.eclipse.ocl.uml.OCL.newInstance(
          new UMLEnvironmentFactory(
              new ResourceSetImpl()));
      OCL.Helper helper = oOcl.createOCLHelper();
      //if(in_sExpressionType.compareTo(Configuration.getOCLInvId()) == 0)
View Full Code Here

      {
        // TODO un�re Operationen einf�hren?
        OperationCallExp oOpExp = (OperationCallExp)in_oExpression;
     
        TCGOCLOperation oOperation = GeneratedFactory.eINSTANCE.createTCGOCLOperation();
        OCLExpression oOCLLeftExpression = (OCLExpression)oOpExp.getSource();
        if(oOCLLeftExpression != null)
          oOperation.setLeft(
              transformExpression(oOCLLeftExpression, in_sOCLTypeId, oContextClass));
        if(oOpExp.getArgument().size() > 0)
          oOperation.setRight(
View Full Code Here

TOP

Related Classes of org.eclipse.ocl.uml.OCLExpression

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.