import modelverse_kernel.primitives as primitive_functions

class ModelverseKernel(object):
	def __init__(self, root):
		self.root = root
		self.primitives = {}
		self.returnvalue = None
		self.success = True
		self.generators = {}

	def set_overlap(self, lst):
		s = set(lst.pop())
		while (lst):
			s &= set(lst.pop())
		return list(s)

	def execute_yields(self, taskname, operation, params, reply):
		try:
			self.success = True
			self.taskname = taskname
			if taskname not in self.generators:
				self.generators[taskname] = {}
			if operation not in self.generators[taskname]:
				# Create the generator for the function to execute
				self.generators[taskname][operation] = getattr(self, operation)(taskname, *params)

			if reply is not None:
				return self.generators[taskname][operation].send(reply)
			else:
				return next(self.generators[taskname][operation])
		except StopIteration:
			# Done, so remove the generator
			del self.generators[taskname][operation]
			return None
		except:
			raise

	##########################
	### Process primitives ###
	##########################
	def load_primitives(self, taskname):
		hierarchy, =	 yield [('RD', [self.root, '__hierarchy'])]
		primitives, =	yield [('RD', [hierarchy, 'primitives'])]
		keys, =		  yield [('RDK', [primitives])]
		function_names = yield [('RV', [f]) for f in keys]
		signatures  =	yield [('RDN', [primitives, f]) for f in keys]
		bodies =		 yield [('RD', [f, 'body']) for f in signatures]
		for i in range(len(keys)):
			self.primitives[bodies[i]] = getattr(primitive_functions, function_names[i])

	########################################
	### Execute input and output methods ###
	########################################
	def get_output(self, taskname):
		task_root, =		yield [('RD', [self.root, taskname])]
		first_output, =	 yield [('RD', [task_root, 'output'])]
		next_output, rv =   yield [('RD', [first_output, 'next']),
								   ('RD', [first_output, 'value']),
								  ]
		if next_output is None:
			self.success = False
			self.returnvalue = None
		else:
			rv_value, =	 yield [('RV', [rv])]
			_, _ =		  yield [('CD', [task_root, 'output', next_output]),
								   ('DN', [first_output]),
								  ]
			self.returnvalue = rv_value

	def set_input(self, taskname, value):
		task_root, =		yield [('RD', [self.root, taskname])]
		old_input, link =   yield [('RD', [task_root, 'last_input']),
								   ('RDE', [task_root, 'last_input']),
								  ]
		new_input, =		yield [('CN', [])]
		_, _ =			  yield [('CD', [task_root, 'last_input', new_input]),
								   ('CD', [old_input, 'next', new_input]),
								  ]

		new_value, =		yield [('CNV', [value])]
		_, _ =			  yield [('CD', [old_input, 'value', new_value]),
								   ('DE', [link])
								  ]
		self.returnvalue = {'id': 100, 'value': 'success'}

	### Generated rules
	def execute_rule(self, taskname):
		root, = yield [('RR', [])]
		Rules_N1_0 = root
		Rules_N1_1, = yield [('RD', [Rules_N1_0, taskname])]
		Rules_N1_2, = yield [('RD', [Rules_N1_1, 'frame'])]
		Rules_N1_3, = yield [('RD', [Rules_N1_2, 'IP'])]
		Rules_N1_3_V, = yield [('RV', [Rules_N1_3])]
		Rules_N1_4, = yield [('RD', [Rules_N1_2, 'phase'])]
		Rules_N1_4_V, = yield [('RV', [Rules_N1_4])]
		Rules_N2_0 = root
		Rules_N2_1, = yield [('RD', [Rules_N2_0, taskname])]
		Rules_N2_2, = yield [('RD', [Rules_N2_1, 'frame'])]
		Rules_N2_3, = yield [('RD', [Rules_N2_2, 'phase'])]
		Rules_N2_3_V, = yield [('RV', [Rules_N2_3])]
		Rules_N2_5, = yield [('RD', [Rules_N2_2, 'IP'])]
		Rules_N2_5_V, = yield [('RV', [Rules_N2_5])]
		Rules_N3_0 = root
		Rules_N3_1, = yield [('RD', [Rules_N3_0, taskname])]
		Rules_N3_2, = yield [('RD', [Rules_N3_1, 'frame'])]
		Rules_N3_3, = yield [('RD', [Rules_N3_2, 'IP'])]
		Rules_N3_3_V, = yield [('RV', [Rules_N3_3])]
		Rules_N3_4, = yield [('RD', [Rules_N3_2, 'phase'])]
		Rules_N3_4_V, = yield [('RV', [Rules_N3_4])]
		Rules_N4_0 = root
		Rules_N4_1, = yield [('RD', [Rules_N4_0, taskname])]
		Rules_N4_2, = yield [('RD', [Rules_N4_1, 'frame'])]
		Rules_N4_3, = yield [('RD', [Rules_N4_2, 'phase'])]
		Rules_N4_3_V, = yield [('RV', [Rules_N4_3])]
		Rules_N4_6, = yield [('RD', [Rules_N4_2, 'IP'])]
		Rules_N4_6_V, = yield [('RV', [Rules_N4_6])]
		Rules_N5_0 = root
		Rules_N5_1, = yield [('RD', [Rules_N5_0, taskname])]
		Rules_N5_2, = yield [('RD', [Rules_N5_1, 'frame'])]
		Rules_N5_3, = yield [('RD', [Rules_N5_2, 'phase'])]
		Rules_N5_3_V, = yield [('RV', [Rules_N5_3])]
		Rules_N5_4, = yield [('RD', [Rules_N5_2, 'IP'])]
		Rules_N5_4_V, = yield [('RV', [Rules_N5_4])]
		Rules_N6_0 = root
		Rules_N6_1, = yield [('RD', [Rules_N6_0, taskname])]
		Rules_N6_2, = yield [('RD', [Rules_N6_1, 'frame'])]
		Rules_N6_3, = yield [('RD', [Rules_N6_2, 'phase'])]
		Rules_N6_3_V, = yield [('RV', [Rules_N6_3])]
		Rules_N6_5, = yield [('RD', [Rules_N6_2, 'IP'])]
		Rules_N6_5_V, = yield [('RV', [Rules_N6_5])]
		Rules_N7_0 = root
		Rules_N7_1, = yield [('RD', [Rules_N7_0, taskname])]
		Rules_N7_3, = yield [('RD', [Rules_N7_1, 'frame'])]
		Rules_N7_6, = yield [('RD', [Rules_N7_3, 'IP'])]
		Rules_N7_6_V, = yield [('RV', [Rules_N7_6])]
		Rules_N7_10, = yield [('RD', [Rules_N7_3, 'phase'])]
		Rules_N7_10_V, = yield [('RV', [Rules_N7_10])]
		Rules_N7_11, = yield [('RD', [Rules_N7_6, 'last_param'])]
		Rules_N8_0 = root
		Rules_N8_1, = yield [('RD', [Rules_N8_0, taskname])]
		Rules_N8_3, = yield [('RD', [Rules_N8_1, 'frame'])]
		Rules_N8_4, = yield [('RD', [Rules_N8_3, 'IP'])]
		Rules_N8_4_V, = yield [('RV', [Rules_N8_4])]
		Rules_N8_14, = yield [('RD', [Rules_N8_3, 'phase'])]
		Rules_N8_14_V, = yield [('RV', [Rules_N8_14])]
		Rules_N8_5, = yield [('RD', [Rules_N8_4, 'last_param'])]
		Rules_N9_0 = root
		Rules_N9_1, = yield [('RD', [Rules_N9_0, taskname])]
		Rules_N9_2, = yield [('RD', [Rules_N9_1, 'frame'])]
		Rules_N9_14, = yield [('RD', [Rules_N9_2, 'IP'])]
		Rules_N9_14_V, = yield [('RV', [Rules_N9_14])]
		Rules_N9_15, = yield [('RD', [Rules_N9_2, 'phase'])]
		yeizjnlzws, = yield [('RD', [Rules_N9_14, 'params'])]
		if yeizjnlzws != Rules_N9_15:
			Rules_N9_15 = None
		Rules_N9_16, = yield [('RD', [Rules_N9_15, 'next_param'])]
		Rules_N10_0 = root
		Rules_N10_1, = yield [('RD', [Rules_N10_0, taskname])]
		Rules_N10_2, = yield [('RD', [Rules_N10_1, 'frame'])]
		Rules_N10_14, = yield [('RD', [Rules_N10_2, 'IP'])]
		Rules_N10_14_V, = yield [('RV', [Rules_N10_14])]
		Rules_N10_15, = yield [('RD', [Rules_N10_2, 'phase'])]
		yzdjsemeow, = yield [('RD', [Rules_N10_14, 'params'])]
		if yzdjsemeow != Rules_N10_15:
			Rules_N10_15 = None
		iayfvajbid, = yield [('RD', [Rules_N10_14, 'last_param'])]
		if iayfvajbid != Rules_N10_15:
			Rules_N10_15 = None
		Rules_N11_0 = root
		Rules_N11_1, = yield [('RD', [Rules_N11_0, taskname])]
		Rules_N11_2, = yield [('RD', [Rules_N11_1, 'frame'])]
		Rules_N11_16, = yield [('RD', [Rules_N11_2, 'IP'])]
		Rules_N11_16_V, = yield [('RV', [Rules_N11_16])]
		Rules_N11_14, = yield [('RD', [Rules_N11_2, 'phase'])]
		vkdpuyaazv, = yield [('RD', [Rules_N11_16, 'last_param'])]
		if vkdpuyaazv != Rules_N11_14:
			Rules_N11_14 = None
		Rules_N12_0 = root
		Rules_N12_1, = yield [('RD', [Rules_N12_0, taskname])]
		Rules_N12_2, = yield [('RD', [Rules_N12_1, 'frame'])]
		Rules_N12_11, = yield [('RD', [Rules_N12_2, 'phase'])]
		Rules_N12_19, = yield [('RD', [Rules_N12_2, 'IP'])]
		Rules_N12_19_V, = yield [('RV', [Rules_N12_19])]
		Rules_N12_18, = yield [('RD', [Rules_N12_11, 'next_param'])]
		Rules_N13_0 = root
		Rules_N13_1, = yield [('RD', [Rules_N13_0, taskname])]
		Rules_N13_2, = yield [('RD', [Rules_N13_1, 'frame'])]
		Rules_N13_6, = yield [('RD', [Rules_N13_2, 'IP'])]
		Rules_N13_6_V, = yield [('RV', [Rules_N13_6])]
		Rules_N13_3, = yield [('RD', [Rules_N13_2, 'phase'])]
		Rules_N13_3_V, = yield [('RV', [Rules_N13_3])]
		Rules_N13_9, = yield [('RD', [Rules_N13_6, 'params'])]
		Rules_N14_0 = root
		Rules_N14_1, = yield [('RD', [Rules_N14_0, taskname])]
		Rules_N14_2, = yield [('RD', [Rules_N14_1, 'frame'])]
		Rules_N14_5, = yield [('RD', [Rules_N14_2, 'IP'])]
		Rules_N14_5_V, = yield [('RV', [Rules_N14_5])]
		Rules_N14_7, = yield [('RD', [Rules_N14_2, 'phase'])]
		Rules_N14_7_V, = yield [('RV', [Rules_N14_7])]
		Rules_N14_8, = yield [('RD', [Rules_N14_5, 'params'])]
		Rules_N15_0 = root
		Rules_N15_1, = yield [('RD', [Rules_N15_0, taskname])]
		Rules_N15_2, = yield [('RD', [Rules_N15_1, 'frame'])]
		Rules_N15_4, = yield [('RD', [Rules_N15_2, 'phase'])]
		Rules_N15_4_V, = yield [('RV', [Rules_N15_4])]
		Rules_N15_6, = yield [('RD', [Rules_N15_2, 'IP'])]
		Rules_N15_6_V, = yield [('RV', [Rules_N15_6])]
		Rules_N16_0 = root
		Rules_N16_1, = yield [('RD', [Rules_N16_0, taskname])]
		Rules_N16_2, = yield [('RD', [Rules_N16_1, 'frame'])]
		Rules_N16_3, = yield [('RD', [Rules_N16_2, 'phase'])]
		Rules_N16_3_V, = yield [('RV', [Rules_N16_3])]
		Rules_N16_4, = yield [('RD', [Rules_N16_2, 'IP'])]
		Rules_N16_4_V, = yield [('RV', [Rules_N16_4])]
		Rules_N17_0 = root
		Rules_N17_1, = yield [('RD', [Rules_N17_0, taskname])]
		Rules_N17_2, = yield [('RD', [Rules_N17_1, 'frame'])]
		Rules_N17_3, = yield [('RD', [Rules_N17_2, 'phase'])]
		Rules_N17_3_V, = yield [('RV', [Rules_N17_3])]
		Rules_N17_5, = yield [('RD', [Rules_N17_2, 'IP'])]
		Rules_N17_5_V, = yield [('RV', [Rules_N17_5])]
		Rules_N18_0 = root
		Rules_N18_1, = yield [('RD', [Rules_N18_0, taskname])]
		Rules_N18_2, = yield [('RD', [Rules_N18_1, 'frame'])]
		Rules_N18_4, = yield [('RD', [Rules_N18_2, 'phase'])]
		Rules_N18_4_V, = yield [('RV', [Rules_N18_4])]
		Rules_N18_6, = yield [('RD', [Rules_N18_2, 'IP'])]
		Rules_N18_6_V, = yield [('RV', [Rules_N18_6])]
		Rules_N19_0 = root
		Rules_N19_1, = yield [('RD', [Rules_N19_0, taskname])]
		Rules_N19_2, = yield [('RD', [Rules_N19_1, 'frame'])]
		Rules_N19_3, = yield [('RD', [Rules_N19_2, 'phase'])]
		Rules_N19_3_V, = yield [('RV', [Rules_N19_3])]
		Rules_N19_6, = yield [('RD', [Rules_N19_2, 'IP'])]
		Rules_N19_6_V, = yield [('RV', [Rules_N19_6])]
		Rules_N20_0 = root
		Rules_N20_1, = yield [('RD', [Rules_N20_0, taskname])]
		Rules_N20_2, = yield [('RD', [Rules_N20_1, 'frame'])]
		Rules_N20_3, = yield [('RD', [Rules_N20_2, 'phase'])]
		Rules_N20_3_V, = yield [('RV', [Rules_N20_3])]
		Rules_N20_4, = yield [('RD', [Rules_N20_2, 'IP'])]
		Rules_N20_4_V, = yield [('RV', [Rules_N20_4])]
		Rules_N20_6, = yield [('RD', [Rules_N20_2, 'returnvalue'])]
		Rules_N20_6_V, = yield [('RV', [Rules_N20_6])]
		Rules_N20_8, = yield [('RD', [Rules_N20_4, 'else'])]
		Rules_N21_0 = root
		Rules_N21_1, = yield [('RD', [Rules_N21_0, taskname])]
		Rules_N21_2, = yield [('RD', [Rules_N21_1, 'frame'])]
		Rules_N21_5, = yield [('RD', [Rules_N21_2, 'IP'])]
		Rules_N21_5_V, = yield [('RV', [Rules_N21_5])]
		Rules_N21_6, = yield [('RD', [Rules_N21_2, 'returnvalue'])]
		Rules_N21_6_V, = yield [('RV', [Rules_N21_6])]
		Rules_N21_3, = yield [('RD', [Rules_N21_2, 'phase'])]
		Rules_N21_3_V, = yield [('RV', [Rules_N21_3])]
		Rules_N21_7, = yield [('RD', [Rules_N21_5, 'else'])]
		Rules_N22_0 = root
		Rules_N22_1, = yield [('RD', [Rules_N22_0, taskname])]
		Rules_N22_2, = yield [('RD', [Rules_N22_1, 'frame'])]
		Rules_N22_3, = yield [('RD', [Rules_N22_2, 'phase'])]
		Rules_N22_3_V, = yield [('RV', [Rules_N22_3])]
		Rules_N22_9, = yield [('RD', [Rules_N22_2, 'IP'])]
		Rules_N22_9_V, = yield [('RV', [Rules_N22_9])]
		Rules_N22_6, = yield [('RD', [Rules_N22_2, 'returnvalue'])]
		Rules_N22_6_V, = yield [('RV', [Rules_N22_6])]
		Rules_N23_0 = root
		Rules_N23_1, = yield [('RD', [Rules_N23_0, taskname])]
		Rules_N23_2, = yield [('RD', [Rules_N23_1, 'frame'])]
		Rules_N23_8, = yield [('RD', [Rules_N23_1, 'input'])]
		Rules_N23_5, = yield [('RD', [Rules_N23_2, 'IP'])]
		Rules_N23_5_V, = yield [('RV', [Rules_N23_5])]
		Rules_N23_6, = yield [('RD', [Rules_N23_2, 'phase'])]
		Rules_N23_6_V, = yield [('RV', [Rules_N23_6])]
		Rules_N23_7, = yield [('RD', [Rules_N23_8, 'value'])]
		Rules_N24_0 = root
		Rules_N24_1, = yield [('RD', [Rules_N24_0, taskname])]
		Rules_N24_2, = yield [('RD', [Rules_N24_1, 'frame'])]
		Rules_N24_3, = yield [('RD', [Rules_N24_2, 'phase'])]
		Rules_N24_3_V, = yield [('RV', [Rules_N24_3])]
		Rules_N24_5, = yield [('RD', [Rules_N24_2, 'IP'])]
		Rules_N24_6, = yield [('RD', [Rules_N24_5, 'next'])]
		Rules_N25_0 = root
		Rules_N25_1, = yield [('RD', [Rules_N25_0, taskname])]
		Rules_N25_2, = yield [('RD', [Rules_N25_1, 'frame'])]
		Rules_N25_3, = yield [('RD', [Rules_N25_2, 'phase'])]
		Rules_N25_3_V, = yield [('RV', [Rules_N25_3])]
		Rules_N25_4, = yield [('RD', [Rules_N25_2, 'IP'])]
		Rules_N25_9, = yield [('RD', [Rules_N25_4, 'next'])]
		Rules_N26_0 = root
		Rules_N26_1, = yield [('RD', [Rules_N26_0, taskname])]
		Rules_N26_2, = yield [('RD', [Rules_N26_1, 'frame'])]
		Rules_N26_3, = yield [('RD', [Rules_N26_2, 'phase'])]
		Rules_N26_3_V, = yield [('RV', [Rules_N26_3])]
		Rules_N26_4, = yield [('RD', [Rules_N26_2, 'IP'])]
		Rules_N26_4_V, = yield [('RV', [Rules_N26_4])]
		Rules_N27_0 = root
		Rules_N27_1, = yield [('RD', [Rules_N27_0, taskname])]
		Rules_N27_2, = yield [('RD', [Rules_N27_1, 'frame'])]
		Rules_N27_4, = yield [('RD', [Rules_N27_2, 'IP'])]
		Rules_N27_4_V, = yield [('RV', [Rules_N27_4])]
		Rules_N27_5, = yield [('RD', [Rules_N27_2, 'phase'])]
		Rules_N27_5_V, = yield [('RV', [Rules_N27_5])]
		Rules_N28_0 = root
		Rules_N28_1, = yield [('RD', [Rules_N28_0, taskname])]
		Rules_N28_3, = yield [('RD', [Rules_N28_1, 'frame'])]
		Rules_N28_5, = yield [('RD', [Rules_N28_3, 'symbols'])]
		Rules_N28_7, = yield [('RD', [Rules_N28_3, 'IP'])]
		Rules_N28_7_V, = yield [('RV', [Rules_N28_7])]
		Rules_N28_8, = yield [('RD', [Rules_N28_3, 'phase'])]
		Rules_N28_8_V, = yield [('RV', [Rules_N28_8])]
		Rules_N28_10, = yield [('RD', [Rules_N28_7, 'var'])]
		Rules_N28_10_V, = yield [('RV', [Rules_N28_10])]
		Rules_N28_11, = yield [('RDN', [Rules_N28_5, Rules_N28_10])]
		Rules_N29_0 = root
		Rules_N29_1, = yield [('RD', [Rules_N29_0, taskname])]
		Rules_N29_2, = yield [('RD', [Rules_N29_1, 'frame'])]
		Rules_N29_3, = yield [('RD', [Rules_N29_2, 'IP'])]
		Rules_N29_3_V, = yield [('RV', [Rules_N29_3])]
		Rules_N29_4, = yield [('RD', [Rules_N29_2, 'phase'])]
		Rules_N29_4_V, = yield [('RV', [Rules_N29_4])]
		Rules_N29_6, = yield [('RD', [Rules_N29_2, 'symbols'])]
		Rules_N29_9, = yield [('RD', [Rules_N29_3, 'var'])]
		Rules_N29_7, = yield [('RDN', [Rules_N29_6, Rules_N29_9])]
		Rules_N30_0 = root
		Rules_N30_1, = yield [('RD', [Rules_N30_0, taskname])]
		Rules_N30_2, = yield [('RD', [Rules_N30_1, 'frame'])]
		Rules_N30_4, = yield [('RD', [Rules_N30_2, 'phase'])]
		Rules_N30_4_V, = yield [('RV', [Rules_N30_4])]
		Rules_N30_5, = yield [('RD', [Rules_N30_2, 'IP'])]
		Rules_N30_5_V, = yield [('RV', [Rules_N30_5])]
		Rules_N31_0 = root
		Rules_N31_1, = yield [('RD', [Rules_N31_0, taskname])]
		Rules_N31_2, = yield [('RD', [Rules_N31_1, 'frame'])]
		Rules_N31_4, = yield [('RD', [Rules_N31_2, 'phase'])]
		Rules_N31_4_V, = yield [('RV', [Rules_N31_4])]
		Rules_N31_5, = yield [('RD', [Rules_N31_2, 'IP'])]
		Rules_N31_5_V, = yield [('RV', [Rules_N31_5])]
		Rules_N31_6, = yield [('RD', [Rules_N31_5, 'value'])]
		Rules_N32_0 = root
		Rules_N32_1, = yield [('RD', [Rules_N32_0, taskname])]
		Rules_N32_2, = yield [('RD', [Rules_N32_1, 'frame'])]
		Rules_N32_3, = yield [('RD', [Rules_N32_2, 'phase'])]
		Rules_N32_3_V, = yield [('RV', [Rules_N32_3])]
		Rules_N32_5, = yield [('RD', [Rules_N32_2, 'IP'])]
		Rules_N32_5_V, = yield [('RV', [Rules_N32_5])]
		Rules_N32_7, = yield [('RD', [Rules_N32_5, 'value'])]
		Rules_N33_0 = root
		Rules_N33_1, = yield [('RD', [Rules_N33_0, taskname])]
		Rules_N33_2, = yield [('RD', [Rules_N33_1, 'frame'])]
		Rules_N33_3, = yield [('RD', [Rules_N33_2, 'phase'])]
		Rules_N33_3_V, = yield [('RV', [Rules_N33_3])]
		Rules_N33_5, = yield [('RD', [Rules_N33_2, 'IP'])]
		Rules_N33_5_V, = yield [('RV', [Rules_N33_5])]
		Rules_N34_0 = root
		Rules_N34_1, = yield [('RD', [Rules_N34_0, taskname])]
		Rules_N34_2, = yield [('RD', [Rules_N34_1, 'frame'])]
		Rules_N34_3, = yield [('RD', [Rules_N34_2, 'phase'])]
		Rules_N34_3_V, = yield [('RV', [Rules_N34_3])]
		Rules_N34_5, = yield [('RD', [Rules_N34_2, 'IP'])]
		Rules_N34_5_V, = yield [('RV', [Rules_N34_5])]
		Rules_N34_6, = yield [('RD', [Rules_N34_2, 'returnvalue'])]
		Rules_N34_6_V, = yield [('RV', [Rules_N34_6])]
		Rules_N35_0 = root
		Rules_N35_1, = yield [('RD', [Rules_N35_0, taskname])]
		Rules_N35_2, = yield [('RD', [Rules_N35_1, 'frame'])]
		Rules_N35_3, = yield [('RD', [Rules_N35_2, 'phase'])]
		Rules_N35_3_V, = yield [('RV', [Rules_N35_3])]
		Rules_N35_5, = yield [('RD', [Rules_N35_2, 'IP'])]
		Rules_N35_5_V, = yield [('RV', [Rules_N35_5])]
		Rules_N35_7, = yield [('RD', [Rules_N35_2, 'returnvalue'])]
		Rules_N35_7_V, = yield [('RV', [Rules_N35_7])]
		if (False):
			# here to make code generation nicer...
			pass
		elif (True  and Rules_N1_1 is not None  and Rules_N1_2 is not None  and Rules_N1_3 is not None  and isinstance(Rules_N1_3_V , dict) and Rules_N1_3_V['value'] == 'access' and Rules_N1_4 is not None  and Rules_N1_4_V == 'eval'):
			# Execute rule Rules/Access_Eval_N1
			Rules_N1_1, = yield [('RD', [Rules_N1_0, taskname])]
			Rules_N1_2, = yield [('RD', [Rules_N1_1, 'frame'])]
			Rules_N1_3, = yield [('RD', [Rules_N1_2, 'IP'])]
			Rules_N1_4, = yield [('RD', [Rules_N1_2, 'phase'])]
			Rules_N1_4_DEL, = yield [('RDE', [Rules_N1_2, 'phase'])]
			yield [('DE', [Rules_N1_4_DEL])]
			Rules_N1_7, = yield [('RD', [Rules_N1_2, 'returnvalue'])]
			Rules_N1_7_DEL, = yield [('RDE', [Rules_N1_2, 'returnvalue'])]
			yield [('DE', [Rules_N1_7_DEL])]
			Rules_N1_6, = yield [('RD', [Rules_N1_7, 'value'])]
			Rules_N1_5, = yield [('CNV', ['finish'])]
			Rules___16, = yield [('CD', [Rules_N1_2, 'phase', Rules_N1_5])]
			Rules___18, = yield [('CD', [Rules_N1_2, 'returnvalue', Rules_N1_6])]
		elif (True  and Rules_N2_1 is not None  and Rules_N2_2 is not None  and Rules_N2_3 is not None  and Rules_N2_3_V == 'init' and Rules_N2_5 is not None  and isinstance(Rules_N2_5_V , dict) and Rules_N2_5_V['value'] == 'access'):
			# Execute rule Rules/Access_Init_N2
			Rules_N2_1, = yield [('RD', [Rules_N2_0, taskname])]
			Rules_N2_2, = yield [('RD', [Rules_N2_1, 'frame'])]
			Rules_N2_3, = yield [('RD', [Rules_N2_2, 'phase'])]
			Rules_N2_5, = yield [('RD', [Rules_N2_2, 'IP'])]
			Rules_N2_5_DEL, = yield [('RDE', [Rules_N2_2, 'IP'])]
			yield [('DE', [Rules_N2_5_DEL])]
			Rules_N2_6, = yield [('RD', [Rules_N2_2, 'evalstack'])]
			Rules_N2_6_DEL, = yield [('RDE', [Rules_N2_2, 'evalstack'])]
			yield [('DE', [Rules_N2_6_DEL])]
			Rules_N2_7, = yield [('RD', [Rules_N2_5, 'var'])]
			Rules_N2_4, = yield [('CN', [])]
			Rules_N2_8, = yield [('CNV', ['eval'])]
			Rules___41, = yield [('CD', [Rules_N2_2, 'evalstack', Rules_N2_4])]
			Rules___45, = yield [('CD', [Rules_N2_2, 'IP', Rules_N2_7])]
			Rules___47, = yield [('CD', [Rules_N2_4, 'prev', Rules_N2_6])]
			Rules___49, = yield [('CD', [Rules_N2_6, 'phase', Rules_N2_8])]
			Rules___51, = yield [('CD', [Rules_N2_6, 'inst', Rules_N2_5])]
		elif (True  and Rules_N3_1 is not None  and Rules_N3_2 is not None  and Rules_N3_3 is not None  and isinstance(Rules_N3_3_V , dict) and Rules_N3_3_V['value'] == 'assign' and Rules_N3_4 is not None  and Rules_N3_4_V == 'assign'):
			# Execute rule Rules/Assign_Assign_N3
			Rules_N3_1, = yield [('RD', [Rules_N3_0, taskname])]
			Rules_N3_2, = yield [('RD', [Rules_N3_1, 'frame'])]
			Rules_N3_3, = yield [('RD', [Rules_N3_2, 'IP'])]
			Rules_N3_4, = yield [('RD', [Rules_N3_2, 'phase'])]
			Rules_N3_4_DEL, = yield [('RDE', [Rules_N3_2, 'phase'])]
			yield [('DE', [Rules_N3_4_DEL])]
			Rules_N3_6, = yield [('RD', [Rules_N3_2, 'returnvalue'])]
			Rules_N3_7, = yield [('RD', [Rules_N3_2, 'variable'])]
			Rules_N3_7_DEL, = yield [('RDE', [Rules_N3_2, 'variable'])]
			yield [('DE', [Rules_N3_7_DEL])]
			Rules_N3_8, = yield [('RD', [Rules_N3_7, 'value'])]
			Rules_N3_8_DEL, = yield [('RDE', [Rules_N3_7, 'value'])]
			yield [('DE', [Rules_N3_8_DEL])]
			Rules_N3_5, = yield [('CNV', ['finish'])]
			Rules___72, = yield [('CD', [Rules_N3_2, 'phase', Rules_N3_5])]
			Rules___78, = yield [('CD', [Rules_N3_7, 'value', Rules_N3_6])]
		elif (True  and Rules_N4_1 is not None  and Rules_N4_2 is not None  and Rules_N4_3 is not None  and Rules_N4_3_V == 'init' and Rules_N4_6 is not None  and isinstance(Rules_N4_6_V , dict) and Rules_N4_6_V['value'] == 'assign'):
			# Execute rule Rules/Assign_Init_N4
			Rules_N4_1, = yield [('RD', [Rules_N4_0, taskname])]
			Rules_N4_2, = yield [('RD', [Rules_N4_1, 'frame'])]
			Rules_N4_3, = yield [('RD', [Rules_N4_2, 'phase'])]
			Rules_N4_6, = yield [('RD', [Rules_N4_2, 'IP'])]
			Rules_N4_6_DEL, = yield [('RDE', [Rules_N4_2, 'IP'])]
			yield [('DE', [Rules_N4_6_DEL])]
			Rules_N4_5, = yield [('RD', [Rules_N4_2, 'evalstack'])]
			Rules_N4_5_DEL, = yield [('RDE', [Rules_N4_2, 'evalstack'])]
			yield [('DE', [Rules_N4_5_DEL])]
			Rules_N4_8, = yield [('RD', [Rules_N4_6, 'var'])]
			Rules_N4_4, = yield [('CN', [])]
			Rules_N4_7, = yield [('CNV', ['value'])]
			Rules___99, = yield [('CD', [Rules_N4_2, 'evalstack', Rules_N4_4])]
			Rules___103, = yield [('CD', [Rules_N4_2, 'IP', Rules_N4_8])]
			Rules___105, = yield [('CD', [Rules_N4_4, 'prev', Rules_N4_5])]
			Rules___107, = yield [('CD', [Rules_N4_5, 'inst', Rules_N4_6])]
			Rules___109, = yield [('CD', [Rules_N4_5, 'phase', Rules_N4_7])]
		elif (True  and Rules_N5_1 is not None  and Rules_N5_2 is not None  and Rules_N5_3 is not None  and Rules_N5_3_V == 'value' and Rules_N5_4 is not None  and isinstance(Rules_N5_4_V , dict) and Rules_N5_4_V['value'] == 'assign'):
			# Execute rule Rules/Assign_Value_N5
			Rules_N5_1, = yield [('RD', [Rules_N5_0, taskname])]
			Rules_N5_2, = yield [('RD', [Rules_N5_1, 'frame'])]
			Rules_N5_3, = yield [('RD', [Rules_N5_2, 'phase'])]
			Rules_N5_3_DEL, = yield [('RDE', [Rules_N5_2, 'phase'])]
			yield [('DE', [Rules_N5_3_DEL])]
			Rules_N5_4, = yield [('RD', [Rules_N5_2, 'IP'])]
			Rules_N5_4_DEL, = yield [('RDE', [Rules_N5_2, 'IP'])]
			yield [('DE', [Rules_N5_4_DEL])]
			Rules_N5_9, = yield [('RD', [Rules_N5_2, 'evalstack'])]
			Rules_N5_9_DEL, = yield [('RDE', [Rules_N5_2, 'evalstack'])]
			yield [('DE', [Rules_N5_9_DEL])]
			Rules_N5_8, = yield [('RD', [Rules_N5_2, 'returnvalue'])]
			Rules_N5_7, = yield [('RD', [Rules_N5_4, 'value'])]
			Rules_N5_5, = yield [('CN', [])]
			Rules_N5_6, = yield [('CNV', ['init'])]
			Rules_N5_10, = yield [('CNV', ['assign'])]
			Rules___132, = yield [('CD', [Rules_N5_2, 'evalstack', Rules_N5_5])]
			Rules___134, = yield [('CD', [Rules_N5_2, 'phase', Rules_N5_6])]
			Rules___138, = yield [('CD', [Rules_N5_2, 'IP', Rules_N5_7])]
			Rules___142, = yield [('CD', [Rules_N5_2, 'variable', Rules_N5_8])]
			Rules___144, = yield [('CD', [Rules_N5_5, 'prev', Rules_N5_9])]
			Rules___146, = yield [('CD', [Rules_N5_9, 'inst', Rules_N5_4])]
			Rules___148, = yield [('CD', [Rules_N5_9, 'phase', Rules_N5_10])]
		elif (True  and Rules_N6_1 is not None  and Rules_N6_2 is not None  and Rules_N6_3 is not None  and Rules_N6_3_V == 'init' and Rules_N6_5 is not None  and isinstance(Rules_N6_5_V , dict) and Rules_N6_5_V['value'] == 'break'):
			# Execute rule Rules/Break_N6
			Rules_N6_1, = yield [('RD', [Rules_N6_0, taskname])]
			Rules_N6_2, = yield [('RD', [Rules_N6_1, 'frame'])]
			Rules_N6_3, = yield [('RD', [Rules_N6_2, 'phase'])]
			Rules_N6_3_DEL, = yield [('RDE', [Rules_N6_2, 'phase'])]
			yield [('DE', [Rules_N6_3_DEL])]
			Rules_N6_5, = yield [('RD', [Rules_N6_2, 'IP'])]
			Rules_N6_7, = yield [('RD', [Rules_N6_2, 'evalstack'])]
			Rules_N6_7_DEL, = yield [('RDE', [Rules_N6_2, 'evalstack'])]
			yield [('DE', [Rules_N6_7_DEL])]
			Rules_N6_6, = yield [('RD', [Rules_N6_5, 'while'])]
			matched = []
			_tmp, = yield [('RRD', [Rules_N6_6, taskname])]
			matched.append(_tmp)
			Rules_N6_8 = self.set_overlap(matched)[0]
			matched = []
			_tmp, = yield [('RRD', [Rules_N6_8, 'prev'])]
			matched.append(_tmp)
			Rules_N6_10 = self.set_overlap(matched)[0]
			Rules_N6_4, = yield [('CNV', ['finish'])]
			Rules_N6_9, = yield [('CN', [])]
			Rules_N6_11, = yield [('CNV', ['finish'])]
			Rules___171, = yield [('CD', [Rules_N6_2, 'phase', Rules_N6_4])]
			Rules___183, = yield [('CD', [Rules_N6_2, 'evalstack', Rules_N6_9])]
			Rules___185, = yield [('CD', [Rules_N6_9, 'prev', Rules_N6_8])]
			Rules___187, = yield [('CD', [Rules_N6_8, 'phase', Rules_N6_11])]
		elif (True  and Rules_N7_1 is not None  and Rules_N7_3 is not None  and Rules_N7_6 is not None  and isinstance(Rules_N7_6_V , dict) and Rules_N7_6_V['value'] == 'call' and Rules_N7_10 is not None  and Rules_N7_10_V == 'call' and Rules_N7_11 is None ):
			# Execute rule Rules/Call_Call_None_N7
			Rules_N7_1, = yield [('RD', [Rules_N7_0, taskname])]
			Rules_N7_3, = yield [('RD', [Rules_N7_1, 'frame'])]
			Rules_N7_3_DEL, = yield [('RDE', [Rules_N7_1, 'frame'])]
			yield [('DE', [Rules_N7_3_DEL])]
			Rules_N7_6, = yield [('RD', [Rules_N7_3, 'IP'])]
			Rules_N7_8, = yield [('RD', [Rules_N7_3, 'returnvalue'])]
			Rules_N7_10, = yield [('RD', [Rules_N7_3, 'phase'])]
			Rules_N7_10_DEL, = yield [('RDE', [Rules_N7_3, 'phase'])]
			yield [('DE', [Rules_N7_10_DEL])]
			Rules_N7_11, = yield [('RD', [Rules_N7_6, 'last_param'])]
			Rules_N7_12, = yield [('RD', [Rules_N7_8, 'body'])]
			Rules_N7_2, = yield [('CN', [])]
			Rules_N7_4, = yield [('CN', [])]
			Rules_N7_5, = yield [('CN', [])]
			Rules_N7_7, = yield [('CN', [])]
			Rules_N7_9, = yield [('CNV', ['finish'])]
			Rules_N7_13, = yield [('CNV', ['init'])]
			Rules___205, = yield [('CD', [Rules_N7_1, 'frame', Rules_N7_2])]
			Rules___209, = yield [('CD', [Rules_N7_2, 'evalstack', Rules_N7_4])]
			Rules___211, = yield [('CD', [Rules_N7_2, 'symbols', Rules_N7_5])]
			Rules___213, = yield [('CD', [Rules_N7_2, 'caller', Rules_N7_6])]
			Rules___215, = yield [('CD', [Rules_N7_2, 'returnvalue', Rules_N7_7])]
			Rules___217, = yield [('CD', [Rules_N7_2, 'IP', Rules_N7_12])]
			Rules___219, = yield [('CD', [Rules_N7_2, 'phase', Rules_N7_13])]
			Rules___223, = yield [('CD', [Rules_N7_2, 'prev', Rules_N7_3])]
			Rules___229, = yield [('CD', [Rules_N7_3, 'phase', Rules_N7_9])]
		elif (True  and Rules_N8_1 is not None  and Rules_N8_3 is not None  and Rules_N8_4 is not None  and isinstance(Rules_N8_4_V , dict) and Rules_N8_4_V['value'] == 'call' and Rules_N8_5 is not None  and Rules_N8_14 is not None  and Rules_N8_14_V == 'call'):
			# Execute rule Rules/Call_Call_Params_N8
			Rules_N8_1, = yield [('RD', [Rules_N8_0, taskname])]
			Rules_N8_3, = yield [('RD', [Rules_N8_1, 'frame'])]
			Rules_N8_3_DEL, = yield [('RDE', [Rules_N8_1, 'frame'])]
			yield [('DE', [Rules_N8_3_DEL])]
			Rules_N8_4, = yield [('RD', [Rules_N8_3, 'IP'])]
			Rules_N8_8, = yield [('RD', [Rules_N8_3, 'returnvalue'])]
			Rules_N8_14, = yield [('RD', [Rules_N8_3, 'phase'])]
			Rules_N8_14_DEL, = yield [('RDE', [Rules_N8_3, 'phase'])]
			yield [('DE', [Rules_N8_14_DEL])]
			Rules_N8_5, = yield [('RD', [Rules_N8_4, 'last_param'])]
			Rules_N8_6, = yield [('RD', [Rules_N8_5, 'name'])]
			a, = yield [('RV', [Rules_N8_6])]
			matched = []
			_tmp, = yield [('RRD', [Rules_N8_4, 'caller'])]
			matched.append(_tmp)
			_tmp, = yield [('RRD', [Rules_N8_3, 'prev'])]
			matched.append(_tmp)
			Rules_N8_2 = self.set_overlap(matched)[0]
			ljqztmkdxt, = yield [('RD', [Rules_N8_2, 'caller'])]
			if ljqztmkdxt != Rules_N8_4:
				Rules_N8_4 = None
			ponbkoyiug, = yield [('RD', [Rules_N8_2, 'prev'])]
			if ponbkoyiug != Rules_N8_3:
				Rules_N8_3 = None
			Rules_N8_15, = yield [('RD', [Rules_N8_2, 'symbols'])]
			Rules_N8_13, = yield [('RD', [Rules_N8_2, 'IP'])]
			matched = []
			_tmp, = yield [('RRD', [Rules_N8_13, 'body'])]
			matched.append(_tmp)
			Rules_N8_12 = self.set_overlap(matched)[0]
			xykkiaqtlm, = yield [('RD', [Rules_N8_12, 'body'])]
			if xykkiaqtlm != Rules_N8_13:
				Rules_N8_13 = None
			Rules_N8_11, = yield [('RD', [Rules_N8_12, 'params'])]
			Rules_N8_9, = yield [('RD', [Rules_N8_11, a])]
			Rules_N8_7, = yield [('CNV', ['finish'])]
			Rules_N8_10, = yield [('CN', [])]
			Rules___253, = yield [('CD', [Rules_N8_1, 'frame', Rules_N8_2])]
			Rules___267, = yield [('CD', [Rules_N8_3, 'phase', Rules_N8_7])]
			Rules___277, = yield [('CD', [Rules_N8_10, 'value', Rules_N8_8])]
			Rules_N8_16, = yield [('CE', [Rules_N8_15, Rules_N8_10])]
			Rules___286, = yield [('CE', [Rules_N8_16, Rules_N8_9])]
		elif (True  and Rules_N9_1 is not None  and Rules_N9_2 is not None  and Rules_N9_14 is not None  and isinstance(Rules_N9_14_V , dict) and Rules_N9_14_V['value'] == 'call' and Rules_N9_15 is not None  and Rules_N9_16 is not None ):
			# Execute rule Rules/Call_Params_First_Multi_N9
			Rules_N9_1, = yield [('RD', [Rules_N9_0, taskname])]
			Rules_N9_2, = yield [('RD', [Rules_N9_1, 'frame'])]
			Rules_N9_13, = yield [('RD', [Rules_N9_2, 'evalstack'])]
			Rules_N9_13_DEL, = yield [('RDE', [Rules_N9_2, 'evalstack'])]
			yield [('DE', [Rules_N9_13_DEL])]
			Rules_N9_14, = yield [('RD', [Rules_N9_2, 'IP'])]
			Rules_N9_14_DEL, = yield [('RDE', [Rules_N9_2, 'IP'])]
			yield [('DE', [Rules_N9_14_DEL])]
			Rules_N9_15, = yield [('RD', [Rules_N9_2, 'phase'])]
			Rules_N9_15_DEL, = yield [('RDE', [Rules_N9_2, 'phase'])]
			yield [('DE', [Rules_N9_15_DEL])]
			Rules_N9_10, = yield [('RD', [Rules_N9_2, 'returnvalue'])]
			Rules_N9_15, = yield [('RD', [Rules_N9_14, 'params'])]
			Rules_N9_16, = yield [('RD', [Rules_N9_15, 'next_param'])]
			Rules_N9_17, = yield [('RD', [Rules_N9_15, 'value'])]
			Rules_N9_9, = yield [('RD', [Rules_N9_10, 'params'])]
			Rules_N9_8, = yield [('RD', [Rules_N9_10, 'body'])]
			Rules_N9_3, = yield [('CN', [])]
			Rules_N9_4, = yield [('CNV', ['init'])]
			Rules_N9_5, = yield [('CN', [])]
			Rules_N9_6, = yield [('CN', [])]
			Rules_N9_7, = yield [('CN', [])]
			Rules_N9_11, = yield [('CNV', ['init'])]
			Rules_N9_12, = yield [('CN', [])]
			Rules___310, = yield [('CD', [Rules_N9_2, 'evalstack', Rules_N9_12])]
			Rules___316, = yield [('CD', [Rules_N9_2, 'phase', Rules_N9_11])]
			Rules___322, = yield [('CD', [Rules_N9_2, 'IP', Rules_N9_17])]
			Rules___324, = yield [('CD', [Rules_N9_3, 'caller', Rules_N9_14])]
			Rules___326, = yield [('CD', [Rules_N9_3, 'prev', Rules_N9_2])]
			Rules___328, = yield [('CD', [Rules_N9_3, 'phase', Rules_N9_4])]
			Rules___330, = yield [('CD', [Rules_N9_3, 'evalstack', Rules_N9_5])]
			Rules___332, = yield [('CD', [Rules_N9_3, 'symbols', Rules_N9_6])]
			Rules___334, = yield [('CD', [Rules_N9_3, 'returnvalue', Rules_N9_7])]
			Rules___336, = yield [('CD', [Rules_N9_3, 'IP', Rules_N9_8])]
			Rules___342, = yield [('CD', [Rules_N9_12, 'prev', Rules_N9_13])]
			Rules___344, = yield [('CD', [Rules_N9_13, 'inst', Rules_N9_14])]
			Rules___346, = yield [('CD', [Rules_N9_13, 'phase', Rules_N9_16])]
		elif (True  and Rules_N10_1 is not None  and Rules_N10_2 is not None  and Rules_N10_14 is not None  and isinstance(Rules_N10_14_V , dict) and Rules_N10_14_V['value'] == 'call' and Rules_N10_15 is not None ):
			# Execute rule Rules/Call_Params_First_Single_N10
			Rules_N10_1, = yield [('RD', [Rules_N10_0, taskname])]
			Rules_N10_2, = yield [('RD', [Rules_N10_1, 'frame'])]
			Rules_N10_10, = yield [('RD', [Rules_N10_2, 'returnvalue'])]
			Rules_N10_12, = yield [('RD', [Rules_N10_2, 'evalstack'])]
			Rules_N10_12_DEL, = yield [('RDE', [Rules_N10_2, 'evalstack'])]
			yield [('DE', [Rules_N10_12_DEL])]
			Rules_N10_14, = yield [('RD', [Rules_N10_2, 'IP'])]
			Rules_N10_14_DEL, = yield [('RDE', [Rules_N10_2, 'IP'])]
			yield [('DE', [Rules_N10_14_DEL])]
			Rules_N10_15, = yield [('RD', [Rules_N10_2, 'phase'])]
			Rules_N10_15_DEL, = yield [('RDE', [Rules_N10_2, 'phase'])]
			yield [('DE', [Rules_N10_15_DEL])]
			Rules_N10_8, = yield [('RD', [Rules_N10_10, 'body'])]
			Rules_N10_11, = yield [('RD', [Rules_N10_10, 'params'])]
			Rules_N10_15, = yield [('RD', [Rules_N10_14, 'params'])]
			Rules_N10_15, = yield [('RD', [Rules_N10_14, 'last_param'])]
			Rules_N10_16, = yield [('RD', [Rules_N10_15, 'value'])]
			Rules_N10_3, = yield [('CN', [])]
			Rules_N10_4, = yield [('CNV', ['init'])]
			Rules_N10_5, = yield [('CN', [])]
			Rules_N10_6, = yield [('CN', [])]
			Rules_N10_7, = yield [('CN', [])]
			Rules_N10_9, = yield [('CNV', ['init'])]
			Rules_N10_13, = yield [('CNV', ['call'])]
			Rules_N10_17, = yield [('CN', [])]
			Rules___376, = yield [('CD', [Rules_N10_2, 'IP', Rules_N10_16])]
			Rules___378, = yield [('CD', [Rules_N10_2, 'phase', Rules_N10_9])]
			Rules___384, = yield [('CD', [Rules_N10_2, 'evalstack', Rules_N10_17])]
			Rules___390, = yield [('CD', [Rules_N10_3, 'phase', Rules_N10_4])]
			Rules___392, = yield [('CD', [Rules_N10_3, 'evalstack', Rules_N10_5])]
			Rules___394, = yield [('CD', [Rules_N10_3, 'symbols', Rules_N10_6])]
			Rules___396, = yield [('CD', [Rules_N10_3, 'returnvalue', Rules_N10_7])]
			Rules___398, = yield [('CD', [Rules_N10_3, 'prev', Rules_N10_2])]
			Rules___400, = yield [('CD', [Rules_N10_3, 'IP', Rules_N10_8])]
			Rules___402, = yield [('CD', [Rules_N10_3, 'caller', Rules_N10_14])]
			Rules___408, = yield [('CD', [Rules_N10_12, 'phase', Rules_N10_13])]
			Rules___410, = yield [('CD', [Rules_N10_12, 'inst', Rules_N10_14])]
			Rules___418, = yield [('CD', [Rules_N10_17, 'prev', Rules_N10_12])]
		elif (True  and Rules_N11_1 is not None  and Rules_N11_2 is not None  and Rules_N11_14 is not None  and Rules_N11_16 is not None  and isinstance(Rules_N11_16_V , dict) and Rules_N11_16_V['value'] == 'call'):
			# Execute rule Rules/Call_Params_Last_N11
			Rules_N11_1, = yield [('RD', [Rules_N11_0, taskname])]
			Rules_N11_2, = yield [('RD', [Rules_N11_1, 'frame'])]
			Rules_N11_16, = yield [('RD', [Rules_N11_2, 'IP'])]
			Rules_N11_16_DEL, = yield [('RDE', [Rules_N11_2, 'IP'])]
			yield [('DE', [Rules_N11_16_DEL])]
			Rules_N11_17, = yield [('RD', [Rules_N11_2, 'evalstack'])]
			Rules_N11_17_DEL, = yield [('RDE', [Rules_N11_2, 'evalstack'])]
			yield [('DE', [Rules_N11_17_DEL])]
			Rules_N11_14, = yield [('RD', [Rules_N11_2, 'phase'])]
			Rules_N11_14_DEL, = yield [('RDE', [Rules_N11_2, 'phase'])]
			yield [('DE', [Rules_N11_14_DEL])]
			Rules_N11_10, = yield [('RD', [Rules_N11_2, 'returnvalue'])]
			Rules_N11_14, = yield [('RD', [Rules_N11_16, 'last_param'])]
			Rules_N11_13, = yield [('RD', [Rules_N11_14, 'value'])]
			matched = []
			_tmp, = yield [('RRD', [Rules_N11_16, 'caller'])]
			matched.append(_tmp)
			_tmp, = yield [('RRD', [Rules_N11_2, 'prev'])]
			matched.append(_tmp)
			Rules_N11_3 = self.set_overlap(matched)[0]
			matched = []
			_tmp, = yield [('RRD', [Rules_N11_14, 'next_param'])]
			matched.append(_tmp)
			Rules_N11_11 = self.set_overlap(matched)[0]
			whaiqchfgu, = yield [('RD', [Rules_N11_3, 'caller'])]
			if whaiqchfgu != Rules_N11_16:
				Rules_N11_16 = None
			mpozlhzspl, = yield [('RD', [Rules_N11_3, 'prev'])]
			if mpozlhzspl != Rules_N11_2:
				Rules_N11_2 = None
			Rules_N11_20, = yield [('RD', [Rules_N11_3, 'symbols'])]
			Rules_N11_5, = yield [('RD', [Rules_N11_3, 'IP'])]
			pcyvaeoaol, = yield [('RD', [Rules_N11_11, 'next_param'])]
			if pcyvaeoaol != Rules_N11_14:
				Rules_N11_14 = None
			Rules_N11_12, = yield [('RD', [Rules_N11_11, 'name'])]
			a, = yield [('RV', [Rules_N11_12])]
			matched = []
			_tmp, = yield [('RRD', [Rules_N11_5, 'body'])]
			matched.append(_tmp)
			Rules_N11_4 = self.set_overlap(matched)[0]
			llasytmvip, = yield [('RD', [Rules_N11_4, 'body'])]
			if llasytmvip != Rules_N11_5:
				Rules_N11_5 = None
			Rules_N11_6, = yield [('RD', [Rules_N11_4, 'params'])]
			Rules_N11_7, = yield [('RD', [Rules_N11_6, a])]
			Rules_N11_9, = yield [('CN', [])]
			Rules_N11_15, = yield [('CNV', ['call'])]
			Rules_N11_18, = yield [('CN', [])]
			Rules_N11_19, = yield [('CNV', ['init'])]
			Rules___448, = yield [('CD', [Rules_N11_2, 'evalstack', Rules_N11_18])]
			Rules___450, = yield [('CD', [Rules_N11_2, 'phase', Rules_N11_19])]
			Rules___456, = yield [('CD', [Rules_N11_2, 'IP', Rules_N11_13])]
			Rules___472, = yield [('CD', [Rules_N11_9, 'value', Rules_N11_10])]
			Rules___482, = yield [('CD', [Rules_N11_17, 'inst', Rules_N11_16])]
			Rules___484, = yield [('CD', [Rules_N11_17, 'phase', Rules_N11_15])]
			Rules___486, = yield [('CD', [Rules_N11_18, 'prev', Rules_N11_17])]
			Rules_N11_8, = yield [('CE', [Rules_N11_20, Rules_N11_9])]
			Rules___489, = yield [('CE', [Rules_N11_8, Rules_N11_7])]
		elif (True  and Rules_N12_1 is not None  and Rules_N12_2 is not None  and Rules_N12_11 is not None  and Rules_N12_18 is not None  and Rules_N12_19 is not None  and isinstance(Rules_N12_19_V , dict) and Rules_N12_19_V['value'] == 'call'):
			# Execute rule Rules/Call_Params_Next_N12
			Rules_N12_1, = yield [('RD', [Rules_N12_0, taskname])]
			Rules_N12_2, = yield [('RD', [Rules_N12_1, 'frame'])]
			Rules_N12_10, = yield [('RD', [Rules_N12_2, 'returnvalue'])]
			Rules_N12_11, = yield [('RD', [Rules_N12_2, 'phase'])]
			Rules_N12_11_DEL, = yield [('RDE', [Rules_N12_2, 'phase'])]
			yield [('DE', [Rules_N12_11_DEL])]
			Rules_N12_17, = yield [('RD', [Rules_N12_2, 'evalstack'])]
			Rules_N12_17_DEL, = yield [('RDE', [Rules_N12_2, 'evalstack'])]
			yield [('DE', [Rules_N12_17_DEL])]
			Rules_N12_19, = yield [('RD', [Rules_N12_2, 'IP'])]
			Rules_N12_19_DEL, = yield [('RDE', [Rules_N12_2, 'IP'])]
			yield [('DE', [Rules_N12_19_DEL])]
			Rules_N12_18, = yield [('RD', [Rules_N12_11, 'next_param'])]
			Rules_N12_16, = yield [('RD', [Rules_N12_11, 'value'])]
			matched = []
			_tmp, = yield [('RRD', [Rules_N12_2, 'prev'])]
			matched.append(_tmp)
			_tmp, = yield [('RRD', [Rules_N12_19, 'caller'])]
			matched.append(_tmp)
			Rules_N12_3 = self.set_overlap(matched)[0]
			matched = []
			_tmp, = yield [('RRD', [Rules_N12_11, 'next_param'])]
			matched.append(_tmp)
			Rules_N12_12 = self.set_overlap(matched)[0]
			Rules_N12_5, = yield [('RD', [Rules_N12_3, 'IP'])]
			Rules_N12_13, = yield [('RD', [Rules_N12_3, 'symbols'])]
			zhuoodaovc, = yield [('RD', [Rules_N12_3, 'prev'])]
			if zhuoodaovc != Rules_N12_2:
				Rules_N12_2 = None
			byfihktigc, = yield [('RD', [Rules_N12_3, 'caller'])]
			if byfihktigc != Rules_N12_19:
				Rules_N12_19 = None
			Rules_N12_14, = yield [('RD', [Rules_N12_12, 'name'])]
			a, = yield [('RV', [Rules_N12_14])]
			sqnmjascwq, = yield [('RD', [Rules_N12_12, 'next_param'])]
			if sqnmjascwq != Rules_N12_11:
				Rules_N12_11 = None
			matched = []
			_tmp, = yield [('RRD', [Rules_N12_5, 'body'])]
			matched.append(_tmp)
			Rules_N12_4 = self.set_overlap(matched)[0]
			Rules_N12_6, = yield [('RD', [Rules_N12_4, 'params'])]
			pmsgsijptu, = yield [('RD', [Rules_N12_4, 'body'])]
			if pmsgsijptu != Rules_N12_5:
				Rules_N12_5 = None
			Rules_N12_7, = yield [('RD', [Rules_N12_6, a])]
			Rules_N12_9, = yield [('CN', [])]
			Rules_N12_15, = yield [('CN', [])]
			Rules_N12_20, = yield [('CNV', ['init'])]
			Rules___521, = yield [('CD', [Rules_N12_2, 'evalstack', Rules_N12_15])]
			Rules___523, = yield [('CD', [Rules_N12_2, 'IP', Rules_N12_16])]
			Rules___527, = yield [('CD', [Rules_N12_2, 'phase', Rules_N12_20])]
			Rules___543, = yield [('CD', [Rules_N12_9, 'value', Rules_N12_10])]
			Rules___553, = yield [('CD', [Rules_N12_15, 'prev', Rules_N12_17])]
			Rules___555, = yield [('CD', [Rules_N12_17, 'phase', Rules_N12_18])]
			Rules___557, = yield [('CD', [Rules_N12_17, 'inst', Rules_N12_19])]
			Rules_N12_8, = yield [('CE', [Rules_N12_13, Rules_N12_9])]
			Rules___560, = yield [('CE', [Rules_N12_8, Rules_N12_7])]
		elif (True  and Rules_N13_1 is not None  and Rules_N13_2 is not None  and Rules_N13_3 is not None  and Rules_N13_3_V == 'init' and Rules_N13_6 is not None  and isinstance(Rules_N13_6_V , dict) and Rules_N13_6_V['value'] == 'call' and Rules_N13_9 is None ):
			# Execute rule Rules/Call_Resolve_No_Params_N13
			Rules_N13_1, = yield [('RD', [Rules_N13_0, taskname])]
			Rules_N13_2, = yield [('RD', [Rules_N13_1, 'frame'])]
			Rules_N13_6, = yield [('RD', [Rules_N13_2, 'IP'])]
			Rules_N13_6_DEL, = yield [('RDE', [Rules_N13_2, 'IP'])]
			yield [('DE', [Rules_N13_6_DEL])]
			Rules_N13_3, = yield [('RD', [Rules_N13_2, 'phase'])]
			Rules_N13_5, = yield [('RD', [Rules_N13_2, 'evalstack'])]
			Rules_N13_5_DEL, = yield [('RDE', [Rules_N13_2, 'evalstack'])]
			yield [('DE', [Rules_N13_5_DEL])]
			Rules_N13_9, = yield [('RD', [Rules_N13_6, 'params'])]
			Rules_N13_8, = yield [('RD', [Rules_N13_6, 'func'])]
			Rules_N13_4, = yield [('CN', [])]
			Rules_N13_7, = yield [('CNV', ['call'])]
			Rules___580, = yield [('CD', [Rules_N13_2, 'evalstack', Rules_N13_4])]
			Rules___584, = yield [('CD', [Rules_N13_2, 'IP', Rules_N13_8])]
			Rules___586, = yield [('CD', [Rules_N13_4, 'prev', Rules_N13_5])]
			Rules___588, = yield [('CD', [Rules_N13_5, 'inst', Rules_N13_6])]
			Rules___590, = yield [('CD', [Rules_N13_5, 'phase', Rules_N13_7])]
		elif (True  and Rules_N14_1 is not None  and Rules_N14_2 is not None  and Rules_N14_5 is not None  and isinstance(Rules_N14_5_V , dict) and Rules_N14_5_V['value'] == 'call' and Rules_N14_7 is not None  and Rules_N14_7_V == 'init' and Rules_N14_8 is not None ):
			# Execute rule Rules/Call_Resolve_Params_N14
			Rules_N14_1, = yield [('RD', [Rules_N14_0, taskname])]
			Rules_N14_2, = yield [('RD', [Rules_N14_1, 'frame'])]
			Rules_N14_3, = yield [('RD', [Rules_N14_2, 'evalstack'])]
			Rules_N14_3_DEL, = yield [('RDE', [Rules_N14_2, 'evalstack'])]
			yield [('DE', [Rules_N14_3_DEL])]
			Rules_N14_5, = yield [('RD', [Rules_N14_2, 'IP'])]
			Rules_N14_5_DEL, = yield [('RDE', [Rules_N14_2, 'IP'])]
			yield [('DE', [Rules_N14_5_DEL])]
			Rules_N14_7, = yield [('RD', [Rules_N14_2, 'phase'])]
			Rules_N14_8, = yield [('RD', [Rules_N14_5, 'params'])]
			Rules_N14_6, = yield [('RD', [Rules_N14_5, 'func'])]
			Rules_N14_4, = yield [('CN', [])]
			Rules___611, = yield [('CD', [Rules_N14_2, 'evalstack', Rules_N14_4])]
			Rules___615, = yield [('CD', [Rules_N14_2, 'IP', Rules_N14_6])]
			Rules___619, = yield [('CD', [Rules_N14_3, 'phase', Rules_N14_8])]
			Rules___621, = yield [('CD', [Rules_N14_3, 'inst', Rules_N14_5])]
			Rules___623, = yield [('CD', [Rules_N14_4, 'prev', Rules_N14_3])]
		elif (True  and Rules_N15_1 is not None  and Rules_N15_2 is not None  and Rules_N15_4 is not None  and Rules_N15_4_V == 'init' and Rules_N15_6 is not None  and isinstance(Rules_N15_6_V , dict) and Rules_N15_6_V['value'] == 'constant'):
			# Execute rule Rules/Const_N15
			Rules_N15_1, = yield [('RD', [Rules_N15_0, taskname])]
			Rules_N15_2, = yield [('RD', [Rules_N15_1, 'frame'])]
			Rules_N15_3, = yield [('RD', [Rules_N15_2, 'returnvalue'])]
			Rules_N15_3_DEL, = yield [('RDE', [Rules_N15_2, 'returnvalue'])]
			yield [('DE', [Rules_N15_3_DEL])]
			Rules_N15_4, = yield [('RD', [Rules_N15_2, 'phase'])]
			Rules_N15_4_DEL, = yield [('RDE', [Rules_N15_2, 'phase'])]
			yield [('DE', [Rules_N15_4_DEL])]
			Rules_N15_6, = yield [('RD', [Rules_N15_2, 'IP'])]
			Rules_N15_7, = yield [('RD', [Rules_N15_6, 'node'])]
			Rules_N15_5, = yield [('CNV', ['finish'])]
			Rules___641, = yield [('CD', [Rules_N15_2, 'returnvalue', Rules_N15_7])]
			Rules___647, = yield [('CD', [Rules_N15_2, 'phase', Rules_N15_5])]
		elif (True  and Rules_N16_1 is not None  and Rules_N16_2 is not None  and Rules_N16_3 is not None  and Rules_N16_3_V == 'init' and Rules_N16_4 is not None  and isinstance(Rules_N16_4_V , dict) and Rules_N16_4_V['value'] == 'continue'):
			# Execute rule Rules/Continue_N16
			Rules_N16_1, = yield [('RD', [Rules_N16_0, taskname])]
			Rules_N16_2, = yield [('RD', [Rules_N16_1, 'frame'])]
			Rules_N16_3, = yield [('RD', [Rules_N16_2, 'phase'])]
			Rules_N16_3_DEL, = yield [('RDE', [Rules_N16_2, 'phase'])]
			yield [('DE', [Rules_N16_3_DEL])]
			Rules_N16_4, = yield [('RD', [Rules_N16_2, 'IP'])]
			Rules_N16_6, = yield [('RD', [Rules_N16_2, 'evalstack'])]
			Rules_N16_6_DEL, = yield [('RDE', [Rules_N16_2, 'evalstack'])]
			yield [('DE', [Rules_N16_6_DEL])]
			Rules_N16_5, = yield [('RD', [Rules_N16_4, 'while'])]
			matched = []
			_tmp, = yield [('RRD', [Rules_N16_5, taskname])]
			matched.append(_tmp)
			Rules_N16_7 = self.set_overlap(matched)[0]
			matched = []
			_tmp, = yield [('RRD', [Rules_N16_7, 'prev'])]
			matched.append(_tmp)
			Rules_N16_9 = self.set_overlap(matched)[0]
			Rules_N16_8, = yield [('CN', [])]
			Rules_N16_10, = yield [('CNV', ['finish'])]
			Rules___670, = yield [('CD', [Rules_N16_2, 'phase', Rules_N16_10])]
			Rules___682, = yield [('CD', [Rules_N16_2, 'evalstack', Rules_N16_8])]
			Rules___684, = yield [('CD', [Rules_N16_8, 'prev', Rules_N16_7])]
		elif (True  and Rules_N17_1 is not None  and Rules_N17_2 is not None  and Rules_N17_3 is not None  and Rules_N17_3_V == 'init' and Rules_N17_5 is not None  and isinstance(Rules_N17_5_V , dict) and Rules_N17_5_V['value'] == 'declare'):
			# Execute rule Rules/Declare_Init_N17
			Rules_N17_1, = yield [('RD', [Rules_N17_0, taskname])]
			Rules_N17_2, = yield [('RD', [Rules_N17_1, 'frame'])]
			Rules_N17_3, = yield [('RD', [Rules_N17_2, 'phase'])]
			Rules_N17_3_DEL, = yield [('RDE', [Rules_N17_2, 'phase'])]
			yield [('DE', [Rules_N17_3_DEL])]
			Rules_N17_5, = yield [('RD', [Rules_N17_2, 'IP'])]
			Rules_N17_6, = yield [('RD', [Rules_N17_2, 'symbols'])]
			Rules_N17_7, = yield [('RD', [Rules_N17_5, 'var'])]
			Rules_N17_4, = yield [('CNV', ['finish'])]
			Rules_N17_8, = yield [('CN', [])]
			Rules___701, = yield [('CD', [Rules_N17_2, 'phase', Rules_N17_4])]
			Rules_N17_9, = yield [('CE', [Rules_N17_6, Rules_N17_8])]
			Rules___710, = yield [('CE', [Rules_N17_9, Rules_N17_7])]
		elif (True  and Rules_N18_1 is not None  and Rules_N18_2 is not None  and Rules_N18_4 is not None  and Rules_N18_4_V == 'init' and Rules_N18_6 is not None  and isinstance(Rules_N18_6_V , dict) and Rules_N18_6_V['value'] == 'global'):
			# Execute rule Rules/Global_Init_N18
			Rules_N18_1, = yield [('RD', [Rules_N18_0, taskname])]
			Rules_N18_2, = yield [('RD', [Rules_N18_1, 'frame'])]
			Rules_N18_3, = yield [('RD', [Rules_N18_1, 'globals'])]
			Rules_N18_4, = yield [('RD', [Rules_N18_2, 'phase'])]
			Rules_N18_4_DEL, = yield [('RDE', [Rules_N18_2, 'phase'])]
			yield [('DE', [Rules_N18_4_DEL])]
			Rules_N18_6, = yield [('RD', [Rules_N18_2, 'IP'])]
			Rules_N18_7, = yield [('RD', [Rules_N18_6, 'var'])]
			Rules_N18_5, = yield [('CNV', ['finish'])]
			Rules_N18_8, = yield [('CN', [])]
			Rules___729, = yield [('CD', [Rules_N18_2, 'phase', Rules_N18_5])]
			Rules_N18_9, = yield [('CE', [Rules_N18_3, Rules_N18_8])]
			Rules___736, = yield [('CE', [Rules_N18_9, Rules_N18_7])]
		elif (True  and Rules_N19_1 is not None  and Rules_N19_2 is not None  and Rules_N19_3 is not None  and Rules_N19_3_V == 'init' and Rules_N19_6 is not None  and isinstance(Rules_N19_6_V , dict) and Rules_N19_6_V['value'] == 'if'):
			# Execute rule Rules/If_Cond_N19
			Rules_N19_1, = yield [('RD', [Rules_N19_0, taskname])]
			Rules_N19_2, = yield [('RD', [Rules_N19_1, 'frame'])]
			Rules_N19_3, = yield [('RD', [Rules_N19_2, 'phase'])]
			Rules_N19_6, = yield [('RD', [Rules_N19_2, 'IP'])]
			Rules_N19_6_DEL, = yield [('RDE', [Rules_N19_2, 'IP'])]
			yield [('DE', [Rules_N19_6_DEL])]
			Rules_N19_5, = yield [('RD', [Rules_N19_2, 'evalstack'])]
			Rules_N19_5_DEL, = yield [('RDE', [Rules_N19_2, 'evalstack'])]
			yield [('DE', [Rules_N19_5_DEL])]
			Rules_N19_8, = yield [('RD', [Rules_N19_6, 'cond'])]
			Rules_N19_4, = yield [('CN', [])]
			Rules_N19_7, = yield [('CNV', ['cond'])]
			Rules___755, = yield [('CD', [Rules_N19_2, 'evalstack', Rules_N19_4])]
			Rules___759, = yield [('CD', [Rules_N19_2, 'IP', Rules_N19_8])]
			Rules___761, = yield [('CD', [Rules_N19_4, 'prev', Rules_N19_5])]
			Rules___763, = yield [('CD', [Rules_N19_5, 'inst', Rules_N19_6])]
			Rules___765, = yield [('CD', [Rules_N19_5, 'phase', Rules_N19_7])]
		elif (True  and Rules_N20_1 is not None  and Rules_N20_2 is not None  and Rules_N20_3 is not None  and Rules_N20_3_V == 'cond' and Rules_N20_4 is not None  and isinstance(Rules_N20_4_V , dict) and Rules_N20_4_V['value'] == 'if' and Rules_N20_6 is not None  and Rules_N20_6_V == False and Rules_N20_8 is not None ):
			# Execute rule Rules/If_False_Else_N20
			Rules_N20_1, = yield [('RD', [Rules_N20_0, taskname])]
			Rules_N20_2, = yield [('RD', [Rules_N20_1, 'frame'])]
			Rules_N20_3, = yield [('RD', [Rules_N20_2, 'phase'])]
			Rules_N20_3_DEL, = yield [('RDE', [Rules_N20_2, 'phase'])]
			yield [('DE', [Rules_N20_3_DEL])]
			Rules_N20_4, = yield [('RD', [Rules_N20_2, 'IP'])]
			Rules_N20_4_DEL, = yield [('RDE', [Rules_N20_2, 'IP'])]
			yield [('DE', [Rules_N20_4_DEL])]
			Rules_N20_6, = yield [('RD', [Rules_N20_2, 'returnvalue'])]
			Rules_N20_9, = yield [('RD', [Rules_N20_2, 'evalstack'])]
			Rules_N20_9_DEL, = yield [('RDE', [Rules_N20_2, 'evalstack'])]
			yield [('DE', [Rules_N20_9_DEL])]
			Rules_N20_8, = yield [('RD', [Rules_N20_4, 'else'])]
			Rules_N20_5, = yield [('CN', [])]
			Rules_N20_7, = yield [('CNV', ['init'])]
			Rules_N20_10, = yield [('CNV', ['finish'])]
			Rules___788, = yield [('CD', [Rules_N20_2, 'evalstack', Rules_N20_5])]
			Rules___792, = yield [('CD', [Rules_N20_2, 'phase', Rules_N20_7])]
			Rules___796, = yield [('CD', [Rules_N20_2, 'IP', Rules_N20_8])]
			Rules___800, = yield [('CD', [Rules_N20_5, 'prev', Rules_N20_9])]
			Rules___802, = yield [('CD', [Rules_N20_9, 'inst', Rules_N20_4])]
			Rules___804, = yield [('CD', [Rules_N20_9, 'phase', Rules_N20_10])]
		elif (True  and Rules_N21_1 is not None  and Rules_N21_2 is not None  and Rules_N21_3 is not None  and Rules_N21_3_V == 'cond' and Rules_N21_5 is not None  and isinstance(Rules_N21_5_V , dict) and Rules_N21_5_V['value'] == 'if' and Rules_N21_6 is not None  and Rules_N21_6_V == False and Rules_N21_7 is None ):
			# Execute rule Rules/If_False_None_N21
			Rules_N21_1, = yield [('RD', [Rules_N21_0, taskname])]
			Rules_N21_2, = yield [('RD', [Rules_N21_1, 'frame'])]
			Rules_N21_5, = yield [('RD', [Rules_N21_2, 'IP'])]
			Rules_N21_6, = yield [('RD', [Rules_N21_2, 'returnvalue'])]
			Rules_N21_3, = yield [('RD', [Rules_N21_2, 'phase'])]
			Rules_N21_3_DEL, = yield [('RDE', [Rules_N21_2, 'phase'])]
			yield [('DE', [Rules_N21_3_DEL])]
			Rules_N21_7, = yield [('RD', [Rules_N21_5, 'else'])]
			Rules_N21_4, = yield [('CNV', ['finish'])]
			Rules___824, = yield [('CD', [Rules_N21_2, 'phase', Rules_N21_4])]
		elif (True  and Rules_N22_1 is not None  and Rules_N22_2 is not None  and Rules_N22_3 is not None  and Rules_N22_3_V == 'cond' and Rules_N22_6 is not None  and Rules_N22_6_V == True and Rules_N22_9 is not None  and isinstance(Rules_N22_9_V , dict) and Rules_N22_9_V['value'] == 'if'):
			# Execute rule Rules/If_True_N22
			Rules_N22_1, = yield [('RD', [Rules_N22_0, taskname])]
			Rules_N22_2, = yield [('RD', [Rules_N22_1, 'frame'])]
			Rules_N22_3, = yield [('RD', [Rules_N22_2, 'phase'])]
			Rules_N22_3_DEL, = yield [('RDE', [Rules_N22_2, 'phase'])]
			yield [('DE', [Rules_N22_3_DEL])]
			Rules_N22_9, = yield [('RD', [Rules_N22_2, 'IP'])]
			Rules_N22_9_DEL, = yield [('RDE', [Rules_N22_2, 'IP'])]
			yield [('DE', [Rules_N22_9_DEL])]
			Rules_N22_6, = yield [('RD', [Rules_N22_2, 'returnvalue'])]
			Rules_N22_7, = yield [('RD', [Rules_N22_2, 'evalstack'])]
			Rules_N22_7_DEL, = yield [('RDE', [Rules_N22_2, 'evalstack'])]
			yield [('DE', [Rules_N22_7_DEL])]
			Rules_N22_8, = yield [('RD', [Rules_N22_9, 'then'])]
			Rules_N22_4, = yield [('CN', [])]
			Rules_N22_5, = yield [('CNV', ['init'])]
			Rules_N22_10, = yield [('CNV', ['finish'])]
			Rules___847, = yield [('CD', [Rules_N22_2, 'evalstack', Rules_N22_4])]
			Rules___849, = yield [('CD', [Rules_N22_4, 'prev', Rules_N22_7])]
			Rules___851, = yield [('CD', [Rules_N22_2, 'phase', Rules_N22_5])]
			Rules___857, = yield [('CD', [Rules_N22_2, 'IP', Rules_N22_8])]
			Rules___859, = yield [('CD', [Rules_N22_7, 'inst', Rules_N22_9])]
			Rules___861, = yield [('CD', [Rules_N22_7, 'phase', Rules_N22_10])]
		elif (True  and Rules_N23_1 is not None  and Rules_N23_2 is not None  and Rules_N23_5 is not None  and isinstance(Rules_N23_5_V , dict) and Rules_N23_5_V['value'] == 'input' and Rules_N23_6 is not None  and Rules_N23_6_V == 'init' and Rules_N23_7 is not None  and Rules_N23_8 is not None ):
			# Execute rule Rules/Input_N23
			Rules_N23_1, = yield [('RD', [Rules_N23_0, taskname])]
			Rules_N23_2, = yield [('RD', [Rules_N23_1, 'frame'])]
			Rules_N23_8, = yield [('RD', [Rules_N23_1, 'input'])]
			Rules_N23_8_DEL, = yield [('RDE', [Rules_N23_1, 'input'])]
			yield [('DE', [Rules_N23_8_DEL])]
			Rules_N23_4, = yield [('RD', [Rules_N23_2, 'returnvalue'])]
			Rules_N23_4_DEL, = yield [('RDE', [Rules_N23_2, 'returnvalue'])]
			yield [('DE', [Rules_N23_4_DEL])]
			Rules_N23_5, = yield [('RD', [Rules_N23_2, 'IP'])]
			Rules_N23_6, = yield [('RD', [Rules_N23_2, 'phase'])]
			Rules_N23_6_DEL, = yield [('RDE', [Rules_N23_2, 'phase'])]
			yield [('DE', [Rules_N23_6_DEL])]
			Rules_N23_7, = yield [('RD', [Rules_N23_8, 'value'])]
			Rules_N23_7_DEL, = yield [('RDE', [Rules_N23_8, 'value'])]
			yield [('DE', [Rules_N23_7_DEL])]
			Rules_N23_9, = yield [('RD', [Rules_N23_8, 'next'])]
			Rules_N23_9_DEL, = yield [('RDE', [Rules_N23_8, 'next'])]
			yield [('DE', [Rules_N23_9_DEL])]
			Rules_N23_3, = yield [('CNV', ['finish'])]
			Rules___879, = yield [('CD', [Rules_N23_2, 'phase', Rules_N23_3])]
			Rules___887, = yield [('CD', [Rules_N23_2, 'returnvalue', Rules_N23_7])]
			Rules___895, = yield [('CD', [Rules_N23_1, 'input', Rules_N23_9])]
		elif (True  and Rules_N24_1 is not None  and Rules_N24_2 is not None  and Rules_N24_3 is not None  and Rules_N24_3_V == 'finish' and Rules_N24_5 is not None  and Rules_N24_6 is not None ):
			# Execute rule Rules/Next_Next_N24
			Rules_N24_1, = yield [('RD', [Rules_N24_0, taskname])]
			Rules_N24_2, = yield [('RD', [Rules_N24_1, 'frame'])]
			Rules_N24_3, = yield [('RD', [Rules_N24_2, 'phase'])]
			Rules_N24_3_DEL, = yield [('RDE', [Rules_N24_2, 'phase'])]
			yield [('DE', [Rules_N24_3_DEL])]
			Rules_N24_5, = yield [('RD', [Rules_N24_2, 'IP'])]
			Rules_N24_5_DEL, = yield [('RDE', [Rules_N24_2, 'IP'])]
			yield [('DE', [Rules_N24_5_DEL])]
			Rules_N24_6, = yield [('RD', [Rules_N24_5, 'next'])]
			Rules_N24_4, = yield [('CNV', ['init'])]
			Rules___910, = yield [('CD', [Rules_N24_2, 'phase', Rules_N24_4])]
			Rules___914, = yield [('CD', [Rules_N24_2, 'IP', Rules_N24_6])]
		elif (True  and Rules_N25_1 is not None  and Rules_N25_2 is not None  and Rules_N25_3 is not None  and Rules_N25_3_V == 'finish' and Rules_N25_4 is not None  and Rules_N25_9 is None ):
			# Execute rule Rules/Next_NoNext_N25
			Rules_N25_1, = yield [('RD', [Rules_N25_0, taskname])]
			Rules_N25_2, = yield [('RD', [Rules_N25_1, 'frame'])]
			Rules_N25_3, = yield [('RD', [Rules_N25_2, 'phase'])]
			Rules_N25_3_DEL, = yield [('RDE', [Rules_N25_2, 'phase'])]
			yield [('DE', [Rules_N25_3_DEL])]
			Rules_N25_4, = yield [('RD', [Rules_N25_2, 'IP'])]
			Rules_N25_4_DEL, = yield [('RDE', [Rules_N25_2, 'IP'])]
			yield [('DE', [Rules_N25_4_DEL])]
			Rules_N25_6, = yield [('RD', [Rules_N25_2, 'evalstack'])]
			Rules_N25_6_DEL, = yield [('RDE', [Rules_N25_2, 'evalstack'])]
			yield [('DE', [Rules_N25_6_DEL])]
			Rules_N25_9, = yield [('RD', [Rules_N25_4, 'next'])]
			Rules_N25_7, = yield [('RD', [Rules_N25_6, 'prev'])]
			Rules_N25_7_DEL, = yield [('RDE', [Rules_N25_6, 'prev'])]
			yield [('DE', [Rules_N25_7_DEL])]
			Rules_N25_5, = yield [('RD', [Rules_N25_7, 'inst'])]
			Rules_N25_5_DEL, = yield [('RDE', [Rules_N25_7, 'inst'])]
			yield [('DE', [Rules_N25_5_DEL])]
			Rules_N25_8, = yield [('RD', [Rules_N25_7, 'phase'])]
			Rules_N25_8_DEL, = yield [('RDE', [Rules_N25_7, 'phase'])]
			yield [('DE', [Rules_N25_8_DEL])]
			Rules___936, = yield [('CD', [Rules_N25_2, 'IP', Rules_N25_5])]
			Rules___940, = yield [('CD', [Rules_N25_2, 'evalstack', Rules_N25_7])]
			Rules___942, = yield [('CD', [Rules_N25_2, 'phase', Rules_N25_8])]
		elif (True  and Rules_N26_1 is not None  and Rules_N26_2 is not None  and Rules_N26_3 is not None  and Rules_N26_3_V == 'init' and Rules_N26_4 is not None  and isinstance(Rules_N26_4_V , dict) and Rules_N26_4_V['value'] == 'output'):
			# Execute rule Rules/Output_Init_N26
			Rules_N26_1, = yield [('RD', [Rules_N26_0, taskname])]
			Rules_N26_2, = yield [('RD', [Rules_N26_1, 'frame'])]
			Rules_N26_3, = yield [('RD', [Rules_N26_2, 'phase'])]
			Rules_N26_4, = yield [('RD', [Rules_N26_2, 'IP'])]
			Rules_N26_4_DEL, = yield [('RDE', [Rules_N26_2, 'IP'])]
			yield [('DE', [Rules_N26_4_DEL])]
			Rules_N26_6, = yield [('RD', [Rules_N26_2, 'evalstack'])]
			Rules_N26_6_DEL, = yield [('RDE', [Rules_N26_2, 'evalstack'])]
			yield [('DE', [Rules_N26_6_DEL])]
			Rules_N26_7, = yield [('RD', [Rules_N26_4, 'value'])]
			Rules_N26_5, = yield [('CN', [])]
			Rules_N26_8, = yield [('CNV', ['output'])]
			Rules___969, = yield [('CD', [Rules_N26_2, 'evalstack', Rules_N26_5])]
			Rules___971, = yield [('CD', [Rules_N26_5, 'prev', Rules_N26_6])]
			Rules___975, = yield [('CD', [Rules_N26_2, 'IP', Rules_N26_7])]
			Rules___977, = yield [('CD', [Rules_N26_6, 'inst', Rules_N26_4])]
			Rules___979, = yield [('CD', [Rules_N26_6, 'phase', Rules_N26_8])]
		elif (True  and Rules_N27_1 is not None  and Rules_N27_2 is not None  and Rules_N27_4 is not None  and isinstance(Rules_N27_4_V , dict) and Rules_N27_4_V['value'] == 'output' and Rules_N27_5 is not None  and Rules_N27_5_V == 'output'):
			# Execute rule Rules/Output_Output_N27
			Rules_N27_1, = yield [('RD', [Rules_N27_0, taskname])]
			Rules_N27_2, = yield [('RD', [Rules_N27_1, 'frame'])]
			Rules_N27_3, = yield [('RD', [Rules_N27_1, 'last_output'])]
			Rules_N27_3_DEL, = yield [('RDE', [Rules_N27_1, 'last_output'])]
			yield [('DE', [Rules_N27_3_DEL])]
			Rules_N27_4, = yield [('RD', [Rules_N27_2, 'IP'])]
			Rules_N27_5, = yield [('RD', [Rules_N27_2, 'phase'])]
			Rules_N27_5_DEL, = yield [('RDE', [Rules_N27_2, 'phase'])]
			yield [('DE', [Rules_N27_5_DEL])]
			Rules_N27_7, = yield [('RD', [Rules_N27_2, 'returnvalue'])]
			Rules_N27_6, = yield [('CNV', ['finish'])]
			Rules_N27_8, = yield [('CN', [])]
			Rules___1000, = yield [('CD', [Rules_N27_2, 'phase', Rules_N27_6])]
			Rules___1004, = yield [('CD', [Rules_N27_3, 'value', Rules_N27_7])]
			Rules___1006, = yield [('CD', [Rules_N27_3, 'next', Rules_N27_8])]
			Rules___1008, = yield [('CD', [Rules_N27_1, 'last_output', Rules_N27_8])]
		elif (True  and Rules_N28_1 is not None  and Rules_N28_3 is not None  and Rules_N28_5 is not None  and Rules_N28_7 is not None  and isinstance(Rules_N28_7_V , dict) and Rules_N28_7_V['value'] == 'resolve' and Rules_N28_8 is not None  and Rules_N28_8_V == 'init' and Rules_N28_10 is not None  and Rules_N28_11 is None ):
			# Execute rule Rules/Resolve_NoAttrGlobal_N28
			Rules_N28_1, = yield [('RD', [Rules_N28_0, taskname])]
			Rules_N28_2, = yield [('RD', [Rules_N28_1, 'globals'])]
			Rules_N28_3, = yield [('RD', [Rules_N28_1, 'frame'])]
			Rules_N28_5, = yield [('RD', [Rules_N28_3, 'symbols'])]
			Rules_N28_6, = yield [('RD', [Rules_N28_3, 'returnvalue'])]
			Rules_N28_6_DEL, = yield [('RDE', [Rules_N28_3, 'returnvalue'])]
			yield [('DE', [Rules_N28_6_DEL])]
			Rules_N28_7, = yield [('RD', [Rules_N28_3, 'IP'])]
			Rules_N28_8, = yield [('RD', [Rules_N28_3, 'phase'])]
			Rules_N28_8_DEL, = yield [('RDE', [Rules_N28_3, 'phase'])]
			yield [('DE', [Rules_N28_8_DEL])]
			Rules_N28_10, = yield [('RD', [Rules_N28_7, 'var'])]
			a, = yield [('RV', [Rules_N28_10])]
			Rules_N28_9, = yield [('RD', [Rules_N28_2, a])]
			Rules_N28_11, = yield [('RDN', [Rules_N28_5, Rules_N28_10])]
			Rules_N28_4, = yield [('CNV', ['finish'])]
			Rules___1030, = yield [('CD', [Rules_N28_3, 'phase', Rules_N28_4])]
			Rules___1040, = yield [('CD', [Rules_N28_3, 'returnvalue', Rules_N28_9])]
		elif (True  and Rules_N29_1 is not None  and Rules_N29_2 is not None  and Rules_N29_3 is not None  and isinstance(Rules_N29_3_V , dict) and Rules_N29_3_V['value'] == 'resolve' and Rules_N29_4 is not None  and Rules_N29_4_V == 'init' and Rules_N29_6 is not None  and Rules_N29_7 is not None  and Rules_N29_9 is not None ):
			# Execute rule Rules/Resolve_NoAttr_N29
			Rules_N29_1, = yield [('RD', [Rules_N29_0, taskname])]
			Rules_N29_2, = yield [('RD', [Rules_N29_1, 'frame'])]
			Rules_N29_3, = yield [('RD', [Rules_N29_2, 'IP'])]
			Rules_N29_4, = yield [('RD', [Rules_N29_2, 'phase'])]
			Rules_N29_4_DEL, = yield [('RDE', [Rules_N29_2, 'phase'])]
			yield [('DE', [Rules_N29_4_DEL])]
			Rules_N29_6, = yield [('RD', [Rules_N29_2, 'symbols'])]
			Rules_N29_8, = yield [('RD', [Rules_N29_2, 'returnvalue'])]
			Rules_N29_8_DEL, = yield [('RDE', [Rules_N29_2, 'returnvalue'])]
			yield [('DE', [Rules_N29_8_DEL])]
			Rules_N29_9, = yield [('RD', [Rules_N29_3, 'var'])]
			Rules_N29_7, = yield [('RDN', [Rules_N29_6, Rules_N29_9])]
			Rules_N29_5, = yield [('CNV', ['finish'])]
			Rules___1067, = yield [('CD', [Rules_N29_2, 'phase', Rules_N29_5])]
			Rules___1071, = yield [('CD', [Rules_N29_2, 'returnvalue', Rules_N29_7])]
		elif (True  and Rules_N30_1 is not None  and Rules_N30_2 is not None  and Rules_N30_4 is not None  and Rules_N30_4_V == 'eval' and Rules_N30_5 is not None  and isinstance(Rules_N30_5_V , dict) and Rules_N30_5_V['value'] == 'return'):
			# Execute rule Rules/Return_Eval_N30
			Rules_N30_1, = yield [('RD', [Rules_N30_0, taskname])]
			Rules_N30_2, = yield [('RD', [Rules_N30_1, 'frame'])]
			Rules_N30_2_DEL, = yield [('RDE', [Rules_N30_1, 'frame'])]
			yield [('DE', [Rules_N30_2_DEL])]
			Rules_N30_4, = yield [('RD', [Rules_N30_2, 'phase'])]
			Rules_N30_4_DEL, = yield [('RDE', [Rules_N30_2, 'phase'])]
			yield [('DE', [Rules_N30_4_DEL])]
			Rules_N30_5, = yield [('RD', [Rules_N30_2, 'IP'])]
			Rules_N30_5_DEL, = yield [('RDE', [Rules_N30_2, 'IP'])]
			yield [('DE', [Rules_N30_5_DEL])]
			Rules_N30_6, = yield [('RD', [Rules_N30_2, 'returnvalue'])]
			Rules_N30_6_DEL, = yield [('RDE', [Rules_N30_2, 'returnvalue'])]
			yield [('DE', [Rules_N30_6_DEL])]
			Rules_N30_3, = yield [('RD', [Rules_N30_2, 'prev'])]
			Rules_N30_3_DEL, = yield [('RDE', [Rules_N30_2, 'prev'])]
			yield [('DE', [Rules_N30_3_DEL])]
			Rules_N30_7, = yield [('RD', [Rules_N30_3, 'returnvalue'])]
			Rules_N30_7_DEL, = yield [('RDE', [Rules_N30_3, 'returnvalue'])]
			yield [('DE', [Rules_N30_7_DEL])]
			Rules___1092, = yield [('CD', [Rules_N30_1, 'frame', Rules_N30_3])]
			Rules___1102, = yield [('CD', [Rules_N30_3, 'returnvalue', Rules_N30_6])]
		elif (True  and Rules_N31_1 is not None  and Rules_N31_2 is not None  and Rules_N31_4 is not None  and Rules_N31_4_V == 'init' and Rules_N31_5 is not None  and isinstance(Rules_N31_5_V , dict) and Rules_N31_5_V['value'] == 'return' and Rules_N31_6 is None ):
			# Execute rule Rules/Return_NoValue_N31
			Rules_N31_1, = yield [('RD', [Rules_N31_0, taskname])]
			Rules_N31_2, = yield [('RD', [Rules_N31_1, 'frame'])]
			Rules_N31_2_DEL, = yield [('RDE', [Rules_N31_1, 'frame'])]
			yield [('DE', [Rules_N31_2_DEL])]
			Rules_N31_4, = yield [('RD', [Rules_N31_2, 'phase'])]
			Rules_N31_4_DEL, = yield [('RDE', [Rules_N31_2, 'phase'])]
			yield [('DE', [Rules_N31_4_DEL])]
			Rules_N31_5, = yield [('RD', [Rules_N31_2, 'IP'])]
			Rules_N31_5_DEL, = yield [('RDE', [Rules_N31_2, 'IP'])]
			yield [('DE', [Rules_N31_5_DEL])]
			Rules_N31_3, = yield [('RD', [Rules_N31_2, 'prev'])]
			Rules_N31_3_DEL, = yield [('RDE', [Rules_N31_2, 'prev'])]
			yield [('DE', [Rules_N31_3_DEL])]
			Rules_N31_6, = yield [('RD', [Rules_N31_5, 'value'])]
			Rules___1117, = yield [('CD', [Rules_N31_1, 'frame', Rules_N31_3])]
		elif (True  and Rules_N32_1 is not None  and Rules_N32_2 is not None  and Rules_N32_3 is not None  and Rules_N32_3_V == 'init' and Rules_N32_5 is not None  and isinstance(Rules_N32_5_V , dict) and Rules_N32_5_V['value'] == 'return' and Rules_N32_7 is not None ):
			# Execute rule Rules/Return_Value_N32
			Rules_N32_1, = yield [('RD', [Rules_N32_0, taskname])]
			Rules_N32_2, = yield [('RD', [Rules_N32_1, 'frame'])]
			Rules_N32_3, = yield [('RD', [Rules_N32_2, 'phase'])]
			Rules_N32_5, = yield [('RD', [Rules_N32_2, 'IP'])]
			Rules_N32_5_DEL, = yield [('RDE', [Rules_N32_2, 'IP'])]
			yield [('DE', [Rules_N32_5_DEL])]
			Rules_N32_6, = yield [('RD', [Rules_N32_2, 'evalstack'])]
			Rules_N32_6_DEL, = yield [('RDE', [Rules_N32_2, 'evalstack'])]
			yield [('DE', [Rules_N32_6_DEL])]
			Rules_N32_7, = yield [('RD', [Rules_N32_5, 'value'])]
			Rules_N32_4, = yield [('CN', [])]
			Rules_N32_8, = yield [('CNV', ['eval'])]
			Rules___1144, = yield [('CD', [Rules_N32_2, 'evalstack', Rules_N32_4])]
			Rules___1148, = yield [('CD', [Rules_N32_2, 'IP', Rules_N32_7])]
			Rules___1150, = yield [('CD', [Rules_N32_4, 'prev', Rules_N32_6])]
			Rules___1152, = yield [('CD', [Rules_N32_6, 'inst', Rules_N32_5])]
			Rules___1154, = yield [('CD', [Rules_N32_6, 'phase', Rules_N32_8])]
		elif (True  and Rules_N33_1 is not None  and Rules_N33_2 is not None  and Rules_N33_3 is not None  and Rules_N33_3_V == 'init' and Rules_N33_5 is not None  and isinstance(Rules_N33_5_V , dict) and Rules_N33_5_V['value'] == 'while'):
			# Execute rule Rules/While_Cond_N33
			Rules_N33_1, = yield [('RD', [Rules_N33_0, taskname])]
			Rules_N33_2, = yield [('RD', [Rules_N33_1, 'frame'])]
			Rules_N33_3, = yield [('RD', [Rules_N33_2, 'phase'])]
			Rules_N33_5, = yield [('RD', [Rules_N33_2, 'IP'])]
			Rules_N33_5_DEL, = yield [('RDE', [Rules_N33_2, 'IP'])]
			yield [('DE', [Rules_N33_5_DEL])]
			Rules_N33_6, = yield [('RD', [Rules_N33_2, 'evalstack'])]
			Rules_N33_6_DEL, = yield [('RDE', [Rules_N33_2, 'evalstack'])]
			yield [('DE', [Rules_N33_6_DEL])]
			Rules_N33_7, = yield [('RD', [Rules_N33_5, 'cond'])]
			Rules_N33_4, = yield [('CN', [])]
			Rules_N33_8, = yield [('CNV', ['cond'])]
			Rules___1175, = yield [('CD', [Rules_N33_2, 'evalstack', Rules_N33_4])]
			Rules___1179, = yield [('CD', [Rules_N33_2, 'IP', Rules_N33_7])]
			Rules___1181, = yield [('CD', [Rules_N33_4, 'prev', Rules_N33_6])]
			Rules___1183, = yield [('CD', [Rules_N33_6, 'inst', Rules_N33_5])]
			Rules___1185, = yield [('CD', [Rules_N33_6, 'phase', Rules_N33_8])]
		elif (True  and Rules_N34_1 is not None  and Rules_N34_2 is not None  and Rules_N34_3 is not None  and Rules_N34_3_V == 'cond' and Rules_N34_5 is not None  and isinstance(Rules_N34_5_V , dict) and Rules_N34_5_V['value'] == 'while' and Rules_N34_6 is not None  and Rules_N34_6_V == False):
			# Execute rule Rules/While_False_N34
			Rules_N34_1, = yield [('RD', [Rules_N34_0, taskname])]
			Rules_N34_2, = yield [('RD', [Rules_N34_1, 'frame'])]
			Rules_N34_3, = yield [('RD', [Rules_N34_2, 'phase'])]
			Rules_N34_3_DEL, = yield [('RDE', [Rules_N34_2, 'phase'])]
			yield [('DE', [Rules_N34_3_DEL])]
			Rules_N34_5, = yield [('RD', [Rules_N34_2, 'IP'])]
			Rules_N34_6, = yield [('RD', [Rules_N34_2, 'returnvalue'])]
			Rules_N34_4, = yield [('CNV', ['finish'])]
			Rules___1202, = yield [('CD', [Rules_N34_2, 'phase', Rules_N34_4])]
		elif (True  and Rules_N35_1 is not None  and Rules_N35_2 is not None  and Rules_N35_3 is not None  and Rules_N35_3_V == 'cond' and Rules_N35_5 is not None  and isinstance(Rules_N35_5_V , dict) and Rules_N35_5_V['value'] == 'while' and Rules_N35_7 is not None  and Rules_N35_7_V == True):
			# Execute rule Rules/While_True_N35
			Rules_N35_1, = yield [('RD', [Rules_N35_0, taskname])]
			Rules_N35_2, = yield [('RD', [Rules_N35_1, 'frame'])]
			Rules_N35_3, = yield [('RD', [Rules_N35_2, 'phase'])]
			Rules_N35_3_DEL, = yield [('RDE', [Rules_N35_2, 'phase'])]
			yield [('DE', [Rules_N35_3_DEL])]
			Rules_N35_5, = yield [('RD', [Rules_N35_2, 'IP'])]
			Rules_N35_5_DEL, = yield [('RDE', [Rules_N35_2, 'IP'])]
			yield [('DE', [Rules_N35_5_DEL])]
			Rules_N35_7, = yield [('RD', [Rules_N35_2, 'returnvalue'])]
			Rules_N35_8, = yield [('RD', [Rules_N35_2, 'evalstack'])]
			Rules_N35_8_DEL, = yield [('RDE', [Rules_N35_2, 'evalstack'])]
			yield [('DE', [Rules_N35_8_DEL])]
			Rules_N35_9, = yield [('RD', [Rules_N35_5, 'body'])]
			Rules_N35_11, = yield [('RD', [Rules_N35_8, taskname])]
			Rules_N35_11_DEL, = yield [('RDE', [Rules_N35_8, taskname])]
			yield [('DE', [Rules_N35_11_DEL])]
			Rules_N35_4, = yield [('CNV', ['init'])]
			Rules_N35_6, = yield [('CN', [])]
			Rules_N35_10, = yield [('CNV', ['init'])]
			Rules___1226, = yield [('CD', [Rules_N35_2, 'phase', Rules_N35_4])]
			Rules___1230, = yield [('CD', [Rules_N35_2, 'evalstack', Rules_N35_6])]
			Rules___1236, = yield [('CD', [Rules_N35_2, 'IP', Rules_N35_9])]
			Rules___1238, = yield [('CD', [Rules_N35_8, 'inst', Rules_N35_5])]
			Rules___1240, = yield [('CD', [Rules_N35_8, 'phase', Rules_N35_10])]
			Rules___1246, = yield [('CD', [Rules_N35_8, taskname, Rules_N35_5])]
			Rules___1248, = yield [('CD', [Rules_N35_6, 'prev', Rules_N35_8])]
		else:
			task_root, = yield [('RD', [root, taskname])]
			task_frame, = yield [('RD', [task_root, 'frame'])]
			task_IP, = yield [('RD', [task_frame, 'IP'])]
			task_phase, = yield [('RD', [task_frame, 'phase'])]
			task_phase, = yield [('RV', [task_phase])]
			if (task_IP is not None and task_IP in self.primitives and task_phase == 'init'):
				# Execute a primitive!
				symbols, =	   yield [('RD', [task_frame, 'symbols'])]
				all_links, =	 yield [('RO', [symbols])]
				containers =	yield [('RE', [v]) for v in all_links]
				outgoings =	 yield [('RO', [v]) for v in all_links]
				dict_values =   yield [('RD', [v[1], 'value']) for v in containers]
				formals_1 =	 yield [('RE', [v[0]]) for v in outgoings]
				dict_keys_ref = yield [('RD', [v[1], 'name']) for v in formals_1]
				dict_keys =	 yield [('RV', [v]) for v in dict_keys_ref]
				parameters = dict(list(zip(dict_keys, dict_values)))
				parameters['root'] = root
				parameters['task_root'] = task_root
				parameters['taskname'] = taskname
				parameters['mvk'] = self
				# prim is a generator itself!
				try:
					# Forward the message we get to this generator
					# Sometimes it might not even be a generator, in which case this should already be in the except block (i.e., for the Read Root operation)
					prim = self.primitives[task_IP](**parameters)
					inp = None
					while 1:
						inp = yield prim.send(inp)
				except StopIteration:
					# Execution has ended without return value, so we have no idea what to do
					raise Exception('Primitive finished without returning a value!')
				except primitive_functions.PrimitiveFinished as e:
					# Execution has ended with a returnvalue, so read it out from the exception being thrown
					result = e.result
					#if result is None:
					#	raise Exception('Primitive raised exception: value of None for operation %s with parameters %s' % (self.compiled[task_IP], str(parameters)))
				# Clean up the current stack, as if a return happened
				old_frame, =	yield [('RD', [task_frame, 'prev'])]
				lnk, =		  yield [('RDE', [old_frame, 'returnvalue'])]
				_, _, _, _ =	yield [('CD', [old_frame, 'returnvalue', result]),
									   ('CD', [task_root, 'frame', old_frame]),
									   ('DE', [lnk]),
									   ('DN', [task_frame]),
									  ]

			else:
				# no rules were applicable, so idle for some time
				pass #TODO
				raise primitive_functions.SleepKernel(0.1, True)
