summaryrefslogtreecommitdiff
path: root/modeling/prod_numbers.py
diff options
context:
space:
mode:
authorDobbertin, Niclas <niclas.dobbertin@mailbox.org>2024-05-10 17:34:53 +0200
committerDobbertin, Niclas <niclas.dobbertin@mailbox.org>2024-05-10 17:34:53 +0200
commit3fcf103c9da2444ee3f93f92ac4c811a987b5e90 (patch)
tree779302a0ae8e4ffe9616d269f2c9e4f45793f3d7 /modeling/prod_numbers.py
parent6cb9ee72ba1b2dffcbe418129a110c1d0bbcc0b3 (diff)
working on procedures
Diffstat (limited to 'modeling/prod_numbers.py')
-rw-r--r--modeling/prod_numbers.py38
1 files changed, 26 insertions, 12 deletions
diff --git a/modeling/prod_numbers.py b/modeling/prod_numbers.py
index 8bf1ebb..d0c8466 100644
--- a/modeling/prod_numbers.py
+++ b/modeling/prod_numbers.py
@@ -8,10 +8,14 @@ def number(Model):
string="""
=g>
isa math_goal
- op expand
- expand_slot arg1
arg1 =num
+ ones1 None
+ ?retrieval>
+ state free
==>
+ =g>
+ isa math_goal
+ expand_slot arg1
+retrieval>
isa number
number =num
@@ -24,7 +28,6 @@ def number(Model):
string="""
=g>
isa math_goal
- op expand
expand_slot arg1
arg1 =num
=retrieval>
@@ -36,10 +39,10 @@ def number(Model):
==>
=g>
isa math_goal
- op done
ones1 =one
tens1 =ten
hundreds1 =hun
+ ~retrieval>
"""
)
prods.append(number_expand_arg1_done)
@@ -50,10 +53,14 @@ def number(Model):
string="""
=g>
isa math_goal
- op expand
- expand_slot 2arg
arg2 =num
+ ones2 None
+ ?retrieval>
+ state free
==>
+ =g>
+ isa math_goal
+ expand_slot arg2
+retrieval>
isa number
number =num
@@ -66,7 +73,6 @@ def number(Model):
string="""
=g>
isa math_goal
- op expand
expand_slot arg2
arg2 =num
=retrieval>
@@ -78,10 +84,10 @@ def number(Model):
==>
=g>
isa math_goal
- op done
ones2 =one
tens2 =ten
hundreds2 =hun
+ ~retrieval>
"""
)
prods.append(number_expand_arg2_done)
@@ -91,12 +97,20 @@ def number(Model):
string="""
=g>
isa math_goal
- op contract
- expand_slot result
+ 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
@@ -111,8 +125,8 @@ def number(Model):
string="""
=g>
isa math_goal
- op contract
expand_slot result
+ result None
ones_ans =ones
tens_ans =tens
hundreds_ans =huns
@@ -125,8 +139,8 @@ def number(Model):
==>
=g>
isa math_goal
- op done
result =num
+ ~retrieval>
"""
)
prods.append(number_contract_result_done)