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.py89
1 files changed, 89 insertions, 0 deletions
diff --git a/modeling/prod_multi.py b/modeling/prod_multi.py
index c7e2cbd..9fd088d 100644
--- a/modeling/prod_multi.py
+++ b/modeling/prod_multi.py
@@ -16,6 +16,95 @@ def multiplication(Model):
# )
# prods.append(switch_mul)
+ mul_arg1_1 = Model.productionstring(
+ name="mul_arg1_1",
+ string="""
+ =g>
+ isa math_goal
+ op mul
+ arg1 1
+ arg1 =arg1
+ arg2 =arg2
+ ==>
+ =g>
+ isa math_goal
+ op done
+ result =arg2
+ +imaginal>
+ isa math_op
+ op mul
+ arg1 =arg1
+ arg2 =arg2
+ result =arg2
+ """
+ )
+ mul_arg2_1 = Model.productionstring(
+ name="mul_arg2_1",
+ string="""
+ =g>
+ isa math_goal
+ op mul
+ arg2 1
+ arg1 =arg1
+ arg2 =arg2
+ ==>
+ =g>
+ isa math_goal
+ op done
+ result =arg1
+ +imaginal>
+ isa math_op
+ op mul
+ arg1 =arg1
+ arg2 =arg2
+ result =arg1
+ """
+ )
+ mul_arg1_0 = Model.productionstring(
+ name="mul_arg1_0",
+ string="""
+ =g>
+ isa math_goal
+ op mul
+ arg1 0
+ arg1 =arg1
+ arg2 =arg2
+ ==>
+ =g>
+ isa math_goal
+ op done
+ result 0
+ +imaginal>
+ isa math_op
+ op mul
+ arg1 =arg1
+ arg2 =arg2
+ result 0
+ """
+ )
+ mul_arg2_0 = Model.productionstring(
+ name="mul_arg2_0",
+ string="""
+ =g>
+ isa math_goal
+ op mul
+ arg2 0
+ arg1 =arg1
+ arg2 =arg2
+ ==>
+ =g>
+ isa math_goal
+ op done
+ result 0
+ +imaginal>
+ isa math_op
+ op mul
+ arg1 =arg1
+ arg2 =arg2
+ result 0
+ """
+ )
+
mul_start = Model.productionstring(
name="mul_start",
string="""