@SuppressWarnings("unchecked")
	public Expr translateExpression(WyilFile.Expr expr, Integer selector, LocalEnvironment environment) {
		Expr result;
		try {
			switch (expr.getOpcode()) {
			case WyilFile.EXPR_constant:
				result = translateConstant((WyilFile.Expr.Constant) expr, environment);
				break;
			case WyilFile.EXPR_cast:
				result = translateConvert((WyilFile.Expr.Cast) expr, environment);
				break;
			case WyilFile.EXPR_recordaccess:
			case WyilFile.EXPR_recordborrow:
				result = translateFieldLoad((WyilFile.Expr.RecordAccess) expr, environment);
				break;
			case WyilFile.EXPR_indirectinvoke:
				result = translateIndirectInvoke((WyilFile.Expr.IndirectInvoke) expr, environment);
				break;
			case WyilFile.EXPR_invoke:
				result = translateInvoke((WyilFile.Expr.Invoke) expr, selector, environment);
				break;
			case WyilFile.DECL_lambda:
				result = translateLambda((WyilFile.Decl.Lambda) expr, environment);
				break;
			case WyilFile.EXPR_lambdaaccess:
				result = translateLambda((WyilFile.Expr.LambdaAccess) expr, environment);
				break;
			case WyilFile.EXPR_logicalexistential:
			case WyilFile.EXPR_logicaluniversal:
				result = translateQuantifier((WyilFile.Expr.Quantifier) expr, environment);
				break;
			case WyilFile.EXPR_variablemove:
			case WyilFile.EXPR_variablecopy:
				result = translateVariableAccess((WyilFile.Expr.VariableAccess) expr, environment);
				break;
			case WyilFile.EXPR_staticvariable:
				result = translateStaticVariableAccess((WyilFile.Expr.StaticVariableAccess) expr, environment);
				break;
			case WyilFile.EXPR_logicalnot:
				result = translateNotOperator((WyilFile.Expr.LogicalNot) expr, environment);
				break;
			case WyilFile.EXPR_integernegation:
				result = translateArithmeticNegation((WyilFile.Expr.IntegerNegation) expr, environment);
				break;
			case WyilFile.EXPR_integeraddition:
			case WyilFile.EXPR_integersubtraction:
			case WyilFile.EXPR_integermultiplication:
			case WyilFile.EXPR_integerdivision:
			case WyilFile.EXPR_integerremainder:
			case WyilFile.EXPR_equal:
			case WyilFile.EXPR_notequal:
			case WyilFile.EXPR_integerlessthan:
			case WyilFile.EXPR_integerlessequal:
			case WyilFile.EXPR_integergreaterthan:
			case WyilFile.EXPR_integergreaterequal:
			case WyilFile.EXPR_logiaclimplication:
			case WyilFile.EXPR_logicaliff:
				result = translateBinaryOperator((WyilFile.Expr.BinaryOperator) expr, environment);
				break;
			case WyilFile.EXPR_logicaland:
			case WyilFile.EXPR_logicalor:
				result = translateNaryOperator((WyilFile.Expr.NaryOperator) expr, environment);
				break;
			case WyilFile.EXPR_is:
				result = translateIs((WyilFile.Expr.Is) expr, environment);
				break;
			case WyilFile.EXPR_arrayaccess:
			case WyilFile.EXPR_arrayborrow:
				result = translateArrayIndex((WyilFile.Expr.ArrayAccess) expr, environment);
				break;
			case WyilFile.EXPR_arrayinitialiser:
				result = translateArrayInitialiser((WyilFile.Expr.ArrayInitialiser) expr, environment);
				break;
			case WyilFile.EXPR_arraygenerator:
				result = translateArrayGenerator((WyilFile.Expr.ArrayGenerator) expr, environment);
				break;
			case WyilFile.EXPR_recordinitialiser:
				result = translateRecordInitialiser((WyilFile.Expr.RecordInitialiser) expr, environment);
				break;
			case WyilFile.EXPR_arraylength:
				result = translateArrayLength((WyilFile.Expr.ArrayLength) expr, environment);
				break;
			case WyilFile.EXPR_dereference:
				result = translateDereference((WyilFile.Expr.Dereference) expr, environment);
				break;
			case WyilFile.EXPR_bitwiseshr:
			case WyilFile.EXPR_bitwiseshl:
			case WyilFile.EXPR_bitwiseand:
			case WyilFile.EXPR_bitwiseor:
			case WyilFile.EXPR_bitwisexor:
			case WyilFile.EXPR_bitwisenot:
			case WyilFile.EXPR_new:
				result = translateAsUnknown(expr, environment);
				break;
			default:
				throw new RuntimeException("Deadcode reached (" + expr.getClass().getName() + ")");
			}
		} catch (SyntacticException e) {
			throw e;
		} catch (Throwable e) {
			throw new SyntacticException(e.getMessage(), ((WyilFile) expr.getHeap()).getEntry(), expr, e);
		}
		return allocate(result, expr.getParent(WyilFile.Attribute.Span.class));
	}
