Creates an assignment expression in which the specified expression
is written into the specified variable name.
963491
public static BinaryExpression newAssignmentExpression(Variable variable, Expression rhs) {
        VariableExpression lhs = new VariableExpression(variable);
        Token operator = Token.newPlaceholder(Types.ASSIGN);

        return new BinaryExpression(lhs, operator, rhs);
    }
363192
public SDVariable assign(SDVariable x, SDVariable y) {
        return assign(null, x, y);
    }
646894
function reportAssignment(assignmentExpression) {
            context.report({
                node: assignmentExpression,
                messageId: "nonAtomicUpdate",
                data: {
                    value: sourceCode.getText(assignmentExpression.left)
                }
            });
        }
847580
def _set_expressions(self, expressions):
        """"""
        Symbolic_core._set_expressions(self, expressions)
        Symbolic_core._set_variables(self, self.cacheable)
        # Substitute z with x to obtain kdiag.
        for x, z in zip(self.variables['X'], self.variables['Z']):
            expressions['kdiag'] = expressions['kdiag'].subs(z, x)
        Symbolic_core._set_expressions(self, expressions)
214263
@Nonnull
    private Expression buildExpression( String str ) {
        switch( str.charAt( 0 ) ) {
            case '@':
                return new VariableExpression( reader, str );
            case '-':
                if( str.startsWith( "-@" ) ) {
                    return new FunctionExpression( reader, "-", new Operation( reader, buildExpression( str.substring( 1 ) ), (char)0 ) );
                }
                //$FALL-THROUGH$
            default:
                return new ValueExpression( reader, str );
        }
    }
409597
def assignment_action(self, text, loc, assign):
        """"""
        exshared.setpos(loc, text)
        if DEBUG > 0:
            print("ASSIGN:",assign)
            if DEBUG == 2: self.symtab.display()
            if DEBUG > 2: return
        var_index = self.symtab.lookup_symbol(assign.var, [SharedData.KINDS.GLOBAL_VAR, SharedData.KINDS.PARAMETER, SharedData.KINDS.LOCAL_VAR])
        if var_index == None:
            raise SemanticException("Undefined lvalue '%s' in assignment" % assign.var)
        if not self.symtab.same_types(var_index, assign.exp[0]):
            raise SemanticException("Incompatible types in assignment")
        self.codegen.move(assign.exp[0], var_index)
1198844
final public static function assign(Expression $assignToValue, $assignmentOperator, Expression $assignmentValue)
    {
        return new AssignmentExpression(
                $assignToValue,
                $assignmentOperator,
                $assignmentValue);
    }
1227025
protected void createVariableLocal(String variableName, Object value, ExecutionEntity sourceActivityExecution) {
    ensureVariableInstancesInitialized();

    if (variableInstances.containsKey(variableName)) {
      throw new ActivitiException("variable '" + variableName + "' already exists. Use setVariableLocal if you want to overwrite the value");
    }

    createVariableInstance(variableName, value, sourceActivityExecution);
  }
304207
def assign_statement(self):
        
        left = self.variable()
        op = self.cur_token
        self.eat(TokenTypes.ASSIGN)
        right = self.expression()
        smt = None
        if Features.TYPE_ARRAY in self.features and isinstance(left, GetArrayItem):
            # Remake this as a setitem.
            smt = SetArrayItem(left.left, left.right, right)
        else:
            smt = Assign(op, left, right)
        if self.cur_token.type == TokenTypes.SEMI_COLON:
            self.eat(TokenTypes.SEMI_COLON)
        return smt
443568
private Context translateVariableAssign(WyilFile.Expr.VariableAccess lval, Expr rval, Context context) {
		WyilFile.Decl.Variable decl = lval.getVariableDeclaration();
		context = context.havoc(decl);
		WyalFile.VariableDeclaration nVersionedVar = context.read(decl);
		Expr.VariableAccess var = new Expr.VariableAccess(nVersionedVar);
		return context.assume(new Expr.Equal(var, rval));
	}
