#!/usr/bin/env python3 def number(Model): prods = [] number_expand_arg1 = Model.productionstring( name="number_expand_arg1", string=""" =g> isa math_goal arg1 =num ones1 None expand_slot None ?retrieval> state free buffer empty ==> =g> isa math_goal expand_slot arg1 +retrieval> isa number number =num """ ) prods.append(number_expand_arg1) number_expand_arg1_done = Model.productionstring( name="number_expand_arg1_done", string=""" =g> isa math_goal expand_slot arg1 arg1 =num =retrieval> isa number number =num ones =one tens =ten hundreds =hun ==> =g> isa math_goal expand_slot None ones1 =one tens1 =ten hundreds1 =hun ~retrieval> """ ) prods.append(number_expand_arg1_done) number_expand_arg2 = Model.productionstring( name="number_expand_arg2", string=""" =g> isa math_goal arg2 =num ones2 None expand_slot None ?retrieval> state free buffer empty ==> =g> isa math_goal expand_slot arg2 +retrieval> isa number number =num """ ) prods.append(number_expand_arg2) number_expand_arg2_done = Model.productionstring( name="number_expand_arg2_done", string=""" =g> isa math_goal expand_slot arg2 arg2 =num =retrieval> isa number number =num ones =one tens =ten hundreds =hun ==> =g> isa math_goal expand_slot None ones2 =one tens2 =ten hundreds2 =hun ~retrieval> """ ) prods.append(number_expand_arg2_done) number_contract_result = Model.productionstring( name="number_contract_result", string=""" =g> isa math_goal result None ones_ans ~None tens_ans ~None hundreds_ans ~None hundreds_ans ~busy ones_ans =ones tens_ans =tens hundreds_ans =hunds ?retrieval> state free ==> =g> isa math_goal expand_slot result +retrieval> isa number ones =ones tens =tens hundreds =hunds """ ) prods.append(number_contract_result) number_contract_result_done = Model.productionstring( name="number_contract_result_done", string=""" =g> isa math_goal expand_slot result result None ones_ans =ones tens_ans =tens hundreds_ans =hundreds =retrieval> isa number number =num ones =ones tens =tens hundreds =hundreds ==> =g> isa math_goal result =num expand_slot None ~retrieval> """ ) prods.append(number_contract_result_done) return prods