public bool IsApplicable(Instruction i, Type[] stack) { if (!names.Contains(i.GetName())) return false; var t = stackBefore(i, stack); if (t.Length > stack.Length) return false; for (int j = 0; j < t.Length; j++) if (!IsCompatible(t[j], stack[stack.Length - t.Length + j])) return false; if (i.oc == OpCodes.Ret) if (t.Length != stack.Length) return false; return true; }