// Path: MySmallBasic/src/com/coducation/smallbasic/util/Util.java
// public class Util {
// 	public static String throwableToStacktrace(Throwable e) {
// 		StringWriter sw = new StringWriter();
// 		e.printStackTrace(new PrintWriter(sw));
// 		String exceptionAsString = sw.toString();
// 		return exceptionAsString;
// 	}
// }


import java.lang.reflect.Field;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
import java.util.ArrayList;
import com.coducation.smallbasic.util.Util;

		// End
	}

	public void eval(BasicBlockEnv bbEnv, Env env, Assign assignStmt) {
		Expr lhs = assignStmt.getLSide();
		Expr rhs = assignStmt.getRSide();

		// Value v1 = eval(env, lhs);
		Value v2 = eval(env, rhs);

		// Assigning an array is done by copy.
		if (v2 instanceof ArrayV) {
			v2 = ((ArrayV)v2).copy();
		}

		if (lhs instanceof Var) {
			env.put(((Var) lhs).getVarName(), v2);
		} else if (lhs instanceof PropertyExpr) {
			try {
				String clzName = ((PropertyExpr) lhs).getObj();
				Class clz = getClass(clzName);
				Field fld = clz.getField(((PropertyExpr) lhs).getName());
				fld.set(null, v2);

				// After any field assignment, invoke notifyFieldAssign for
				// Library to know
				// the change of the field value.
				Method mth = clz.getMethod(notifyFieldAssign, String.class);
				mth.invoke(null, ((PropertyExpr) lhs).getName());
			} catch (NoSuchFieldException e) {

// Path: MySmallBasic/src/com/coducation/smallbasic/util/Util.java
// public class Util {
// 	public static String throwableToStacktrace(Throwable e) {
// 		StringWriter sw = new StringWriter();
// 		e.printStackTrace(new PrintWriter(sw));
// 		String exceptionAsString = sw.toString();
// 		return exceptionAsString;
// 	}
// }


// Path: MySmallBasic/src/com/coducation/smallbasic/Eval.java
import java.lang.reflect.Field;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
import java.util.ArrayList;
import com.coducation.smallbasic.util.Util;

		// End
	}

	public void eval(BasicBlockEnv bbEnv, Env env, Assign assignStmt) {
		Expr lhs = assignStmt.getLSide();
		Expr rhs = assignStmt.getRSide();

		// Value v1 = eval(env, lhs);
		Value v2 = eval(env, rhs);

		// Assigning an array is done by copy.
		if (v2 instanceof ArrayV) {
			v2 = ((ArrayV)v2).copy();
		}

		if (lhs instanceof Var) {
			env.put(((Var) lhs).getVarName(), v2);
		} else if (lhs instanceof PropertyExpr) {
			try {
				String clzName = ((PropertyExpr) lhs).getObj();
				Class clz = getClass(clzName);
				Field fld = clz.getField(((PropertyExpr) lhs).getName());
				fld.set(null, v2);

				// After any field assignment, invoke notifyFieldAssign for
				// Library to know
				// the change of the field value.
				Method mth = clz.getMethod(notifyFieldAssign, String.class);
				mth.invoke(null, ((PropertyExpr) lhs).getName());
			} catch (NoSuchFieldException e) {

				throw new InterpretException("Assign : " + Util.throwableToStacktrace(e), ((PropertyExpr) lhs).getName(), lhs.lineno(), lhs.charat());