299735
function createVariable() {
    var id = nextVariableId++;
    var name = '$V';

    do {
        name += variableTokens[id % variableTokensLength];
        id = ~~(id / variableTokensLength);
    } while (id !== 0);

    return name;
}
984959
function assignToGlobal(expr, nodes, expression) {
    createGlobal(expr, nodes);
    if (!t.isExpression(expression)) {
      expression = t.toExpression(expression);
    }
    nodes.push(t.expressionStatement(t.assignmentExpression('=', expr, expression)));
  }
91882
public static String createCustomExpressionInvocationText(CustomExpression customExpression, String customExpName, boolean usePreviousFieldValues) {
        String stringExpression;
        if (customExpression instanceof DJSimpleExpression) {
            DJSimpleExpression varexp = (DJSimpleExpression) customExpression;
            String symbol;
            switch (varexp.getType()) {
                case DJSimpleExpression.TYPE_FIELD:
                    symbol = "F";
                    break;
                case DJSimpleExpression.TYPE_VARIABLE:
                    symbol = "V";
                    break;
                case DJSimpleExpression.TYPE_PARAMATER:
                    symbol = "P";
                    break;
                default:
                    throw new DJException("Invalid DJSimpleExpression, type must be FIELD, VARIABLE or PARAMETER");
            }
            stringExpression = "$" + symbol + "{" + varexp.getVariableName() + "}";

        } else {
            String fieldsMap = "((" + DJDefaultScriptlet.class.getName() + ")$P{REPORT_SCRIPTLET}).getCurrentFields()";
            if (usePreviousFieldValues) {
                fieldsMap = "((" + DJDefaultScriptlet.class.getName() + ")$P{REPORT_SCRIPTLET}).getPreviousFields()";
            }

            String parametersMap = "((" + DJDefaultScriptlet.class.getName() + ")$P{REPORT_SCRIPTLET}).getCurrentParams()";
            String variablesMap = "((" + DJDefaultScriptlet.class.getName() + ")$P{REPORT_SCRIPTLET}).getCurrentVariables()";

            stringExpression = "((" + CustomExpression.class.getName() + ")$P{REPORT_PARAMETERS_MAP}.get(\"" + customExpName + "\"))."
                    + CustomExpression.EVAL_METHOD_NAME + "( " + fieldsMap + ", " + variablesMap + ", " + parametersMap + " )";
        }

        return stringExpression;
    }
331696
public static Expr.VariableAccess extractAssignedVariable(LVal lval) {
		if (lval instanceof Expr.VariableAccess) {
			return (Expr.VariableAccess) lval;
		} else if (lval instanceof Expr.RecordAccess) {
			Expr.RecordAccess e = (Expr.RecordAccess) lval;
			return extractAssignedVariable((LVal) e.getOperand());
		} else if (lval instanceof Expr.ArrayAccess) {
			Expr.ArrayAccess e = (Expr.ArrayAccess) lval;
			return extractAssignedVariable((LVal) e.getFirstOperand());
		} else if (lval instanceof Expr.Dereference) {
			return null;
		} else {
			syntaxError(lval, WyilFile.INVALID_LVAL_EXPRESSION);
			return null; // dead code
		}
	}
121889
public static VariableMap putValue(String name, Object value) {
    return createVariables().putValue(name, value);
  }
87743
private Assignment createAssignment(final LNGBooleanVector vec, final Collection<Variable> variables) {
        final Assignment model = new Assignment();
        for (int i = 1; i < vec.size(); i++) {
            final Variable var = this.f.variable(this.idx2name.get(i));
            if (vec.get(i)) {
                if (variables == null || variables.contains(var)) { model.addLiteral(var); }
            } else if (variables == null || variables.contains(var)) { model.addLiteral(var.negate()); }
        }
        return model;
    }
771342
public Expression create(String expression, ExpressionType expressionType, PropertyResolver propertyResolver) {
        if (expressionType == null) {
            expressionType = ExpressionType.MVEL;
        }
        if (propertyResolver == null) {
            propertyResolver = SystemAndTestPropertyResolver.INSTANCE;
        }
        switch (expressionType) {
        case MVEL:
            return new MVELExpression(expression, propertyResolver);
        default:
            throw CommonKnowledgeMessages.MESSAGES.unknownExpressionType(expressionType.toString());
        }
    }