@ SuppressWarnings ( "unchecked" ) public Expr translateExpression ( WyilFile . Expr expr , Integer selector , LocalEnvironment environment ) { Expr result ; try { switch ( expr . getOpcode ( ) ) { case WyilFile . EXPR_constant : result = translateConstant ( ( WyilFile . Expr . Constant ) expr , environment ) ; break ; case WyilFile . EXPR_cast : result = translateConvert ( ( WyilFile . Expr . Cast ) expr , environment ) ; break ; case WyilFile . EXPR_recordaccess : case WyilFile . EXPR_recordborrow : result = translateFieldLoad ( ( WyilFile . Expr . RecordAccess ) expr , environment ) ; break ; case WyilFile . EXPR_indirectinvoke : result = translateIndirectInvoke ( ( WyilFile . Expr . IndirectInvoke ) expr , environment ) ; break ; case WyilFile . EXPR_invoke : result = translateInvoke ( ( WyilFile . Expr . Invoke ) expr , selector , environment ) ; break ; case WyilFile . DECL_lambda : result = translateLambda ( ( WyilFile . Decl . Lambda ) expr , environment ) ; break ; case WyilFile . EXPR_lambdaaccess : result = translateLambda ( ( WyilFile . Expr . LambdaAccess ) expr , environment ) ; break ; case WyilFile . EXPR_logicalexistential : case WyilFile . EXPR_logicaluniversal : result = translateQuantifier ( ( WyilFile . Expr . Quantifier ) expr , environment ) ; break ; case WyilFile . EXPR_variablemove : case WyilFile . EXPR_variablecopy : result = translateVariableAccess ( ( WyilFile . Expr . VariableAccess ) expr , environment ) ; break ; case WyilFile . EXPR_staticvariable : result = translateStaticVariableAccess ( ( WyilFile . Expr . StaticVariableAccess ) expr , environment ) ; break ; case WyilFile . EXPR_logicalnot : result = translateNotOperator ( ( WyilFile . Expr . LogicalNot ) expr , environment ) ; break ; case WyilFile . EXPR_integernegation : result = translateArithmeticNegation ( ( WyilFile . Expr . IntegerNegation ) expr , environment ) ; break ; case WyilFile . EXPR_integeraddition : case WyilFile . EXPR_integersubtraction : case WyilFile . EXPR_integermultiplication : case WyilFile . EXPR_integerdivision : case WyilFile . EXPR_integerremainder : case WyilFile . EXPR_equal : case WyilFile . EXPR_notequal : case WyilFile . EXPR_integerlessthan : case WyilFile . EXPR_integerlessequal : case WyilFile . EXPR_integergreaterthan : case WyilFile . EXPR_integergreaterequal : case WyilFile . EXPR_logiaclimplication : case WyilFile . EXPR_logicaliff : result = translateBinaryOperator ( ( WyilFile . Expr . BinaryOperator ) expr , environment ) ; break ; case WyilFile . EXPR_logicaland : case WyilFile . EXPR_logicalor : result = translateNaryOperator ( ( WyilFile . Expr . NaryOperator ) expr , environment ) ; break ; case WyilFile . EXPR_is : result = translateIs ( ( WyilFile . Expr . Is ) expr , environment ) ; break ; case WyilFile . EXPR_arrayaccess : case WyilFile . EXPR_arrayborrow : result = translateArrayIndex ( ( WyilFile . Expr . ArrayAccess ) expr , environment ) ; break ; case WyilFile . EXPR_arrayinitialiser : result = translateArrayInitialiser ( ( WyilFile . Expr . ArrayInitialiser ) expr , environment ) ; break ; case WyilFile . EXPR_arraygenerator : result = translateArrayGenerator ( ( WyilFile . Expr . ArrayGenerator ) expr , environment ) ; break ; case WyilFile . EXPR_recordinitialiser : result = translateRecordInitialiser ( ( WyilFile . Expr . RecordInitialiser ) expr , environment ) ; break ; case WyilFile . EXPR_arraylength : result = translateArrayLength ( ( WyilFile . Expr . ArrayLength ) expr , environment ) ; break ; case WyilFile . EXPR_dereference : result = translateDereference ( ( WyilFile . Expr . Dereference ) expr , environment ) ; break ; case WyilFile . EXPR_bitwiseshr : case WyilFile . EXPR_bitwiseshl : case WyilFile . EXPR_bitwiseand : case WyilFile . EXPR_bitwiseor : case WyilFile . EXPR_bitwisexor : case WyilFile . EXPR_bitwisenot : case WyilFile . EXPR_new : result = translateAsUnknown ( expr , environment ) ; break ; default : throw new RuntimeException ( "Deadcode reached (" + expr . getClass ( ) . getName ( ) + ")" ) ; } } catch ( SyntacticException e ) { throw e ; } catch ( Throwable e ) { throw new SyntacticException ( e . getMessage ( ) , ( ( WyilFile ) expr . getHeap ( ) ) . getEntry ( ) , expr , e ) ; } return allocate ( result , expr . getParent ( WyilFile . Attribute . Span . class ) ) ; }
Transform a given bytecode location into its equivalent WyAL expression.

@param location
The bytecode location to be translated
@return