#!/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 ?retrieval> state free ==> =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 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 ?retrieval> state free ==> =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 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 =huns ?retrieval> state free ==> =g> isa math_goal expand_slot result +retrieval> isa number ones =ones tens =tens hundreds =huns """ ) 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 =huns =retrieval> isa number number =num ones =ones tens =tens hundreds =huns ==> =g> isa math_goal result =num ~retrieval> """ ) prods.append(number_contract_result_done) return prods