/// <summary> /// Changes the tracing mode of a variable. If it is not traced, trace it beforehand /// </summary> /// <param name="var_expr"> Traced variable</param> /// <param name="mode_expr"> Mode (expresion content as string)</param> /// <returns> <see cref="NullVar"/> (equivalent of null/void)</returns> private static NullVar traceModeFunction(Expression var_expr, Expression mode_expr) { Tracer.printTrace($"Tracing \"{var_expr.expr}\" with mode \"{mode_expr.expr}\""); // get the variable Variable var = var_expr.evaluate(); // change the tracing mode (using in Alteration.mode) var.trace_mode = mode_expr.expr; // trace it if not already traced if (!var.isTraced()) { var.startTracing(); } return(new NullVar()); }
public override void execute() { setContext(); int context_integrity_check = Context.getStatusStackCount(); // the tracing instruction execution doesn't take any Tracer.updateTracers() calls foreach (Expression traced_expr in _traced_vars) { Variable traced_var = traced_expr.evaluate(); if (traced_var.isTraced()) { Debugging.print("trying to trace a variable that is already traced: " + traced_expr.expr); continue; } traced_var.startTracing(); } // Smooth Context Context.resetUntilCountReached(context_integrity_check); Context.reset(); }