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.py25
1 files changed, 23 insertions, 2 deletions
diff --git a/modeling/prod_multi.py b/modeling/prod_multi.py
index e93eda0..69e29b2 100644
--- a/modeling/prod_multi.py
+++ b/modeling/prod_multi.py
@@ -36,6 +36,7 @@ def multiplication(Model):
arg1 =arg1
arg2 =arg2
result =arg2
+ ~retrieval>
"""
)
mul_arg2_1 = Model.productionstring(
@@ -58,6 +59,7 @@ def multiplication(Model):
arg1 =arg1
arg2 =arg2
result =arg1
+ ~retrieval>
"""
)
mul_arg1_0 = Model.productionstring(
@@ -80,6 +82,7 @@ def multiplication(Model):
arg1 =arg1
arg2 =arg2
result 0
+ ~retrieval>
"""
)
mul_arg2_0 = Model.productionstring(
@@ -102,6 +105,7 @@ def multiplication(Model):
arg1 =arg1
arg2 =arg2
result 0
+ ~retrieval>
"""
)
@@ -123,6 +127,7 @@ def multiplication(Model):
==>
=g>
isa math_goal
+ op mul_try_retrieve
+retrieval>
isa math_op
op mul
@@ -132,12 +137,27 @@ def multiplication(Model):
)
prods.append(mul_start)
+ # mul_start_failure = Model.productionstring(
+ # name="mul_start_failure",
+ # string="""
+ # =g>
+ # isa math_goal
+ # op mul_try_retrieve
+ # arg1 =arg1
+ # arg2 =arg2
+ # ?retrieval>
+ # state error
+ # ==>
+ # isa math_goal
+ # op mul_step
+ # """
+
mul_start_success = Model.productionstring(
name="mul_start_success",
string="""
=g>
isa math_goal
- op mul
+ op mul_try_retrieve
arg1 =arg1
arg2 =arg2
=retrieval>
@@ -166,7 +186,7 @@ def multiplication(Model):
string="""
=g>
isa math_goal
- op mul
+ op mul_try_retrieve
arg1 ~0
arg1 ~1
arg2 ~0
@@ -182,6 +202,7 @@ def multiplication(Model):
==>
=g>
isa math_goal
+ op mul
mul_counter 1
result =arg
+retrieval>