Examples of Expression


Examples of org.renjin.compiler.ir.tac.expressions.Expression

  }

  private void search(BasicBlock X) {
   
    for(Statement stmt : X.getStatements()) {
      Expression rhs = stmt.getRHS();
      if(!(rhs instanceof PhiFunction)) {
        for(Variable V : rhs.variables()) {
          int i = Top(V);
          rhs = rhs.replaceVariable(V, new SsaVariable(V, i));
        }
        stmt = X.replaceStatement(stmt, stmt.withRHS(rhs));
      }
     
      if(stmt instanceof Assignment) {
        Assignment assignment = (Assignment)stmt;
        if(assignment.getLHS() instanceof Variable) {
          Variable V = (Variable)assignment.getLHS();
          int i = C.get(V);
          X.replaceStatement(assignment, assignment.withLHS(new SsaVariable(V, i)));
          S.get(V).push(i);
          C.put(V, i + 1);
        }
      }
    }
   
    for(BasicBlock Y : cfg.getSuccessors(X)) {
      int j = whichPred(Y,X);
      for (Assignment A : Lists.newArrayList(Y.phiAssignments())) {
        PhiFunction rhs = (PhiFunction) A.getRHS();
        Variable V = rhs.getArgument(j);
        int i = Top(V);
        rhs = rhs.replaceVariable(j, i);
        Y.replaceStatement(A, new Assignment(A.getLHS(), rhs));
        // replace the j-th operand V in RHS(F) by V_i where i = Top(S(V))
      }
    }
    for(BasicBlock Y : dtree.getChildren(X)) {
View Full Code Here

Examples of org.springframework.binding.expression.Expression

    parser.putContextFactory(TestBean.class, new TestELContextFactory());
  }

  public void testParseSimpleEvalExpressionNoParserContext() {
    String expressionString = "3 + 4";
    Expression exp = parser.parseExpression(expressionString, null);
    assertEquals(new Long(7), exp.getValue(null));
  }
View Full Code Here

Examples of org.springframework.expression.Expression

  /**
   *
   */
  public final boolean applies(String condition) {
    if (condition != null) {
      Expression expr = parser.parseExpression(condition);
      Object value = expr.getValue(evalContext);
      if (value instanceof Boolean) {
        return (Boolean) value;
      }
      throw new JibeRuntimeException("Wrong value returned:" + condition);
    }
View Full Code Here

Examples of org.springmodules.validation.bean.conf.loader.annotation.handler.Expression

        super(Expression.class);
    }

    @Override
    public String convertToValang(String fieldName, Annotation a, MessageSourceAccessor messages) {
        Expression annotation = (Expression) a;

        String errMsg = messages.getMessage(annotation.errorCode(), annotation.message());
        String applyIfValang = valangToJS(annotation.applyIf());
        String expression = valangToJS(annotation.value());

        return buildBasicRule(fieldName, errMsg, expression, applyIfValang, annotation);
    }
View Full Code Here

Examples of org.switchyard.component.common.knowledge.expression.Expression

                        break;
                }
                String output_var = toVariable(output);
                expressionVariables.put(output_var, output);
                String output_to = to_em.getTo() + " = " + output_var;
                Expression output_to_expr = ExpressionFactory.INSTANCE.create(output_to, null, to_em.getPropertyResolver());
                run(message, output_to_expr, expressionVariables);
            }
        }
    }
View Full Code Here

Examples of org.teiid.language.Expression

    static int[] getNeededColumns(List<DerivedColumn> select, RuntimeMetadata metadata) throws TranslatorException {
        int[] cols = new int[select.size()];
        Iterator iter = select.iterator();
        for(int i=0; iter.hasNext(); i++) {
            DerivedColumn symbol = (DerivedColumn) iter.next();
            Expression expr = symbol.getExpression();
            if(expr instanceof ColumnReference) {
                Column element = ((ColumnReference)expr).getMetadataObject();
                cols[i] = element.getPosition();
            } else {
                throw new TranslatorException(YahooPlugin.Util.getString("YahooExecution.Invalid_select_symbol", expr)); //$NON-NLS-1$
View Full Code Here

Examples of org.teiid.query.sql.symbol.Expression

     */
    private static boolean canPushSymbol(SingleElementSymbol symbol, boolean inSelectClause, Object modelID,
        QueryMetadataInterface metadata, CapabilitiesFinder capFinder, AnalysisRecord record)
    throws TeiidComponentException, QueryMetadataException {

        Expression expr = SymbolMap.getExpression(symbol);
       
        // Do the normal checks
        if(! CriteriaCapabilityValidatorVisitor.canPushLanguageObject(expr, modelID, metadata, capFinder, record)) {
            return false;
        }
View Full Code Here

Examples of org.thymeleaf.standard.expression.Expression

    @Override
    protected Map<String, Object> getNewLocalVariables(Arguments arguments, Element element) {
        initServices(arguments);
        FieldWrapper fieldWrapper = new FieldWrapper();
       
        Expression expression = (Expression) StandardExpressions.getExpressionParser(arguments.getConfiguration())
                .parseExpression(arguments.getConfiguration(), arguments, element.getAttributeValue("fieldBuilder"));
        String fieldBuilder = (String) expression.execute(arguments.getConfiguration(), arguments);

        if (fieldBuilder != null) {
            RuleBuilderFieldService ruleBuilderFieldService = ruleBuilderFieldServiceFactory.createInstance(fieldBuilder);
            if (ruleBuilderFieldService != null) {
                fieldWrapper = ruleBuilderFieldService.buildFields();
View Full Code Here

Examples of org.voltdb.benchmark.Verification.Expression

        }
        return true;
    }

    protected void buildConstraints() {
        Expression constraint = null;

        // PlayRound table 0: 0 <= C4 < 100 (max round is 100)
        constraint = Verification.inRange("C4", 0L, 99L);
        addConstraint("PlayRound", 0, constraint);

        // PlayRound table 1: 0 <= R_POT < 900 (because the max round is 100, we
        // only add at most 9 each time)
        Expression r_pot = Verification.inRange("R_POT", 0, 899);
        Expression t_id = Verification.compareWithConstant(ExpressionType.COMPARE_GREATERTHANOREQUALTO,
                                                           "T_ID", 0);
        Expression b_id = Verification.compareWithConstant(ExpressionType.COMPARE_GREATERTHANOREQUALTO,
                                                           "B_ID", 0);
        Expression r_id = Verification.compareWithConstant(ExpressionType.COMPARE_GREATERTHANOREQUALTO,
                                                           "R_ID", 0);
        constraint = Verification.conjunction(ExpressionType.CONJUNCTION_AND,
                                              r_pot, t_id, b_id, r_id);
        addConstraint("PlayRound", 1, constraint);
View Full Code Here

Examples of org.wso2.carbon.cep.core.Expression

public class ExpressionHelper {
    public static Expression fromOM(OMElement expressionElement) {

        String type = expressionElement.getAttribute(new QName(CEPConstants.CEP_CONT_ATTR_TYPE)).getAttributeValue();
        String text = expressionElement.getText();
        Expression expression = new Expression();
        expression.setType(type);
        expression.setText(text);
        return expression;
    }
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.