summaryrefslogtreecommitdiff
path: root/modeling/prod_multi.py
diff options
context:
space:
mode:
Diffstat (limited to 'modeling/prod_multi.py')
-rw-r--r--modeling/prod_multi.py49
1 files changed, 39 insertions, 10 deletions
diff --git a/modeling/prod_multi.py b/modeling/prod_multi.py
index 9009f6b..9b55f2a 100644
--- a/modeling/prod_multi.py
+++ b/modeling/prod_multi.py
@@ -99,7 +99,7 @@ def multiplication(Model):
=g>
isa math_goal
op done
- """
+ """,
)
mul_continue = Model.productionstring(
@@ -128,10 +128,9 @@ def multiplication(Model):
op add
arg1 =arg2
arg2 =result
- """
+ """,
)
-
mul_step_failure = Model.productionstring(
name="mul_step_failure",
string="""
@@ -152,15 +151,14 @@ def multiplication(Model):
isa math_goal
nextop mul
op add
- arg1 =arg2
+ arg1 =arg
arg2 =result
ones1 None
- ones1 None
- ones1 None
- ones1 None
- ones1 None
- ones1 None
- ones1 None
+ tens1 None
+ hundreds1 None
+ ones2 None
+ tens2 None
+ hundreds2 None
+retrieval>
isa math_op
op add
@@ -169,5 +167,36 @@ def multiplication(Model):
""",
)
+ mul_step_failure_return = Model.productionstring(
+ name="mul_step_failure_return",
+ string="""
+ =g>
+ isa math_goal
+ op mul
+ arg1 =mul
+ arg2 =arg
+ ones2 =ones
+ tens2 =tens
+ hundreds2 =huns
+ mul_counter =mul_counter
+ result =result
+ =retrieval>
+ isa math_op
+ op add
+ arg1 =arg
+ arg2 =result
+ result =sum
+ ==>
+ =g>
+ isa math_goal
+ result =sum
+ +retrieval>
+ isa math_op
+ op add
+ arg1 =mul_counter
+ arg2 1
+ """,
+ )
+ prods.append(mul_start)
return prods