diff options
Diffstat (limited to 'modeling/prod_procedure.py')
-rw-r--r-- | modeling/prod_procedure.py | 164 |
1 files changed, 153 insertions, 11 deletions
diff --git a/modeling/prod_procedure.py b/modeling/prod_procedure.py index de8039f..a40326d 100644 --- a/modeling/prod_procedure.py +++ b/modeling/prod_procedure.py @@ -19,7 +19,7 @@ def procedures(Model): ==> =g> isa math_goal - op retr_task + op retrieve_task +retrieval> isa procedure proc =proc @@ -34,7 +34,7 @@ def procedures(Model): =g> isa math_goal proc =proc - op retr_task + op retrieve_task nextop None result1 None =retrieval> @@ -43,6 +43,8 @@ def procedures(Model): op1 =op arg1_1 =arg1 arg1_2 =arg2 + arg1_1_idx =arg1_idx + arg1_2_idx =arg2_idx ==> =g> isa math_goal @@ -51,6 +53,8 @@ def procedures(Model): op =op arg1 =arg1 arg2 =arg2 + arg1_idx =arg1_idx + arg2_idx =arg2_idx result None expand_slot None hundreds1 None @@ -69,6 +73,118 @@ def procedures(Model): ) prods.append(proc_start_task1) + proc_check_substitute_var1 = Model.productionstring( + name="proc_substitute_var1", + string=""" + =g> + isa math_goal + arg1 ~None + arg1 =arg1 + op =op + nextop None + ==> + +retrieval> + isa number + number =arg1 + =g> + isa math_goal + op check_if_number_arg1 + nextop =op + """ + ) + + proc_check_substitute_var1_number = Model.productionstring( + name="proc_substitute_var1_number", + string=""" + =g> + isa math_goal + arg1 =arg1 + op check_if_number_arg1 + nextop =op + =retrieval> + isa number + number =arg1 + ==> + =g> + isa math_goal + op =op + nextop None + """ + ) + + proc_check_substitute_var1_error = Model.productionstring( + name="proc_substitute_var1_error", + string=""" + =g> + isa math_goal + arg1 =arg1 + op check_if_number_arg1 + nextop =op + ?retrieval> + state error + ==> + =g> + isa math_goal + op vis_find_arg1 + """ + ) + + proc_check_substitute_var2 = Model.productionstring( + name="proc_substitute_var2", + string=""" + =g> + isa math_goal + arg2 ~None + arg2 =arg2 + op =op + nextop None + ==> + +retrieval> + isa number + number =arg2 + =g> + isa math_goal + op check_if_number_arg2 + nextop =op + """ + ) + + proc_check_substitute_var2_number = Model.productionstring( + name="proc_substitute_var2_number", + string=""" + =g> + isa math_goal + arg2 =arg2 + op check_if_number_arg2 + nextop =op + =retrieval> + isa number + number =arg2 + ==> + =g> + isa math_goal + op =op + nextop None + """ + ) + + proc_check_substitute_var2_error = Model.productionstring( + name="proc_substitute_var2_error", + string=""" + =g> + isa math_goal + arg2 =arg2 + op check_if_number_arg2 + nextop =op + ?retrieval> + state error + ==> + =g> + isa math_goal + op vis_find_arg2 + """ + ) + proc_harvest_task1 = Model.productionstring( name="proc_harvest_task1", string=""" @@ -109,11 +225,7 @@ def procedures(Model): isa procedure proc =proc op1 =op1 - arg1_1 =arg1_1 - arg1_2 =arg1_2 op2 =op2 - arg2_1 =arg2_1 - arg2_2 =arg2_2 ==> =g> isa math_goal @@ -123,20 +235,46 @@ def procedures(Model): result1 =result1 result2 =result2 ~retrieval> - +manual> - isa _manual - cmd press_key - key 1 """, ) + proc_substitute_result1_left = Model.productionstring( + name="proc_substitute_result1_left", + string=""" + =g> + isa math_goal + arg1 result1 + result1 ~None + result1 =result1 + ==> + =g> + isa math_goal + arg1 =result1 + """ + ) + + proc_substitute_result1_right = Model.productionstring( + name="proc_substitute_result1_right", + string=""" + =g> + isa math_goal + arg2 result1 + result1 ~None + result1 =result1 + ==> + =g> + isa math_goal + arg2 =result1 + """ + ) + proc_start_task2 = Model.productionstring( name="proc_start_task2", string=""" =g> isa math_goal proc =proc - op retr_task + op retrieve_task nextop None result1 ~None result2 None @@ -146,6 +284,8 @@ def procedures(Model): op2 =op arg2_1 =arg1 arg2_2 =arg2 + arg2_1_idx =arg1_idx + arg2_2_idx =arg2_idx ==> =g> isa math_goal @@ -154,6 +294,8 @@ def procedures(Model): op =op arg1 =arg1 arg2 =arg2 + arg1_idx =arg1_idx + arg2_idx =arg2_idx result None expand_slot None hundreds1 None |